@fluid-topics/ft-reader-metadata 2.2.16 → 2.2.17

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 yu=Object.create;var ko=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var xu=Object.getOwnPropertyNames;var bu=Object.getPrototypeOf,Eu=Object.prototype.hasOwnProperty;var Ft=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Su=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of xu(e))!Eu.call(t,n)&&n!==r&&ko(t,n,{get:()=>e[n],enumerable:!(i=vu(e,n))||i.enumerable});return t};var f=(t,e,r)=>(r=t!=null?yu(bu(t)):{},Su(e||!t||!t.__esModule?ko(r,"default",{value:t,enumerable:!0}):r,t));var S=Ft((dp,Uo)=>{Uo.exports=ftGlobals.wcUtils});var P=Ft((pp,$o)=>{$o.exports=ftGlobals.lit});var G=Ft((fp,Fo)=>{Fo.exports=ftGlobals.litDecorators});var ir=Ft((Yy,sc)=>{sc.exports=ftGlobals.litClassMap});var Ec=Ft((cv,bc)=>{bc.exports=ftGlobals.litUnsafeHTML});var ou=Ft((db,nu)=>{nu.exports=ftGlobals.litRepeat});var hu=f(S());var ye=f(P()),$e=f(G()),Ae=f(S());var Bo=f(P());var Ho=Bo.css`
1
+ "use strict";(()=>{var vu=Object.create;var ko=Object.defineProperty;var xu=Object.getOwnPropertyDescriptor;var bu=Object.getOwnPropertyNames;var Eu=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty;var Ft=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Au=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of bu(e))!Su.call(t,n)&&n!==r&&ko(t,n,{get:()=>e[n],enumerable:!(i=xu(e,n))||i.enumerable});return t};var f=(t,e,r)=>(r=t!=null?vu(Eu(t)):{},Au(e||!t||!t.__esModule?ko(r,"default",{value:t,enumerable:!0}):r,t));var S=Ft((pp,Uo)=>{Uo.exports=ftGlobals.wcUtils});var P=Ft((fp,$o)=>{$o.exports=ftGlobals.lit});var G=Ft((hp,Fo)=>{Fo.exports=ftGlobals.litDecorators});var ir=Ft((Qy,ac)=>{ac.exports=ftGlobals.litClassMap});var Sc=Ft((dv,Ec)=>{Ec.exports=ftGlobals.litUnsafeHTML});var su=Ft((fb,ou)=>{ou.exports=ftGlobals.litRepeat});var mu=f(S());var ye=f(P()),$e=f(G()),Ae=f(S());var Bo=f(P());var Ho=Bo.css`
2
2
  :host {
3
3
  display: inline-block;
4
4
  }
@@ -18,9 +18,9 @@
18
18
  all: unset;
19
19
  position: relative;
20
20
  }
21
- `;var Gr=f(S()),Vo=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 We;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(We||(We={}));var Au=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},Cn=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Tn=Symbol("registerInterval"),_u=(0,Gr.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[Tn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Tn]):this.dispatchEvent(new Cn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Tn,Au([(0,Vo.state)()],r.prototype,"stateManager",void 0),r}),Wr=class extends _u(Gr.FtLitElementRedux){};var ic=f(P()),Pe=f(G()),Le=f(S());var Mn=globalThis,jo=t=>t,qr=Mn.trustedTypes,zo=qr?qr.createPolicy("lit-html",{createHTML:t=>t}):void 0,Xo="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,Qo="?"+tt,Tu=`<${Qo}>`,mt=document,Yr=()=>mt.createComment(""),dr=t=>t===null||typeof t!="object"&&typeof t!="function",Nn=Array.isArray,Cu=t=>Nn(t)||typeof t?.[Symbol.iterator]=="function",wn=`[
21
+ `;var Gr=f(S()),Vo=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 Ge;(function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Ge||(Ge={}));var _u=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},Cn=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},Tn=Symbol("registerInterval"),Tu=(0,Gr.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[Tn]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Tn]):this.dispatchEvent(new Cn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Tn,_u([(0,Vo.state)()],r.prototype,"stateManager",void 0),r}),Wr=class extends Tu(Gr.FtLitElementRedux){};var nc=f(P()),Pe=f(G()),Le=f(S());var Mn=globalThis,jo=t=>t,qr=Mn.trustedTypes,zo=qr?qr.createPolicy("lit-html",{createHTML:t=>t}):void 0,Xo="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,Qo="?"+tt,Cu=`<${Qo}>`,mt=document,Yr=()=>mt.createComment(""),dr=t=>t===null||typeof t!="object"&&typeof t!="function",Nn=Array.isArray,wu=t=>Nn(t)||typeof t?.[Symbol.iterator]=="function",wn=`[
22
22
  \f\r]`,ur=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ko=/-->/g,Wo=/>/g,ft=RegExp(`>|${wn}(?:([^\\s"'>=/]+)(${wn}*=${wn}*(?:[^
23
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Go=/'/g,qo=/"/g,Zo=/^(?:script|style|textarea|title)$/i,Dn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Jo=Dn(1),es=Dn(2),ts=Dn(3),pr=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Yo=new WeakMap,ht=mt.createTreeWalker(mt,129);function rs(t,e){if(!Nn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return zo!==void 0?zo.createHTML(e):e}var wu=(t,e)=>{let r=t.length-1,i=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=ur;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===ur?u[1]==="!--"?s=Ko:u[1]!==void 0?s=Wo:u[2]!==void 0?(Zo.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=ft):u[3]!==void 0&&(s=ft):s===ft?u[0]===">"?(s=n??ur,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]==='"'?qo:Go):s===qo||s===Go?s=ft:s===Ko||s===Wo?s=ur:(s=ft,n=void 0);let m=s===ft&&t[a+1].startsWith("/>")?" ":"";o+=s===ur?l+Tu:d>=0?(i.push(c),l.slice(0,d)+Xo+l.slice(d)+tt+m):l+tt+(d===-2?a:m)}return[rs(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},fr=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]=wu(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(Xo)){let p=u[s++],m=n.getAttribute(d).split(tt),v=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:v[2],strings:m,ctor:v[1]==="."?On:v[1]==="?"?Ln:v[1]==="@"?Pn:Ht}),n.removeAttribute(d)}else d.startsWith(tt)&&(l.push({type:6,index:o}),n.removeAttribute(d));if(Zo.test(n.tagName)){let d=n.textContent.split(tt),p=d.length-1;if(p>0){n.textContent=qr?qr.emptyScript:"";for(let m=0;m<p;m++)n.append(d[m],Yr()),ht.nextNode(),l.push({type:2,index:++o});n.append(d[p],Yr())}}}else if(n.nodeType===8)if(n.data===Qo)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 Bt(t,e,r=t,i){if(e===pr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=dr(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=Bt(t,n._$AS(t,e.values),n,i)),e}var Rn=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 Xr(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new In(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++}},Xr=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=Bt(this,e,r),dr(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==pr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Cu(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&&dr(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=fr.createElement(rs(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new Rn(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=Yo.get(e.strings);return r===void 0&&Yo.set(e.strings,r=new fr(e)),r}k(e){Nn(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(Yr()),this.O(Yr()),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=jo(e).nextSibling;jo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Ht=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=Bt(this,e,r,0),s=!dr(e)||e!==this._$AH&&e!==pr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Bt(this,a[i+l],r,l),c===pr&&(c=this._$AH[l]),s||=!dr(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??"")}},On=class extends Ht{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}},Ln=class extends Ht{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}},Pn=class extends Ht{constructor(e,r,i,n,o){super(e,r,i,n,o),this.type=5}_$AI(e,r=this){if((e=Bt(this,e,r,0)??K)===pr)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)}},In=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){Bt(this,e)}};var Ru=Mn.litHtmlPolyfillSupport;Ru?.(fr,Xr),(Mn.litHtmlVersions??=[]).push("3.3.3");var ns=Symbol.for(""),Ou=t=>{if(t?.r===ns)return t?._$litStatic$},kn=t=>({_$litStatic$:t,r:ns});var is=new Map,Un=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=Ou(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=is.get(d))===void 0&&(s.raw=s,is.set(d,e=s)),r=a}return t(e,...r)},$n=Un(Jo),bp=Un(es),Ep=Un(ts);var Fn=f(G()),vs=f(S());var Te;(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"})(Te||(Te={}));var Ce=f(P()),h=f(S()),os=h.FtCssVariableFactory.extend("--ft-typography-font-family","",h.designSystemVariables.titleFont),Ge=h.FtCssVariableFactory.extend("--ft-typography-font-family","",h.designSystemVariables.contentFont),x={fontFamily:Ge,fontSize:h.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:h.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:h.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:h.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:h.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:h.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},gt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-title-font-family","",os),fontSize:h.FtCssVariableFactory.extend("--ft-typography-title-font-size","",x.fontSize,"20px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",x.letterSpacing,"0.15px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-title-line-height","",x.lineHeight,"1.2"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",x.textDecoration,"inherit")},yt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",os),fontSize:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",x.letterSpacing,"0.105px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",x.lineHeight,"1.7"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",x.textDecoration,"inherit")},vt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",x.fontSize,"16px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",x.fontWeight,"600"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",x.letterSpacing,"0.144px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",x.lineHeight,"1.5"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",x.textDecoration,"inherit")},xt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",x.letterSpacing,"0.098px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",x.lineHeight,"1.7"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",x.textDecoration,"inherit")},bt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",x.fontSize,"16px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",x.letterSpacing,"0.496px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",x.lineHeight,"1.5"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",x.textDecoration,"inherit")},ve={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",x.letterSpacing,"0.252px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",x.lineHeight,"1.4"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",x.textDecoration,"inherit")},Et={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",x.fontSize,"12px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",x.letterSpacing,"0.396px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",x.lineHeight,"1.33"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",x.textDecoration,"inherit")},St={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",x.fontSize,"10px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",x.letterSpacing,"0.33px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",x.lineHeight,"1.6"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",x.textDecoration,"inherit")},At={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",x.fontSize,"10px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",x.letterSpacing,"1.5px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",x.lineHeight,"1.6"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",x.textTransform,"uppercase"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",x.textDecoration,"inherit")},Ie={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Ge),fontSize:h.FtCssVariableFactory.extend("--ft-typography-button-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",x.fontWeight,"600"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",x.letterSpacing,"1.246px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-button-line-height","",x.lineHeight,"1.15"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",x.textTransform,"uppercase"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",x.textDecoration,"inherit")},ss=Ce.css`
23
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Go=/'/g,qo=/"/g,Zo=/^(?:script|style|textarea|title)$/i,Dn=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),Jo=Dn(1),es=Dn(2),ts=Dn(3),pr=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Yo=new WeakMap,ht=mt.createTreeWalker(mt,129);function rs(t,e){if(!Nn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return zo!==void 0?zo.createHTML(e):e}var Ru=(t,e)=>{let r=t.length-1,i=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=ur;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===ur?u[1]==="!--"?s=Ko:u[1]!==void 0?s=Wo:u[2]!==void 0?(Zo.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=ft):u[3]!==void 0&&(s=ft):s===ft?u[0]===">"?(s=n??ur,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]==='"'?qo:Go):s===qo||s===Go?s=ft:s===Ko||s===Wo?s=ur:(s=ft,n=void 0);let m=s===ft&&t[a+1].startsWith("/>")?" ":"";o+=s===ur?l+Cu:d>=0?(i.push(c),l.slice(0,d)+Xo+l.slice(d)+tt+m):l+tt+(d===-2?a:m)}return[rs(t,o+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},fr=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]=Ru(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(Xo)){let p=u[s++],m=n.getAttribute(d).split(tt),v=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:v[2],strings:m,ctor:v[1]==="."?On:v[1]==="?"?Ln:v[1]==="@"?Pn:Ht}),n.removeAttribute(d)}else d.startsWith(tt)&&(l.push({type:6,index:o}),n.removeAttribute(d));if(Zo.test(n.tagName)){let d=n.textContent.split(tt),p=d.length-1;if(p>0){n.textContent=qr?qr.emptyScript:"";for(let m=0;m<p;m++)n.append(d[m],Yr()),ht.nextNode(),l.push({type:2,index:++o});n.append(d[p],Yr())}}}else if(n.nodeType===8)if(n.data===Qo)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 Bt(t,e,r=t,i){if(e===pr)return e;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=dr(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=Bt(t,n._$AS(t,e.values),n,i)),e}var Rn=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 Xr(o,o.nextSibling,this,e):l.type===1?c=new l.ctor(o,l.name,l.strings,this,e):l.type===6&&(c=new In(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++}},Xr=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=Bt(this,e,r),dr(e)?e===K||e==null||e===""?(this._$AH!==K&&this._$AR(),this._$AH=K):e!==this._$AH&&e!==pr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):wu(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&&dr(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=fr.createElement(rs(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new Rn(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(e){let r=Yo.get(e.strings);return r===void 0&&Yo.set(e.strings,r=new fr(e)),r}k(e){Nn(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(Yr()),this.O(Yr()),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=jo(e).nextSibling;jo(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Ht=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=Bt(this,e,r,0),s=!dr(e)||e!==this._$AH&&e!==pr,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l<o.length-1;l++)c=Bt(this,a[i+l],r,l),c===pr&&(c=this._$AH[l]),s||=!dr(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??"")}},On=class extends Ht{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===K?void 0:e}},Ln=class extends Ht{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==K)}},Pn=class extends Ht{constructor(e,r,i,n,o){super(e,r,i,n,o),this.type=5}_$AI(e,r=this){if((e=Bt(this,e,r,0)??K)===pr)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)}},In=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){Bt(this,e)}};var Ou=Mn.litHtmlPolyfillSupport;Ou?.(fr,Xr),(Mn.litHtmlVersions??=[]).push("3.3.3");var ns=Symbol.for(""),Lu=t=>{if(t?.r===ns)return t?._$litStatic$},kn=t=>({_$litStatic$:t,r:ns});var is=new Map,Un=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=Lu(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=is.get(d))===void 0&&(s.raw=s,is.set(d,e=s)),r=a}return t(e,...r)},$n=Un(Jo),Ep=Un(es),Sp=Un(ts);var Fn=f(G()),vs=f(S());var Te;(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"})(Te||(Te={}));var Ce=f(P()),h=f(S()),os=h.FtCssVariableFactory.extend("--ft-typography-font-family","",h.designSystemVariables.titleFont),qe=h.FtCssVariableFactory.extend("--ft-typography-font-family","",h.designSystemVariables.contentFont),x={fontFamily:qe,fontSize:h.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:h.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:h.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:h.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:h.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:h.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},gt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-title-font-family","",os),fontSize:h.FtCssVariableFactory.extend("--ft-typography-title-font-size","",x.fontSize,"20px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",x.letterSpacing,"0.15px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-title-line-height","",x.lineHeight,"1.2"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",x.textDecoration,"inherit")},yt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",os),fontSize:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",x.letterSpacing,"0.105px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",x.lineHeight,"1.7"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",x.textDecoration,"inherit")},vt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",x.fontSize,"16px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",x.fontWeight,"600"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",x.letterSpacing,"0.144px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",x.lineHeight,"1.5"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",x.textDecoration,"inherit")},xt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",x.letterSpacing,"0.098px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",x.lineHeight,"1.7"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",x.textDecoration,"inherit")},bt={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",x.fontSize,"16px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",x.letterSpacing,"0.496px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",x.lineHeight,"1.5"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",x.textDecoration,"inherit")},ve={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",x.letterSpacing,"0.252px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",x.lineHeight,"1.4"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",x.textDecoration,"inherit")},Et={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",x.fontSize,"12px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",x.letterSpacing,"0.396px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",x.lineHeight,"1.33"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",x.textDecoration,"inherit")},St={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",x.fontSize,"10px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",x.letterSpacing,"0.33px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",x.lineHeight,"1.6"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",x.textTransform,"inherit"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",x.textDecoration,"inherit")},At={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",x.fontSize,"10px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",x.fontWeight,"normal"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",x.letterSpacing,"1.5px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",x.lineHeight,"1.6"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",x.textTransform,"uppercase"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",x.textDecoration,"inherit")},Ie={fontFamily:h.FtCssVariableFactory.extend("--ft-typography-button-font-family","",qe),fontSize:h.FtCssVariableFactory.extend("--ft-typography-button-font-size","",x.fontSize,"14px"),fontWeight:h.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",x.fontWeight,"600"),letterSpacing:h.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",x.letterSpacing,"1.246px"),lineHeight:h.FtCssVariableFactory.extend("--ft-typography-button-line-height","",x.lineHeight,"1.15"),textTransform:h.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",x.textTransform,"uppercase"),textDecoration:h.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",x.textDecoration,"inherit")},ss=Ce.css`
24
24
  .ft-typography--title {
25
25
  font-family: ${gt.fontFamily};
26
26
  font-size: ${gt.fontSize};
@@ -164,15 +164,15 @@
164
164
  position: relative;
165
165
  word-break: break-word;
166
166
  }
