@fluid-topics/ft-reader-page-title 2.2.21 → 2.2.24

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,6 +1,6 @@
1
- "use strict";(()=>{var io=Object.create;var nn=Object.defineProperty;var oo=Object.getOwnPropertyDescriptor;var ao=Object.getOwnPropertyNames;var co=Object.getPrototypeOf,lo=Object.prototype.hasOwnProperty;var sr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var uo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ao(t))!lo.call(e,s)&&s!==r&&nn(e,s,{get:()=>t[s],enumerable:!(n=oo(t,s))||n.enumerable});return e};var m=(e,t,r)=>(r=e!=null?io(co(e)):{},uo(t||!e||!e.__esModule?nn(r,"default",{value:e,enumerable:!0}):r,e));var C=sr((ka,sn)=>{sn.exports=ftGlobals.wcUtils});var X=sr((Ma,on)=>{on.exports=ftGlobals.lit});var z=sr((Na,an)=>{an.exports=ftGlobals.litDecorators});var ro=m(C());var rr=m(X()),nr=m(z()),tn=m(C());var cn=m(X());var ln=cn.css``;var it=m(C()),pn=m(z());var un;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found",e.requestedTopicFiltered="requested-topic-filtered"})(un||(un={}));var dn;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(dn||(dn={}));var po=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},or=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},ir=Symbol("registerInterval"),fo=(0,it.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(s){this.clearStateManager(),this.stateManager=s,this.addStore(s.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var s;return(s=this.stateManager)===null||s===void 0?void 0:s.service}connectedCallback(){super.connectedCallback(),this[ir]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[ir]):this.dispatchEvent(new or)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=ir,po([(0,pn.state)()],r.prototype,"stateManager",void 0),r}),st=class extends fo(it.FtLitElementRedux){};var fr=globalThis,fn=e=>e,ot=fr.trustedTypes,hn=ot?ot.createPolicy("lit-html",{createHTML:e=>e}):void 0,vn="$lit$",re=`lit$${Math.random().toFixed(9).slice(2)}$`,An="?"+re,ho=`<${An}>`,ae=document,at=()=>ae.createComment(""),je=e=>e===null||typeof e!="object"&&typeof e!="function",hr=Array.isArray,yo=e=>hr(e)||typeof e?.[Symbol.iterator]=="function",ar=`[
1
+ "use strict";(()=>{var no=Object.create;var nn=Object.defineProperty;var so=Object.getOwnPropertyDescriptor;var io=Object.getOwnPropertyNames;var oo=Object.getPrototypeOf,ao=Object.prototype.hasOwnProperty;var sr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var co=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of io(t))!ao.call(e,s)&&s!==r&&nn(e,s,{get:()=>t[s],enumerable:!(n=so(t,s))||n.enumerable});return e};var m=(e,t,r)=>(r=e!=null?no(oo(e)):{},co(t||!e||!e.__esModule?nn(r,"default",{value:e,enumerable:!0}):r,e));var C=sr((Oa,sn)=>{sn.exports=ftGlobals.wcUtils});var X=sr((Ra,on)=>{on.exports=ftGlobals.lit});var z=sr((Ia,an)=>{an.exports=ftGlobals.litDecorators});var eo=m(C());var rr=m(X()),nr=m(z()),tn=m(C());var cn=m(X());var ln=cn.css``;var it=m(C()),pn=m(z());var un;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found",e.requestedTopicFiltered="requested-topic-filtered"})(un||(un={}));var dn;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(dn||(dn={}));var lo=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},or=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},ir=Symbol("registerInterval"),uo=(0,it.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(s){this.clearStateManager(),this.stateManager=s,this.addStore(s.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var s;return(s=this.stateManager)===null||s===void 0?void 0:s.service}connectedCallback(){super.connectedCallback(),this[ir]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[ir]):this.dispatchEvent(new or)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=ir,lo([(0,pn.state)()],r.prototype,"stateManager",void 0),r}),st=class extends uo(it.FtLitElementRedux){};var fr=globalThis,fn=e=>e,ot=fr.trustedTypes,hn=ot?ot.createPolicy("lit-html",{createHTML:e=>e}):void 0,An="$lit$",re=`lit$${Math.random().toFixed(9).slice(2)}$`,Sn="?"+re,po=`<${Sn}>`,ae=document,at=()=>ae.createComment(""),je=e=>e===null||typeof e!="object"&&typeof e!="function",hr=Array.isArray,fo=e=>hr(e)||typeof e?.[Symbol.iterator]=="function",ar=`[
2
2
  \f\r]`,He=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yn=/-->/g,mn=/>/g,ie=RegExp(`>|${ar}(?:([^\\s"'>=/]+)(${ar}*=${ar}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),gn=/'/g,Sn=/"/g,xn=/^(?:script|style|textarea|title)$/i,yr=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),bn=yr(1),_n=yr(2),Cn=yr(3),Ve=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),En=new WeakMap,oe=ae.createTreeWalker(ae,129);function Tn(e,t){if(!hr(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return hn!==void 0?hn.createHTML(t):t}var mo=(e,t)=>{let r=e.length-1,n=[],s,i=t===2?"<svg>":t===3?"<math>":"",o=He;for(let a=0;a<r;a++){let c=e[a],l,u,d=-1,f=0;for(;f<c.length&&(o.lastIndex=f,u=o.exec(c),u!==null);)f=o.lastIndex,o===He?u[1]==="!--"?o=yn:u[1]!==void 0?o=mn:u[2]!==void 0?(xn.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=ie):u[3]!==void 0&&(o=ie):o===ie?u[0]===">"?(o=s??He,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?ie:u[3]==='"'?Sn:gn):o===Sn||o===gn?o=ie:o===yn||o===mn?o=He:(o=ie,s=void 0);let g=o===ie&&e[a+1].startsWith("/>")?" ":"";i+=o===He?c+ho:d>=0?(n.push(l),c.slice(0,d)+vn+c.slice(d)+re+g):c+re+(d===-2?a:g)}return[Tn(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},ze=class e{constructor({strings:t,_$litType$:r},n){let s;this.parts=[];let i=0,o=0,a=t.length-1,c=this.parts,[l,u]=mo(t,r);if(this.el=e.createElement(l,n),oe.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=oe.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let d of s.getAttributeNames())if(d.endsWith(vn)){let f=u[o++],g=s.getAttribute(d).split(re),v=/([.?@])?(.*)/.exec(f);c.push({type:1,index:i,name:v[2],strings:g,ctor:v[1]==="."?lr:v[1]==="?"?ur:v[1]==="@"?dr:Re}),s.removeAttribute(d)}else d.startsWith(re)&&(c.push({type:6,index:i}),s.removeAttribute(d));if(xn.test(s.tagName)){let d=s.textContent.split(re),f=d.length-1;if(f>0){s.textContent=ot?ot.emptyScript:"";for(let g=0;g<f;g++)s.append(d[g],at()),oe.nextNode(),c.push({type:2,index:++i});s.append(d[f],at())}}}else if(s.nodeType===8)if(s.data===An)c.push({type:2,index:i});else{let d=-1;for(;(d=s.data.indexOf(re,d+1))!==-1;)c.push({type:7,index:i}),d+=re.length-1}i++}}static createElement(t,r){let n=ae.createElement("template");return n.innerHTML=t,n}};function Oe(e,t,r=e,n){if(t===Ve)return t;let s=n!==void 0?r._$Co?.[n]:r._$Cl,i=je(t)?void 0:t._$litDirective$;return s?.constructor!==i&&(s?._$AO?.(!1),i===void 0?s=void 0:(s=new i(e),s._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=s:r._$Cl=s),s!==void 0&&(t=Oe(e,s._$AS(e,t.values),s,n)),t}var cr=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,s=(t?.creationScope??ae).importNode(r,!0);oe.currentNode=s;let i=oe.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new ct(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new pr(i,this,t)),this._$AV.push(l),c=n[++a]}o!==c?.index&&(i=oe.nextNode(),o++)}return oe.currentNode=ae,s}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},ct=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,s){this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Oe(this,t,r),je(t)?t===O||t==null||t===""?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==Ve&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):yo(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==O&&je(this._$AH)?this._$AA.nextSibling.data=t:this.T(ae.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=ze.createElement(Tn(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(r);else{let i=new cr(s,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(t){let r=En.get(t.strings);return r===void 0&&En.set(t.strings,r=new ze(t)),r}k(t){hr(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,s=0;for(let i of t)s===r.length?r.push(n=new e(this.O(at()),this.O(at()),this,this.options)):n=r[s],n._$AI(i),s++;s<r.length&&(this._$AR(n&&n._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=fn(t).nextSibling;fn(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Re=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,s,i){this.type=1,this._$AH=O,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=O}_$AI(t,r=this,n,s){let i=this.strings,o=!1;if(i===void 0)t=Oe(this,t,r,0),o=!je(t)||t!==this._$AH&&t!==Ve,o&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=Oe(this,a[n+c],r,c),l===Ve&&(l=this._$AH[c]),o||=!je(l)||l!==this._$AH[c],l===O?t=O:t!==O&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}o&&!s&&this.j(t)}j(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lr=class extends Re{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===O?void 0:t}},ur=class extends Re{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==O)}},dr=class extends Re{constructor(t,r,n,s,i){super(t,r,n,s,i),this.type=5}_$AI(t,r=this){if((t=Oe(this,t,r,0)??O)===Ve)return;let n=this._$AH,s=t===O&&n!==O||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==O&&(n===O||s);s&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},pr=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Oe(this,t)}};var go=fr.litHtmlPolyfillSupport;go?.(ze,ct),(fr.litHtmlVersions??=[]).push("3.3.3");var On=Symbol.for(""),So=e=>{if(e?.r===On)return e?._$litStatic$},mr=e=>({_$litStatic$:e,r:On});var wn=new Map,gr=e=>(t,...r)=>{let n=r.length,s,i,o=[],a=[],c,l=0,u=!1;for(;l<n;){for(c=t[l];l<n&&(i=r[l],(s=So(i))!==void 0);)c+=s+t[++l],u=!0;l!==n&&a.push(i),o.push(c),l++}if(l===n&&o.push(t[n]),u){let d=o.join("$$lit$$");(t=wn.get(d))===void 0&&(o.raw=o,wn.set(d,t=o)),r=a}return e(t,...r)},Sr=gr(bn),Ba=gr(_n),Ha=gr(Cn);var Er=m(z()),jn=m(C());var lt;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(lt||(lt={}));var B=m(X()),p=m(C()),Rn=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.titleFont),J=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.contentFont),h={fontFamily:J,fontSize:p.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:p.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:p.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:p.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:p.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:p.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},ce={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Rn),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-font-size","",h.fontSize,"20px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",h.letterSpacing,"0.15px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-line-height","",h.lineHeight,"1.2"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",h.textDecoration,"inherit")},le={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Rn),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",h.letterSpacing,"0.105px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",h.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",h.textDecoration,"inherit")},ue={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",h.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",h.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",h.letterSpacing,"0.144px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",h.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",h.textDecoration,"inherit")},de={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",h.letterSpacing,"0.098px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",h.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",h.textDecoration,"inherit")},pe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",h.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",h.letterSpacing,"0.496px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",h.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",h.textDecoration,"inherit")},fe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",h.letterSpacing,"0.252px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",h.lineHeight,"1.4"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",h.textDecoration,"inherit")},he={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",h.fontSize,"12px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",h.letterSpacing,"0.396px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",h.lineHeight,"1.33"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",h.textDecoration,"inherit")},ye={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",h.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",h.letterSpacing,"0.33px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",h.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",h.textDecoration,"inherit")},me={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",h.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",h.letterSpacing,"1.5px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",h.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",h.textTransform,"uppercase"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",h.textDecoration,"inherit")},ge={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-button-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-button-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",h.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",h.letterSpacing,"1.246px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-button-line-height","",h.lineHeight,"1.15"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",h.textTransform,"uppercase"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",h.textDecoration,"inherit")},In=B.css`
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),gn=/'/g,En=/"/g,xn=/^(?:script|style|textarea|title)$/i,yr=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),bn=yr(1),_n=yr(2),Cn=yr(3),Ve=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),vn=new WeakMap,oe=ae.createTreeWalker(ae,129);function Tn(e,t){if(!hr(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return hn!==void 0?hn.createHTML(t):t}var ho=(e,t)=>{let r=e.length-1,n=[],s,i=t===2?"<svg>":t===3?"<math>":"",o=He;for(let a=0;a<r;a++){let c=e[a],l,u,d=-1,f=0;for(;f<c.length&&(o.lastIndex=f,u=o.exec(c),u!==null);)f=o.lastIndex,o===He?u[1]==="!--"?o=yn:u[1]!==void 0?o=mn:u[2]!==void 0?(xn.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=ie):u[3]!==void 0&&(o=ie):o===ie?u[0]===">"?(o=s??He,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?ie:u[3]==='"'?En:gn):o===En||o===gn?o=ie:o===yn||o===mn?o=He:(o=ie,s=void 0);let g=o===ie&&e[a+1].startsWith("/>")?" ":"";i+=o===He?c+po:d>=0?(n.push(l),c.slice(0,d)+An+c.slice(d)+re+g):c+re+(d===-2?a:g)}return[Tn(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},ze=class e{constructor({strings:t,_$litType$:r},n){let s;this.parts=[];let i=0,o=0,a=t.length-1,c=this.parts,[l,u]=ho(t,r);if(this.el=e.createElement(l,n),oe.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=oe.nextNode())!==null&&c.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let d of s.getAttributeNames())if(d.endsWith(An)){let f=u[o++],g=s.getAttribute(d).split(re),A=/([.?@])?(.*)/.exec(f);c.push({type:1,index:i,name:A[2],strings:g,ctor:A[1]==="."?lr:A[1]==="?"?ur:A[1]==="@"?dr:Re}),s.removeAttribute(d)}else d.startsWith(re)&&(c.push({type:6,index:i}),s.removeAttribute(d));if(xn.test(s.tagName)){let d=s.textContent.split(re),f=d.length-1;if(f>0){s.textContent=ot?ot.emptyScript:"";for(let g=0;g<f;g++)s.append(d[g],at()),oe.nextNode(),c.push({type:2,index:++i});s.append(d[f],at())}}}else if(s.nodeType===8)if(s.data===Sn)c.push({type:2,index:i});else{let d=-1;for(;(d=s.data.indexOf(re,d+1))!==-1;)c.push({type:7,index:i}),d+=re.length-1}i++}}static createElement(t,r){let n=ae.createElement("template");return n.innerHTML=t,n}};function Oe(e,t,r=e,n){if(t===Ve)return t;let s=n!==void 0?r._$Co?.[n]:r._$Cl,i=je(t)?void 0:t._$litDirective$;return s?.constructor!==i&&(s?._$AO?.(!1),i===void 0?s=void 0:(s=new i(e),s._$AT(e,r,n)),n!==void 0?(r._$Co??=[])[n]=s:r._$Cl=s),s!==void 0&&(t=Oe(e,s._$AS(e,t.values),s,n)),t}var cr=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:n}=this._$AD,s=(t?.creationScope??ae).importNode(r,!0);oe.currentNode=s;let i=oe.nextNode(),o=0,a=0,c=n[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new ct(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new pr(i,this,t)),this._$AV.push(l),c=n[++a]}o!==c?.index&&(i=oe.nextNode(),o++)}return oe.currentNode=ae,s}p(t){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}},ct=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,n,s){this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Oe(this,t,r),je(t)?t===O||t==null||t===""?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==Ve&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):fo(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==O&&je(this._$AH)?this._$AA.nextSibling.data=t:this.T(ae.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=ze.createElement(Tn(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(r);else{let i=new cr(s,this),o=i.u(this.options);i.p(r),this.T(o),this._$AH=i}}_$AC(t){let r=vn.get(t.strings);return r===void 0&&vn.set(t.strings,r=new ze(t)),r}k(t){hr(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,s=0;for(let i of t)s===r.length?r.push(n=new e(this.O(at()),this.O(at()),this,this.options)):n=r[s],n._$AI(i),s++;s<r.length&&(this._$AR(n&&n._$AB.nextSibling,s),r.length=s)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let n=fn(t).nextSibling;fn(t).remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Re=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,s,i){this.type=1,this._$AH=O,this._$AN=void 0,this.element=t,this.name=r,this._$AM=s,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=O}_$AI(t,r=this,n,s){let i=this.strings,o=!1;if(i===void 0)t=Oe(this,t,r,0),o=!je(t)||t!==this._$AH&&t!==Ve,o&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=Oe(this,a[n+c],r,c),l===Ve&&(l=this._$AH[c]),o||=!je(l)||l!==this._$AH[c],l===O?t=O:t!==O&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}o&&!s&&this.j(t)}j(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lr=class extends Re{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===O?void 0:t}},ur=class extends Re{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==O)}},dr=class extends Re{constructor(t,r,n,s,i){super(t,r,n,s,i),this.type=5}_$AI(t,r=this){if((t=Oe(this,t,r,0)??O)===Ve)return;let n=this._$AH,s=t===O&&n!==O||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==O&&(n===O||s);s&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},pr=class{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Oe(this,t)}};var yo=fr.litHtmlPolyfillSupport;yo?.(ze,ct),(fr.litHtmlVersions??=[]).push("3.3.3");var On=Symbol.for(""),mo=e=>{if(e?.r===On)return e?._$litStatic$},mr=e=>({_$litStatic$:e,r:On});var wn=new Map,gr=e=>(t,...r)=>{let n=r.length,s,i,o=[],a=[],c,l=0,u=!1;for(;l<n;){for(c=t[l];l<n&&(i=r[l],(s=mo(i))!==void 0);)c+=s+t[++l],u=!0;l!==n&&a.push(i),o.push(c),l++}if(l===n&&o.push(t[n]),u){let d=o.join("$$lit$$");(t=wn.get(d))===void 0&&(o.raw=o,wn.set(d,t=o)),r=a}return e(t,...r)},Er=gr(bn),Fa=gr(_n),Ua=gr(Cn);var vr=m(z()),jn=m(C());var lt;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(lt||(lt={}));var B=m(X()),p=m(C()),Rn=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.titleFont),J=p.FtCssVariableFactory.extend("--ft-typography-font-family","",p.designSystemVariables.contentFont),h={fontFamily:J,fontSize:p.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:p.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:p.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:p.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:p.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit"),textDecoration:p.FtCssVariableFactory.create("--ft-typography-text-decoration","","UNKNOWN","inherit")},ce={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Rn),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-font-size","",h.fontSize,"20px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",h.letterSpacing,"0.15px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-line-height","",h.lineHeight,"1.2"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-title-text-decoration","",h.textDecoration,"inherit")},le={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Rn),fontSize:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",h.letterSpacing,"0.105px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",h.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-title-dense-text-decoration","",h.textDecoration,"inherit")},ue={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",h.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",h.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",h.letterSpacing,"0.144px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",h.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-decoration","",h.textDecoration,"inherit")},de={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",h.letterSpacing,"0.098px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",h.lineHeight,"1.7"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-decoration","",h.textDecoration,"inherit")},pe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",h.fontSize,"16px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",h.letterSpacing,"0.496px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",h.lineHeight,"1.5"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-body1-text-decoration","",h.textDecoration,"inherit")},fe={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",h.letterSpacing,"0.252px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",h.lineHeight,"1.4"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-body2-text-decoration","",h.textDecoration,"inherit")},he={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",h.fontSize,"12px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",h.letterSpacing,"0.396px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",h.lineHeight,"1.33"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-caption-text-decoration","",h.textDecoration,"inherit")},ye={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",h.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",h.letterSpacing,"0.33px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",h.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",h.textTransform,"inherit"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-decoration","",h.textDecoration,"inherit")},me={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",h.fontSize,"10px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",h.fontWeight,"normal"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",h.letterSpacing,"1.5px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",h.lineHeight,"1.6"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",h.textTransform,"uppercase"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-overline-text-decoration","",h.textDecoration,"inherit")},ge={fontFamily:p.FtCssVariableFactory.extend("--ft-typography-button-font-family","",J),fontSize:p.FtCssVariableFactory.extend("--ft-typography-button-font-size","",h.fontSize,"14px"),fontWeight:p.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",h.fontWeight,"600"),letterSpacing:p.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",h.letterSpacing,"1.246px"),lineHeight:p.FtCssVariableFactory.extend("--ft-typography-button-line-height","",h.lineHeight,"1.15"),textTransform:p.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",h.textTransform,"uppercase"),textDecoration:p.FtCssVariableFactory.extend("--ft-typography-button-text-decoration","",h.textDecoration,"inherit")},In=B.css`
4
4
  .ft-typography--title {
5
5
  font-family: ${ce.fontFamily};
6
6
  font-size: ${ce.fontSize};
@@ -105,60 +105,53 @@
105
105
  .ft-typography {
106
106
  vertical-align: inherit;
107
107
  }
108
- `;var Hn=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Q=class extends jn.FtLitElement{constructor(){super(...arguments),this.variant=lt.body1}render(){return this.element?Sr`
108
+ `;var Hn=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Q=class extends jn.FtLitElement{constructor(){super(...arguments),this.variant=lt.body1}render(){return this.element?Er`
109
109
  <${mr(this.element)}
110
110
  part="text"
111
111
  class="ft-typography ft-typography--${this.variant}">
112
112
  <slot></slot>
113
113
  </${mr(this.element)}>
114
- `:Sr`
114
+ `:Er`
115
115
  <slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
116
- `}};Q.styles=[In,kn,Mn,Nn,Dn,Pn,Ln,Fn,Un,$n,Bn];Hn([(0,Er.property)()],Q.prototype,"element",void 0);Hn([(0,Er.property)()],Q.prototype,"variant",void 0);var zn=m(C());var Vn={"ft-typography":Q};(0,zn.customElements)(Vn);var Hr=m(z());var Kn=m(z(),1);var vr=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},Eo=e=>({fromAttribute:t=>{if(t==null)return Ke(e);try{return JSON.parse(t)}catch{return Ke(e)}},toAttribute:t=>JSON.stringify(t)});function qn(e,t){return(0,Kn.property)({type:Object,converter:Eo(e),hasChanged:qe,...t??{}})}function vo(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ie(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Ie(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Ie(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ie(e,t){try{return vo(e,t)}catch{return!1}}function qe(e,t){return!Ie(e,t)}function Ke(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ut(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Wn=m(z(),1);var Ar=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:qe,attribute:!1,...t};(0,Wn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var dt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Se=m(z(),1);var pt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Yn=m(X(),1);var ft=globalThis,Ao=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Gn=(e,t)=>{if(Ao)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),s=ft.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=r.cssText,e.appendChild(n)}};var ht=class extends Yn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return Gn(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){vr(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Xn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var Me=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},es,Jn=Symbol("constructorPrototype"),Qn=Symbol("constructorName"),ts=Symbol("exportpartsDebouncer"),Zn=Symbol("dynamicDependenciesLoaded"),ke=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ke.eventName="exportparts-updated";var W=class extends ht{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[es]=new pt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[ts].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Qn]=this.constructor.name,this[Jn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Qn]&&Object.setPrototypeOf(this,this[Jn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Zn]||(r[Zn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ke.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ke.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ke)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Xn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,o,a;let c=f=>f!=null&&f.trim().length>0,l=t.filter(c).map(f=>f.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let g=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],v=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(E=>E.split(":")[1]))!==null&&a!==void 0?a:[],I=[...g,...v].filter(c).map(E=>E.trim());for(let E of I)u.add(E)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(f=>l.map(g=>`${f}:${g}--${f}`));this.exportparts=[...this.part,...d].join(", ")}};es=ts;Me([(0,Se.property)()],W.prototype,"exportpartsPrefix",void 0);Me([qn([])],W.prototype,"exportpartsPrefixes",void 0);Me([(0,Se.property)({reflect:!0})],W.prototype,"exportparts",void 0);Me([(0,Se.property)()],W.prototype,"customStylesheet",void 0);Me([(0,Se.property)()],W.prototype,"elementToFocus",void 0);Me([(0,Se.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function yt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var We=Symbol("internalReduxEventsUnsubscribers"),ne=Symbol("internalStoresUnsubscribers"),Ee=Symbol("internalStores"),xo=ut(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Ee].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ee].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[Ee].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[Ee].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[Ee].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ee].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[ne].has(o.store):this[ne].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[ne].set(o,a.subscribe(()=>this.updateFromStores())),this[We].set(o,[]),yt(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=f=>this[u](f);a.addEventListener(l.eventName,d),this[We].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ne].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ne].has(o)&&this[ne].get(o)(),this[ne].delete(o),(a=this[We].get(o))===null||a===void 0||a.forEach(c=>c()),this[We].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ne,r=Ee,n=We,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),rs=class extends xo(W){};function M(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var bo=typeof Symbol=="function"&&Symbol.observable||"@@observable",ns=bo,xr=()=>Math.random().toString(36).substring(7).split("").join("."),_o={INIT:`@@redux/INIT${xr()}`,REPLACE:`@@redux/REPLACE${xr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${xr()}`},mt=_o;function gt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function br(e,t,r){if(typeof e!="function")throw new Error(M(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(br)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((E,k)=>{o.set(k,E)}))}function u(){if(c)throw new Error(M(3));return s}function d(E){if(typeof E!="function")throw new Error(M(4));if(c)throw new Error(M(5));let k=!0;l();let L=a++;return o.set(L,E),function(){if(k){if(c)throw new Error(M(6));k=!1,l(),o.delete(L),i=null}}}function f(E){if(!gt(E))throw new Error(M(7));if(typeof E.type>"u")throw new Error(M(8));if(typeof E.type!="string")throw new Error(M(17));if(c)throw new Error(M(9));try{c=!0,s=n(s,E)}finally{c=!1}return(i=o).forEach(L=>{L()}),E}function g(E){if(typeof E!="function")throw new Error(M(10));n=E,f({type:mt.REPLACE})}function v(){let E=d;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(M(11));function L(){let A=k;A.next&&A.next(u())}return L(),{unsubscribe:E(L)}},[ns](){return this}}}return f({type:mt.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:g,[ns]:v}}function Co(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:mt.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:mt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function ss(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{Co(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let f=n[d],g=r[f],v=a[f],I=g(v,c);if(typeof I>"u"){let E=c&&c.type;throw new Error(M(14))}u[f]=I,l=l||I!==v}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ge(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function is(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(M(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=Ge(...a)(s.dispatch),{...s,dispatch:i}}}function os(e){return gt(e)&&"type"in e&&typeof e.type=="string"}var ys=Symbol.for("immer-nothing"),as=Symbol.for("immer-draftable"),N=Symbol.for("immer-state");function K(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var F=Object,De=F.getPrototypeOf,At="constructor",wt="prototype",wr="configurable",xt="enumerable",Et="writable",Ye="value",G=e=>!!e&&!!e[N];function U(e){return e?ms(e)||Rt(e)||!!e[as]||!!e[At]?.[as]||It(e)||kt(e):!1}var To=F[wt][At].toString(),cs=new WeakMap;function ms(e){if(!e||!Pr(e))return!1;let t=De(e);if(t===null||t===F[wt])return!0;let r=F.hasOwnProperty.call(t,At)&&t[At];if(r===Object)return!0;if(!Ne(r))return!1;let n=cs.get(r);return n===void 0&&(n=Function.toString.call(r),cs.set(r,n)),n===To}function Ot(e,t,r=!0){Qe(e)===0?(r?Reflect.ownKeys(e):F.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Qe(e){let t=e[N];return t?t.type_:Rt(e)?1:It(e)?2:kt(e)?3:0}var _r=(e,t,r=Qe(e))=>r===2?e.has(t):F[wt].hasOwnProperty.call(e,t),Or=(e,t,r=Qe(e))=>r===2?e.get(t):e[t],bt=(e,t,r,n=Qe(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function wo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Rt=Array.isArray,It=e=>e instanceof Map,kt=e=>e instanceof Set,Pr=e=>typeof e=="object",Ne=e=>typeof e=="function",Cr=e=>typeof e=="boolean";function Oo(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Z=e=>e.copy_||e.base_;var Lr=e=>e.modified_?e.copy_:e.base_;function Rr(e,t){if(It(e))return new Map(e);if(kt(e))return new Set(e);if(Rt(e))return Array[wt].slice.call(e);let r=ms(e);if(t===!0||t==="class_only"&&!r){let n=F.getOwnPropertyDescriptors(e);delete n[N];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[Et]===!1&&(a[Et]=!0,a[wr]=!0),(a.get||a.set)&&(n[o]={[wr]:!0,[Et]:!0,[xt]:a[xt],[Ye]:e[o]})}return F.create(De(e),n)}else{let n=De(e);if(n!==null&&r)return{...e};let s=F.create(n);return F.assign(s,e)}}function Fr(e,t=!1){return Mt(e)||G(e)||!U(e)||(Qe(e)>1&&F.defineProperties(e,{set:St,add:St,clear:St,delete:St}),F.freeze(e),t&&Ot(e,(r,n)=>{Fr(n,!0)},!1)),e}function Ro(){K(2)}var St={[Ye]:Ro};function Mt(e){return e===null||!Pr(e)?!0:F.isFrozen(e)}var _t="MapSet",Ir="Patches",ls="ArrayMethods",gs={};function ve(e){let t=gs[e];return t||K(0,e),t}var us=e=>!!gs[e];var Xe,Ss=()=>Xe,Io=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:us(_t)?ve(_t):void 0,arrayMethodsPlugin_:us(ls)?ve(ls):void 0});function ds(e,t){t&&(e.patchPlugin_=ve(Ir),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kr(e){Mr(e),e.drafts_.forEach(ko),e.drafts_=null}function Mr(e){e===Xe&&(Xe=e.parent_)}var ps=e=>Xe=Io(Xe,e);function ko(e){let t=e[N];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function fs(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[N].modified_&&(kr(t),K(4)),U(e)&&(e=hs(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[N].base_,e,t)}else e=hs(t,r);return Mo(t,e,!0),kr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ys?e:void 0}function hs(e,t){if(Mt(t))return t;let r=t[N];if(!r)return Ct(t,e.handledSet_,e);if(!Nt(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);As(r,e)}return r.copy_}function Mo(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fr(t,r)}function Es(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Nt=(e,t)=>e.scope_===t,No=[];function vs(e,t,r,n){let s=Z(e),i=e.type_;if(n!==void 0&&Or(s,n,i)===t){bt(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ot(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??No;for(let a of o)bt(s,a,r,i)}function Do(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!Nt(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=Lr(i);vs(e,i.draft_??i,o,r),As(i,s)})}function As(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}Es(e)}}function Po(e,t,r){let{scope_:n}=e;if(G(r)){let s=r[N];Nt(s,n)&&s.callbacks_.push(function(){vt(e);let o=Lr(s);vs(e,r,o,t)})}else U(r)&&e.callbacks_.push(function(){let i=Z(e);e.type_===3?i.has(r)&&Ct(r,n.handledSet_,n):Or(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ct(Or(e.copy_,t,e.type_),n.handledSet_,n)})}function Ct(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(e)||t.has(e)||!U(e)||Mt(e)||(t.add(e),Ot(e,(n,s)=>{if(G(s)){let i=s[N];if(Nt(i,r)){let o=Lr(i);bt(e,n,o,e.type_),Es(i)}}else U(s)&&Ct(s,t,r)})),e}function Lo(e,t){let r=Rt(e),n={type_:r?1:0,scope_:t?t.scope_:Ss(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Tt;r&&(s=[n],i=Je);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var Tt={get(e,t){if(t===N)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=Z(e);if(!_r(s,t,e.type_))return Uo(e,s,t);let i=s[t];if(e.finalized_||!U(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Oo(t))return i;if(i===Tr(e.base_,t)||Fo(e,t,i)){vt(e);let o=e.type_===1?+t:t,a=Dr(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in Z(e)},ownKeys(e){return Reflect.ownKeys(Z(e))},set(e,t,r){let n=xs(Z(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=Tr(Z(e),t),i=s?.[N];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(wo(r,s)&&(r!==void 0||_r(e.base_,t,e.type_)))return!0;vt(e),Nr(e)}return e.copy_[t]===r&&(r!==void 0||_r(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Po(e,t,r)),!0},deleteProperty(e,t){return vt(e),Tr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Nr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Z(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Et]:!0,[wr]:e.type_!==1||t!=="length",[xt]:n[xt],[Ye]:r[t]}},defineProperty(){K(11)},getPrototypeOf(e){return De(e.base_)},setPrototypeOf(){K(12)}},Je={};for(let e in Tt){let t=Tt[e];Je[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Je.deleteProperty=function(e,t){return Je.set.call(this,e,t,void 0)};Je.set=function(e,t,r){return Tt.set.call(this,e[0],t,r,e[0])};function Tr(e,t){let r=e[N];return(r?Z(r):e)[t]}function Fo(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!U(r)||r[N]?!1:e.baseRefs_.has(r)}function Uo(e,t,r){let n=xs(t,r);return n?Ye in n?n[Ye]:n.get?.call(e.draft_):void 0}function xs(e,t){if(!(t in e))return;let r=De(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=De(r)}}function Nr(e){e.modified_||(e.modified_=!0,e.parent_&&Nr(e.parent_))}function vt(e){e.copy_||(e.assigned_=new Map,e.copy_=Rr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $o=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Ne(t)&&!Ne(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Ne(r)||K(6),n!==void 0&&!Ne(n)&&K(7);let s;if(U(t)){let i=ps(this),o=Dr(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?kr(i):Mr(i)}return ds(i,n),fs(s,i)}else if(!t||!Pr(t)){if(s=r(t),s===void 0&&(s=t),s===ys&&(s=void 0),this.autoFreeze_&&Fr(s,!0),n){let i=[],o=[];ve(Ir).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else K(1,t)},this.produceWithPatches=(t,r)=>{if(Ne(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},Cr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Cr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Cr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){U(e)||K(8),G(e)&&(e=bs(e));let t=ps(this),r=Dr(t,e,void 0);return r[N].isManual_=!0,Mr(t),r}finishDraft(e,t){let r=e&&e[N];(!r||!r.isManual_)&&K(9);let{scope_:n}=r;return ds(n,t),fs(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=ve(Ir).applyPatches_;return G(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Dr(e,t,r,n){let[s,i]=It(t)?ve(_t).proxyMap_(t,r):kt(t)?ve(_t).proxySet_(t,r):Lo(t,r);return(r?.scope_??Ss()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Do(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function bs(e){return G(e)||K(10,e),_s(e)}function _s(e){if(!U(e)||Mt(e))return e;let t=e[N],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rr(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Rr(e,!0);return Ot(r,(s,i)=>{bt(r,s,_s(i))},n),t&&(t.finalized_=!1),r}var Bo=globalThis.Iterator,Ic=typeof Bo?.from=="function";var Ho=new $o,Ur=Ho.produce;function Cs(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var Ts=Cs(),ws=Cs;var jo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ge:Ge.apply(null,arguments)},Fc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Vo=e=>e&&typeof e.match=="function";function se(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(ee(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>os(n)&&n.type===e,r}var Ms=class Ze extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ze.prototype)}static get[Symbol.species](){return Ze}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ze(...t[0].concat(this)):new Ze(...t.concat(this))}};function Os(e){return U(e)?Ur(e,()=>{}):e}function Dt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function zo(e){return typeof e=="boolean"}var Ko=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new Ms;return r&&(zo(r)?o.push(Ts):o.push(ws(r.extraArgument))),o},qo="RTK_autoBatch";var Rs=e=>t=>{setTimeout(t,e)},Wo=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=e(s),o=setTimeout(s,t)},Go=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Wo(window.requestAnimationFrame,100):Rs(10):e.type==="callback"?e.queueNotification:Rs(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),f=n.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[qo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},Yo=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Ms(e);return n&&s.push(Go(typeof n=="object"?n:void 0)),s};function Ns(e){let t=Ko(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(gt(r))c=ss(r);else throw new Error(ee(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ge;s&&(u=jo({trace:!1,...typeof s=="object"&&s}));let d=is(...l),f=Yo(d),g=typeof a=="function"?a(f):f(),v=u(...g);return br(c,o,v)}function Ds(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(ee(28));if(a in t)throw new Error(ee(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Xo(e){return typeof e=="function"}function Jo(e,t){let[r,n,s]=Ds(t),i;if(Xo(e))i=()=>Os(e());else{let a=Os(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(G(u)){let g=d(u,c);return g===void 0?u:g}else{if(U(u))return Ur(u,f=>d(f,c));{let f=d(u,c);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return o.getInitialState=i,o}var Qo=(e,t)=>Vo(e)?e.match(t):e(t);function Zo(...e){return t=>e.some(r=>Qo(r,t))}var ea="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ta=(e=21)=>{let t="",r=e;for(;r--;)t+=ea[Math.random()*64|0];return t},ra=["name","message","stack","code"],$r=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Is=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},na=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of ra)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ks="External signal was aborted",sa=(()=>{function e(t,r,n){let s=se(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=se(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=se(t+"/rejected",(c,l,u,d,f)=>({payload:d,error:(n&&n.serializeError||na)(c||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,f)=>{let g=n?.idGenerator?n.idGenerator(c):ta(),v=new AbortController,I,E;function k(S){E=S,v.abort()}l&&(l.aborted?k(ks):l.addEventListener("abort",()=>k(ks),{once:!0}));let L=(async function(){let S;try{let x=n?.condition?.(c,{getState:d,extra:f});if(oa(x)&&(x=await x),x===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let q=new Promise((_,T)=>{I=()=>{T({name:"AbortError",message:E||"Aborted"})},v.signal.addEventListener("abort",I,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:f}))),S=await Promise.race([q,Promise.resolve(r(c,{dispatch:u,getState:d,extra:f,requestId:g,signal:v.signal,abort:k,rejectWithValue:((_,T)=>new $r(_,T)),fulfillWithValue:((_,T)=>new Is(_,T))})).then(_=>{if(_ instanceof $r)throw _;return _ instanceof Is?s(_.payload,g,c,_.meta):s(_,g,c)})])}catch(x){S=x instanceof $r?o(null,g,c,x.payload,x.meta):o(x,g,c)}finally{I&&v.signal.removeEventListener("abort",I)}return n&&!n.dispatchConditionRejection&&o.match(S)&&S.meta.condition||u(S),S})();return Object.assign(L,{abort:k,requestId:g,arg:c,unwrap(){return L.then(ia)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Zo(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function ia(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function oa(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ps=Symbol.for("rtk-slice-createasyncthunk"),$c={[Ps]:sa};function aa(e,t){return`${e}/${t}`}function ca({creators:e}={}){let t=e?.asyncThunk?.[Ps];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(ee(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(ua()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,A){let x=typeof S=="string"?S:S.type;if(!x)throw new Error(ee(12));if(x in c.sliceCaseReducersByType)throw new Error(ee(13));return c.sliceCaseReducersByType[x]=A,l},addMatcher(S,A){return c.sliceMatchers.push({matcher:S,reducer:A}),l},exposeAction(S,A){return c.actionCreators[S]=A,l},exposeCaseReducer(S,A){return c.sliceCaseReducersByName[S]=A,l}};a.forEach(S=>{let A=o[S],x={reducerName:S,type:aa(s,S),createNotation:typeof n.reducers=="function"};pa(A)?ha(x,A,l,t):da(x,A,l)});function u(){let[S={},A=[],x=void 0]=typeof n.extraReducers=="function"?Ds(n.extraReducers):[n.extraReducers],q={...S,...c.sliceCaseReducersByType};return Jo(n.initialState,_=>{for(let T in q)_.addCase(T,q[T]);for(let T of c.sliceMatchers)_.addMatcher(T.matcher,T.reducer);for(let T of A)_.addMatcher(T.matcher,T.reducer);x&&_.addDefaultCase(x)})}let d=S=>S,f=new Map,g=new WeakMap,v;function I(S,A){return v||(v=u()),v(S,A)}function E(){return v||(v=u()),v.getInitialState()}function k(S,A=!1){function x(_){let T=_[S];return typeof T>"u"&&A&&(T=Dt(g,x,E)),T}function q(_=d){let T=Dt(f,A,()=>new WeakMap);return Dt(T,_,()=>{let rn={};for(let[no,so]of Object.entries(n.selectors??{}))rn[no]=la(so,_,()=>Dt(g,_,E),A);return rn})}return{reducerPath:S,getSelectors:q,get selectors(){return q(x)},selectSlice:x}}let L={name:s,reducer:I,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:E,...k(i),injectInto(S,{reducerPath:A,...x}={}){let q=A??i;return S.inject({reducerPath:q,reducer:I},x),{...L,...k(q,!0)}}};return L}}function la(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Ls=ca();function ua(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function da({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!fa(n))throw new Error(ee(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?se(e,o):se(e))}function pa(e){return e._reducerDefinitionType==="asyncThunk"}function fa(e){return e._reducerDefinitionType==="reducerWithPrepare"}function ha({type:e,reducerName:t},r,n,s){if(!s)throw new Error(ee(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(e,i,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Pt,pending:a||Pt,rejected:c||Pt,settled:l||Pt})}function Pt(){}var Fs="listener",Us="completed",$s="cancelled",Bc=`task-${$s}`,Hc=`task-${Us}`,jc=`${Fs}-${$s}`,Vc=`${Fs}-${Us}`;var{assign:Bs}=Object;var Br="listenerMiddleware";var ya=Bs(se(`${Br}/add`),{withTypes:()=>ya}),zc=se(`${Br}/removeAll`),ma=Bs(se(`${Br}/remove`),{withTypes:()=>ma});function ee(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ga=ut(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Lt=class extends ga(Object){};window.ftReduxStores||(window.ftReduxStores={});var Hs=class e extends Lt{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(yt(i))return i;if(s==null)return;let o=Ls({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=Ns({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Ke(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new dt,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,f=this.getState()[d];Ie(f,u)||this.setState({[d]:s(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Ft=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ut=m(C()),Sa="ft-app-info",Ae=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ae.eventName="authentication-change";var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};et.eventName="ui-locale-changed";var Ea={session:(e,t)=>{(0,Ut.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>y.dispatchEvent(new Ae(t.payload)),0))}},y=Ut.FtReduxStore.get({name:Sa,reducers:Ea,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 js=m(C()),$t=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},vl=(0,js.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(y)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Ft.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $t([(0,Hr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),$t([(0,Hr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),$t([Ar({store:y.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),$t([Ar({store:y.name})],t.prototype,"uiLocale",void 0),t});var Vs;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Vs||(Vs={}));var zs;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(zs||(zs={}));var Ks;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Ks||(Ks={}));var qs;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(qs||(qs={}));var Ws;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ws||(Ws={}));var Gs;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Gs||(Gs={}));var Ys;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ys||(Ys={}));var Xs;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Xs||(Xs={}));var Js;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Js||(Js={}));var Qs;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Qs||(Qs={}));var Zs;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Zs||(Zs={}));var ei;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(ei||(ei={}));var ti;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ti||(ti={}));var ri;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ri||(ri={}));var ni;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ni||(ni={}));var si;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(si||(si={}));var ii;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(ii||(ii={}));var oi;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(oi||(oi={}));var ai;(function(e){e.ASC="ASC",e.DESC="DESC"})(ai||(ai={}));var ci;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(ci||(ci={}));var li;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(li||(li={}));var ui;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ui||(ui={}));var di;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(di||(di={}));var pi;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(pi||(pi={}));var fi;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(fi||(fi={}));var hi;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(hi||(hi={}));var yi;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(yi||(yi={}));var mi;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(mi||(mi={}));var w;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(w||(w={}));var H;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(H||(H={}));var gi;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(gi||(gi={}));var Si;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Si||(Si={}));var Ei;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ei||(Ei={}));var vi;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(vi||(vi={}));var Ai;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Ai||(Ai={}));var xi;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(xi||(xi={}));var bi;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(bi||(bi={}));var _i;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(_i||(_i={}));var Ci;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Ci||(Ci={}));var Ti;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ti||(Ti={}));var wi;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(wi||(wi={}));var Oi;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Oi||(Oi={}));var va={[w.PERSONAL_BOOK_SHARE_USER]:[w.PERSONAL_BOOK_USER],[w.HTML_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.PDF_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.KHUB_ADMIN]:[w.CONTENT_PUBLISHER],[w.ADMIN]:[w.KHUB_ADMIN,w.USERS_ADMIN,w.PORTAL_ADMIN,w.BEHAVIOR_DATA_USER],[w.GENERATIVE_AI_EXPORT_USER]:[w.GENERATIVE_AI_USER]};function Ri(e,t){return e===t||(va[e]??[]).some(r=>Ri(r,t))}function jr(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>Ri(n,t))}function Ii(e,...t){return e==null?!1:t.some(r=>jr(e,r))}var zt=m(C());var Vr=m(C());var xe=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=y.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=y.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Pe=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:xe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xe.await()}};var $=class extends Pe{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Vr.CacheRegistry,this.cache=t?s.commonCache:new Vr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Bt=class extends ${async listMySearches(){let{session:t}=y.getState();return jr(t,w.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ht=class extends ${async listMyBookmarks(){let t=y.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var jt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=y.getState().session;return!!t?.sessionAuthenticated}};var Vt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=y.getState().session;return!!t?.sessionAuthenticated}};var Aa="ft-user-assets",xa={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(H).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;Kr(e,r,[...zr(e,r),s]),ki(e,r,1,n),Mi(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Kr(e,r,zr(e,r).map(s=>s.id===n.id?n:s)),Mi(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Kr(e,r,zr(e,r).filter(i=>i.id!==s)),ki(e,r,-1,n)}},Ni={[H.SEARCHES]:"savedSearches",[H.BOOKMARKS]:"bookmarks",[H.BOOKS]:void 0,[H.COLLECTIONS]:void 0},zr=(e,t)=>{var r;let n=Ni[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Kr=(e,t,r)=>{let n=Ni[t];n&&(e[n]=r)},ki=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===H.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Mi=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},D=zt.FtReduxStore.get({name:Aa,reducers:xa,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(H).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),qr=class{constructor(t=new jt,r=new Vt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=y.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ht,this.savedSearchesService=new Bt,y.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=y.getState();(0,zt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),D.actions.clearAssetCount(),D.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),D.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),D.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();D.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();D.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&D.getState().assetCounts.allAsset[t]!==r.count&&D.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&D.getState().assetCounts.bookmarkByMap[t]!==r.count&&D.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(D.getState().assetCounts.bookmarkByMap).length!==0;t===H.BOOKMARKS&&r&&D.actions.clearBookmarkCountByMap(),D.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;D.actions.bookmarks(r)}}},ba=new qr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ba);var Wr=class{addCommand(t,r=!1){y.commands.add(t,r)}consumeCommand(t){return y.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Wr;var j=m(C());var Di,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},_a=Symbol("clearAfterUnitTest"),Kt=class extends(0,j.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Di]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=y.getState().uiLocale,y.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=y.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};Di=_a;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Kt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Kt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Fe=window.FluidTopicsI18nService,qt=window.FluidTopicsCustomI18nService;var Pi=m(C()),Gr=class{highlightHtml(t,r,n){(0,Pi.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Gr;var Li=m(C());var Yr=class{isDate(t){var r,n,s,i;return(i=(n=((s=(r=y.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return Li.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:y.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Yr;var Fi=m(C());var tt=class{static get(t,r){var n,s,i,o;let a=y.getState(),{lang:c,region:l}=(o=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Fi.SearchPlaceConverter(a.baseUrl,t??20,(i=a.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed,r??`${c}-${l}`)}};var Xr=class{urlToSearchRequest(t){return tt.get().parse(t)}searchRequestToUrl(t){return tt.get().serialize(t)}};window.FluidTopicsUrlService=new Xr;var te=m(C());var be=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};be.eventName="before-location-change";var _e=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};_e.eventName="change";var Jr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Ui=new Jr;var Wt=class e extends te.WithEventBus{static build(){return new e(window.history,Ui,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,te.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new _e(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new be(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...i,index:l,href:c.detail.nextLocation.href};n.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(be.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(be.eventName,t)}addHistoryChangeListener(t){this.addEventListener(_e.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(_e.eventName,t)}currentItem(){return(0,te.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,te.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,te.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,te.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Wt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var $i=m(X());var Bi=$i.css`
117
- `;var Vi=m(X()),P=m(z()),we=m(C());var Ce=m(C());function Hi(e,t){let{authenticationRequired:r,session:n}=y.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Gt=class extends Pe{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Qr=class e extends Ce.FtStateManager{static build(t){return new e(y,t)}constructor(t,r){super(),this.store=t,this.cache=new Ce.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Gt,this.cleanSessionDebouncer=new Ce.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Ce.Debouncer(500),this.apiProvider=r??(()=>xe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Ae.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Ae.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Hi(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new et(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Ii(y.getState().session,...t)}},ji=Qr.build();var Te=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var rt=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new Te(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var R=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},b=class extends we.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=ji,this.contextRoot=new rt}render(){return Vi.html`
116
+ `}};Q.styles=[In,kn,Mn,Nn,Dn,Pn,Ln,Fn,Un,$n,Bn];Hn([(0,vr.property)()],Q.prototype,"element",void 0);Hn([(0,vr.property)()],Q.prototype,"variant",void 0);var zn=m(C());var Vn={"ft-typography":Q};(0,zn.customElements)(Vn);var Hr=m(z());var Kn=m(z(),1);var Ar=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},go=e=>({fromAttribute:t=>{if(t==null)return Ke(e);try{return JSON.parse(t)}catch{return Ke(e)}},toAttribute:t=>JSON.stringify(t)});function qn(e,t){return(0,Kn.property)({type:Object,converter:go(e),hasChanged:qe,...t??{}})}function Eo(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,n;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ie(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Ie(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let s=o=>Object.keys(o).filter(a=>o[a]!=null),i=s(e);if(r=i.length,r!==s(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!Ie(e[o],t[o]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ie(e,t){try{return Eo(e,t)}catch{return!1}}function qe(e,t){return!Ie(e,t)}function Ke(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function ut(e,t){let r=n=>n[e]===!0;return n=>{if(r(n))return n;let s=t(n);return s[e]=!0,s}}var Wn=m(z(),1);var Sr=e=>{let t=e??{};return(r,n)=>{var s;let i={hasChanged:qe,attribute:!1,...t};(0,Wn.property)(i)(r,n);let o=r.constructor;o.reduxProperties=new Map(o.reduxProperties),o.reduxProperties.set(n,{selector:(s=t.selector)!==null&&s!==void 0?s:(a=>a[n]),store:t.store})}};var dt=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(n=>n.type===t);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Ee=m(z(),1);var pt=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let n=[...this.callbacks];this.callbacks=[];let s=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let o of n)try{await o()}catch(a){s(a);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var ht=m(X(),1);var ft=class extends ht.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return(0,ht.adoptStyles)(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(t,r){Ar(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Gn(e,t,...r){var n;let s=e.querySelector(t);for(let i of r)s=(n=s?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return s}var Me=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Qn,Yn=Symbol("constructorPrototype"),Xn=Symbol("constructorName"),Zn=Symbol("exportpartsDebouncer"),Jn=Symbol("dynamicDependenciesLoaded"),ke=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};ke.eventName="exportparts-updated";var W=class extends ft{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Qn]=new pt(5),this.scheduleExportpartsUpdate=()=>{var t,r,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[Zn].run(()=>{var s,i;!((s=this.exportpartsPrefix)===null||s===void 0)&&s.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Xn]=this.constructor.name,this[Yn]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Xn]&&Object.setPrototypeOf(this,this[Yn])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[Jn]||(r[Jn]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(ke.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(ke.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new ke)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:s}=this.elementToFocus;if(n!=null){let i=[...s??[],n];r=Gn(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,n,s;if(((n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((s=this.customStylesheet)!==null&&s!==void 0?s:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var r,n,s,i,o,a;let c=f=>f!=null&&f.trim().length>0,l=t.filter(c).map(f=>f.trim());if(l.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let g=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],A=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],I=[...g,...A].filter(c).map(v=>v.trim());for(let v of I)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(f=>l.map(g=>`${f}:${g}--${f}`));this.exportparts=[...this.part,...d].join(", ")}};Qn=Zn;Me([(0,Ee.property)()],W.prototype,"exportpartsPrefix",void 0);Me([qn([])],W.prototype,"exportpartsPrefixes",void 0);Me([(0,Ee.property)({reflect:!0})],W.prototype,"exportparts",void 0);Me([(0,Ee.property)()],W.prototype,"customStylesheet",void 0);Me([(0,Ee.property)()],W.prototype,"elementToFocus",void 0);Me([(0,Ee.state)()],W.prototype,"useAdoptedStyleSheets",void 0);function yt(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var We=Symbol("internalReduxEventsUnsubscribers"),ne=Symbol("internalStoresUnsubscribers"),ve=Symbol("internalStores"),vo=ut(Symbol("withRedux"),function(e){var t,r,n;class s extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(o){super.willUpdate(o),[...this.reduxConstructor.reduxReactiveProperties].some(a=>o.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[ve].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[ve].values()][0]}getStore(o){return o==null?this.getUnnamedStore():this[ve].get(o)}addStore(o,a){var c;a=(c=a??o.name)!==null&&c!==void 0?c:"default-store",this.unsubscribeFromStore(a),this[ve].set(a,o),this.subscribeToStore(a,o),this.updateFromStores()}removeStore(o){let a=typeof o=="string"?o:o.name;this.unsubscribeFromStore(a),this[ve].delete(a)}setupStores(){this.unsubscribeFromStores(),this[ve].forEach((o,a)=>this.subscribeToStore(a,o)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((o,a)=>{let c=this.constructor.getPropertyOptions(a);if(!c?.attribute||!this.hasAttribute(typeof c?.attribute=="string"?c.attribute:a)){let l=this.getStore(o.store);l&&(o.store?this[ne].has(o.store):this[ne].size>0)&&(this[a]=o.selector(l.getState(),this))}})}subscribeToStore(o,a){var c;this[ne].set(o,a.subscribe(()=>this.updateFromStores())),this[We].set(o,[]),yt(a)&&a.eventBus&&((c=this.reduxConstructor.reduxEventListeners)===null||c===void 0||c.forEach((l,u)=>{if(typeof this[u]=="function"&&(!l.store||a.name===l.store)){let d=f=>this[u](f);a.addEventListener(l.eventName,d),this[We].get(o).push(()=>a.removeEventListener(l.eventName,d))}})),this.onStoreAvailable(o)}unsubscribeFromStores(){this[ne].forEach((o,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(o){var a;this[ne].has(o)&&this[ne].get(o)(),this[ne].delete(o),(a=this[We].get(o))===null||a===void 0||a.forEach(c=>c()),this[We].delete(o)}onStoreAvailable(o){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=ne,r=ve,n=We,s.reduxProperties=new Map,s.reduxReactiveProperties=new Set,s.reduxEventListeners=new Map,s}),es=class extends vo(W){};function M(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ao=typeof Symbol=="function"&&Symbol.observable||"@@observable",ts=Ao,xr=()=>Math.random().toString(36).substring(7).split("").join("."),So={INIT:`@@redux/INIT${xr()}`,REPLACE:`@@redux/REPLACE${xr()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${xr()}`},mt=So;function gt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function br(e,t,r){if(typeof e!="function")throw new Error(M(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(br)(e,t)}let n=e,s=t,i=new Map,o=i,a=0,c=!1;function l(){o===i&&(o=new Map,i.forEach((v,k)=>{o.set(k,v)}))}function u(){if(c)throw new Error(M(3));return s}function d(v){if(typeof v!="function")throw new Error(M(4));if(c)throw new Error(M(5));let k=!0;l();let L=a++;return o.set(L,v),function(){if(k){if(c)throw new Error(M(6));k=!1,l(),o.delete(L),i=null}}}function f(v){if(!gt(v))throw new Error(M(7));if(typeof v.type>"u")throw new Error(M(8));if(typeof v.type!="string")throw new Error(M(17));if(c)throw new Error(M(9));try{c=!0,s=n(s,v)}finally{c=!1}return(i=o).forEach(L=>{L()}),v}function g(v){if(typeof v!="function")throw new Error(M(10));n=v,f({type:mt.REPLACE})}function A(){let v=d;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(M(11));function L(){let S=k;S.next&&S.next(u())}return L(),{unsubscribe:v(L)}},[ts](){return this}}}return f({type:mt.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:g,[ts]:A}}function xo(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:mt.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:mt.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function rs(e){let t=Object.keys(e),r={};for(let o=0;o<t.length;o++){let a=t[o];typeof e[a]=="function"&&(r[a]=e[a])}let n=Object.keys(r),s,i;try{xo(r)}catch(o){i=o}return function(a={},c){if(i)throw i;let l=!1,u={};for(let d=0;d<n.length;d++){let f=n[d],g=r[f],A=a[f],I=g(A,c);if(typeof I>"u"){let v=c&&c.type;throw new Error(M(14))}u[f]=I,l=l||I!==A}return l=l||n.length!==Object.keys(a).length,l?u:a}}function Ge(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function ns(...e){return t=>(r,n)=>{let s=t(r,n),i=()=>{throw new Error(M(15))},o={getState:s.getState,dispatch:(c,...l)=>i(c,...l)},a=e.map(c=>c(o));return i=Ge(...a)(s.dispatch),{...s,dispatch:i}}}function ss(e){return gt(e)&&"type"in e&&typeof e.type=="string"}var fs=Symbol.for("immer-nothing"),is=Symbol.for("immer-draftable"),N=Symbol.for("immer-state");function K(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var F=Object,De=F.getPrototypeOf,St="constructor",wt="prototype",wr="configurable",xt="enumerable",vt="writable",Ye="value",G=e=>!!e&&!!e[N];function U(e){return e?hs(e)||Rt(e)||!!e[is]||!!e[St]?.[is]||It(e)||kt(e):!1}var bo=F[wt][St].toString(),os=new WeakMap;function hs(e){if(!e||!Pr(e))return!1;let t=De(e);if(t===null||t===F[wt])return!0;let r=F.hasOwnProperty.call(t,St)&&t[St];if(r===Object)return!0;if(!Ne(r))return!1;let n=os.get(r);return n===void 0&&(n=Function.toString.call(r),os.set(r,n)),n===bo}function Ot(e,t,r=!0){Qe(e)===0?(r?Reflect.ownKeys(e):F.keys(e)).forEach(s=>{t(s,e[s],e)}):e.forEach((n,s)=>t(s,n,e))}function Qe(e){let t=e[N];return t?t.type_:Rt(e)?1:It(e)?2:kt(e)?3:0}var _r=(e,t,r=Qe(e))=>r===2?e.has(t):F[wt].hasOwnProperty.call(e,t),Or=(e,t,r=Qe(e))=>r===2?e.get(t):e[t],bt=(e,t,r,n=Qe(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function _o(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Rt=Array.isArray,It=e=>e instanceof Map,kt=e=>e instanceof Set,Pr=e=>typeof e=="object",Ne=e=>typeof e=="function",Cr=e=>typeof e=="boolean";function Co(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Z=e=>e.copy_||e.base_;var Lr=e=>e.modified_?e.copy_:e.base_;function Rr(e,t){if(It(e))return new Map(e);if(kt(e))return new Set(e);if(Rt(e))return Array[wt].slice.call(e);let r=hs(e);if(t===!0||t==="class_only"&&!r){let n=F.getOwnPropertyDescriptors(e);delete n[N];let s=Reflect.ownKeys(n);for(let i=0;i<s.length;i++){let o=s[i],a=n[o];a[vt]===!1&&(a[vt]=!0,a[wr]=!0),(a.get||a.set)&&(n[o]={[wr]:!0,[vt]:!0,[xt]:a[xt],[Ye]:e[o]})}return F.create(De(e),n)}else{let n=De(e);if(n!==null&&r)return{...e};let s=F.create(n);return F.assign(s,e)}}function Fr(e,t=!1){return Mt(e)||G(e)||!U(e)||(Qe(e)>1&&F.defineProperties(e,{set:Et,add:Et,clear:Et,delete:Et}),F.freeze(e),t&&Ot(e,(r,n)=>{Fr(n,!0)},!1)),e}function To(){K(2)}var Et={[Ye]:To};function Mt(e){return e===null||!Pr(e)?!0:F.isFrozen(e)}var _t="MapSet",Ir="Patches",as="ArrayMethods",ys={};function Ae(e){let t=ys[e];return t||K(0,e),t}var cs=e=>!!ys[e];var Xe,ms=()=>Xe,wo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:cs(_t)?Ae(_t):void 0,arrayMethodsPlugin_:cs(as)?Ae(as):void 0});function ls(e,t){t&&(e.patchPlugin_=Ae(Ir),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kr(e){Mr(e),e.drafts_.forEach(Oo),e.drafts_=null}function Mr(e){e===Xe&&(Xe=e.parent_)}var us=e=>Xe=wo(Xe,e);function Oo(e){let t=e[N];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ds(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[N].modified_&&(kr(t),K(4)),U(e)&&(e=ps(t,e));let{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(r[N].base_,e,t)}else e=ps(t,r);return Ro(t,e,!0),kr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==fs?e:void 0}function ps(e,t){if(Mt(t))return t;let r=t[N];if(!r)return Ct(t,e.handledSet_,e);if(!Nt(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);vs(r,e)}return r.copy_}function Ro(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fr(t,r)}function gs(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Nt=(e,t)=>e.scope_===t,Io=[];function Es(e,t,r,n){let s=Z(e),i=e.type_;if(n!==void 0&&Or(s,n,i)===t){bt(s,n,r,i);return}if(!e.draftLocations_){let a=e.draftLocations_=new Map;Ot(s,(c,l)=>{if(G(l)){let u=a.get(l)||[];u.push(c),a.set(l,u)}})}let o=e.draftLocations_.get(t)??Io;for(let a of o)bt(s,a,r,i)}function ko(e,t,r){e.callbacks_.push(function(s){let i=t;if(!i||!Nt(i,s))return;s.mapSetPlugin_?.fixSetContents(i);let o=Lr(i);Es(e,i.draft_??i,o,r),vs(i,s)})}function vs(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let s=n.getPath(e);s&&n.generatePatches_(e,s,t)}gs(e)}}function Mo(e,t,r){let{scope_:n}=e;if(G(r)){let s=r[N];Nt(s,n)&&s.callbacks_.push(function(){At(e);let o=Lr(s);Es(e,r,o,t)})}else U(r)&&e.callbacks_.push(function(){let i=Z(e);e.type_===3?i.has(r)&&Ct(r,n.handledSet_,n):Or(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ct(Or(e.copy_,t,e.type_),n.handledSet_,n)})}function Ct(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||G(e)||t.has(e)||!U(e)||Mt(e)||(t.add(e),Ot(e,(n,s)=>{if(G(s)){let i=s[N];if(Nt(i,r)){let o=Lr(i);bt(e,n,o,e.type_),gs(i)}}else U(s)&&Ct(s,t,r)})),e}function No(e,t){let r=Rt(e),n={type_:r?1:0,scope_:t?t.scope_:ms(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},s=n,i=Tt;r&&(s=[n],i=Je);let{revoke:o,proxy:a}=Proxy.revocable(s,i);return n.draft_=a,n.revoke_=o,[a,n]}var Tt={get(e,t){if(t===N)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let s=Z(e);if(!_r(s,t,e.type_))return Po(e,s,t);let i=s[t];if(e.finalized_||!U(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Co(t))return i;if(i===Tr(e.base_,t)||Do(e,t,i)){At(e);let o=e.type_===1?+t:t,a=Dr(e.scope_,i,e,o);return e.copy_[o]=a}return i},has(e,t){return t in Z(e)},ownKeys(e){return Reflect.ownKeys(Z(e))},set(e,t,r){let n=As(Z(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let s=Tr(Z(e),t),i=s?.[N];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(_o(r,s)&&(r!==void 0||_r(e.base_,t,e.type_)))return!0;At(e),Nr(e)}return e.copy_[t]===r&&(r!==void 0||_r(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Mo(e,t,r)),!0},deleteProperty(e,t){return At(e),Tr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Nr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Z(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[vt]:!0,[wr]:e.type_!==1||t!=="length",[xt]:n[xt],[Ye]:r[t]}},defineProperty(){K(11)},getPrototypeOf(e){return De(e.base_)},setPrototypeOf(){K(12)}},Je={};for(let e in Tt){let t=Tt[e];Je[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Je.deleteProperty=function(e,t){return Je.set.call(this,e,t,void 0)};Je.set=function(e,t,r){return Tt.set.call(this,e[0],t,r,e[0])};function Tr(e,t){let r=e[N];return(r?Z(r):e)[t]}function Do(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!U(r)||r[N]?!1:e.baseRefs_.has(r)}function Po(e,t,r){let n=As(t,r);return n?Ye in n?n[Ye]:n.get?.call(e.draft_):void 0}function As(e,t){if(!(t in e))return;let r=De(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=De(r)}}function Nr(e){e.modified_||(e.modified_=!0,e.parent_&&Nr(e.parent_))}function At(e){e.copy_||(e.assigned_=new Map,e.copy_=Rr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Lo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(Ne(t)&&!Ne(r)){let i=r;r=t;let o=this;return function(c=i,...l){return o.produce(c,u=>r.call(this,u,...l))}}Ne(r)||K(6),n!==void 0&&!Ne(n)&&K(7);let s;if(U(t)){let i=us(this),o=Dr(i,t,void 0),a=!0;try{s=r(o),a=!1}finally{a?kr(i):Mr(i)}return ls(i,n),ds(s,i)}else if(!t||!Pr(t)){if(s=r(t),s===void 0&&(s=t),s===fs&&(s=void 0),this.autoFreeze_&&Fr(s,!0),n){let i=[],o=[];Ae(Ir).generateReplacementPatches_(t,s,{patches_:i,inversePatches_:o}),n(i,o)}return s}else K(1,t)},this.produceWithPatches=(t,r)=>{if(Ne(t))return(o,...a)=>this.produceWithPatches(o,c=>t(c,...a));let n,s;return[this.produce(t,r,(o,a)=>{n=o,s=a}),n,s]},Cr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Cr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Cr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){U(e)||K(8),G(e)&&(e=Ss(e));let t=us(this),r=Dr(t,e,void 0);return r[N].isManual_=!0,Mr(t),r}finishDraft(e,t){let r=e&&e[N];(!r||!r.isManual_)&&K(9);let{scope_:n}=r;return ls(n,t),ds(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let s=t[r];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}r>-1&&(t=t.slice(r+1));let n=Ae(Ir).applyPatches_;return G(e)?n(e,t):this.produce(e,s=>n(s,t))}};function Dr(e,t,r,n){let[s,i]=It(t)?Ae(_t).proxyMap_(t,r):kt(t)?Ae(_t).proxySet_(t,r):No(t,r);return(r?.scope_??ms()).drafts_.push(s),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?ko(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:l}=c;i.modified_&&l&&l.generatePatches_(i,[],c)}),s}function Ss(e){return G(e)||K(10,e),xs(e)}function xs(e){if(!U(e)||Mt(e))return e;let t=e[N],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rr(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Rr(e,!0);return Ot(r,(s,i)=>{bt(r,s,xs(i))},n),t&&(t.finalized_=!1),r}var Fo=globalThis.Iterator,Cc=typeof Fo?.from=="function";var Uo=new Lo,Ur=Uo.produce;function bs(e){return({dispatch:r,getState:n})=>s=>i=>typeof i=="function"?i(r,n,e):s(i)}var _s=bs(),Cs=bs;var $o=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ge:Ge.apply(null,arguments)},Mc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Bo=e=>e&&typeof e.match=="function";function se(e,t){function r(...n){if(t){let s=t(...n);if(!s)throw new Error(ee(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>ss(n)&&n.type===e,r}var Is=class Ze extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ze.prototype)}static get[Symbol.species](){return Ze}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ze(...t[0].concat(this)):new Ze(...t.concat(this))}};function Ts(e){return U(e)?Ur(e,()=>{}):e}function Dt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Ho(e){return typeof e=="boolean"}var jo=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=t??{},o=new Is;return r&&(Ho(r)?o.push(_s):o.push(Cs(r.extraArgument))),o},Vo="RTK_autoBatch";var ws=e=>t=>{setTimeout(t,e)},zo=(e,t)=>r=>{let n=!1,s=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(o),r())},i=e(s),o=setTimeout(s,t)},Ko=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),s=!0,i=!1,o=!1,a=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?zo(window.requestAnimationFrame,100):ws(10):e.type==="callback"?e.queueNotification:ws(e.timeout),l=()=>{o=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){let d=()=>s&&u(),f=n.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return s=!u?.meta?.[Vo],i=!s,i&&(o||(o=!0,c(l))),n.dispatch(u)}finally{s=!0}}})},qo=e=>function(r){let{autoBatch:n=!0}=r??{},s=new Is(e);return n&&s.push(Ko(typeof n=="object"?n:void 0)),s};function ks(e){let t=jo(),{reducer:r=void 0,middleware:n,devTools:s=!0,duplicateMiddlewareCheck:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{},c;if(typeof r=="function")c=r;else if(gt(r))c=rs(r);else throw new Error(ee(1));let l;typeof n=="function"?l=n(t):l=t();let u=Ge;s&&(u=$o({trace:!1,...typeof s=="object"&&s}));let d=ns(...l),f=qo(d),g=typeof a=="function"?a(f):f(),A=u(...g);return br(c,o,A)}function Ms(e){let t={},r=[],n,s={addCase(i,o){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(ee(28));if(a in t)throw new Error(ee(29));return t[a]=o,s},addAsyncThunk(i,o){return o.pending&&(t[i.pending.type]=o.pending),o.rejected&&(t[i.rejected.type]=o.rejected),o.fulfilled&&(t[i.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return r.push({matcher:i,reducer:o}),s},addDefaultCase(i){return n=i,s}};return e(s),[t,r,n]}function Wo(e){return typeof e=="function"}function Go(e,t){let[r,n,s]=Ms(t),i;if(Wo(e))i=()=>Ts(e());else{let a=Ts(e);i=()=>a}function o(a=i(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[s]),l.reduce((u,d)=>{if(d)if(G(u)){let g=d(u,c);return g===void 0?u:g}else{if(U(u))return Ur(u,f=>d(f,c));{let f=d(u,c);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return o.getInitialState=i,o}var Yo=(e,t)=>Bo(e)?e.match(t):e(t);function Xo(...e){return t=>e.some(r=>Yo(r,t))}var Jo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qo=(e=21)=>{let t="",r=e;for(;r--;)t+=Jo[Math.random()*64|0];return t},Zo=["name","message","stack","code"],$r=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},Os=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},ea=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Zo)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Rs="External signal was aborted",ta=(()=>{function e(t,r,n){let s=se(t+"/fulfilled",(c,l,u,d)=>({payload:c,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),i=se(t+"/pending",(c,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:c,requestStatus:"pending"}})),o=se(t+"/rejected",(c,l,u,d,f)=>({payload:d,error:(n&&n.serializeError||ea)(c||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function a(c,{signal:l}={}){return(u,d,f)=>{let g=n?.idGenerator?n.idGenerator(c):Qo(),A=new AbortController,I,v;function k(E){v=E,A.abort()}l&&(l.aborted?k(Rs):l.addEventListener("abort",()=>k(Rs),{once:!0}));let L=(async function(){let E;try{let x=n?.condition?.(c,{getState:d,extra:f});if(na(x)&&(x=await x),x===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let q=new Promise((_,T)=>{I=()=>{T({name:"AbortError",message:v||"Aborted"})},A.signal.addEventListener("abort",I,{once:!0})});u(i(g,c,n?.getPendingMeta?.({requestId:g,arg:c},{getState:d,extra:f}))),E=await Promise.race([q,Promise.resolve(r(c,{dispatch:u,getState:d,extra:f,requestId:g,signal:A.signal,abort:k,rejectWithValue:((_,T)=>new $r(_,T)),fulfillWithValue:((_,T)=>new Os(_,T))})).then(_=>{if(_ instanceof $r)throw _;return _ instanceof Os?s(_.payload,g,c,_.meta):s(_,g,c)})])}catch(x){E=x instanceof $r?o(null,g,c,x.payload,x.meta):o(x,g,c)}finally{I&&A.signal.removeEventListener("abort",I)}return n&&!n.dispatchConditionRejection&&o.match(E)&&E.meta.condition||u(E),E})();return Object.assign(L,{abort:k,requestId:g,arg:c,unwrap(){return L.then(ra)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Xo(o,s),typePrefix:t})}return e.withTypes=()=>e,e})();function ra(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function na(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ns=Symbol.for("rtk-slice-createasyncthunk"),Dc={[Ns]:ta};function sa(e,t){return`${e}/${t}`}function ia({creators:e}={}){let t=e?.asyncThunk?.[Ns];return function(n){let{name:s,reducerPath:i=s}=n;if(!s)throw new Error(ee(11));typeof process<"u";let o=(typeof n.reducers=="function"?n.reducers(aa()):n.reducers)||{},a=Object.keys(o),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(E,S){let x=typeof E=="string"?E:E.type;if(!x)throw new Error(ee(12));if(x in c.sliceCaseReducersByType)throw new Error(ee(13));return c.sliceCaseReducersByType[x]=S,l},addMatcher(E,S){return c.sliceMatchers.push({matcher:E,reducer:S}),l},exposeAction(E,S){return c.actionCreators[E]=S,l},exposeCaseReducer(E,S){return c.sliceCaseReducersByName[E]=S,l}};a.forEach(E=>{let S=o[E],x={reducerName:E,type:sa(s,E),createNotation:typeof n.reducers=="function"};la(S)?da(x,S,l,t):ca(x,S,l)});function u(){let[E={},S=[],x=void 0]=typeof n.extraReducers=="function"?Ms(n.extraReducers):[n.extraReducers],q={...E,...c.sliceCaseReducersByType};return Go(n.initialState,_=>{for(let T in q)_.addCase(T,q[T]);for(let T of c.sliceMatchers)_.addMatcher(T.matcher,T.reducer);for(let T of S)_.addMatcher(T.matcher,T.reducer);x&&_.addDefaultCase(x)})}let d=E=>E,f=new Map,g=new WeakMap,A;function I(E,S){return A||(A=u()),A(E,S)}function v(){return A||(A=u()),A.getInitialState()}function k(E,S=!1){function x(_){let T=_[E];return typeof T>"u"&&S&&(T=Dt(g,x,v)),T}function q(_=d){let T=Dt(f,S,()=>new WeakMap);return Dt(T,_,()=>{let rn={};for(let[to,ro]of Object.entries(n.selectors??{}))rn[to]=oa(ro,_,()=>Dt(g,_,v),S);return rn})}return{reducerPath:E,getSelectors:q,get selectors(){return q(x)},selectSlice:x}}let L={name:s,reducer:I,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:v,...k(i),injectInto(E,{reducerPath:S,...x}={}){let q=S??i;return E.inject({reducerPath:q,reducer:I},x),{...L,...k(q,!0)}}};return L}}function oa(e,t,r,n){function s(i,...o){let a=t(i);return typeof a>"u"&&n&&(a=r()),e(a,...o)}return s.unwrapped=e,s}var Ds=ia();function aa(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function ca({type:e,reducerName:t,createNotation:r},n,s){let i,o;if("reducer"in n){if(r&&!ua(n))throw new Error(ee(17));i=n.reducer,o=n.prepare}else i=n;s.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?se(e,o):se(e))}function la(e){return e._reducerDefinitionType==="asyncThunk"}function ua(e){return e._reducerDefinitionType==="reducerWithPrepare"}function da({type:e,reducerName:t},r,n,s){if(!s)throw new Error(ee(18));let{payloadCreator:i,fulfilled:o,pending:a,rejected:c,settled:l,options:u}=r,d=s(e,i,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),a&&n.addCase(d.pending,a),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||Pt,pending:a||Pt,rejected:c||Pt,settled:l||Pt})}function Pt(){}var Ps="listener",Ls="completed",Fs="cancelled",Pc=`task-${Fs}`,Lc=`task-${Ls}`,Fc=`${Ps}-${Fs}`,Uc=`${Ps}-${Ls}`;var{assign:Us}=Object;var Br="listenerMiddleware";var pa=Us(se(`${Br}/add`),{withTypes:()=>pa}),$c=se(`${Br}/removeAll`),fa=Us(se(`${Br}/remove`),{withTypes:()=>fa});function ee(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ha=ut(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,n,s){this.eventBus.addEventListener(r,n,s)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,s){this.eventBus.removeEventListener(r,n,s)}}}),Lt=class extends ha(Object){};window.ftReduxStores||(window.ftReduxStores={});var $s=class e extends Lt{static get(t){var r;let n=typeof t=="string"?t:t.name,s=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(yt(i))return i;if(s==null)return;let o=Ds({...s,reducers:(r=s.reducers)!==null&&r!==void 0?r:{}}),a=ks({reducer:(c,l)=>{if(l.type==="CLEAR_FT_REDUX_STORE"){let u=Ke(o.getInitialState());for(let d of l.keeping)u[d]=(c??u)[d];return u}else if(typeof l.type=="string"&&l.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...c,...l.overwrites};return o.reducer(c,l)}});return window.ftReduxStores[s.name]=new e(o,a,s.eventBus)}constructor(t,r,n){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new dt,this.injectInto=(i,o)=>this.reduxSlice.injectInto(i,o),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let s=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,o,a)=>{let c=o,l=i[c];return l?(...u)=>{let d=l(...u.map(s));return this.reduxStore.dispatch(d),d}:u=>{let d=c,f=this.getState()[d];Ie(f,u)||this.setState({[d]:s(u)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Ft=class{static format(t,r,n,s,i){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(n,s,!!i)):this.getIntlDateTime(t,r,n,s,!!i)}static getMomentDateFormat(t,r,n){return n?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,n,s,i){let o=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(o),c=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o);return i?c:s?`${a} ${c}`:a}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Ut=m(C()),ya="ft-app-info",Se=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Se.eventName="authentication-change";var et=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};et.eventName="ui-locale-changed";var ma={session:(e,t)=>{(0,Ut.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>y.dispatchEvent(new Se(t.payload)),0))}},y=Ut.FtReduxStore.get({name:ya,reducers:ma,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 Bs=m(C()),$t=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},yl=(0,Bs.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(y)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var s,i;return((i=(s=this.metadataDescriptors.find(a=>a.key===n))===null||s===void 0?void 0:s.date)!==null&&i!==void 0?i:!1)?a=>Ft.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $t([(0,Hr.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),$t([(0,Hr.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),$t([Sr({store:y.name,selector:r=>{var n,s;return(s=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&s!==void 0?s:[]}})],t.prototype,"metadataDescriptors",void 0),$t([Sr({store:y.name})],t.prototype,"uiLocale",void 0),t});var Hs;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Hs||(Hs={}));var js;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(js||(js={}));var Vs;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Vs||(Vs={}));var zs;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(zs||(zs={}));var Ks;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ks||(Ks={}));var qs;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(qs||(qs={}));var Ws;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(Ws||(Ws={}));var Gs;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(Gs||(Gs={}));var Ys;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(Ys||(Ys={}));var Xs;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Xs||(Xs={}));var Js;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Js||(Js={}));var Qs;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(Qs||(Qs={}));var Zs;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Zs||(Zs={}));var ei;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ei||(ei={}));var ti;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ti||(ti={}));var ri;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ri||(ri={}));var ni;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(ni||(ni={}));var si;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(si||(si={}));var ii;(function(e){e.ASC="ASC",e.DESC="DESC"})(ii||(ii={}));var oi;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(oi||(oi={}));var ai;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(ai||(ai={}));var ci;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ci||(ci={}));var li;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(li||(li={}));var ui;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(ui||(ui={}));var di;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(di||(di={}));var pi;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(pi||(pi={}));var fi;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(fi||(fi={}));var hi;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(hi||(hi={}));var w;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(w||(w={}));var H;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(H||(H={}));var yi;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(yi||(yi={}));var mi;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(mi||(mi={}));var gi;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(gi||(gi={}));var Ei;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Ei||(Ei={}));var vi;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(vi||(vi={}));var Ai;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ai||(Ai={}));var Si;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Si||(Si={}));var xi;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(xi||(xi={}));var bi;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(bi||(bi={}));var _i;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(_i||(_i={}));var Ci;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Ci||(Ci={}));var Ti;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Ti||(Ti={}));var ga={[w.PERSONAL_BOOK_SHARE_USER]:[w.PERSONAL_BOOK_USER],[w.HTML_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.PDF_EXPORT_USER]:[w.PERSONAL_BOOK_USER],[w.KHUB_ADMIN]:[w.CONTENT_PUBLISHER],[w.ADMIN]:[w.KHUB_ADMIN,w.USERS_ADMIN,w.PORTAL_ADMIN,w.BEHAVIOR_DATA_USER],[w.GENERATIVE_AI_EXPORT_USER]:[w.GENERATIVE_AI_USER]};function wi(e,t){return e===t||(ga[e]??[]).some(r=>wi(r,t))}function jr(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>wi(n,t))}function Oi(e,...t){return e==null?!1:t.some(r=>jr(e,r))}var zt=m(C());var Vr=m(C());var xe=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:n}=y.getState(),s=t??n;if(r&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,s,!0)}static await(t){return new Promise(r=>{let n=e.get(t);if(n)r(n);else{let s=y.subscribe(()=>{n=e.get(t),n&&(s(),r(n))})}})}};var Pe=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:xe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xe.await()}};var $=class extends Pe{constructor(t=!0,r){var n;super(r),this.sortObjectFields=(i,o)=>typeof o!="object"||o==null||Array.isArray(o)?o:Object.fromEntries(Object.entries(o).sort(([a],[c])=>a.localeCompare(c)));let s=this.constructor;s.commonCache=(n=s.commonCache)!==null&&n!==void 0?n:new Vr.CacheRegistry,this.cache=t?s.commonCache:new Vr.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var Bt=class extends ${async listMySearches(){let{session:t}=y.getState();return jr(t,w.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ht=class extends ${async listMyBookmarks(){let t=y.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var jt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=y.getState().session;return!!t?.sessionAuthenticated}};var Vt=class extends ${constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=y.getState().session;return!!t?.sessionAuthenticated}};var Ea="ft-user-assets",va={setAssetCount:(e,t)=>{let{userAssetType:r,count:n}=t.payload.assetCount;e.assetCounts.allAsset[r]=n},clearAssetCount:e=>{Object.values(H).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:n,asset:s}=t.payload;Kr(e,r,[...zr(e,r),s]),Ri(e,r,1,n),Ii(e,s)},editAsset:(e,t)=>{let{assetType:r,asset:n}=t.payload;Kr(e,r,zr(e,r).map(s=>s.id===n.id?n:s)),Ii(e,n)},removeAsset:(e,t)=>{let{assetType:r,mapId:n,assetId:s}=t.payload;Kr(e,r,zr(e,r).filter(i=>i.id!==s)),Ri(e,r,-1,n)}},ki={[H.SEARCHES]:"savedSearches",[H.BOOKMARKS]:"bookmarks",[H.BOOKS]:void 0,[H.COLLECTIONS]:void 0},zr=(e,t)=>{var r;let n=ki[t];return n?(r=e[n])!==null&&r!==void 0?r:[]:[]},Kr=(e,t,r)=>{let n=ki[t];n&&(e[n]=r)},Ri=(e,t,r,n)=>{let s=e.assetCounts.allAsset[t];if(s!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,s+r),t===H.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},Ii=(e,t)=>{let r=e.assetLabels.map(s=>s.title),n=t.labels.filter(s=>!r.includes(s)).map(s=>({title:s}));e.assetLabels.push(...n)},D=zt.FtReduxStore.get({name:Ea,reducers:va,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(H).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),qr=class{constructor(t=new jt,r=new Vt){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=y.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ht,this.savedSearchesService=new Bt,y.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=y.getState();(0,zt.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),D.actions.clearAssetCount(),D.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),D.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),D.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();D.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();D.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&D.getState().assetCounts.allAsset[t]!==r.count&&D.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&D.getState().assetCounts.bookmarkByMap[t]!==r.count&&D.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(D.getState().assetCounts.bookmarkByMap).length!==0;t===H.BOOKMARKS&&r&&D.actions.clearBookmarkCountByMap(),D.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;D.actions.bookmarks(r)}}},Aa=new qr;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Aa);var Wr=class{addCommand(t,r=!1){y.commands.add(t,r)}consumeCommand(t){return y.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new Wr;var j=m(C());var Mi,Le=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Sa=Symbol("clearAfterUnitTest"),Kt=class extends(0,j.withEventBus)($){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Mi]=()=>{this.defaultMessages={},this.cache=new j.CacheRegistry,this.listeners={}},this.currentUiLocale=y.getState().uiLocale,y.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=y.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var n;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let s={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...r};(0,j.deepEqual)(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,n;return this.fetchContext(t),(n=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,r){let n=t.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(t,r,...n){var s;let i=t.toLowerCase(),o=this.resolveContext(i);return new j.ParametrizedLabelResolver((s=this.defaultMessages[i])!==null&&s!==void 0?s:{},o).resolve(r,...n)}async fetchContext(t){let r=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(s){!(s instanceof j.CanceledPromiseError)&&r&&console.error(s)}return n}subscribe(t,r){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(r),()=>{var s;return(s=this.listeners[t])===null||s===void 0?void 0:s.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Le({loadedContexts:t})),this.dispatchEvent(new Le({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Le({loadedContexts:[t]})),this.dispatchEvent(new Le({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,j.delay)(0).then(()=>n()).catch(()=>null)))}};Mi=Sa;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Kt{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Kt{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Fe=window.FluidTopicsI18nService,qt=window.FluidTopicsCustomI18nService;var Ni=m(C()),Gr=class{highlightHtml(t,r,n){(0,Ni.highlightHtml)(t,r,n)}};window.FluidTopicsHighlightHtmlService=new Gr;var Di=m(C());var Yr=class{isDate(t){var r,n,s,i;return(i=(n=((s=(r=y.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&s!==void 0?s:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&i!==void 0?i:!1}format(t,r){var n,s,i,o;if(t==null)return"";try{return Di.DateFormatter.format(t,(n=r?.locale)!==null&&n!==void 0?n:y.getState().uiLocale,(s=r?.longFormat)!==null&&s!==void 0?s:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(o=r?.onlyTime)!==null&&o!==void 0?o:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new Yr;var Pi=m(C());var tt=class{static get(t,r){var n,s,i,o;let a=y.getState(),{lang:c,region:l}=(o=(s=(n=a.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||s===void 0?void 0:s.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Pi.SearchPlaceConverter(a.baseUrl,t??20,(i=a.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed,r??`${c}-${l}`)}};var Xr=class{urlToSearchRequest(t){return tt.get().parse(t)}searchRequestToUrl(t){return tt.get().serialize(t)}};window.FluidTopicsUrlService=new Xr;var te=m(C());var be=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};be.eventName="before-location-change";var _e=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};_e.eventName="change";var Jr=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Li=new Jr;var Wt=class e extends te.WithEventBus{static build(){return new e(window.history,Li,()=>window.location,!1)}constructor(t,r,n,s){var i,o;super(),this.history=t,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(o=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&o!==void 0?o:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(s)}setCurrentState(t,r=!1){let n=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,te.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new _e(this.currentItem())),0)}installProxies(){let t=r=>(n,s,[i,o,a])=>{let c=new be(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(c);let l=r(),u={...l===this.currentIndex?this.currentState:void 0,...i,index:l,href:c.detail.nextLocation.href};n.apply(s,[u,o,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(be.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(be.eventName,t)}addHistoryChangeListener(t){this.addEventListener(_e.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(_e.eventName,t)}currentItem(){return(0,te.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,te.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,te.deepCopy)(r.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,te.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let n=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!n)return t;let s=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(s=i),i++;return s}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var n;if(!this.hasState(t))return!1;let s=r??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=s}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Wt.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var Fi=m(X());var Ui=Fi.css`
117
+ `;var Hi=m(X()),P=m(z()),we=m(C());var Ce=m(C());function $i(e,t){let{authenticationRequired:r,session:n}=y.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Gt=class extends Pe{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var Qr=class e extends Ce.FtStateManager{static build(t){return new e(y,t)}constructor(t,r){super(),this.store=t,this.cache=new Ce.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Gt,this.cleanSessionDebouncer=new Ce.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Ce.Debouncer(500),this.apiProvider=r??(()=>xe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Se.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Se.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>$i(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new et(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}userHasAnyRole(...t){return Oi(y.getState().session,...t)}},Bi=Qr.build();var Te=class extends Event{constructor(t,r,n,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=n,this.subscribe=s??!1}};var rt=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=r;for(let{elementRef:s,callbackRef:i}of n){let o=s.deref(),a=i.deref();o===void 0||a===void 0||o.dispatchEvent(new Te(t.context,o,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],n=t.callback,s=this.pendingContextRequests.get(t.context);s===void 0&&this.pendingContextRequests.set(t.context,s={callbacks:new WeakMap,requests:[]});let i=s.callbacks.get(r);i===void 0&&s.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),s.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var R=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},b=class extends we.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=Bi,this.contextRoot=new rt}render(){return Hi.html`
118
118
  <slot></slot>
119
- `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Fe.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};b.elementDefinitions={};b.styles=Bi;R([(0,P.property)()],b.prototype,"baseUrl",void 0);R([(0,P.property)()],b.prototype,"tenantId",void 0);R([(0,P.property)()],b.prototype,"apiIntegrationIdentifier",void 0);R([(0,P.property)()],b.prototype,"apiIntegrationAppVersion",void 0);R([(0,P.property)()],b.prototype,"uiLocale",void 0);R([(0,we.jsonProperty)(null)],b.prototype,"availableUiLocales",void 0);R([(0,we.jsonProperty)(null)],b.prototype,"metadataConfiguration",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"editorMode",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"noCustom",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"openExternalDocumentInNewTab",void 0);R([(0,P.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],b.prototype,"noCustomComponent",void 0);R([(0,P.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],b.prototype,"noCustomCode",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"withManualResources",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"navigatorOnline",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"forcedOffline",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"authenticationRequired",void 0);R([(0,we.jsonProperty)([])],b.prototype,"messageContexts",void 0);R([(0,we.jsonProperty)(void 0)],b.prototype,"session",void 0);var Ki=m(C());var zi={"ft-app-context":b};(0,Ki.customElements)(zi);var Yt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?qt:Fe}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return o=>({context:this.name,key:i,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var Ue=m(C());var Gi=m(z());var Zr=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},qi=new Zr;var wa=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Oa=Symbol("i18nAttributes"),Ra=Symbol("i18nListAttributes"),Yi=Symbol("i18nProperties"),Xt=Symbol("i18nContexts"),nt=Symbol("i18nUnsubs"),Qt=(0,Ue.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?qt:Fe}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:d}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let f=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...f)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(qi.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,d,f)=>f?.context&&f.key&&i(u,d,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...u})}:f;(o=this[Oa])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[Ra])===null||a===void 0||a.forEach((u,d)=>{var f;return c[d]=(f=c[d])===null||f===void 0?void 0:f.map(g=>l(u,d,g))})}updateI18nProperties(i){var o;(o=this[Yi])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[Xt].set(c,{isCustomContext:a}),this[nt].has(c)||this[nt].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[Xt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Xt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[nt].forEach(i=>i()),this[nt].clear()}}return t=Xt,r=nt,wa([(0,Gi.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Wi=class extends Qt(Ue.FtLitElement){},Jt=class extends Qt(Ue.FtLitElementRedux){};var Xi=m(X());var Ji=Xi.css`
119
+ `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Fe.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};b.elementDefinitions={};b.styles=Ui;R([(0,P.property)()],b.prototype,"baseUrl",void 0);R([(0,P.property)()],b.prototype,"tenantId",void 0);R([(0,P.property)()],b.prototype,"apiIntegrationIdentifier",void 0);R([(0,P.property)()],b.prototype,"apiIntegrationAppVersion",void 0);R([(0,P.property)()],b.prototype,"uiLocale",void 0);R([(0,we.jsonProperty)(null)],b.prototype,"availableUiLocales",void 0);R([(0,we.jsonProperty)(null)],b.prototype,"metadataConfiguration",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"editorMode",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"noCustom",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"openExternalDocumentInNewTab",void 0);R([(0,P.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],b.prototype,"noCustomComponent",void 0);R([(0,P.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],b.prototype,"noCustomCode",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"withManualResources",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"navigatorOnline",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"forcedOffline",void 0);R([(0,P.property)({type:Boolean})],b.prototype,"authenticationRequired",void 0);R([(0,we.jsonProperty)([])],b.prototype,"messageContexts",void 0);R([(0,we.jsonProperty)(void 0)],b.prototype,"session",void 0);var Vi=m(C());var ji={"ft-app-context":b};(0,Vi.customElements)(ji);var Yt=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?qt:Fe}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(n,s)=>{let i=s;return o=>({context:this.name,key:i,custom:this.custom,args:typeof o=="function"?void 0:o,argsProvider:typeof o=="function"?o:void 0})}}),this.messages=new Proxy({},{get:(n,s)=>(...i)=>this.service.resolveMessage(this.name,s,...i)}),this.rawMessages=new Proxy({},{get:(n,s)=>this.service.resolveRawMessage(this.name,s)}),this.keys=new Proxy({},{get:(n,s)=>()=>s}),this.attributes=new Proxy({},{get:(n,s)=>()=>({context:this.name,key:s,message:this.service.resolveRawMessage(this.name,s)})})}};var Ue=m(C());var qi=m(z());var Zr=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,n]=t.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},zi=new Zr;var _a=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Ca=Symbol("i18nAttributes"),Ta=Symbol("i18nListAttributes"),Wi=Symbol("i18nProperties"),Xt=Symbol("i18nContexts"),nt=Symbol("i18nUnsubs"),Qt=(0,Ue.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?qt:Fe}i18n(i){let{context:o,key:a,message:c}=i,{custom:l,args:u,argsProvider:d}=i;if(o&&a){this.hasI18nContext(o)||this.addI18nContext(o,void 0,l);let f=u??(d?d(this):[]);return this.getI18nService(l).resolveMessage(o,a,...f)}return c}async awaitI18n(i){let{context:o,custom:a}=i;return o&&await this.getI18nService(a).prepareContext(o),this.i18n(i)}customI18n(i,o){if(zi.isI18nKey(i)){let[a,c]=i.split(".");return this.i18n({custom:!0,context:a,key:c,...o})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((o,a,c)=>i.has(a)||typeof o.argsProvider=="function"),this.updateI18nProperties(o=>typeof o.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((o,a,c)=>{var l;return((l=c?.context)===null||l===void 0?void 0:l.toLowerCase())===i}),this.updateI18nProperties(o=>o.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var o,a;let c=this,l=(u,d,f)=>f?.context&&f.key&&i(u,d,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...u})}:f;(o=this[Ca])===null||o===void 0||o.forEach((u,d)=>c[d]=l(u,d,c[d])),(a=this[Ta])===null||a===void 0||a.forEach((u,d)=>{var f;return c[d]=(f=c[d])===null||f===void 0?void 0:f.map(g=>l(u,d,g))})}updateI18nProperties(i){var o;(o=this[Wi])===null||o===void 0||o.forEach((a,c)=>{i(a,c)&&(this[c]=this.i18n(a))})}addI18nMessages(i,o,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,o,a)}addI18nContext(i,o,a){let c=(typeof i=="string"?i:i.name).toLowerCase();a=typeof i=="string"?a:i.custom,this[Xt].set(c,{isCustomContext:a}),this[nt].has(c)||this[nt].set(c,this.getI18nService(a).subscribe(c,()=>this.onI18nUpdate(c))),this.getI18nService(a).prepareContext(c,o)}hasI18nContext(i){return this[Xt].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Xt].forEach((i,o)=>this.addI18nContext(o,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[nt].forEach(i=>i()),this[nt].clear()}}return t=Xt,r=nt,_a([(0,qi.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),Ki=class extends Qt(Ue.FtLitElement){},Jt=class extends Qt(Ue.FtLitElementRedux){};var Gi=m(X());var Yi=Gi.css`
120
120
  `;var Zt=m(X()),Be=m(z()),er=m(C());var $e=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},V=class extends Jt{constructor(){super(),this.editorMode=!1,this.editorMessage="Select a context and a label key.",this.addStore(y)}render(){return!this.key||!this.context?this.editorMode?this.editorMessage:Zt.nothing:Zt.html`
121
121
  <span class="ft-i18n">
122
122
  ${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
123
123
  </span>
124
- `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};V.elementDefinitions={};V.styles=Ji;$e([(0,er.redux)()],V.prototype,"editorMode",void 0);$e([(0,Be.property)()],V.prototype,"context",void 0);$e([(0,Be.property)()],V.prototype,"key",void 0);$e([(0,er.jsonProperty)([])],V.prototype,"args",void 0);$e([(0,Be.property)()],V.prototype,"defaultMessage",void 0);$e([(0,Be.state)()],V.prototype,"editorMessage",void 0);var Zi=m(C());var Qi={"ft-i18n":V};(0,Zi.customElements)(Qi);var en=Yt.build("readerPageTitle"),eo={pageTitle:"Page title"};var tr=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Y=class extends Qt(st){constructor(){super(),this.target="current",this.editorMode=!1,this.addStore(y),this.addI18nContext(en,eo)}render(){var t,r;let n=(r=(t=this.targetPage)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:this.editorMode?en.messages.pageTitle():void 0;return n?rr.html`<ft-typography variant="title" part="text">${n}</ft-typography>`:rr.nothing}update(t){var r;if(super.update(t),t.has("currentPage")||t.has("target")){let n=this.computeOffset(this.target);if(this.currentPage&&n!=0){let s=this.currentPage.number+n;(r=this.stateManager)===null||r===void 0||r.getPage(s).then(i=>{i.number==s?this.targetPage=i:this.targetPage=void 0})}else this.targetPage=this.currentPage}}computeOffset(t){switch(t){case"next":return 1;case"previous":return-1;default:return 0}}};Y.styles=ln;Y.elementDefinitions={"ft-typography":Q};tr([(0,nr.property)()],Y.prototype,"target",void 0);tr([(0,tn.redux)({store:"reader"})],Y.prototype,"currentPage",void 0);tr([(0,nr.state)()],Y.prototype,"targetPage",void 0);tr([(0,tn.redux)({store:y.name})],Y.prototype,"editorMode",void 0);var to={"ft-reader-page-title":Y};(0,ro.customElements)(to);})();
124
+ `}update(t){var r;super.update(t),["context","key","defaultMessage"].some(n=>t.has(n))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};V.elementDefinitions={};V.styles=Yi;$e([(0,er.redux)()],V.prototype,"editorMode",void 0);$e([(0,Be.property)()],V.prototype,"context",void 0);$e([(0,Be.property)()],V.prototype,"key",void 0);$e([(0,er.jsonProperty)([])],V.prototype,"args",void 0);$e([(0,Be.property)()],V.prototype,"defaultMessage",void 0);$e([(0,Be.state)()],V.prototype,"editorMessage",void 0);var Ji=m(C());var Xi={"ft-i18n":V};(0,Ji.customElements)(Xi);var en=Yt.build("readerPageTitle"),Qi={pageTitle:"Page title"};var tr=function(e,t,r,n){var s=arguments.length,i=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i},Y=class extends Qt(st){constructor(){super(),this.target="current",this.editorMode=!1,this.addStore(y),this.addI18nContext(en,Qi)}render(){var t,r;let n=(r=(t=this.targetPage)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:this.editorMode?en.messages.pageTitle():void 0;return n?rr.html`<ft-typography variant="title" part="text">${n}</ft-typography>`:rr.nothing}update(t){var r;if(super.update(t),t.has("currentPage")||t.has("target")){let n=this.computeOffset(this.target);if(this.currentPage&&n!=0){let s=this.currentPage.number+n;(r=this.stateManager)===null||r===void 0||r.getPage(s).then(i=>{i.number==s?this.targetPage=i:this.targetPage=void 0})}else this.targetPage=this.currentPage}}computeOffset(t){switch(t){case"next":return 1;case"previous":return-1;default:return 0}}};Y.styles=ln;Y.elementDefinitions={"ft-typography":Q};tr([(0,nr.property)()],Y.prototype,"target",void 0);tr([(0,tn.redux)({store:"reader"})],Y.prototype,"currentPage",void 0);tr([(0,nr.state)()],Y.prototype,"targetPage",void 0);tr([(0,tn.redux)({store:y.name})],Y.prototype,"editorMode",void 0);var Zi={"ft-reader-page-title":Y};(0,eo.customElements)(Zi);})();
125
125
  /*! Bundled license information:
126
126
 
127
- lit-html/lit-html.js:
128
- @lit/context/lib/decorators/provide.js:
127
+ .store/lit-html-npm-3.3.3-0f054b825a/package/lit-html.js:
128
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/decorators/provide.js:
129
129
  (**
130
130
  * @license
131
131
  * Copyright 2017 Google LLC
132
132
  * SPDX-License-Identifier: BSD-3-Clause
133
133
  *)
134
134
 
135
- lit-html/static.js:
135
+ .store/lit-html-npm-3.3.3-0f054b825a/package/static.js:
136
136
  (**
137
137
  * @license
138
138
  * Copyright 2020 Google LLC
139
139
  * SPDX-License-Identifier: BSD-3-Clause
140
140
  *)
141
141
 
142
- @lit/reactive-element/css-tag.js:
143
- (**
144
- * @license
145
- * Copyright 2019 Google LLC
146
- * SPDX-License-Identifier: BSD-3-Clause
147
- *)
148
-
149
- @lit/context/lib/context-request-event.js:
150
- @lit/context/lib/create-context.js:
151
- @lit/context/lib/controllers/context-consumer.js:
152
- @lit/context/lib/value-notifier.js:
153
- @lit/context/lib/controllers/context-provider.js:
154
- @lit/context/lib/context-root.js:
142
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/context-request-event.js:
143
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/create-context.js:
144
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/controllers/context-consumer.js:
145
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/value-notifier.js:
146
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/controllers/context-provider.js:
147
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/context-root.js:
155
148
  (**
156
149
  * @license
157
150
  * Copyright 2021 Google LLC
158
151
  * SPDX-License-Identifier: BSD-3-Clause
159
152
  *)
160
153
 
161
- @lit/context/lib/decorators/consume.js:
154
+ .store/@lit-context-npm-1.1.6-2c155157c6/package/lib/decorators/consume.js:
162
155
  (**
163
156
  * @license
164
157
  * Copyright 2022 Google LLC