@fluid-topics/ftds-modal 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.
@@ -907,7 +907,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
907
907
  position: relative;
908
908
  word-break: break-word;
909
909
  }
910
- `;var ws=["top","right","bottom","left"],Rs=["start","end"],Rn=ws.reduce((e,t)=>e.concat(t,t+"-"+Rs[0],t+"-"+Rs[1]),[]),Mr=Math.min,rt=Math.max,kr=Math.round;var Ne=e=>({x:e,y:e}),O4={left:"right",right:"left",bottom:"top",top:"bottom"};function wn(e,t,o){return rt(e,Mr(t,o))}function co(e,t){return typeof e=="function"?e(t):e}function Jt(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function Nn(e){return e==="x"?"y":"x"}function _n(e){return e==="y"?"height":"width"}function lo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Mn(e){return Nn(lo(e))}function Ns(e,t,o){o===void 0&&(o=!1);let n=ot(e),a=Mn(e),i=_n(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=On(s)),[s,On(s)]}function _s(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function On(e){let t=Jt(e);return O4[t]+e.slice(t.length)}function R4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ms(e){return typeof e!="number"?R4(e):{top:e,right:e,bottom:e,left:e}}function St(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function ks(e,t,o){let{reference:n,floating:a}=e,i=lo(t),s=Mn(t),l=_n(s),u=Jt(t),p=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=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(ot(t)){case"start":v[s]-=y*(o&&p?-1:1);break;case"end":v[s]+=y*(o&&p?-1:1);break}return v}async function zs(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=co(t,e),x=Ms(v),O=l[y?g==="floating"?"reference":"floating":g],A=St(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(O)))==null||o?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),z=await(i.isElement==null?void 0:i.isElement(M))?await(i.getScale==null?void 0:i.getScale(M))||{x:1,y:1}:{x:1,y:1},U=St(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(A.top-U.top+x.top)/z.y,bottom:(U.bottom-A.bottom+x.bottom)/z.y,left:(A.left-U.left+x.left)/z.x,right:(U.right-A.right+x.right)/z.x}}var w4=50,Ts=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:zs},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=ks(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let O=i[S];if(!O)continue;let{name:A,fn:N}=O,{x:M,y:z,data:U,reset:G}=await N({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});m=M??m,g=z??g,x[A]={...x[A],...U},G&&v<w4&&(v++,typeof G=="object"&&(G.placement&&(y=G.placement),G.rects&&(p=G.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):G.rects),{x:m,y:g}=ks(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function N4(e,t,o){return(e?[...o.filter(a=>ot(a)===e),...o.filter(a=>ot(a)!==e)]:o.filter(a=>Jt(a)===a)).filter(a=>e?ot(a)===e||(t?_s(a)!==a:!1):!0)}var Is=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Rn,autoAlignment:v=!0,...x}=co(e,t),S=g!==void 0||y===Rn?N4(g||null,v,y):y,O=await u.detectOverflow(t,x),A=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[A];if(N==null)return{};let M=Ns(N,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==N)return{reset:{placement:S[0]}};let z=[O[Jt(N)],O[M[0]],O[M[1]]],U=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:z}],G=S[A+1];if(G)return{data:{index:A+1,overflows:U},reset:{placement:G}};let Pe=U.map(de=>{let ve=ot(de.placement);return[de.placement,ve&&m?de.overflows.slice(0,2).reduce((ue,gt)=>ue+gt,0):de.overflows[0],de.overflows]}).sort((de,ve)=>de[1]-ve[1]),De=((a=Pe.filter(de=>de[2].slice(0,ot(de[0])?2:3).every(ve=>ve<=0))[0])==null?void 0:a[0])||Pe[0][0];return De!==l?{data:{index:A+1,overflows:U},reset:{placement:De}}:{}}}};var Ps=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:N,y:M}=A;return{x:N,y:M}}},...p}=co(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=lo(Jt(a)),v=Nn(y),x=m[v],S=m[y];if(s){let A=v==="y"?"top":"left",N=v==="y"?"bottom":"right",M=x+g[A],z=x-g[N];x=wn(M,x,z)}if(l){let A=y==="y"?"top":"left",N=y==="y"?"bottom":"right",M=S+g[A],z=S-g[N];S=wn(M,S,z)}let O=u.fn({...t,[v]:x,[y]:S});return{...O,data:{x:O.x-o,y:O.y-n,enabled:{[v]:s,[y]:l}}}}}};function fo(){return typeof window<"u"}function Et(e){return Us(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ue(e){var t;return(t=(Us(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Us(e){return fo()?e instanceof Node||e instanceof ie(e).Node:!1}function Se(e){return fo()?e instanceof Element||e instanceof ie(e).Element:!1}function Be(e){return fo()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Ds(e){return!fo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function er(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function Bs(e){return/^(table|td|th)$/.test(Et(e))}function zr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var _4=/transform|translate|scale|rotate|perspective|filter/,M4=/paint|layout|strict|content/,Ct=e=>!!e&&e!=="none",kn;function tr(e){let t=Se(e)?Ce(e):e;return Ct(t.transform)||Ct(t.translate)||Ct(t.scale)||Ct(t.rotate)||Ct(t.perspective)||!po()&&(Ct(t.backdropFilter)||Ct(t.filter))||_4.test(t.willChange||"")||M4.test(t.contain||"")}function Fs(e){let t=Ve(e);for(;Be(t)&&!Lt(t);){if(tr(t))return t;if(zr(t))return null;t=Ve(t)}return null}function po(){return kn==null&&(kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),kn}function Lt(e){return/^(html|body|#document)$/.test(Et(e))}function Ce(e){return ie(e).getComputedStyle(e)}function Tr(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ve(e){if(Et(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||Ue(e);return Ds(t)?t.host:t}function Gs(e){let t=Ve(e);return Lt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&er(t)?t:Gs(t)}function uo(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=Gs(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=ie(a);if(i){let l=ho(s);return t.concat(s,s.visualViewport||[],er(a)?a:[],l&&o?uo(l):[])}else return t.concat(a,uo(a,[],o))}function ho(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function js(e){let t=Ce(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Be(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=kr(o)!==i||kr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function Vs(e){return Se(e)?e:e.contextElement}function rr(e){let t=Vs(e);if(!Be(t))return Ne(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=js(t),s=(i?kr(o.width):o.width)/n,l=(i?kr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var k4=Ne(0);function Ks(e){let t=ie(e);return!po()||!t.visualViewport?k4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z4(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ie(e)?!1:t}function Ir(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=Vs(e),s=Ne(1);t&&(n?Se(n)&&(s=rr(n)):s=rr(e));let l=z4(i,o,n)?Ks(i):Ne(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=ie(i),v=n&&Se(n)?ie(n):n,x=y,S=ho(x);for(;S&&n&&v!==x;){let O=rr(S),A=S.getBoundingClientRect(),N=Ce(S),M=A.left+(S.clientLeft+parseFloat(N.paddingLeft))*O.x,z=A.top+(S.clientTop+parseFloat(N.paddingTop))*O.y;u*=O.x,p*=O.y,m*=O.x,g*=O.y,u+=M,p+=z,x=ie(S),S=ho(x)}}return St({width:m,height:g,x:u,y:p})}function mo(e,t){let o=Tr(e).scrollLeft;return t?t.left+o:Ir(Ue(e)).left+o}function Zs(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-mo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function T4(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Ue(n),l=t?zr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Ne(1),m=Ne(0),g=Be(n);if((g||!g&&!i)&&((Et(n)!=="body"||er(s))&&(u=Tr(n)),g)){let v=Ir(n);p=rr(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?Zs(s,u):Ne(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function I4(e){return Array.from(e.getClientRects())}function P4(e){let t=Ue(e),o=Tr(e),n=e.ownerDocument.body,a=rt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=rt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+mo(e),l=-o.scrollTop;return Ce(n).direction==="rtl"&&(s+=rt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var Hs=25;function D4(e,t){let o=ie(e),n=Ue(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=po();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=mo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(n.clientWidth-g.clientWidth-v);x<=Hs&&(i-=x)}else p<=Hs&&(i+=p);return{width:i,height:s,x:l,y:u}}function U4(e,t){let o=Ir(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Be(e)?rr(e):Ne(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function $s(e,t,o){let n;if(t==="viewport")n=D4(e,o);else if(t==="document")n=P4(Ue(e));else if(Se(t))n=U4(t,o);else{let a=Ks(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return St(n)}function qs(e,t){let o=Ve(e);return o===t||!Se(o)||Lt(o)?!1:Ce(o).position==="fixed"||qs(o,t)}function B4(e,t){let o=t.get(e);if(o)return o;let n=uo(e,[],!1).filter(l=>Se(l)&&Et(l)!=="body"),a=null,i=Ce(e).position==="fixed",s=i?Ve(e):e;for(;Se(s)&&!Lt(s);){let l=Ce(s),u=tr(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||er(s)&&!u&&qs(e,s))?n=n.filter(m=>m!==s):a=l,s=Ve(s)}return t.set(e,n),n}function F4(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?zr(t)?[]:B4(t,this._c):[].concat(o),n],l=$s(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=$s(t,s[y],a);u=rt(v.top,u),p=Mr(v.right,p),m=Mr(v.bottom,m),g=rt(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function G4(e){let{width:t,height:o}=js(e);return{width:t,height:o}}function H4(e,t,o){let n=Be(t),a=Ue(t),i=o==="fixed",s=Ir(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Ne(0);function p(){u.x=mo(a)}if(n||!n&&!i)if((Et(t)!=="body"||er(a))&&(l=Tr(t)),n){let v=Ir(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?Zs(a,l):Ne(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function zn(e){return Ce(e).position==="static"}function Ws(e,t){if(!Be(e)||Ce(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Ue(e)===o&&(o=o.ownerDocument.body),o}function Ys(e,t){let o=ie(e);if(zr(e))return o;if(!Be(e)){let a=Ve(e);for(;a&&!Lt(a);){if(Se(a)&&!zn(a))return a;a=Ve(a)}return o}let n=Ws(e,t);for(;n&&Bs(n)&&zn(n);)n=Ws(n,t);return n&&Lt(n)&&zn(n)&&!tr(n)?o:n||Fs(e)||o}var $4=async function(e){let t=this.getOffsetParent||Ys,o=this.getDimensions,n=await o(e.floating);return{reference:H4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function W4(e){return Ce(e).direction==="rtl"}var go={convertOffsetParentRelativeRectToViewportRelativeRect:T4,getDocumentElement:Ue,getClippingRect:F4,getOffsetParent:Ys,getElementRects:$4,getClientRects:I4,getDimensions:G4,getScale:rr,isElement:Se,isRTL:W4};var Xs=Is,Qs=Ps;var Js=(e,t,o)=>{let n=new Map,a={platform:go,...o},i={...a.platform,_c:n};return Ts(e,t,{...a,platform:i})};function ec(e){return j4(e)}function Tn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function j4(e){for(let t=e;t;t=Tn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Tn(e);t;t=Tn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||tr(o)||t.tagName==="BODY"))return t}return null}async function tc(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},Js(e,t,{strategy:n.strategy,platform:{...go,getOffsetParent:a=>go.getOffsetParent(a,ec)},middleware:[Qs({crossAxis:!0}),Xs({allowedPlacements:[n.placement]})]})}var mr=L(I());var ia=L(te());var rc=L(te(),1);var In=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function oc(e,t){return(0,rc.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Pr(e);try{return JSON.parse(o)}catch{return Pr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:Dr,...t??{}})}function V4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!yo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!yo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!yo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function yo(e,t){try{return V4(e,t)}catch{return!1}}function Dr(e,t){return!yo(e,t)}function Pr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function bo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var nc=L(te(),1);var Pn=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:Dr,attribute:!1,...t};(0,nc.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var vo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var At=L(te(),1);var xo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>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 ic=L(j(),1);var So=globalThis,K4=So.ShadowRoot&&(So.ShadyCSS===void 0||So.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ac=(e,t)=>{if(K4)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=So.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Co=class extends ic.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ac(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){In(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function sc(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var nr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},uc,cc=Symbol("constructorPrototype"),lc=Symbol("constructorName"),fc=Symbol("exportpartsDebouncer"),dc=Symbol("dynamicDependenciesLoaded"),or=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};or.eventName="exportparts-updated";var Fe=class extends Co{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[uc]=new xo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[fc].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[lc]=this.constructor.name,this[cc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[lc]&&Object.setPrototypeOf(this,this[cc])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[dc]||(o[dc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(or.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(or.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new or)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=sc(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((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(t){var o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(O=>O.trim());for(let O of S)m.add(O)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};uc=fc;nr([(0,At.property)()],Fe.prototype,"exportpartsPrefix",void 0);nr([oc([])],Fe.prototype,"exportpartsPrefixes",void 0);nr([(0,At.property)({reflect:!0})],Fe.prototype,"exportparts",void 0);nr([(0,At.property)()],Fe.prototype,"customStylesheet",void 0);nr([(0,At.property)()],Fe.prototype,"elementToFocus",void 0);nr([(0,At.state)()],Fe.prototype,"useAdoptedStyleSheets",void 0);function Eo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ur=Symbol("internalReduxEventsUnsubscribers"),nt=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),Z4=bo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=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[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ot].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Ot].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ot].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ot].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 p=this.getStore(s.store);p&&(s.store?this[nt].has(s.store):this[nt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[nt].set(s,l.subscribe(()=>this.updateFromStores())),this[Ur].set(s,[]),Eo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[Ur].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[nt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[nt].has(s)&&this[nt].get(s)(),this[nt].delete(s),(l=this[Ur].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ur].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nt,o=Ot,n=Ur,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),pc=class extends Z4(Fe){};function Ee(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ke(e){return!!e&&!!e[$]}function _e(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===r0})(e)||Array.isArray(e)||!!e[xc]||!!(!((t=e.constructor)===null||t===void 0)&&t[xc])||jn(e)||Vn(e))}function Rt(e,t,o){o===void 0&&(o=!1),sr(e)===0?(o?Object.keys:ir)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function sr(e){var t=e[$];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:jn(e)?2:Vn(e)?3:0}function ar(e,t){return sr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function q4(e,t){return sr(e)===2?e.get(t):e[t]}function Sc(e,t,o){var n=sr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Cc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function jn(e){return e0&&e instanceof Map}function Vn(e){return t0&&e instanceof Set}function at(e){return e.o||e.t}function Kn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ac(e);delete t[$];for(var o=ir(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Zn(e,t){return t===void 0&&(t=!1),qn(e)||Ke(e)||!_e(e)||(sr(e)>1&&(e.set=e.add=e.clear=e.delete=Y4),Object.freeze(e),t&&Rt(e,(function(o,n){return Zn(n,!0)}),!0)),e}function Y4(){Ee(2)}function qn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ge(e){var t=Wn[e];return t||Ee(18,e),t}function X4(e,t){Wn[e]||(Wn[e]=t)}function Gn(){return Fr}function Dn(e,t){t&&(Ge("Patches"),e.u=[],e.s=[],e.v=t)}function Lo(e){Hn(e),e.p.forEach(Q4),e.p=null}function Hn(e){e===Fr&&(Fr=e.l)}function hc(e){return Fr={p:[],l:Fr,h:e,m:!0,_:0}}function Q4(e){var t=e[$];t.i===0||t.i===1?t.j():t.g=!0}function Un(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ge("ES5").S(t,e,n),n?(o[$].P&&(Lo(t),Ee(4)),_e(e)&&(e=Ao(t,e),t.l||Oo(t,e)),t.u&&Ge("Patches").M(o[$].t,e,t.u,t.s)):e=Ao(t,o,[]),Lo(t),t.u&&t.v(t.u,t.s),e!==Lc?e:void 0}function Ao(e,t,o){if(qn(t))return t;var n=t[$];if(!n)return Rt(t,(function(l,u){return mc(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return Oo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Kn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Rt(i,(function(l,u){return mc(e,n,a,l,u,o,s)})),Oo(e,a,!1),o&&e.u&&Ge("Patches").N(n,o,e.u,e.s)}return n.o}function mc(e,t,o,n,a,i,s){if(Ke(a)){var l=Ao(e,a,i&&t&&t.i!==3&&!ar(t.R,n)?i.concat(n):void 0);if(Sc(o,n,l),!Ke(l))return;e.m=!1}else s&&o.add(a);if(_e(a)&&!qn(a)){if(!e.h.D&&e._<1)return;Ao(e,a),t&&t.A.l||Oo(e,a)}}function Oo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Zn(t,o)}function Bn(e,t){var o=e[$];return(o?at(o):e)[t]}function gc(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function it(e){e.P||(e.P=!0,e.l&&it(e.l))}function Fn(e){e.o||(e.o=Kn(e.t))}function $n(e,t,o){var n=jn(t)?Ge("MapSet").F(t,o):Vn(t)?Ge("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Gn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=Gr;s&&(u=[l],p=Br);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):Ge("ES5").J(t,o);return(o?o.A:Gn()).p.push(n),n}function J4(e){return Ke(e)||Ee(22,e),(function t(o){if(!_e(o))return o;var n,a=o[$],i=sr(o);if(a){if(!a.P&&(a.i<4||!Ge("ES5").K(a)))return a.t;a.I=!0,n=yc(o,i),a.I=!1}else n=yc(o,i);return Rt(n,(function(s,l){a&&q4(a.t,s)===l||Sc(n,s,t(l))})),i===3?new Set(n):n})(e)}function yc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Kn(e)}function Ec(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[$];return Gr.get(p,s)},set:function(p){var m=this[$];Gr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][$];if(!u.P)switch(u.i){case 5:n(u)&&it(u);break;case 4:o(u)&&it(u)}}}function o(s){for(var l=s.t,u=s.k,p=ir(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==$){var y=l[g];if(y===void 0&&!ar(l,g))return!0;var v=u[g],x=v&&v[$];if(x?x.t!==y:!Cc(v,y))return!0}}var S=!!l[$];return p.length!==ir(l).length+(S?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 p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&Ee(3,JSON.stringify(at(s)))}var i={};X4("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var v=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(v,""+x,e(x,!0));return v}var S=Ac(y);delete S[$];for(var O=ir(S),A=0;A<O.length;A++){var N=O[A];S[N]=e(N,g||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),m={i:u?5:4,A:l?l.A:Gn(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,$,{value:m,writable:!0}),p},S:function(s,l,u){u?Ke(l)&&l[$].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[$];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)Rt(v,(function(z){z!==$&&(y[z]!==void 0||ar(y,z)?x[z]||p(v[z]):(x[z]=!0,it(g)))})),Rt(y,(function(z){v[z]!==void 0||ar(v,z)||(x[z]=!1,it(g))}));else if(S===5){if(n(g)&&(it(g),x.length=!0),v.length<y.length)for(var O=v.length;O<y.length;O++)x[O]=!1;else for(var A=y.length;A<v.length;A++)x[A]=!0;for(var N=Math.min(v.length,y.length),M=0;M<N;M++)v.hasOwnProperty(M)||(x[M]=!0),x[M]===void 0&&p(v[M])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var bc,Fr,Yn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",e0=typeof Map<"u",t0=typeof Set<"u",vc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Lc=Yn?Symbol.for("immer-nothing"):((bc={})["immer-nothing"]=!0,bc),xc=Yn?Symbol.for("immer-draftable"):"__$immer_draftable",$=Yn?Symbol.for("immer-state"):"__$immer_state";var r0=""+Object.prototype.constructor,ir=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ac=Object.getOwnPropertyDescriptors||function(e){var t={};return ir(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Wn={},Gr={get:function(e,t){if(t===$)return e;var o=at(e);if(!ar(o,t))return(function(a,i,s){var l,u=gc(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!_e(n)?n:n===Bn(e.t,t)?(Fn(e),e.o[t]=$n(e.A.h,n,e)):n},has:function(e,t){return t in at(e)},ownKeys:function(e){return Reflect.ownKeys(at(e))},set:function(e,t,o){var n=gc(at(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Bn(at(e),t),i=a?.[$];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Cc(o,a)&&(o!==void 0||ar(e.t,t)))return!0;Fn(e),it(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Bn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Fn(e),it(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=at(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Ee(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ee(12)}},Br={};Rt(Gr,(function(e,t){Br[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Br.deleteProperty=function(e,t){return Br.set.call(this,e,t,void 0)},Br.set=function(e,t,o){return Gr.set.call(this,e[0],t,o,e[0])};var o0=(function(){function e(o){var n=this;this.O=vc,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(S){var O=this;S===void 0&&(S=l);for(var A=arguments.length,N=Array(A>1?A-1:0),M=1;M<A;M++)N[M-1]=arguments[M];return u.produce(S,(function(z){var U;return(U=i).call.apply(U,[O,z].concat(N))}))}}var p;if(typeof i!="function"&&Ee(6),s!==void 0&&typeof s!="function"&&Ee(7),_e(a)){var m=hc(n),g=$n(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?Lo(m):Hn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Dn(m,s),Un(S,m)}),(function(S){throw Lo(m),S})):(Dn(m,s),Un(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Lc&&(p=void 0),n.D&&Zn(p,!0),s){var v=[],x=[];Ge("Patches").M(a,p,v,x),s(v,x)}return p}Ee(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){_e(o)||Ee(8),Ke(o)&&(o=J4(o));var n=hc(this),a=$n(this,o,void 0);return a[$].C=!0,Hn(n),a},t.finishDraft=function(o,n){var a=o&&o[$],i=a.A;return Dn(i,n),Un(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!vc&&Ee(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Ge("Patches").$;return Ke(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),pe=new o0,n0=pe.produce,r7=pe.produceWithPatches.bind(pe),o7=pe.setAutoFreeze.bind(pe),n7=pe.setUseProxies.bind(pe),a7=pe.applyPatches.bind(pe),i7=pe.createDraft.bind(pe),s7=pe.finishDraft.bind(pe),Ro=n0;function wt(e){"@babel/helpers - typeof";return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(e)}function Oc(e,t){if(wt(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rc(e){var t=Oc(e,"string");return wt(t)=="symbol"?t:t+""}function wc(e,t,o){return(t=Rc(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Nc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Xn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Nc(Object(o),!0).forEach(function(n){wc(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Nc(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function re(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var _c=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Qn=function(){return Math.random().toString(36).substring(7).split("").join(".")},wo={INIT:"@@redux/INIT"+Qn(),REPLACE:"@@redux/REPLACE"+Qn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Qn()}};function a0(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Jn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(re(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(re(1));return o(Jn)(e,t)}if(typeof e!="function")throw new Error(re(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(re(3));return i}function g(S){if(typeof S!="function")throw new Error(re(4));if(u)throw new Error(re(5));var O=!0;return p(),l.push(S),function(){if(O){if(u)throw new Error(re(6));O=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!a0(S))throw new Error(re(7));if(typeof S.type>"u")throw new Error(re(8));if(u)throw new Error(re(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var O=s=l,A=0;A<O.length;A++){var N=O[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(re(10));a=S,y({type:wo.REPLACE})}function x(){var S,O=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(re(11));function M(){N.next&&N.next(m())}M();var z=O(M);return{unsubscribe:z}}},S[_c]=function(){return this},S}return y({type:wo.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[_c]=x,n}function i0(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:wo.INIT});if(typeof n>"u")throw new Error(re(12));if(typeof o(void 0,{type:wo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(re(13))})}function Mc(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{i0(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],O=o[S],A=p[S],N=O(A,m);if(typeof N>"u"){var M=m&&m.type;throw new Error(re(14))}v[S]=N,y=y||N!==A}return y=y||i.length!==Object.keys(p).length,y?v:p}}function cr(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function kc(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(re(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=cr.apply(void 0,l)(a.dispatch),Xn(Xn({},a),{},{dispatch:i})}}}function zc(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var Tc=zc();Tc.withExtraArgument=zc;var ea=Tc;var Bc=(function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),s0=function(e,t){var o={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(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},lr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},c0=Object.defineProperty,l0=Object.defineProperties,d0=Object.getOwnPropertyDescriptors,Ic=Object.getOwnPropertySymbols,u0=Object.prototype.hasOwnProperty,f0=Object.prototype.propertyIsEnumerable,Pc=function(e,t,o){return t in e?c0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},st=function(e,t){for(var o in t||(t={}))u0.call(t,o)&&Pc(e,o,t[o]);if(Ic)for(var n=0,a=Ic(t);n<a.length;n++){var o=a[n];f0.call(t,o)&&Pc(e,o,t[o])}return e},ta=function(e,t){return l0(e,d0(t))},p0=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var h0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?cr:cr.apply(null,arguments)},A7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function m0(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function ct(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return st(st({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var g0=(function(e){Bc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,lr([void 0],o[0].concat(this)))):new(t.bind.apply(t,lr([void 0],o.concat(this))))},t})(Array),y0=(function(e){Bc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,lr([void 0],o[0].concat(this)))):new(t.bind.apply(t,lr([void 0],o.concat(this))))},t})(Array);function na(e){return _e(e)?Ro(e,function(){}):e}function b0(e){return typeof e=="boolean"}function v0(){return function(t){return x0(t)}}function x0(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new g0;if(o&&(b0(o)?p.push(ea):p.push(ea.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var ra=!0;function Fc(e){var t=v0(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(m0(a))v=Mc(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 x=s;if(typeof x=="function"&&(x=x(t),!ra&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ra&&x.some(function(z){return typeof z!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=kc.apply(void 0,x),O=cr;u&&(O=h0(st({trace:!ra},typeof u=="object"&&u)));var A=new y0(S),N=A;Array.isArray(y)?N=lr([S],y):typeof y=="function"&&(N=y(A));var M=O.apply(void 0,N);return Jn(v,m,M)}function Gc(e){var t={},o=[],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 t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function S0(e){return typeof e=="function"}function C0(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?Gc(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(S0(e))u=function(){return na(e())};else{var p=na(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=lr([i[y.type]],s.filter(function(x){var S=x.matcher;return S(y)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[l]),v.reduce(function(x,S){if(S)if(Ke(x)){var O=x,A=S(O,y);return A===void 0?x:A}else{if(_e(x))return Ro(x,function(N){return S(N,y)});var A=S(x,y);if(A===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return x},g)}return m.getInitialState=u,m}function E0(e,t){return e+"/"+t}function Hc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:na(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=E0(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?ct(y,x):ct(y)});function u(){var m=typeof e.extraReducers=="function"?Gc(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],O=S===void 0?void 0:S,A=st(st({},y),s);return C0(o,function(N){for(var M in A)N.addCase(M,A[M]);for(var z=0,U=x;z<U.length;z++){var G=U[z];N.addMatcher(G.matcher,G.reducer)}O&&N.addDefaultCase(O)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var L0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",A0=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=L0[Math.random()*64|0];return t},O0=["name","message","stack","code"],oa=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),Dc=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),R0=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=O0;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},N7=(function(){function e(t,o,n){var a=ct(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:ta(st({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=ct(t+"/pending",function(m,g,y){return{payload:void 0,meta:ta(st({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=ct(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||R0)(m||"Rejected"),meta:ta(st({},x||{}),{arg:y,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 p(m){return function(g,y,v){var x=n?.idGenerator?n.idGenerator(m):A0(),S=new u,O,A=!1;function N(z){O=z,S.abort()}var M=(function(){return p0(this,null,function(){var z,U,G,Pe,mt,De,de;return s0(this,function(ve){switch(ve.label){case 0:return ve.trys.push([0,4,,5]),Pe=(z=n?.condition)==null?void 0:z.call(n,m,{getState:y,extra:v}),N0(Pe)?[4,Pe]:[3,2];case 1:Pe=ve.sent(),ve.label=2;case 2:if(Pe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,mt=new Promise(function(ue,gt){return S.signal.addEventListener("abort",function(){return gt({name:"AbortError",message:O||"Aborted"})})}),g(i(x,m,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([mt,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(ue,gt){return new oa(ue,gt)},fulfillWithValue:function(ue,gt){return new Dc(ue,gt)}})).then(function(ue){if(ue instanceof oa)throw ue;return ue instanceof Dc?a(ue.payload,x,m,ue.meta):a(ue,x,m)})])];case 3:return G=ve.sent(),[3,5];case 4:return De=ve.sent(),G=De instanceof oa?s(null,x,m,De.payload,De.meta):s(De,x,m),[3,5];case 5:return de=n&&!n.dispatchConditionRejection&&s.match(G)&&G.meta.condition,de||g(G),[2,G]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:m,unwrap:function(){return M.then(w0)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function w0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function N0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $c="listener",Wc="completed",jc="cancelled",_7="task-"+jc,M7="task-"+Wc,k7=$c+"-"+jc,z7=$c+"-"+Wc;var aa="listenerMiddleware";var T7=ct(aa+"/add"),I7=ct(aa+"/removeAll"),P7=ct(aa+"/remove");var Uc,D7=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Uc||(Uc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},_0=function(e){return function(t){setTimeout(t,e)}},U7=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_0(10);Ec();var M0=bo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),No=class extends M0(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vc=class e extends No{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Eo(i))return i;if(a==null)return;let s=Hc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Fc({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=Pr(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new vo;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,p=i[u];return p?(...m)=>{let g=p(...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(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var _o=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Mo=L(I()),k0="ft-app-info",dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};dr.eventName="authentication-change";var Hr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Hr.eventName="ui-locale-changed";var z0={session:(e,t)=>{(0,Mo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>P.dispatchEvent(new dr(t.payload)),0))}},P=Mo.FtReduxStore.get({name:k0,reducers:z0,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 Kc=L(I()),ko=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},fm=(0,Kc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}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=>_o.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ko([(0,ia.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ko([(0,ia.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ko([Pn({store:P.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ko([Pn({store:P.name})],t.prototype,"uiLocale",void 0),t});var Zc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Zc||(Zc={}));var qc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(qc||(qc={}));var Yc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Yc||(Yc={}));var Xc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Xc||(Xc={}));var Qc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Qc||(Qc={}));var Jc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Jc||(Jc={}));var el;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(el||(el={}));var tl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(tl||(tl={}));var rl;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(rl||(rl={}));var ol;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(ol||(ol={}));var nl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(nl||(nl={}));var al;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(al||(al={}));var il;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(il||(il={}));var sl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(sl||(sl={}));var cl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(cl||(cl={}));var ll;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(ll||(ll={}));var dl;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(dl||(dl={}));var ul;(function(e){e.ASC="ASC",e.DESC="DESC"})(ul||(ul={}));var fl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(fl||(fl={}));var pl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(pl||(pl={}));var hl;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var ml;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ml||(ml={}));var gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gl||(gl={}));var yl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(yl||(yl={}));var bl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(bl||(bl={}));var vl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(vl||(vl={}));var xl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(xl||(xl={}));var X;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(X||(X={}));var Le;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Le||(Le={}));var Sl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Sl||(Sl={}));var Cl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Cl||(Cl={}));var El;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(El||(El={}));var Ll;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(Ll||(Ll={}));var Al;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Al||(Al={}));var Ol;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ol||(Ol={}));var Rl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rl||(Rl={}));var wl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(wl||(wl={}));var Nl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Nl||(Nl={}));var _l;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(_l||(_l={}));var Ml;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Ml||(Ml={}));var kl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(kl||(kl={}));var T0={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function zl(e,t){return e===t||(T0[e]??[]).some(o=>zl(o,t))}function Tl(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>zl(n,t))}var Do=L(I());var sa=L(I());var Nt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=P.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var ur=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Nt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Nt.await()}};var he=class extends ur{constructor(t=!0,o){var n;super(o),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 sa.CacheRegistry,this.cache=t?a.commonCache:new sa.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var zo=class extends he{async listMySearches(){let{session:t}=P.getState();return Tl(t,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var To=class extends he{async listMyBookmarks(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Io=class extends he{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var Po=class extends he{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var I0="ft-user-assets",P0={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Le).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;la(e,o,[...ca(e,o),a]),Il(e,o,1,n),Pl(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;la(e,o,ca(e,o).map(a=>a.id===n.id?n:a)),Pl(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;la(e,o,ca(e,o).filter(i=>i.id!==a)),Il(e,o,-1,n)}},Dl={[Le.SEARCHES]:"savedSearches",[Le.BOOKMARKS]:"bookmarks",[Le.BOOKS]:void 0,[Le.COLLECTIONS]:void 0},ca=(e,t)=>{var o;let n=Dl[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},la=(e,t,o)=>{let n=Dl[t];n&&(e[n]=o)},Il=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Le.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},Pl=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ne=Do.FtReduxStore.get({name:I0,reducers:P0,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Le).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),da=class{constructor(t=new Io,o=new Po){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new To,this.savedSearchesService=new zo,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=P.getState();(0,Do.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ne.actions.clearAssetCount(),ne.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ne.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ne.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ne.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ne.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ne.getState().assetCounts.allAsset[t]!==o.count&&ne.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ne.getState().assetCounts.bookmarkByMap[t]!==o.count&&ne.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ne.getState().assetCounts.bookmarkByMap).length!==0;t===Le.BOOKMARKS&&o&&ne.actions.clearBookmarkCountByMap(),ne.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ne.actions.bookmarks(o)}}},D0=new da;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=D0);var ua=class{addCommand(t,o=!1){P.commands.add(t,o)}consumeCommand(t){return P.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ua;var Ae=L(I());var Ul,fr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},U0=Symbol("clearAfterUnitTest"),Uo=class extends(0,Ae.withEventBus)(he){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ul]=()=>{this.defaultMessages={},this.cache=new Ae.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=P.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Ae.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ae.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Ae.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new fr({loadedContexts:t})),this.dispatchEvent(new fr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new fr({loadedContexts:[t]})),this.dispatchEvent(new fr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ae.delay)(0).then(()=>n()).catch(()=>null)))}};Ul=U0;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Uo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Uo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var pr=window.FluidTopicsI18nService,Bo=window.FluidTopicsCustomI18nService;var Bl=L(I()),fa=class{highlightHtml(t,o,n){(0,Bl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new fa;var Fl=L(I());var pa=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return Fl.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new pa;var Gl=L(I());var $r=class{static get(t,o){var n,a;let i=P.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 Gl.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ha=class{urlToSearchRequest(t){return $r.get().parse(t)}searchRequestToUrl(t){return $r.get().serialize(t)}};window.FluidTopicsUrlService=new ha;var Ze=L(I());var _t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};_t.eventName="change";var ma=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Hl=new ma;var Fo=class e extends Ze.WithEventBus{static build(){return new e(window.history,Hl,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ze.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new _t(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(_t.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(_t.eventName,t)}currentItem(){return(0,Ze.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ze.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ze.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ze.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var $l=L(j());var Wl=$l.css`
910
+ `;var ws=["top","right","bottom","left"],Rs=["start","end"],Rn=ws.reduce((e,t)=>e.concat(t,t+"-"+Rs[0],t+"-"+Rs[1]),[]),Mr=Math.min,rt=Math.max,kr=Math.round;var Ne=e=>({x:e,y:e}),O4={left:"right",right:"left",bottom:"top",top:"bottom"};function wn(e,t,o){return rt(e,Mr(t,o))}function co(e,t){return typeof e=="function"?e(t):e}function Jt(e){return e.split("-")[0]}function ot(e){return e.split("-")[1]}function Nn(e){return e==="x"?"y":"x"}function _n(e){return e==="y"?"height":"width"}function lo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Mn(e){return Nn(lo(e))}function Ns(e,t,o){o===void 0&&(o=!1);let n=ot(e),a=Mn(e),i=_n(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=On(s)),[s,On(s)]}function _s(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function On(e){let t=Jt(e);return O4[t]+e.slice(t.length)}function R4(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ms(e){return typeof e!="number"?R4(e):{top:e,right:e,bottom:e,left:e}}function St(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function ks(e,t,o){let{reference:n,floating:a}=e,i=lo(t),s=Mn(t),l=_n(s),u=Jt(t),p=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=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(ot(t)){case"start":v[s]-=y*(o&&p?-1:1);break;case"end":v[s]+=y*(o&&p?-1:1);break}return v}async function zs(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=co(t,e),x=Ms(v),O=l[y?g==="floating"?"reference":"floating":g],A=St(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(O)))==null||o?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),N=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),z=await(i.isElement==null?void 0:i.isElement(M))?await(i.getScale==null?void 0:i.getScale(M))||{x:1,y:1}:{x:1,y:1},U=St(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:M,strategy:u}):N);return{top:(A.top-U.top+x.top)/z.y,bottom:(U.bottom-A.bottom+x.bottom)/z.y,left:(A.left-U.left+x.left)/z.x,right:(U.right-A.right+x.right)/z.x}}var w4=50,Ts=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:zs},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=ks(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let O=i[S];if(!O)continue;let{name:A,fn:N}=O,{x:M,y:z,data:U,reset:G}=await N({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});m=M??m,g=z??g,x[A]={...x[A],...U},G&&v<w4&&(v++,typeof G=="object"&&(G.placement&&(y=G.placement),G.rects&&(p=G.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):G.rects),{x:m,y:g}=ks(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function N4(e,t,o){return(e?[...o.filter(a=>ot(a)===e),...o.filter(a=>ot(a)!==e)]:o.filter(a=>Jt(a)===a)).filter(a=>e?ot(a)===e||(t?_s(a)!==a:!1):!0)}var Is=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Rn,autoAlignment:v=!0,...x}=co(e,t),S=g!==void 0||y===Rn?N4(g||null,v,y):y,O=await u.detectOverflow(t,x),A=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[A];if(N==null)return{};let M=Ns(N,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==N)return{reset:{placement:S[0]}};let z=[O[Jt(N)],O[M[0]],O[M[1]]],U=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:z}],G=S[A+1];if(G)return{data:{index:A+1,overflows:U},reset:{placement:G}};let Pe=U.map(de=>{let ve=ot(de.placement);return[de.placement,ve&&m?de.overflows.slice(0,2).reduce((ue,gt)=>ue+gt,0):de.overflows[0],de.overflows]}).sort((de,ve)=>de[1]-ve[1]),De=((a=Pe.filter(de=>de[2].slice(0,ot(de[0])?2:3).every(ve=>ve<=0))[0])==null?void 0:a[0])||Pe[0][0];return De!==l?{data:{index:A+1,overflows:U},reset:{placement:De}}:{}}}};var Ps=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:A=>{let{x:N,y:M}=A;return{x:N,y:M}}},...p}=co(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=lo(Jt(a)),v=Nn(y),x=m[v],S=m[y];if(s){let A=v==="y"?"top":"left",N=v==="y"?"bottom":"right",M=x+g[A],z=x-g[N];x=wn(M,x,z)}if(l){let A=y==="y"?"top":"left",N=y==="y"?"bottom":"right",M=S+g[A],z=S-g[N];S=wn(M,S,z)}let O=u.fn({...t,[v]:x,[y]:S});return{...O,data:{x:O.x-o,y:O.y-n,enabled:{[v]:s,[y]:l}}}}}};function fo(){return typeof window<"u"}function Et(e){return Us(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ue(e){var t;return(t=(Us(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Us(e){return fo()?e instanceof Node||e instanceof ie(e).Node:!1}function Se(e){return fo()?e instanceof Element||e instanceof ie(e).Element:!1}function Be(e){return fo()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Ds(e){return!fo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function er(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function Bs(e){return/^(table|td|th)$/.test(Et(e))}function zr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var _4=/transform|translate|scale|rotate|perspective|filter/,M4=/paint|layout|strict|content/,Ct=e=>!!e&&e!=="none",kn;function tr(e){let t=Se(e)?Ce(e):e;return Ct(t.transform)||Ct(t.translate)||Ct(t.scale)||Ct(t.rotate)||Ct(t.perspective)||!po()&&(Ct(t.backdropFilter)||Ct(t.filter))||_4.test(t.willChange||"")||M4.test(t.contain||"")}function Fs(e){let t=Ve(e);for(;Be(t)&&!Lt(t);){if(tr(t))return t;if(zr(t))return null;t=Ve(t)}return null}function po(){return kn==null&&(kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),kn}function Lt(e){return/^(html|body|#document)$/.test(Et(e))}function Ce(e){return ie(e).getComputedStyle(e)}function Tr(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ve(e){if(Et(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||Ue(e);return Ds(t)?t.host:t}function Gs(e){let t=Ve(e);return Lt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Be(t)&&er(t)?t:Gs(t)}function uo(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=Gs(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=ie(a);if(i){let l=ho(s);return t.concat(s,s.visualViewport||[],er(a)?a:[],l&&o?uo(l):[])}else return t.concat(a,uo(a,[],o))}function ho(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function js(e){let t=Ce(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Be(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=kr(o)!==i||kr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function Vs(e){return Se(e)?e:e.contextElement}function rr(e){let t=Vs(e);if(!Be(t))return Ne(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=js(t),s=(i?kr(o.width):o.width)/n,l=(i?kr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var k4=Ne(0);function Ks(e){let t=ie(e);return!po()||!t.visualViewport?k4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z4(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ie(e)?!1:t}function Ir(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=Vs(e),s=Ne(1);t&&(n?Se(n)&&(s=rr(n)):s=rr(e));let l=z4(i,o,n)?Ks(i):Ne(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=ie(i),v=n&&Se(n)?ie(n):n,x=y,S=ho(x);for(;S&&n&&v!==x;){let O=rr(S),A=S.getBoundingClientRect(),N=Ce(S),M=A.left+(S.clientLeft+parseFloat(N.paddingLeft))*O.x,z=A.top+(S.clientTop+parseFloat(N.paddingTop))*O.y;u*=O.x,p*=O.y,m*=O.x,g*=O.y,u+=M,p+=z,x=ie(S),S=ho(x)}}return St({width:m,height:g,x:u,y:p})}function mo(e,t){let o=Tr(e).scrollLeft;return t?t.left+o:Ir(Ue(e)).left+o}function Zs(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-mo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function T4(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Ue(n),l=t?zr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Ne(1),m=Ne(0),g=Be(n);if((g||!g&&!i)&&((Et(n)!=="body"||er(s))&&(u=Tr(n)),g)){let v=Ir(n);p=rr(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?Zs(s,u):Ne(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function I4(e){return Array.from(e.getClientRects())}function P4(e){let t=Ue(e),o=Tr(e),n=e.ownerDocument.body,a=rt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=rt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+mo(e),l=-o.scrollTop;return Ce(n).direction==="rtl"&&(s+=rt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var Hs=25;function D4(e,t){let o=ie(e),n=Ue(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=po();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=mo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(n.clientWidth-g.clientWidth-v);x<=Hs&&(i-=x)}else p<=Hs&&(i+=p);return{width:i,height:s,x:l,y:u}}function U4(e,t){let o=Ir(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Be(e)?rr(e):Ne(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function $s(e,t,o){let n;if(t==="viewport")n=D4(e,o);else if(t==="document")n=P4(Ue(e));else if(Se(t))n=U4(t,o);else{let a=Ks(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return St(n)}function qs(e,t){let o=Ve(e);return o===t||!Se(o)||Lt(o)?!1:Ce(o).position==="fixed"||qs(o,t)}function B4(e,t){let o=t.get(e);if(o)return o;let n=uo(e,[],!1).filter(l=>Se(l)&&Et(l)!=="body"),a=null,i=Ce(e).position==="fixed",s=i?Ve(e):e;for(;Se(s)&&!Lt(s);){let l=Ce(s),u=tr(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||er(s)&&!u&&qs(e,s))?n=n.filter(m=>m!==s):a=l,s=Ve(s)}return t.set(e,n),n}function F4(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?zr(t)?[]:B4(t,this._c):[].concat(o),n],l=$s(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=$s(t,s[y],a);u=rt(v.top,u),p=Mr(v.right,p),m=Mr(v.bottom,m),g=rt(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function G4(e){let{width:t,height:o}=js(e);return{width:t,height:o}}function H4(e,t,o){let n=Be(t),a=Ue(t),i=o==="fixed",s=Ir(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Ne(0);function p(){u.x=mo(a)}if(n||!n&&!i)if((Et(t)!=="body"||er(a))&&(l=Tr(t)),n){let v=Ir(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?Zs(a,l):Ne(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function zn(e){return Ce(e).position==="static"}function Ws(e,t){if(!Be(e)||Ce(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Ue(e)===o&&(o=o.ownerDocument.body),o}function Ys(e,t){let o=ie(e);if(zr(e))return o;if(!Be(e)){let a=Ve(e);for(;a&&!Lt(a);){if(Se(a)&&!zn(a))return a;a=Ve(a)}return o}let n=Ws(e,t);for(;n&&Bs(n)&&zn(n);)n=Ws(n,t);return n&&Lt(n)&&zn(n)&&!tr(n)?o:n||Fs(e)||o}var $4=async function(e){let t=this.getOffsetParent||Ys,o=this.getDimensions,n=await o(e.floating);return{reference:H4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function W4(e){return Ce(e).direction==="rtl"}var go={convertOffsetParentRelativeRectToViewportRelativeRect:T4,getDocumentElement:Ue,getClippingRect:F4,getOffsetParent:Ys,getElementRects:$4,getClientRects:I4,getDimensions:G4,getScale:rr,isElement:Se,isRTL:W4};var Xs=Is,Qs=Ps;var Js=(e,t,o)=>{let n=new Map,a={platform:go,...o},i={...a.platform,_c:n};return Ts(e,t,{...a,platform:i})};function ec(e){return j4(e)}function Tn(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function j4(e){for(let t=e;t;t=Tn(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Tn(e);t;t=Tn(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||tr(o)||t.tagName==="BODY"))return t}return null}async function tc(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},Js(e,t,{strategy:n.strategy,platform:{...go,getOffsetParent:a=>go.getOffsetParent(a,ec)},middleware:[Qs({crossAxis:!0}),Xs({allowedPlacements:[n.placement]})]})}var mr=L(I());var ia=L(te());var rc=L(te(),1);var In=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function oc(e,t){return(0,rc.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Pr(e);try{return JSON.parse(o)}catch{return Pr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:Dr,...t??{}})}function V4(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!yo(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!yo(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!yo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function yo(e,t){try{return V4(e,t)}catch{return!1}}function Dr(e,t){return!yo(e,t)}function Pr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function bo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var nc=L(te(),1);var Pn=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:Dr,attribute:!1,...t};(0,nc.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var vo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var At=L(te(),1);var xo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>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 ic=L(j(),1);var So=globalThis,K4=So.ShadowRoot&&(So.ShadyCSS===void 0||So.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ac=(e,t)=>{if(K4)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=So.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Co=class extends ic.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return ac(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){In(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function sc(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var nr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},uc,cc=Symbol("constructorPrototype"),lc=Symbol("constructorName"),fc=Symbol("exportpartsDebouncer"),dc=Symbol("dynamicDependenciesLoaded"),or=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};or.eventName="exportparts-updated";var Fe=class extends Co{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[uc]=new xo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[fc].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[lc]=this.constructor.name,this[cc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[lc]&&Object.setPrototypeOf(this,this[cc])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[dc]||(o[dc]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(or.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(or.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new or)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=sc(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((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(t){var o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(O=>O.trim());for(let O of S)m.add(O)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};uc=fc;nr([(0,At.property)()],Fe.prototype,"exportpartsPrefix",void 0);nr([oc([])],Fe.prototype,"exportpartsPrefixes",void 0);nr([(0,At.property)({reflect:!0})],Fe.prototype,"exportparts",void 0);nr([(0,At.property)()],Fe.prototype,"customStylesheet",void 0);nr([(0,At.property)()],Fe.prototype,"elementToFocus",void 0);nr([(0,At.state)()],Fe.prototype,"useAdoptedStyleSheets",void 0);function Eo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ur=Symbol("internalReduxEventsUnsubscribers"),nt=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),Z4=bo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=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[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ot].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Ot].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ot].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ot].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 p=this.getStore(s.store);p&&(s.store?this[nt].has(s.store):this[nt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[nt].set(s,l.subscribe(()=>this.updateFromStores())),this[Ur].set(s,[]),Eo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[Ur].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[nt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[nt].has(s)&&this[nt].get(s)(),this[nt].delete(s),(l=this[Ur].get(s))===null||l===void 0||l.forEach(u=>u()),this[Ur].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=nt,o=Ot,n=Ur,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),pc=class extends Z4(Fe){};function Ee(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ke(e){return!!e&&!!e[$]}function _e(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===r0})(e)||Array.isArray(e)||!!e[xc]||!!(!((t=e.constructor)===null||t===void 0)&&t[xc])||jn(e)||Vn(e))}function Rt(e,t,o){o===void 0&&(o=!1),sr(e)===0?(o?Object.keys:ir)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function sr(e){var t=e[$];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:jn(e)?2:Vn(e)?3:0}function ar(e,t){return sr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function q4(e,t){return sr(e)===2?e.get(t):e[t]}function Sc(e,t,o){var n=sr(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function Cc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function jn(e){return e0&&e instanceof Map}function Vn(e){return t0&&e instanceof Set}function at(e){return e.o||e.t}function Kn(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ac(e);delete t[$];for(var o=ir(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Zn(e,t){return t===void 0&&(t=!1),qn(e)||Ke(e)||!_e(e)||(sr(e)>1&&(e.set=e.add=e.clear=e.delete=Y4),Object.freeze(e),t&&Rt(e,(function(o,n){return Zn(n,!0)}),!0)),e}function Y4(){Ee(2)}function qn(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ge(e){var t=Wn[e];return t||Ee(18,e),t}function X4(e,t){Wn[e]||(Wn[e]=t)}function Gn(){return Fr}function Dn(e,t){t&&(Ge("Patches"),e.u=[],e.s=[],e.v=t)}function Lo(e){Hn(e),e.p.forEach(Q4),e.p=null}function Hn(e){e===Fr&&(Fr=e.l)}function hc(e){return Fr={p:[],l:Fr,h:e,m:!0,_:0}}function Q4(e){var t=e[$];t.i===0||t.i===1?t.j():t.g=!0}function Un(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ge("ES5").S(t,e,n),n?(o[$].P&&(Lo(t),Ee(4)),_e(e)&&(e=Ao(t,e),t.l||Oo(t,e)),t.u&&Ge("Patches").M(o[$].t,e,t.u,t.s)):e=Ao(t,o,[]),Lo(t),t.u&&t.v(t.u,t.s),e!==Lc?e:void 0}function Ao(e,t,o){if(qn(t))return t;var n=t[$];if(!n)return Rt(t,(function(l,u){return mc(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return Oo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=Kn(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Rt(i,(function(l,u){return mc(e,n,a,l,u,o,s)})),Oo(e,a,!1),o&&e.u&&Ge("Patches").N(n,o,e.u,e.s)}return n.o}function mc(e,t,o,n,a,i,s){if(Ke(a)){var l=Ao(e,a,i&&t&&t.i!==3&&!ar(t.R,n)?i.concat(n):void 0);if(Sc(o,n,l),!Ke(l))return;e.m=!1}else s&&o.add(a);if(_e(a)&&!qn(a)){if(!e.h.D&&e._<1)return;Ao(e,a),t&&t.A.l||Oo(e,a)}}function Oo(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Zn(t,o)}function Bn(e,t){var o=e[$];return(o?at(o):e)[t]}function gc(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function it(e){e.P||(e.P=!0,e.l&&it(e.l))}function Fn(e){e.o||(e.o=Kn(e.t))}function $n(e,t,o){var n=jn(t)?Ge("MapSet").F(t,o):Vn(t)?Ge("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Gn(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=Gr;s&&(u=[l],p=Br);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):Ge("ES5").J(t,o);return(o?o.A:Gn()).p.push(n),n}function J4(e){return Ke(e)||Ee(22,e),(function t(o){if(!_e(o))return o;var n,a=o[$],i=sr(o);if(a){if(!a.P&&(a.i<4||!Ge("ES5").K(a)))return a.t;a.I=!0,n=yc(o,i),a.I=!1}else n=yc(o,i);return Rt(n,(function(s,l){a&&q4(a.t,s)===l||Sc(n,s,t(l))})),i===3?new Set(n):n})(e)}function yc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Kn(e)}function Ec(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[$];return Gr.get(p,s)},set:function(p){var m=this[$];Gr.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][$];if(!u.P)switch(u.i){case 5:n(u)&&it(u);break;case 4:o(u)&&it(u)}}}function o(s){for(var l=s.t,u=s.k,p=ir(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==$){var y=l[g];if(y===void 0&&!ar(l,g))return!0;var v=u[g],x=v&&v[$];if(x?x.t!==y:!Cc(v,y))return!0}}var S=!!l[$];return p.length!==ir(l).length+(S?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 p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&Ee(3,JSON.stringify(at(s)))}var i={};X4("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var v=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(v,""+x,e(x,!0));return v}var S=Ac(y);delete S[$];for(var O=ir(S),A=0;A<O.length;A++){var N=O[A];S[N]=e(N,g||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),m={i:u?5:4,A:l?l.A:Gn(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,$,{value:m,writable:!0}),p},S:function(s,l,u){u?Ke(l)&&l[$].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[$];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)Rt(v,(function(z){z!==$&&(y[z]!==void 0||ar(y,z)?x[z]||p(v[z]):(x[z]=!0,it(g)))})),Rt(y,(function(z){v[z]!==void 0||ar(v,z)||(x[z]=!1,it(g))}));else if(S===5){if(n(g)&&(it(g),x.length=!0),v.length<y.length)for(var O=v.length;O<y.length;O++)x[O]=!1;else for(var A=y.length;A<v.length;A++)x[A]=!0;for(var N=Math.min(v.length,y.length),M=0;M<N;M++)v.hasOwnProperty(M)||(x[M]=!0),x[M]===void 0&&p(v[M])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var bc,Fr,Yn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",e0=typeof Map<"u",t0=typeof Set<"u",vc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Lc=Yn?Symbol.for("immer-nothing"):((bc={})["immer-nothing"]=!0,bc),xc=Yn?Symbol.for("immer-draftable"):"__$immer_draftable",$=Yn?Symbol.for("immer-state"):"__$immer_state";var r0=""+Object.prototype.constructor,ir=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ac=Object.getOwnPropertyDescriptors||function(e){var t={};return ir(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Wn={},Gr={get:function(e,t){if(t===$)return e;var o=at(e);if(!ar(o,t))return(function(a,i,s){var l,u=gc(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!_e(n)?n:n===Bn(e.t,t)?(Fn(e),e.o[t]=$n(e.A.h,n,e)):n},has:function(e,t){return t in at(e)},ownKeys:function(e){return Reflect.ownKeys(at(e))},set:function(e,t,o){var n=gc(at(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=Bn(at(e),t),i=a?.[$];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if(Cc(o,a)&&(o!==void 0||ar(e.t,t)))return!0;Fn(e),it(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return Bn(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Fn(e),it(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=at(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Ee(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ee(12)}},Br={};Rt(Gr,(function(e,t){Br[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Br.deleteProperty=function(e,t){return Br.set.call(this,e,t,void 0)},Br.set=function(e,t,o){return Gr.set.call(this,e[0],t,o,e[0])};var o0=(function(){function e(o){var n=this;this.O=vc,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(S){var O=this;S===void 0&&(S=l);for(var A=arguments.length,N=Array(A>1?A-1:0),M=1;M<A;M++)N[M-1]=arguments[M];return u.produce(S,(function(z){var U;return(U=i).call.apply(U,[O,z].concat(N))}))}}var p;if(typeof i!="function"&&Ee(6),s!==void 0&&typeof s!="function"&&Ee(7),_e(a)){var m=hc(n),g=$n(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?Lo(m):Hn(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return Dn(m,s),Un(S,m)}),(function(S){throw Lo(m),S})):(Dn(m,s),Un(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===Lc&&(p=void 0),n.D&&Zn(p,!0),s){var v=[],x=[];Ge("Patches").M(a,p,v,x),s(v,x)}return p}Ee(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){_e(o)||Ee(8),Ke(o)&&(o=J4(o));var n=hc(this),a=$n(this,o,void 0);return a[$].C=!0,Hn(n),a},t.finishDraft=function(o,n){var a=o&&o[$],i=a.A;return Dn(i,n),Un(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!vc&&Ee(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Ge("Patches").$;return Ke(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),pe=new o0,n0=pe.produce,r7=pe.produceWithPatches.bind(pe),o7=pe.setAutoFreeze.bind(pe),n7=pe.setUseProxies.bind(pe),a7=pe.applyPatches.bind(pe),i7=pe.createDraft.bind(pe),s7=pe.finishDraft.bind(pe),Ro=n0;function wt(e){"@babel/helpers - typeof";return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(e)}function Oc(e,t){if(wt(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if(wt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rc(e){var t=Oc(e,"string");return wt(t)=="symbol"?t:t+""}function wc(e,t,o){return(t=Rc(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Nc(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Xn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Nc(Object(o),!0).forEach(function(n){wc(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Nc(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function re(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var _c=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Qn=function(){return Math.random().toString(36).substring(7).split("").join(".")},wo={INIT:"@@redux/INIT"+Qn(),REPLACE:"@@redux/REPLACE"+Qn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Qn()}};function a0(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Jn(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(re(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(re(1));return o(Jn)(e,t)}if(typeof e!="function")throw new Error(re(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(re(3));return i}function g(S){if(typeof S!="function")throw new Error(re(4));if(u)throw new Error(re(5));var O=!0;return p(),l.push(S),function(){if(O){if(u)throw new Error(re(6));O=!1,p();var N=l.indexOf(S);l.splice(N,1),s=null}}}function y(S){if(!a0(S))throw new Error(re(7));if(typeof S.type>"u")throw new Error(re(8));if(u)throw new Error(re(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var O=s=l,A=0;A<O.length;A++){var N=O[A];N()}return S}function v(S){if(typeof S!="function")throw new Error(re(10));a=S,y({type:wo.REPLACE})}function x(){var S,O=g;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(re(11));function M(){N.next&&N.next(m())}M();var z=O(M);return{unsubscribe:z}}},S[_c]=function(){return this},S}return y({type:wo.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[_c]=x,n}function i0(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:wo.INIT});if(typeof n>"u")throw new Error(re(12));if(typeof o(void 0,{type:wo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(re(13))})}function Mc(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{i0(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],O=o[S],A=p[S],N=O(A,m);if(typeof N>"u"){var M=m&&m.type;throw new Error(re(14))}v[S]=N,y=y||N!==A}return y=y||i.length!==Object.keys(p).length,y?v:p}}function cr(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function kc(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(re(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=cr.apply(void 0,l)(a.dispatch),Xn(Xn({},a),{},{dispatch:i})}}}function zc(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var Tc=zc();Tc.withExtraArgument=zc;var ea=Tc;var Bc=(function(){var e=function(t,o){return e=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])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),s0=function(e,t){var o={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(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},lr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},c0=Object.defineProperty,l0=Object.defineProperties,d0=Object.getOwnPropertyDescriptors,Ic=Object.getOwnPropertySymbols,u0=Object.prototype.hasOwnProperty,f0=Object.prototype.propertyIsEnumerable,Pc=function(e,t,o){return t in e?c0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},st=function(e,t){for(var o in t||(t={}))u0.call(t,o)&&Pc(e,o,t[o]);if(Ic)for(var n=0,a=Ic(t);n<a.length;n++){var o=a[n];f0.call(t,o)&&Pc(e,o,t[o])}return e},ta=function(e,t){return l0(e,d0(t))},p0=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var h0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?cr:cr.apply(null,arguments)},A7=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function m0(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function ct(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return st(st({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var g0=(function(e){Bc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,lr([void 0],o[0].concat(this)))):new(t.bind.apply(t,lr([void 0],o.concat(this))))},t})(Array),y0=(function(e){Bc(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,lr([void 0],o[0].concat(this)))):new(t.bind.apply(t,lr([void 0],o.concat(this))))},t})(Array);function na(e){return _e(e)?Ro(e,function(){}):e}function b0(e){return typeof e=="boolean"}function v0(){return function(t){return x0(t)}}function x0(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new g0;if(o&&(b0(o)?p.push(ea):p.push(ea.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var ra=!0;function Fc(e){var t=v0(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(m0(a))v=Mc(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 x=s;if(typeof x=="function"&&(x=x(t),!ra&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!ra&&x.some(function(z){return typeof z!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=kc.apply(void 0,x),O=cr;u&&(O=h0(st({trace:!ra},typeof u=="object"&&u)));var A=new y0(S),N=A;Array.isArray(y)?N=lr([S],y):typeof y=="function"&&(N=y(A));var M=O.apply(void 0,N);return Jn(v,m,M)}function Gc(e){var t={},o=[],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 t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function S0(e){return typeof e=="function"}function C0(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?Gc(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(S0(e))u=function(){return na(e())};else{var p=na(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=lr([i[y.type]],s.filter(function(x){var S=x.matcher;return S(y)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[l]),v.reduce(function(x,S){if(S)if(Ke(x)){var O=x,A=S(O,y);return A===void 0?x:A}else{if(_e(x))return Ro(x,function(N){return S(N,y)});var A=S(x,y);if(A===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return x},g)}return m.getInitialState=u,m}function E0(e,t){return e+"/"+t}function Hc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:na(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=E0(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?ct(y,x):ct(y)});function u(){var m=typeof e.extraReducers=="function"?Gc(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],O=S===void 0?void 0:S,A=st(st({},y),s);return C0(o,function(N){for(var M in A)N.addCase(M,A[M]);for(var z=0,U=x;z<U.length;z++){var G=U[z];N.addMatcher(G.matcher,G.reducer)}O&&N.addDefaultCase(O)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var L0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",A0=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=L0[Math.random()*64|0];return t},O0=["name","message","stack","code"],oa=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),Dc=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),R0=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=O0;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},N7=(function(){function e(t,o,n){var a=ct(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:ta(st({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=ct(t+"/pending",function(m,g,y){return{payload:void 0,meta:ta(st({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=ct(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||R0)(m||"Rejected"),meta:ta(st({},x||{}),{arg:y,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 p(m){return function(g,y,v){var x=n?.idGenerator?n.idGenerator(m):A0(),S=new u,O,A=!1;function N(z){O=z,S.abort()}var M=(function(){return p0(this,null,function(){var z,U,G,Pe,mt,De,de;return s0(this,function(ve){switch(ve.label){case 0:return ve.trys.push([0,4,,5]),Pe=(z=n?.condition)==null?void 0:z.call(n,m,{getState:y,extra:v}),N0(Pe)?[4,Pe]:[3,2];case 1:Pe=ve.sent(),ve.label=2;case 2:if(Pe===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,mt=new Promise(function(ue,gt){return S.signal.addEventListener("abort",function(){return gt({name:"AbortError",message:O||"Aborted"})})}),g(i(x,m,(U=n?.getPendingMeta)==null?void 0:U.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([mt,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:N,rejectWithValue:function(ue,gt){return new oa(ue,gt)},fulfillWithValue:function(ue,gt){return new Dc(ue,gt)}})).then(function(ue){if(ue instanceof oa)throw ue;return ue instanceof Dc?a(ue.payload,x,m,ue.meta):a(ue,x,m)})])];case 3:return G=ve.sent(),[3,5];case 4:return De=ve.sent(),G=De instanceof oa?s(null,x,m,De.payload,De.meta):s(De,x,m),[3,5];case 5:return de=n&&!n.dispatchConditionRejection&&s.match(G)&&G.meta.condition,de||g(G),[2,G]}})})})();return Object.assign(M,{abort:N,requestId:x,arg:m,unwrap:function(){return M.then(w0)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function w0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function N0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $c="listener",Wc="completed",jc="cancelled",_7="task-"+jc,M7="task-"+Wc,k7=$c+"-"+jc,z7=$c+"-"+Wc;var aa="listenerMiddleware";var T7=ct(aa+"/add"),I7=ct(aa+"/removeAll"),P7=ct(aa+"/remove");var Uc,D7=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Uc||(Uc=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},_0=function(e){return function(t){setTimeout(t,e)}},U7=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_0(10);Ec();var M0=bo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),No=class extends M0(Object){};window.ftReduxStores||(window.ftReduxStores={});var Vc=class e extends No{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Eo(i))return i;if(a==null)return;let s=Hc({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=Fc({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=Pr(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new vo;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,p=i[u];return p?(...m)=>{let g=p(...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(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var _o=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Mo=L(I()),k0="ft-app-info",dr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};dr.eventName="authentication-change";var Hr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Hr.eventName="ui-locale-changed";var z0={session:(e,t)=>{(0,Mo.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>P.dispatchEvent(new dr(t.payload)),0))}},P=Mo.FtReduxStore.get({name:k0,reducers:z0,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 Kc=L(I()),ko=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},fm=(0,Kc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(P)}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=>_o.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ko([(0,ia.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ko([(0,ia.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ko([Pn({store:P.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ko([Pn({store:P.name})],t.prototype,"uiLocale",void 0),t});var Zc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(Zc||(Zc={}));var qc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(qc||(qc={}));var Yc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Yc||(Yc={}));var Xc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Xc||(Xc={}));var Qc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Qc||(Qc={}));var Jc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(Jc||(Jc={}));var el;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(el||(el={}));var tl;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(tl||(tl={}));var rl;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(rl||(rl={}));var ol;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(ol||(ol={}));var nl;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(nl||(nl={}));var al;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(al||(al={}));var il;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(il||(il={}));var sl;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(sl||(sl={}));var cl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(cl||(cl={}));var ll;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(ll||(ll={}));var dl;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(dl||(dl={}));var ul;(function(e){e.ASC="ASC",e.DESC="DESC"})(ul||(ul={}));var fl;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(fl||(fl={}));var pl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(pl||(pl={}));var hl;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(hl||(hl={}));var ml;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(ml||(ml={}));var gl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gl||(gl={}));var yl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(yl||(yl={}));var bl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(bl||(bl={}));var vl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(vl||(vl={}));var xl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(xl||(xl={}));var X;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(X||(X={}));var Le;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Le||(Le={}));var Sl;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Sl||(Sl={}));var Cl;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Cl||(Cl={}));var El;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(El||(El={}));var Ll;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Ll||(Ll={}));var Al;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Al||(Al={}));var Ol;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ol||(Ol={}));var Rl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rl||(Rl={}));var wl;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(wl||(wl={}));var Nl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Nl||(Nl={}));var _l;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(_l||(_l={}));var Ml;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Ml||(Ml={}));var kl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(kl||(kl={}));var T0={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function zl(e,t){return e===t||(T0[e]??[]).some(o=>zl(o,t))}function Tl(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>zl(n,t))}var Do=L(I());var sa=L(I());var Nt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=P.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var ur=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Nt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Nt.await()}};var he=class extends ur{constructor(t=!0,o){var n;super(o),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 sa.CacheRegistry,this.cache=t?a.commonCache:new sa.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var zo=class extends he{async listMySearches(){let{session:t}=P.getState();return Tl(t,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var To=class extends he{async listMyBookmarks(){let t=P.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Io=class extends he{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var Po=class extends he{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=P.getState().session;return!!t?.sessionAuthenticated}};var I0="ft-user-assets",P0={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Le).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;la(e,o,[...ca(e,o),a]),Il(e,o,1,n),Pl(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;la(e,o,ca(e,o).map(a=>a.id===n.id?n:a)),Pl(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;la(e,o,ca(e,o).filter(i=>i.id!==a)),Il(e,o,-1,n)}},Dl={[Le.SEARCHES]:"savedSearches",[Le.BOOKMARKS]:"bookmarks",[Le.BOOKS]:void 0,[Le.COLLECTIONS]:void 0},ca=(e,t)=>{var o;let n=Dl[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},la=(e,t,o)=>{let n=Dl[t];n&&(e[n]=o)},Il=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Le.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},Pl=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ne=Do.FtReduxStore.get({name:I0,reducers:P0,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Le).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),da=class{constructor(t=new Io,o=new Po){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new To,this.savedSearchesService=new zo,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=P.getState();(0,Do.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ne.actions.clearAssetCount(),ne.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ne.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ne.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ne.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ne.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ne.getState().assetCounts.allAsset[t]!==o.count&&ne.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ne.getState().assetCounts.bookmarkByMap[t]!==o.count&&ne.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ne.getState().assetCounts.bookmarkByMap).length!==0;t===Le.BOOKMARKS&&o&&ne.actions.clearBookmarkCountByMap(),ne.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ne.actions.bookmarks(o)}}},D0=new da;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=D0);var ua=class{addCommand(t,o=!1){P.commands.add(t,o)}consumeCommand(t){return P.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ua;var Ae=L(I());var Ul,fr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},U0=Symbol("clearAfterUnitTest"),Uo=class extends(0,Ae.withEventBus)(he){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ul]=()=>{this.defaultMessages={},this.cache=new Ae.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=P.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Ae.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Ae.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Ae.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new fr({loadedContexts:t})),this.dispatchEvent(new fr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new fr({loadedContexts:[t]})),this.dispatchEvent(new fr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Ae.delay)(0).then(()=>n()).catch(()=>null)))}};Ul=U0;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Uo{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Uo{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var pr=window.FluidTopicsI18nService,Bo=window.FluidTopicsCustomI18nService;var Bl=L(I()),fa=class{highlightHtml(t,o,n){(0,Bl.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new fa;var Fl=L(I());var pa=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return Fl.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new pa;var Gl=L(I());var $r=class{static get(t,o){var n,a;let i=P.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 Gl.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var ha=class{urlToSearchRequest(t){return $r.get().parse(t)}searchRequestToUrl(t){return $r.get().serialize(t)}};window.FluidTopicsUrlService=new ha;var Ze=L(I());var _t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};_t.eventName="change";var ma=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},Hl=new ma;var Fo=class e extends Ze.WithEventBus{static build(){return new e(window.history,Hl,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ze.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new _t(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(_t.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(_t.eventName,t)}currentItem(){return(0,Ze.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Ze.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,Ze.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Ze.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Fo.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var $l=L(j());var Wl=$l.css`
911
911
  `;var Kl=L(j()),me=L(te()),zt=L(I());var Mt=L(I());function jl(e,t){let{authenticationRequired:o,session:n}=P.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Go=class extends ur{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ga=class e extends Mt.FtStateManager{static build(t){return new e(P,t)}constructor(t,o){super(),this.store=t,this.cache=new Mt.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new Go,this.cleanSessionDebouncer=new Mt.Debouncer,this.reloadDebouncer=new Mt.Debouncer(500),this.apiProvider=o??(()=>Nt.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(dr.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 t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>jl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var o,n,a,i,s;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((o=this.localesConfiguration.availableUiLocales)!==null&&o!==void 0?o:[]),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(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Hr(o)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},Vl=ga.build();var kt=class extends Event{constructor(t,o,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=a??!1}};var Wr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new kt(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(o);i===void 0&&a.callbacks.set(o,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var oe=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},K=class extends zt.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=Vl,this.contextRoot=new Wr}render(){return Kl.html`