167
- `;var _s=["top","right","bottom","left"],As=["start","end"],Hn=_s.reduce((t,e)=>t.concat(e,e+"-"+As[0],e+"-"+As[1]),[]),mr=Math.min,it=Math.max,gr=Math.round;var Fe=t=>({x:t,y:t}),Lu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ts(t,e,r){return it(t,mr(e,r))}function Qr(t,e){return typeof t=="function"?t(e):t}function yr(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function Vn(t){return t==="x"?"y":"x"}function jn(t){return t==="y"?"height":"width"}function Zr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function zn(t){return Vn(Zr(t))}function Cs(t,e,r){r===void 0&&(r=!1);let i=nt(t),n=zn(t),o=jn(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 ws(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Bn(t){let e=yr(t);return Lu[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 Rs(t){return typeof t!="number"?Pu(t):{top:t,right:t,bottom:t,left:t}}function _t(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 Os(t,e,r){let{reference:i,floating:n}=t,o=Zr(e),s=zn(e),a=jn(s),l=yr(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,m;switch(l){case"top":m={x:u,y:i.y-n.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-n.width,y:d};break;default:m={x:i.x,y:i.y}}let v=nt(e);return v&&(m[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),m}async function Ls(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:m=0}=Qr(e,t),v=Rs(m),y=a[p?d==="floating"?"reference":"floating":d],_=_t(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})),L=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(E))&&await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1},O=_t(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:L,offsetParent:E,strategy:l}):L);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 Iu=50,Ps=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ls},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Os(c,i,l),p=i,m=0,v={};for(let A=0;A<o.length;A++){let y=o[A];if(!y)continue;let{name:_,fn:L}=y,{x:E,y:C,data:O,reset:V}=await L({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:t,floating:e}});u=E??u,d=C??d,v[_]={...v[_],...O},V&&m<Iu&&(m++,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}=Os(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=>yr(n)===n)).filter(n=>t?nt(n)===t||(e?ws(n)!==n:!1):!0)}var Is=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:m=!0,...v}=Qr(t,e),A=d!==void 0||p===Hn?Mu(d||null,m,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 L=await l.detectOverflow(e,v),E=Cs(_,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[L[yr(_)],L[E[0]],L[E[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(_e=>{let pt=nt(_e.placement);return[_e.placement,pt&&u?_e.overflows.slice(0,2).reduce((mu,gu)=>mu+gu,0):_e.overflows[0],_e.overflows]}).sort((_e,pt)=>_e[1]-pt[1]),cr=((n=D.filter(_e=>_e[2].slice(0,nt(_e[0])?2:3).every(pt=>pt<=0))[0])==null?void 0:n[0])||D[0][0];return cr!==a?{data:{index:y+1,overflows:O},reset:{placement:cr}}:{}}}};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:L=>{let{x:E,y:C}=L;return{x:E,y:C}}},...c}=Qr(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=Zr(n),m=Vn(p),v=u[m],A=u[p],y=(L,E)=>Ts(E+d[L==="y"?"top":"left"],E,E-d[L==="y"?"bottom":"right"]);s&&(v=y(m,v)),a&&(A=y(p,A));let _=l.fn({...e,[m]:v,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[m]:s,[p]:a}}}}}};function ei(){return typeof window<"u"}function Ct(t){return Ds(t)?(t.nodeName||"").toLowerCase():"#document"}function pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function qe(t){var e;return(e=(Ds(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ds(t){return ei()?t instanceof Node||t instanceof pe(t).Node:!1}function Me(t){return ei()?t instanceof Element||t instanceof pe(t).Element:!1}function Ye(t){return ei()?t instanceof HTMLElement||t instanceof pe(t).HTMLElement:!1}function Ns(t){return!ei()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pe(t).ShadowRoot}function vr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=Ne(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ks(t){return/^(table|td|th)$/.test(Ct(t))}function xr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Nu=/transform|translate|scale|rotate|perspective|filter/,Du=/paint|layout|strict|content/,Tt=t=>!!t&&t!=="none",Kn;function Vt(t){let e=Me(t)?Ne(t):t;return Tt(e.transform)||Tt(e.translate)||Tt(e.scale)||Tt(e.rotate)||Tt(e.perspective)||!ti()&&(Tt(e.backdropFilter)||Tt(e.filter))||Nu.test(e.willChange||"")||Du.test(e.contain||"")}function Us(t){let e=ot(t);for(;Ye(e)&&!jt(e);){if(Vt(e))return e;if(xr(e))return null;e=ot(e)}return null}function ti(){return Kn==null&&(Kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kn}function jt(t){return/^(html|body|#document)$/.test(Ct(t))}function Ne(t){return pe(t).getComputedStyle(t)}function br(t){return Me(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(Ct(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ns(t)&&t.host||qe(t);return Ns(e)?e.host:e}function $s(t){let e=ot(t);return jt(e)?(t.ownerDocument||t).body:Ye(e)&&vr(e)?e:$s(e)}function Jr(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=$s(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=pe(n);if(o){let a=ri(s);return e.concat(s,s.visualViewport||[],vr(n)?n:[],a&&r?Jr(a):[])}else return e.concat(n,Jr(n,[],r))}function ri(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hs(t){let e=Ne(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=Ye(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=gr(r)!==o||gr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Vs(t){return Me(t)?t:t.contextElement}function zt(t){let e=Vs(t);if(!Ye(e))return Fe(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=Hs(e),s=(o?gr(r.width):r.width)/i,a=(o?gr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var ku=Fe(0);function js(t){let e=pe(t);return!ti()||!e.visualViewport?ku:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Uu(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===pe(t)}function Er(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=Vs(t),s=Fe(1);e&&(i?Me(i)&&(s=zt(i)):s=zt(t));let a=Uu(o,r,i)?js(o):Fe(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=pe(o),m=Me(i)?pe(i):i,v=p,A=ri(v);for(;A&&m!==v;){let y=zt(A),_=A.getBoundingClientRect(),L=Ne(A),E=_.left+(A.clientLeft+parseFloat(L.paddingLeft))*y.x,C=_.top+(A.clientTop+parseFloat(L.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=E,c+=C,v=pe(A),A=ri(v)}}return _t({width:u,height:d,x:l,y:c})}function ii(t,e){let r=br(t).scrollLeft;return e?e.left+r:Er(qe(t)).left+r}function zs(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ii(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function $u(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=qe(i),a=e?xr(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Fe(1),u=Fe(0),d=Ye(i);if((d||!o)&&((Ct(i)!=="body"||vr(s))&&(l=br(i)),d)){let m=Er(i);c=zt(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}let p=s&&!d&&!o?zs(s,l):Fe(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 Fu(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Bu(t){let e=br(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+ii(t),s=-e.scrollTop;return Ne(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Hu=25;function Vu(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=pe(t),o=qe(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!ti()||e==="fixed";i?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(ii(o)<=0){let p=o.ownerDocument,m=p.body,v=getComputedStyle(m),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(o.clientWidth-m.clientWidth-A),_=getComputedStyle(o).scrollbarGutter==="stable both-edges"?y/2:y;_<=Hu&&(a-=_)}return{width:a,height:l,x:c,y:u}}function ju(t,e){let r=Er(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=zt(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 Fs(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=Vu(t,r,e);else if(e==="document")i=Bu(qe(t));else if(Me(e))i=ju(e,r);else{let n=js(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return _t(i)}function zu(t,e){let r=e.get(t);if(r)return r;let i=Jr(t,[],!1).filter(a=>Me(a)&&Ct(a)!=="body"),n=null,o=Ne(t).position==="fixed",s=o?ot(t):t;for(;Me(s)&&!jt(s);){let a=Ne(s),l=Vt(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 Ku(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?xr(e)?[]:zu(e,this._c):[].concat(r),i],a=Fs(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 m=Fs(e,s[p],n);l=it(m.top,l),c=mr(m.right,c),u=mr(m.bottom,u),d=it(m.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Wu(t){let{width:e,height:r}=Hs(t);return{width:e,height:r}}function Gu(t,e,r){let i=Ye(e),n=qe(e),o=r==="fixed",s=Er(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Fe(0);if((i||!o)&&((Ct(e)!=="body"||vr(n))&&(a=br(e)),i)){let p=Er(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=ii(n));let c=n&&!i&&!o?zs(n,a):Fe(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 Wn(t){return Ne(t).position==="static"}function Bs(t,e){if(!Ye(t)||Ne(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return qe(t)===r&&(r=r.ownerDocument.body),r}function Ks(t,e){let r=pe(t);if(xr(t))return r;if(!Ye(t)){let n=ot(t);for(;n&&!jt(n);){if(Me(n)&&!Wn(n))return n;n=ot(n)}return r}let i=Bs(t,e);for(;i&&ks(i)&&Wn(i);)i=Bs(i,e);return i&&jt(i)&&Wn(i)&&!Vt(i)?r:i||Us(t)||r}var qu=async function(t){let e=this.getOffsetParent||Ks,r=this.getDimensions,i=await r(t.floating);return{reference:Gu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Yu(t){return Ne(t).direction==="rtl"}var ni={convertOffsetParentRelativeRectToViewportRelativeRect:$u,getDocumentElement:qe,getClippingRect:Ku,getOffsetParent:Ks,getElementRects:qu,getClientRects:Fu,getDimensions:Wu,getScale:zt,isElement:Me,isRTL:Yu};var Ws=Is,Gs=Ms;var qs=(t,e,r)=>{let i=new Map,n=r??{},o={...ni,...n.platform,_c:i};return Ps(t,e,{...n,platform:o})};function Ys(t){return Xu(t)}function Gn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Xu(t){for(let e=t;e;e=Gn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Gn(t);e;e=Gn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Vt(r)||e.tagName==="BODY"))return e}return null}async function oi(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},qs(t,e,{strategy:i.strategy,platform:{...ni,getOffsetParent:n=>ni.getOffsetParent(n,Ys)},middleware:[Gs({crossAxis:!0}),Ws({allowedPlacements:[i.placement]})]})}var er=f(S());var go=f(G());var Xs=f(G(),1);var qn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Qs(t,e){return(0,Xs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Sr(t);try{return JSON.parse(r)}catch{return Sr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ar,...e??{}})}function Qu(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(!Kt(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(!Kt(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(!Kt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Kt(t,e){try{return Qu(t,e)}catch{return!1}}function Ar(t,e){return!Kt(t,e)}function Sr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function si(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 Zs=f(G(),1);var Yn=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Ar,attribute:!1,...e};(0,Zs.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 ai=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 wt=f(G(),1);var li=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 ea=f(P(),1);var ci=globalThis,Zu=ci.ShadowRoot&&(ci.ShadyCSS===void 0||ci.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Js=(t,e)=>{if(Zu)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=ci.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var ui=class extends ea.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 Js(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){qn(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 ta(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 Gt=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},oa,ra=Symbol("constructorPrototype"),ia=Symbol("constructorName"),sa=Symbol("exportpartsDebouncer"),na=Symbol("dynamicDependenciesLoaded"),Wt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Wt.eventName="exportparts-updated";var Be=class extends ui{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oa]=new li(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[sa].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[ia]=this.constructor.name,this[ra]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ia]&&Object.setPrototypeOf(this,this[ra])}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[na]||(r[na]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Wt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Wt.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 Wt)})}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=ta(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 m=(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=[...m,...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(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};oa=sa;Gt([(0,wt.property)()],Be.prototype,"exportpartsPrefix",void 0);Gt([Qs([])],Be.prototype,"exportpartsPrefixes",void 0);Gt([(0,wt.property)({reflect:!0})],Be.prototype,"exportparts",void 0);Gt([(0,wt.property)()],Be.prototype,"customStylesheet",void 0);Gt([(0,wt.property)()],Be.prototype,"elementToFocus",void 0);Gt([(0,wt.state)()],Be.prototype,"useAdoptedStyleSheets",void 0);function di(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _r=Symbol("internalReduxEventsUnsubscribers"),st=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores"),Ju=si(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[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Rt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Rt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Rt].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[_r].set(s,[]),di(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[_r].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[_r].get(s))===null||a===void 0||a.forEach(l=>l()),this[_r].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=st,r=Rt,i=_r,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),aa=class extends Ju(Be){};function J(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 ed=typeof Symbol=="function"&&Symbol.observable||"@@observable",la=ed,Xn=()=>Math.random().toString(36).substring(7).split("").join("."),td={INIT:`@@redux/INIT${Xn()}`,REPLACE:`@@redux/REPLACE${Xn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Xn()}`},pi=td;function fi(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 Qn(t,e,r){if(typeof t!="function")throw new Error(J(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(J(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(J(1));return r(Qn)(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(J(3));return n}function d(y){if(typeof y!="function")throw new Error(J(4));if(l)throw new Error(J(5));let _=!0;c();let L=a++;return s.set(L,y),function(){if(_){if(l)throw new Error(J(6));_=!1,c(),s.delete(L),o=null}}}function p(y){if(!fi(y))throw new Error(J(7));if(typeof y.type>"u")throw new Error(J(8));if(typeof y.type!="string")throw new Error(J(17));if(l)throw new Error(J(9));try{l=!0,n=i(n,y)}finally{l=!1}return(o=s).forEach(L=>{L()}),y}function m(y){if(typeof y!="function")throw new Error(J(10));i=y,p({type:pi.REPLACE})}function v(){let y=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(J(11));function L(){let C=_;C.next&&C.next(u())}return L(),{unsubscribe:y(L)}},[la](){return this}}}return p({type:pi.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[la]:v}}function rd(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:pi.INIT})>"u")throw new Error(J(12));if(typeof r(void 0,{type:pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(J(13))})}function ca(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{rd(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],m=r[p],v=a[p],A=m(v,l);if(typeof A>"u"){let y=l&&l.type;throw new Error(J(14))}u[p]=A,c=c||A!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Tr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function ua(...t){return e=>(r,i)=>{let n=e(r,i),o=()=>{throw new Error(J(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Tr(...a)(n.dispatch),{...n,dispatch:o}}}function da(t){return fi(t)&&"type"in t&&typeof t.type=="string"}var ba=Symbol.for("immer-nothing"),pa=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function De(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var xe=Object,Yt=xe.getPrototypeOf,yi="constructor",Ai="prototype",to="configurable",vi="enumerable",mi="writable",Cr="value",He=t=>!!t&&!!t[ie];function be(t){return t?Ea(t)||Ti(t)||!!t[pa]||!!t[yi]?.[pa]||Ci(t)||wi(t):!1}var id=xe[Ai][yi].toString(),fa=new WeakMap;function Ea(t){if(!t||!co(t))return!1;let e=Yt(t);if(e===null||e===xe[Ai])return!0;let r=xe.hasOwnProperty.call(e,yi)&&e[yi];if(r===Object)return!0;if(!qt(r))return!1;let i=fa.get(r);return i===void 0&&(i=Function.toString.call(r),fa.set(r,i)),i===id}function _i(t,e,r=!0){Or(t)===0?(r?Reflect.ownKeys(t):xe.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Or(t){let e=t[ie];return e?e.type_:Ti(t)?1:Ci(t)?2:wi(t)?3:0}var Zn=(t,e,r=Or(t))=>r===2?t.has(e):xe[Ai].hasOwnProperty.call(t,e),ro=(t,e,r=Or(t))=>r===2?t.get(e):t[e],xi=(t,e,r,i=Or(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function nd(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Ti=Array.isArray,Ci=t=>t instanceof Map,wi=t=>t instanceof Set,co=t=>typeof t=="object",qt=t=>typeof t=="function",Jn=t=>typeof t=="boolean";function od(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Xe=t=>t.copy_||t.base_;var uo=t=>t.modified_?t.copy_:t.base_;function io(t,e){if(Ci(t))return new Map(t);if(wi(t))return new Set(t);if(Ti(t))return Array[Ai].slice.call(t);let r=Ea(t);if(e===!0||e==="class_only"&&!r){let i=xe.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[mi]===!1&&(a[mi]=!0,a[to]=!0),(a.get||a.set)&&(i[s]={[to]:!0,[mi]:!0,[vi]:a[vi],[Cr]:t[s]})}return xe.create(Yt(t),i)}else{let i=Yt(t);if(i!==null&&r)return{...t};let n=xe.create(i);return xe.assign(n,t)}}function po(t,e=!1){return Ri(t)||He(t)||!be(t)||(Or(t)>1&&xe.defineProperties(t,{set:hi,add:hi,clear:hi,delete:hi}),xe.freeze(t),e&&_i(t,(r,i)=>{po(i,!0)},!1)),t}function sd(){De(2)}var hi={[Cr]:sd};function Ri(t){return t===null||!co(t)?!0:xe.isFrozen(t)}var bi="MapSet",no="Patches",ha="ArrayMethods",Sa={};function Ot(t){let e=Sa[t];return e||De(0,t),e}var ma=t=>!!Sa[t];var wr,Aa=()=>wr,ad=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ma(bi)?Ot(bi):void 0,arrayMethodsPlugin_:ma(ha)?Ot(ha):void 0});function ga(t,e){e&&(t.patchPlugin_=Ot(no),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function oo(t){so(t),t.drafts_.forEach(ld),t.drafts_=null}function so(t){t===wr&&(wr=t.parent_)}var ya=t=>wr=ad(wr,t);function ld(t){let e=t[ie];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function va(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ie].modified_&&(oo(e),De(4)),be(t)&&(t=xa(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ie].base_,t,e)}else t=xa(e,r);return cd(e,t,!0),oo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ba?t:void 0}function xa(t,e){if(Ri(e))return e;let r=e[ie];if(!r)return Ei(e,t.handledSet_,t);if(!Oi(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);Ca(r,t)}return r.copy_}function cd(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&po(e,r)}function _a(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Oi=(t,e)=>t.scope_===e,ud=[];function Ta(t,e,r,i){let n=Xe(t),o=t.type_;if(i!==void 0&&ro(n,i,o)===e){xi(n,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;_i(n,(l,c)=>{if(He(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??ud;for(let a of s)xi(n,a,r,o)}function dd(t,e,r){t.callbacks_.push(function(n){let o=e;if(!o||!Oi(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=uo(o);Ta(t,o.draft_??o,s,r),Ca(o,n)})}function Ca(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)}_a(t)}}function pd(t,e,r){let{scope_:i}=t;if(He(r)){let n=r[ie];Oi(n,i)&&n.callbacks_.push(function(){gi(t);let s=uo(n);Ta(t,r,s,e)})}else be(r)&&t.callbacks_.push(function(){let o=Xe(t);t.type_===3?o.has(r)&&Ei(r,i.handledSet_,i):ro(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ei(ro(t.copy_,e,t.type_),i.handledSet_,i)})}function Ei(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||He(t)||e.has(t)||!be(t)||Ri(t)||(e.add(t),_i(t,(i,n)=>{if(He(n)){let o=n[ie];if(Oi(o,r)){let s=uo(o);xi(t,i,s,t.type_),_a(o)}}else be(n)&&Ei(n,e,r)})),t}function fd(t,e){let r=Ti(t),i={type_:r?1:0,scope_:e?e.scope_:Aa(),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=Si;r&&(n=[i],o=Rr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return i.draft_=a,i.revoke_=s,[a,i]}var Si={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=Xe(t);if(!Zn(n,e,t.type_))return md(t,n,e);let o=n[e];if(t.finalized_||!be(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&od(e))return o;if(o===eo(t.base_,e)||hd(t,e,o)){gi(t);let s=t.type_===1?+e:e,a=lo(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Xe(t)},ownKeys(t){return Reflect.ownKeys(Xe(t))},set(t,e,r){let i=wa(Xe(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=eo(Xe(t),e),o=n?.[ie];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(nd(r,n)&&(r!==void 0||Zn(t.base_,e,t.type_)))return!0;gi(t),ao(t)}return t.copy_[e]===r&&(r!==void 0||Zn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),pd(t,e,r)),!0},deleteProperty(t,e){return gi(t),eo(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ao(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Xe(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[mi]:!0,[to]:t.type_!==1||e!=="length",[vi]:i[vi],[Cr]:r[e]}},defineProperty(){De(11)},getPrototypeOf(t){return Yt(t.base_)},setPrototypeOf(){De(12)}},Rr={};for(let t in Si){let e=Si[t];Rr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Rr.deleteProperty=function(t,e){return Rr.set.call(this,t,e,void 0)};Rr.set=function(t,e,r){return Si.set.call(this,t[0],e,r,t[0])};function eo(t,e){let r=t[ie];return(r?Xe(r):t)[e]}function hd(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!be(r)||r[ie]?!1:t.baseRefs_.has(r)}function md(t,e,r){let i=wa(e,r);return i?Cr in i?i[Cr]:i.get?.call(t.draft_):void 0}function wa(t,e){if(!(e in t))return;let r=Yt(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Yt(r)}}function ao(t){t.modified_||(t.modified_=!0,t.parent_&&ao(t.parent_))}function gi(t){t.copy_||(t.assigned_=new Map,t.copy_=io(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var gd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(qt(e)&&!qt(r)){let o=r;r=e;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}qt(r)||De(6),i!==void 0&&!qt(i)&&De(7);let n;if(be(e)){let o=ya(this),s=lo(o,e,void 0),a=!0;try{n=r(s),a=!1}finally{a?oo(o):so(o)}return ga(o,i),va(n,o)}else if(!e||!co(e)){if(n=r(e),n===void 0&&(n=e),n===ba&&(n=void 0),this.autoFreeze_&&po(n,!0),i){let o=[],s=[];Ot(no).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),i(o,s)}return n}else De(1,e)},this.produceWithPatches=(e,r)=>{if(qt(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]},Jn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Jn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Jn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){be(t)||De(8),He(t)&&(t=Ra(t));let e=ya(this),r=lo(e,t,void 0);return r[ie].isManual_=!0,so(e),r}finishDraft(t,e){let r=t&&t[ie];(!r||!r.isManual_)&&De(9);let{scope_:i}=r;return ga(i,e),va(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=Ot(no).applyPatches_;return He(t)?i(t,e):this.produce(t,n=>i(n,e))}};function lo(t,e,r,i){let[n,o]=Ci(e)?Ot(bi).proxyMap_(e,r):wi(e)?Ot(bi).proxySet_(e,r):fd(e,r);return(r?.scope_??Aa()).drafts_.push(n),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?dd(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 Ra(t){return He(t)||De(10,t),Oa(t)}function Oa(t){if(!be(t)||Ri(t))return t;let e=t[ie],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=io(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=io(t,!0);return _i(r,(n,o)=>{xi(r,n,Oa(o))},i),e&&(e.finalized_=!1),r}var yd=globalThis.Iterator,$f=typeof yd?.from=="function";var vd=new gd,fo=vd.produce;function La(t){return({dispatch:r,getState:i})=>n=>o=>typeof o=="function"?o(r,i,t):n(o)}var Pa=La(),Ia=La;var xd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Kf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},bd=t=>t&&typeof t.match=="function";function at(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Qe(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=>da(i)&&i.type===t,r}var Ua=class Lr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Lr.prototype)}static get[Symbol.species](){return Lr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Lr(...e[0].concat(this)):new Lr(...e.concat(this))}};function Ma(t){return be(t)?fo(t,()=>{}):t}function Li(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Ed(t){return typeof t=="boolean"}var Sd=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new Ua;return r&&(Ed(r)?s.push(Pa):s.push(Ia(r.extraArgument))),s},Ad="RTK_autoBatch";var Na=t=>e=>{setTimeout(e,t)},_d=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=t(n),s=setTimeout(n,e)},Td=(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?_d(window.requestAnimationFrame,100):Na(10):t.type==="callback"?t.queueNotification:Na(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?.[Ad],o=!n,o&&(s||(s=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},Cd=t=>function(r){let{autoBatch:i=!0}=r??{},n=new Ua(t);return i&&n.push(Td(typeof i=="object"?i:void 0)),n};function $a(t){let e=Sd(),{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(fi(r))l=ca(r);else throw new Error(Qe(1));let c;typeof i=="function"?c=i(e):c=e();let u=Tr;n&&(u=xd({trace:!1,...typeof n=="object"&&n}));let d=ua(...c),p=Cd(d),m=typeof a=="function"?a(p):p(),v=u(...m);return Qn(l,s,v)}function Fa(t){let e={},r=[],i,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Qe(28));if(a in e)throw new Error(Qe(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 wd(t){return typeof t=="function"}function Rd(t,e){let[r,i,n]=Fa(e),o;if(wd(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(He(u)){let m=d(u,l);return m===void 0?u:m}else{if(be(u))return fo(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 Od=(t,e)=>bd(t)?t.match(e):t(e);function Ld(...t){return e=>t.some(r=>Od(r,e))}var Pd="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Id=(t=21)=>{let e="",r=t;for(;r--;)e+=Pd[Math.random()*64|0];return e},Md=["name","message","stack","code"],ho=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Da=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Nd=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Md)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},ka="External signal was aborted",Dd=(()=>{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||Nd)(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 m=i?.idGenerator?i.idGenerator(l):Id(),v=new AbortController,A,y;function _(E){y=E,v.abort()}c&&(c.aborted?_(ka):c.addEventListener("abort",()=>_(ka),{once:!0}));let L=(async function(){let E;try{let O=i?.condition?.(l,{getState:d,extra:p});if(Ud(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(m,l,i?.getPendingMeta?.({requestId:m,arg:l},{getState:d,extra:p}))),E=await Promise.race([V,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:m,signal:v.signal,abort:_,rejectWithValue:((D,j)=>new ho(D,j)),fulfillWithValue:((D,j)=>new Da(D,j))})).then(D=>{if(D instanceof ho)throw D;return D instanceof Da?n(D.payload,m,l,D.meta):n(D,m,l)})])}catch(O){E=O instanceof ho?s(null,m,l,O.payload,O.meta):s(O,m,l)}finally{A&&v.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&s.match(E)&&E.meta.condition||u(E),E})();return Object.assign(L,{abort:_,requestId:m,arg:l,unwrap(){return L.then(kd)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Ld(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function kd(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Ud(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ba=Symbol.for("rtk-slice-createasyncthunk"),Gf={[Ba]:Dd};function $d(t,e){return`${t}/${e}`}function Fd({creators:t}={}){let e=t?.asyncThunk?.[Ba];return function(i){let{name:n,reducerPath:o=n}=i;if(!n)throw new Error(Qe(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(Hd()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(E,C){let O=typeof E=="string"?E:E.type;if(!O)throw new Error(Qe(12));if(O in l.sliceCaseReducersByType)throw new Error(Qe(13));return l.sliceCaseReducersByType[O]=C,c},addMatcher(E,C){return l.sliceMatchers.push({matcher:E,reducer:C}),c},exposeAction(E,C){return l.actionCreators[E]=C,c},exposeCaseReducer(E,C){return l.sliceCaseReducersByName[E]=C,c}};a.forEach(E=>{let C=s[E],O={reducerName:E,type:$d(n,E),createNotation:typeof i.reducers=="function"};jd(C)?Kd(O,C,c,e):Vd(O,C,c)});function u(){let[E={},C=[],O=void 0]=typeof i.extraReducers=="function"?Fa(i.extraReducers):[i.extraReducers],V={...E,...l.sliceCaseReducersByType};return Rd(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=E=>E,p=new Map,m=new WeakMap,v;function A(E,C){return v||(v=u()),v(E,C)}function y(){return v||(v=u()),v.getInitialState()}function _(E,C=!1){function O(D){let j=D[E];return typeof j>"u"&&C&&(j=Li(m,O,y)),j}function V(D=d){let j=Li(p,C,()=>new WeakMap);return Li(j,D,()=>{let cr={};for(let[_e,pt]of Object.entries(i.selectors??{}))cr[_e]=Bd(pt,D,()=>Li(m,D,y),C);return cr})}return{reducerPath:E,getSelectors:V,get selectors(){return V(O)},selectSlice:O}}let L={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,..._(o),injectInto(E,{reducerPath:C,...O}={}){let V=C??o;return E.inject({reducerPath:V,reducer:A},O),{...L,..._(V,!0)}}};return L}}function Bd(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=Fd();function Hd(){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 Vd({type:t,reducerName:e,createNotation:r},i,n){let o,s;if("reducer"in i){if(r&&!zd(i))throw new Error(Qe(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 jd(t){return t._reducerDefinitionType==="asyncThunk"}function zd(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Kd({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Qe(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||Pi,pending:a||Pi,rejected:l||Pi,settled:c||Pi})}function Pi(){}var Va="listener",ja="completed",za="cancelled",qf=`task-${za}`,Yf=`task-${ja}`,Xf=`${Va}-${za}`,Qf=`${Va}-${ja}`;var{assign:Ka}=Object;var mo="listenerMiddleware";var Wd=Ka(at(`${mo}/add`),{withTypes:()=>Wd}),Zf=at(`${mo}/removeAll`),Gd=Ka(at(`${mo}/remove`),{withTypes:()=>Gd});function Qe(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 qd=si(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)}}}),Ii=class extends qd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Wa=class t extends Ii{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(di(o))return o;if(n==null)return;let s=Ha({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=$a({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Sr(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 ai,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];Kt(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 Mi=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 Ni=f(S()),Yd="ft-app-info",Ve=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ve.eventName="authentication-change";var Pr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pr.eventName="ui-locale-changed";var Xd={session:(t,e)=>{(0,Ni.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.dispatchEvent(new Ve(e.payload)),0))}},b=Ni.FtReduxStore.get({name:Yd,reducers:Xd,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,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ga=f(S()),Di=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},qa=(0,Ga.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=>Mi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Di([(0,go.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Di([(0,go.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Di([Yn({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),Di([Yn({store:b.name})],e.prototype,"uiLocale",void 0),e});var Ya;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ya||(Ya={}));var Xa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(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.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"})(Za||(Za={}));var Ja;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ja||(Ja={}));var el;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(el||(el={}));var ki;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(ki||(ki={}));var tl;(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"})(tl||(tl={}));var rl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(rl||(rl={}));var il;(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"})(il||(il={}));var nl;(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"})(nl||(nl={}));var ol;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ol||(ol={}));var sl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(sl||(sl={}));var al;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(al||(al={}));var ll;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(ll||(ll={}));var cl;(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"})(cl||(cl={}));var ul;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ul||(ul={}));var dl;(function(t){t.ASC="ASC",t.DESC="DESC"})(dl||(dl={}));var pl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(pl||(pl={}));var fl;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fl||(fl={}));var hl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var Ui;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ui||(Ui={}));var ml;(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"})(ml||(ml={}));var gl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(gl||(gl={}));var yl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(yl||(yl={}));var vl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(vl||(vl={}));var xl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(xl||(xl={}));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 El;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(El||(El={}));var Sl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Sl||(Sl={}));var Al;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Al||(Al={}));var _l;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(_l||(_l={}));var Tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Tl||(Tl={}));var Cl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Cl||(Cl={}));var wl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(wl||(wl={}));var Rl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Rl||(Rl={}));var Ol;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Ol||(Ol={}));var Ll;(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"})(Ll||(Ll={}));var Pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Pl||(Pl={}));var Qd={[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 Il(t,e){return t===e||(Qd[t]??[]).some(r=>Il(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=>Il(i,e))}var Vi=f(S());var yo=f(S());var Lt=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 Xt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Lt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Lt.await()}};var ne=class extends Xt{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 yo.CacheRegistry,this.cache=e?n.commonCache:new yo.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 $i=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 Fi=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 Bi=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 Hi=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 Zd="ft-user-assets",Jd={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;xo(t,r,[...vo(t,r),n]),Ml(t,r,1,i),Nl(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;xo(t,r,vo(t,r).map(n=>n.id===i.id?i:n)),Nl(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;xo(t,r,vo(t,r).filter(o=>o.id!==n)),Ml(t,r,-1,i)}},Dl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},vo=(t,e)=>{var r;let i=Dl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},xo=(t,e,r)=>{let i=Dl[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)}},Nl=(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=Vi.FtReduxStore.get({name:Zd,reducers:Jd,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 Bi,r=new Hi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Fi,this.savedSearchesService=new $i,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,Vi.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)}}},Eo=new bo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Eo);var So=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new So;var Re=f(S());var kl,Qt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},ep=Symbol("clearAfterUnitTest"),ji=class extends(0,Re.withEventBus)(ne){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[kl]=()=>{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 Qt({loadedContexts:e})),this.dispatchEvent(new Qt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Qt({loadedContexts:[e]})),this.dispatchEvent(new Qt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Re.delay)(0).then(()=>i()).catch(()=>null)))}};kl=ep;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Zt=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var Ul=f(S()),Ao=class{highlightHtml(e,r,i){(0,Ul.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Ao;var $l=f(S());var _o=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 $l.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 _o;var Fl=f(S());var Ir=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 Fl.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Ki=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 To=class{urlToSearchRequest(e){return Ir.get().parse(e)}searchRequestToUrl(e){return Ir.get().serialize(e)}};window.FluidTopicsUrlService=new To;var Je=f(S());var Pt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Pt.eventName="before-location-change";var It=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};It.eventName="change";var Co=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 Co;var Wi=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,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new It(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=new Pt(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...o,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,s,u.href]),this.setCurrentState(u,!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)}addBeforeLocationChangeListener(e){this.addEventListener(Pt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Pt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(It.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(It.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=Wi.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),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var Hl=f(P());var Vl=Hl.css`
168
- `;var Kl=f(P()),ce=f(G()),Dt=f(S());var Mt=f(S());function jl(t,e){let{authenticationRequired:r,session:i}=b.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Gi=class extends Xt{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var wo=class t extends Mt.FtStateManager{static build(e){return new t(b,e)}constructor(e,r){super(),this.store=e,this.cache=new Mt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Gi,this.cleanSessionDebouncer=new Mt.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Mt.Debouncer(500),this.apiProvider=r??(()=>Lt.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ve.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ve.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",()=>jl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}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 Pr(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)}setNoCustomCode(e){this.store.actions.noCustomCode(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)}},zl=wo.build();var Nt=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 Mr=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 Nt(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 X=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},U=class extends Dt.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.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=zl,this.contextRoot=new Mr}render(){return Kl.html`
167
+ `;var _s=["top","right","bottom","left"],As=["start","end"],Hn=_s.reduce((t,e)=>t.concat(e,e+"-"+As[0],e+"-"+As[1]),[]),mr=Math.min,it=Math.max,gr=Math.round;var Fe=t=>({x:t,y:t}),Pu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ts(t,e,r){return it(t,mr(e,r))}function Qr(t,e){return typeof t=="function"?t(e):t}function yr(t){return t.split("-")[0]}function nt(t){return t.split("-")[1]}function Vn(t){return t==="x"?"y":"x"}function jn(t){return t==="y"?"height":"width"}function Zr(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function zn(t){return Vn(Zr(t))}function Cs(t,e,r){r===void 0&&(r=!1);let i=nt(t),n=zn(t),o=jn(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 ws(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function Bn(t){let e=yr(t);return Pu[e]+t.slice(e.length)}function Iu(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 Rs(t){return typeof t!="number"?Iu(t):{top:t,right:t,bottom:t,left:t}}function _t(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 Os(t,e,r){let{reference:i,floating:n}=t,o=Zr(e),s=zn(e),a=jn(s),l=yr(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,m;switch(l){case"top":m={x:u,y:i.y-n.height};break;case"bottom":m={x:u,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:d};break;case"left":m={x:i.x-n.width,y:d};break;default:m={x:i.x,y:i.y}}let v=nt(e);return v&&(m[s]+=p*(v==="end"?1:-1)*(r&&c?-1:1)),m}async function Ls(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:m=0}=Qr(e,t),v=Rs(m),y=a[p?d==="floating"?"reference":"floating":d],_=_t(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})),L=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),C=await(o.isElement==null?void 0:o.isElement(E))&&await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1},O=_t(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:L,offsetParent:E,strategy:l}):L);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 Mu=50,Ps=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ls},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:d}=Os(c,i,l),p=i,m=0,v={};for(let A=0;A<o.length;A++){let y=o[A];if(!y)continue;let{name:_,fn:L}=y,{x:E,y:C,data:O,reset:V}=await L({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:v,rects:c,platform:a,elements:{reference:t,floating:e}});u=E??u,d=C??d,v[_]={...v[_],...O},V&&m<Mu&&(m++,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}=Os(c,p,l)),A=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:v}};function Nu(t,e,r){return(t?[...r.filter(n=>nt(n)===t),...r.filter(n=>nt(n)!==t)]:r.filter(n=>yr(n)===n)).filter(n=>t?nt(n)===t||(e?ws(n)!==n:!1):!0)}var Is=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:m=!0,...v}=Qr(t,e),A=d!==void 0||p===Hn?Nu(d||null,m,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 L=await l.detectOverflow(e,v),E=Cs(_,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),C=[L[yr(_)],L[E[0]],L[E[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(_e=>{let pt=nt(_e.placement);return[_e.placement,pt&&u?_e.overflows.slice(0,2).reduce((gu,yu)=>gu+yu,0):_e.overflows[0],_e.overflows]}).sort((_e,pt)=>_e[1]-pt[1]),cr=((n=D.filter(_e=>_e[2].slice(0,nt(_e[0])?2:3).every(pt=>pt<=0))[0])==null?void 0:n[0])||D[0][0];return cr!==a?{data:{index:y+1,overflows:O},reset:{placement:cr}}:{}}}};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:L=>{let{x:E,y:C}=L;return{x:E,y:C}}},...c}=Qr(t,e),u={x:r,y:i},d=await o.detectOverflow(e,c),p=Zr(n),m=Vn(p),v=u[m],A=u[p],y=(L,E)=>Ts(E+d[L==="y"?"top":"left"],E,E-d[L==="y"?"bottom":"right"]);s&&(v=y(m,v)),a&&(A=y(p,A));let _=l.fn({...e,[m]:v,[p]:A});return{..._,data:{x:_.x-r,y:_.y-i,enabled:{[m]:s,[p]:a}}}}}};function ei(){return typeof window<"u"}function Ct(t){return Ds(t)?(t.nodeName||"").toLowerCase():"#document"}function pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ye(t){var e;return(e=(Ds(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ds(t){return ei()?t instanceof Node||t instanceof pe(t).Node:!1}function Me(t){return ei()?t instanceof Element||t instanceof pe(t).Element:!1}function Xe(t){return ei()?t instanceof HTMLElement||t instanceof pe(t).HTMLElement:!1}function Ns(t){return!ei()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pe(t).ShadowRoot}function vr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=Ne(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function ks(t){return/^(table|td|th)$/.test(Ct(t))}function xr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Du=/transform|translate|scale|rotate|perspective|filter/,ku=/paint|layout|strict|content/,Tt=t=>!!t&&t!=="none",Kn;function Vt(t){let e=Me(t)?Ne(t):t;return Tt(e.transform)||Tt(e.translate)||Tt(e.scale)||Tt(e.rotate)||Tt(e.perspective)||!ti()&&(Tt(e.backdropFilter)||Tt(e.filter))||Du.test(e.willChange||"")||ku.test(e.contain||"")}function Us(t){let e=ot(t);for(;Xe(e)&&!jt(e);){if(Vt(e))return e;if(xr(e))return null;e=ot(e)}return null}function ti(){return Kn==null&&(Kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kn}function jt(t){return/^(html|body|#document)$/.test(Ct(t))}function Ne(t){return pe(t).getComputedStyle(t)}function br(t){return Me(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ot(t){if(Ct(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ns(t)&&t.host||Ye(t);return Ns(e)?e.host:e}function $s(t){let e=ot(t);return jt(e)?(t.ownerDocument||t).body:Xe(e)&&vr(e)?e:$s(e)}function Jr(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=$s(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=pe(n);if(o){let a=ri(s);return e.concat(s,s.visualViewport||[],vr(n)?n:[],a&&r?Jr(a):[])}else return e.concat(n,Jr(n,[],r))}function ri(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Hs(t){let e=Ne(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=Xe(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=gr(r)!==o||gr(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Vs(t){return Me(t)?t:t.contextElement}function zt(t){let e=Vs(t);if(!Xe(e))return Fe(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=Hs(e),s=(o?gr(r.width):r.width)/i,a=(o?gr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Uu=Fe(0);function js(t){let e=pe(t);return!ti()||!e.visualViewport?Uu:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $u(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===pe(t)}function Er(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=Vs(t),s=Fe(1);e&&(i?Me(i)&&(s=zt(i)):s=zt(t));let a=$u(o,r,i)?js(o):Fe(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=pe(o),m=Me(i)?pe(i):i,v=p,A=ri(v);for(;A&&m!==v;){let y=zt(A),_=A.getBoundingClientRect(),L=Ne(A),E=_.left+(A.clientLeft+parseFloat(L.paddingLeft))*y.x,C=_.top+(A.clientTop+parseFloat(L.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=E,c+=C,v=pe(A),A=ri(v)}}return _t({width:u,height:d,x:l,y:c})}function ii(t,e){let r=br(t).scrollLeft;return e?e.left+r:Er(Ye(t)).left+r}function zs(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ii(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Fu(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=Ye(i),a=e?xr(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Fe(1),u=Fe(0),d=Xe(i);if((d||!o)&&((Ct(i)!=="body"||vr(s))&&(l=br(i)),d)){let m=Er(i);c=zt(i),u.x=m.x+i.clientLeft,u.y=m.y+i.clientTop}let p=s&&!d&&!o?zs(s,l):Fe(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 Bu(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Hu(t){let e=br(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+ii(t),s=-e.scrollTop;return Ne(r).direction==="rtl"&&(o+=it(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var Vu=25;function ju(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=pe(t),o=Ye(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,u=0;if(s){let p=!ti()||e==="fixed";i?p||(c=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,p&&(c=s.offsetLeft,u=s.offsetTop))}if(ii(o)<=0){let p=o.ownerDocument,m=p.body,v=getComputedStyle(m),A=p.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(o.clientWidth-m.clientWidth-A),_=getComputedStyle(o).scrollbarGutter==="stable both-edges"?y/2:y;_<=Vu&&(a-=_)}return{width:a,height:l,x:c,y:u}}function zu(t,e){let r=Er(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=zt(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 Fs(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=ju(t,r,e);else if(e==="document")i=Hu(Ye(t));else if(Me(e))i=zu(e,r);else{let n=js(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return _t(i)}function Ku(t,e){let r=e.get(t);if(r)return r;let i=Jr(t,[],!1).filter(a=>Me(a)&&Ct(a)!=="body"),n=null,o=Ne(t).position==="fixed",s=o?ot(t):t;for(;Me(s)&&!jt(s);){let a=Ne(s),l=Vt(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 Wu(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?xr(e)?[]:Ku(e,this._c):[].concat(r),i],a=Fs(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 m=Fs(e,s[p],n);l=it(m.top,l),c=mr(m.right,c),u=mr(m.bottom,u),d=it(m.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Gu(t){let{width:e,height:r}=Hs(t);return{width:e,height:r}}function qu(t,e,r){let i=Xe(e),n=Ye(e),o=r==="fixed",s=Er(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Fe(0);if((i||!o)&&((Ct(e)!=="body"||vr(n))&&(a=br(e)),i)){let p=Er(e,!0,o,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}!i&&n&&(l.x=ii(n));let c=n&&!i&&!o?zs(n,a):Fe(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 Wn(t){return Ne(t).position==="static"}function Bs(t,e){if(!Xe(t)||Ne(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ye(t)===r&&(r=r.ownerDocument.body),r}function Ks(t,e){let r=pe(t);if(xr(t))return r;if(!Xe(t)){let n=ot(t);for(;n&&!jt(n);){if(Me(n)&&!Wn(n))return n;n=ot(n)}return r}let i=Bs(t,e);for(;i&&ks(i)&&Wn(i);)i=Bs(i,e);return i&&jt(i)&&Wn(i)&&!Vt(i)?r:i||Us(t)||r}var Yu=async function(t){let e=this.getOffsetParent||Ks,r=this.getDimensions,i=await r(t.floating);return{reference:qu(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Xu(t){return Ne(t).direction==="rtl"}var ni={convertOffsetParentRelativeRectToViewportRelativeRect:Fu,getDocumentElement:Ye,getClippingRect:Wu,getOffsetParent:Ks,getElementRects:Yu,getClientRects:Bu,getDimensions:Gu,getScale:zt,isElement:Me,isRTL:Xu};var Ws=Is,Gs=Ms;var qs=(t,e,r)=>{let i=new Map,n=r??{},o={...ni,...n.platform,_c:i};return Ps(t,e,{...n,platform:o})};function Ys(t){return Qu(t)}function Gn(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Qu(t){for(let e=t;e;e=Gn(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Gn(t);e;e=Gn(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Vt(r)||e.tagName==="BODY"))return e}return null}async function oi(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},qs(t,e,{strategy:i.strategy,platform:{...ni,getOffsetParent:n=>ni.getOffsetParent(n,Ys)},middleware:[Gs({crossAxis:!0}),Ws({allowedPlacements:[i.placement]})]})}var er=f(S());var go=f(G());var Xs=f(G(),1);var qn=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function Qs(t,e){return(0,Xs.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Sr(t);try{return JSON.parse(r)}catch{return Sr(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Ar,...e??{}})}function Zu(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(!Kt(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(!Kt(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(!Kt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Kt(t,e){try{return Zu(t,e)}catch{return!1}}function Ar(t,e){return!Kt(t,e)}function Sr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function si(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 Zs=f(G(),1);var Yn=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Ar,attribute:!1,...e};(0,Zs.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 ai=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 wt=f(G(),1);var li=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 ea=f(P(),1);var ci=globalThis,Ju=ci.ShadowRoot&&(ci.ShadyCSS===void 0||ci.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Js=(t,e)=>{if(Ju)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=ci.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var ui=class extends ea.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 Js(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){qn(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 ta(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 Gt=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},oa,ra=Symbol("constructorPrototype"),ia=Symbol("constructorName"),sa=Symbol("exportpartsDebouncer"),na=Symbol("dynamicDependenciesLoaded"),Wt=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Wt.eventName="exportparts-updated";var Be=class extends ui{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[oa]=new li(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[sa].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[ia]=this.constructor.name,this[ra]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ia]&&Object.setPrototypeOf(this,this[ra])}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[na]||(r[na]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Wt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Wt.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 Wt)})}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=ta(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 m=(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=[...m,...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(m=>`${p}:${m}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};oa=sa;Gt([(0,wt.property)()],Be.prototype,"exportpartsPrefix",void 0);Gt([Qs([])],Be.prototype,"exportpartsPrefixes",void 0);Gt([(0,wt.property)({reflect:!0})],Be.prototype,"exportparts",void 0);Gt([(0,wt.property)()],Be.prototype,"customStylesheet",void 0);Gt([(0,wt.property)()],Be.prototype,"elementToFocus",void 0);Gt([(0,wt.state)()],Be.prototype,"useAdoptedStyleSheets",void 0);function di(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var _r=Symbol("internalReduxEventsUnsubscribers"),st=Symbol("internalStoresUnsubscribers"),Rt=Symbol("internalStores"),ed=si(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[Rt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rt].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Rt].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Rt].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Rt].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[_r].set(s,[]),di(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[_r].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[_r].get(s))===null||a===void 0||a.forEach(l=>l()),this[_r].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=st,r=Rt,i=_r,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),aa=class extends ed(Be){};function J(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 td=typeof Symbol=="function"&&Symbol.observable||"@@observable",la=td,Xn=()=>Math.random().toString(36).substring(7).split("").join("."),rd={INIT:`@@redux/INIT${Xn()}`,REPLACE:`@@redux/REPLACE${Xn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Xn()}`},pi=rd;function fi(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 Qn(t,e,r){if(typeof t!="function")throw new Error(J(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(J(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(J(1));return r(Qn)(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(J(3));return n}function d(y){if(typeof y!="function")throw new Error(J(4));if(l)throw new Error(J(5));let _=!0;c();let L=a++;return s.set(L,y),function(){if(_){if(l)throw new Error(J(6));_=!1,c(),s.delete(L),o=null}}}function p(y){if(!fi(y))throw new Error(J(7));if(typeof y.type>"u")throw new Error(J(8));if(typeof y.type!="string")throw new Error(J(17));if(l)throw new Error(J(9));try{l=!0,n=i(n,y)}finally{l=!1}return(o=s).forEach(L=>{L()}),y}function m(y){if(typeof y!="function")throw new Error(J(10));i=y,p({type:pi.REPLACE})}function v(){let y=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(J(11));function L(){let C=_;C.next&&C.next(u())}return L(),{unsubscribe:y(L)}},[la](){return this}}}return p({type:pi.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[la]:v}}function id(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:pi.INIT})>"u")throw new Error(J(12));if(typeof r(void 0,{type:pi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(J(13))})}function ca(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{id(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],m=r[p],v=a[p],A=m(v,l);if(typeof A>"u"){let y=l&&l.type;throw new Error(J(14))}u[p]=A,c=c||A!==v}return c=c||i.length!==Object.keys(a).length,c?u:a}}function Tr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function ua(...t){return e=>(r,i)=>{let n=e(r,i),o=()=>{throw new Error(J(15))},s={getState:n.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(s));return o=Tr(...a)(n.dispatch),{...n,dispatch:o}}}function da(t){return fi(t)&&"type"in t&&typeof t.type=="string"}var ba=Symbol.for("immer-nothing"),pa=Symbol.for("immer-draftable"),ie=Symbol.for("immer-state");function De(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var xe=Object,Yt=xe.getPrototypeOf,yi="constructor",Ai="prototype",to="configurable",vi="enumerable",mi="writable",Cr="value",He=t=>!!t&&!!t[ie];function be(t){return t?Ea(t)||Ti(t)||!!t[pa]||!!t[yi]?.[pa]||Ci(t)||wi(t):!1}var nd=xe[Ai][yi].toString(),fa=new WeakMap;function Ea(t){if(!t||!co(t))return!1;let e=Yt(t);if(e===null||e===xe[Ai])return!0;let r=xe.hasOwnProperty.call(e,yi)&&e[yi];if(r===Object)return!0;if(!qt(r))return!1;let i=fa.get(r);return i===void 0&&(i=Function.toString.call(r),fa.set(r,i)),i===nd}function _i(t,e,r=!0){Or(t)===0?(r?Reflect.ownKeys(t):xe.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((i,n)=>e(n,i,t))}function Or(t){let e=t[ie];return e?e.type_:Ti(t)?1:Ci(t)?2:wi(t)?3:0}var Zn=(t,e,r=Or(t))=>r===2?t.has(e):xe[Ai].hasOwnProperty.call(t,e),ro=(t,e,r=Or(t))=>r===2?t.get(e):t[e],xi=(t,e,r,i=Or(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function od(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Ti=Array.isArray,Ci=t=>t instanceof Map,wi=t=>t instanceof Set,co=t=>typeof t=="object",qt=t=>typeof t=="function",Jn=t=>typeof t=="boolean";function sd(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Qe=t=>t.copy_||t.base_;var uo=t=>t.modified_?t.copy_:t.base_;function io(t,e){if(Ci(t))return new Map(t);if(wi(t))return new Set(t);if(Ti(t))return Array[Ai].slice.call(t);let r=Ea(t);if(e===!0||e==="class_only"&&!r){let i=xe.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[mi]===!1&&(a[mi]=!0,a[to]=!0),(a.get||a.set)&&(i[s]={[to]:!0,[mi]:!0,[vi]:a[vi],[Cr]:t[s]})}return xe.create(Yt(t),i)}else{let i=Yt(t);if(i!==null&&r)return{...t};let n=xe.create(i);return xe.assign(n,t)}}function po(t,e=!1){return Ri(t)||He(t)||!be(t)||(Or(t)>1&&xe.defineProperties(t,{set:hi,add:hi,clear:hi,delete:hi}),xe.freeze(t),e&&_i(t,(r,i)=>{po(i,!0)},!1)),t}function ad(){De(2)}var hi={[Cr]:ad};function Ri(t){return t===null||!co(t)?!0:xe.isFrozen(t)}var bi="MapSet",no="Patches",ha="ArrayMethods",Sa={};function Ot(t){let e=Sa[t];return e||De(0,t),e}var ma=t=>!!Sa[t];var wr,Aa=()=>wr,ld=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ma(bi)?Ot(bi):void 0,arrayMethodsPlugin_:ma(ha)?Ot(ha):void 0});function ga(t,e){e&&(t.patchPlugin_=Ot(no),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function oo(t){so(t),t.drafts_.forEach(cd),t.drafts_=null}function so(t){t===wr&&(wr=t.parent_)}var ya=t=>wr=ld(wr,t);function cd(t){let e=t[ie];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function va(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ie].modified_&&(oo(e),De(4)),be(t)&&(t=xa(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(r[ie].base_,t,e)}else t=xa(e,r);return ud(e,t,!0),oo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ba?t:void 0}function xa(t,e){if(Ri(e))return e;let r=e[ie];if(!r)return Ei(e,t.handledSet_,t);if(!Oi(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);Ca(r,t)}return r.copy_}function ud(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&po(e,r)}function _a(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Oi=(t,e)=>t.scope_===e,dd=[];function Ta(t,e,r,i){let n=Qe(t),o=t.type_;if(i!==void 0&&ro(n,i,o)===e){xi(n,i,r,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;_i(n,(l,c)=>{if(He(c)){let u=a.get(c)||[];u.push(l),a.set(c,u)}})}let s=t.draftLocations_.get(e)??dd;for(let a of s)xi(n,a,r,o)}function pd(t,e,r){t.callbacks_.push(function(n){let o=e;if(!o||!Oi(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=uo(o);Ta(t,o.draft_??o,s,r),Ca(o,n)})}function Ca(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)}_a(t)}}function fd(t,e,r){let{scope_:i}=t;if(He(r)){let n=r[ie];Oi(n,i)&&n.callbacks_.push(function(){gi(t);let s=uo(n);Ta(t,r,s,e)})}else be(r)&&t.callbacks_.push(function(){let o=Qe(t);t.type_===3?o.has(r)&&Ei(r,i.handledSet_,i):ro(o,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Ei(ro(t.copy_,e,t.type_),i.handledSet_,i)})}function Ei(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||He(t)||e.has(t)||!be(t)||Ri(t)||(e.add(t),_i(t,(i,n)=>{if(He(n)){let o=n[ie];if(Oi(o,r)){let s=uo(o);xi(t,i,s,t.type_),_a(o)}}else be(n)&&Ei(n,e,r)})),t}function hd(t,e){let r=Ti(t),i={type_:r?1:0,scope_:e?e.scope_:Aa(),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=Si;r&&(n=[i],o=Rr);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return i.draft_=a,i.revoke_=s,[a,i]}var Si={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=Qe(t);if(!Zn(n,e,t.type_))return gd(t,n,e);let o=n[e];if(t.finalized_||!be(o)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&sd(e))return o;if(o===eo(t.base_,e)||md(t,e,o)){gi(t);let s=t.type_===1?+e:e,a=lo(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in Qe(t)},ownKeys(t){return Reflect.ownKeys(Qe(t))},set(t,e,r){let i=wa(Qe(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let n=eo(Qe(t),e),o=n?.[ie];if(o&&o.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(od(r,n)&&(r!==void 0||Zn(t.base_,e,t.type_)))return!0;gi(t),ao(t)}return t.copy_[e]===r&&(r!==void 0||Zn(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),fd(t,e,r)),!0},deleteProperty(t,e){return gi(t),eo(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),ao(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Qe(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[mi]:!0,[to]:t.type_!==1||e!=="length",[vi]:i[vi],[Cr]:r[e]}},defineProperty(){De(11)},getPrototypeOf(t){return Yt(t.base_)},setPrototypeOf(){De(12)}},Rr={};for(let t in Si){let e=Si[t];Rr[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}Rr.deleteProperty=function(t,e){return Rr.set.call(this,t,e,void 0)};Rr.set=function(t,e,r){return Si.set.call(this,t[0],e,r,t[0])};function eo(t,e){let r=t[ie];return(r?Qe(r):t)[e]}function md(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!be(r)||r[ie]?!1:t.baseRefs_.has(r)}function gd(t,e,r){let i=wa(e,r);return i?Cr in i?i[Cr]:i.get?.call(t.draft_):void 0}function wa(t,e){if(!(e in t))return;let r=Yt(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Yt(r)}}function ao(t){t.modified_||(t.modified_=!0,t.parent_&&ao(t.parent_))}function gi(t){t.copy_||(t.assigned_=new Map,t.copy_=io(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var yd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(qt(e)&&!qt(r)){let o=r;r=e;let s=this;return function(l=o,...c){return s.produce(l,u=>r.call(this,u,...c))}}qt(r)||De(6),i!==void 0&&!qt(i)&&De(7);let n;if(be(e)){let o=ya(this),s=lo(o,e,void 0),a=!0;try{n=r(s),a=!1}finally{a?oo(o):so(o)}return ga(o,i),va(n,o)}else if(!e||!co(e)){if(n=r(e),n===void 0&&(n=e),n===ba&&(n=void 0),this.autoFreeze_&&po(n,!0),i){let o=[],s=[];Ot(no).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),i(o,s)}return n}else De(1,e)},this.produceWithPatches=(e,r)=>{if(qt(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]},Jn(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Jn(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Jn(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){be(t)||De(8),He(t)&&(t=Ra(t));let e=ya(this),r=lo(e,t,void 0);return r[ie].isManual_=!0,so(e),r}finishDraft(t,e){let r=t&&t[ie];(!r||!r.isManual_)&&De(9);let{scope_:i}=r;return ga(i,e),va(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=Ot(no).applyPatches_;return He(t)?i(t,e):this.produce(t,n=>i(n,e))}};function lo(t,e,r,i){let[n,o]=Ci(e)?Ot(bi).proxyMap_(e,r):wi(e)?Ot(bi).proxySet_(e,r):hd(e,r);return(r?.scope_??Aa()).drafts_.push(n),o.callbacks_=r?.callbacks_??[],o.key_=i,r&&i!==void 0?pd(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 Ra(t){return He(t)||De(10,t),Oa(t)}function Oa(t){if(!be(t)||Ri(t))return t;let e=t[ie],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=io(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=io(t,!0);return _i(r,(n,o)=>{xi(r,n,Oa(o))},i),e&&(e.finalized_=!1),r}var vd=globalThis.Iterator,Ff=typeof vd?.from=="function";var xd=new yd,fo=xd.produce;function La(t){return({dispatch:r,getState:i})=>n=>o=>typeof o=="function"?o(r,i,t):n(o)}var Pa=La(),Ia=La;var bd=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Tr:Tr.apply(null,arguments)},Wf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Ed=t=>t&&typeof t.match=="function";function at(t,e){function r(...i){if(e){let n=e(...i);if(!n)throw new Error(Ze(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=>da(i)&&i.type===t,r}var Ua=class Lr extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Lr.prototype)}static get[Symbol.species](){return Lr}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Lr(...e[0].concat(this)):new Lr(...e.concat(this))}};function Ma(t){return be(t)?fo(t,()=>{}):t}function Li(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Sd(t){return typeof t=="boolean"}var Ad=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new Ua;return r&&(Sd(r)?s.push(Pa):s.push(Ia(r.extraArgument))),s},_d="RTK_autoBatch";var Na=t=>e=>{setTimeout(e,t)},Td=(t,e)=>r=>{let i=!1,n=()=>{i||(i=!0,cancelAnimationFrame(o),clearTimeout(s),r())},o=t(n),s=setTimeout(n,e)},Cd=(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?Td(window.requestAnimationFrame,100):Na(10):t.type==="callback"?t.queueNotification:Na(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?.[_d],o=!n,o&&(s||(s=!0,l(c))),i.dispatch(u)}finally{n=!0}}})},wd=t=>function(r){let{autoBatch:i=!0}=r??{},n=new Ua(t);return i&&n.push(Cd(typeof i=="object"?i:void 0)),n};function $a(t){let e=Ad(),{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(fi(r))l=ca(r);else throw new Error(Ze(1));let c;typeof i=="function"?c=i(e):c=e();let u=Tr;n&&(u=bd({trace:!1,...typeof n=="object"&&n}));let d=ua(...c),p=wd(d),m=typeof a=="function"?a(p):p(),v=u(...m);return Qn(l,s,v)}function Fa(t){let e={},r=[],i,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Ze(28));if(a in e)throw new Error(Ze(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 Rd(t){return typeof t=="function"}function Od(t,e){let[r,i,n]=Fa(e),o;if(Rd(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(He(u)){let m=d(u,l);return m===void 0?u:m}else{if(be(u))return fo(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 Ld=(t,e)=>Ed(t)?t.match(e):t(e);function Pd(...t){return e=>t.some(r=>Ld(r,e))}var Id="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Md=(t=21)=>{let e="",r=t;for(;r--;)e+=Id[Math.random()*64|0];return e},Nd=["name","message","stack","code"],ho=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Da=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Dd=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Nd)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},ka="External signal was aborted",kd=(()=>{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||Dd)(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 m=i?.idGenerator?i.idGenerator(l):Md(),v=new AbortController,A,y;function _(E){y=E,v.abort()}c&&(c.aborted?_(ka):c.addEventListener("abort",()=>_(ka),{once:!0}));let L=(async function(){let E;try{let O=i?.condition?.(l,{getState:d,extra:p});if($d(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(m,l,i?.getPendingMeta?.({requestId:m,arg:l},{getState:d,extra:p}))),E=await Promise.race([V,Promise.resolve(r(l,{dispatch:u,getState:d,extra:p,requestId:m,signal:v.signal,abort:_,rejectWithValue:((D,j)=>new ho(D,j)),fulfillWithValue:((D,j)=>new Da(D,j))})).then(D=>{if(D instanceof ho)throw D;return D instanceof Da?n(D.payload,m,l,D.meta):n(D,m,l)})])}catch(O){E=O instanceof ho?s(null,m,l,O.payload,O.meta):s(O,m,l)}finally{A&&v.signal.removeEventListener("abort",A)}return i&&!i.dispatchConditionRejection&&s.match(E)&&E.meta.condition||u(E),E})();return Object.assign(L,{abort:_,requestId:m,arg:l,unwrap(){return L.then(Ud)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Pd(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function Ud(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function $d(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ba=Symbol.for("rtk-slice-createasyncthunk"),qf={[Ba]:kd};function Fd(t,e){return`${t}/${e}`}function Bd({creators:t}={}){let e=t?.asyncThunk?.[Ba];return function(i){let{name:n,reducerPath:o=n}=i;if(!n)throw new Error(Ze(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(Vd()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(E,C){let O=typeof E=="string"?E:E.type;if(!O)throw new Error(Ze(12));if(O in l.sliceCaseReducersByType)throw new Error(Ze(13));return l.sliceCaseReducersByType[O]=C,c},addMatcher(E,C){return l.sliceMatchers.push({matcher:E,reducer:C}),c},exposeAction(E,C){return l.actionCreators[E]=C,c},exposeCaseReducer(E,C){return l.sliceCaseReducersByName[E]=C,c}};a.forEach(E=>{let C=s[E],O={reducerName:E,type:Fd(n,E),createNotation:typeof i.reducers=="function"};zd(C)?Wd(O,C,c,e):jd(O,C,c)});function u(){let[E={},C=[],O=void 0]=typeof i.extraReducers=="function"?Fa(i.extraReducers):[i.extraReducers],V={...E,...l.sliceCaseReducersByType};return Od(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=E=>E,p=new Map,m=new WeakMap,v;function A(E,C){return v||(v=u()),v(E,C)}function y(){return v||(v=u()),v.getInitialState()}function _(E,C=!1){function O(D){let j=D[E];return typeof j>"u"&&C&&(j=Li(m,O,y)),j}function V(D=d){let j=Li(p,C,()=>new WeakMap);return Li(j,D,()=>{let cr={};for(let[_e,pt]of Object.entries(i.selectors??{}))cr[_e]=Hd(pt,D,()=>Li(m,D,y),C);return cr})}return{reducerPath:E,getSelectors:V,get selectors(){return V(O)},selectSlice:O}}let L={name:n,reducer:A,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,..._(o),injectInto(E,{reducerPath:C,...O}={}){let V=C??o;return E.inject({reducerPath:V,reducer:A},O),{...L,..._(V,!0)}}};return L}}function Hd(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=Bd();function Vd(){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 jd({type:t,reducerName:e,createNotation:r},i,n){let o,s;if("reducer"in i){if(r&&!Kd(i))throw new Error(Ze(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 zd(t){return t._reducerDefinitionType==="asyncThunk"}function Kd(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Wd({type:t,reducerName:e},r,i,n){if(!n)throw new Error(Ze(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||Pi,pending:a||Pi,rejected:l||Pi,settled:c||Pi})}function Pi(){}var Va="listener",ja="completed",za="cancelled",Yf=`task-${za}`,Xf=`task-${ja}`,Qf=`${Va}-${za}`,Zf=`${Va}-${ja}`;var{assign:Ka}=Object;var mo="listenerMiddleware";var Gd=Ka(at(`${mo}/add`),{withTypes:()=>Gd}),Jf=at(`${mo}/removeAll`),qd=Ka(at(`${mo}/remove`),{withTypes:()=>qd});function Ze(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 Yd=si(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)}}}),Ii=class extends Yd(Object){};window.ftReduxStores||(window.ftReduxStores={});var Wa=class t extends Ii{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(di(o))return o;if(n==null)return;let s=Ha({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=$a({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=Sr(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 ai,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];Kt(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 Mi=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 Ni=f(S()),Xd="ft-app-info",Ve=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ve.eventName="authentication-change";var Pr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Pr.eventName="ui-locale-changed";var Qd={session:(t,e)=>{(0,Ni.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>b.dispatchEvent(new Ve(e.payload)),0))}},b=Ni.FtReduxStore.get({name:Xd,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,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var Ga=f(S()),Di=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},qa=(0,Ga.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=>Mi.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Di([(0,go.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Di([(0,go.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Di([Yn({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),Di([Yn({store:b.name})],e.prototype,"uiLocale",void 0),e});var Ya;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ya||(Ya={}));var Xa;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(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.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"})(Za||(Za={}));var Ja;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ja||(Ja={}));var el;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(el||(el={}));var ki;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(ki||(ki={}));var tl;(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"})(tl||(tl={}));var rl;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(rl||(rl={}));var il;(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"})(il||(il={}));var nl;(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"})(nl||(nl={}));var ol;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ol||(ol={}));var sl;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(sl||(sl={}));var al;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(al||(al={}));var ll;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(ll||(ll={}));var cl;(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"})(cl||(cl={}));var ul;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(ul||(ul={}));var dl;(function(t){t.ASC="ASC",t.DESC="DESC"})(dl||(dl={}));var pl;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(pl||(pl={}));var fl;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(fl||(fl={}));var hl;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var Ui;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ui||(Ui={}));var ml;(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"})(ml||(ml={}));var gl;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(gl||(gl={}));var yl;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(yl||(yl={}));var vl;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(vl||(vl={}));var xl;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(xl||(xl={}));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 El;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(El||(El={}));var Sl;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Sl||(Sl={}));var Al;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Al||(Al={}));var _l;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(_l||(_l={}));var Tl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Tl||(Tl={}));var Cl;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Cl||(Cl={}));var wl;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(wl||(wl={}));var Rl;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Rl||(Rl={}));var Ol;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Ol||(Ol={}));var Ll;(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"})(Ll||(Ll={}));var Pl;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Pl||(Pl={}));var Zd={[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 Il(t,e){return t===e||(Zd[t]??[]).some(r=>Il(r,e))}function je(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=>Il(i,e))}function Ml(t,...e){return t==null?!1:e.some(r=>je(t,r))}var Vi=f(S());var yo=f(S());var Lt=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 Xt=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Lt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Lt.await()}};var ne=class extends Xt{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 yo.CacheRegistry,this.cache=e?n.commonCache:new yo.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 $i=class extends ne{async listMySearches(){let{session:e}=b.getState();return je(e,N.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Fi=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 Bi=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 Hi=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 Jd="ft-user-assets",ep={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;xo(t,r,[...vo(t,r),n]),Nl(t,r,1,i),Dl(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;xo(t,r,vo(t,r).map(n=>n.id===i.id?i:n)),Dl(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;xo(t,r,vo(t,r).filter(o=>o.id!==n)),Nl(t,r,-1,i)}},kl={[we.SEARCHES]:"savedSearches",[we.BOOKMARKS]:"bookmarks",[we.BOOKS]:void 0,[we.COLLECTIONS]:void 0},vo=(t,e)=>{var r;let i=kl[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},xo=(t,e,r)=>{let i=kl[e];i&&(t[i]=r)},Nl=(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)}},Dl=(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=Vi.FtReduxStore.get({name:Jd,reducers:ep,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 Bi,r=new Hi){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=b.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Fi,this.savedSearchesService=new $i,b.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=b.getState();(0,Vi.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)}}},Eo=new bo;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Eo);var So=class{addCommand(e,r=!1){b.commands.add(e,r)}consumeCommand(e){return b.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new So;var Re=f(S());var Ul,Qt=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},tp=Symbol("clearAfterUnitTest"),ji=class extends(0,Re.withEventBus)(ne){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ul]=()=>{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 Qt({loadedContexts:e})),this.dispatchEvent(new Qt({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Qt({loadedContexts:[e]})),this.dispatchEvent(new Qt({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,Re.delay)(0).then(()=>i()).catch(()=>null)))}};Ul=tp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends ji{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Zt=window.FluidTopicsI18nService,zi=window.FluidTopicsCustomI18nService;var $l=f(S()),Ao=class{highlightHtml(e,r,i){(0,$l.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Ao;var Fl=f(S());var _o=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 Fl.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 _o;var Bl=f(S());var Ir=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 Bl.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var Ki=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 To=class{urlToSearchRequest(e){return Ir.get().parse(e)}searchRequestToUrl(e){return Ir.get().serialize(e)}};window.FluidTopicsUrlService=new To;var Je=f(S());var Pt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};Pt.eventName="before-location-change";var It=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};It.eventName="change";var Co=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))}},Hl=new Co;var Wi=class t extends Je.WithEventBus{static build(){return new t(window.history,Hl,()=>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,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new It(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=new Pt(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let c=r(),u={...c===this.currentIndex?this.currentState:void 0,...o,index:c,href:l.detail.nextLocation.href};i.apply(n,[u,s,u.href]),this.setCurrentState(u,!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)}addBeforeLocationChangeListener(e){this.addEventListener(Pt.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(Pt.eventName,e)}addHistoryChangeListener(e){this.addEventListener(It.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(It.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=Wi.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),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var Vl=f(P());var jl=Vl.css`
168
+ `;var Wl=f(P()),ce=f(G()),Dt=f(S());var Mt=f(S());function zl(t,e){let{authenticationRequired:r,session:i}=b.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Gi=class extends Xt{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var wo=class t extends Mt.FtStateManager{static build(e){return new t(b,e)}constructor(e,r){super(),this.store=e,this.cache=new Mt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Gi,this.cleanSessionDebouncer=new Mt.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Mt.Debouncer(500),this.apiProvider=r??(()=>Lt.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ve.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ve.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",()=>zl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}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 Pr(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)}setNoCustomCode(e){this.store.actions.noCustomCode(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)}userHasAnyRole(...e){return Ml(b.getState().session,...e)}},Kl=wo.build();var Nt=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 Mr=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 Nt(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 X=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},U=class extends Dt.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.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Kl,this.contextRoot=new Mr}render(){return Wl.html`
169
169
  <slot></slot>
170
- `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),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("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Zt.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())}};U.elementDefinitions={};U.styles=Vl;X([(0,ce.property)()],U.prototype,"baseUrl",void 0);X([(0,ce.property)()],U.prototype,"tenantId",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationIdentifier",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationAppVersion",void 0);X([(0,ce.property)()],U.prototype,"uiLocale",void 0);X([(0,Dt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);X([(0,Dt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"editorMode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"noCustom",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"withManualResources",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);X([(0,Dt.jsonProperty)([])],U.prototype,"messageContexts",void 0);X([(0,Dt.jsonProperty)(void 0)],U.prototype,"session",void 0);var Gl=f(S());var Wl={"ft-app-context":U};(0,Gl.customElements)(Wl);var ql=f(G());var Ro=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-]+$/)}},Jt=new Ro;var ip=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},Dr=Symbol("i18nAttributes"),Yl=Symbol("i18nListAttributes"),kr=Symbol("i18nProperties"),qi=Symbol("i18nContexts"),Nr=Symbol("i18nUnsubs"),Qi=(0,er.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?zi:Zt}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(Jt.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[Dr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Yl])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(m=>c(u,d,m))})}updateI18nProperties(o){var s;(s=this[kr])===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[qi].set(l,{isCustomContext:a}),this[Nr].has(l)||this[Nr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[qi].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[qi].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Nr].forEach(o=>o()),this[Nr].clear()}}return e=qi,r=Nr,ip([(0,ql.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Yi=class extends Qi(er.FtLitElement){},Xi=class extends Qi(er.FtLitElementRedux){};var Xl=f(S());var Oo=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?Jt.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},np=new Oo;var Ql=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Xl.hasChanged,converter:Jt,...e}),r[Dr]=(n=r[Dr])!==null&&n!==void 0?n:new Map,r[Dr].set(i,t??{})};var Zi=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?zi:Zt}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 Zl=(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[kr]=(o=r[kr])!==null&&o!==void 0?o:new Map,r[kr].set(i,s)};var Jl=f(P());var ec=Jl.css`
170
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),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("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Zt.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())}};U.elementDefinitions={};U.styles=jl;X([(0,ce.property)()],U.prototype,"baseUrl",void 0);X([(0,ce.property)()],U.prototype,"tenantId",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationIdentifier",void 0);X([(0,ce.property)()],U.prototype,"apiIntegrationAppVersion",void 0);X([(0,ce.property)()],U.prototype,"uiLocale",void 0);X([(0,Dt.jsonProperty)(null)],U.prototype,"availableUiLocales",void 0);X([(0,Dt.jsonProperty)(null)],U.prototype,"metadataConfiguration",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"editorMode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"noCustom",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"openExternalDocumentInNewTab",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomComponent",void 0);X([(0,ce.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],U.prototype,"noCustomCode",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"withManualResources",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"navigatorOnline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"forcedOffline",void 0);X([(0,ce.property)({type:Boolean})],U.prototype,"authenticationRequired",void 0);X([(0,Dt.jsonProperty)([])],U.prototype,"messageContexts",void 0);X([(0,Dt.jsonProperty)(void 0)],U.prototype,"session",void 0);var ql=f(S());var Gl={"ft-app-context":U};(0,ql.customElements)(Gl);var Yl=f(G());var Ro=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-]+$/)}},Jt=new Ro;var np=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},Dr=Symbol("i18nAttributes"),Xl=Symbol("i18nListAttributes"),kr=Symbol("i18nProperties"),qi=Symbol("i18nContexts"),Nr=Symbol("i18nUnsubs"),Qi=(0,er.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?zi:Zt}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(Jt.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[Dr])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Xl])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(m=>c(u,d,m))})}updateI18nProperties(o){var s;(s=this[kr])===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[qi].set(l,{isCustomContext:a}),this[Nr].has(l)||this[Nr].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[qi].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[qi].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Nr].forEach(o=>o()),this[Nr].clear()}}return e=qi,r=Nr,np([(0,Yl.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Yi=class extends Qi(er.FtLitElement){},Xi=class extends Qi(er.FtLitElementRedux){};var Ql=f(S());var Oo=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?Jt.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},op=new Oo;var Zl=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Ql.hasChanged,converter:Jt,...e}),r[Dr]=(n=r[Dr])!==null&&n!==void 0?n:new Map,r[Dr].set(i,t??{})};var Zi=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?zi:Zt}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 Jl=(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[kr]=(o=r[kr])!==null&&o!==void 0?o:new Map,r[kr].set(i,s)};var ec=f(P());var tc=ec.css`
171
171
  `;var Ji=f(P()),rr=f(G()),en=f(S());var tr=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},Oe=class extends Xi{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(b)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:Ji.nothing:Ji.html`
172
172
  <span class="ft-i18n">
173
173
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
174
174
  </span>
175
- `}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:""})}};Oe.elementDefinitions={};Oe.styles=ec;tr([(0,en.redux)()],Oe.prototype,"editorMode",void 0);tr([(0,rr.property)()],Oe.prototype,"context",void 0);tr([(0,rr.property)()],Oe.prototype,"key",void 0);tr([(0,en.jsonProperty)([])],Oe.prototype,"args",void 0);tr([(0,rr.property)()],Oe.prototype,"defaultMessage",void 0);tr([(0,rr.state)()],Oe.prototype,"editorMessage",void 0);var rc=f(S());var tc={"ft-i18n":Oe};(0,rc.customElements)(tc);var ke=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 Yi{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 Le.Debouncer,this.revealDebouncer=new Le.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 ic.html`
175
+ `}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:""})}};Oe.elementDefinitions={};Oe.styles=tc;tr([(0,en.redux)()],Oe.prototype,"editorMode",void 0);tr([(0,rr.property)()],Oe.prototype,"context",void 0);tr([(0,rr.property)()],Oe.prototype,"key",void 0);tr([(0,en.jsonProperty)([])],Oe.prototype,"args",void 0);tr([(0,rr.property)()],Oe.prototype,"defaultMessage",void 0);tr([(0,rr.state)()],Oe.prototype,"editorMessage",void 0);var ic=f(S());var rc={"ft-i18n":Oe};(0,ic.customElements)(rc);var ke=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 Yi{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 Le.Debouncer,this.revealDebouncer=new Le.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 nc.html`
176
176
  <div part="container"
177
177
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
178
178
  <slot part="slot"></slot>
@@ -187,7 +187,7 @@
187
187
  </div>
188
188
  </div>
189
189
  </div>
190
- `}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&&oi(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 ${Le.designSystemVariables.transitionDuration}, left ${Le.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Le.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};z.elementDefinitions={"ft-typography":Z};z.styles=Ss;ke([Ql()],z.prototype,"text",void 0);ke([(0,Pe.property)({type:Boolean})],z.prototype,"manual",void 0);ke([(0,Pe.property)({type:Boolean})],z.prototype,"inline",void 0);ke([(0,Le.numberProperty)()],z.prototype,"delay",void 0);ke([(0,Pe.property)()],z.prototype,"position",void 0);ke([(0,Le.jsonProperty)([])],z.prototype,"ignoreMatchingElements",void 0);ke([(0,Pe.queryAssignedNodes)()],z.prototype,"slotNodes",void 0);ke([(0,Pe.query)(".ft-tooltip--container")],z.prototype,"container",void 0);ke([(0,Pe.query)(".ft-tooltip")],z.prototype,"tooltip",void 0);ke([(0,Pe.query)(".ft-tooltip--content")],z.prototype,"tooltipContent",void 0);ke([(0,Pe.state)()],z.prototype,"visible",void 0);var oc=f(S());var nc={"ft-tooltip":z};(0,oc.customElements)(nc);var nn=f(P()),re=f(G()),Vc=f(ir()),or=f(S());var hc=f(P()),ee=f(G()),mc=f(ir()),Ur=f(S());var pc=f(P()),W=f(S()),ac=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorContent),ue={color:ac,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",ac),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")},lc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorPrimary),cc={color:lc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",lc)},uc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorSecondary),dc={color:uc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",uc)},fc=pc.css`
190
+ `}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&&oi(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 ${Le.designSystemVariables.transitionDuration}, left ${Le.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(e){return(0,Le.eventPathContainsMatchingElement)(e,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(e){return this.manual||this.matchesIgnored(e)}};z.elementDefinitions={"ft-typography":Z};z.styles=Ss;ke([Zl()],z.prototype,"text",void 0);ke([(0,Pe.property)({type:Boolean})],z.prototype,"manual",void 0);ke([(0,Pe.property)({type:Boolean})],z.prototype,"inline",void 0);ke([(0,Le.numberProperty)()],z.prototype,"delay",void 0);ke([(0,Pe.property)()],z.prototype,"position",void 0);ke([(0,Le.jsonProperty)([])],z.prototype,"ignoreMatchingElements",void 0);ke([(0,Pe.queryAssignedNodes)()],z.prototype,"slotNodes",void 0);ke([(0,Pe.query)(".ft-tooltip--container")],z.prototype,"container",void 0);ke([(0,Pe.query)(".ft-tooltip")],z.prototype,"tooltip",void 0);ke([(0,Pe.query)(".ft-tooltip--content")],z.prototype,"tooltipContent",void 0);ke([(0,Pe.state)()],z.prototype,"visible",void 0);var sc=f(S());var oc={"ft-tooltip":z};(0,sc.customElements)(oc);var nn=f(P()),re=f(G()),jc=f(ir()),or=f(S());var mc=f(P()),ee=f(G()),gc=f(ir()),Ur=f(S());var fc=f(P()),W=f(S()),lc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorContent),ue={color:lc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",lc),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")},cc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorPrimary),uc={color:cc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",cc)},dc=W.FtCssVariableFactory.extend("--ft-ripple-color","",W.designSystemVariables.colorSecondary),pc={color:dc,backgroundColor:W.FtCssVariableFactory.extend("--ft-ripple-background-color","",dc)},hc=fc.css`
191
191
  :host {
192
192
  display: contents;
193
193
  }
@@ -242,19 +242,19 @@
242
242
  }
243
243
 
244
244
  .ft-ripple.ft-ripple--secondary .ft-ripple--background {
245
- background-color: ${dc.backgroundColor};
245
+ background-color: ${pc.backgroundColor};
246
246
  }
247
247
 
248
248
  .ft-ripple.ft-ripple--secondary .ft-ripple--effect {
249
- background-color: ${dc.color};
249
+ background-color: ${pc.color};
250
250
  }
251
251
 
252
252
  .ft-ripple.ft-ripple--primary .ft-ripple--background {
253
- background-color: ${cc.backgroundColor};
253
+ background-color: ${uc.backgroundColor};
254
254
  }
255
255
 
256
256
  .ft-ripple.ft-ripple--primary .ft-ripple--effect {
257
- background-color: ${cc.color};
257
+ background-color: ${uc.color};
258
258
  }
259
259
 
260
260
  .ft-ripple .ft-ripple--background {
@@ -299,18 +299,18 @@
299
299
  opacity: ${ue.opacityContentOnSurfacePressed};
300
300
  transform: translate(-50%, -50%) scale(1);
301
301
  }
302
- `;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},I=class extends Ur.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 Ur.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 Ur.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 hc.html`
302
+ `;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},I=class extends Ur.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 Ur.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 Ur.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 mc.html`
303
303
  <style>
304
304
  .ft-ripple .ft-ripple--effect {
305
305
  left: ${this.originX}px;
306
306
  top: ${this.originY}px;
307
307
  }
308
308
  </style>
309
- <div class="${(0,mc.classMap)(e)}">
309
+ <div class="${(0,gc.classMap)(e)}">
310
310
  <div class="ft-ripple--background"></div>
311
311
  <div class="ft-ripple--effect"></div>
312
312
  </div>
313
- `}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()}};I.elementDefinitions={};I.styles=fc;fe([(0,ee.property)({type:Boolean})],I.prototype,"primary",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"secondary",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"unbounded",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"activated",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"selected",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"disabled",void 0);fe([(0,ee.state)()],I.prototype,"hovered",void 0);fe([(0,ee.state)()],I.prototype,"focused",void 0);fe([(0,ee.state)()],I.prototype,"pressed",void 0);fe([(0,ee.state)()],I.prototype,"rippling",void 0);fe([(0,ee.state)()],I.prototype,"originX",void 0);fe([(0,ee.state)()],I.prototype,"originY",void 0);fe([(0,ee.query)(".ft-ripple")],I.prototype,"ripple",void 0);fe([(0,ee.query)(".ft-ripple--effect")],I.prototype,"rippleEffect",void 0);var yc=f(S());var gc={"ft-ripple":I};(0,yc.customElements)(gc);var vc=f(P()),Ue=f(S()),Ee={size:Ue.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Ue.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Ue.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Ue.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Ue.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Ue.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Ue.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Ue.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},xc=[vc.css`
313
+ `}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()}};I.elementDefinitions={};I.styles=hc;fe([(0,ee.property)({type:Boolean})],I.prototype,"primary",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"secondary",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"unbounded",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"activated",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"selected",void 0);fe([(0,ee.property)({type:Boolean})],I.prototype,"disabled",void 0);fe([(0,ee.state)()],I.prototype,"hovered",void 0);fe([(0,ee.state)()],I.prototype,"focused",void 0);fe([(0,ee.state)()],I.prototype,"pressed",void 0);fe([(0,ee.state)()],I.prototype,"rippling",void 0);fe([(0,ee.state)()],I.prototype,"originX",void 0);fe([(0,ee.state)()],I.prototype,"originY",void 0);fe([(0,ee.query)(".ft-ripple")],I.prototype,"ripple",void 0);fe([(0,ee.query)(".ft-ripple--effect")],I.prototype,"rippleEffect",void 0);var vc=f(S());var yc={"ft-ripple":I};(0,vc.customElements)(yc);var xc=f(P()),Ue=f(S()),Ee={size:Ue.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Ue.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Ue.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Ue.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Ue.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Ue.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Ue.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Ue.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},bc=[xc.css`
314
314
  :host, i.ft-icon {
315
315
  display: inline-flex;
316
316
  align-items: center;
@@ -358,12 +358,12 @@
358
358
  .ft-icon--material {
359
359
  font-family: ${Ee.materialFontFamily}, "Material Icons", sans-serif;
360
360
  }
361
- `,Ue.noTextSelect];var je;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(je||(je={}));var $r=f(P()),lt=f(G()),Sc=f(S()),Ac=f(Ec());var tn;(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;"})(tn||(tn={}));var g;(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;"})(g||(g={}));var uv=new Map([...["abw"].map(t=>[t,g.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,g.AUDIO]),...["avi"].map(t=>[t,g.AVI]),...["chm","xhs"].map(t=>[t,g.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,g.CODE]),...["csv"].map(t=>[t,g.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,g.DITA]),...["epub"].map(t=>[t,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,g.EXCEL]),...["flac"].map(t=>[t,g.FLAC]),...["gif"].map(t=>[t,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,g.GZIP]),...["html","htm","xhtml"].map(t=>[t,g.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,g.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,g.JPEG]),...["json"].map(t=>[t,g.JSON]),...["m4a","m4p"].map(t=>[t,g.M4A]),...["mov","qt"].map(t=>[t,g.MOV]),...["mp3"].map(t=>[t,g.MP3]),...["mp4","m4v"].map(t=>[t,g.MP4]),...["ogg","oga"].map(t=>[t,g.OGG]),...["pdf","ps"].map(t=>[t,g.PDF]),...["png"].map(t=>[t,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,g.POWERPOINT]),...["rar"].map(t=>[t,g.RAR]),...["stp"].map(t=>[t,g.STP]),...["txt","rtf","md","mdown"].map(t=>[t,g.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,g.VIDEO]),...["wav"].map(t=>[t,g.WAV]),...["wma"].map(t=>[t,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,g.WORD]),...["xml","xsl","rdf"].map(t=>[t,g.XML]),...["yaml","yml","x-yaml"].map(t=>[t,g.YAML]),...["zip"].map(t=>[t,g.ZIP])]);var dv={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Fr=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 Sc.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=$r.nothing}render(){let e=this.variant&&Object.values(je).includes(this.variant)?this.variant:je.fluid_topics,r=e!==je.material||!!this.value;return $r.html`
361
+ `,Ue.noTextSelect];var ze;(function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"})(ze||(ze={}));var $r=f(P()),lt=f(G()),Ac=f(S()),_c=f(Sc());var tn;(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;"})(tn||(tn={}));var g;(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;"})(g||(g={}));var pv=new Map([...["abw"].map(t=>[t,g.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,g.AUDIO]),...["avi"].map(t=>[t,g.AVI]),...["chm","xhs"].map(t=>[t,g.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,g.CODE]),...["csv"].map(t=>[t,g.CSV]),...["dita","ditamap","ditaval"].map(t=>[t,g.DITA]),...["epub"].map(t=>[t,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(t=>[t,g.EXCEL]),...["flac"].map(t=>[t,g.FLAC]),...["gif"].map(t=>[t,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(t=>[t,g.GZIP]),...["html","htm","xhtml"].map(t=>[t,g.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,g.IMAGE]),...["jpeg","jpg","jpe"].map(t=>[t,g.JPEG]),...["json"].map(t=>[t,g.JSON]),...["m4a","m4p"].map(t=>[t,g.M4A]),...["mov","qt"].map(t=>[t,g.MOV]),...["mp3"].map(t=>[t,g.MP3]),...["mp4","m4v"].map(t=>[t,g.MP4]),...["ogg","oga"].map(t=>[t,g.OGG]),...["pdf","ps"].map(t=>[t,g.PDF]),...["png"].map(t=>[t,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(t=>[t,g.POWERPOINT]),...["rar"].map(t=>[t,g.RAR]),...["stp"].map(t=>[t,g.STP]),...["txt","rtf","md","mdown"].map(t=>[t,g.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,g.VIDEO]),...["wav"].map(t=>[t,g.WAV]),...["wma"].map(t=>[t,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(t=>[t,g.WORD]),...["xml","xsl","rdf"].map(t=>[t,g.XML]),...["yaml","yml","x-yaml"].map(t=>[t,g.YAML]),...["zip"].map(t=>[t,g.ZIP])]);var fv={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Fr=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 Ac.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=$r.nothing}render(){let e=this.variant&&Object.values(ze).includes(this.variant)?this.variant:ze.fluid_topics,r=e!==ze.material||!!this.value;return $r.html`
362
362
  <i class="ft-icon ft-icon--${e} ft-no-text-select" part="icon icon-${e}">
363
- ${(0,Ac.unsafeHTML)(this.resolvedIcon)}
363
+ ${(0,_c.unsafeHTML)(this.resolvedIcon)}
364
364
  <slot ?hidden=${r}></slot>
365
365
  </i>
366
- `}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 je.file_format:this.resolvedIcon=(e=g[i.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:i;break;case je.material:this.resolvedIcon=this.value||$r.nothing;break;default:this.resolvedIcon=(r=tn[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};te.elementDefinitions={};te.styles=xc;Fr([(0,lt.property)()],te.prototype,"variant",void 0);Fr([(0,lt.property)()],te.prototype,"value",void 0);Fr([(0,lt.property)({reflect:!0,attribute:"aria-hidden"})],te.prototype,"ariaHidden",void 0);Fr([(0,lt.state)()],te.prototype,"resolvedIcon",void 0);Fr([(0,lt.query)("slot")],te.prototype,"slottedContent",void 0);var Tc=f(S());var _c={"ft-icon":te};(0,Tc.customElements)(_c);var Hr=f(P()),w=f(S());var Ke=f(S());var Cc=f(P()),Br=f(S()),kt={color:Br.FtCssVariableFactory.extend("--ft-loader-color","",Br.designSystemVariables.colorPrimary),size:Br.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},wc=Cc.css`
366
+ `}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 ze.file_format:this.resolvedIcon=(e=g[i.replace("-","_").toUpperCase()])!==null&&e!==void 0?e:i;break;case ze.material:this.resolvedIcon=this.value||$r.nothing;break;default:this.resolvedIcon=(r=tn[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(e){super.firstUpdated(e),setTimeout(()=>this.resolveIcon())}};te.elementDefinitions={};te.styles=bc;Fr([(0,lt.property)()],te.prototype,"variant",void 0);Fr([(0,lt.property)()],te.prototype,"value",void 0);Fr([(0,lt.property)({reflect:!0,attribute:"aria-hidden"})],te.prototype,"ariaHidden",void 0);Fr([(0,lt.state)()],te.prototype,"resolvedIcon",void 0);Fr([(0,lt.query)("slot")],te.prototype,"slottedContent",void 0);var Cc=f(S());var Tc={"ft-icon":te};(0,Cc.customElements)(Tc);var Hr=f(P()),w=f(S());var We=f(S());var wc=f(P()),Br=f(S()),kt={color:Br.FtCssVariableFactory.extend("--ft-loader-color","",Br.designSystemVariables.colorPrimary),size:Br.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},Rc=wc.css`
367
367
  :host {
368
368
  line-height: 0;
369
369
  }
@@ -432,14 +432,14 @@
432
432
  transform: translate(calc(0.35 * ${kt.size}), 0);
433
433
  }
434
434
  }
435
- `;var Rc=f(P()),Oc=f(S());var Ut=class extends Oc.FtLitElement{render(){return Rc.html`
435
+ `;var Oc=f(P()),Lc=f(S());var Ut=class extends Lc.FtLitElement{render(){return Oc.html`
436
436
  <div class="ft-loader">
437
437
  <div></div>
438
438
  <div></div>
439
439
  <div></div>
440
440
  <div></div>
441
441
  </div>
442
- `}};Ut.styles=wc;var Pc=f(S());var Lc={"ft-loader":Ut};(0,Pc.customElements)(Lc);var ct=f(P()),rn=f(ir()),M=f(G());var nr=t=>t??K;var Nc=f(P()),T=f(S());var Ic=T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorPrimary),F={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorSurface),borderRadius:T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusL),color:Ic,fontSize:T.FtCssVariableFactory.extend("--ft-button-font-size","",Ie.fontSize),iconSize:T.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:T.FtCssVariableFactory.extend("--ft-button-ripple-color","",Ic),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)),Lo={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)},ze={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")},Dc=Nc.css`
442
+ `}};Ut.styles=Rc;var Ic=f(S());var Pc={"ft-loader":Ut};(0,Ic.customElements)(Pc);var ct=f(P()),rn=f(ir()),M=f(G());var nr=t=>t??K;var Dc=f(P()),T=f(S());var Mc=T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorPrimary),F={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorSurface),borderRadius:T.FtCssVariableFactory.extend("--ft-button-border-radius","",T.designSystemVariables.borderRadiusL),color:Mc,fontSize:T.FtCssVariableFactory.extend("--ft-button-font-size","",Ie.fontSize),iconSize:T.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:T.FtCssVariableFactory.extend("--ft-button-ripple-color","",Mc),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")},Nc=T.FtCssVariableFactory.extend("--ft-button-primary-color","",T.FtCssVariableFactory.extend("--ft-button-color","",T.designSystemVariables.colorOnPrimary)),Lo={backgroundColor:T.FtCssVariableFactory.extend("--ft-button-primary-background-color","",T.FtCssVariableFactory.extend("--ft-button-background-color","",T.designSystemVariables.colorPrimary)),color:Nc,rippleColor:T.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Nc)},Ke={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")},kc=Dc.css`
443
443
  :host {
444
444
  display: inline-block;
445
445
  max-width: 100%;
@@ -502,13 +502,13 @@
502
502
  }
503
503
 
504
504
  .ft-button.ft-button--dense {
505
- padding: ${ze.verticalPadding} ${ze.horizontalPadding};
506
- border-radius: ${ze.borderRadius};
507
- ${(0,T.setVariable)(ue.borderRadius,ze.borderRadius)};
505
+ padding: ${Ke.verticalPadding} ${Ke.horizontalPadding};
506
+ border-radius: ${Ke.borderRadius};
507
+ ${(0,T.setVariable)(ue.borderRadius,Ke.borderRadius)};
508
508
  }
509
509
 
510
510
  .ft-button.ft-button--dense.ft-button--outlined {
511
- padding: calc(${ze.verticalPadding} - 1px) calc(${ze.horizontalPadding} - 1px);
511
+ padding: calc(${Ke.verticalPadding} - 1px) calc(${Ke.horizontalPadding} - 1px);
512
512
  }
513
513
 
514
514
  .ft-button:not([disabled]):hover {
@@ -520,7 +520,7 @@
520
520
  }
521
521
 
522
522
  .ft-button--round.ft-button--dense {
523
- border-radius: calc(var(--button-internal-line-height) / 2 + ${ze.verticalPadding});
523
+ border-radius: calc(var(--button-internal-line-height) / 2 + ${Ke.verticalPadding});
524
524
  }
525
525
 
526
526
  .ft-button[disabled] {
@@ -546,7 +546,7 @@
546
546
  }
547
547
 
548
548
  .ft-button--dense .ft-button--label {
549
- margin: 0 ${ze.iconPadding};
549
+ margin: 0 ${Ke.iconPadding};
550
550
  }
551
551
 
552
552
  .ft-button--label.ft-button--label-no-text {
@@ -564,8 +564,8 @@
564
564
  }
565
565
 
566
566
  .ft-button--dense .ft-button--label[hidden] + [part="icon"] {
567
- margin: 0 calc(${ze.horizontalPadding} * -1);
568
- padding: 0 ${ze.verticalPadding};
567
+ margin: 0 calc(${Ke.horizontalPadding} * -1);
568
+ padding: 0 ${Ke.verticalPadding};
569
569
  }
570
570
 
571
571
  .ft-button:not(.ft-button--trailing-icon) [part="label"] {
@@ -576,7 +576,7 @@
576
576
  ${(0,T.setVariable)(kt.size,F.iconSize)};
577
577
  ${(0,T.setVariable)(kt.color,"var(--button-internal-color)")};
578
578
  }
579
- `;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,Ke.toFtFormComponent)(Ke.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":Ke.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=ct.html`
579
+ `;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,We.toFtFormComponent)(We.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":We.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=ct.html`
580
580
  <ft-ripple part="ripple"
581
581
  ?disabled=${this.isDisabled()}
582
582
  ?activated=${this.activated}
@@ -617,7 +617,7 @@
617
617
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
618
618
  `:ct.html`
619
619
  <slot part="icon" name="icon"></slot>
620
- `}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":I,"ft-tooltip":z,"ft-icon":te,"ft-loader":Ut,"ft-typography":Z};R.styles=[Ke.safariEllipsisFix,Dc,Ke.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,M.property)({type:Boolean})],R.prototype,"primary",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"outlined",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"dense",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"round",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"disabled",void 0);k([(0,M.property)()],R.prototype,"icon",void 0);k([(0,M.property)()],R.prototype,"iconVariant",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);k([(0,M.property)()],R.prototype,"label",void 0);k([(0,M.property)()],R.prototype,"type",void 0);k([(0,M.property)()],R.prototype,"href",void 0);k([(0,M.property)()],R.prototype,"target",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"loading",void 0);k([(0,M.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);k([(0,M.property)()],R.prototype,"ariaHasPopup",void 0);k([(0,M.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);k([(0,M.property)()],R.prototype,"tooltipPosition",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"activated",void 0);k([(0,M.query)(".ft-button")],R.prototype,"button",void 0);k([(0,M.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);k([(0,M.state)()],R.prototype,"hasTextContent",void 0);k([(0,M.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);k([(0,M.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var Uc=f(S());var kc={"ft-button":R};(0,Uc.customElements)(kc);var $c=w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnSurface),he={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorSurface),color:$c,fontSize:w.FtCssVariableFactory.extend("--ft-chip-font-size","",ve.fontSize),fontWeight:w.FtCssVariableFactory.extend("--ft-chip-font-weight","",ve.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","",$c),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")},Fc=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:Fc,rippleColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",Fc)},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,Hr.css`
620
+ `}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":I,"ft-tooltip":z,"ft-icon":te,"ft-loader":Ut,"ft-typography":Z};R.styles=[We.safariEllipsisFix,kc,We.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,M.property)({type:Boolean})],R.prototype,"primary",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"outlined",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"dense",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"round",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"disabled",void 0);k([(0,M.property)()],R.prototype,"icon",void 0);k([(0,M.property)()],R.prototype,"iconVariant",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);k([(0,M.property)()],R.prototype,"label",void 0);k([(0,M.property)()],R.prototype,"type",void 0);k([(0,M.property)()],R.prototype,"href",void 0);k([(0,M.property)()],R.prototype,"target",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"loading",void 0);k([(0,M.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);k([(0,M.property)()],R.prototype,"ariaHasPopup",void 0);k([(0,M.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);k([(0,M.property)()],R.prototype,"tooltipPosition",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);k([(0,M.property)({type:Boolean})],R.prototype,"activated",void 0);k([(0,M.query)(".ft-button")],R.prototype,"button",void 0);k([(0,M.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);k([(0,M.state)()],R.prototype,"hasTextContent",void 0);k([(0,M.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);k([(0,M.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var $c=f(S());var Uc={"ft-button":R};(0,$c.customElements)(Uc);var Fc=w.FtCssVariableFactory.extend("--ft-chip-color","",w.designSystemVariables.colorOnSurface),he={backgroundColor:w.FtCssVariableFactory.extend("--ft-chip-background-color","",w.designSystemVariables.colorSurface),color:Fc,fontSize:w.FtCssVariableFactory.extend("--ft-chip-font-size","",ve.fontSize),fontWeight:w.FtCssVariableFactory.extend("--ft-chip-font-weight","",ve.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","",Fc),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")},Bc=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:Bc,rippleColor:w.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",Bc)},Hc={horizontalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:w.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},Vc=[w.noTextSelect,Hr.css`
621
621
  :host {
622
622
  display: inline-block;
623
623
  max-width: 100%;
@@ -657,8 +657,8 @@
657
657
 
658
658
  .ft-chip--dense {
659
659
  --chip-internal-icon-padding: 3px;
660
- --chip-internal-vertical-padding: ${Bc.verticalPadding};
661
- --chip-internal-horizontal-padding: ${Bc.horizontalPadding};
660
+ --chip-internal-vertical-padding: ${Hc.verticalPadding};
661
+ --chip-internal-horizontal-padding: ${Hc.horizontalPadding};
662
662
  --chip-internal-line-height: max(16px, calc(var(--chip-internal-font-size) + 2px));
663
663
  }
664
664
 
@@ -758,7 +758,7 @@
758
758
  order: -1;
759
759
  }
760
760
  `];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},on=class extends CustomEvent{constructor(){super("icon-click")}},B=class extends or.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":or.isSafari};return nn.html`
761
- <div class="${(0,Vc.classMap)(r)}"
761
+ <div class="${(0,jc.classMap)(r)}"
762
762
  aria-label="${this.getLabel()}"
763
763
  tabindex="${this.interactionsOnChip?0:-1}"
764
764
  @keyup=${this.onKeyUp}
@@ -784,7 +784,7 @@
784
784
  <div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
785
785
  <ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
786
786
  </div>
787
- `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new on))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new on))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,or.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":I,"ft-typography":Z,"ft-icon":te,"ft-button":R};B.styles=Hc;de([(0,re.property)({type:Boolean})],B.prototype,"highlighted",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"removable",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"disabled",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"clickable",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"iconClickable",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"dense",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"multiLine",void 0);de([(0,re.property)()],B.prototype,"label",void 0);de([(0,re.property)()],B.prototype,"iconLabel",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"hideIconTooltip",void 0);de([(0,re.property)()],B.prototype,"icon",void 0);de([(0,re.property)()],B.prototype,"iconVariant",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"trailingIcon",void 0);de([(0,re.property)()],B.prototype,"typographyVariant",void 0);de([(0,re.query)("ft-typography slot")],B.prototype,"slottedContent",void 0);var zc=f(S());var jc={"ft-chip":B};(0,zc.customElements)(jc);var Xc=f(P()),q=f(G()),lr=f(S());var Qc=f(ir());var Vr=f(P()),ar=f(G()),ln=f(S());var Kc=f(P()),sn=f(S()),op={iconColor:sn.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",sn.designSystemVariables.colorOnSurfaceMedium)},Wc=Kc.css`
787
+ `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new on))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new on))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,or.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":I,"ft-typography":Z,"ft-icon":te,"ft-button":R};B.styles=Vc;de([(0,re.property)({type:Boolean})],B.prototype,"highlighted",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"removable",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"disabled",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"clickable",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"iconClickable",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"dense",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"multiLine",void 0);de([(0,re.property)()],B.prototype,"label",void 0);de([(0,re.property)()],B.prototype,"iconLabel",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"hideIconTooltip",void 0);de([(0,re.property)()],B.prototype,"icon",void 0);de([(0,re.property)()],B.prototype,"iconVariant",void 0);de([(0,re.property)({type:Boolean})],B.prototype,"trailingIcon",void 0);de([(0,re.property)()],B.prototype,"typographyVariant",void 0);de([(0,re.query)("ft-typography slot")],B.prototype,"slottedContent",void 0);var Kc=f(S());var zc={"ft-chip":B};(0,Kc.customElements)(zc);var Qc=f(P()),q=f(G()),lr=f(S());var Zc=f(ir());var Vr=f(P()),ar=f(G()),ln=f(S());var Wc=f(P()),sn=f(S()),sp={iconColor:sn.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",sn.designSystemVariables.colorOnSurfaceMedium)},Gc=Wc.css`
788
788
  .ft-floating-menu-item {
789
789
  cursor: pointer;
790
790
  display: flex;
@@ -804,7 +804,7 @@
804
804
  }
805
805
 
806
806
  .ft-floating-menu-item ft-icon {
807
- color: ${op.iconColor};
807
+ color: ${sp.iconColor};
808
808
  margin-left: 0;
809
809
  flex-shrink: 0;
810
810
  flex-grow: 0;
@@ -819,8 +819,8 @@
819
819
  word-break: break-word;
820
820
  hyphens: auto;
821
821
  }
822
- `;var Gc=f(ir()),sr=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},an=class extends CustomEvent{constructor(e){super("ft-floating-menu-item-select",{detail:e,bubbles:!0,composed:!0})}},oe=class extends ln.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 Vr.html`
823
- <div class="${(0,Gc.classMap)(this.floatingClasses)}"
822
+ `;var qc=f(ir()),sr=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},an=class extends CustomEvent{constructor(e){super("ft-floating-menu-item-select",{detail:e,bubbles:!0,composed:!0})}},oe=class extends ln.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 Vr.html`
823
+ <div class="${(0,qc.classMap)(this.floatingClasses)}"
824
824
  tabindex="${this.notFocusable||this.disabled?"-1":"0"}"
825
825
  aria-disabled="${this.disabled}"
826
826
  @keydown=${e=>this.onKeyDown(e)}
@@ -835,7 +835,7 @@
835
835
  <slot></slot>
836
836
  </ft-typography>
837
837
  </div>
838
- `}onClick(e){this.disabled?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.dispatchEvent(new an(this.value))}onKeyDown(e){(e.key=="Enter"||e.key==" ")&&(e.preventDefault(),this.dispatchEvent(new an(this.value)))}};oe.elementDefinitions={"ft-icon":te,"ft-ripple":I,"ft-typography":Z};oe.styles=Wc;sr([(0,ar.property)()],oe.prototype,"iconVariant",void 0);sr([(0,ar.property)()],oe.prototype,"icon",void 0);sr([(0,ar.property)()],oe.prototype,"value",void 0);sr([(0,ar.property)({type:Boolean})],oe.prototype,"notFocusable",void 0);sr([(0,ar.property)({type:Boolean})],oe.prototype,"disabled",void 0);sr([(0,ln.ignoreComposingEvents)()],oe.prototype,"onKeyDown",null);var qc=f(P()),Se=f(S()),ut={zIndex:Se.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:Se.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:Se.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:Se.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",Se.designSystemVariables.colorOnSurfaceHigh),colorSurface:Se.FtCssVariableFactory.external(Se.designSystemVariables.colorSurface,"Design system"),menuElevation:Se.FtCssVariableFactory.external(Se.designSystemVariables.elevation02,"Design system"),borderRadiusS:Se.FtCssVariableFactory.external(Se.designSystemVariables.borderRadiusS,"Design system")},Yc=qc.css`
838
+ `}onClick(e){this.disabled?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.dispatchEvent(new an(this.value))}onKeyDown(e){(e.key=="Enter"||e.key==" ")&&(e.preventDefault(),this.dispatchEvent(new an(this.value)))}};oe.elementDefinitions={"ft-icon":te,"ft-ripple":I,"ft-typography":Z};oe.styles=Gc;sr([(0,ar.property)()],oe.prototype,"iconVariant",void 0);sr([(0,ar.property)()],oe.prototype,"icon",void 0);sr([(0,ar.property)()],oe.prototype,"value",void 0);sr([(0,ar.property)({type:Boolean})],oe.prototype,"notFocusable",void 0);sr([(0,ar.property)({type:Boolean})],oe.prototype,"disabled",void 0);sr([(0,ln.ignoreComposingEvents)()],oe.prototype,"onKeyDown",null);var Yc=f(P()),Se=f(S()),ut={zIndex:Se.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:Se.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:Se.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:Se.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",Se.designSystemVariables.colorOnSurfaceHigh),colorSurface:Se.FtCssVariableFactory.external(Se.designSystemVariables.colorSurface,"Design system"),menuElevation:Se.FtCssVariableFactory.external(Se.designSystemVariables.elevation02,"Design system"),borderRadiusS:Se.FtCssVariableFactory.external(Se.designSystemVariables.borderRadiusS,"Design system")},Xc=Yc.css`
839
839
  .ft-floating-menu {
840
840
  color: ${ut.textColor};
841
841
  display: contents;
@@ -866,8 +866,8 @@
866
866
  .ft-floating-menu--open .ft-floating-menu--options {
867
867
  display: block;
868
868
  }
869
- `;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},cn=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var un=class extends CustomEvent{constructor(e){super("select",{detail:e})}},$=class extends lr.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=je.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 cn(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 Xc.html`
870
- <div part="container" class="${(0,Qc.classMap)(e)}" @keydown=${this.onKeyDown}>
869
+ `;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},cn=class extends CustomEvent{constructor(e){super("change",{detail:{open:e}})}};var un=class extends CustomEvent{constructor(e){super("select",{detail:e})}},$=class extends lr.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=ze.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 cn(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 Qc.html`
870
+ <div part="container" class="${(0,Zc.classMap)(e)}" @keydown=${this.onKeyDown}>
871
871
  <slot name="toggle"
872
872
  part="toggle"
873
873
  @click=${this.toggleMenu}
@@ -897,7 +897,7 @@
897
897
  </div>
898
898
  </div>
899
899
  </div>
900
- `}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 un(e.detail)),this.closeMenu()}onContentClick(e){(0,lr.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 oi(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())}};$.elementDefinitions={"ft-floating-menu-item":oe,"ft-button":R};$.styles=Yc;se([(0,q.property)()],$.prototype,"horizontalAlignment",void 0);se([(0,q.property)()],$.prototype,"verticalAlignment",void 0);se([(0,lr.jsonProperty)([])],$.prototype,"closeMenuMatchers",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"primary",void 0);se([(0,q.property)()],$.prototype,"label",void 0);se([(0,q.property)()],$.prototype,"tooltipPosition",void 0);se([(0,q.property)()],$.prototype,"icon",void 0);se([(0,q.property)()],$.prototype,"iconVariant",void 0);se([(0,q.property)()],$.prototype,"text",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"disabled",void 0);se([(0,q.state)()],$.prototype,"menuOpen",void 0);se([(0,q.state)()],$.prototype,"forceMenuOpen",void 0);se([(0,q.query)(".ft-floating-menu")],$.prototype,"container",void 0);se([(0,q.query)(".ft-floating-menu--wrapper")],$.prototype,"menuWrapper",void 0);se([(0,q.query)("#actions-button")],$.prototype,"actionButton",void 0);se([(0,q.queryAssignedElements)({slot:"toggle"})],$.prototype,"customToggle",void 0);var Zc=f(P()),dn=f(S()),sp={color:dn.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",dn.designSystemVariables.colorOnSurfaceMedium)},Jc=Zc.css`
900
+ `}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 un(e.detail)),this.closeMenu()}onContentClick(e){(0,lr.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 oi(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())}};$.elementDefinitions={"ft-floating-menu-item":oe,"ft-button":R};$.styles=Xc;se([(0,q.property)()],$.prototype,"horizontalAlignment",void 0);se([(0,q.property)()],$.prototype,"verticalAlignment",void 0);se([(0,lr.jsonProperty)([])],$.prototype,"closeMenuMatchers",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"primary",void 0);se([(0,q.property)()],$.prototype,"label",void 0);se([(0,q.property)()],$.prototype,"tooltipPosition",void 0);se([(0,q.property)()],$.prototype,"icon",void 0);se([(0,q.property)()],$.prototype,"iconVariant",void 0);se([(0,q.property)()],$.prototype,"text",void 0);se([(0,q.property)({type:Boolean})],$.prototype,"disabled",void 0);se([(0,q.state)()],$.prototype,"menuOpen",void 0);se([(0,q.state)()],$.prototype,"forceMenuOpen",void 0);se([(0,q.query)(".ft-floating-menu")],$.prototype,"container",void 0);se([(0,q.query)(".ft-floating-menu--wrapper")],$.prototype,"menuWrapper",void 0);se([(0,q.query)("#actions-button")],$.prototype,"actionButton",void 0);se([(0,q.queryAssignedElements)({slot:"toggle"})],$.prototype,"customToggle",void 0);var Jc=f(P()),dn=f(S()),ap={color:dn.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",dn.designSystemVariables.colorOnSurfaceMedium)},eu=Jc.css`
901
901
  .ft-floating-menu-label {
902
902
  padding: 4px 8px;
903
903
  }
@@ -908,23 +908,23 @@
908
908
  width: max-content;
909
909
  text-overflow: ellipsis;
910
910
  overflow: hidden;
911
- color: ${sp.color}
911
+ color: ${ap.color}
912
912
  }
913
- `;var eu=f(P()),tu=f(S());var dt=class extends tu.FtLitElement{render(){return eu.html`
913
+ `;var tu=f(P()),ru=f(S());var dt=class extends ru.FtLitElement{render(){return tu.html`
914
914
  <div class="ft-floating-menu-label">
915
915
  <ft-typography variant="${Te.caption}">
916
916
  <slot></slot>
917
917
  </ft-typography>
918
918
  </div>
919
- `}};dt.elementDefinitions={"ft-typography":Z};dt.styles=Jc;var iu=f(S());var ru={"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt};(0,iu.customElements)(ru);var jr=f(S());function ap(t){var e;return((e=(0,jr.accessResult)(t))===null||e===void 0?void 0:e.openMode)===Ui.EXTERNAL}function Io(t){return ap(t)?(0,jr.accessResult)(t).originUrl:(0,jr.accessResultUrl)(t)}var pu=f(ou());var Mo=Zi.build("designedReaderMapMetadata");var su=f(P());var au=su.css`
920
- `;var zr=f(P()),$t=f(G()),Q=f(S());var me=f(S());var lu=f(S()),lp={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]}},cu=t=>lu.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:lp});var No=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:"",contentTag:n.contentTag,contentClass:n.contentClass,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,contentTag:n.contentTag,contentClass:n.contentClass,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]):[]},m=(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,_)=>{m(y,v[_])}),e.tocId&&m(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}},pn=class{convertPaginatedToc(e,r){return new No(e,r).build()}};var fn=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 We.FEEDBACK:return Ze(r??[],N.FEEDBACK_USER);case We.RATING:return Ze(r??[],N.RATING_USER);case We.PRINT:return Ze(r??[],N.PRINT_USER);case We.BOOKMARK:return!!r?.sessionAuthenticated;case We.COLLECTIONS:return Ze(r??[],N.COLLECTION_USER);case We.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 hn=class t extends fn{static async build(e){return new t(new pn,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 cp="topicPivot";function mn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(cp,i)}),r.href}var gn=class t{static build(e,r){return new t(cu(e.trim()||"context"),r??hn.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 Ki,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}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([]),e&&!r&&(this.store.commands.clear(/^focus-topic-/),this.store.commands.add({type:`focus-topic-${e}`}))}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=mn(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:ki.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(m=>{var v;return{tocId:m.tocId,title:(v=m.untranslatedTitle)!==null&&v!==void 0?v:m.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 yn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},vn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},xn=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})}},En=class extends Event{constructor(){super("ft-reader-map-not-found")}},Sn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},An=class extends Event{constructor(){super("ft-reader-map-forbidden")}},_n=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},Do=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},Y=class extends Q.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Q.Debouncer(5),this.navigationDebouncer=new Q.Debouncer(10),this.mapLoadedEventDebouncer=new Q.Debouncer(50),this.addStore(b)}render(){return zr.html`
919
+ `}};dt.elementDefinitions={"ft-typography":Z};dt.styles=eu;var nu=f(S());var iu={"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt};(0,nu.customElements)(iu);var jr=f(S());function lp(t){var e;return((e=(0,jr.accessResult)(t))===null||e===void 0?void 0:e.openMode)===Ui.EXTERNAL}function Io(t){return lp(t)?(0,jr.accessResult)(t).originUrl:(0,jr.accessResultUrl)(t)}var fu=f(su());var Mo=Zi.build("designedReaderMapMetadata");var au=f(P());var lu=au.css`
920
+ `;var zr=f(P()),$t=f(G()),Q=f(S());var me=f(S());var cu=f(S()),cp={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]}},uu=t=>cu.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:cp});var No=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:"",contentTag:n.contentTag,contentClass:n.contentClass,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,contentTag:n.contentTag,contentClass:n.contentClass,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]):[]},m=(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,_)=>{m(y,v[_])}),e.tocId&&m(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}},pn=class{convertPaginatedToc(e,r){return new No(e,r).build()}};var fn=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 je((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 Ge.FEEDBACK:return je(r??[],N.FEEDBACK_USER);case Ge.RATING:return je(r??[],N.RATING_USER);case Ge.PRINT:return je(r??[],N.PRINT_USER);case Ge.BOOKMARK:return!!r?.sessionAuthenticated;case Ge.COLLECTIONS:return je(r??[],N.COLLECTION_USER);case Ge.PERSONAL_BOOKS:return je(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 hn=class t extends fn{static async build(e){return new t(new pn,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 up="topicPivot";function mn(t,e){let r=new URL(t);return e?.values.forEach(i=>{r.searchParams.append(up,i)}),r.href}var gn=class t{static build(e,r){return new t(uu(e.trim()||"context"),r??hn.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 Ki,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}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([]),e&&!r&&(this.store.commands.clear(/^focus-topic-/),this.store.commands.add({type:`focus-topic-${e}`}))}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=mn(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:ki.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(m=>{var v;return{tocId:m.tocId,title:(v=m.untranslatedTitle)!==null&&v!==void 0?v:m.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 yn=class extends CustomEvent{constructor(e,r){super("ft-reader-map-loaded",{detail:{map:e,toc:r}})}},vn=class extends CustomEvent{constructor(e,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},xn=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})}},En=class extends Event{constructor(){super("ft-reader-map-not-found")}},Sn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},An=class extends Event{constructor(){super("ft-reader-map-forbidden")}},_n=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},Do=class{constructor(e){this.stateManager=e}searchInDocument(e){this.stateManager.setSearchInDocumentQuery(e??"")}},Y=class extends Q.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new Q.Debouncer(5),this.navigationDebouncer=new Q.Debouncer(10),this.mapLoadedEventDebouncer=new Q.Debouncer(50),this.addStore(b)}render(){return zr.html`
921
921
  ${this.importStyleIfNeeded()}
922
922
  <slot @register-ft-reader-component=${this.registerComponent}></slot>
923
923
  `}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:"")?zr.nothing:zr.html`
924
924
  <style>
925
925
  @import "${i}"
926
926
  </style>
927
- `}get stateManager(){return this._stateManager==null&&(this._stateManager=gn.build(this.id||(0,Q.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 Do(this.stateManager)}),b.addEventListener(Ve.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),b.addEventListener(Ve.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 xn(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 vn(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 _n),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)})}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 Sn):r.status===403?this.dispatchEvent(new An):r.status===404?this.dispatchEvent(new En):this.dispatchEvent(new bn(e))}reloadBookmarks(){Eo.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 yn(this.map,this.toc))})}};Y.styles=au;ge([(0,Q.redux)({store:b.name})],Y.prototype,"baseUrl",void 0);ge([(0,Q.redux)({store:b.name})],Y.prototype,"session",void 0);ge([(0,$t.property)()],Y.prototype,"mapId",void 0);ge([(0,$t.property)()],Y.prototype,"tocId",void 0);ge([(0,$t.property)()],Y.prototype,"section",void 0);ge([(0,$t.property)()],Y.prototype,"topicPivot",void 0);ge([(0,$t.property)()],Y.prototype,"searchInDocumentQuery",void 0);ge([(0,Q.numberProperty)({min:1})],Y.prototype,"page",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"map",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"toc",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"visibleTopics",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"currentPage",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"scrollTarget",void 0);ge([(0,$t.property)({attribute:!1})],Y.prototype,"readerServiceProvider",void 0);var du=f(S());var uu={"ft-reader-context":Y};(0,du.customElements)(uu);var Kr=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},H=class extends qa(Qi(Wr)){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`
927
+ `}get stateManager(){return this._stateManager==null&&(this._stateManager=gn.build(this.id||(0,Q.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 Do(this.stateManager)}),b.addEventListener(Ve.eventName,this.updateConfiguration)}disconnectedCallback(){super.disconnectedCallback(),b.addEventListener(Ve.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 xn(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 vn(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 _n),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)})}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 Sn):r.status===403?this.dispatchEvent(new An):r.status===404?this.dispatchEvent(new En):this.dispatchEvent(new bn(e))}reloadBookmarks(){Eo.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 yn(this.map,this.toc))})}};Y.styles=lu;ge([(0,Q.redux)({store:b.name})],Y.prototype,"baseUrl",void 0);ge([(0,Q.redux)({store:b.name})],Y.prototype,"session",void 0);ge([(0,$t.property)()],Y.prototype,"mapId",void 0);ge([(0,$t.property)()],Y.prototype,"tocId",void 0);ge([(0,$t.property)()],Y.prototype,"section",void 0);ge([(0,$t.property)()],Y.prototype,"topicPivot",void 0);ge([(0,$t.property)()],Y.prototype,"searchInDocumentQuery",void 0);ge([(0,Q.numberProperty)({min:1})],Y.prototype,"page",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"map",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"toc",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"visibleTopics",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"currentPage",void 0);ge([(0,Q.redux)({store:"reader"})],Y.prototype,"scrollTarget",void 0);ge([(0,$t.property)({attribute:!1})],Y.prototype,"readerServiceProvider",void 0);var pu=f(S());var du={"ft-reader-context":Y};(0,pu.customElements)(du);var Kr=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},H=class extends qa(Qi(Wr)){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`
928
928
  ${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
929
929
  ${this.hideIfEmpty()}
930
930
  `}renderSwitchToRelatives(){return ye.html`
@@ -932,7 +932,7 @@
932
932
  <ft-floating-menu part="floating-menu" text="Toggle collapsible" trailingIcon>
933
933
  ${this.renderChip(!0)}
934
934
  <ft-floating-menu-label>${this.metadataLabel}</ft-floating-menu-label>
935
- ${(0,pu.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
935
+ ${(0,fu.repeat)(this.relatives,e=>e.metadata.value,e=>this.renderRelativeItem(e.result,e.metadata))}
936
936
  </ft-floating-menu>
937
937
  </div>
938
938
  `}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`
@@ -973,7 +973,7 @@
973
973
  display: none !important;
974
974
  }
975
975
  </style>
976
- `: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=mn((o=Io(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?Ae.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new Kr((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}};H.elementDefinitions={"ft-chip":B,"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt,"ft-ripple":I,"ft-tooltip":z};H.styles=Ho;ae([(0,$e.property)(),(0,Ae.reduxReactive)()],H.prototype,"key",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"multiLine",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"useForSwitchingToRelatives",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"displayLabel",void 0);ae([(0,Ae.numberProperty)()],H.prototype,"hierarchicalValueTruncatingLevel",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"forceTooltip",void 0);ae([(0,$e.property)({attribute:!1})],H.prototype,"editorMode",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"translateValues",void 0);ae([(0,Ae.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)}})],H.prototype,"metadata",void 0);ae([(0,$e.state)()],H.prototype,"flatMetadata",void 0);ae([(0,Ae.redux)({store:"reader"})],H.prototype,"map",void 0);ae([(0,Ae.redux)({store:"reader",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.relativeTopicPivotMetadata}})],H.prototype,"relativeTopicPivotMetadata",void 0);ae([(0,$e.state)()],H.prototype,"relatives",void 0);ae([(0,Ae.redux)({store:b.name})],H.prototype,"availableContentLocales",void 0);ae([Zl(Mo.properties.itemWithNoValueForSwitchToRelatives())],H.prototype,"noValueMessage",void 0);ae([(0,Ae.reduxEventListener)({eventName:et.clusteringHelperCreated})],H.prototype,"updateRelatives",null);var fu={"ft-reader-metadata":H};(0,hu.customElements)(fu);})();
976
+ `: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=mn((o=Io(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?Ae.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new Kr((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}};H.elementDefinitions={"ft-chip":B,"ft-floating-menu":$,"ft-floating-menu-item":oe,"ft-floating-menu-label":dt,"ft-ripple":I,"ft-tooltip":z};H.styles=Ho;ae([(0,$e.property)(),(0,Ae.reduxReactive)()],H.prototype,"key",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"multiLine",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"useForSwitchingToRelatives",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"displayLabel",void 0);ae([(0,Ae.numberProperty)()],H.prototype,"hierarchicalValueTruncatingLevel",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"forceTooltip",void 0);ae([(0,$e.property)({attribute:!1})],H.prototype,"editorMode",void 0);ae([(0,$e.property)({type:Boolean})],H.prototype,"translateValues",void 0);ae([(0,Ae.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)}})],H.prototype,"metadata",void 0);ae([(0,$e.state)()],H.prototype,"flatMetadata",void 0);ae([(0,Ae.redux)({store:"reader"})],H.prototype,"map",void 0);ae([(0,Ae.redux)({store:"reader",selector:t=>{var e;return(e=t.configuration)===null||e===void 0?void 0:e.relativeTopicPivotMetadata}})],H.prototype,"relativeTopicPivotMetadata",void 0);ae([(0,$e.state)()],H.prototype,"relatives",void 0);ae([(0,Ae.redux)({store:b.name})],H.prototype,"availableContentLocales",void 0);ae([Jl(Mo.properties.itemWithNoValueForSwitchToRelatives())],H.prototype,"noValueMessage",void 0);ae([(0,Ae.reduxEventListener)({eventName:et.clusteringHelperCreated})],H.prototype,"updateRelatives",null);var hu={"ft-reader-metadata":H};(0,mu.customElements)(hu);})();
977
977
  /*! Bundled license information:
978
978
 
979
979
  lit-html/lit-html.js: