@fluid-topics/ftds-combobox 2.1.5 → 2.1.6
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.
- package/build/ftds-combobox.light.js +1 -1
- package/build/ftds-combobox.min.js +104 -104
- package/package.json +10 -10
|
@@ -1497,7 +1497,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
1497
1497
|
position: relative;
|
|
1498
1498
|
word-break: break-word;
|
|
1499
1499
|
}
|
|
1500
|
-
`;var K1=["top","right","bottom","left"],j1=["start","end"],Si=K1.reduce((t,e)=>t.concat(e,e+"-"+j1[0],e+"-"+j1[1]),[]),Uo=Math.min,Wt=Math.max,Bo=Math.round;var st=t=>({x:t,y:t}),Jp={left:"right",right:"left",bottom:"top",top:"bottom"};function Ci(t,e,r){return Wt(t,Uo(e,r))}function Mn(t,e){return typeof t=="function"?t(e):t}function Qr(t){return t.split("-")[0]}function Vt(t){return t.split("-")[1]}function Li(t){return t==="x"?"y":"x"}function Ei(t){return t==="y"?"height":"width"}function zn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ai(t){return Li(zn(t))}function Z1(t,e,r){r===void 0&&(r=!1);let n=Vt(t),a=Ai(t),i=Ei(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 q1(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function xi(t){let e=Qr(t);return Jp[e]+t.slice(e.length)}function e3(t){return{top:0,right:0,bottom:0,left:0,...t}}function Y1(t){return typeof t!="number"?e3(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 X1(t,e,r){let{reference:n,floating:a}=t,i=zn(e),s=Ai(e),l=Ei(s),u=Qr(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}}switch(Vt(e)){case"start":v[s]-=b*(r&&h?-1:1);break;case"end":v[s]+=b*(r&&h?-1:1);break}return v}async function Q1(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}=Mn(e,t),S=Y1(v),w=l[b?g==="floating"?"reference":"floating":g],O=fr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:u})),_=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)),P=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},V=fr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:k,strategy:u}):_);return{top:(O.top-V.top+S.top)/P.y,bottom:(V.bottom-O.bottom+S.bottom)/P.y,left:(O.left-V.left+S.left)/P.x,right:(V.right-O.right+S.right)/P.x}}var t3=50,J1=async(t,e,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:Q1},u=await(s.isRTL==null?void 0:s.isRTL(e)),h=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:g}=X1(h,n,u),b=n,v=0,S={};for(let C=0;C<i.length;C++){let w=i[C];if(!w)continue;let{name:O,fn:_}=w,{x:k,y:P,data:V,reset:J}=await _({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=P??g,S[O]={...S[O],...V},J&&v<t3&&(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}=X1(h,b,u)),C=-1)}return{x:m,y:g,placement:b,strategy:a,middlewareData:S}};function r3(t,e,r){return(t?[...r.filter(a=>Vt(a)===t),...r.filter(a=>Vt(a)!==t)]:r.filter(a=>Qr(a)===a)).filter(a=>t?Vt(a)===t||(e?q1(a)!==a:!1):!0)}var e2=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}=Mn(t,e),C=g!==void 0||b===Si?r3(g||null,v,b):b,w=await u.detectOverflow(e,S),O=((r=s.autoPlacement)==null?void 0:r.index)||0,_=C[O];if(_==null)return{};let k=Z1(_,i,await(u.isRTL==null?void 0:u.isRTL(h.floating)));if(l!==_)return{reset:{placement:C[0]}};let P=[w[Qr(_)],w[k[0]],w[k[1]]],V=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:P}],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 t2=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:O=>{let{x:_,y:k}=O;return{x:_,y:k}}},...h}=Mn(t,e),m={x:r,y:n},g=await i.detectOverflow(e,h),b=zn(Qr(a)),v=Li(b),S=m[v],C=m[b];if(s){let O=v==="y"?"top":"left",_=v==="y"?"bottom":"right",k=S+g[O],P=S-g[_];S=Ci(k,S,P)}if(l){let O=b==="y"?"top":"left",_=b==="y"?"bottom":"right",k=C+g[O],P=C-g[_];C=Ci(k,C,P)}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 Tn(){return typeof window<"u"}function hr(t){return o2(t)?(t.nodeName||"").toLowerCase():"#document"}function Me(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function gt(t){var e;return(e=(o2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function o2(t){return Tn()?t instanceof Node||t instanceof Me(t).Node:!1}function je(t){return Tn()?t instanceof Element||t instanceof Me(t).Element:!1}function yt(t){return Tn()?t instanceof HTMLElement||t instanceof Me(t).HTMLElement:!1}function r2(t){return!Tn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Me(t).ShadowRoot}function Jr(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 n2(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 o3=/transform|translate|scale|rotate|perspective|filter/,n3=/paint|layout|strict|content/,pr=t=>!!t&&t!=="none",Oi;function eo(t){let e=je(t)?Ke(t):t;return pr(e.transform)||pr(e.translate)||pr(e.scale)||pr(e.rotate)||pr(e.perspective)||!Pn()&&(pr(e.backdropFilter)||pr(e.filter))||o3.test(e.willChange||"")||n3.test(e.contain||"")}function a2(t){let e=Nt(t);for(;yt(e)&&!mr(e);){if(eo(e))return e;if(Fo(e))return null;e=Nt(e)}return null}function Pn(){return Oi==null&&(Oi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Oi}function mr(t){return/^(html|body|#document)$/.test(hr(t))}function Ke(t){return Me(t).getComputedStyle(t)}function Ho(t){return je(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Nt(t){if(hr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||r2(t)&&t.host||gt(t);return r2(e)?e.host:e}function i2(t){let e=Nt(t);return mr(e)?t.ownerDocument?t.ownerDocument.body:t.body:yt(e)&&Jr(e)?e:i2(e)}function kn(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=i2(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),s=Me(a);if(i){let l=Dn(s);return e.concat(s,s.visualViewport||[],Jr(a)?a:[],l&&r?kn(l):[])}else return e.concat(a,kn(a,[],r))}function Dn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function d2(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=Bo(r)!==i||Bo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function u2(t){return je(t)?t:t.contextElement}function to(t){let e=u2(t);if(!yt(e))return st(1);let r=e.getBoundingClientRect(),{width:n,height:a,$:i}=d2(e),s=(i?Bo(r.width):r.width)/n,l=(i?Bo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var a3=st(0);function f2(t){let e=Me(t);return!Pn()||!e.visualViewport?a3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function i3(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Me(t)?!1:e}function Go(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=u2(t),s=st(1);e&&(n?je(n)&&(s=to(n)):s=to(t));let l=i3(i,r,n)?f2(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=Me(i),v=n&&je(n)?Me(n):n,S=b,C=Dn(S);for(;C&&n&&v!==S;){let w=to(C),O=C.getBoundingClientRect(),_=Ke(C),k=O.left+(C.clientLeft+parseFloat(_.paddingLeft))*w.x,P=O.top+(C.clientTop+parseFloat(_.paddingTop))*w.y;u*=w.x,h*=w.y,m*=w.x,g*=w.y,u+=k,h+=P,S=Me(C),C=Dn(S)}}return fr({width:m,height:g,x:u,y:h})}function $n(t,e){let r=Ho(t).scrollLeft;return e?e.left+r:Go(gt(t)).left+r}function p2(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-$n(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function s3(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"||Jr(s))&&(u=Ho(n)),g)){let v=Go(n);h=to(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let b=s&&!g&&!i?p2(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 c3(t){return Array.from(t.getClientRects())}function l3(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+$n(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 s2=25;function d3(t,e){let r=Me(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=Pn();(!m||m&&e==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let h=$n(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<=s2&&(i-=S)}else h<=s2&&(i+=h);return{width:i,height:s,x:l,y:u}}function u3(t,e){let r=Go(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=yt(t)?to(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 c2(t,e,r){let n;if(e==="viewport")n=d3(t,r);else if(e==="document")n=l3(gt(t));else if(je(e))n=u3(e,r);else{let a=f2(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return fr(n)}function h2(t,e){let r=Nt(t);return r===e||!je(r)||mr(r)?!1:Ke(r).position==="fixed"||h2(r,e)}function f3(t,e){let r=e.get(t);if(r)return r;let n=kn(t,[],!1).filter(l=>je(l)&&hr(l)!=="body"),a=null,i=Ke(t).position==="fixed",s=i?Nt(t):t;for(;je(s)&&!mr(s);){let l=Ke(s),u=eo(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Jr(s)&&!u&&h2(t,s))?n=n.filter(m=>m!==s):a=l,s=Nt(s)}return e.set(t,n),n}function p3(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t,s=[...r==="clippingAncestors"?Fo(e)?[]:f3(e,this._c):[].concat(r),n],l=c2(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=c2(e,s[b],a);u=Wt(v.top,u),h=Uo(v.right,h),m=Uo(v.bottom,m),g=Wt(v.left,g)}return{width:h-g,height:m-u,x:g,y:u}}function h3(t){let{width:e,height:r}=d2(t);return{width:e,height:r}}function m3(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=$n(a)}if(n||!n&&!i)if((hr(e)!=="body"||Jr(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?p2(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 wi(t){return Ke(t).position==="static"}function l2(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 m2(t,e){let r=Me(t);if(Fo(t))return r;if(!yt(t)){let a=Nt(t);for(;a&&!mr(a);){if(je(a)&&!wi(a))return a;a=Nt(a)}return r}let n=l2(t,e);for(;n&&n2(n)&&wi(n);)n=l2(n,e);return n&&mr(n)&&wi(n)&&!eo(n)?r:n||a2(t)||r}var g3=async function(t){let e=this.getOffsetParent||m2,r=this.getDimensions,n=await r(t.floating);return{reference:m3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function y3(t){return Ke(t).direction==="rtl"}var Un={convertOffsetParentRelativeRectToViewportRelativeRect:s3,getDocumentElement:gt,getClippingRect:p3,getOffsetParent:m2,getElementRects:g3,getClientRects:c3,getDimensions:h3,getScale:to,isElement:je,isRTL:y3};var g2=e2,y2=t2;var b2=(t,e,r)=>{let n=new Map,a={platform:Un,...r},i={...a.platform,_c:n};return J1(t,e,{...a,platform:i})};function v2(t){return b3(t)}function Ri(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function b3(t){for(let e=t;e;e=Ri(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Ri(t);e;e=Ri(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||eo(r)||e.tagName==="BODY"))return e}return null}async function x2(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},b2(t,e,{strategy:n.strategy,platform:{...Un,getOffsetParent:a=>Un.getOffsetParent(a,v2)},middleware:[y2({crossAxis:!0}),g2({allowedPlacements:[n.placement]})]})}var mo=x(I());var es=x(ee());var S2=x(ee(),1);var Ni=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function C2(t,e){return(0,S2.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 v3(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(!Bn(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(!Bn(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(!Bn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Bn(t,e){try{return v3(t,e)}catch{return!1}}function Vo(t,e){return!Bn(t,e)}function Wo(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Fn(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 L2=x(ee(),1);var _i=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:Vo,attribute:!1,...e};(0,L2.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 Hn=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 Gn=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 A2=x(B(),1);var Wn=globalThis,x3=Wn.ShadowRoot&&(Wn.ShadyCSS===void 0||Wn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var E2=(t,e)=>{if(x3)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),a=Wn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,t.appendChild(n)}};var Vn=class extends A2.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 E2(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){Ni(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 O2(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 oo=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},_2,w2=Symbol("constructorPrototype"),R2=Symbol("constructorName"),I2=Symbol("exportpartsDebouncer"),N2=Symbol("dynamicDependenciesLoaded"),ro=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ro.eventName="exportparts-updated";var bt=class extends Vn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[_2]=new Gn(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[I2].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[R2]=this.constructor.name,this[w2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[R2]&&Object.setPrototypeOf(this,this[w2])}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[N2]||(r[N2]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ro.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ro.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 ro)})}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=O2(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(w=>w.split(":")[1]))!==null&&l!==void 0?l:[],C=[...v,...S].filter(u).map(w=>w.trim());for(let w of C)m.add(w)}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(", ")}};_2=I2;oo([(0,gr.property)()],bt.prototype,"exportpartsPrefix",void 0);oo([C2([])],bt.prototype,"exportpartsPrefixes",void 0);oo([(0,gr.property)({reflect:!0})],bt.prototype,"exportparts",void 0);oo([(0,gr.property)()],bt.prototype,"customStylesheet",void 0);oo([(0,gr.property)()],bt.prototype,"elementToFocus",void 0);oo([(0,gr.state)()],bt.prototype,"useAdoptedStyleSheets",void 0);function jn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var jo=Symbol("internalReduxEventsUnsubscribers"),jt=Symbol("internalStoresUnsubscribers"),yr=Symbol("internalStores"),S3=Fn(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,[]),jn(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}),M2=class extends S3(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 _t(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)===N3})(t)||Array.isArray(t)||!!t[U2]||!!(!((e=t.constructor)===null||e===void 0)&&e[U2])||Ui(t)||Bi(t))}function br(t,e,r){r===void 0&&(r=!1),io(t)===0?(r?Object.keys:ao)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function io(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ui(t)?2:Bi(t)?3:0}function no(t,e){return io(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function C3(t,e){return io(t)===2?t.get(e):t[e]}function B2(t,e,r){var n=io(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function F2(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ui(t){return w3&&t instanceof Map}function Bi(t){return R3&&t instanceof Set}function Kt(t){return t.o||t.t}function Fi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=W2(t);delete e[re];for(var r=ao(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 Hi(t,e){return e===void 0&&(e=!1),Gi(t)||_t(t)||!ct(t)||(io(t)>1&&(t.set=t.add=t.clear=t.delete=L3),Object.freeze(t),e&&br(t,(function(r,n){return Hi(n,!0)}),!0)),t}function L3(){Ze(2)}function Gi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function vt(t){var e=$i[t];return e||Ze(18,t),e}function E3(t,e){$i[t]||($i[t]=e)}function Ti(){return Zo}function Ii(t,e){e&&(vt("Patches"),t.u=[],t.s=[],t.v=e)}function Kn(t){Pi(t),t.p.forEach(A3),t.p=null}function Pi(t){t===Zo&&(Zo=t.l)}function z2(t){return Zo={p:[],l:Zo,h:t,m:!0,_:0}}function A3(t){var e=t[re];e.i===0||e.i===1?e.j():e.g=!0}function Mi(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&&(Kn(e),Ze(4)),ct(t)&&(t=Zn(e,t),e.l||qn(e,t)),e.u&&vt("Patches").M(r[re].t,t,e.u,e.s)):t=Zn(e,r,[]),Kn(e),e.u&&e.v(e.u,e.s),t!==G2?t:void 0}function Zn(t,e,r){if(Gi(e))return e;var n=e[re];if(!n)return br(e,(function(l,u){return k2(t,n,e,l,u,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return qn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Fi(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 k2(t,n,a,l,u,r,s)})),qn(t,a,!1),r&&t.u&&vt("Patches").N(n,r,t.u,t.s)}return n.o}function k2(t,e,r,n,a,i,s){if(_t(a)){var l=Zn(t,a,i&&e&&e.i!==3&&!no(e.R,n)?i.concat(n):void 0);if(B2(r,n,l),!_t(l))return;t.m=!1}else s&&r.add(a);if(ct(a)&&!Gi(a)){if(!t.h.D&&t._<1)return;Zn(t,a),e&&e.A.l||qn(t,a)}}function qn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Hi(e,r)}function zi(t,e){var r=t[re];return(r?Kt(r):t)[e]}function T2(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 ki(t){t.o||(t.o=Fi(t.t))}function Di(t,e,r){var n=Ui(e)?vt("MapSet").F(e,r):Bi(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:Ti(),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:Ti()).p.push(n),n}function O3(t){return _t(t)||Ze(22,t),(function e(r){if(!ct(r))return r;var n,a=r[re],i=io(r);if(a){if(!a.P&&(a.i<4||!vt("ES5").K(a)))return a.t;a.I=!0,n=P2(r,i),a.I=!1}else n=P2(r,i);return br(n,(function(s,l){a&&C3(a.t,s)===l||B2(n,s,e(l))})),i===3?new Set(n):n})(t)}function P2(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Fi(t)}function H2(){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=ao(u),m=h.length-1;m>=0;m--){var g=h[m];if(g!==re){var b=l[g];if(b===void 0&&!no(l,g))return!0;var v=u[g],S=v&&v[re];if(S?S.t!==b:!F2(v,b))return!0}}var C=!!l[re];return h.length!==ao(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={};E3("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=W2(b);delete C[re];for(var w=ao(C),O=0;O<w.length;O++){var _=w[O];C[_]=t(_,g||!!C[_].enumerable)}return Object.create(Object.getPrototypeOf(b),C)})(u,s),m={i:u?5:4,A:l?l.A:Ti(),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?_t(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(P){P!==re&&(b[P]!==void 0||no(b,P)?S[P]||h(v[P]):(S[P]=!0,Zt(g)))})),br(b,(function(P){v[P]!==void 0||no(v,P)||(S[P]=!1,Zt(g))}));else if(C===5){if(n(g)&&(Zt(g),S.length=!0),v.length<b.length)for(var w=v.length;w<b.length;w++)S[w]=!1;else for(var O=b.length;O<v.length;O++)S[O]=!0;for(var _=Math.min(v.length,b.length),k=0;k<_;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 D2,Zo,Wi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",w3=typeof Map<"u",R3=typeof Set<"u",$2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",G2=Wi?Symbol.for("immer-nothing"):((D2={})["immer-nothing"]=!0,D2),U2=Wi?Symbol.for("immer-draftable"):"__$immer_draftable",re=Wi?Symbol.for("immer-state"):"__$immer_state";var N3=""+Object.prototype.constructor,ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,W2=Object.getOwnPropertyDescriptors||function(t){var e={};return ao(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},$i={},qo={get:function(t,e){if(e===re)return t;var r=Kt(t);if(!no(r,e))return(function(a,i,s){var l,u=T2(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===zi(t.t,e)?(ki(t),t.o[e]=Di(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=T2(Kt(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=zi(Kt(t),e),i=a?.[re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(F2(r,a)&&(r!==void 0||no(t.t,e)))return!0;ki(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 zi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ki(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 _3=(function(){function t(r){var n=this;this.O=$2,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 w=this;C===void 0&&(C=l);for(var O=arguments.length,_=Array(O>1?O-1:0),k=1;k<O;k++)_[k-1]=arguments[k];return u.produce(C,(function(P){var V;return(V=i).call.apply(V,[w,P].concat(_))}))}}var h;if(typeof i!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),ct(a)){var m=z2(n),g=Di(n,a,void 0),b=!0;try{h=i(g),b=!1}finally{b?Kn(m):Pi(m)}return typeof Promise<"u"&&h instanceof Promise?h.then((function(C){return Ii(m,s),Mi(C,m)}),(function(C){throw Kn(m),C})):(Ii(m,s),Mi(h,m))}if(!a||typeof a!="object"){if((h=i(a))===void 0&&(h=a),h===G2&&(h=void 0),n.D&&Hi(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),_t(r)&&(r=O3(r));var n=z2(this),a=Di(this,r,void 0);return a[re].C=!0,Pi(n),a},e.finishDraft=function(r,n){var a=r&&r[re],i=a.A;return Ii(i,n),Mi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!$2&&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 _t(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Ue=new _3,I3=Ue.produce,Oy=Ue.produceWithPatches.bind(Ue),wy=Ue.setAutoFreeze.bind(Ue),Ry=Ue.setUseProxies.bind(Ue),Ny=Ue.applyPatches.bind(Ue),_y=Ue.createDraft.bind(Ue),Iy=Ue.finishDraft.bind(Ue),Yn=I3;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 V2(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 j2(t){var e=V2(t,"string");return vr(e)=="symbol"?e:e+""}function K2(t,e,r){return(e=j2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z2(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 Vi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Z2(Object(r),!0).forEach(function(n){K2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Z2(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 q2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),ji=function(){return Math.random().toString(36).substring(7).split("").join(".")},Xn={INIT:"@@redux/INIT"+ji(),REPLACE:"@@redux/REPLACE"+ji(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ji()}};function M3(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 Ki(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(Ki)(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 w=!0;return h(),l.push(C),function(){if(w){if(u)throw new Error(Le(6));w=!1,h();var _=l.indexOf(C);l.splice(_,1),s=null}}}function b(C){if(!M3(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 w=s=l,O=0;O<w.length;O++){var _=w[O];_()}return C}function v(C){if(typeof C!="function")throw new Error(Le(10));a=C,b({type:Xn.REPLACE})}function S(){var C,w=g;return C={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(Le(11));function k(){_.next&&_.next(m())}k();var P=w(k);return{unsubscribe:P}}},C[q2]=function(){return this},C}return b({type:Xn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:v},n[q2]=S,n}function z3(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:Xn.INIT});if(typeof n>"u")throw new Error(Le(12));if(typeof r(void 0,{type:Xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Le(13))})}function Y2(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{z3(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],w=r[C],O=h[C],_=w(O,m);if(typeof _>"u"){var k=m&&m.type;throw new Error(Le(14))}v[C]=_,b=b||_!==O}return b=b||i.length!==Object.keys(h).length,b?v:h}}function so(){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 X2(){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=so.apply(void 0,l)(a.dispatch),Vi(Vi({},a),{},{dispatch:i})}}}function Q2(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 J2=Q2();J2.withExtraArgument=Q2;var Zi=J2;var nd=(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)}})(),k3=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}}},co=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},T3=Object.defineProperty,P3=Object.defineProperties,D3=Object.getOwnPropertyDescriptors,ed=Object.getOwnPropertySymbols,$3=Object.prototype.hasOwnProperty,U3=Object.prototype.propertyIsEnumerable,td=function(t,e,r){return e in t?T3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},qt=function(t,e){for(var r in e||(e={}))$3.call(e,r)&&td(t,r,e[r]);if(ed)for(var n=0,a=ed(e);n<a.length;n++){var r=a[n];U3.call(e,r)&&td(t,r,e[r])}return t},qi=function(t,e){return P3(t,D3(e))},B3=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 F3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?so:so.apply(null,arguments)},qy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function H3(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 G3=(function(t){nd(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,co([void 0],r[0].concat(this)))):new(e.bind.apply(e,co([void 0],r.concat(this))))},e})(Array),W3=(function(t){nd(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,co([void 0],r[0].concat(this)))):new(e.bind.apply(e,co([void 0],r.concat(this))))},e})(Array);function Qi(t){return ct(t)?Yn(t,function(){}):t}function V3(t){return typeof t=="boolean"}function j3(){return function(e){return K3(e)}}function K3(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 G3;if(r&&(V3(r)?h.push(Zi):h.push(Zi.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var g;if(u)var b}return h}var Yi=!0;function ad(t){var e=j3(),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(H3(a))v=Y2(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),!Yi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yi&&S.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=X2.apply(void 0,S),w=so;u&&(w=F3(qt({trace:!Yi},typeof u=="object"&&u)));var O=new W3(C),_=O;Array.isArray(b)?_=co([C],b):typeof b=="function"&&(_=b(O));var k=w.apply(void 0,_);return Ki(v,m,k)}function id(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 Z3(t){return typeof t=="function"}function q3(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?id(e):[e,r,n],i=a[0],s=a[1],l=a[2],u;if(Z3(t))u=function(){return Qi(t())};else{var h=Qi(t);u=function(){return h}}function m(g,b){g===void 0&&(g=u());var v=co([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(_t(S)){var w=S,O=C(w,b);return O===void 0?S:O}else{if(ct(S))return Yn(S,function(_){return C(_,b)});var O=C(S,b);if(O===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return S},g)}return m.getInitialState=u,m}function Y3(t,e){return t+"/"+e}function sd(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:Qi(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],b=Y3(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"?id(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,v=m[1],S=v===void 0?[]:v,C=m[2],w=C===void 0?void 0:C,O=qt(qt({},b),s);return q3(r,function(_){for(var k in O)_.addCase(k,O[k]);for(var P=0,V=S;P<V.length;P++){var J=V[P];_.addMatcher(J.matcher,J.reducer)}w&&_.addDefaultCase(w)})}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 X3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Q3=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=X3[Math.random()*64|0];return e},J3=["name","message","stack","code"],Xi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),rd=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),e6=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=J3;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},Jy=(function(){function t(e,r,n){var a=Yt(e+"/fulfilled",function(m,g,b,v){return{payload:m,meta:qi(qt({},v||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Yt(e+"/pending",function(m,g,b){return{payload:void 0,meta:qi(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||e6)(m||"Rejected"),meta:qi(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):Q3(),C=new u,w,O=!1;function _(P){w=P,C.abort()}var k=(function(){return B3(this,null,function(){var P,V,J,pt,rr,ht,Te;return k3(this,function(Ge){switch(Ge.label){case 0:return Ge.trys.push([0,4,,5]),pt=(P=n?.condition)==null?void 0:P.call(n,m,{getState:b,extra:v}),r6(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 O=!0,rr=new Promise(function(Pe,or){return C.signal.addEventListener("abort",function(){return or({name:"AbortError",message:w||"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:_,rejectWithValue:function(Pe,or){return new Xi(Pe,or)},fulfillWithValue:function(Pe,or){return new rd(Pe,or)}})).then(function(Pe){if(Pe instanceof Xi)throw Pe;return Pe instanceof rd?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 Xi?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:_,requestId:S,arg:m,unwrap:function(){return k.then(t6)}})}}return Object.assign(h,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function t6(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function r6(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var cd="listener",ld="completed",dd="cancelled",e9="task-"+dd,t9="task-"+ld,r9=cd+"-"+dd,o9=cd+"-"+ld;var Ji="listenerMiddleware";var n9=Yt(Ji+"/add"),a9=Yt(Ji+"/removeAll"),i9=Yt(Ji+"/remove");var od,s9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(od||(od=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},o6=function(t){return function(e){setTimeout(e,t)}},c9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:o6(10);H2();var n6=Fn(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)}}}),Qn=class extends n6(Object){};window.ftReduxStores||(window.ftReduxStores={});var ud=class t extends Qn{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(jn(i))return i;if(a==null)return;let s=sd({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=ad({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 Hn;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 Jn=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 ea=x(I()),a6="ft-app-info",lo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};lo.eventName="authentication-change";var Yo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Yo.eventName="ui-locale-changed";var i6={session:(t,e)=>{(0,ea.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new lo(e.payload)),0))}},F=ea.FtReduxStore.get({name:a6,reducers:i6,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 fd=x(I()),ta=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},P9=(0,fd.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=>Jn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ta([(0,es.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ta([(0,es.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ta([_i({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),ta([_i({store:F.name})],e.prototype,"uiLocale",void 0),e});var pd;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(pd||(pd={}));var hd;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(hd||(hd={}));var md;(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"})(md||(md={}));var gd;(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"})(gd||(gd={}));var yd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(yd||(yd={}));var bd;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(bd||(bd={}));var vd;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(vd||(vd={}));var xd;(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"})(xd||(xd={}));var Sd;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Sd||(Sd={}));var Cd;(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"})(Cd||(Cd={}));var Ld;(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"})(Ld||(Ld={}));var Ed;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ed||(Ed={}));var Ad;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ad||(Ad={}));var Od;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Od||(Od={}));var wd;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(wd||(wd={}));var Rd;(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"})(Rd||(Rd={}));var Nd;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nd||(Nd={}));var _d;(function(t){t.ASC="ASC",t.DESC="DESC"})(_d||(_d={}));var Id;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Id||(Id={}));var Md;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Md||(Md={}));var zd;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(zd||(zd={}));var kd;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(kd||(kd={}));var Td;(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"})(Td||(Td={}));var Pd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Pd||(Pd={}));var Dd;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Dd||(Dd={}));var $d;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})($d||($d={}));var Ud;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ud||(Ud={}));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 Bd;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Bd||(Bd={}));var Fd;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Fd||(Fd={}));var Hd;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Hd||(Hd={}));var Gd;(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.OTHER="OTHER"})(Gd||(Gd={}));var Wd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Wd||(Wd={}));var Vd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Vd||(Vd={}));var jd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(jd||(jd={}));var Kd;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Kd||(Kd={}));var Zd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Zd||(Zd={}));var qd;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(qd||(qd={}));var Yd;(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"})(Yd||(Yd={}));var Xd;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Xd||(Xd={}));var s6={[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 Qd(t,e){return t===e||(s6[t]??[]).some(r=>Qd(r,e))}function Jd(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=>Qd(n,e))}var ia=x(I());var ts=x(I());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 uo=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 uo{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 ts.CacheRegistry,this.cache=e?a.commonCache:new ts.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 ra=class extends Be{async listMySearches(){let{session:e}=F.getState();return Jd(e,ge.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var oa=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 na=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 aa=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 c6="ft-user-assets",l6={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;os(t,r,[...rs(t,r),a]),e0(t,r,1,n),t0(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;os(t,r,rs(t,r).map(a=>a.id===n.id?n:a)),t0(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;os(t,r,rs(t,r).filter(i=>i.id!==a)),e0(t,r,-1,n)}},r0={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},rs=(t,e)=>{var r;let n=r0[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},os=(t,e,r)=>{let n=r0[e];n&&(t[n]=r)},e0=(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)}},t0=(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)},_e=ia.FtReduxStore.get({name:c6,reducers:l6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ns=class{constructor(e=new na,r=new aa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new oa,this.savedSearchesService=new ra,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();(0,ia.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(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&_e.getState().assetCounts.allAsset[e]!==r.count&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&_e.getState().assetCounts.bookmarkByMap[e]!==r.count&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;e===qe.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.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;_e.actions.bookmarks(r)}}},d6=new ns;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=d6);var as=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new as;var Ye=x(I());var o0,fo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},u6=Symbol("clearAfterUnitTest"),sa=class extends(0,Ye.withEventBus)(Be){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[o0]=()=>{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 fo({loadedContexts:e})),this.dispatchEvent(new fo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new fo({loadedContexts:[e]})),this.dispatchEvent(new fo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};o0=u6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends sa{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends sa{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var po=window.FluidTopicsI18nService,ca=window.FluidTopicsCustomI18nService;var n0=x(I()),is=class{highlightHtml(e,r,n){(0,n0.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new is;var a0=x(I());var ss=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 a0.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 ss;var i0=x(I());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 i0.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var cs=class{urlToSearchRequest(e){return Xo.get().parse(e)}searchRequestToUrl(e){return Xo.get().serialize(e)}};window.FluidTopicsUrlService=new cs;var It=x(I());var Sr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Sr.eventName="change";var ls=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))}},s0=new ls;var la=class t extends It.WithEventBus{static build(){return new t(window.history,s0,()=>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,It.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,It.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,It.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,It.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,It.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=la.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 c0=x(B());var l0=c0.css`
|
|
1500
|
+
`;var K1=["top","right","bottom","left"],j1=["start","end"],Si=K1.reduce((t,e)=>t.concat(e,e+"-"+j1[0],e+"-"+j1[1]),[]),Uo=Math.min,Wt=Math.max,Bo=Math.round;var st=t=>({x:t,y:t}),Jp={left:"right",right:"left",bottom:"top",top:"bottom"};function Ci(t,e,r){return Wt(t,Uo(e,r))}function Mn(t,e){return typeof t=="function"?t(e):t}function Qr(t){return t.split("-")[0]}function Vt(t){return t.split("-")[1]}function Li(t){return t==="x"?"y":"x"}function Ei(t){return t==="y"?"height":"width"}function zn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ai(t){return Li(zn(t))}function Z1(t,e,r){r===void 0&&(r=!1);let n=Vt(t),a=Ai(t),i=Ei(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 q1(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function xi(t){let e=Qr(t);return Jp[e]+t.slice(e.length)}function e3(t){return{top:0,right:0,bottom:0,left:0,...t}}function Y1(t){return typeof t!="number"?e3(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 X1(t,e,r){let{reference:n,floating:a}=t,i=zn(e),s=Ai(e),l=Ei(s),u=Qr(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}}switch(Vt(e)){case"start":v[s]-=b*(r&&h?-1:1);break;case"end":v[s]+=b*(r&&h?-1:1);break}return v}async function Q1(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}=Mn(e,t),S=Y1(v),w=l[b?g==="floating"?"reference":"floating":g],O=fr(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:u})),_=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)),P=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},V=fr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:k,strategy:u}):_);return{top:(O.top-V.top+S.top)/P.y,bottom:(V.bottom-O.bottom+S.bottom)/P.y,left:(O.left-V.left+S.left)/P.x,right:(V.right-O.right+S.right)/P.x}}var t3=50,J1=async(t,e,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:Q1},u=await(s.isRTL==null?void 0:s.isRTL(e)),h=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:g}=X1(h,n,u),b=n,v=0,S={};for(let C=0;C<i.length;C++){let w=i[C];if(!w)continue;let{name:O,fn:_}=w,{x:k,y:P,data:V,reset:J}=await _({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=P??g,S[O]={...S[O],...V},J&&v<t3&&(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}=X1(h,b,u)),C=-1)}return{x:m,y:g,placement:b,strategy:a,middlewareData:S}};function r3(t,e,r){return(t?[...r.filter(a=>Vt(a)===t),...r.filter(a=>Vt(a)!==t)]:r.filter(a=>Qr(a)===a)).filter(a=>t?Vt(a)===t||(e?q1(a)!==a:!1):!0)}var e2=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}=Mn(t,e),C=g!==void 0||b===Si?r3(g||null,v,b):b,w=await u.detectOverflow(e,S),O=((r=s.autoPlacement)==null?void 0:r.index)||0,_=C[O];if(_==null)return{};let k=Z1(_,i,await(u.isRTL==null?void 0:u.isRTL(h.floating)));if(l!==_)return{reset:{placement:C[0]}};let P=[w[Qr(_)],w[k[0]],w[k[1]]],V=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:P}],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 t2=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:O=>{let{x:_,y:k}=O;return{x:_,y:k}}},...h}=Mn(t,e),m={x:r,y:n},g=await i.detectOverflow(e,h),b=zn(Qr(a)),v=Li(b),S=m[v],C=m[b];if(s){let O=v==="y"?"top":"left",_=v==="y"?"bottom":"right",k=S+g[O],P=S-g[_];S=Ci(k,S,P)}if(l){let O=b==="y"?"top":"left",_=b==="y"?"bottom":"right",k=C+g[O],P=C-g[_];C=Ci(k,C,P)}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 Tn(){return typeof window<"u"}function hr(t){return o2(t)?(t.nodeName||"").toLowerCase():"#document"}function Me(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function gt(t){var e;return(e=(o2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function o2(t){return Tn()?t instanceof Node||t instanceof Me(t).Node:!1}function je(t){return Tn()?t instanceof Element||t instanceof Me(t).Element:!1}function yt(t){return Tn()?t instanceof HTMLElement||t instanceof Me(t).HTMLElement:!1}function r2(t){return!Tn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Me(t).ShadowRoot}function Jr(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 n2(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 o3=/transform|translate|scale|rotate|perspective|filter/,n3=/paint|layout|strict|content/,pr=t=>!!t&&t!=="none",Oi;function eo(t){let e=je(t)?Ke(t):t;return pr(e.transform)||pr(e.translate)||pr(e.scale)||pr(e.rotate)||pr(e.perspective)||!Pn()&&(pr(e.backdropFilter)||pr(e.filter))||o3.test(e.willChange||"")||n3.test(e.contain||"")}function a2(t){let e=Nt(t);for(;yt(e)&&!mr(e);){if(eo(e))return e;if(Fo(e))return null;e=Nt(e)}return null}function Pn(){return Oi==null&&(Oi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Oi}function mr(t){return/^(html|body|#document)$/.test(hr(t))}function Ke(t){return Me(t).getComputedStyle(t)}function Ho(t){return je(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Nt(t){if(hr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||r2(t)&&t.host||gt(t);return r2(e)?e.host:e}function i2(t){let e=Nt(t);return mr(e)?t.ownerDocument?t.ownerDocument.body:t.body:yt(e)&&Jr(e)?e:i2(e)}function kn(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=i2(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),s=Me(a);if(i){let l=Dn(s);return e.concat(s,s.visualViewport||[],Jr(a)?a:[],l&&r?kn(l):[])}else return e.concat(a,kn(a,[],r))}function Dn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function d2(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=Bo(r)!==i||Bo(n)!==s;return l&&(r=i,n=s),{width:r,height:n,$:l}}function u2(t){return je(t)?t:t.contextElement}function to(t){let e=u2(t);if(!yt(e))return st(1);let r=e.getBoundingClientRect(),{width:n,height:a,$:i}=d2(e),s=(i?Bo(r.width):r.width)/n,l=(i?Bo(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var a3=st(0);function f2(t){let e=Me(t);return!Pn()||!e.visualViewport?a3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function i3(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Me(t)?!1:e}function Go(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=u2(t),s=st(1);e&&(n?je(n)&&(s=to(n)):s=to(t));let l=i3(i,r,n)?f2(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=Me(i),v=n&&je(n)?Me(n):n,S=b,C=Dn(S);for(;C&&n&&v!==S;){let w=to(C),O=C.getBoundingClientRect(),_=Ke(C),k=O.left+(C.clientLeft+parseFloat(_.paddingLeft))*w.x,P=O.top+(C.clientTop+parseFloat(_.paddingTop))*w.y;u*=w.x,h*=w.y,m*=w.x,g*=w.y,u+=k,h+=P,S=Me(C),C=Dn(S)}}return fr({width:m,height:g,x:u,y:h})}function $n(t,e){let r=Ho(t).scrollLeft;return e?e.left+r:Go(gt(t)).left+r}function p2(t,e){let r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-$n(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function s3(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"||Jr(s))&&(u=Ho(n)),g)){let v=Go(n);h=to(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let b=s&&!g&&!i?p2(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 c3(t){return Array.from(t.getClientRects())}function l3(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+$n(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 s2=25;function d3(t,e){let r=Me(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=Pn();(!m||m&&e==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let h=$n(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<=s2&&(i-=S)}else h<=s2&&(i+=h);return{width:i,height:s,x:l,y:u}}function u3(t,e){let r=Go(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,i=yt(t)?to(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 c2(t,e,r){let n;if(e==="viewport")n=d3(t,r);else if(e==="document")n=l3(gt(t));else if(je(e))n=u3(e,r);else{let a=f2(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return fr(n)}function h2(t,e){let r=Nt(t);return r===e||!je(r)||mr(r)?!1:Ke(r).position==="fixed"||h2(r,e)}function f3(t,e){let r=e.get(t);if(r)return r;let n=kn(t,[],!1).filter(l=>je(l)&&hr(l)!=="body"),a=null,i=Ke(t).position==="fixed",s=i?Nt(t):t;for(;je(s)&&!mr(s);){let l=Ke(s),u=eo(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Jr(s)&&!u&&h2(t,s))?n=n.filter(m=>m!==s):a=l,s=Nt(s)}return e.set(t,n),n}function p3(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t,s=[...r==="clippingAncestors"?Fo(e)?[]:f3(e,this._c):[].concat(r),n],l=c2(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=c2(e,s[b],a);u=Wt(v.top,u),h=Uo(v.right,h),m=Uo(v.bottom,m),g=Wt(v.left,g)}return{width:h-g,height:m-u,x:g,y:u}}function h3(t){let{width:e,height:r}=d2(t);return{width:e,height:r}}function m3(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=$n(a)}if(n||!n&&!i)if((hr(e)!=="body"||Jr(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?p2(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 wi(t){return Ke(t).position==="static"}function l2(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 m2(t,e){let r=Me(t);if(Fo(t))return r;if(!yt(t)){let a=Nt(t);for(;a&&!mr(a);){if(je(a)&&!wi(a))return a;a=Nt(a)}return r}let n=l2(t,e);for(;n&&n2(n)&&wi(n);)n=l2(n,e);return n&&mr(n)&&wi(n)&&!eo(n)?r:n||a2(t)||r}var g3=async function(t){let e=this.getOffsetParent||m2,r=this.getDimensions,n=await r(t.floating);return{reference:m3(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function y3(t){return Ke(t).direction==="rtl"}var Un={convertOffsetParentRelativeRectToViewportRelativeRect:s3,getDocumentElement:gt,getClippingRect:p3,getOffsetParent:m2,getElementRects:g3,getClientRects:c3,getDimensions:h3,getScale:to,isElement:je,isRTL:y3};var g2=e2,y2=t2;var b2=(t,e,r)=>{let n=new Map,a={platform:Un,...r},i={...a.platform,_c:n};return J1(t,e,{...a,platform:i})};function v2(t){return b3(t)}function Ri(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function b3(t){for(let e=t;e;e=Ri(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Ri(t);e;e=Ri(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||eo(r)||e.tagName==="BODY"))return e}return null}async function x2(t,e,r){let n;return typeof r=="object"?n=r:n={placement:r},b2(t,e,{strategy:n.strategy,platform:{...Un,getOffsetParent:a=>Un.getOffsetParent(a,v2)},middleware:[y2({crossAxis:!0}),g2({allowedPlacements:[n.placement]})]})}var mo=x(I());var es=x(ee());var S2=x(ee(),1);var Ni=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function C2(t,e){return(0,S2.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 v3(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(!Bn(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(!Bn(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(!Bn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Bn(t,e){try{return v3(t,e)}catch{return!1}}function Vo(t,e){return!Bn(t,e)}function Wo(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Fn(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 L2=x(ee(),1);var _i=t=>{let e=t??{};return(r,n)=>{var a;let i={hasChanged:Vo,attribute:!1,...e};(0,L2.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 Hn=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 Gn=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 A2=x(B(),1);var Wn=globalThis,x3=Wn.ShadowRoot&&(Wn.ShadyCSS===void 0||Wn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var E2=(t,e)=>{if(x3)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),a=Wn.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=r.cssText,t.appendChild(n)}};var Vn=class extends A2.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 E2(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){Ni(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 O2(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 oo=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},_2,w2=Symbol("constructorPrototype"),R2=Symbol("constructorName"),I2=Symbol("exportpartsDebouncer"),N2=Symbol("dynamicDependenciesLoaded"),ro=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ro.eventName="exportparts-updated";var bt=class extends Vn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[_2]=new Gn(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[I2].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[R2]=this.constructor.name,this[w2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[R2]&&Object.setPrototypeOf(this,this[w2])}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[N2]||(r[N2]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ro.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ro.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 ro)})}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=O2(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(w=>w.split(":")[1]))!==null&&l!==void 0?l:[],C=[...v,...S].filter(u).map(w=>w.trim());for(let w of C)m.add(w)}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(", ")}};_2=I2;oo([(0,gr.property)()],bt.prototype,"exportpartsPrefix",void 0);oo([C2([])],bt.prototype,"exportpartsPrefixes",void 0);oo([(0,gr.property)({reflect:!0})],bt.prototype,"exportparts",void 0);oo([(0,gr.property)()],bt.prototype,"customStylesheet",void 0);oo([(0,gr.property)()],bt.prototype,"elementToFocus",void 0);oo([(0,gr.state)()],bt.prototype,"useAdoptedStyleSheets",void 0);function jn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var jo=Symbol("internalReduxEventsUnsubscribers"),jt=Symbol("internalStoresUnsubscribers"),yr=Symbol("internalStores"),S3=Fn(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,[]),jn(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}),M2=class extends S3(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 _t(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)===N3})(t)||Array.isArray(t)||!!t[U2]||!!(!((e=t.constructor)===null||e===void 0)&&e[U2])||Ui(t)||Bi(t))}function br(t,e,r){r===void 0&&(r=!1),io(t)===0?(r?Object.keys:ao)(t).forEach((function(n){r&&typeof n=="symbol"||e(n,t[n],t)})):t.forEach((function(n,a){return e(a,n,t)}))}function io(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ui(t)?2:Bi(t)?3:0}function no(t,e){return io(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function C3(t,e){return io(t)===2?t.get(e):t[e]}function B2(t,e,r){var n=io(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function F2(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ui(t){return w3&&t instanceof Map}function Bi(t){return R3&&t instanceof Set}function Kt(t){return t.o||t.t}function Fi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=W2(t);delete e[re];for(var r=ao(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 Hi(t,e){return e===void 0&&(e=!1),Gi(t)||_t(t)||!ct(t)||(io(t)>1&&(t.set=t.add=t.clear=t.delete=L3),Object.freeze(t),e&&br(t,(function(r,n){return Hi(n,!0)}),!0)),t}function L3(){Ze(2)}function Gi(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function vt(t){var e=$i[t];return e||Ze(18,t),e}function E3(t,e){$i[t]||($i[t]=e)}function Ti(){return Zo}function Ii(t,e){e&&(vt("Patches"),t.u=[],t.s=[],t.v=e)}function Kn(t){Pi(t),t.p.forEach(A3),t.p=null}function Pi(t){t===Zo&&(Zo=t.l)}function z2(t){return Zo={p:[],l:Zo,h:t,m:!0,_:0}}function A3(t){var e=t[re];e.i===0||e.i===1?e.j():e.g=!0}function Mi(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&&(Kn(e),Ze(4)),ct(t)&&(t=Zn(e,t),e.l||qn(e,t)),e.u&&vt("Patches").M(r[re].t,t,e.u,e.s)):t=Zn(e,r,[]),Kn(e),e.u&&e.v(e.u,e.s),t!==G2?t:void 0}function Zn(t,e,r){if(Gi(e))return e;var n=e[re];if(!n)return br(e,(function(l,u){return k2(t,n,e,l,u,r)}),!0),e;if(n.A!==t)return e;if(!n.P)return qn(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Fi(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 k2(t,n,a,l,u,r,s)})),qn(t,a,!1),r&&t.u&&vt("Patches").N(n,r,t.u,t.s)}return n.o}function k2(t,e,r,n,a,i,s){if(_t(a)){var l=Zn(t,a,i&&e&&e.i!==3&&!no(e.R,n)?i.concat(n):void 0);if(B2(r,n,l),!_t(l))return;t.m=!1}else s&&r.add(a);if(ct(a)&&!Gi(a)){if(!t.h.D&&t._<1)return;Zn(t,a),e&&e.A.l||qn(t,a)}}function qn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Hi(e,r)}function zi(t,e){var r=t[re];return(r?Kt(r):t)[e]}function T2(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 ki(t){t.o||(t.o=Fi(t.t))}function Di(t,e,r){var n=Ui(e)?vt("MapSet").F(e,r):Bi(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:Ti(),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:Ti()).p.push(n),n}function O3(t){return _t(t)||Ze(22,t),(function e(r){if(!ct(r))return r;var n,a=r[re],i=io(r);if(a){if(!a.P&&(a.i<4||!vt("ES5").K(a)))return a.t;a.I=!0,n=P2(r,i),a.I=!1}else n=P2(r,i);return br(n,(function(s,l){a&&C3(a.t,s)===l||B2(n,s,e(l))})),i===3?new Set(n):n})(t)}function P2(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Fi(t)}function H2(){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=ao(u),m=h.length-1;m>=0;m--){var g=h[m];if(g!==re){var b=l[g];if(b===void 0&&!no(l,g))return!0;var v=u[g],S=v&&v[re];if(S?S.t!==b:!F2(v,b))return!0}}var C=!!l[re];return h.length!==ao(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={};E3("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=W2(b);delete C[re];for(var w=ao(C),O=0;O<w.length;O++){var _=w[O];C[_]=t(_,g||!!C[_].enumerable)}return Object.create(Object.getPrototypeOf(b),C)})(u,s),m={i:u?5:4,A:l?l.A:Ti(),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?_t(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(P){P!==re&&(b[P]!==void 0||no(b,P)?S[P]||h(v[P]):(S[P]=!0,Zt(g)))})),br(b,(function(P){v[P]!==void 0||no(v,P)||(S[P]=!1,Zt(g))}));else if(C===5){if(n(g)&&(Zt(g),S.length=!0),v.length<b.length)for(var w=v.length;w<b.length;w++)S[w]=!1;else for(var O=b.length;O<v.length;O++)S[O]=!0;for(var _=Math.min(v.length,b.length),k=0;k<_;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 D2,Zo,Wi=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",w3=typeof Map<"u",R3=typeof Set<"u",$2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",G2=Wi?Symbol.for("immer-nothing"):((D2={})["immer-nothing"]=!0,D2),U2=Wi?Symbol.for("immer-draftable"):"__$immer_draftable",re=Wi?Symbol.for("immer-state"):"__$immer_state";var N3=""+Object.prototype.constructor,ao=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,W2=Object.getOwnPropertyDescriptors||function(t){var e={};return ao(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},$i={},qo={get:function(t,e){if(e===re)return t;var r=Kt(t);if(!no(r,e))return(function(a,i,s){var l,u=T2(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===zi(t.t,e)?(ki(t),t.o[e]=Di(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=T2(Kt(t),e);if(n?.set)return n.set.call(t.k,r),!0;if(!t.P){var a=zi(Kt(t),e),i=a?.[re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(F2(r,a)&&(r!==void 0||no(t.t,e)))return!0;ki(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 zi(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,ki(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 _3=(function(){function t(r){var n=this;this.O=$2,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 w=this;C===void 0&&(C=l);for(var O=arguments.length,_=Array(O>1?O-1:0),k=1;k<O;k++)_[k-1]=arguments[k];return u.produce(C,(function(P){var V;return(V=i).call.apply(V,[w,P].concat(_))}))}}var h;if(typeof i!="function"&&Ze(6),s!==void 0&&typeof s!="function"&&Ze(7),ct(a)){var m=z2(n),g=Di(n,a,void 0),b=!0;try{h=i(g),b=!1}finally{b?Kn(m):Pi(m)}return typeof Promise<"u"&&h instanceof Promise?h.then((function(C){return Ii(m,s),Mi(C,m)}),(function(C){throw Kn(m),C})):(Ii(m,s),Mi(h,m))}if(!a||typeof a!="object"){if((h=i(a))===void 0&&(h=a),h===G2&&(h=void 0),n.D&&Hi(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),_t(r)&&(r=O3(r));var n=z2(this),a=Di(this,r,void 0);return a[re].C=!0,Pi(n),a},e.finishDraft=function(r,n){var a=r&&r[re],i=a.A;return Ii(i,n),Mi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!$2&&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 _t(r)?s(r,n):this.produce(r,(function(l){return s(l,n)}))},t})(),Ue=new _3,I3=Ue.produce,Oy=Ue.produceWithPatches.bind(Ue),wy=Ue.setAutoFreeze.bind(Ue),Ry=Ue.setUseProxies.bind(Ue),Ny=Ue.applyPatches.bind(Ue),_y=Ue.createDraft.bind(Ue),Iy=Ue.finishDraft.bind(Ue),Yn=I3;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 V2(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 j2(t){var e=V2(t,"string");return vr(e)=="symbol"?e:e+""}function K2(t,e,r){return(e=j2(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z2(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 Vi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Z2(Object(r),!0).forEach(function(n){K2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Z2(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 q2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),ji=function(){return Math.random().toString(36).substring(7).split("").join(".")},Xn={INIT:"@@redux/INIT"+ji(),REPLACE:"@@redux/REPLACE"+ji(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ji()}};function M3(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 Ki(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(Ki)(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 w=!0;return h(),l.push(C),function(){if(w){if(u)throw new Error(Le(6));w=!1,h();var _=l.indexOf(C);l.splice(_,1),s=null}}}function b(C){if(!M3(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 w=s=l,O=0;O<w.length;O++){var _=w[O];_()}return C}function v(C){if(typeof C!="function")throw new Error(Le(10));a=C,b({type:Xn.REPLACE})}function S(){var C,w=g;return C={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(Le(11));function k(){_.next&&_.next(m())}k();var P=w(k);return{unsubscribe:P}}},C[q2]=function(){return this},C}return b({type:Xn.INIT}),n={dispatch:b,subscribe:g,getState:m,replaceReducer:v},n[q2]=S,n}function z3(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:Xn.INIT});if(typeof n>"u")throw new Error(Le(12));if(typeof r(void 0,{type:Xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Le(13))})}function Y2(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{z3(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],w=r[C],O=h[C],_=w(O,m);if(typeof _>"u"){var k=m&&m.type;throw new Error(Le(14))}v[C]=_,b=b||_!==O}return b=b||i.length!==Object.keys(h).length,b?v:h}}function so(){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 X2(){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=so.apply(void 0,l)(a.dispatch),Vi(Vi({},a),{},{dispatch:i})}}}function Q2(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 J2=Q2();J2.withExtraArgument=Q2;var Zi=J2;var nd=(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)}})(),k3=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}}},co=function(t,e){for(var r=0,n=e.length,a=t.length;r<n;r++,a++)t[a]=e[r];return t},T3=Object.defineProperty,P3=Object.defineProperties,D3=Object.getOwnPropertyDescriptors,ed=Object.getOwnPropertySymbols,$3=Object.prototype.hasOwnProperty,U3=Object.prototype.propertyIsEnumerable,td=function(t,e,r){return e in t?T3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},qt=function(t,e){for(var r in e||(e={}))$3.call(e,r)&&td(t,r,e[r]);if(ed)for(var n=0,a=ed(e);n<a.length;n++){var r=a[n];U3.call(e,r)&&td(t,r,e[r])}return t},qi=function(t,e){return P3(t,D3(e))},B3=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 F3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?so:so.apply(null,arguments)},qy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function H3(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 G3=(function(t){nd(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,co([void 0],r[0].concat(this)))):new(e.bind.apply(e,co([void 0],r.concat(this))))},e})(Array),W3=(function(t){nd(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,co([void 0],r[0].concat(this)))):new(e.bind.apply(e,co([void 0],r.concat(this))))},e})(Array);function Qi(t){return ct(t)?Yn(t,function(){}):t}function V3(t){return typeof t=="boolean"}function j3(){return function(e){return K3(e)}}function K3(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 G3;if(r&&(V3(r)?h.push(Zi):h.push(Zi.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var g;if(u)var b}return h}var Yi=!0;function ad(t){var e=j3(),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(H3(a))v=Y2(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),!Yi&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yi&&S.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=X2.apply(void 0,S),w=so;u&&(w=F3(qt({trace:!Yi},typeof u=="object"&&u)));var O=new W3(C),_=O;Array.isArray(b)?_=co([C],b):typeof b=="function"&&(_=b(O));var k=w.apply(void 0,_);return Ki(v,m,k)}function id(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 Z3(t){return typeof t=="function"}function q3(t,e,r,n){r===void 0&&(r=[]);var a=typeof e=="function"?id(e):[e,r,n],i=a[0],s=a[1],l=a[2],u;if(Z3(t))u=function(){return Qi(t())};else{var h=Qi(t);u=function(){return h}}function m(g,b){g===void 0&&(g=u());var v=co([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(_t(S)){var w=S,O=C(w,b);return O===void 0?S:O}else{if(ct(S))return Yn(S,function(_){return C(_,b)});var O=C(S,b);if(O===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return S},g)}return m.getInitialState=u,m}function Y3(t,e){return t+"/"+e}function sd(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:Qi(t.initialState),n=t.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],b=Y3(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"?id(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,v=m[1],S=v===void 0?[]:v,C=m[2],w=C===void 0?void 0:C,O=qt(qt({},b),s);return q3(r,function(_){for(var k in O)_.addCase(k,O[k]);for(var P=0,V=S;P<V.length;P++){var J=V[P];_.addMatcher(J.matcher,J.reducer)}w&&_.addDefaultCase(w)})}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 X3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Q3=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=X3[Math.random()*64|0];return e},J3=["name","message","stack","code"],Xi=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),rd=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),e6=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=J3;r<n.length;r++){var a=n[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},Jy=(function(){function t(e,r,n){var a=Yt(e+"/fulfilled",function(m,g,b,v){return{payload:m,meta:qi(qt({},v||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),i=Yt(e+"/pending",function(m,g,b){return{payload:void 0,meta:qi(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||e6)(m||"Rejected"),meta:qi(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):Q3(),C=new u,w,O=!1;function _(P){w=P,C.abort()}var k=(function(){return B3(this,null,function(){var P,V,J,pt,rr,ht,Te;return k3(this,function(Ge){switch(Ge.label){case 0:return Ge.trys.push([0,4,,5]),pt=(P=n?.condition)==null?void 0:P.call(n,m,{getState:b,extra:v}),r6(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 O=!0,rr=new Promise(function(Pe,or){return C.signal.addEventListener("abort",function(){return or({name:"AbortError",message:w||"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:_,rejectWithValue:function(Pe,or){return new Xi(Pe,or)},fulfillWithValue:function(Pe,or){return new rd(Pe,or)}})).then(function(Pe){if(Pe instanceof Xi)throw Pe;return Pe instanceof rd?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 Xi?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:_,requestId:S,arg:m,unwrap:function(){return k.then(t6)}})}}return Object.assign(h,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function t6(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function r6(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var cd="listener",ld="completed",dd="cancelled",e9="task-"+dd,t9="task-"+ld,r9=cd+"-"+dd,o9=cd+"-"+ld;var Ji="listenerMiddleware";var n9=Yt(Ji+"/add"),a9=Yt(Ji+"/removeAll"),i9=Yt(Ji+"/remove");var od,s9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(od||(od=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},o6=function(t){return function(e){setTimeout(e,t)}},c9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:o6(10);H2();var n6=Fn(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)}}}),Qn=class extends n6(Object){};window.ftReduxStores||(window.ftReduxStores={});var ud=class t extends Qn{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(jn(i))return i;if(a==null)return;let s=sd({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=ad({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 Hn;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 Jn=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 ea=x(I()),a6="ft-app-info",lo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};lo.eventName="authentication-change";var Yo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Yo.eventName="ui-locale-changed";var i6={session:(t,e)=>{(0,ea.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>F.dispatchEvent(new lo(e.payload)),0))}},F=ea.FtReduxStore.get({name:a6,reducers:i6,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 fd=x(I()),ta=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},P9=(0,fd.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=>Jn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ta([(0,es.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),ta([(0,es.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),ta([_i({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),ta([_i({store:F.name})],e.prototype,"uiLocale",void 0),e});var pd;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(pd||(pd={}));var hd;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(hd||(hd={}));var md;(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"})(md||(md={}));var gd;(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"})(gd||(gd={}));var yd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(yd||(yd={}));var bd;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(bd||(bd={}));var vd;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(vd||(vd={}));var xd;(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"})(xd||(xd={}));var Sd;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Sd||(Sd={}));var Cd;(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"})(Cd||(Cd={}));var Ld;(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"})(Ld||(Ld={}));var Ed;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ed||(Ed={}));var Ad;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Ad||(Ad={}));var Od;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Od||(Od={}));var wd;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(wd||(wd={}));var Rd;(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"})(Rd||(Rd={}));var Nd;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nd||(Nd={}));var _d;(function(t){t.ASC="ASC",t.DESC="DESC"})(_d||(_d={}));var Id;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Id||(Id={}));var Md;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Md||(Md={}));var zd;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(zd||(zd={}));var kd;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(kd||(kd={}));var Td;(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"})(Td||(Td={}));var Pd;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Pd||(Pd={}));var Dd;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Dd||(Dd={}));var $d;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})($d||($d={}));var Ud;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ud||(Ud={}));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 Bd;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Bd||(Bd={}));var Fd;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Fd||(Fd={}));var Hd;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Hd||(Hd={}));var Gd;(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"})(Gd||(Gd={}));var Wd;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Wd||(Wd={}));var Vd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Vd||(Vd={}));var jd;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(jd||(jd={}));var Kd;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Kd||(Kd={}));var Zd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(Zd||(Zd={}));var qd;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(qd||(qd={}));var Yd;(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"})(Yd||(Yd={}));var Xd;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Xd||(Xd={}));var s6={[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 Qd(t,e){return t===e||(s6[t]??[]).some(r=>Qd(r,e))}function Jd(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=>Qd(n,e))}var ia=x(I());var ts=x(I());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 uo=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 uo{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 ts.CacheRegistry,this.cache=e?a.commonCache:new ts.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 ra=class extends Be{async listMySearches(){let{session:e}=F.getState();return Jd(e,ge.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var oa=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 na=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 aa=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 c6="ft-user-assets",l6={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;os(t,r,[...rs(t,r),a]),e0(t,r,1,n),t0(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:n}=e.payload;os(t,r,rs(t,r).map(a=>a.id===n.id?n:a)),t0(t,n)},removeAsset:(t,e)=>{let{assetType:r,mapId:n,assetId:a}=e.payload;os(t,r,rs(t,r).filter(i=>i.id!==a)),e0(t,r,-1,n)}},r0={[qe.SEARCHES]:"savedSearches",[qe.BOOKMARKS]:"bookmarks",[qe.BOOKS]:void 0,[qe.COLLECTIONS]:void 0},rs=(t,e)=>{var r;let n=r0[e];return n?(r=t[n])!==null&&r!==void 0?r:[]:[]},os=(t,e,r)=>{let n=r0[e];n&&(t[n]=r)},e0=(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)}},t0=(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)},_e=ia.FtReduxStore.get({name:c6,reducers:l6,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(qe).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ns=class{constructor(e=new na,r=new aa){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=F.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new oa,this.savedSearchesService=new ra,F.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=F.getState();(0,ia.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(),_e.actions.clearAssetCount(),_e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),_e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),_e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();_e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();_e.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&_e.getState().assetCounts.allAsset[e]!==r.count&&_e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&_e.getState().assetCounts.bookmarkByMap[e]!==r.count&&_e.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(_e.getState().assetCounts.bookmarkByMap).length!==0;e===qe.BOOKMARKS&&r&&_e.actions.clearBookmarkCountByMap(),_e.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;_e.actions.bookmarks(r)}}},d6=new ns;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=d6);var as=class{addCommand(e,r=!1){F.commands.add(e,r)}consumeCommand(e){return F.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new as;var Ye=x(I());var o0,fo=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},u6=Symbol("clearAfterUnitTest"),sa=class extends(0,Ye.withEventBus)(Be){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[o0]=()=>{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 fo({loadedContexts:e})),this.dispatchEvent(new fo({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new fo({loadedContexts:[e]})),this.dispatchEvent(new fo({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(n=>(0,Ye.delay)(0).then(()=>n()).catch(()=>null)))}};o0=u6;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends sa{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends sa{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var po=window.FluidTopicsI18nService,ca=window.FluidTopicsCustomI18nService;var n0=x(I()),is=class{highlightHtml(e,r,n){(0,n0.highlightHtml)(e,r,n)}};window.FluidTopicsHighlightHtmlService=new is;var a0=x(I());var ss=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 a0.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 ss;var i0=x(I());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 i0.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var cs=class{urlToSearchRequest(e){return Xo.get().parse(e)}searchRequestToUrl(e){return Xo.get().serialize(e)}};window.FluidTopicsUrlService=new cs;var It=x(I());var Sr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Sr.eventName="change";var ls=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))}},s0=new ls;var la=class t extends It.WithEventBus{static build(){return new t(window.history,s0,()=>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,It.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,It.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,It.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,It.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,It.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=la.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 c0=x(B());var l0=c0.css`
|
|
1501
1501
|
`;var f0=x(B()),Fe=x(ee()),Er=x(I());var Cr=x(I());function d0(t,e){let{authenticationRequired:r,session:n}=F.getState();return r&&!n?.sessionAuthenticated?Promise.resolve(e):t()}var da=class extends uo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var ds=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 da,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(lo.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",()=>d0(()=>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)}},u0=ds.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=u0,this.contextRoot=new Qo}render(){return f0.html`
|
|
1502
1502
|
<slot></slot>
|
|
1503
1503
|
`}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=>po.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=l0;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 h0=x(I());var p0={"ft-app-context":le};(0,h0.customElements)(p0);var m0=x(ee());var us=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-]+$/)}},ho=new us;var h6=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"),g0=Symbol("i18nListAttributes"),y0=Symbol("i18nProperties"),ua=Symbol("i18nContexts"),Jo=Symbol("i18nUnsubs"),go=(0,mo.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?ca:po}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(ho.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[g0])===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[y0])===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[ua].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[ua].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ua].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Jo].forEach(i=>i()),this[Jo].clear()}}return e=ua,r=Jo,h6([(0,m0.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),fa=class extends go(mo.FtLitElement){},pa=class extends go(mo.FtLitElementRedux){};var b0=x(I());var fs=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(n=>typeof n=="string"?ho.fromAttribute(n):n):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},m6=new fs;var v0=(t,e)=>(r,n)=>{var a;r.constructor.createProperty(n,{type:Object,hasChanged:b0.hasChanged,converter:ho,...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?ca:po}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 x0=x(B());var S0=x0.css`
|