@fluid-topics/ftds-combobox 2.1.15 → 2.1.16

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.
@@ -2020,8 +2020,8 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
2020
2020
  position: relative;
2021
2021
  word-break: break-word;
2022
2022
  }
2023
- `;var Q1=["top","right","bottom","left"],X1=["start","end"],Si=Q1.reduce((t,e)=>t.concat(e,e+"-"+X1[0],e+"-"+X1[1]),[]),$o=Math.min,Wt=Math.max,Uo=Math.round;var st=t=>({x:t,y:t}),x3={left:"right",right:"left",bottom:"top",top:"bottom"};function J1(t,e,r){return Wt(t,$o(e,r))}function kn(t,e){return typeof t=="function"?t(e):t}function Bo(t){return t.split("-")[0]}function Vt(t){return t.split("-")[1]}function Ci(t){return t==="x"?"y":"x"}function Li(t){return t==="y"?"height":"width"}function Tn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ei(t){return Ci(Tn(t))}function e2(t,e,r){r===void 0&&(r=!1);let n=Vt(t),a=Ei(t),i=Li(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=xi(s)),[s,xi(s)]}function t2(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function xi(t){let e=Bo(t);return x3[e]+t.slice(e.length)}function S3(t){var e,r,n,a;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(a=t.left)!=null?a:0}}function r2(t){return typeof t!="number"?S3(t):{top:t,right:t,bottom:t,left:t}}function fr(t){let{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function o2(t,e,r){let{reference:n,floating:a}=t,i=Tn(e),s=Ei(e),l=Li(s),u=Bo(e),h=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,b=n[l]/2-a[l]/2,v;switch(u){case"top":v={x:m,y:n.y-a.height};break;case"bottom":v={x:m,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}let S=Vt(e);return S&&(v[s]+=b*(S==="end"?1:-1)*(r&&h?-1:1)),v}async function n2(t,e){var r;e===void 0&&(e={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:v=0}=kn(e,t),S=r2(v),O=l[b?g==="floating"?"reference":"floating":g],w=fr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(O)))==null||r?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:u})),I=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),D=await(i.isElement==null?void 0:i.isElement(k))&&await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1},V=fr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:I,offsetParent:k,strategy:u}):I);return{top:(w.top-V.top+S.top)/D.y,bottom:(V.bottom-w.bottom+S.bottom)/D.y,left:(w.left-V.left+S.left)/D.x,right:(V.right-w.right+S.right)/D.x}}var C3=50,a2=async(t,e,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:n2},u=await(s.isRTL==null?void 0:s.isRTL(e)),h=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:g}=o2(h,n,u),b=n,v=0,S={};for(let C=0;C<i.length;C++){let O=i[C];if(!O)continue;let{name:w,fn:I}=O,{x:k,y:D,data:V,reset:J}=await I({x:m,y:g,initialPlacement:n,placement:b,strategy:a,middlewareData:S,rects:h,platform:l,elements:{reference:t,floating:e}});m=k??m,g=D??g,S[w]={...S[w],...V},J&&v<C3&&(v++,typeof J=="object"&&(J.placement&&(b=J.placement),J.rects&&(h=J.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):J.rects),{x:m,y:g}=o2(h,b,u)),C=-1)}return{x:m,y:g,placement:b,strategy:a,middlewareData:S}};function L3(t,e,r){return(t?[...r.filter(a=>Vt(a)===t),...r.filter(a=>Vt(a)!==t)]:r.filter(a=>Bo(a)===a)).filter(a=>t?Vt(a)===t||(e?t2(a)!==a:!1):!0)}var i2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:h}=e,{crossAxis:m=!1,alignment:g,allowedPlacements:b=Si,autoAlignment:v=!0,...S}=kn(t,e),C=g!==void 0||b===Si?L3(g||null,v,b):b,O=((r=s.autoPlacement)==null?void 0:r.index)||0,w=C[O];if(w==null)return{};if(l!==w)return{reset:{placement:C[0]}};let I=await u.detectOverflow(e,S),k=e2(w,i,await(u.isRTL==null?void 0:u.isRTL(h.floating))),D=[I[Bo(w)],I[k[0]],I[k[1]]],V=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:D}],J=C[O+1];if(J)return{data:{index:O+1,overflows:V},reset:{placement:J}};let pt=V.map(Te=>{let Ge=Vt(Te.placement);return[Te.placement,Ge&&m?Te.overflows.slice(0,2).reduce((Pe,or)=>Pe+or,0):Te.overflows[0],Te.overflows]}).sort((Te,Ge)=>Te[1]-Ge[1]),ht=((a=pt.filter(Te=>Te[2].slice(0,Vt(Te[0])?2:3).every(Ge=>Ge<=0))[0])==null?void 0:a[0])||pt[0][0];return ht!==l?{data:{index:O+1,overflows:V},reset:{placement:ht}}:{}}}};var s2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:a,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:I=>{let{x:k,y:D}=I;return{x:k,y:D}}},...h}=kn(t,e),m={x:r,y:n},g=await i.detectOverflow(e,h),b=Tn(a),v=Ci(b),S=m[v],C=m[b],O=(I,k)=>J1(k+g[I==="y"?"top":"left"],k,k-g[I==="y"?"bottom":"right"]);s&&(S=O(v,S)),l&&(C=O(b,C));let w=u.fn({...e,[v]:S,[b]:C});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[v]:s,[b]:l}}}}}};function Dn(){return typeof window<"u"}function hr(t){return l2(t)?(t.nodeName||"").toLowerCase():"#document"}function _e(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function gt(t){var e;return(e=(l2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function l2(t){return Dn()?t instanceof Node||t instanceof _e(t).Node:!1}function je(t){return Dn()?t instanceof Element||t instanceof _e(t).Element:!1}function yt(t){return Dn()?t instanceof HTMLElement||t instanceof _e(t).HTMLElement:!1}function c2(t){return!Dn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _e(t).ShadowRoot}function Qr(t){let{overflow:e,overflowX:r,overflowY:n,display:a}=Ke(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&a!=="inline"&&a!=="contents"}function d2(t){return/^(table|td|th)$/.test(hr(t))}function Fo(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var E3=/transform|translate|scale|rotate|perspective|filter/,A3=/paint|layout|strict|content/,pr=t=>!!t&&t!=="none",Ai;function Jr(t){let e=je(t)?Ke(t):t;return pr(e.transform)||pr(e.translate)||pr(e.scale)||pr(e.rotate)||pr(e.perspective)||!$n()&&(pr(e.backdropFilter)||pr(e.filter))||E3.test(e.willChange||"")||A3.test(e.contain||"")}function u2(t){let e=zt(t);for(;yt(e)&&!mr(e);){if(Jr(e))return e;if(Fo(e))return null;e=zt(e)}return null}function $n(){return Ai==null&&(Ai=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ai}function mr(t){return/^(html|body|#document)$/.test(hr(t))}function Ke(t){return _e(t).getComputedStyle(t)}function Ho(t){return je(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zt(t){if(hr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||c2(t)&&t.host||gt(t);return c2(e)?e.host:e}function f2(t){let e=zt(t);return mr(e)?(t.ownerDocument||t).body:yt(e)&&Qr(e)?e:f2(e)}function Pn(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=f2(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),s=_e(a);if(i){let l=Un(s);return e.concat(s,s.visualViewport||[],Qr(a)?a:[],l&&r?Pn(l):[])}else return e.concat(a,Pn(a,[],r))}function Un(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function g2(t){let e=Ke(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,a=yt(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:n,l=Uo(r)!==i||Uo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function y2(t){return je(t)?t:t.contextElement}function eo(t){let e=y2(t);if(!yt(e))return st(1);let r=e.getBoundingClientRect(),{width:n,height:a,$:i}=g2(e),s=(i?Uo(r.width):r.width)/n,l=(i?Uo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var O3=st(0);function b2(t){let e=_e(t);return!$n()||!e.visualViewport?O3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function w3(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==_e(t)?!1:e}function Go(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=y2(t),s=st(1);e&&(n?je(n)&&(s=eo(n)):s=eo(t));let l=w3(i,r,n)?b2(i):st(0),u=(a.left+l.x)/s.x,h=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let b=_e(i),v=n&&je(n)?_e(n):n,S=b,C=Un(S);for(;C&&n&&v!==S;){let O=eo(C),w=C.getBoundingClientRect(),I=Ke(C),k=w.left+(C.clientLeft+parseFloat(I.paddingLeft))*O.x,D=w.top+(C.clientTop+parseFloat(I.paddingTop))*O.y;u*=O.x,h*=O.y,m*=O.x,g*=O.y,u+=k,h+=D,S=_e(C),C=Un(S)}}return fr({width:m,height:g,x:u,y:h})}function Bn(t,e){let r=Ho(t).scrollLeft;return e?e.left+r:Go(gt(t)).left+r}function v2(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Bn(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function R3(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t,i=a==="fixed",s=gt(n),l=e?Fo(e.floating):!1;if(n===s||l&&i)return r;let u={scrollLeft:0,scrollTop:0},h=st(1),m=st(0),g=yt(n);if((g||!g&&!i)&&((hr(n)!=="body"||Qr(s))&&(u=Ho(n)),g)){let v=Go(n);h=eo(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let b=s&&!g&&!i?v2(s,u):st(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-u.scrollLeft*h.x+m.x+b.x,y:r.y*h.y-u.scrollTop*h.y+m.y+b.y}}function z3(t){return Array.from(t.getClientRects())}function I3(t){let e=gt(t),r=Ho(t),n=t.ownerDocument.body,a=Wt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Wt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Bn(t),l=-r.scrollTop;return Ke(n).direction==="rtl"&&(s+=Wt(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var p2=25;function N3(t,e){let r=_e(t),n=gt(t),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=$n();(!m||m&&e==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let h=Bn(n);if(h<=0){let m=n.ownerDocument,g=m.body,b=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,S=Math.abs(n.clientWidth-g.clientWidth-v);S<=p2&&(i-=S)}else h<=p2&&(i+=h);return{width:i,height:s,x:l,y:u}}function _3(t,e){let r=Go(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=yt(t)?eo(t):st(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,u=a*i.x,h=n*i.y;return{width:s,height:l,x:u,y:h}}function h2(t,e,r){let n;if(e==="viewport")n=N3(t,r);else if(e==="document")n=I3(gt(t));else if(je(e))n=_3(e,r);else{let a=b2(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return fr(n)}function x2(t,e){let r=zt(t);return r===e||!je(r)||mr(r)?!1:Ke(r).position==="fixed"||x2(r,e)}function M3(t,e){let r=e.get(t);if(r)return r;let n=Pn(t,[],!1).filter(l=>je(l)&&hr(l)!=="body"),a=null,i=Ke(t).position==="fixed",s=i?zt(t):t;for(;je(s)&&!mr(s);){let l=Ke(s),u=Jr(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Qr(s)&&!u&&x2(t,s))?n=n.filter(m=>m!==s):a=l,s=zt(s)}return e.set(t,n),n}function k3(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t,s=[...r==="clippingAncestors"?Fo(e)?[]:M3(e,this._c):[].concat(r),n],l=h2(e,s[0],a),u=l.top,h=l.right,m=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let v=h2(e,s[b],a);u=Wt(v.top,u),h=$o(v.right,h),m=$o(v.bottom,m),g=Wt(v.left,g)}return{width:h-g,height:m-u,x:g,y:u}}function T3(t){let{width:e,height:r}=g2(t);return{width:e,height:r}}function P3(t,e,r){let n=yt(e),a=gt(e),i=r==="fixed",s=Go(t,!0,i,e),l={scrollLeft:0,scrollTop:0},u=st(0);function h(){u.x=Bn(a)}if(n||!n&&!i)if((hr(e)!=="body"||Qr(a))&&(l=Ho(e)),n){let v=Go(e,!0,i,e);u.x=v.x+e.clientLeft,u.y=v.y+e.clientTop}else a&&h();i&&!n&&a&&h();let m=a&&!n&&!i?v2(a,l):st(0),g=s.left+l.scrollLeft-u.x-m.x,b=s.top+l.scrollTop-u.y-m.y;return{x:g,y:b,width:s.width,height:s.height}}function Oi(t){return Ke(t).position==="static"}function m2(t,e){if(!yt(t)||Ke(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return gt(t)===r&&(r=r.ownerDocument.body),r}function S2(t,e){let r=_e(t);if(Fo(t))return r;if(!yt(t)){let a=zt(t);for(;a&&!mr(a);){if(je(a)&&!Oi(a))return a;a=zt(a)}return r}let n=m2(t,e);for(;n&&d2(n)&&Oi(n);)n=m2(n,e);return n&&mr(n)&&Oi(n)&&!Jr(n)?r:n||u2(t)||r}var D3=async function(t){let e=this.getOffsetParent||S2,r=this.getDimensions,n=await r(t.floating);return{reference:P3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $3(t){return Ke(t).direction==="rtl"}var Fn={convertOffsetParentRelativeRectToViewportRelativeRect:R3,getDocumentElement:gt,getClippingRect:k3,getOffsetParent:S2,getElementRects:D3,getClientRects:z3,getDimensions:T3,getScale:eo,isElement:je,isRTL:$3};var C2=i2,L2=s2;var E2=(t,e,r)=>{let n=new Map,a={platform:Fn,...r},i={...a.platform,_c:n};return a2(t,e,{...a,platform:i})};function A2(t){return U3(t)}function wi(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function U3(t){for(let e=t;e;e=wi(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=wi(t);e;e=wi(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Jr(r)||e.tagName==="BODY"))return e}return null}async function O2(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},E2(t,e,{strategy:n.strategy,platform:{...Fn,getOffsetParent:a=>Fn.getOffsetParent(a,A2)},middleware:[L2({crossAxis:!0}),C2({allowedPlacements:[n.placement]})]})}var ho=x(N());var Ji=x(ee());var w2=x(ee(),1);var Ri=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function R2(t,e){return(0,w2.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Wo(t);try{return JSON.parse(r)}catch{return Wo(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Vo,...e??{}})}function B3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Hn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Hn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(t);if(r=i.length,r!==a(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!Hn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Hn(t,e){try{return B3(t,e)}catch{return!1}}function Vo(t,e){return!Hn(t,e)}function Wo(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Gn(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let a=e(n);return a[t]=!0,a}}var z2=x(ee(),1);var zi=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:Vo,attribute:!1,...e};(0,z2.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(l=>l[n]),store:e.store})}};var Wn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var gr=x(ee(),1);var Vn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);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 N2=x(B(),1);var jn=globalThis,F3=jn.ShadowRoot&&(jn.ShadyCSS===void 0||jn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var I2=(t,e)=>{if(F3)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),a=jn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,t.appendChild(n)}};var Kn=class extends N2.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return I2(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){Ri(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function _2(t,e,...r){var n;let a=t.querySelector(e);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var ro=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},P2,M2=Symbol("constructorPrototype"),k2=Symbol("constructorName"),D2=Symbol("exportpartsDebouncer"),T2=Symbol("dynamicDependenciesLoaded"),to=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};to.eventName="exportparts-updated";var bt=class extends Kn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[P2]=new Vn(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[D2].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.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[k2]=this.constructor.name,this[M2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[k2]&&Object.setPrototypeOf(this,this[M2])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[T2]||(r[T2]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(to.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(to.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new to)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=_2(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,a;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(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}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(e){var r,n,a,i,s,l;let u=b=>b!=null&&b.trim().length>0,h=e.filter(u).map(b=>b.trim());if(h.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],S=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],C=[...v,...S].filter(u).map(O=>O.trim());for(let O of C)m.add(O)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>h.map(v=>`${b}:${v}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};P2=D2;ro([(0,gr.property)()],bt.prototype,"exportpartsPrefix",void 0);ro([R2([])],bt.prototype,"exportpartsPrefixes",void 0);ro([(0,gr.property)({reflect:!0})],bt.prototype,"exportparts",void 0);ro([(0,gr.property)()],bt.prototype,"customStylesheet",void 0);ro([(0,gr.property)()],bt.prototype,"elementToFocus",void 0);ro([(0,gr.state)()],bt.prototype,"useAdoptedStyleSheets",void 0);function Zn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var jo=Symbol("internalReduxEventsUnsubscribers"),jt=Symbol("internalStoresUnsubscribers"),yr=Symbol("internalStores"),H3=Gn(Symbol("withRedux"),function(t){var e,r,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[yr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[yr].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[yr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[yr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[yr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let h=this.getStore(s.store);h&&(s.store?this[jt].has(s.store):this[jt].size>0)&&(this[l]=s.selector(h.getState(),this))}})}subscribeToStore(s,l){var u;this[jt].set(s,l.subscribe(()=>this.updateFromStores())),this[jo].set(s,[]),Zn(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((h,m)=>{if(typeof this[m]=="function"&&(!h.store||l.name===h.store)){let g=b=>this[m](b);l.addEventListener(h.eventName,g),this[jo].get(s).push(()=>l.removeEventListener(h.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[jt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[jt].has(s)&&this[jt].get(s)(),this[jt].delete(s),(l=this[jo].get(s))===null||l===void 0||l.forEach(u=>u()),this[jo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=jt,r=yr,n=jo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$2=class extends H3(bt){};function Ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function It(t){return!!t&&!!t[re]}function ct(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Y3})(t)||Array.isArray(t)||!!t[V2]||!!(!((e=t.constructor)===null||e===void 0)&&e[V2])||$i(t)||Ui(t))}function br(t,e,r){r===void 0&&(r=!1),ao(t)===0?(r?Object.keys:no)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function ao(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:$i(t)?2:Ui(t)?3:0}function oo(t,e){return ao(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function G3(t,e){return ao(t)===2?t.get(e):t[e]}function j2(t,e,r){var n=ao(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function K2(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function $i(t){return Z3&&t instanceof Map}function Ui(t){return q3&&t instanceof Set}function Kt(t){return t.o||t.t}function Bi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Y2(t);delete e[re];for(var r=no(e),n=0;n<r.length;n++){var a=r[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Fi(t,e){return e===void 0&&(e=!1),Hi(t)||It(t)||!ct(t)||(ao(t)>1&&(t.set=t.add=t.clear=t.delete=W3),Object.freeze(t),e&&br(t,(function(r,n){return Fi(n,!0)}),!0)),t}function W3(){Ze(2)}function Hi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function vt(t){var e=Di[t];return e||Ze(18,t),e}function V3(t,e){Di[t]||(Di[t]=e)}function ki(){return Zo}function Ii(t,e){e&&(vt("Patches"),t.u=[],t.s=[],t.v=e)}function qn(t){Ti(t),t.p.forEach(j3),t.p=null}function Ti(t){t===Zo&&(Zo=t.l)}function U2(t){return Zo={p:[],l:Zo,h:t,m:!0,_:0}}function j3(t){var e=t[re];e.i===0||e.i===1?e.j():e.g=!0}function Ni(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||vt("ES5").S(e,t,n),n?(r[re].P&&(qn(e),Ze(4)),ct(t)&&(t=Yn(e,t),e.l||Xn(e,t)),e.u&&vt("Patches").M(r[re].t,t,e.u,e.s)):t=Yn(e,r,[]),qn(e),e.u&&e.v(e.u,e.s),t!==q2?t:void 0}function Yn(t,e,r){if(Hi(e))return e;var n=e[re];if(!n)return br(e,(function(l,u){return B2(t,n,e,l,u,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return Xn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Bi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),br(i,(function(l,u){return B2(t,n,a,l,u,r,s)})),Xn(t,a,!1),r&&t.u&&vt("Patches").N(n,r,t.u,t.s)}return n.o}function B2(t,e,r,n,a,i,s){if(It(a)){var l=Yn(t,a,i&&e&&e.i!==3&&!oo(e.R,n)?i.concat(n):void 0);if(j2(r,n,l),!It(l))return;t.m=!1}else s&&r.add(a);if(ct(a)&&!Hi(a)){if(!t.h.D&&t._<1)return;Yn(t,a),e&&e.A.l||Xn(t,a)}}function Xn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Fi(e,r)}function _i(t,e){var r=t[re];return(r?Kt(r):t)[e]}function F2(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Zt(t){t.P||(t.P=!0,t.l&&Zt(t.l))}function Mi(t){t.o||(t.o=Bi(t.t))}function Pi(t,e,r){var n=$i(e)?vt("MapSet").F(e,r):Ui(e)?vt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ki(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,h=qo;s&&(u=[l],h=Ko);var m=Proxy.revocable(u,h),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b})(e,r):vt("ES5").J(e,r);return(r?r.A:ki()).p.push(n),n}function K3(t){return It(t)||Ze(22,t),(function e(r){if(!ct(r))return r;var n,a=r[re],i=ao(r);if(a){if(!a.P&&(a.i<4||!vt("ES5").K(a)))return a.t;a.I=!0,n=H2(r,i),a.I=!1}else n=H2(r,i);return br(n,(function(s,l){a&&G3(a.t,s)===l||j2(n,s,e(l))})),i===3?new Set(n):n})(t)}function H2(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Bi(t)}function Z2(){function t(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var h=this[re];return qo.get(h,s)},set:function(h){var m=this[re];qo.set(m,s,h)}},u}function e(s){for(var l=s.length-1;l>=0;l--){var u=s[l][re];if(!u.P)switch(u.i){case 5:n(u)&&Zt(u);break;case 4:r(u)&&Zt(u)}}}function r(s){for(var l=s.t,u=s.k,h=no(u),m=h.length-1;m>=0;m--){var g=h[m];if(g!==re){var b=l[g];if(b===void 0&&!oo(l,g))return!0;var v=u[g],S=v&&v[re];if(S?S.t!==b:!K2(v,b))return!0}}var C=!!l[re];return h.length!==no(l).length+(C?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var h=0;h<l.length;h++)if(!l.hasOwnProperty(h))return!0;return!1}function a(s){s.g&&Ze(3,JSON.stringify(Kt(s)))}var i={};V3("ES5",{J:function(s,l){var u=Array.isArray(s),h=(function(g,b){if(g){for(var v=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(v,""+S,t(S,!0));return v}var C=Y2(b);delete C[re];for(var O=no(C),w=0;w<O.length;w++){var I=O[w];C[I]=t(I,g||!!C[I].enumerable)}return Object.create(Object.getPrototypeOf(b),C)})(u,s),m={i:u?5:4,A:l?l.A:ki(),P:!1,I:!1,R:{},l,t:s,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,re,{value:m,writable:!0}),h},S:function(s,l,u){u?It(l)&&l[re].A===s&&e(s.p):(s.u&&(function h(m){if(m&&typeof m=="object"){var g=m[re];if(g){var b=g.t,v=g.k,S=g.R,C=g.i;if(C===4)br(v,(function(D){D!==re&&(b[D]!==void 0||oo(b,D)?S[D]||h(v[D]):(S[D]=!0,Zt(g)))})),br(b,(function(D){v[D]!==void 0||oo(v,D)||(S[D]=!1,Zt(g))}));else if(C===5){if(n(g)&&(Zt(g),S.length=!0),v.length<b.length)for(var O=v.length;O<b.length;O++)S[O]=!1;else for(var w=b.length;w<v.length;w++)S[w]=!0;for(var I=Math.min(v.length,b.length),k=0;k<I;k++)v.hasOwnProperty(k)||(S[k]=!0),S[k]===void 0&&h(v[k])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var G2,Zo,Gi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Z3=typeof Map<"u",q3=typeof Set<"u",W2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",q2=Gi?Symbol.for("immer-nothing"):((G2={})["immer-nothing"]=!0,G2),V2=Gi?Symbol.for("immer-draftable"):"__$immer_draftable",re=Gi?Symbol.for("immer-state"):"__$immer_state";var Y3=""+Object.prototype.constructor,no=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Y2=Object.getOwnPropertyDescriptors||function(t){var e={};return no(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Di={},qo={get:function(t,e){if(e===re)return t;var r=Kt(t);if(!oo(r,e))return(function(a,i,s){var l,u=F2(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(t,r,e);var n=r[e];return t.I||!ct(n)?n:n===_i(t.t,e)?(Mi(t),t.o[e]=Pi(t.A.h,n,t)):n},has:function(t,e){return e in Kt(t)},ownKeys:function(t){return Reflect.ownKeys(Kt(t))},set:function(t,e,r){var n=F2(Kt(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=_i(Kt(t),e),i=a?.[re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(K2(r,a)&&(r!==void 0||oo(t.t,e)))return!0;Mi(t),Zt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return _i(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Mi(t),Zt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Kt(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ze(12)}},Ko={};br(qo,(function(t,e){Ko[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ko.deleteProperty=function(t,e){return Ko.set.call(this,t,e,void 0)},Ko.set=function(t,e,r){return qo.set.call(this,t[0],e,r,t[0])};var X3=(function(){function t(r){var n=this;this.O=W2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(C){var O=this;C===void 0&&(C=l);for(var w=arguments.length,I=Array(w>1?w-1:0),k=1;k<w;k++)I[k-1]=arguments[k];return u.produce(C,(function(D){var V;return(V=i).call.apply(V,[O,D].concat(I))}))}}var h;if(typeof i!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),ct(a)){var m=U2(n),g=Pi(n,a,void 0),b=!0;try{h=i(g),b=!1}finally{b?qn(m):Ti(m)}return typeof Promise<"u"&&h instanceof Promise?h.then((function(C){return Ii(m,s),Ni(C,m)}),(function(C){throw qn(m),C})):(Ii(m,s),Ni(h,m))}if(!a||typeof a!="object"){if((h=i(a))===void 0&&(h=a),h===q2&&(h=void 0),n.D&&Fi(h,!0),s){var v=[],S=[];vt("Patches").M(a,h,v,S),s(v,S)}return h}Ze(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(h){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(h,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(h,m){s=h,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(h){return[h,s,l]})):[u,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){ct(r)||Ze(8),It(r)&&(r=K3(r));var n=U2(this),a=Pi(this,r,void 0);return a[re].C=!0,Ti(n),a},e.finishDraft=function(r,n){var a=r&&r[re],i=a.A;return Ii(i,n),Ni(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!W2&&Ze(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=vt("Patches").$;return It(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Ue=new X3,Q3=Ue.produce,Ky=Ue.produceWithPatches.bind(Ue),Zy=Ue.setAutoFreeze.bind(Ue),qy=Ue.setUseProxies.bind(Ue),Yy=Ue.applyPatches.bind(Ue),Xy=Ue.createDraft.bind(Ue),Qy=Ue.finishDraft.bind(Ue),Qn=Q3;function vr(t){"@babel/helpers - typeof";return vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(t)}function X2(t,e){if(vr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Q2(t){var e=X2(t,"string");return vr(e)=="symbol"?e:e+""}function J2(t,e,r){return(e=Q2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ed(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Wi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ed(Object(r),!0).forEach(function(n){J2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Le(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var td=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Vi=function(){return Math.random().toString(36).substring(7).split("").join(".")},Jn={INIT:"@@redux/INIT"+Vi(),REPLACE:"@@redux/REPLACE"+Vi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Vi()}};function J3(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ji(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Le(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Le(1));return r(ji)(t,e)}if(typeof t!="function")throw new Error(Le(2));var a=t,i=e,s=[],l=s,u=!1;function h(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(Le(3));return i}function g(C){if(typeof C!="function")throw new Error(Le(4));if(u)throw new Error(Le(5));var O=!0;return h(),l.push(C),function(){if(O){if(u)throw new Error(Le(6));O=!1,h();var I=l.indexOf(C);l.splice(I,1),s=null}}}function b(C){if(!J3(C))throw new Error(Le(7));if(typeof C.type>"u")throw new Error(Le(8));if(u)throw new Error(Le(9));try{u=!0,i=a(i,C)}finally{u=!1}for(var O=s=l,w=0;w<O.length;w++){var I=O[w];I()}return C}function v(C){if(typeof C!="function")throw new Error(Le(10));a=C,b({type:Jn.REPLACE})}function S(){var C,O=g;return C={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Le(11));function k(){I.next&&I.next(m())}k();var D=O(k);return{unsubscribe:D}}},C[td]=function(){return this},C}return b({type:Jn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:v},n[td]=S,n}function e6(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:Jn.INIT});if(typeof n>"u")throw new Error(Le(12));if(typeof r(void 0,{type:Jn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Le(13))})}function rd(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{e6(r)}catch(u){l=u}return function(h,m){if(h===void 0&&(h={}),l)throw l;if(0)var g;for(var b=!1,v={},S=0;S<i.length;S++){var C=i[S],O=r[C],w=h[C],I=O(w,m);if(typeof I>"u"){var k=m&&m.type;throw new Error(Le(14))}v[C]=I,b=b||I!==w}return b=b||i.length!==Object.keys(h).length,b?v:h}}function io(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function od(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Le(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(u){return u(s)});return i=io.apply(void 0,l)(a.dispatch),Wi(Wi({},a),{},{dispatch:i})}}}function nd(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var ad=nd();ad.withExtraArgument=nd;var Ki=ad;var dd=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),t6=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(h){return function(m){return u([h,m])}}function u(h){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=h[0]&2?a.return:h[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,h[1])).done)return i;switch(a=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,a=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){r.label=h[1];break}if(h[0]===6&&r.label<i[1]){r.label=i[1],i=h;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(h);break}i[2]&&r.ops.pop(),r.trys.pop();continue}h=e.call(t,r)}catch(m){h=[6,m],a=0}finally{n=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},so=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},r6=Object.defineProperty,o6=Object.defineProperties,n6=Object.getOwnPropertyDescriptors,id=Object.getOwnPropertySymbols,a6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,sd=function(t,e,r){return e in t?r6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},qt=function(t,e){for(var r in e||(e={}))a6.call(e,r)&&sd(t,r,e[r]);if(id)for(var n=0,a=id(e);n<a.length;n++){var r=a[n];i6.call(e,r)&&sd(t,r,e[r])}return t},Zi=function(t,e){return o6(t,n6(e))},s6=function(t,e,r){return new Promise(function(n,a){var i=function(u){try{l(r.next(u))}catch(h){a(h)}},s=function(u){try{l(r.throw(u))}catch(h){a(h)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((r=r.apply(t,e)).next())})};var c6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?io:io.apply(null,arguments)},g9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function l6(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Yt(t,e){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return qt(qt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var d6=(function(t){dd(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,so([void 0],r[0].concat(this)))):new(e.bind.apply(e,so([void 0],r.concat(this))))},e})(Array),u6=(function(t){dd(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,so([void 0],r[0].concat(this)))):new(e.bind.apply(e,so([void 0],r.concat(this))))},e})(Array);function Xi(t){return ct(t)?Qn(t,function(){}):t}function f6(t){return typeof t=="boolean"}function p6(){return function(e){return h6(e)}}function h6(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,l=t.actionCreatorCheck,u=l===void 0?!0:l,h=new d6;if(r&&(f6(r)?h.push(Ki):h.push(Ki.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var g;if(u)var b}return h}var qi=!0;function ud(t){var e=p6(),r=t||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?e():i,l=r.devTools,u=l===void 0?!0:l,h=r.preloadedState,m=h===void 0?void 0:h,g=r.enhancers,b=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(l6(a))v=rd(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=s;if(typeof S=="function"&&(S=S(e),!qi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qi&&S.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=od.apply(void 0,S),O=io;u&&(O=c6(qt({trace:!qi},typeof u=="object"&&u)));var w=new u6(C),I=w;Array.isArray(b)?I=so([C],b):typeof b=="function"&&(I=b(w));var k=O.apply(void 0,I);return ji(v,m,k)}function fd(t){var e={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,r,n]}function m6(t){return typeof t=="function"}function g6(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?fd(e):[e,r,n],i=a[0],s=a[1],l=a[2],u;if(m6(t))u=function(){return Xi(t())};else{var h=Xi(t);u=function(){return h}}function m(g,b){g===void 0&&(g=u());var v=so([i[b.type]],s.filter(function(S){var C=S.matcher;return C(b)}).map(function(S){var C=S.reducer;return C}));return v.filter(function(S){return!!S}).length===0&&(v=[l]),v.reduce(function(S,C){if(C)if(It(S)){var O=S,w=C(O,b);return w===void 0?S:w}else{if(ct(S))return Qn(S,function(I){return C(I,b)});var w=C(S,b);if(w===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return S},g)}return m.getInitialState=u,m}function y6(t,e){return t+"/"+e}function pd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Xi(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],b=y6(e,m),v,S;"reducer"in g?(v=g.reducer,S=g.prepare):v=g,i[m]=v,s[b]=v,l[m]=S?Yt(b,S):Yt(b)});function u(){var m=typeof t.extraReducers=="function"?fd(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,v=m[1],S=v===void 0?[]:v,C=m[2],O=C===void 0?void 0:C,w=qt(qt({},b),s);return g6(r,function(I){for(var k in w)I.addCase(k,w[k]);for(var D=0,V=S;D<V.length;D++){var J=V[D];I.addMatcher(J.matcher,J.reducer)}O&&I.addDefaultCase(O)})}var h;return{name:e,reducer:function(m,g){return h||(h=u()),h(m,g)},actions:l,caseReducers:i,getInitialState:function(){return h||(h=u()),h.getInitialState()}}}var b6="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",v6=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=b6[Math.random()*64|0];return e},x6=["name","message","stack","code"],Yi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),cd=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),S6=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=x6;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},x9=(function(){function t(e,r,n){var a=Yt(e+"/fulfilled",function(m,g,b,v){return{payload:m,meta:Zi(qt({},v||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Yt(e+"/pending",function(m,g,b){return{payload:void 0,meta:Zi(qt({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Yt(e+"/rejected",function(m,g,b,v,S){return{payload:v,error:(n&&n.serializeError||S6)(m||"Rejected"),meta:Zi(qt({},S||{}),{arg:b,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function h(m){return function(g,b,v){var S=n?.idGenerator?n.idGenerator(m):v6(),C=new u,O,w=!1;function I(D){O=D,C.abort()}var k=(function(){return s6(this,null,function(){var D,V,J,pt,rr,ht,Te;return t6(this,function(Ge){switch(Ge.label){case 0:return Ge.trys.push([0,4,,5]),pt=(D=n?.condition)==null?void 0:D.call(n,m,{getState:b,extra:v}),L6(pt)?[4,pt]:[3,2];case 1:pt=Ge.sent(),Ge.label=2;case 2:if(pt===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,rr=new Promise(function(Pe,or){return C.signal.addEventListener("abort",function(){return or({name:"AbortError",message:O||"Aborted"})})}),g(i(S,m,(V=n?.getPendingMeta)==null?void 0:V.call(n,{requestId:S,arg:m},{getState:b,extra:v}))),[4,Promise.race([rr,Promise.resolve(r(m,{dispatch:g,getState:b,extra:v,requestId:S,signal:C.signal,abort:I,rejectWithValue:function(Pe,or){return new Yi(Pe,or)},fulfillWithValue:function(Pe,or){return new cd(Pe,or)}})).then(function(Pe){if(Pe instanceof Yi)throw Pe;return Pe instanceof cd?a(Pe.payload,S,m,Pe.meta):a(Pe,S,m)})])];case 3:return J=Ge.sent(),[3,5];case 4:return ht=Ge.sent(),J=ht instanceof Yi?s(null,S,m,ht.payload,ht.meta):s(ht,S,m),[3,5];case 5:return Te=n&&!n.dispatchConditionRejection&&s.match(J)&&J.meta.condition,Te||g(J),[2,J]}})})})();return Object.assign(k,{abort:I,requestId:S,arg:m,unwrap:function(){return k.then(C6)}})}}return Object.assign(h,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function C6(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function L6(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var hd="listener",md="completed",gd="cancelled",S9="task-"+gd,C9="task-"+md,L9=hd+"-"+gd,E9=hd+"-"+md;var Qi="listenerMiddleware";var A9=Yt(Qi+"/add"),O9=Yt(Qi+"/removeAll"),w9=Yt(Qi+"/remove");var ld,R9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(ld||(ld=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},E6=function(t){return function(e){setTimeout(e,t)}},z9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:E6(10);Z2();var A6=Gn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),ea=class extends A6(Object){};window.ftReduxStores||(window.ftReduxStores={});var yd=class t extends ea{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Zn(i))return i;if(a==null)return;let s=pd({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=ud({reducer:(u,h)=>{if(h.type==="CLEAR_FT_REDUX_STORE"){let m=Wo(s.getInitialState());for(let g of h.keeping)m[g]=(u??m)[g];return m}else if(typeof h.type=="string"&&h.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...h.overwrites};return s.reducer(u,h)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Wn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,h=i[u];return h?(...m)=>{let g=h(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ta=class{static format(e,r,n,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(e,r,n,a,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ra=x(N()),O6="ft-app-info",co=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};co.eventName="authentication-change";var Yo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Yo.eventName="ui-locale-changed";var w6={session:(t,e)=>{(0,ra.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new co(e.payload)),0))}},F=ra.FtReduxStore.get({name:O6,reducers:w6,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var bd=x(N()),oa=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ob=(0,bd.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(F)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>ta.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return oa([(0,Ji.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),oa([(0,Ji.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),oa([zi({store:F.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),oa([zi({store:F.name})],e.prototype,"uiLocale",void 0),e});var vd;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(vd||(vd={}));var xd;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(xd||(xd={}));var Sd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Sd||(Sd={}));var Cd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Cd||(Cd={}));var Ld;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ld||(Ld={}));var Ed;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ed||(Ed={}));var Ad;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ad||(Ad={}));var Od;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Od||(Od={}));var wd;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(wd||(wd={}));var Rd;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Rd||(Rd={}));var zd;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(zd||(zd={}));var Id;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Id||(Id={}));var Nd;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Nd||(Nd={}));var _d;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(_d||(_d={}));var Md;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Md||(Md={}));var kd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(kd||(kd={}));var Td;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Td||(Td={}));var Pd;(function(t){t.ASC="ASC",t.DESC="DESC"})(Pd||(Pd={}));var Dd;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Dd||(Dd={}));var $d;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})($d||($d={}));var Ud;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ud||(Ud={}));var Bd;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Bd||(Bd={}));var Fd;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Fd||(Fd={}));var Hd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Hd||(Hd={}));var Gd;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gd||(Gd={}));var Wd;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Wd||(Wd={}));var Vd;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vd||(Vd={}));var ge;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ge||(ge={}));var qe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(qe||(qe={}));var jd;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(jd||(jd={}));var Kd;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Kd||(Kd={}));var Zd;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Zd||(Zd={}));var qd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(qd||(qd={}));var Yd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Yd||(Yd={}));var Xd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Xd||(Xd={}));var Qd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qd||(Qd={}));var Jd;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Jd||(Jd={}));var e0;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(e0||(e0={}));var t0;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(t0||(t0={}));var r0;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(r0||(r0={}));var o0;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(o0||(o0={}));var R6={[ge.PERSONAL_BOOK_SHARE_USER]:[ge.PERSONAL_BOOK_USER],[ge.HTML_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.PDF_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.KHUB_ADMIN]:[ge.CONTENT_PUBLISHER],[ge.ADMIN]:[ge.KHUB_ADMIN,ge.USERS_ADMIN,ge.PORTAL_ADMIN,ge.BEHAVIOR_DATA_USER],[ge.GENERATIVE_AI_EXPORT_USER]:[ge.GENERATIVE_AI_USER]};function n0(t,e){return t===e||(R6[t]??[]).some(r=>n0(r,e))}function a0(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>n0(n,e))}var ca=x(N());var es=x(N());var xr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=F.getState(),a=e??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let a=F.subscribe(()=>{n=t.get(e),n&&(a(),r(n))})}})}};var lo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:xr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xr.await()}};var Be=class extends lo{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new es.CacheRegistry,this.cache=e?a.commonCache:new es.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var na=class extends Be{async listMySearches(){let{session:e}=F.getState();return a0(e,ge.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var aa=class extends Be{async listMyBookmarks(){let e=F.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var ia=class extends Be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=F.getState().session;return!!e?.sessionAuthenticated}};var sa=class extends Be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=F.getState().session;return!!e?.sessionAuthenticated}};var z6="ft-user-assets",I6={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(qe).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:a}=e.payload;rs(t,r,[...ts(t,r),a]),i0(t,r,1,n),s0(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;rs(t,r,ts(t,r).map(a=>a.id===n.id?n:a)),s0(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;rs(t,r,ts(t,r).filter(i=>i.id!==a)),i0(t,r,-1,n)}},c0={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},ts=(t,e)=>{var r;let n=c0[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},rs=(t,e,r)=>{let n=c0[e];n&&(t[n]=r)},i0=(t,e,r,n)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===qe.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},s0=(t,e)=>{let r=t.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...n)},Ie=ca.FtReduxStore.get({name:z6,reducers:I6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),os=class{constructor(e=new ia,r=new sa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new aa,this.savedSearchesService=new na,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();(0,ca.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ie.actions.clearAssetCount(),Ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ie.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ie.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Ie.getState().assetCounts.allAsset[e]!==r.count&&Ie.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Ie.getState().assetCounts.bookmarkByMap[e]!==r.count&&Ie.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Ie.getState().assetCounts.bookmarkByMap).length!==0;e===qe.BOOKMARKS&&r&&Ie.actions.clearBookmarkCountByMap(),Ie.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ie.actions.bookmarks(r)}}},N6=new os;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=N6);var ns=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ns;var Ye=x(N());var l0,uo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},_6=Symbol("clearAfterUnitTest"),la=class extends(0,Ye.withEventBus)(Be){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[l0]=()=>{this.defaultMessages={},this.cache=new Ye.CacheRegistry,this.listeners={}},this.currentUiLocale=F.getState().uiLocale,F.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=F.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,Ye.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new Ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof Ye.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new uo({loadedContexts:e})),this.dispatchEvent(new uo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new uo({loadedContexts:[e]})),this.dispatchEvent(new uo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};l0=_6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends la{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends la{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var fo=window.FluidTopicsI18nService,da=window.FluidTopicsCustomI18nService;var d0=x(N()),as=class{highlightHtml(e,r,n){(0,d0.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new as;var u0=x(N());var is=class{isDate(e){var r,n,a,i;return(i=(a=((n=(r=F.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var n,a,i,s;if(e==null)return"";try{return u0.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:F.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new is;var f0=x(N());var Xo=class{static get(e,r){var n,a;let i=F.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new f0.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var ss=class{urlToSearchRequest(e){return Xo.get().parse(e)}searchRequestToUrl(e){return Xo.get().serialize(e)}};window.FluidTopicsUrlService=new ss;var Nt=x(N());var Sr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Sr.eventName="change";var cs=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},p0=new cs;var ua=class t extends Nt.WithEventBus{static build(){return new t(window.history,p0,()=>window.location,!1)}constructor(e,r,n,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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,Nt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Sr(this.currentItem())),0)}installProxies(){let e=r=>(n,a,[i,s,l])=>{let u=r(),h={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[h,s,l]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Sr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Sr.eventName,e)}currentItem(){return(0,Nt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Nt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Nt.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Nt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ua.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var h0=x(B());var m0=h0.css`
2024
- `;var b0=x(B()),Fe=x(ee()),Er=x(N());var Cr=x(N());function g0(t,e){let{authenticationRequired:r,session:n}=F.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var fa=class extends lo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var ls=class t extends Cr.FtStateManager{static build(e){return new t(F,e)}constructor(e,r){super(),this.store=e,this.cache=new Cr.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new fa,this.cleanSessionDebouncer=new Cr.Debouncer,this.reloadDebouncer=new Cr.Debouncer(500),this.apiProvider=r??(()=>xr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(co.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>g0(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){var r,n,a,i,s;this.localesConfiguration=e,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((a=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&a!==void 0?a:!1),this.store.actions.uiLanguageSetsSearchLanguage((i=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsReaderLanguage((s=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&s!==void 0?s:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Yo(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},y0=ls.build();var Lr=class extends Event{constructor(e,r,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=a??!1}};var Qo=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:n}=r;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Lr(e.context,s,l,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var Ee=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},le=class extends Er.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=y0,this.contextRoot=new Qo}render(){return b0.html`
2023
+ `;var Q1=["top","right","bottom","left"],X1=["start","end"],Si=Q1.reduce((t,e)=>t.concat(e,e+"-"+X1[0],e+"-"+X1[1]),[]),$o=Math.min,Wt=Math.max,Uo=Math.round;var st=t=>({x:t,y:t}),x3={left:"right",right:"left",bottom:"top",top:"bottom"};function J1(t,e,r){return Wt(t,$o(e,r))}function kn(t,e){return typeof t=="function"?t(e):t}function Bo(t){return t.split("-")[0]}function Vt(t){return t.split("-")[1]}function Ci(t){return t==="x"?"y":"x"}function Li(t){return t==="y"?"height":"width"}function Tn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ei(t){return Ci(Tn(t))}function e2(t,e,r){r===void 0&&(r=!1);let n=Vt(t),a=Ei(t),i=Li(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=xi(s)),[s,xi(s)]}function t2(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function xi(t){let e=Bo(t);return x3[e]+t.slice(e.length)}function S3(t){var e,r,n,a;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(n=t.bottom)!=null?n:0,left:(a=t.left)!=null?a:0}}function r2(t){return typeof t!="number"?S3(t):{top:t,right:t,bottom:t,left:t}}function fr(t){let{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function o2(t,e,r){let{reference:n,floating:a}=t,i=Tn(e),s=Ei(e),l=Li(s),u=Bo(e),h=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,b=n[l]/2-a[l]/2,v;switch(u){case"top":v={x:m,y:n.y-a.height};break;case"bottom":v={x:m,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}let S=Vt(e);return S&&(v[s]+=b*(S==="end"?1:-1)*(r&&h?-1:1)),v}async function n2(t,e){var r;e===void 0&&(e={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:b=!1,padding:v=0}=kn(e,t),S=r2(v),O=l[b?g==="floating"?"reference":"floating":g],w=fr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(O)))==null||r?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:u})),I=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),D=await(i.isElement==null?void 0:i.isElement(k))&&await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1},V=fr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:I,offsetParent:k,strategy:u}):I);return{top:(w.top-V.top+S.top)/D.y,bottom:(V.bottom-w.bottom+S.bottom)/D.y,left:(w.left-V.left+S.left)/D.x,right:(V.right-w.right+S.right)/D.x}}var C3=50,a2=async(t,e,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:n2},u=await(s.isRTL==null?void 0:s.isRTL(e)),h=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:g}=o2(h,n,u),b=n,v=0,S={};for(let C=0;C<i.length;C++){let O=i[C];if(!O)continue;let{name:w,fn:I}=O,{x:k,y:D,data:V,reset:J}=await I({x:m,y:g,initialPlacement:n,placement:b,strategy:a,middlewareData:S,rects:h,platform:l,elements:{reference:t,floating:e}});m=k??m,g=D??g,S[w]={...S[w],...V},J&&v<C3&&(v++,typeof J=="object"&&(J.placement&&(b=J.placement),J.rects&&(h=J.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):J.rects),{x:m,y:g}=o2(h,b,u)),C=-1)}return{x:m,y:g,placement:b,strategy:a,middlewareData:S}};function L3(t,e,r){return(t?[...r.filter(a=>Vt(a)===t),...r.filter(a=>Vt(a)!==t)]:r.filter(a=>Bo(a)===a)).filter(a=>t?Vt(a)===t||(e?t2(a)!==a:!1):!0)}var i2=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:h}=e,{crossAxis:m=!1,alignment:g,allowedPlacements:b=Si,autoAlignment:v=!0,...S}=kn(t,e),C=g!==void 0||b===Si?L3(g||null,v,b):b,O=((r=s.autoPlacement)==null?void 0:r.index)||0,w=C[O];if(w==null)return{};if(l!==w)return{reset:{placement:C[0]}};let I=await u.detectOverflow(e,S),k=e2(w,i,await(u.isRTL==null?void 0:u.isRTL(h.floating))),D=[I[Bo(w)],I[k[0]],I[k[1]]],V=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:D}],J=C[O+1];if(J)return{data:{index:O+1,overflows:V},reset:{placement:J}};let pt=V.map(Te=>{let Ge=Vt(Te.placement);return[Te.placement,Ge&&m?Te.overflows.slice(0,2).reduce((Pe,or)=>Pe+or,0):Te.overflows[0],Te.overflows]}).sort((Te,Ge)=>Te[1]-Ge[1]),ht=((a=pt.filter(Te=>Te[2].slice(0,Vt(Te[0])?2:3).every(Ge=>Ge<=0))[0])==null?void 0:a[0])||pt[0][0];return ht!==l?{data:{index:O+1,overflows:V},reset:{placement:ht}}:{}}}};var s2=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:n,placement:a,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:I=>{let{x:k,y:D}=I;return{x:k,y:D}}},...h}=kn(t,e),m={x:r,y:n},g=await i.detectOverflow(e,h),b=Tn(a),v=Ci(b),S=m[v],C=m[b],O=(I,k)=>J1(k+g[I==="y"?"top":"left"],k,k-g[I==="y"?"bottom":"right"]);s&&(S=O(v,S)),l&&(C=O(b,C));let w=u.fn({...e,[v]:S,[b]:C});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[v]:s,[b]:l}}}}}};function Dn(){return typeof window<"u"}function hr(t){return l2(t)?(t.nodeName||"").toLowerCase():"#document"}function _e(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function gt(t){var e;return(e=(l2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function l2(t){return Dn()?t instanceof Node||t instanceof _e(t).Node:!1}function je(t){return Dn()?t instanceof Element||t instanceof _e(t).Element:!1}function yt(t){return Dn()?t instanceof HTMLElement||t instanceof _e(t).HTMLElement:!1}function c2(t){return!Dn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _e(t).ShadowRoot}function Qr(t){let{overflow:e,overflowX:r,overflowY:n,display:a}=Ke(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&a!=="inline"&&a!=="contents"}function d2(t){return/^(table|td|th)$/.test(hr(t))}function Fo(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var E3=/transform|translate|scale|rotate|perspective|filter/,A3=/paint|layout|strict|content/,pr=t=>!!t&&t!=="none",Ai;function Jr(t){let e=je(t)?Ke(t):t;return pr(e.transform)||pr(e.translate)||pr(e.scale)||pr(e.rotate)||pr(e.perspective)||!$n()&&(pr(e.backdropFilter)||pr(e.filter))||E3.test(e.willChange||"")||A3.test(e.contain||"")}function u2(t){let e=zt(t);for(;yt(e)&&!mr(e);){if(Jr(e))return e;if(Fo(e))return null;e=zt(e)}return null}function $n(){return Ai==null&&(Ai=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ai}function mr(t){return/^(html|body|#document)$/.test(hr(t))}function Ke(t){return _e(t).getComputedStyle(t)}function Ho(t){return je(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function zt(t){if(hr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||c2(t)&&t.host||gt(t);return c2(e)?e.host:e}function f2(t){let e=zt(t);return mr(e)?(t.ownerDocument||t).body:yt(e)&&Qr(e)?e:f2(e)}function Pn(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=f2(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),s=_e(a);if(i){let l=Un(s);return e.concat(s,s.visualViewport||[],Qr(a)?a:[],l&&r?Pn(l):[])}else return e.concat(a,Pn(a,[],r))}function Un(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function g2(t){let e=Ke(t),r=parseFloat(e.width)||0,n=parseFloat(e.height)||0,a=yt(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:n,l=Uo(r)!==i||Uo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function y2(t){return je(t)?t:t.contextElement}function eo(t){let e=y2(t);if(!yt(e))return st(1);let r=e.getBoundingClientRect(),{width:n,height:a,$:i}=g2(e),s=(i?Uo(r.width):r.width)/n,l=(i?Uo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var O3=st(0);function b2(t){let e=_e(t);return!$n()||!e.visualViewport?O3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function w3(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==_e(t)?!1:e}function Go(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=y2(t),s=st(1);e&&(n?je(n)&&(s=eo(n)):s=eo(t));let l=w3(i,r,n)?b2(i):st(0),u=(a.left+l.x)/s.x,h=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let b=_e(i),v=n&&je(n)?_e(n):n,S=b,C=Un(S);for(;C&&n&&v!==S;){let O=eo(C),w=C.getBoundingClientRect(),I=Ke(C),k=w.left+(C.clientLeft+parseFloat(I.paddingLeft))*O.x,D=w.top+(C.clientTop+parseFloat(I.paddingTop))*O.y;u*=O.x,h*=O.y,m*=O.x,g*=O.y,u+=k,h+=D,S=_e(C),C=Un(S)}}return fr({width:m,height:g,x:u,y:h})}function Bn(t,e){let r=Ho(t).scrollLeft;return e?e.left+r:Go(gt(t)).left+r}function v2(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Bn(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function R3(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t,i=a==="fixed",s=gt(n),l=e?Fo(e.floating):!1;if(n===s||l&&i)return r;let u={scrollLeft:0,scrollTop:0},h=st(1),m=st(0),g=yt(n);if((g||!g&&!i)&&((hr(n)!=="body"||Qr(s))&&(u=Ho(n)),g)){let v=Go(n);h=eo(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let b=s&&!g&&!i?v2(s,u):st(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-u.scrollLeft*h.x+m.x+b.x,y:r.y*h.y-u.scrollTop*h.y+m.y+b.y}}function z3(t){return Array.from(t.getClientRects())}function I3(t){let e=gt(t),r=Ho(t),n=t.ownerDocument.body,a=Wt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Wt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Bn(t),l=-r.scrollTop;return Ke(n).direction==="rtl"&&(s+=Wt(e.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var p2=25;function N3(t,e){let r=_e(t),n=gt(t),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=$n();(!m||m&&e==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let h=Bn(n);if(h<=0){let m=n.ownerDocument,g=m.body,b=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,S=Math.abs(n.clientWidth-g.clientWidth-v);S<=p2&&(i-=S)}else h<=p2&&(i+=h);return{width:i,height:s,x:l,y:u}}function _3(t,e){let r=Go(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=yt(t)?eo(t):st(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,u=a*i.x,h=n*i.y;return{width:s,height:l,x:u,y:h}}function h2(t,e,r){let n;if(e==="viewport")n=N3(t,r);else if(e==="document")n=I3(gt(t));else if(je(e))n=_3(e,r);else{let a=b2(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return fr(n)}function x2(t,e){let r=zt(t);return r===e||!je(r)||mr(r)?!1:Ke(r).position==="fixed"||x2(r,e)}function M3(t,e){let r=e.get(t);if(r)return r;let n=Pn(t,[],!1).filter(l=>je(l)&&hr(l)!=="body"),a=null,i=Ke(t).position==="fixed",s=i?zt(t):t;for(;je(s)&&!mr(s);){let l=Ke(s),u=Jr(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Qr(s)&&!u&&x2(t,s))?n=n.filter(m=>m!==s):a=l,s=zt(s)}return e.set(t,n),n}function k3(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t,s=[...r==="clippingAncestors"?Fo(e)?[]:M3(e,this._c):[].concat(r),n],l=h2(e,s[0],a),u=l.top,h=l.right,m=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let v=h2(e,s[b],a);u=Wt(v.top,u),h=$o(v.right,h),m=$o(v.bottom,m),g=Wt(v.left,g)}return{width:h-g,height:m-u,x:g,y:u}}function T3(t){let{width:e,height:r}=g2(t);return{width:e,height:r}}function P3(t,e,r){let n=yt(e),a=gt(e),i=r==="fixed",s=Go(t,!0,i,e),l={scrollLeft:0,scrollTop:0},u=st(0);function h(){u.x=Bn(a)}if(n||!n&&!i)if((hr(e)!=="body"||Qr(a))&&(l=Ho(e)),n){let v=Go(e,!0,i,e);u.x=v.x+e.clientLeft,u.y=v.y+e.clientTop}else a&&h();i&&!n&&a&&h();let m=a&&!n&&!i?v2(a,l):st(0),g=s.left+l.scrollLeft-u.x-m.x,b=s.top+l.scrollTop-u.y-m.y;return{x:g,y:b,width:s.width,height:s.height}}function Oi(t){return Ke(t).position==="static"}function m2(t,e){if(!yt(t)||Ke(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return gt(t)===r&&(r=r.ownerDocument.body),r}function S2(t,e){let r=_e(t);if(Fo(t))return r;if(!yt(t)){let a=zt(t);for(;a&&!mr(a);){if(je(a)&&!Oi(a))return a;a=zt(a)}return r}let n=m2(t,e);for(;n&&d2(n)&&Oi(n);)n=m2(n,e);return n&&mr(n)&&Oi(n)&&!Jr(n)?r:n||u2(t)||r}var D3=async function(t){let e=this.getOffsetParent||S2,r=this.getDimensions,n=await r(t.floating);return{reference:P3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function $3(t){return Ke(t).direction==="rtl"}var Fn={convertOffsetParentRelativeRectToViewportRelativeRect:R3,getDocumentElement:gt,getClippingRect:k3,getOffsetParent:S2,getElementRects:D3,getClientRects:z3,getDimensions:T3,getScale:eo,isElement:je,isRTL:$3};var C2=i2,L2=s2;var E2=(t,e,r)=>{let n=new Map,a={platform:Fn,...r},i={...a.platform,_c:n};return a2(t,e,{...a,platform:i})};function A2(t){return U3(t)}function wi(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function U3(t){for(let e=t;e;e=wi(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=wi(t);e;e=wi(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Jr(r)||e.tagName==="BODY"))return e}return null}async function O2(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},E2(t,e,{strategy:n.strategy,platform:{...Fn,getOffsetParent:a=>Fn.getOffsetParent(a,A2)},middleware:[L2({crossAxis:!0}),C2({allowedPlacements:[n.placement]})]})}var ho=x(N());var Ji=x(ee());var w2=x(ee(),1);var Ri=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function R2(t,e){return(0,w2.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Wo(t);try{return JSON.parse(r)}catch{return Wo(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Vo,...e??{}})}function B3(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Hn(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Hn(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(t);if(r=i.length,r!==a(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){let s=i[n];if(!Hn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Hn(t,e){try{return B3(t,e)}catch{return!1}}function Vo(t,e){return!Hn(t,e)}function Wo(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Gn(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let a=e(n);return a[t]=!0,a}}var z2=x(ee(),1);var zi=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:Vo,attribute:!1,...e};(0,z2.property)(i)(r,n);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=e.selector)!==null&&a!==void 0?a:(l=>l[n]),store:e.store})}};var Wn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(n=>n.type===e);return r&&(this.queue=this.queue.filter(n=>n!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var gr=x(ee(),1);var Vn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),i=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);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 N2=x(B(),1);var jn=globalThis,F3=jn.ShadowRoot&&(jn.ShadyCSS===void 0||jn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var I2=(t,e)=>{if(F3)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let n=document.createElement("style"),a=jn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,t.appendChild(n)}};var Kn=class extends N2.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(r);return I2(n,e.elementStyles),n}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,n])=>this.defineScopedElement(r,n))}static defineScopedElement(e,r){Ri(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function _2(t,e,...r){var n;let a=t.querySelector(e);for(let i of r)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var ro=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},P2,M2=Symbol("constructorPrototype"),k2=Symbol("constructorName"),D2=Symbol("exportpartsDebouncer"),T2=Symbol("dynamicDependenciesLoaded"),to=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};to.eventName="exportparts-updated";var bt=class extends Kn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[P2]=new Vn(5),this.scheduleExportpartsUpdate=()=>{var e,r,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&n!==void 0&&n)&&this[D2].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.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[k2]=this.constructor.name,this[M2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[k2]&&Object.setPrototypeOf(this,this[M2])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let r=this.constructor;r[T2]||(r[T2]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(to.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(to.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new to)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];r=_2(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,n,a;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(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}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(e){var r,n,a,i,s,l;let u=b=>b!=null&&b.trim().length>0,h=e.filter(u).map(b=>b.trim());if(h.length===0){this.exportparts=void 0;return}let m=new Set;for(let b of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],S=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],C=[...v,...S].filter(u).map(O=>O.trim());for(let O of C)m.add(O)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(b=>h.map(v=>`${b}:${v}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};P2=D2;ro([(0,gr.property)()],bt.prototype,"exportpartsPrefix",void 0);ro([R2([])],bt.prototype,"exportpartsPrefixes",void 0);ro([(0,gr.property)({reflect:!0})],bt.prototype,"exportparts",void 0);ro([(0,gr.property)()],bt.prototype,"customStylesheet",void 0);ro([(0,gr.property)()],bt.prototype,"elementToFocus",void 0);ro([(0,gr.state)()],bt.prototype,"useAdoptedStyleSheets",void 0);function Zn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var jo=Symbol("internalReduxEventsUnsubscribers"),jt=Symbol("internalStoresUnsubscribers"),yr=Symbol("internalStores"),H3=Gn(Symbol("withRedux"),function(t){var e,r,n;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[yr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[yr].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[yr].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[yr].delete(l)}setupStores(){this.unsubscribeFromStores(),this[yr].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let h=this.getStore(s.store);h&&(s.store?this[jt].has(s.store):this[jt].size>0)&&(this[l]=s.selector(h.getState(),this))}})}subscribeToStore(s,l){var u;this[jt].set(s,l.subscribe(()=>this.updateFromStores())),this[jo].set(s,[]),Zn(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((h,m)=>{if(typeof this[m]=="function"&&(!h.store||l.name===h.store)){let g=b=>this[m](b);l.addEventListener(h.eventName,g),this[jo].get(s).push(()=>l.removeEventListener(h.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[jt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[jt].has(s)&&this[jt].get(s)(),this[jt].delete(s),(l=this[jo].get(s))===null||l===void 0||l.forEach(u=>u()),this[jo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=jt,r=yr,n=jo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),$2=class extends H3(bt){};function Ze(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function It(t){return!!t&&!!t[re]}function ct(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Y3})(t)||Array.isArray(t)||!!t[V2]||!!(!((e=t.constructor)===null||e===void 0)&&e[V2])||$i(t)||Ui(t))}function br(t,e,r){r===void 0&&(r=!1),ao(t)===0?(r?Object.keys:no)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function ao(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:$i(t)?2:Ui(t)?3:0}function oo(t,e){return ao(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function G3(t,e){return ao(t)===2?t.get(e):t[e]}function j2(t,e,r){var n=ao(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function K2(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function $i(t){return Z3&&t instanceof Map}function Ui(t){return q3&&t instanceof Set}function Kt(t){return t.o||t.t}function Bi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Y2(t);delete e[re];for(var r=no(e),n=0;n<r.length;n++){var a=r[n],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Fi(t,e){return e===void 0&&(e=!1),Hi(t)||It(t)||!ct(t)||(ao(t)>1&&(t.set=t.add=t.clear=t.delete=W3),Object.freeze(t),e&&br(t,(function(r,n){return Fi(n,!0)}),!0)),t}function W3(){Ze(2)}function Hi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function vt(t){var e=Di[t];return e||Ze(18,t),e}function V3(t,e){Di[t]||(Di[t]=e)}function ki(){return Zo}function Ii(t,e){e&&(vt("Patches"),t.u=[],t.s=[],t.v=e)}function qn(t){Ti(t),t.p.forEach(j3),t.p=null}function Ti(t){t===Zo&&(Zo=t.l)}function U2(t){return Zo={p:[],l:Zo,h:t,m:!0,_:0}}function j3(t){var e=t[re];e.i===0||e.i===1?e.j():e.g=!0}function Ni(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||vt("ES5").S(e,t,n),n?(r[re].P&&(qn(e),Ze(4)),ct(t)&&(t=Yn(e,t),e.l||Xn(e,t)),e.u&&vt("Patches").M(r[re].t,t,e.u,e.s)):t=Yn(e,r,[]),qn(e),e.u&&e.v(e.u,e.s),t!==q2?t:void 0}function Yn(t,e,r){if(Hi(e))return e;var n=e[re];if(!n)return br(e,(function(l,u){return B2(t,n,e,l,u,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return Xn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Bi(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),br(i,(function(l,u){return B2(t,n,a,l,u,r,s)})),Xn(t,a,!1),r&&t.u&&vt("Patches").N(n,r,t.u,t.s)}return n.o}function B2(t,e,r,n,a,i,s){if(It(a)){var l=Yn(t,a,i&&e&&e.i!==3&&!oo(e.R,n)?i.concat(n):void 0);if(j2(r,n,l),!It(l))return;t.m=!1}else s&&r.add(a);if(ct(a)&&!Hi(a)){if(!t.h.D&&t._<1)return;Yn(t,a),e&&e.A.l||Xn(t,a)}}function Xn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Fi(e,r)}function _i(t,e){var r=t[re];return(r?Kt(r):t)[e]}function F2(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Zt(t){t.P||(t.P=!0,t.l&&Zt(t.l))}function Mi(t){t.o||(t.o=Bi(t.t))}function Pi(t,e,r){var n=$i(e)?vt("MapSet").F(e,r):Ui(e)?vt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:ki(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,h=qo;s&&(u=[l],h=Ko);var m=Proxy.revocable(u,h),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b})(e,r):vt("ES5").J(e,r);return(r?r.A:ki()).p.push(n),n}function K3(t){return It(t)||Ze(22,t),(function e(r){if(!ct(r))return r;var n,a=r[re],i=ao(r);if(a){if(!a.P&&(a.i<4||!vt("ES5").K(a)))return a.t;a.I=!0,n=H2(r,i),a.I=!1}else n=H2(r,i);return br(n,(function(s,l){a&&G3(a.t,s)===l||j2(n,s,e(l))})),i===3?new Set(n):n})(t)}function H2(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Bi(t)}function Z2(){function t(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var h=this[re];return qo.get(h,s)},set:function(h){var m=this[re];qo.set(m,s,h)}},u}function e(s){for(var l=s.length-1;l>=0;l--){var u=s[l][re];if(!u.P)switch(u.i){case 5:n(u)&&Zt(u);break;case 4:r(u)&&Zt(u)}}}function r(s){for(var l=s.t,u=s.k,h=no(u),m=h.length-1;m>=0;m--){var g=h[m];if(g!==re){var b=l[g];if(b===void 0&&!oo(l,g))return!0;var v=u[g],S=v&&v[re];if(S?S.t!==b:!K2(v,b))return!0}}var C=!!l[re];return h.length!==no(l).length+(C?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var h=0;h<l.length;h++)if(!l.hasOwnProperty(h))return!0;return!1}function a(s){s.g&&Ze(3,JSON.stringify(Kt(s)))}var i={};V3("ES5",{J:function(s,l){var u=Array.isArray(s),h=(function(g,b){if(g){for(var v=Array(b.length),S=0;S<b.length;S++)Object.defineProperty(v,""+S,t(S,!0));return v}var C=Y2(b);delete C[re];for(var O=no(C),w=0;w<O.length;w++){var I=O[w];C[I]=t(I,g||!!C[I].enumerable)}return Object.create(Object.getPrototypeOf(b),C)})(u,s),m={i:u?5:4,A:l?l.A:ki(),P:!1,I:!1,R:{},l,t:s,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,re,{value:m,writable:!0}),h},S:function(s,l,u){u?It(l)&&l[re].A===s&&e(s.p):(s.u&&(function h(m){if(m&&typeof m=="object"){var g=m[re];if(g){var b=g.t,v=g.k,S=g.R,C=g.i;if(C===4)br(v,(function(D){D!==re&&(b[D]!==void 0||oo(b,D)?S[D]||h(v[D]):(S[D]=!0,Zt(g)))})),br(b,(function(D){v[D]!==void 0||oo(v,D)||(S[D]=!1,Zt(g))}));else if(C===5){if(n(g)&&(Zt(g),S.length=!0),v.length<b.length)for(var O=v.length;O<b.length;O++)S[O]=!1;else for(var w=b.length;w<v.length;w++)S[w]=!0;for(var I=Math.min(v.length,b.length),k=0;k<I;k++)v.hasOwnProperty(k)||(S[k]=!0),S[k]===void 0&&h(v[k])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):n(s)}})}var G2,Zo,Gi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Z3=typeof Map<"u",q3=typeof Set<"u",W2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",q2=Gi?Symbol.for("immer-nothing"):((G2={})["immer-nothing"]=!0,G2),V2=Gi?Symbol.for("immer-draftable"):"__$immer_draftable",re=Gi?Symbol.for("immer-state"):"__$immer_state";var Y3=""+Object.prototype.constructor,no=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Y2=Object.getOwnPropertyDescriptors||function(t){var e={};return no(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Di={},qo={get:function(t,e){if(e===re)return t;var r=Kt(t);if(!oo(r,e))return(function(a,i,s){var l,u=F2(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(t,r,e);var n=r[e];return t.I||!ct(n)?n:n===_i(t.t,e)?(Mi(t),t.o[e]=Pi(t.A.h,n,t)):n},has:function(t,e){return e in Kt(t)},ownKeys:function(t){return Reflect.ownKeys(Kt(t))},set:function(t,e,r){var n=F2(Kt(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=_i(Kt(t),e),i=a?.[re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(K2(r,a)&&(r!==void 0||oo(t.t,e)))return!0;Mi(t),Zt(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return _i(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Mi(t),Zt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Kt(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Ze(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ze(12)}},Ko={};br(qo,(function(t,e){Ko[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ko.deleteProperty=function(t,e){return Ko.set.call(this,t,e,void 0)},Ko.set=function(t,e,r){return qo.set.call(this,t[0],e,r,t[0])};var X3=(function(){function t(r){var n=this;this.O=W2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(C){var O=this;C===void 0&&(C=l);for(var w=arguments.length,I=Array(w>1?w-1:0),k=1;k<w;k++)I[k-1]=arguments[k];return u.produce(C,(function(D){var V;return(V=i).call.apply(V,[O,D].concat(I))}))}}var h;if(typeof i!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),ct(a)){var m=U2(n),g=Pi(n,a,void 0),b=!0;try{h=i(g),b=!1}finally{b?qn(m):Ti(m)}return typeof Promise<"u"&&h instanceof Promise?h.then((function(C){return Ii(m,s),Ni(C,m)}),(function(C){throw qn(m),C})):(Ii(m,s),Ni(h,m))}if(!a||typeof a!="object"){if((h=i(a))===void 0&&(h=a),h===q2&&(h=void 0),n.D&&Fi(h,!0),s){var v=[],S=[];vt("Patches").M(a,h,v,S),s(v,S)}return h}Ze(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(h){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return n.produceWithPatches(h,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(h,m){s=h,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(h){return[h,s,l]})):[u,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){ct(r)||Ze(8),It(r)&&(r=K3(r));var n=U2(this),a=Pi(this,r,void 0);return a[re].C=!0,Ti(n),a},e.finishDraft=function(r,n){var a=r&&r[re],i=a.A;return Ii(i,n),Ni(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!W2&&Ze(20),this.O=r},e.applyPatches=function(r,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(n=n.slice(a+1));var s=vt("Patches").$;return It(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Ue=new X3,Q3=Ue.produce,Ky=Ue.produceWithPatches.bind(Ue),Zy=Ue.setAutoFreeze.bind(Ue),qy=Ue.setUseProxies.bind(Ue),Yy=Ue.applyPatches.bind(Ue),Xy=Ue.createDraft.bind(Ue),Qy=Ue.finishDraft.bind(Ue),Qn=Q3;function vr(t){"@babel/helpers - typeof";return vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vr(t)}function X2(t,e){if(vr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(vr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Q2(t){var e=X2(t,"string");return vr(e)=="symbol"?e:e+""}function J2(t,e,r){return(e=Q2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ed(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Wi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ed(Object(r),!0).forEach(function(n){J2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Le(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var td=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Vi=function(){return Math.random().toString(36).substring(7).split("").join(".")},Jn={INIT:"@@redux/INIT"+Vi(),REPLACE:"@@redux/REPLACE"+Vi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Vi()}};function J3(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ji(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Le(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Le(1));return r(ji)(t,e)}if(typeof t!="function")throw new Error(Le(2));var a=t,i=e,s=[],l=s,u=!1;function h(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(Le(3));return i}function g(C){if(typeof C!="function")throw new Error(Le(4));if(u)throw new Error(Le(5));var O=!0;return h(),l.push(C),function(){if(O){if(u)throw new Error(Le(6));O=!1,h();var I=l.indexOf(C);l.splice(I,1),s=null}}}function b(C){if(!J3(C))throw new Error(Le(7));if(typeof C.type>"u")throw new Error(Le(8));if(u)throw new Error(Le(9));try{u=!0,i=a(i,C)}finally{u=!1}for(var O=s=l,w=0;w<O.length;w++){var I=O[w];I()}return C}function v(C){if(typeof C!="function")throw new Error(Le(10));a=C,b({type:Jn.REPLACE})}function S(){var C,O=g;return C={subscribe:function(I){if(typeof I!="object"||I===null)throw new Error(Le(11));function k(){I.next&&I.next(m())}k();var D=O(k);return{unsubscribe:D}}},C[td]=function(){return this},C}return b({type:Jn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:v},n[td]=S,n}function e6(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:Jn.INIT});if(typeof n>"u")throw new Error(Le(12));if(typeof r(void 0,{type:Jn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Le(13))})}function rd(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var a=e[n];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{e6(r)}catch(u){l=u}return function(h,m){if(h===void 0&&(h={}),l)throw l;if(0)var g;for(var b=!1,v={},S=0;S<i.length;S++){var C=i[S],O=r[C],w=h[C],I=O(w,m);if(typeof I>"u"){var k=m&&m.type;throw new Error(Le(14))}v[C]=I,b=b||I!==w}return b=b||i.length!==Object.keys(h).length,b?v:h}}function io(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function od(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(Le(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(u){return u(s)});return i=io.apply(void 0,l)(a.dispatch),Wi(Wi({},a),{},{dispatch:i})}}}function nd(t){var e=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var ad=nd();ad.withExtraArgument=nd;var Ki=ad;var dd=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),t6=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(h){return function(m){return u([h,m])}}function u(h){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=h[0]&2?a.return:h[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,h[1])).done)return i;switch(a=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,a=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){r.label=h[1];break}if(h[0]===6&&r.label<i[1]){r.label=i[1],i=h;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(h);break}i[2]&&r.ops.pop(),r.trys.pop();continue}h=e.call(t,r)}catch(m){h=[6,m],a=0}finally{n=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},so=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},r6=Object.defineProperty,o6=Object.defineProperties,n6=Object.getOwnPropertyDescriptors,id=Object.getOwnPropertySymbols,a6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,sd=function(t,e,r){return e in t?r6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},qt=function(t,e){for(var r in e||(e={}))a6.call(e,r)&&sd(t,r,e[r]);if(id)for(var n=0,a=id(e);n<a.length;n++){var r=a[n];i6.call(e,r)&&sd(t,r,e[r])}return t},Zi=function(t,e){return o6(t,n6(e))},s6=function(t,e,r){return new Promise(function(n,a){var i=function(u){try{l(r.next(u))}catch(h){a(h)}},s=function(u){try{l(r.throw(u))}catch(h){a(h)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((r=r.apply(t,e)).next())})};var c6=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?io:io.apply(null,arguments)},g9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function l6(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Yt(t,e){function r(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return qt(qt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}var d6=(function(t){dd(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,so([void 0],r[0].concat(this)))):new(e.bind.apply(e,so([void 0],r.concat(this))))},e})(Array),u6=(function(t){dd(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,so([void 0],r[0].concat(this)))):new(e.bind.apply(e,so([void 0],r.concat(this))))},e})(Array);function Xi(t){return ct(t)?Qn(t,function(){}):t}function f6(t){return typeof t=="boolean"}function p6(){return function(e){return h6(e)}}function h6(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,n=t.immutableCheck,a=n===void 0?!0:n,i=t.serializableCheck,s=i===void 0?!0:i,l=t.actionCreatorCheck,u=l===void 0?!0:l,h=new d6;if(r&&(f6(r)?h.push(Ki):h.push(Ki.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var g;if(u)var b}return h}var qi=!0;function ud(t){var e=p6(),r=t||{},n=r.reducer,a=n===void 0?void 0:n,i=r.middleware,s=i===void 0?e():i,l=r.devTools,u=l===void 0?!0:l,h=r.preloadedState,m=h===void 0?void 0:h,g=r.enhancers,b=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(l6(a))v=rd(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var S=s;if(typeof S=="function"&&(S=S(e),!qi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qi&&S.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=od.apply(void 0,S),O=io;u&&(O=c6(qt({trace:!qi},typeof u=="object"&&u)));var w=new u6(C),I=w;Array.isArray(b)?I=so([C],b):typeof b=="function"&&(I=b(w));var k=O.apply(void 0,I);return ji(v,m,k)}function fd(t){var e={},r=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return t(a),[e,r,n]}function m6(t){return typeof t=="function"}function g6(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?fd(e):[e,r,n],i=a[0],s=a[1],l=a[2],u;if(m6(t))u=function(){return Xi(t())};else{var h=Xi(t);u=function(){return h}}function m(g,b){g===void 0&&(g=u());var v=so([i[b.type]],s.filter(function(S){var C=S.matcher;return C(b)}).map(function(S){var C=S.reducer;return C}));return v.filter(function(S){return!!S}).length===0&&(v=[l]),v.reduce(function(S,C){if(C)if(It(S)){var O=S,w=C(O,b);return w===void 0?S:w}else{if(ct(S))return Qn(S,function(I){return C(I,b)});var w=C(S,b);if(w===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return S},g)}return m.getInitialState=u,m}function y6(t,e){return t+"/"+e}function pd(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Xi(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],b=y6(e,m),v,S;"reducer"in g?(v=g.reducer,S=g.prepare):v=g,i[m]=v,s[b]=v,l[m]=S?Yt(b,S):Yt(b)});function u(){var m=typeof t.extraReducers=="function"?fd(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,v=m[1],S=v===void 0?[]:v,C=m[2],O=C===void 0?void 0:C,w=qt(qt({},b),s);return g6(r,function(I){for(var k in w)I.addCase(k,w[k]);for(var D=0,V=S;D<V.length;D++){var J=V[D];I.addMatcher(J.matcher,J.reducer)}O&&I.addDefaultCase(O)})}var h;return{name:e,reducer:function(m,g){return h||(h=u()),h(m,g)},actions:l,caseReducers:i,getInitialState:function(){return h||(h=u()),h.getInitialState()}}}var b6="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",v6=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=b6[Math.random()*64|0];return e},x6=["name","message","stack","code"],Yi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),cd=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),S6=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=x6;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},x9=(function(){function t(e,r,n){var a=Yt(e+"/fulfilled",function(m,g,b,v){return{payload:m,meta:Zi(qt({},v||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Yt(e+"/pending",function(m,g,b){return{payload:void 0,meta:Zi(qt({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Yt(e+"/rejected",function(m,g,b,v,S){return{payload:v,error:(n&&n.serializeError||S6)(m||"Rejected"),meta:Zi(qt({},S||{}),{arg:b,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function h(m){return function(g,b,v){var S=n?.idGenerator?n.idGenerator(m):v6(),C=new u,O,w=!1;function I(D){O=D,C.abort()}var k=(function(){return s6(this,null,function(){var D,V,J,pt,rr,ht,Te;return t6(this,function(Ge){switch(Ge.label){case 0:return Ge.trys.push([0,4,,5]),pt=(D=n?.condition)==null?void 0:D.call(n,m,{getState:b,extra:v}),L6(pt)?[4,pt]:[3,2];case 1:pt=Ge.sent(),Ge.label=2;case 2:if(pt===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,rr=new Promise(function(Pe,or){return C.signal.addEventListener("abort",function(){return or({name:"AbortError",message:O||"Aborted"})})}),g(i(S,m,(V=n?.getPendingMeta)==null?void 0:V.call(n,{requestId:S,arg:m},{getState:b,extra:v}))),[4,Promise.race([rr,Promise.resolve(r(m,{dispatch:g,getState:b,extra:v,requestId:S,signal:C.signal,abort:I,rejectWithValue:function(Pe,or){return new Yi(Pe,or)},fulfillWithValue:function(Pe,or){return new cd(Pe,or)}})).then(function(Pe){if(Pe instanceof Yi)throw Pe;return Pe instanceof cd?a(Pe.payload,S,m,Pe.meta):a(Pe,S,m)})])];case 3:return J=Ge.sent(),[3,5];case 4:return ht=Ge.sent(),J=ht instanceof Yi?s(null,S,m,ht.payload,ht.meta):s(ht,S,m),[3,5];case 5:return Te=n&&!n.dispatchConditionRejection&&s.match(J)&&J.meta.condition,Te||g(J),[2,J]}})})})();return Object.assign(k,{abort:I,requestId:S,arg:m,unwrap:function(){return k.then(C6)}})}}return Object.assign(h,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function C6(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function L6(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var hd="listener",md="completed",gd="cancelled",S9="task-"+gd,C9="task-"+md,L9=hd+"-"+gd,E9=hd+"-"+md;var Qi="listenerMiddleware";var A9=Yt(Qi+"/add"),O9=Yt(Qi+"/removeAll"),w9=Yt(Qi+"/remove");var ld,R9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(ld||(ld=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},E6=function(t){return function(e){setTimeout(e,t)}},z9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:E6(10);Z2();var A6=Gn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,a){this.eventBus.addEventListener(r,n,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,a){this.eventBus.removeEventListener(r,n,a)}}}),ea=class extends A6(Object){};window.ftReduxStores||(window.ftReduxStores={});var yd=class t extends ea{static get(e){var r;let n=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[n];if(Zn(i))return i;if(a==null)return;let s=pd({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=ud({reducer:(u,h)=>{if(h.type==="CLEAR_FT_REDUX_STORE"){let m=Wo(s.getInitialState());for(let g of h.keeping)m[g]=(u??m)[g];return m}else if(typeof h.type=="string"&&h.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...h.overwrites};return s.reducer(u,h)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,n){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Wn;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,h=i[u];return h?(...m)=>{let g=h(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var ta=class{static format(e,r,n,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(e,r,n,a,!!i)}static getMomentDateFormat(e,r,n){return n?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,n,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let e=n=>String(Math.floor(n)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var ra=x(N()),O6="ft-app-info",co=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};co.eventName="authentication-change";var Yo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Yo.eventName="ui-locale-changed";var w6={session:(t,e)=>{(0,ra.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new co(e.payload)),0))}},F=ra.FtReduxStore.get({name:O6,reducers:w6,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var bd=x(N()),oa=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},ob=(0,bd.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(F)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>ta.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return oa([(0,Ji.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),oa([(0,Ji.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),oa([zi({store:F.name,selector:r=>{var n,a;return(a=(n=r.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),oa([zi({store:F.name})],e.prototype,"uiLocale",void 0),e});var vd;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(vd||(vd={}));var xd;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(xd||(xd={}));var Sd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Sd||(Sd={}));var Cd;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(Cd||(Cd={}));var Ld;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Ld||(Ld={}));var Ed;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Ed||(Ed={}));var Ad;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Ad||(Ad={}));var Od;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(Od||(Od={}));var wd;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(wd||(wd={}));var Rd;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Rd||(Rd={}));var zd;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(zd||(zd={}));var Id;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Id||(Id={}));var Nd;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Nd||(Nd={}));var _d;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(_d||(_d={}));var Md;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Md||(Md={}));var kd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(kd||(kd={}));var Td;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Td||(Td={}));var Pd;(function(t){t.ASC="ASC",t.DESC="DESC"})(Pd||(Pd={}));var Dd;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Dd||(Dd={}));var $d;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})($d||($d={}));var Ud;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Ud||(Ud={}));var Bd;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Bd||(Bd={}));var Fd;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Fd||(Fd={}));var Hd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Hd||(Hd={}));var Gd;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Gd||(Gd={}));var Wd;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Wd||(Wd={}));var Vd;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Vd||(Vd={}));var ge;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(ge||(ge={}));var qe;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(qe||(qe={}));var jd;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(jd||(jd={}));var Kd;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Kd||(Kd={}));var Zd;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Zd||(Zd={}));var qd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(qd||(qd={}));var Yd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Yd||(Yd={}));var Xd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Xd||(Xd={}));var Qd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qd||(Qd={}));var Jd;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Jd||(Jd={}));var e0;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(e0||(e0={}));var t0;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(t0||(t0={}));var r0;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(r0||(r0={}));var o0;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(o0||(o0={}));var R6={[ge.PERSONAL_BOOK_SHARE_USER]:[ge.PERSONAL_BOOK_USER],[ge.HTML_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.PDF_EXPORT_USER]:[ge.PERSONAL_BOOK_USER],[ge.KHUB_ADMIN]:[ge.CONTENT_PUBLISHER],[ge.ADMIN]:[ge.KHUB_ADMIN,ge.USERS_ADMIN,ge.PORTAL_ADMIN,ge.BEHAVIOR_DATA_USER],[ge.GENERATIVE_AI_EXPORT_USER]:[ge.GENERATIVE_AI_USER]};function n0(t,e){return t===e||(R6[t]??[]).some(r=>n0(r,e))}function a0(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(n=>n0(n,e))}var ca=x(N());var es=x(N());var xr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:n}=F.getState(),a=e??n;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let n=t.get(e);if(n)r(n);else{let a=F.subscribe(()=>{n=t.get(e),n&&(a(),r(n))})}})}};var lo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:xr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):xr.await()}};var Be=class extends lo{constructor(e=!0,r){var n;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new es.CacheRegistry,this.cache=e?a.commonCache:new es.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0))}};var na=class extends Be{async listMySearches(){let{session:e}=F.getState();return a0(e,ge.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var aa=class extends Be{async listMyBookmarks(){let e=F.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var ia=class extends Be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=F.getState().session;return!!e?.sessionAuthenticated}};var sa=class extends Be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=F.getState().session;return!!e?.sessionAuthenticated}};var z6="ft-user-assets",I6={setAssetCount:(t,e)=>{let{userAssetType:r,count:n}=e.payload.assetCount;t.assetCounts.allAsset[r]=n},clearAssetCount:t=>{Object.values(qe).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:n,asset:a}=e.payload;rs(t,r,[...ts(t,r),a]),i0(t,r,1,n),s0(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;rs(t,r,ts(t,r).map(a=>a.id===n.id?n:a)),s0(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;rs(t,r,ts(t,r).filter(i=>i.id!==a)),i0(t,r,-1,n)}},c0={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},ts=(t,e)=>{var r;let n=c0[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},rs=(t,e,r)=>{let n=c0[e];n&&(t[n]=r)},i0=(t,e,r,n)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===qe.BOOKMARKS&&n)){let i=t.assetCounts.bookmarkByMap[n];t.assetCounts.bookmarkByMap[n]=Math.max(0,i+r)}},s0=(t,e)=>{let r=t.assetLabels.map(a=>a.title),n=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...n)},Ie=ca.FtReduxStore.get({name:z6,reducers:I6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),os=class{constructor(e=new ia,r=new sa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new aa,this.savedSearchesService=new na,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();(0,ca.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ie.actions.clearAssetCount(),Ie.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ie.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ie.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Ie.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ie.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Ie.getState().assetCounts.allAsset[e]!==r.count&&Ie.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Ie.getState().assetCounts.bookmarkByMap[e]!==r.count&&Ie.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Ie.getState().assetCounts.bookmarkByMap).length!==0;e===qe.BOOKMARKS&&r&&Ie.actions.clearBookmarkCountByMap(),Ie.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ie.actions.bookmarks(r)}}},N6=new os;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=N6);var ns=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ns;var Ye=x(N());var l0,uo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},_6=Symbol("clearAfterUnitTest"),la=class extends(0,Ye.withEventBus)(Be){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[l0]=()=>{this.defaultMessages={},this.cache=new Ye.CacheRegistry,this.listeners={}},this.currentUiLocale=F.getState().uiLocale,F.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=F.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var n;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...r};(0,Ye.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,n;return this.fetchContext(e),(n=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(e,r){let n=e.toLowerCase();return this.resolveContext(n)[r]}resolveMessage(e,r,...n){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new Ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...n)}async fetchContext(e){let r=!this.cache.has(e),n;try{n=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof Ye.CanceledPromiseError)&&r&&console.error(a)}return n}subscribe(e,r){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new uo({loadedContexts:e})),this.dispatchEvent(new uo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new uo({loadedContexts:[e]})),this.dispatchEvent(new uo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};l0=_6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends la{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends la{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var fo=window.FluidTopicsI18nService,da=window.FluidTopicsCustomI18nService;var d0=x(N()),as=class{highlightHtml(e,r,n){(0,d0.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new as;var u0=x(N());var is=class{isDate(e){var r,n,a,i;return(i=(a=((n=(r=F.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var n,a,i,s;if(e==null)return"";try{return u0.DateFormatter.format(e,(n=r?.locale)!==null&&n!==void 0?n:F.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new is;var f0=x(N());var Xo=class{static get(e,r){var n,a,i,s;let l=F.getState(),{lang:u,region:h}=(i=(a=(n=l.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new f0.SearchPlaceConverter(l.baseUrl,e??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${u}-${h}`)}};var ss=class{urlToSearchRequest(e){return Xo.get().parse(e)}searchRequestToUrl(e){return Xo.get().serialize(e)}};window.FluidTopicsUrlService=new ss;var Nt=x(N());var Sr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Sr.eventName="change";var cs=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},p0=new cs;var ua=class t extends Nt.WithEventBus{static build(){return new t(window.history,p0,()=>window.location,!1)}constructor(e,r,n,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=n,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let n=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},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,Nt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Sr(this.currentItem())),0)}installProxies(){let e=r=>(n,a,[i,s,l])=>{let u=r(),h={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[h,s,l]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let n={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(e){this.addEventListener(Sr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Sr.eventName,e)}currentItem(){return(0,Nt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Nt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Nt.deepCopy)(r.find(n=>e(n)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Nt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let n=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!n)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var n;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(n=this.states[e])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ua.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var h0=x(B());var m0=h0.css`
2024
+ `;var b0=x(B()),Fe=x(ee()),Er=x(N());var Cr=x(N());function g0(t,e){let{authenticationRequired:r,session:n}=F.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var fa=class extends lo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var ls=class t extends Cr.FtStateManager{static build(e){return new t(F,e)}constructor(e,r){super(),this.store=e,this.cache=new Cr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new fa,this.cleanSessionDebouncer=new Cr.Debouncer,this.reloadDebouncer=new Cr.Debouncer(500),this.apiProvider=r??(()=>xr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(co.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>g0(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Yo(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},y0=ls.build();var Lr=class extends Event{constructor(e,r,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=n,this.subscribe=a??!1}};var Qo=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:n}=r;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Lr(e.context,s,l,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],n=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(n)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var Ee=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},le=class extends Er.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=y0,this.contextRoot=new Qo}render(){return b0.html`
2025
2025
  <slot></slot>
2026
2026
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>fo.addContext(n)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};le.elementDefinitions={};le.styles=m0;Ee([(0,Fe.property)()],le.prototype,"baseUrl",void 0);Ee([(0,Fe.property)()],le.prototype,"apiIntegrationIdentifier",void 0);Ee([(0,Fe.property)()],le.prototype,"apiIntegrationAppVersion",void 0);Ee([(0,Fe.property)()],le.prototype,"uiLocale",void 0);Ee([(0,Er.jsonProperty)(null)],le.prototype,"availableUiLocales",void 0);Ee([(0,Er.jsonProperty)(null)],le.prototype,"metadataConfiguration",void 0);Ee([(0,Fe.property)({type:Boolean})],le.prototype,"editorMode",void 0);Ee([(0,Fe.property)({type:Boolean})],le.prototype,"noCustom",void 0);Ee([(0,Fe.property)({type:Boolean})],le.prototype,"openExternalDocumentInNewTab",void 0);Ee([(0,Fe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],le.prototype,"noCustomComponent",void 0);Ee([(0,Fe.property)({type:Boolean})],le.prototype,"withManualResources",void 0);Ee([(0,Fe.property)({type:Boolean})],le.prototype,"navigatorOnline",void 0);Ee([(0,Fe.property)({type:Boolean})],le.prototype,"forcedOffline",void 0);Ee([(0,Fe.property)({type:Boolean})],le.prototype,"authenticationRequired",void 0);Ee([(0,Er.jsonProperty)([])],le.prototype,"messageContexts",void 0);Ee([(0,Er.jsonProperty)(void 0)],le.prototype,"session",void 0);var x0=x(N());var v0={"ft-app-context":le};(0,x0.customElements)(v0);var S0=x(ee());var ds=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,n]=e.split(".");return{context:r,key:n,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},po=new ds;var T6=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},en=Symbol("i18nAttributes"),C0=Symbol("i18nListAttributes"),L0=Symbol("i18nProperties"),pa=Symbol("i18nContexts"),Jo=Symbol("i18nUnsubs"),mo=(0,ho.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class n extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?da:fo}i18n(i){let{context:s,key:l,message:u}=i,{custom:h,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,h);let b=m??(g?g(this):[]);return this.getI18nService(h).resolveMessage(s,l,...b)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(po.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var h;return((h=u?.context)===null||h===void 0?void 0:h.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,h=(m,g,b)=>b?.context&&b.key&&i(m,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[en])===null||s===void 0||s.forEach((m,g)=>u[g]=h(m,g,u[g])),(l=this[C0])===null||l===void 0||l.forEach((m,g)=>{var b;return u[g]=(b=u[g])===null||b===void 0?void 0:b.map(v=>h(m,g,v))})}updateI18nProperties(i){var s;(s=this[L0])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[pa].set(u,{isCustomContext:l}),this[Jo].has(u)||this[Jo].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[pa].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[pa].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Jo].forEach(i=>i()),this[Jo].clear()}}return e=pa,r=Jo,T6([(0,S0.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),ha=class extends mo(ho.FtLitElement){},ma=class extends mo(ho.FtLitElementRedux){};var E0=x(N());var us=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(n=>typeof n=="string"?po.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},P6=new us;var A0=(t,e)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:E0.hasChanged,converter:po,...e}),r[en]=(a=r[en])!==null&&a!==void 0?a:new Map,r[en].set(n,t??{})};var Xt=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?da:fo}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var O0=x(B());var w0=O0.css`
2027
2027
  `;var ga=x(B()),ya=x(ee()),ba=x(N());var tn=function(t,e,r,n){var a=arguments.length,i=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},lt=class extends ma{constructor(){super(),this.editorMode=!1,this.addStore(F)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":ga.nothing:ga.html`
@@ -2100,8 +2100,8 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
2100
2100
  position: relative;
2101
2101
  word-break: break-word;
2102
2102
  }
2103
- `;var c6="ft-app-info",Ro=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ro.eventName="authentication-change";var xn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};xn.eventName="ui-locale-changed";var l6={session:(t,e)=>{Ke(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>K.dispatchEvent(new Ro(e.payload)),0))}},K=Or.get({name:c6,reducers:l6,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Sa=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},iE=Ie(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(K)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>wr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Sa([x({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Sa([x({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Sa([Xr({store:K.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Sa([Xr({store:K.name})],e.prototype,"uiLocale",void 0),e});var Tr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=K.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=K.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var _o=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Tr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Tr.await()}};var Je=class extends _o{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Et,this.cache=e?a.commonCache:new Et}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Ca=class extends Je{async listMySearches(){let{session:e}=K.getState();return Td(e,Le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Ea=class extends Je{async listMyBookmarks(){let e=K.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var La=class extends Je{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=K.getState().session;return!!e?.sessionAuthenticated}};var Aa=class extends Je{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=K.getState().session;return!!e?.sessionAuthenticated}};var d6="ft-user-assets",u6={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(at).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;Dc(t,r,[...$c(t,r),a]),lu(t,r,1,o),du(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Dc(t,r,$c(t,r).map(a=>a.id===o.id?o:a)),du(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;Dc(t,r,$c(t,r).filter(i=>i.id!==a)),lu(t,r,-1,o)}},uu={[at.SEARCHES]:"savedSearches",[at.BOOKMARKS]:"bookmarks",[at.BOOKS]:void 0,[at.COLLECTIONS]:void 0},$c=(t,e)=>{var r;let o=uu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Dc=(t,e,r)=>{let o=uu[e];o&&(t[o]=r)},lu=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===at.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},du=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Be=Or.get({name:d6,reducers:u6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(at).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Fc=class{constructor(e=new La,r=new Aa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=K.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ea,this.savedSearchesService=new Ca,K.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=K.getState();Ke((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Be.actions.clearAssetCount(),Be.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Be.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Be.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Be.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Be.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Be.getState().assetCounts.allAsset[e]!==r.count&&Be.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Be.getState().assetCounts.bookmarkByMap[e]!==r.count&&Be.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Be.getState().assetCounts.bookmarkByMap).length!==0;e===at.BOOKMARKS&&r&&Be.actions.clearBookmarkCountByMap(),Be.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Be.actions.bookmarks(r)}}},f6=new Fc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=f6);var Uc=class{addCommand(e,r=!1){K.commands.add(e,r)}consumeCommand(e){return K.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Uc;var fu,Io=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},p6=Symbol("clearAfterUnitTest"),Oa=class extends Bn(Je){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[fu]=()=>{this.defaultMessages={},this.cache=new Et,this.listeners={}},this.currentUiLocale=K.getState().uiLocale,K.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=K.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ke(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new tn((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof fr)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Io({loadedContexts:e})),this.dispatchEvent(new Io({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Io({loadedContexts:[e]})),this.dispatchEvent(new Io({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Un(0).then(()=>o()).catch(()=>null)))}};fu=p6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Oa{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Oa{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var No=window.FluidTopicsI18nService,wa=window.FluidTopicsCustomI18nService;var Bc=class{highlightHtml(e,r,o){as(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Bc;var Hc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=K.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return wr.format(e,(o=r?.locale)!==null&&o!==void 0?o:K.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Hc;var Sn=class{static get(e,r){var o,a;let i=K.getState(),{lang:s,region:c}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new io(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${c}`)}};var Gc=class{urlToSearchRequest(e){return Sn.get().parse(e)}searchRequestToUrl(e){return Sn.get().serialize(e)}};window.FluidTopicsUrlService=new Gc;var zr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};zr.eventName="change";var Wc=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},pu=new Wc;var Ra=class t extends Pt{static build(){return new t(window.history,pu,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ke(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new zr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(zr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(zr.eventName,e)}currentItem(){return lt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return lt(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return lt(r.find(o=>e(o)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return lt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ra.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var hu=T`
2104
- `;function mu(t,e){let{authenticationRequired:r,session:o}=K.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var _a=class extends _o{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Vc=class t extends cn{static build(e){return new t(K,e)}constructor(e,r){super(),this.store=e,this.cache=new Et,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new _a,this.cleanSessionDebouncer=new Ne,this.reloadDebouncer=new Ne(500),this.apiProvider=r??(()=>Tr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Ro.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>mu(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){var r,o,a,i,s;this.localesConfiguration=e,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((r=this.localesConfiguration.availableUiLocales)!==null&&r!==void 0?r:[]),this.store.actions.searchInAllLanguagesAllowed((o=this.localesConfiguration.allLanguagesAllowed)!==null&&o!==void 0?o:!1),this.store.actions.searchLanguageSetsUiLanguage((a=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&a!==void 0?a:!1),this.store.actions.uiLanguageSetsSearchLanguage((i=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsReaderLanguage((s=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&s!==void 0?s:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new xn(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},gu=Vc.build();var kr=class extends Event{constructor(e,r,o,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=o,this.subscribe=a??!1}};var Cn=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:o}=r;for(let{elementRef:a,callbackRef:i}of o){let s=a.deref(),c=i.deref();s===void 0||c===void 0||s.dispatchEvent(new kr(e.context,s,c,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],o=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(o)||(i.add(o),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(o)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var $e=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Se=class extends Er{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=gu,this.contextRoot=new Cn}render(){return I`
2103
+ `;var c6="ft-app-info",Ro=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ro.eventName="authentication-change";var xn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};xn.eventName="ui-locale-changed";var l6={session:(t,e)=>{Ke(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>K.dispatchEvent(new Ro(e.payload)),0))}},K=Or.get({name:c6,reducers:l6,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Sa=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},iE=Ie(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(K)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(c=>c.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?c=>wr.format(c,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Sa([x({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Sa([x({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Sa([Xr({store:K.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Sa([Xr({store:K.name})],e.prototype,"uiLocale",void 0),e});var Tr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=K.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=K.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}};var _o=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Tr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Tr.await()}};var Je=class extends _o{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([c],[d])=>c.localeCompare(d)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Et,this.cache=e?a.commonCache:new Et}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}};var Ca=class extends Je{async listMySearches(){let{session:e}=K.getState();return Td(e,Le.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Ea=class extends Je{async listMyBookmarks(){let e=K.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var La=class extends Je{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=K.getState().session;return!!e?.sessionAuthenticated}};var Aa=class extends Je{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=K.getState().session;return!!e?.sessionAuthenticated}};var d6="ft-user-assets",u6={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(at).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;Dc(t,r,[...$c(t,r),a]),lu(t,r,1,o),du(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;Dc(t,r,$c(t,r).map(a=>a.id===o.id?o:a)),du(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;Dc(t,r,$c(t,r).filter(i=>i.id!==a)),lu(t,r,-1,o)}},uu={[at.SEARCHES]:"savedSearches",[at.BOOKMARKS]:"bookmarks",[at.BOOKS]:void 0,[at.COLLECTIONS]:void 0},$c=(t,e)=>{var r;let o=uu[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},Dc=(t,e,r)=>{let o=uu[e];o&&(t[o]=r)},lu=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===at.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},du=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},Be=Or.get({name:d6,reducers:u6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(at).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Fc=class{constructor(e=new La,r=new Aa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=K.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ea,this.savedSearchesService=new Ca,K.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=K.getState();Ke((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Be.actions.clearAssetCount(),Be.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Be.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Be.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Be.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Be.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Be.getState().assetCounts.allAsset[e]!==r.count&&Be.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Be.getState().assetCounts.bookmarkByMap[e]!==r.count&&Be.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Be.getState().assetCounts.bookmarkByMap).length!==0;e===at.BOOKMARKS&&r&&Be.actions.clearBookmarkCountByMap(),Be.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Be.actions.bookmarks(r)}}},f6=new Fc;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=f6);var Uc=class{addCommand(e,r=!1){K.commands.add(e,r)}consumeCommand(e){return K.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Uc;var fu,Io=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},p6=Symbol("clearAfterUnitTest"),Oa=class extends Bn(Je){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[fu]=()=>{this.defaultMessages={},this.cache=new Et,this.listeners={}},this.currentUiLocale=K.getState().uiLocale,K.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=K.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};Ke(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new tn((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof fr)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Io({loadedContexts:e})),this.dispatchEvent(new Io({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Io({loadedContexts:[e]})),this.dispatchEvent(new Io({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Un(0).then(()=>o()).catch(()=>null)))}};fu=p6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Oa{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Oa{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var No=window.FluidTopicsI18nService,wa=window.FluidTopicsCustomI18nService;var Bc=class{highlightHtml(e,r,o){as(e,r,o)}};window.FluidTopicsHighlightHtmlService=new Bc;var Hc=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=K.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(c=>c.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return wr.format(e,(o=r?.locale)!==null&&o!==void 0?o:K.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(c){throw console.error(`Date ${JSON.stringify(e)} is not valid`,c),c}}};window.FluidTopicsDateService=new Hc;var Sn=class{static get(e,r){var o,a,i,s;let c=K.getState(),{lang:d,region:u}=(i=(a=(o=c.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new io(c.baseUrl,e??20,(s=c.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${d}-${u}`)}};var Gc=class{urlToSearchRequest(e){return Sn.get().parse(e)}searchRequestToUrl(e){return Sn.get().serialize(e)}};window.FluidTopicsUrlService=new Gc;var zr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};zr.eventName="change";var Wc=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},pu=new Wc;var Ra=class t extends Pt{static build(){return new t(window.history,pu,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Ke(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new zr(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,c])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...i,index:d,href:typeof c=="string"?c:(c??this.windowLocation()).href};o.apply(a,[u,s,c]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(zr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(zr.eventName,e)}currentItem(){return lt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return lt(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return lt(r.find(o=>e(o)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return lt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Ra.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var hu=T`
2104
+ `;function mu(t,e){let{authenticationRequired:r,session:o}=K.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var _a=class extends _o{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Vc=class t extends cn{static build(e){return new t(K,e)}constructor(e,r){super(),this.store=e,this.cache=new Et,this.withManualResources=!0,this.userLocaleService=new _a,this.cleanSessionDebouncer=new Ne,this.reloadDebouncer=new Ne(500),this.apiProvider=r??(()=>Tr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Ro.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>mu(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new xn(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},gu=Vc.build();var kr=class extends Event{constructor(e,r,o,a){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=o,this.subscribe=a??!1}};var Cn=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:o}=r;for(let{elementRef:a,callbackRef:i}of o){let s=a.deref(),c=i.deref();s===void 0||c===void 0||s.dispatchEvent(new kr(e.context,s,c,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],o=e.callback,a=this.pendingContextRequests.get(e.context);a===void 0&&this.pendingContextRequests.set(e.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(r);i===void 0&&a.callbacks.set(r,i=new WeakSet),i.has(o)||(i.add(o),a.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(o)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var $e=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Se=class extends Er{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=gu,this.contextRoot=new Cn}render(){return I`
2105
2105
  <slot></slot>
2106
2106
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>No.addContext(o)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};Se.elementDefinitions={};Se.styles=hu;$e([x()],Se.prototype,"baseUrl",void 0);$e([x()],Se.prototype,"apiIntegrationIdentifier",void 0);$e([x()],Se.prototype,"apiIntegrationAppVersion",void 0);$e([x()],Se.prototype,"uiLocale",void 0);$e([Fe(null)],Se.prototype,"availableUiLocales",void 0);$e([Fe(null)],Se.prototype,"metadataConfiguration",void 0);$e([x({type:Boolean})],Se.prototype,"editorMode",void 0);$e([x({type:Boolean})],Se.prototype,"noCustom",void 0);$e([x({type:Boolean})],Se.prototype,"openExternalDocumentInNewTab",void 0);$e([x({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],Se.prototype,"noCustomComponent",void 0);$e([x({type:Boolean})],Se.prototype,"withManualResources",void 0);$e([x({type:Boolean})],Se.prototype,"navigatorOnline",void 0);$e([x({type:Boolean})],Se.prototype,"forcedOffline",void 0);$e([x({type:Boolean})],Se.prototype,"authenticationRequired",void 0);$e([Fe([])],Se.prototype,"messageContexts",void 0);$e([Fe(void 0)],Se.prototype,"session",void 0);var yu={"ft-app-context":Se};ee(yu);var jc=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Mo=new jc;var g6=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Ln=Symbol("i18nAttributes"),bu=Symbol("i18nListAttributes"),vu=Symbol("i18nProperties"),Ia=Symbol("i18nContexts"),En=Symbol("i18nUnsubs"),To=Ie(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?wa:No}i18n(i){let{context:s,key:c,message:d}=i,{custom:u,args:g,argsProvider:m}=i;if(s&&c){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let y=g??(m?m(this):[]);return this.getI18nService(u).resolveMessage(s,c,...y)}return d}async awaitI18n(i){let{context:s,custom:c}=i;return s&&await this.getI18nService(c).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Mo.isI18nKey(i)){let[c,d]=i.split(".");return this.i18n({custom:!0,context:c,key:d,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,c,d)=>i.has(c)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,c,d)=>{var u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,c;let d=this,u=(g,m,y)=>y?.context&&y.key&&i(g,m,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...g})}:y;(s=this[Ln])===null||s===void 0||s.forEach((g,m)=>d[m]=u(g,m,d[m])),(c=this[bu])===null||c===void 0||c.forEach((g,m)=>{var y;return d[m]=(y=d[m])===null||y===void 0?void 0:y.map(b=>u(g,m,b))})}updateI18nProperties(i){var s;(s=this[vu])===null||s===void 0||s.forEach((c,d)=>{i(c,d)&&(this[d]=this.i18n(c))})}addI18nMessages(i,s,c){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,c)}addI18nContext(i,s,c){let d=(typeof i=="string"?i:i.name).toLowerCase();c=typeof i=="string"?c:i.custom,this[Ia].set(d,{isCustomContext:c}),this[En].has(d)||this[En].set(d,this.getI18nService(c).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(c).prepareContext(d,s)}hasI18nContext(i){return this[Ia].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ia].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[En].forEach(i=>i()),this[En].clear()}}return e=Ia,r=En,g6([x({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Na=class extends To(te){},Ma=class extends To(Er){};var Kc=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?Mo.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},y6=new Kc;var xu=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:kt,converter:Mo,...e}),r[Ln]=(a=r[Ln])!==null&&a!==void 0?a:new Map,r[Ln].set(o,t??{})};var nr=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?wa:No}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(o,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(o,a)=>()=>a}),this.attributes=new Proxy({},{get:(o,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var Su=T`
2107
2107
  `;var An=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},bt=class extends Ma{constructor(){super(),this.editorMode=!1,this.addStore(K)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":W:I`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ftds-combobox",
3
- "version": "2.1.15",
3
+ "version": "2.1.16",
4
4
  "description": "Single-select combobox for the Fluid Topics Design System",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,17 +20,17 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@fluid-topics/design-system-variables": "3.5.1",
23
- "@fluid-topics/ft-i18n": "2.1.15",
24
- "@fluid-topics/ft-wc-utils": "2.1.15",
25
- "@fluid-topics/ftds-base-input": "2.1.15",
26
- "@fluid-topics/ftds-chip-group": "2.1.15",
27
- "@fluid-topics/ftds-icon": "2.1.15",
28
- "@fluid-topics/ftds-notice": "2.1.15",
29
- "@fluid-topics/ftds-typography": "2.1.15",
23
+ "@fluid-topics/ft-i18n": "2.1.16",
24
+ "@fluid-topics/ft-wc-utils": "2.1.16",
25
+ "@fluid-topics/ftds-base-input": "2.1.16",
26
+ "@fluid-topics/ftds-chip-group": "2.1.16",
27
+ "@fluid-topics/ftds-icon": "2.1.16",
28
+ "@fluid-topics/ftds-notice": "2.1.16",
29
+ "@fluid-topics/ftds-typography": "2.1.16",
30
30
  "lit": "3.1.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@fluid-topics/ft-wc-test-utils": "2.1.15"
33
+ "@fluid-topics/ft-wc-test-utils": "2.1.16"
34
34
  },
35
- "gitHead": "d12bf72262e6788631943d88a02756661734c7d9"
35
+ "gitHead": "64057d048f5055bec9279a012204c826d10bc8fc"
36
36
  }