912
912
  <slot></slot>
913
913
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>pr.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};K.elementDefinitions={};K.styles=Wl;oe([(0,me.property)()],K.prototype,"baseUrl",void 0);oe([(0,me.property)()],K.prototype,"apiIntegrationIdentifier",void 0);oe([(0,me.property)()],K.prototype,"apiIntegrationAppVersion",void 0);oe([(0,me.property)()],K.prototype,"uiLocale",void 0);oe([(0,zt.jsonProperty)(null)],K.prototype,"availableUiLocales",void 0);oe([(0,zt.jsonProperty)(null)],K.prototype,"metadataConfiguration",void 0);oe([(0,me.property)({type:Boolean})],K.prototype,"editorMode",void 0);oe([(0,me.property)({type:Boolean})],K.prototype,"noCustom",void 0);oe([(0,me.property)({type:Boolean})],K.prototype,"openExternalDocumentInNewTab",void 0);oe([(0,me.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],K.prototype,"noCustomComponent",void 0);oe([(0,me.property)({type:Boolean})],K.prototype,"withManualResources",void 0);oe([(0,me.property)({type:Boolean})],K.prototype,"navigatorOnline",void 0);oe([(0,me.property)({type:Boolean})],K.prototype,"forcedOffline",void 0);oe([(0,me.property)({type:Boolean})],K.prototype,"authenticationRequired",void 0);oe([(0,zt.jsonProperty)([])],K.prototype,"messageContexts",void 0);oe([(0,zt.jsonProperty)(void 0)],K.prototype,"session",void 0);var ql=L(I());var Zl={"ft-app-context":K};(0,ql.customElements)(Zl);var Yl=L(te());var ya=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},hr=new ya;var G0=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Vr=Symbol("i18nAttributes"),Xl=Symbol("i18nListAttributes"),Ql=Symbol("i18nProperties"),Ho=Symbol("i18nContexts"),jr=Symbol("i18nUnsubs"),jo=(0,mr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?Bo:pr}i18n(i){let{context:s,key:l,message:u}=i,{custom:p,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let y=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...y)}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(hr.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 p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,p=(m,g,y)=>y?.context&&y.key&&i(m,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[Vr])===null||s===void 0||s.forEach((m,g)=>u[g]=p(m,g,u[g])),(l=this[Xl])===null||l===void 0||l.forEach((m,g)=>{var y;return u[g]=(y=u[g])===null||y===void 0?void 0:y.map(v=>p(m,g,v))})}updateI18nProperties(i){var s;(s=this[Ql])===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[Ho].set(u,{isCustomContext:l}),this[jr].has(u)||this[jr].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[Ho].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Ho].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[jr].forEach(i=>i()),this[jr].clear()}}return t=Ho,o=jr,G0([(0,Yl.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),$o=class extends jo(mr.FtLitElement){},Wo=class extends jo(mr.FtLitElementRedux){};var Jl=L(I());var ba=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?hr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},H0=new ba;var e2=(e,t)=>(o,n)=>{var a;o.constructor.createProperty(n,{type:Object,hasChanged:Jl.hasChanged,converter:hr,...t}),o[Vr]=(a=o[Vr])!==null&&a!==void 0?a:new Map,o[Vr].set(n,e??{})};var Vo=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?Bo:pr}constructor(t,o=!1){this.name=t,this.custom=o,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 t2=L(j());var r2=t2.css`
@@ -44,7 +44,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
44
44
  input::-webkit-search-results-decoration {
45
45
  display: none;
46
46
  }
47
- `;var Sl={};var vi={};G(vi,{ParametrizedLabelResolver:()=>go});var go=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Gi={};G(Gi,{FtCommandQueue:()=>yo,FtLitElementRedux:()=>Ht,FtReduxStore:()=>jt,FtStateManager:()=>Co,ReduxWatcher:()=>hn,clearAllStores:()=>af,isFtReduxStore:()=>mr,redux:()=>hr,reduxEventListener:()=>Cu,reduxReactive:()=>Su,watch:()=>sf,withRedux:()=>Cl});var Su=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},hr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:nt,attribute:!1,...e};A(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},Cu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var yo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==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))}};function mr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var bo=Symbol("internalReduxEventsUnsubscribers"),bt=Symbol("internalStoresUnsubscribers"),Bt=Symbol("internalStores"),Cl=de(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Bt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Bt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Bt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Bt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Bt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Bt].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[bt].has(s.store):this[bt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[bt].set(s,c.subscribe(()=>this.updateFromStores())),this[bo].set(s,[]),mr(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[bo].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[bt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[bt].has(s)&&this[bt].get(s)(),this[bt].delete(s),(c=this[bo].get(s))===null||c===void 0||c.forEach(d=>d()),this[bo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=bt,r=Bt,o=bo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Ht=class extends Cl(Z){};function De(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];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 st(t){return!!t&&!!t[J]}function Ge(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Nu})(t)||Array.isArray(t)||!!t[_l]||!!(!((e=t.constructor)===null||e===void 0)&&e[_l])||wi(t)||_i(t))}function Gt(t,e,r){r===void 0&&(r=!1),br(t)===0?(r?Object.keys:yr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function br(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:wi(t)?2:_i(t)?3:0}function gr(t,e){return br(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Eu(t,e){return br(t)===2?t.get(e):t[e]}function Nl(t,e,r){var o=br(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Ml(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function wi(t){return wu&&t instanceof Map}function _i(t){return _u&&t instanceof Set}function vt(t){return t.o||t.t}function Ni(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Il(t);delete e[J];for(var r=yr(e),o=0;o<r.length;o++){var a=r[o],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 Mi(t,e){return e===void 0&&(e=!1),Ti(t)||st(t)||!Ge(t)||(br(t)>1&&(t.set=t.add=t.clear=t.delete=Au),Object.freeze(t),e&&Gt(t,(function(r,o){return Mi(o,!0)}),!0)),t}function Au(){De(2)}function Ti(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function tt(t){var e=Ri[t];return e||De(18,t),e}function Lu(t,e){Ri[t]||(Ri[t]=e)}function Ai(){return xo}function xi(t,e){e&&(tt("Patches"),t.u=[],t.s=[],t.v=e)}function ln(t){Li(t),t.p.forEach(Ou),t.p=null}function Li(t){t===xo&&(xo=t.l)}function El(t){return xo={p:[],l:xo,h:t,m:!0,_:0}}function Ou(t){var e=t[J];e.i===0||e.i===1?e.j():e.g=!0}function Si(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||tt("ES5").S(e,t,o),o?(r[J].P&&(ln(e),De(4)),Ge(t)&&(t=dn(e,t),e.l||un(e,t)),e.u&&tt("Patches").M(r[J].t,t,e.u,e.s)):t=dn(e,r,[]),ln(e),e.u&&e.v(e.u,e.s),t!==kl?t:void 0}function dn(t,e,r){if(Ti(e))return e;var o=e[J];if(!o)return Gt(e,(function(c,d){return Al(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return un(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ni(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Gt(i,(function(c,d){return Al(t,o,a,c,d,r,s)})),un(t,a,!1),r&&t.u&&tt("Patches").N(o,r,t.u,t.s)}return o.o}function Al(t,e,r,o,a,i,s){if(st(a)){var c=dn(t,a,i&&e&&e.i!==3&&!gr(e.R,o)?i.concat(o):void 0);if(Nl(r,o,c),!st(c))return;t.m=!1}else s&&r.add(a);if(Ge(a)&&!Ti(a)){if(!t.h.D&&t._<1)return;dn(t,a),e&&e.A.l||un(t,a)}}function un(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Mi(e,r)}function Ci(t,e){var r=t[J];return(r?vt(r):t)[e]}function Ll(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function xt(t){t.P||(t.P=!0,t.l&&xt(t.l))}function Ei(t){t.o||(t.o=Ni(t.t))}function Oi(t,e,r){var o=wi(e)?tt("MapSet").F(e,r):_i(e)?tt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Ai(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=So;s&&(d=[c],u=vo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):tt("ES5").J(e,r);return(r?r.A:Ai()).p.push(o),o}function Ru(t){return st(t)||De(22,t),(function e(r){if(!Ge(r))return r;var o,a=r[J],i=br(r);if(a){if(!a.P&&(a.i<4||!tt("ES5").K(a)))return a.t;a.I=!0,o=Ol(r,i),a.I=!1}else o=Ol(r,i);return Gt(o,(function(s,c){a&&Eu(a.t,s)===c||Nl(o,s,e(c))})),i===3?new Set(o):o})(t)}function Ol(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ni(t)}function Tl(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[J];return So.get(u,s)},set:function(u){var m=this[J];So.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][J];if(!d.P)switch(d.i){case 5:o(d)&&xt(d);break;case 4:r(d)&&xt(d)}}}function r(s){for(var c=s.t,d=s.k,u=yr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==J){var y=c[h];if(y===void 0&&!gr(c,h))return!0;var b=d[h],x=b&&b[J];if(x?x.t!==y:!Ml(b,y))return!0}}var C=!!c[J];return u.length!==yr(c).length+(C?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&De(3,JSON.stringify(vt(s)))}var i={};Lu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(b,""+x,t(x,!0));return b}var C=Il(y);delete C[J];for(var O=yr(C),R=0;R<O.length;R++){var N=O[R];C[N]=t(N,h||!!C[N].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(d,s),m={i:d?5:4,A:c?c.A:Ai(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,J,{value:m,writable:!0}),u},S:function(s,c,d){d?st(c)&&c[J].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[J];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)Gt(b,(function(S){S!==J&&(y[S]!==void 0||gr(y,S)?x[S]||u(b[S]):(x[S]=!0,xt(h)))})),Gt(y,(function(S){b[S]!==void 0||gr(b,S)||(x[S]=!1,xt(h))}));else if(C===5){if(o(h)&&(xt(h),x.length=!0),b.length<y.length)for(var O=b.length;O<y.length;O++)x[O]=!1;else for(var R=y.length;R<b.length;R++)x[R]=!0;for(var N=Math.min(b.length,y.length),E=0;E<N;E++)b.hasOwnProperty(E)||(x[E]=!0),x[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Rl,xo,ki=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",wu=typeof Map<"u",_u=typeof Set<"u",wl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",kl=ki?Symbol.for("immer-nothing"):((Rl={})["immer-nothing"]=!0,Rl),_l=ki?Symbol.for("immer-draftable"):"__$immer_draftable",J=ki?Symbol.for("immer-state"):"__$immer_state";var Nu=""+Object.prototype.constructor,yr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Il=Object.getOwnPropertyDescriptors||function(t){var e={};return yr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ri={},So={get:function(t,e){if(e===J)return t;var r=vt(t);if(!gr(r,e))return(function(a,i,s){var c,d=Ll(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!Ge(o)?o:o===Ci(t.t,e)?(Ei(t),t.o[e]=Oi(t.A.h,o,t)):o},has:function(t,e){return e in vt(t)},ownKeys:function(t){return Reflect.ownKeys(vt(t))},set:function(t,e,r){var o=Ll(vt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ci(vt(t),e),i=a?.[J];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ml(r,a)&&(r!==void 0||gr(t.t,e)))return!0;Ei(t),xt(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 Ci(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ei(t),xt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=vt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){De(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){De(12)}},vo={};Gt(So,(function(t,e){vo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),vo.deleteProperty=function(t,e){return vo.set.call(this,t,e,void 0)},vo.set=function(t,e,r){return So.set.call(this,t[0],e,r,t[0])};var Mu=(function(){function t(r){var o=this;this.O=wl,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(C){var O=this;C===void 0&&(C=c);for(var R=arguments.length,N=Array(R>1?R-1:0),E=1;E<R;E++)N[E-1]=arguments[E];return d.produce(C,(function(S){var L;return(L=i).call.apply(L,[O,S].concat(N))}))}}var u;if(typeof i!="function"&&De(6),s!==void 0&&typeof s!="function"&&De(7),Ge(a)){var m=El(o),h=Oi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?ln(m):Li(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return xi(m,s),Si(C,m)}),(function(C){throw ln(m),C})):(xi(m,s),Si(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===kl&&(u=void 0),o.D&&Mi(u,!0),s){var b=[],x=[];tt("Patches").M(a,u,b,x),s(b,x)}return u}De(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,s,c]})):[d,s,c]},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){Ge(r)||De(8),st(r)&&(r=Ru(r));var o=El(this),a=Oi(this,r,void 0);return a[J].C=!0,Li(o),a},e.finishDraft=function(r,o){var a=r&&r[J],i=a.A;return xi(i,o),Si(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!wl&&De(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=tt("Patches").$;return st(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),we=new Mu,Tu=we.produce,$g=we.produceWithPatches.bind(we),Bg=we.setAutoFreeze.bind(we),Hg=we.setUseProxies.bind(we),Gg=we.applyPatches.bind(we),Wg=we.createDraft.bind(we),jg=we.finishDraft.bind(we),fn=Tu;function Wt(t){"@babel/helpers - typeof";return Wt=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},Wt(t)}function Pl(t,e){if(Wt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Wt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zl(t){var e=Pl(t,"string");return Wt(e)=="symbol"?e:e+""}function Dl(t,e,r){return(e=zl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ul(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Ii(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ul(Object(r),!0).forEach(function(o){Dl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ul(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function me(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 Fl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Pi=function(){return Math.random().toString(36).substring(7).split("").join(".")},pn={INIT:"@@redux/INIT"+Pi(),REPLACE:"@@redux/REPLACE"+Pi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Pi()}};function ku(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 zi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(me(1));return r(zi)(t,e)}if(typeof t!="function")throw new Error(me(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(me(3));return i}function h(C){if(typeof C!="function")throw new Error(me(4));if(d)throw new Error(me(5));var O=!0;return u(),c.push(C),function(){if(O){if(d)throw new Error(me(6));O=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!ku(C))throw new Error(me(7));if(typeof C.type>"u")throw new Error(me(8));if(d)throw new Error(me(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var O=s=c,R=0;R<O.length;R++){var N=O[R];N()}return C}function b(C){if(typeof C!="function")throw new Error(me(10));a=C,y({type:pn.REPLACE})}function x(){var C,O=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(me(11));function E(){N.next&&N.next(m())}E();var S=O(E);return{unsubscribe:S}}},C[Fl]=function(){return this},C}return y({type:pn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Fl]=x,o}function Iu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:pn.INIT});if(typeof o>"u")throw new Error(me(12));if(typeof r(void 0,{type:pn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function $l(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{Iu(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},x=0;x<i.length;x++){var C=i[x],O=r[C],R=u[C],N=O(R,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(me(14))}b[C]=N,y=y||N!==R}return y=y||i.length!==Object.keys(u).length,y?b:u}}function vr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function Bl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(me(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=vr.apply(void 0,c)(a.dispatch),Ii(Ii({},a),{},{dispatch:i})}}}function Hl(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var Gl=Hl();Gl.withExtraArgument=Hl;var Di=Gl;var Zl=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[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 o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Pu=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},xr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},zu=Object.defineProperty,Du=Object.defineProperties,Uu=Object.getOwnPropertyDescriptors,Wl=Object.getOwnPropertySymbols,Fu=Object.prototype.hasOwnProperty,$u=Object.prototype.propertyIsEnumerable,jl=function(t,e,r){return e in t?zu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},St=function(t,e){for(var r in e||(e={}))Fu.call(e,r)&&jl(t,r,e[r]);if(Wl)for(var o=0,a=Wl(e);o<a.length;o++){var r=a[o];$u.call(e,r)&&jl(t,r,e[r])}return t},Ui=function(t,e){return Du(t,Uu(e))},Bu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Hu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vr:vr.apply(null,arguments)},ly=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Gu(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 Ct(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return St(St({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}var Wu=(function(t){Zl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,xr([void 0],r[0].concat(this)))):new(e.bind.apply(e,xr([void 0],r.concat(this))))},e})(Array),ju=(function(t){Zl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,xr([void 0],r[0].concat(this)))):new(e.bind.apply(e,xr([void 0],r.concat(this))))},e})(Array);function Bi(t){return Ge(t)?fn(t,function(){}):t}function Vu(t){return typeof t=="boolean"}function Ku(){return function(e){return Zu(e)}}function Zu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Wu;if(r&&(Vu(r)?u.push(Di):u.push(Di.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Fi=!0;function ql(t){var e=Ku(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Gu(a))b=$l(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 x=s;if(typeof x=="function"&&(x=x(e),!Fi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Fi&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Bl.apply(void 0,x),O=vr;d&&(O=Hu(St({trace:!Fi},typeof d=="object"&&d)));var R=new ju(C),N=R;Array.isArray(y)?N=xr([C],y):typeof y=="function"&&(N=y(R));var E=O.apply(void 0,N);return zi(b,m,E)}function Yl(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function qu(t){return typeof t=="function"}function Yu(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?Yl(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(qu(t))d=function(){return Bi(t())};else{var u=Bi(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=xr([i[y.type]],s.filter(function(x){var C=x.matcher;return C(y)}).map(function(x){var C=x.reducer;return C}));return b.filter(function(x){return!!x}).length===0&&(b=[c]),b.reduce(function(x,C){if(C)if(st(x)){var O=x,R=C(O,y);return R===void 0?x:R}else{if(Ge(x))return fn(x,function(N){return C(N,y)});var R=C(x,y);if(R===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return x},h)}return m.getInitialState=d,m}function Xu(t,e){return t+"/"+e}function Xl(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:Bi(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Xu(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?Ct(y,x):Ct(y)});function d(){var m=typeof t.extraReducers=="function"?Yl(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],O=C===void 0?void 0:C,R=St(St({},y),s);return Yu(r,function(N){for(var E in R)N.addCase(E,R[E]);for(var S=0,L=x;S<L.length;S++){var T=L[S];N.addMatcher(T.matcher,T.reducer)}O&&N.addDefaultCase(O)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Ju="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ju[Math.random()*64|0];return e},ef=["name","message","stack","code"],$i=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Vl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),tf=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=ef;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},py=(function(){function t(e,r,o){var a=Ct(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Ui(St({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=Ct(e+"/pending",function(m,h,y){return{payload:void 0,meta:Ui(St({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Ct(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||tf)(m||"Rejected"),meta:Ui(St({},x||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=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 u(m){return function(h,y,b){var x=o?.idGenerator?o.idGenerator(m):Qu(),C=new d,O,R=!1;function N(S){O=S,C.abort()}var E=(function(){return Bu(this,null,function(){var S,L,T,F,X,H,I;return Pu(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),F=(S=o?.condition)==null?void 0:S.call(o,m,{getState:y,extra:b}),of(F)?[4,F]:[3,2];case 1:F=D.sent(),D.label=2;case 2:if(F===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,X=new Promise(function(W,ie){return C.signal.addEventListener("abort",function(){return ie({name:"AbortError",message:O||"Aborted"})})}),h(i(x,m,(L=o?.getPendingMeta)==null?void 0:L.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([X,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(W,ie){return new $i(W,ie)},fulfillWithValue:function(W,ie){return new Vl(W,ie)}})).then(function(W){if(W instanceof $i)throw W;return W instanceof Vl?a(W.payload,x,m,W.meta):a(W,x,m)})])];case 3:return T=D.sent(),[3,5];case 4:return H=D.sent(),T=H instanceof $i?s(null,x,m,H.payload,H.meta):s(H,x,m),[3,5];case 5:return I=o&&!o.dispatchConditionRejection&&s.match(T)&&T.meta.condition,I||h(T),[2,T]}})})})();return Object.assign(E,{abort:N,requestId:x,arg:m,unwrap:function(){return E.then(rf)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function rf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function of(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Jl="listener",Ql="completed",e1="cancelled",hy="task-"+e1,my="task-"+Ql,gy=Jl+"-"+e1,yy=Jl+"-"+Ql;var Hi="listenerMiddleware";var by=Ct(Hi+"/add"),vy=Ct(Hi+"/removeAll"),xy=Ct(Hi+"/remove");var Kl,Sy=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Kl||(Kl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},nf=function(t){return function(e){setTimeout(e,t)}},Cy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:nf(10);Tl();window.ftReduxStores||(window.ftReduxStores={});var jt=class t extends at{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(mr(i))return i;if(a==null)return;let s=Xl({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=ql({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=$e(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new yo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),this.eventBus=o??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()}};function af(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))mr(e)&&e.clear()}var hn=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);nt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function sf(t,e,r){return new hn(t,e,r).watch()}var Co=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Vi={};G(Vi,{scrollHelper:()=>cf});var Wi,mn=new Map,ji=class{lock(e,r){if(r){let o=mn.get(r);if(o==null||o===e)return mn.set(r,e),r}}release(e,r){r&&mn.get(r)===e&&mn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of ga(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=kt(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Wi=window.FluidTopicsScrollHelper)!==null&&Wi!==void 0?Wi:new ji;var cf=window.FluidTopicsScrollHelper;var Zi={};G(Zi,{SearchPlaceConverter:()=>Er,SearchPlaceQueryParams:()=>B,isSearchPlaceQueryParams:()=>H1,serializeRequest:()=>uf});var t1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(t1||(t1={}));var r1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(r1||(r1={}));var o1;(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"})(o1||(o1={}));var n1;(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"})(n1||(n1={}));var a1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(a1||(a1={}));var i1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(i1||(i1={}));var s1;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(s1||(s1={}));var c1;(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"})(c1||(c1={}));var l1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(l1||(l1={}));var d1;(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"})(d1||(d1={}));var u1;(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"})(u1||(u1={}));var f1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(f1||(f1={}));var p1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(p1||(p1={}));var h1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(h1||(h1={}));var m1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(m1||(m1={}));var g1;(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"})(g1||(g1={}));var Sr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Sr||(Sr={}));var y1;(function(t){t.ASC="ASC",t.DESC="DESC"})(y1||(y1={}));var b1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(b1||(b1={}));var Ki;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ki||(Ki={}));var O1=t=>Object.keys(Ki).includes(t);var v1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(v1||(v1={}));var x1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(x1||(x1={}));var S1;(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"})(S1||(S1={}));var Cr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cr||(Cr={}));var R1=t=>Object.keys(Cr).includes(t);var C1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(C1||(C1={}));var E1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(E1||(E1={}));var A1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(A1||(A1={}));var ae;(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"})(ae||(ae={}));var Ue;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ue||(Ue={}));var L1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(L1||(L1={}));var w1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(w1||(w1={}));var _1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(_1||(_1={}));var N1;(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"})(N1||(N1={}));var M1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(M1||(M1={}));var T1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(T1||(T1={}));var k1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(k1||(k1={}));var I1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(I1||(I1={}));var P1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(P1||(P1={}));var z1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(z1||(z1={}));var D1;(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"})(D1||(D1={}));var U1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(U1||(U1={}));var lf={[ae.PERSONAL_BOOK_SHARE_USER]:[ae.PERSONAL_BOOK_USER],[ae.HTML_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.PDF_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.KHUB_ADMIN]:[ae.CONTENT_PUBLISHER],[ae.ADMIN]:[ae.KHUB_ADMIN,ae.USERS_ADMIN,ae.PORTAL_ADMIN,ae.BEHAVIOR_DATA_USER],[ae.GENERATIVE_AI_EXPORT_USER]:[ae.GENERATIVE_AI_USER]};function F1(t,e){return t===e||(lf[t]??[]).some(r=>F1(r,e))}function $1(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(o=>F1(o,e))}function df(t){return`"${t}"`}function B1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function uf(t,e){return new Er(t).serialize(e)}var B;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(B||(B={}));var ff=new Set(Object.values(B));function H1(t){return ff.has(t)}var Er=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,u,m,h,y,b;let x=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&x.append(B.LOCALE,e.contentLocale):x.append(B.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append(B.QUERY,e.query);let C=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(C.length>0){let S=C.map(L=>{var T,F;let X=((F=(T=L.valueFilter)===null||T===void 0?void 0:T.values)!==null&&F!==void 0?F:[]).map(H=>this.escapeFilters(H)).map(H=>df(B1(H))).join("_");return`${L.key}~${X}`}).join("*");x.append(B.VALUE_FILTERS,S)}let O=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(O.length>0){let S=O.map(L=>{var T;return`${L.key}~${(T=L.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");x.append(B.DATE_FILTERS,S)}let R=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&u!==void 0?u:[];if(R.length>0){let S=R.map(L=>{var T,F;return`${L.key}~${(T=L.rangeFilter)===null||T===void 0?void 0:T.from}_${(F=L.rangeFilter)===null||F===void 0?void 0:F.to}`}).join("*");x.append(B.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append(B.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append(B.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append(B.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&x.append(B.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append(B.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let N=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let S in N)x.append(S,N[S]);let E=new Array;return x.forEach((S,L)=>{E.push(this.encodeQueryString(L)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(R){console.warn("Could not decode search request query params, fallback on raw value",R)}let d=new URLSearchParams(e),u=d.get(B.LOCALE)==="all"?void 0:d.get(B.LOCALE),m=((r=d.get(B.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(B.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(B.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(B.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get(B.KEYWORD_MATCH),C=x?x.toUpperCase()===Sr.MANDATORY?Sr.MANDATORY:Sr.OPTIONAL:void 0,O={};for(let R of d.keys())H1(R)||(O[R]=d.get(R));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(B.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:O1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:kt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:O}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(B.FILTERS)&&(d=this.parseValueFilters((r=e.get(B.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(B.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(B.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(B.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(B.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(B.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(B1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Cr[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(R1(e))return[{key:"ft:lastEdition",dateFilter:{type:Cr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[B.LOCALE,B.FILTERS,B.VALUE_FILTERS,B.DATE_FILTERS,B.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(B.LOCALE),r!==void 0&&o.searchParams.append(B.LOCALE,r),o.toString()}};var Xi={};G(Xi,{toFtFormComponent:()=>Yi});var qi=Symbol("elementInternals"),Yi=de(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[qi].form}constructor(...o){super(o),this[qi]=this.attachInternals()}setFormValue(o){this[qi].setFormValue(o)}}return e});var Ji={};G(Ji,{DateFormatter:()=>Vt});var Vt=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var es={};G(es,{ALL_KEYS_VALUE:()=>Qi,SameWindowStorageEvent:()=>Ar});var Qi="__all__",Ar=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Qi}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Ar(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Ar(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Ar(Qi))}});var rs={};G(rs,{FocusMainContentEvent:()=>ts});var ts=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var G1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function pf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function hf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",pf);document.addEventListener("click",hf);var W1=z`
47
+ `;var Sl={};var vi={};G(vi,{ParametrizedLabelResolver:()=>go});var go=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Gi={};G(Gi,{FtCommandQueue:()=>yo,FtLitElementRedux:()=>Ht,FtReduxStore:()=>jt,FtStateManager:()=>Co,ReduxWatcher:()=>hn,clearAllStores:()=>af,isFtReduxStore:()=>mr,redux:()=>hr,reduxEventListener:()=>Cu,reduxReactive:()=>Su,watch:()=>sf,withRedux:()=>Cl});var Su=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},hr=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:nt,attribute:!1,...e};A(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},Cu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var yo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==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))}};function mr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var bo=Symbol("internalReduxEventsUnsubscribers"),bt=Symbol("internalStoresUnsubscribers"),Bt=Symbol("internalStores"),Cl=de(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Bt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Bt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Bt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Bt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Bt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Bt].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[bt].has(s.store):this[bt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[bt].set(s,c.subscribe(()=>this.updateFromStores())),this[bo].set(s,[]),mr(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[bo].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[bt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[bt].has(s)&&this[bt].get(s)(),this[bt].delete(s),(c=this[bo].get(s))===null||c===void 0||c.forEach(d=>d()),this[bo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=bt,r=Bt,o=bo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Ht=class extends Cl(Z){};function De(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];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 st(t){return!!t&&!!t[J]}function Ge(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Nu})(t)||Array.isArray(t)||!!t[_l]||!!(!((e=t.constructor)===null||e===void 0)&&e[_l])||wi(t)||_i(t))}function Gt(t,e,r){r===void 0&&(r=!1),br(t)===0?(r?Object.keys:yr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function br(t){var e=t[J];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:wi(t)?2:_i(t)?3:0}function gr(t,e){return br(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Eu(t,e){return br(t)===2?t.get(e):t[e]}function Nl(t,e,r){var o=br(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Ml(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function wi(t){return wu&&t instanceof Map}function _i(t){return _u&&t instanceof Set}function vt(t){return t.o||t.t}function Ni(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Il(t);delete e[J];for(var r=yr(e),o=0;o<r.length;o++){var a=r[o],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 Mi(t,e){return e===void 0&&(e=!1),Ti(t)||st(t)||!Ge(t)||(br(t)>1&&(t.set=t.add=t.clear=t.delete=Au),Object.freeze(t),e&&Gt(t,(function(r,o){return Mi(o,!0)}),!0)),t}function Au(){De(2)}function Ti(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function tt(t){var e=Ri[t];return e||De(18,t),e}function Lu(t,e){Ri[t]||(Ri[t]=e)}function Ai(){return xo}function xi(t,e){e&&(tt("Patches"),t.u=[],t.s=[],t.v=e)}function ln(t){Li(t),t.p.forEach(Ou),t.p=null}function Li(t){t===xo&&(xo=t.l)}function El(t){return xo={p:[],l:xo,h:t,m:!0,_:0}}function Ou(t){var e=t[J];e.i===0||e.i===1?e.j():e.g=!0}function Si(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||tt("ES5").S(e,t,o),o?(r[J].P&&(ln(e),De(4)),Ge(t)&&(t=dn(e,t),e.l||un(e,t)),e.u&&tt("Patches").M(r[J].t,t,e.u,e.s)):t=dn(e,r,[]),ln(e),e.u&&e.v(e.u,e.s),t!==kl?t:void 0}function dn(t,e,r){if(Ti(e))return e;var o=e[J];if(!o)return Gt(e,(function(c,d){return Al(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return un(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Ni(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Gt(i,(function(c,d){return Al(t,o,a,c,d,r,s)})),un(t,a,!1),r&&t.u&&tt("Patches").N(o,r,t.u,t.s)}return o.o}function Al(t,e,r,o,a,i,s){if(st(a)){var c=dn(t,a,i&&e&&e.i!==3&&!gr(e.R,o)?i.concat(o):void 0);if(Nl(r,o,c),!st(c))return;t.m=!1}else s&&r.add(a);if(Ge(a)&&!Ti(a)){if(!t.h.D&&t._<1)return;dn(t,a),e&&e.A.l||un(t,a)}}function un(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Mi(e,r)}function Ci(t,e){var r=t[J];return(r?vt(r):t)[e]}function Ll(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function xt(t){t.P||(t.P=!0,t.l&&xt(t.l))}function Ei(t){t.o||(t.o=Ni(t.t))}function Oi(t,e,r){var o=wi(e)?tt("MapSet").F(e,r):_i(e)?tt("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:Ai(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=So;s&&(d=[c],u=vo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):tt("ES5").J(e,r);return(r?r.A:Ai()).p.push(o),o}function Ru(t){return st(t)||De(22,t),(function e(r){if(!Ge(r))return r;var o,a=r[J],i=br(r);if(a){if(!a.P&&(a.i<4||!tt("ES5").K(a)))return a.t;a.I=!0,o=Ol(r,i),a.I=!1}else o=Ol(r,i);return Gt(o,(function(s,c){a&&Eu(a.t,s)===c||Nl(o,s,e(c))})),i===3?new Set(o):o})(t)}function Ol(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Ni(t)}function Tl(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[J];return So.get(u,s)},set:function(u){var m=this[J];So.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][J];if(!d.P)switch(d.i){case 5:o(d)&&xt(d);break;case 4:r(d)&&xt(d)}}}function r(s){for(var c=s.t,d=s.k,u=yr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==J){var y=c[h];if(y===void 0&&!gr(c,h))return!0;var b=d[h],x=b&&b[J];if(x?x.t!==y:!Ml(b,y))return!0}}var C=!!c[J];return u.length!==yr(c).length+(C?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&De(3,JSON.stringify(vt(s)))}var i={};Lu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(b,""+x,t(x,!0));return b}var C=Il(y);delete C[J];for(var O=yr(C),R=0;R<O.length;R++){var N=O[R];C[N]=t(N,h||!!C[N].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(d,s),m={i:d?5:4,A:c?c.A:Ai(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,J,{value:m,writable:!0}),u},S:function(s,c,d){d?st(c)&&c[J].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[J];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)Gt(b,(function(S){S!==J&&(y[S]!==void 0||gr(y,S)?x[S]||u(b[S]):(x[S]=!0,xt(h)))})),Gt(y,(function(S){b[S]!==void 0||gr(b,S)||(x[S]=!1,xt(h))}));else if(C===5){if(o(h)&&(xt(h),x.length=!0),b.length<y.length)for(var O=b.length;O<y.length;O++)x[O]=!1;else for(var R=y.length;R<b.length;R++)x[R]=!0;for(var N=Math.min(b.length,y.length),E=0;E<N;E++)b.hasOwnProperty(E)||(x[E]=!0),x[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Rl,xo,ki=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",wu=typeof Map<"u",_u=typeof Set<"u",wl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",kl=ki?Symbol.for("immer-nothing"):((Rl={})["immer-nothing"]=!0,Rl),_l=ki?Symbol.for("immer-draftable"):"__$immer_draftable",J=ki?Symbol.for("immer-state"):"__$immer_state";var Nu=""+Object.prototype.constructor,yr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Il=Object.getOwnPropertyDescriptors||function(t){var e={};return yr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ri={},So={get:function(t,e){if(e===J)return t;var r=vt(t);if(!gr(r,e))return(function(a,i,s){var c,d=Ll(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!Ge(o)?o:o===Ci(t.t,e)?(Ei(t),t.o[e]=Oi(t.A.h,o,t)):o},has:function(t,e){return e in vt(t)},ownKeys:function(t){return Reflect.ownKeys(vt(t))},set:function(t,e,r){var o=Ll(vt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ci(vt(t),e),i=a?.[J];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ml(r,a)&&(r!==void 0||gr(t.t,e)))return!0;Ei(t),xt(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 Ci(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ei(t),xt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=vt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){De(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){De(12)}},vo={};Gt(So,(function(t,e){vo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),vo.deleteProperty=function(t,e){return vo.set.call(this,t,e,void 0)},vo.set=function(t,e,r){return So.set.call(this,t[0],e,r,t[0])};var Mu=(function(){function t(r){var o=this;this.O=wl,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(C){var O=this;C===void 0&&(C=c);for(var R=arguments.length,N=Array(R>1?R-1:0),E=1;E<R;E++)N[E-1]=arguments[E];return d.produce(C,(function(S){var L;return(L=i).call.apply(L,[O,S].concat(N))}))}}var u;if(typeof i!="function"&&De(6),s!==void 0&&typeof s!="function"&&De(7),Ge(a)){var m=El(o),h=Oi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?ln(m):Li(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return xi(m,s),Si(C,m)}),(function(C){throw ln(m),C})):(xi(m,s),Si(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===kl&&(u=void 0),o.D&&Mi(u,!0),s){var b=[],x=[];tt("Patches").M(a,u,b,x),s(b,x)}return u}De(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,s,c]})):[d,s,c]},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){Ge(r)||De(8),st(r)&&(r=Ru(r));var o=El(this),a=Oi(this,r,void 0);return a[J].C=!0,Li(o),a},e.finishDraft=function(r,o){var a=r&&r[J],i=a.A;return xi(i,o),Si(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!wl&&De(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=tt("Patches").$;return st(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),we=new Mu,Tu=we.produce,$g=we.produceWithPatches.bind(we),Bg=we.setAutoFreeze.bind(we),Hg=we.setUseProxies.bind(we),Gg=we.applyPatches.bind(we),Wg=we.createDraft.bind(we),jg=we.finishDraft.bind(we),fn=Tu;function Wt(t){"@babel/helpers - typeof";return Wt=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},Wt(t)}function Pl(t,e){if(Wt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Wt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zl(t){var e=Pl(t,"string");return Wt(e)=="symbol"?e:e+""}function Dl(t,e,r){return(e=zl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ul(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Ii(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ul(Object(r),!0).forEach(function(o){Dl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ul(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function me(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 Fl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Pi=function(){return Math.random().toString(36).substring(7).split("").join(".")},pn={INIT:"@@redux/INIT"+Pi(),REPLACE:"@@redux/REPLACE"+Pi(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Pi()}};function ku(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 zi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(me(1));return r(zi)(t,e)}if(typeof t!="function")throw new Error(me(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(me(3));return i}function h(C){if(typeof C!="function")throw new Error(me(4));if(d)throw new Error(me(5));var O=!0;return u(),c.push(C),function(){if(O){if(d)throw new Error(me(6));O=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!ku(C))throw new Error(me(7));if(typeof C.type>"u")throw new Error(me(8));if(d)throw new Error(me(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var O=s=c,R=0;R<O.length;R++){var N=O[R];N()}return C}function b(C){if(typeof C!="function")throw new Error(me(10));a=C,y({type:pn.REPLACE})}function x(){var C,O=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(me(11));function E(){N.next&&N.next(m())}E();var S=O(E);return{unsubscribe:S}}},C[Fl]=function(){return this},C}return y({type:pn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[Fl]=x,o}function Iu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:pn.INIT});if(typeof o>"u")throw new Error(me(12));if(typeof r(void 0,{type:pn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function $l(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{Iu(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},x=0;x<i.length;x++){var C=i[x],O=r[C],R=u[C],N=O(R,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(me(14))}b[C]=N,y=y||N!==R}return y=y||i.length!==Object.keys(u).length,y?b:u}}function vr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function Bl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(me(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=vr.apply(void 0,c)(a.dispatch),Ii(Ii({},a),{},{dispatch:i})}}}function Hl(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var Gl=Hl();Gl.withExtraArgument=Hl;var Di=Gl;var Zl=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[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 o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Pu=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},xr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},zu=Object.defineProperty,Du=Object.defineProperties,Uu=Object.getOwnPropertyDescriptors,Wl=Object.getOwnPropertySymbols,Fu=Object.prototype.hasOwnProperty,$u=Object.prototype.propertyIsEnumerable,jl=function(t,e,r){return e in t?zu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},St=function(t,e){for(var r in e||(e={}))Fu.call(e,r)&&jl(t,r,e[r]);if(Wl)for(var o=0,a=Wl(e);o<a.length;o++){var r=a[o];$u.call(e,r)&&jl(t,r,e[r])}return t},Ui=function(t,e){return Du(t,Uu(e))},Bu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Hu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vr:vr.apply(null,arguments)},ly=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Gu(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 Ct(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return St(St({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}var Wu=(function(t){Zl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,xr([void 0],r[0].concat(this)))):new(e.bind.apply(e,xr([void 0],r.concat(this))))},e})(Array),ju=(function(t){Zl(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];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=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,xr([void 0],r[0].concat(this)))):new(e.bind.apply(e,xr([void 0],r.concat(this))))},e})(Array);function Bi(t){return Ge(t)?fn(t,function(){}):t}function Vu(t){return typeof t=="boolean"}function Ku(){return function(e){return Zu(e)}}function Zu(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Wu;if(r&&(Vu(r)?u.push(Di):u.push(Di.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Fi=!0;function ql(t){var e=Ku(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Gu(a))b=$l(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 x=s;if(typeof x=="function"&&(x=x(e),!Fi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Fi&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Bl.apply(void 0,x),O=vr;d&&(O=Hu(St({trace:!Fi},typeof d=="object"&&d)));var R=new ju(C),N=R;Array.isArray(y)?N=xr([C],y):typeof y=="function"&&(N=y(R));var E=O.apply(void 0,N);return zi(b,m,E)}function Yl(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function qu(t){return typeof t=="function"}function Yu(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?Yl(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(qu(t))d=function(){return Bi(t())};else{var u=Bi(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=xr([i[y.type]],s.filter(function(x){var C=x.matcher;return C(y)}).map(function(x){var C=x.reducer;return C}));return b.filter(function(x){return!!x}).length===0&&(b=[c]),b.reduce(function(x,C){if(C)if(st(x)){var O=x,R=C(O,y);return R===void 0?x:R}else{if(Ge(x))return fn(x,function(N){return C(N,y)});var R=C(x,y);if(R===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return x},h)}return m.getInitialState=d,m}function Xu(t,e){return t+"/"+e}function Xl(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:Bi(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=Xu(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?Ct(y,x):Ct(y)});function d(){var m=typeof t.extraReducers=="function"?Yl(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],O=C===void 0?void 0:C,R=St(St({},y),s);return Yu(r,function(N){for(var E in R)N.addCase(E,R[E]);for(var S=0,L=x;S<L.length;S++){var T=L[S];N.addMatcher(T.matcher,T.reducer)}O&&N.addDefaultCase(O)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var Ju="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Qu=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Ju[Math.random()*64|0];return e},ef=["name","message","stack","code"],$i=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Vl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),tf=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=ef;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},py=(function(){function t(e,r,o){var a=Ct(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Ui(St({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=Ct(e+"/pending",function(m,h,y){return{payload:void 0,meta:Ui(St({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Ct(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||tf)(m||"Rejected"),meta:Ui(St({},x||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=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 u(m){return function(h,y,b){var x=o?.idGenerator?o.idGenerator(m):Qu(),C=new d,O,R=!1;function N(S){O=S,C.abort()}var E=(function(){return Bu(this,null,function(){var S,L,T,F,X,H,I;return Pu(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),F=(S=o?.condition)==null?void 0:S.call(o,m,{getState:y,extra:b}),of(F)?[4,F]:[3,2];case 1:F=D.sent(),D.label=2;case 2:if(F===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,X=new Promise(function(W,ie){return C.signal.addEventListener("abort",function(){return ie({name:"AbortError",message:O||"Aborted"})})}),h(i(x,m,(L=o?.getPendingMeta)==null?void 0:L.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([X,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(W,ie){return new $i(W,ie)},fulfillWithValue:function(W,ie){return new Vl(W,ie)}})).then(function(W){if(W instanceof $i)throw W;return W instanceof Vl?a(W.payload,x,m,W.meta):a(W,x,m)})])];case 3:return T=D.sent(),[3,5];case 4:return H=D.sent(),T=H instanceof $i?s(null,x,m,H.payload,H.meta):s(H,x,m),[3,5];case 5:return I=o&&!o.dispatchConditionRejection&&s.match(T)&&T.meta.condition,I||h(T),[2,T]}})})})();return Object.assign(E,{abort:N,requestId:x,arg:m,unwrap:function(){return E.then(rf)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function rf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function of(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Jl="listener",Ql="completed",e1="cancelled",hy="task-"+e1,my="task-"+Ql,gy=Jl+"-"+e1,yy=Jl+"-"+Ql;var Hi="listenerMiddleware";var by=Ct(Hi+"/add"),vy=Ct(Hi+"/removeAll"),xy=Ct(Hi+"/remove");var Kl,Sy=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Kl||(Kl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},nf=function(t){return function(e){setTimeout(e,t)}},Cy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:nf(10);Tl();window.ftReduxStores||(window.ftReduxStores={});var jt=class t extends at{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(mr(i))return i;if(a==null)return;let s=Xl({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=ql({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=$e(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new yo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),this.eventBus=o??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()}};function af(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))mr(e)&&e.clear()}var hn=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);nt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function sf(t,e,r){return new hn(t,e,r).watch()}var Co=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Vi={};G(Vi,{scrollHelper:()=>cf});var Wi,mn=new Map,ji=class{lock(e,r){if(r){let o=mn.get(r);if(o==null||o===e)return mn.set(r,e),r}}release(e,r){r&&mn.get(r)===e&&mn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of ga(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=kt(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(Wi=window.FluidTopicsScrollHelper)!==null&&Wi!==void 0?Wi:new ji;var cf=window.FluidTopicsScrollHelper;var Zi={};G(Zi,{SearchPlaceConverter:()=>Er,SearchPlaceQueryParams:()=>B,isSearchPlaceQueryParams:()=>H1,serializeRequest:()=>uf});var t1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(t1||(t1={}));var r1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(r1||(r1={}));var o1;(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"})(o1||(o1={}));var n1;(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"})(n1||(n1={}));var a1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(a1||(a1={}));var i1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(i1||(i1={}));var s1;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(s1||(s1={}));var c1;(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"})(c1||(c1={}));var l1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(l1||(l1={}));var d1;(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"})(d1||(d1={}));var u1;(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"})(u1||(u1={}));var f1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(f1||(f1={}));var p1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(p1||(p1={}));var h1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(h1||(h1={}));var m1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(m1||(m1={}));var g1;(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"})(g1||(g1={}));var Sr;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Sr||(Sr={}));var y1;(function(t){t.ASC="ASC",t.DESC="DESC"})(y1||(y1={}));var b1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(b1||(b1={}));var Ki;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ki||(Ki={}));var O1=t=>Object.keys(Ki).includes(t);var v1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(v1||(v1={}));var x1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(x1||(x1={}));var S1;(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"})(S1||(S1={}));var Cr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cr||(Cr={}));var R1=t=>Object.keys(Cr).includes(t);var C1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(C1||(C1={}));var E1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(E1||(E1={}));var A1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(A1||(A1={}));var ae;(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"})(ae||(ae={}));var Ue;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(Ue||(Ue={}));var L1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(L1||(L1={}));var w1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(w1||(w1={}));var _1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(_1||(_1={}));var N1;(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"})(N1||(N1={}));var M1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(M1||(M1={}));var T1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(T1||(T1={}));var k1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(k1||(k1={}));var I1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(I1||(I1={}));var P1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(P1||(P1={}));var z1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(z1||(z1={}));var D1;(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"})(D1||(D1={}));var U1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(U1||(U1={}));var lf={[ae.PERSONAL_BOOK_SHARE_USER]:[ae.PERSONAL_BOOK_USER],[ae.HTML_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.PDF_EXPORT_USER]:[ae.PERSONAL_BOOK_USER],[ae.KHUB_ADMIN]:[ae.CONTENT_PUBLISHER],[ae.ADMIN]:[ae.KHUB_ADMIN,ae.USERS_ADMIN,ae.PORTAL_ADMIN,ae.BEHAVIOR_DATA_USER],[ae.GENERATIVE_AI_EXPORT_USER]:[ae.GENERATIVE_AI_USER]};function F1(t,e){return t===e||(lf[t]??[]).some(r=>F1(r,e))}function $1(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(o=>F1(o,e))}function df(t){return`"${t}"`}function B1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function uf(t,e){return new Er(t).serialize(e)}var B;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(B||(B={}));var ff=new Set(Object.values(B));function H1(t){return ff.has(t)}var Er=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,u,m,h,y,b;let x=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&x.append(B.LOCALE,e.contentLocale):x.append(B.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append(B.QUERY,e.query);let C=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(C.length>0){let S=C.map(L=>{var T,F;let X=((F=(T=L.valueFilter)===null||T===void 0?void 0:T.values)!==null&&F!==void 0?F:[]).map(H=>this.escapeFilters(H)).map(H=>df(B1(H))).join("_");return`${L.key}~${X}`}).join("*");x.append(B.VALUE_FILTERS,S)}let O=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(O.length>0){let S=O.map(L=>{var T;return`${L.key}~${(T=L.dateFilter)===null||T===void 0?void 0:T.type.toLowerCase()}`}).join("*");x.append(B.DATE_FILTERS,S)}let R=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&u!==void 0?u:[];if(R.length>0){let S=R.map(L=>{var T,F;return`${L.key}~${(T=L.rangeFilter)===null||T===void 0?void 0:T.from}_${(F=L.rangeFilter)===null||F===void 0?void 0:F.to}`}).join("*");x.append(B.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append(B.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append(B.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append(B.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&x.append(B.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append(B.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let N=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let S in N)x.append(S,N[S]);let E=new Array;return x.forEach((S,L)=>{E.push(this.encodeQueryString(L)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(R){console.warn("Could not decode search request query params, fallback on raw value",R)}let d=new URLSearchParams(e),u=d.get(B.LOCALE)==="all"?void 0:d.get(B.LOCALE),m=((r=d.get(B.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(B.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(B.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(B.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get(B.KEYWORD_MATCH),C=x?x.toUpperCase()===Sr.MANDATORY?Sr.MANDATORY:Sr.OPTIONAL:void 0,O={};for(let R of d.keys())H1(R)||(O[R]=d.get(R));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(B.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:O1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:kt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:O}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(B.FILTERS)&&(d=this.parseValueFilters((r=e.get(B.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(B.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(B.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(B.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(B.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(B.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(B1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Cr[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(R1(e))return[{key:"ft:lastEdition",dateFilter:{type:Cr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[B.LOCALE,B.FILTERS,B.VALUE_FILTERS,B.DATE_FILTERS,B.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(B.LOCALE),r!==void 0&&o.searchParams.append(B.LOCALE,r),o.toString()}};var Xi={};G(Xi,{toFtFormComponent:()=>Yi});var qi=Symbol("elementInternals"),Yi=de(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[qi].form}constructor(...o){super(o),this[qi]=this.attachInternals()}setFormValue(o){this[qi].setFormValue(o)}}return e});var Ji={};G(Ji,{DateFormatter:()=>Vt});var Vt=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var es={};G(es,{ALL_KEYS_VALUE:()=>Qi,SameWindowStorageEvent:()=>Ar});var Qi="__all__",Ar=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Qi}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Ar(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new Ar(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new Ar(Qi))}});var rs={};G(rs,{FocusMainContentEvent:()=>ts});var ts=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var G1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function pf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function hf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",pf);document.addEventListener("click",hf);var W1=z`
48
48
  .sr-only {
49
49
  position:absolute;
50
50
  left:-10000px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ftds-modal",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "The design system modal component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -20,15 +20,15 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@fluid-topics/design-system-variables": "3.5.0",
23
- "@fluid-topics/ft-i18n": "2.1.5",
24
- "@fluid-topics/ft-wc-utils": "2.1.5",
25
- "@fluid-topics/ftds-button": "2.1.5",
26
- "@fluid-topics/ftds-icon": "2.1.5",
27
- "@fluid-topics/ftds-typography": "2.1.5",
23
+ "@fluid-topics/ft-i18n": "2.1.6",
24
+ "@fluid-topics/ft-wc-utils": "2.1.6",
25
+ "@fluid-topics/ftds-button": "2.1.6",
26
+ "@fluid-topics/ftds-icon": "2.1.6",
27
+ "@fluid-topics/ftds-typography": "2.1.6",
28
28
  "lit": "3.1.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@fluid-topics/ft-wc-test-utils": "2.1.5"
31
+ "@fluid-topics/ft-wc-test-utils": "2.1.6"
32
32
  },
33
- "gitHead": "cea42544a196f1f784982f8a666a27c534578779"
33
+ "gitHead": "70ba8e6b58f0f1c74a92965f3b7dbf3db605698e"
34
34
  }