@fluid-topics/ft-search-bar 2.2.18 → 2.2.20

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.
@@ -615,7 +615,7 @@
615
615
  position: relative;
616
616
  word-break: break-word;
617
617
  }
618
- `;var Xa=["top","right","bottom","left"],Ga=["start","end"],ko=Xa.reduce((t,e)=>t.concat(e,e+"-"+Ga[0],e+"-"+Ga[1]),[]),vi=Math.min,qt=Math.max,xi=Math.round;var _t=t=>({x:t,y:t}),Lp={left:"right",right:"left",bottom:"top",top:"bottom"};function Ya(t,e,r){return qt(t,vi(e,r))}function tn(t,e){return typeof t=="function"?t(e):t}function Si(t){return t.split("-")[0]}function Kt(t){return t.split("-")[1]}function Lo(t){return t==="x"?"y":"x"}function $o(t){return t==="y"?"height":"width"}function rn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Do(t){return Lo(rn(t))}function Za(t,e,r){r===void 0&&(r=!1);let i=Kt(t),o=Do(t),n=$o(o),s=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=To(s)),[s,To(s)]}function Qa(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function To(t){let e=Si(t);return Lp[e]+t.slice(e.length)}function $p(t){var e,r,i,o;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(o=t.left)!=null?o:0}}function Ja(t){return typeof t!="number"?$p(t):{top:t,right:t,bottom:t,left:t}}function br(t){let{x:e,y:r,width:i,height:o}=t;return{width:i,height:o,top:r,left:e,right:e+i,bottom:r+o,x:e,y:r}}function el(t,e,r){let{reference:i,floating:o}=t,n=rn(e),s=Do(e),a=$o(s),l=Si(e),d=n==="y",u=i.x+i.width/2-o.width/2,p=i.y+i.height/2-o.height/2,f=i[a]/2-o[a]/2,b;switch(l){case"top":b={x:u,y:i.y-o.height};break;case"bottom":b={x:u,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:p};break;case"left":b={x:i.x-o.width,y:p};break;default:b={x:i.x,y:i.y}}let x=Kt(e);return x&&(b[s]+=f*(x==="end"?1:-1)*(r&&d?-1:1)),b}async function tl(t,e){var r;e===void 0&&(e={});let{x:i,y:o,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:b=0}=tn(e,t),x=Ja(b),v=a[f?p==="floating"?"reference":"floating":p],T=br(await n.getClippingRect({element:(r=await(n.isElement==null?void 0:n.isElement(v)))==null||r?v:v.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),H=p==="floating"?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),D=await(n.isElement==null?void 0:n.isElement(S))&&await(n.getScale==null?void 0:n.getScale(S))||{x:1,y:1},B=br(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:H,offsetParent:S,strategy:l}):H);return{top:(T.top-B.top+x.top)/D.y,bottom:(B.bottom-T.bottom+x.bottom)/D.y,left:(T.left-B.left+x.left)/D.x,right:(B.right-T.right+x.right)/D.x}}var Dp=50,rl=async(t,e,r)=>{let{placement:i="bottom",strategy:o="absolute",middleware:n=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:tl},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:p}=el(d,i,l),f=i,b=0,x={};for(let O=0;O<n.length;O++){let v=n[O];if(!v)continue;let{name:T,fn:H}=v,{x:S,y:D,data:B,reset:ae}=await H({x:u,y:p,initialPlacement:i,placement:f,strategy:o,middlewareData:x,rects:d,platform:a,elements:{reference:t,floating:e}});u=S??u,p=D??p,x[T]={...x[T],...B},ae&&b<Dp&&(b++,typeof ae=="object"&&(ae.placement&&(f=ae.placement),ae.rects&&(d=ae.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):ae.rects),{x:u,y:p}=el(d,f,l)),O=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:x}};function Pp(t,e,r){return(t?[...r.filter(o=>Kt(o)===t),...r.filter(o=>Kt(o)!==t)]:r.filter(o=>Si(o)===o)).filter(o=>t?Kt(o)===t||(e?Qa(o)!==o:!1):!0)}var il=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,o;let{rects:n,middlewareData:s,placement:a,platform:l,elements:d}=e,{crossAxis:u=!1,alignment:p,allowedPlacements:f=ko,autoAlignment:b=!0,...x}=tn(t,e),O=p!==void 0||f===ko?Pp(p||null,b,f):f,v=((r=s.autoPlacement)==null?void 0:r.index)||0,T=O[v];if(T==null)return{};if(a!==T)return{reset:{placement:O[0]}};let H=await l.detectOverflow(e,x),S=Za(T,n,await(l.isRTL==null?void 0:l.isRTL(d.floating))),D=[H[Si(T)],H[S[0]],H[S[1]]],B=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:T,overflows:D}],ae=O[v+1];if(ae)return{data:{index:v+1,overflows:B},reset:{placement:ae}};let Q=B.map(tt=>{let or=Kt(tt.placement);return[tt.placement,or&&u?tt.overflows.slice(0,2).reduce((bp,vp)=>bp+vp,0):tt.overflows[0],tt.overflows]}).sort((tt,or)=>tt[1]-or[1]),ci=((o=Q.filter(tt=>tt[2].slice(0,Kt(tt[0])?2:3).every(or=>or<=0))[0])==null?void 0:o[0])||Q[0][0];return ci!==a?{data:{index:v+1,overflows:B},reset:{placement:ci}}:{}}}};var nl=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:o,platform:n}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:H=>{let{x:S,y:D}=H;return{x:S,y:D}}},...d}=tn(t,e),u={x:r,y:i},p=await n.detectOverflow(e,d),f=rn(o),b=Lo(f),x=u[b],O=u[f],v=(H,S)=>Ya(S+p[H==="y"?"top":"left"],S,S-p[H==="y"?"bottom":"right"]);s&&(x=v(b,x)),a&&(O=v(f,O));let T=l.fn({...e,[b]:x,[f]:O});return{...T,data:{x:T.x-r,y:T.y-i,enabled:{[b]:s,[f]:a}}}}}};function on(){return typeof window<"u"}function xr(t){return sl(t)?(t.nodeName||"").toLowerCase():"#document"}function ze(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Nt(t){var e;return(e=(sl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function sl(t){return on()?t instanceof Node||t instanceof ze(t).Node:!1}function ht(t){return on()?t instanceof Element||t instanceof ze(t).Element:!1}function Ft(t){return on()?t instanceof HTMLElement||t instanceof ze(t).HTMLElement:!1}function ol(t){return!on()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ze(t).ShadowRoot}function Ei(t){let{overflow:e,overflowX:r,overflowY:i,display:o}=mt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&o!=="inline"&&o!=="contents"}function al(t){return/^(table|td|th)$/.test(xr(t))}function Ai(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Ip=/transform|translate|scale|rotate|perspective|filter/,Mp=/paint|layout|strict|content/,vr=t=>!!t&&t!=="none",Po;function Vr(t){let e=ht(t)?mt(t):t;return vr(e.transform)||vr(e.translate)||vr(e.scale)||vr(e.rotate)||vr(e.perspective)||!sn()&&(vr(e.backdropFilter)||vr(e.filter))||Ip.test(e.willChange||"")||Mp.test(e.contain||"")}function ll(t){let e=Gt(t);for(;Ft(e)&&!Hr(e);){if(Vr(e))return e;if(Ai(e))return null;e=Gt(e)}return null}function sn(){return Po==null&&(Po=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Po}function Hr(t){return/^(html|body|#document)$/.test(xr(t))}function mt(t){return ze(t).getComputedStyle(t)}function Ci(t){return ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Gt(t){if(xr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ol(t)&&t.host||Nt(t);return ol(e)?e.host:e}function cl(t){let e=Gt(t);return Hr(e)?(t.ownerDocument||t).body:Ft(e)&&Ei(e)?e:cl(e)}function nn(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let o=cl(t),n=o===((i=t.ownerDocument)==null?void 0:i.body),s=ze(o);if(n){let a=an(s);return e.concat(s,s.visualViewport||[],Ei(o)?o:[],a&&r?nn(a):[])}else return e.concat(o,nn(o,[],r))}function an(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pl(t){let e=mt(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=Ft(t),n=o?t.offsetWidth:r,s=o?t.offsetHeight:i,a=xi(r)!==n||xi(i)!==s;return a&&(r=n,i=s),{width:r,height:i,$:a}}function fl(t){return ht(t)?t:t.contextElement}function jr(t){let e=fl(t);if(!Ft(e))return _t(1);let r=e.getBoundingClientRect(),{width:i,height:o,$:n}=pl(e),s=(n?xi(r.width):r.width)/i,a=(n?xi(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Np=_t(0);function hl(t){let e=ze(t);return!sn()||!e.visualViewport?Np:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fp(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===ze(t)}function wi(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let o=t.getBoundingClientRect(),n=fl(t),s=_t(1);e&&(i?ht(i)&&(s=jr(i)):s=jr(t));let a=Fp(n,r,i)?hl(n):_t(0),l=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,u=o.width/s.x,p=o.height/s.y;if(n&&i){let f=ze(n),b=ht(i)?ze(i):i,x=f,O=an(x);for(;O&&b!==x;){let v=jr(O),T=O.getBoundingClientRect(),H=mt(O),S=T.left+(O.clientLeft+parseFloat(H.paddingLeft))*v.x,D=T.top+(O.clientTop+parseFloat(H.paddingTop))*v.y;l*=v.x,d*=v.y,u*=v.x,p*=v.y,l+=S,d+=D,x=ze(O),O=an(x)}}return br({width:u,height:p,x:l,y:d})}function ln(t,e){let r=Ci(t).scrollLeft;return e?e.left+r:wi(Nt(t)).left+r}function ml(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ln(t,r),o=r.top+e.scrollTop;return{x:i,y:o}}function Bp(t){let{elements:e,rect:r,offsetParent:i,strategy:o}=t,n=o==="fixed",s=Nt(i),a=e?Ai(e.floating):!1;if(i===s||a&&n)return r;let l={scrollLeft:0,scrollTop:0},d=_t(1),u=_t(0),p=Ft(i);if((p||!n)&&((xr(i)!=="body"||Ei(s))&&(l=Ci(i)),p)){let b=wi(i);d=jr(i),u.x=b.x+i.clientLeft,u.y=b.y+i.clientTop}let f=s&&!p&&!n?ml(s,l):_t(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:r.y*d.y-l.scrollTop*d.y+u.y+f.y}}function Up(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function zp(t){let e=Ci(t),r=t.ownerDocument.body,i=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),n=-e.scrollLeft+ln(t),s=-e.scrollTop;return mt(r).direction==="rtl"&&(n+=qt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:n,y:s}}var Vp=25;function Hp(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",o=ze(t),n=Nt(t),s=o.visualViewport,a=n.clientWidth,l=n.clientHeight,d=0,u=0;if(s){let f=!sn()||e==="fixed";i?f||(d=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,f&&(d=s.offsetLeft,u=s.offsetTop))}if(ln(n)<=0){let f=n.ownerDocument,b=f.body,x=getComputedStyle(b),O=f.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,v=Math.abs(n.clientWidth-b.clientWidth-O),T=getComputedStyle(n).scrollbarGutter==="stable both-edges"?v/2:v;T<=Vp&&(a-=T)}return{width:a,height:l,x:d,y:u}}function jp(t,e){let r=wi(t,!0,e==="fixed"),i=r.top+t.clientTop,o=r.left+t.clientLeft,n=jr(t),s=t.clientWidth*n.x,a=t.clientHeight*n.y,l=o*n.x,d=i*n.y;return{width:s,height:a,x:l,y:d}}function dl(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=Hp(t,r,e);else if(e==="document")i=zp(Nt(t));else if(ht(e))i=jp(e,r);else{let o=hl(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return br(i)}function Wp(t,e){let r=e.get(t);if(r)return r;let i=nn(t,[],!1).filter(a=>ht(a)&&xr(a)!=="body"),o=null,n=mt(t).position==="fixed",s=n?Gt(t):t;for(;ht(s)&&!Hr(s);){let a=mt(s),l=Vr(s),d=o?o.position:n?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):o=a,s=Gt(s)}return e.set(t,i),i}function qp(t){let{element:e,boundary:r,rootBoundary:i,strategy:o}=t,s=[...r==="clippingAncestors"?Ai(e)?[]:Wp(e,this._c):[].concat(r),i],a=dl(e,s[0],o),l=a.top,d=a.right,u=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let b=dl(e,s[f],o);l=qt(b.top,l),d=vi(b.right,d),u=vi(b.bottom,u),p=qt(b.left,p)}return{width:d-p,height:u-l,x:p,y:l}}function Kp(t){let{width:e,height:r}=pl(t);return{width:e,height:r}}function Gp(t,e,r){let i=Ft(e),o=Nt(e),n=r==="fixed",s=wi(t,!0,n,e),a={scrollLeft:0,scrollTop:0},l=_t(0);if((i||!n)&&((xr(e)!=="body"||Ei(o))&&(a=Ci(e)),i)){let f=wi(e,!0,n,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}!i&&o&&(l.x=ln(o));let d=o&&!i&&!n?ml(o,a):_t(0),u=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:u,y:p,width:s.width,height:s.height}}function Io(t){return mt(t).position==="static"}function ul(t,e){if(!Ft(t)||mt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Nt(t)===r&&(r=r.ownerDocument.body),r}function gl(t,e){let r=ze(t);if(Ai(t))return r;if(!Ft(t)){let o=Gt(t);for(;o&&!Hr(o);){if(ht(o)&&!Io(o))return o;o=Gt(o)}return r}let i=ul(t,e);for(;i&&al(i)&&Io(i);)i=ul(i,e);return i&&Hr(i)&&Io(i)&&!Vr(i)?r:i||ll(t)||r}var Xp=async function(t){let e=this.getOffsetParent||gl,r=this.getDimensions,i=await r(t.floating);return{reference:Gp(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Yp(t){return mt(t).direction==="rtl"}var cn={convertOffsetParentRelativeRectToViewportRelativeRect:Bp,getDocumentElement:Nt,getClippingRect:qp,getOffsetParent:gl,getElementRects:Xp,getClientRects:Up,getDimensions:Kp,getScale:jr,isElement:ht,isRTL:Yp};var yl=il,bl=nl;var vl=(t,e,r)=>{let i=new Map,o=r??{},n={...cn,...o.platform,_c:i};return rl(t,e,{...o,platform:n})};function xl(t){return Zp(t)}function Mo(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Zp(t){for(let e=t;e;e=Mo(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Mo(t);e;e=Mo(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Vr(r)||e.tagName==="BODY"))return e}return null}async function Sl(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},vl(t,e,{strategy:i.strategy,platform:{...cn,getOffsetParent:o=>cn.getOffsetParent(o,xl)},middleware:[bl({crossAxis:!0}),yl({allowedPlacements:[i.placement]})]})}var Jr=c(m());var ns=c(j());var El=c(j(),1);var No=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},Qp=t=>({fromAttribute:e=>{if(e==null)return _i(t);try{return JSON.parse(e)}catch{return _i(t)}},toAttribute:e=>JSON.stringify(e)});function Al(t,e){return(0,El.property)({type:Object,converter:Qp(t),hasChanged:Oi,...e??{}})}function Jp(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Wr(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Wr(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let o=s=>Object.keys(s).filter(a=>s[a]!=null),n=o(t);if(r=n.length,r!==o(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;i--!==0;){let s=n[i];if(!Wr(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Wr(t,e){try{return Jp(t,e)}catch{return!1}}function Oi(t,e){return!Wr(t,e)}function _i(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function dn(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let o=e(i);return o[t]=!0,o}}var Cl=c(j(),1);var Fo=t=>{let e=t??{};return(r,i)=>{var o;let n={hasChanged:Oi,attribute:!1,...e};(0,Cl.property)(n)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(o=e.selector)!==null&&o!==void 0?o:(a=>a[i]),store:e.store})}};var un=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Sr=c(j(),1);var pn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let o=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){o(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var _l=c(E(),1);var fn=globalThis,ef=fn.ShadowRoot&&(fn.ShadyCSS===void 0||fn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var wl=(t,e)=>{if(ef)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),o=fn.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,t.appendChild(i)}};var hn=class extends _l.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return wl(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){No(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ol(t,e,...r){var i;let o=t.querySelector(e);for(let n of r)o=(i=o?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return o}var Kr=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},Ll,Rl=Symbol("constructorPrototype"),Tl=Symbol("constructorName"),$l=Symbol("exportpartsDebouncer"),kl=Symbol("dynamicDependenciesLoaded"),qr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};qr.eventName="exportparts-updated";var Ot=class extends hn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ll]=new pn(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[$l].run(()=>{var o,n;!((o=this.exportpartsPrefix)===null||o===void 0)&&o.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Tl]=this.constructor.name,this[Rl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Tl]&&Object.setPrototypeOf(this,this[Rl])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[kl]||(r[kl]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(qr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(qr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new qr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:o}=this.elementToFocus;if(i!=null){let n=[...o??[],i];r=Ol(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,o;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((o=this.customStylesheet)!==null&&o!==void 0?o:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(e){var r,i,o,n,s,a;let l=f=>f!=null&&f.trim().length>0,d=e.filter(l).map(f=>f.trim());if(d.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let b=(n=(o=f.getAttribute("part"))===null||o===void 0?void 0:o.split(" "))!==null&&n!==void 0?n:[],x=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],O=[...b,...x].filter(l).map(v=>v.trim());for(let v of O)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>d.map(b=>`${f}:${b}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Ll=$l;Kr([(0,Sr.property)()],Ot.prototype,"exportpartsPrefix",void 0);Kr([Al([])],Ot.prototype,"exportpartsPrefixes",void 0);Kr([(0,Sr.property)({reflect:!0})],Ot.prototype,"exportparts",void 0);Kr([(0,Sr.property)()],Ot.prototype,"customStylesheet",void 0);Kr([(0,Sr.property)()],Ot.prototype,"elementToFocus",void 0);Kr([(0,Sr.state)()],Ot.prototype,"useAdoptedStyleSheets",void 0);function mn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ri=Symbol("internalReduxEventsUnsubscribers"),Xt=Symbol("internalStoresUnsubscribers"),Er=Symbol("internalStores"),tf=dn(Symbol("withRedux"),function(t){var e,r,i;class o extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Er].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Er].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Er].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Er].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Er].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Er].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let d=this.getStore(s.store);d&&(s.store?this[Xt].has(s.store):this[Xt].size>0)&&(this[a]=s.selector(d.getState(),this))}})}subscribeToStore(s,a){var l;this[Xt].set(s,a.subscribe(()=>this.updateFromStores())),this[Ri].set(s,[]),mn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((d,u)=>{if(typeof this[u]=="function"&&(!d.store||a.name===d.store)){let p=f=>this[u](f);a.addEventListener(d.eventName,p),this[Ri].get(s).push(()=>a.removeEventListener(d.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Xt].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Xt].has(s)&&this[Xt].get(s)(),this[Xt].delete(s),(a=this[Ri].get(s))===null||a===void 0||a.forEach(l=>l()),this[Ri].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Xt,r=Er,i=Ri,o.reduxProperties=new Map,o.reduxReactiveProperties=new Set,o.reduxEventListeners=new Map,o}),Dl=class extends tf(Ot){};function Ee(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 rf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Pl=rf,Bo=()=>Math.random().toString(36).substring(7).split("").join("."),nf={INIT:`@@redux/INIT${Bo()}`,REPLACE:`@@redux/REPLACE${Bo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bo()}`},gn=nf;function yn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Uo(t,e,r){if(typeof t!="function")throw new Error(Ee(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ee(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ee(1));return r(Uo)(t,e)}let i=t,o=e,n=new Map,s=n,a=0,l=!1;function d(){s===n&&(s=new Map,n.forEach((v,T)=>{s.set(T,v)}))}function u(){if(l)throw new Error(Ee(3));return o}function p(v){if(typeof v!="function")throw new Error(Ee(4));if(l)throw new Error(Ee(5));let T=!0;d();let H=a++;return s.set(H,v),function(){if(T){if(l)throw new Error(Ee(6));T=!1,d(),s.delete(H),n=null}}}function f(v){if(!yn(v))throw new Error(Ee(7));if(typeof v.type>"u")throw new Error(Ee(8));if(typeof v.type!="string")throw new Error(Ee(17));if(l)throw new Error(Ee(9));try{l=!0,o=i(o,v)}finally{l=!1}return(n=s).forEach(H=>{H()}),v}function b(v){if(typeof v!="function")throw new Error(Ee(10));i=v,f({type:gn.REPLACE})}function x(){let v=p;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(Ee(11));function H(){let D=T;D.next&&D.next(u())}return H(),{unsubscribe:v(H)}},[Pl](){return this}}}return f({type:gn.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:b,[Pl]:x}}function of(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:gn.INIT})>"u")throw new Error(Ee(12));if(typeof r(void 0,{type:gn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ee(13))})}function Il(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),o,n;try{of(r)}catch(s){n=s}return function(a={},l){if(n)throw n;let d=!1,u={};for(let p=0;p<i.length;p++){let f=i[p],b=r[f],x=a[f],O=b(x,l);if(typeof O>"u"){let v=l&&l.type;throw new Error(Ee(14))}u[f]=O,d=d||O!==x}return d=d||i.length!==Object.keys(a).length,d?u:a}}function Ti(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function Ml(...t){return e=>(r,i)=>{let o=e(r,i),n=()=>{throw new Error(Ee(15))},s={getState:o.getState,dispatch:(l,...d)=>n(l,...d)},a=t.map(l=>l(s));return n=Ti(...a)(o.dispatch),{...o,dispatch:n}}}function Nl(t){return yn(t)&&"type"in t&&typeof t.type=="string"}var ql=Symbol.for("immer-nothing"),Fl=Symbol.for("immer-draftable"),ke=Symbol.for("immer-state");function gt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var qe=Object,Xr=qe.getPrototypeOf,Sn="constructor",On="prototype",jo="configurable",En="enumerable",vn="writable",ki="value",Rt=t=>!!t&&!!t[ke];function Ke(t){return t?Kl(t)||Tn(t)||!!t[Fl]||!!t[Sn]?.[Fl]||kn(t)||Ln(t):!1}var sf=qe[On][Sn].toString(),Bl=new WeakMap;function Kl(t){if(!t||!Qo(t))return!1;let e=Xr(t);if(e===null||e===qe[On])return!0;let r=qe.hasOwnProperty.call(e,Sn)&&e[Sn];if(r===Object)return!0;if(!Gr(r))return!1;let i=Bl.get(r);return i===void 0&&(i=Function.toString.call(r),Bl.set(r,i)),i===sf}function Rn(t,e,r=!0){Di(t)===0?(r?Reflect.ownKeys(t):qe.keys(t)).forEach(o=>{e(o,t[o],t)}):t.forEach((i,o)=>e(o,i,t))}function Di(t){let e=t[ke];return e?e.type_:Tn(t)?1:kn(t)?2:Ln(t)?3:0}var zo=(t,e,r=Di(t))=>r===2?t.has(e):qe[On].hasOwnProperty.call(t,e),Wo=(t,e,r=Di(t))=>r===2?t.get(e):t[e],An=(t,e,r,i=Di(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function af(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Tn=Array.isArray,kn=t=>t instanceof Map,Ln=t=>t instanceof Set,Qo=t=>typeof t=="object",Gr=t=>typeof t=="function",Vo=t=>typeof t=="boolean";function lf(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Bt=t=>t.copy_||t.base_;var Jo=t=>t.modified_?t.copy_:t.base_;function qo(t,e){if(kn(t))return new Map(t);if(Ln(t))return new Set(t);if(Tn(t))return Array[On].slice.call(t);let r=Kl(t);if(e===!0||e==="class_only"&&!r){let i=qe.getOwnPropertyDescriptors(t);delete i[ke];let o=Reflect.ownKeys(i);for(let n=0;n<o.length;n++){let s=o[n],a=i[s];a[vn]===!1&&(a[vn]=!0,a[jo]=!0),(a.get||a.set)&&(i[s]={[jo]:!0,[vn]:!0,[En]:a[En],[ki]:t[s]})}return qe.create(Xr(t),i)}else{let i=Xr(t);if(i!==null&&r)return{...t};let o=qe.create(i);return qe.assign(o,t)}}function es(t,e=!1){return $n(t)||Rt(t)||!Ke(t)||(Di(t)>1&&qe.defineProperties(t,{set:bn,add:bn,clear:bn,delete:bn}),qe.freeze(t),e&&Rn(t,(r,i)=>{es(i,!0)},!1)),t}function cf(){gt(2)}var bn={[ki]:cf};function $n(t){return t===null||!Qo(t)?!0:qe.isFrozen(t)}var Cn="MapSet",Ko="Patches",Ul="ArrayMethods",Gl={};function Ar(t){let e=Gl[t];return e||gt(0,t),e}var zl=t=>!!Gl[t];var Li,Xl=()=>Li,df=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:zl(Cn)?Ar(Cn):void 0,arrayMethodsPlugin_:zl(Ul)?Ar(Ul):void 0});function Vl(t,e){e&&(t.patchPlugin_=Ar(Ko),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Go(t){Xo(t),t.drafts_.forEach(uf),t.drafts_=null}function Xo(t){t===Li&&(Li=t.parent_)}var Hl=t=>Li=df(Li,t);function uf(t){let e=t[ke];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function jl(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ke].modified_&&(Go(e),gt(4)),Ke(t)&&(t=Wl(e,t));let{patchPlugin_:o}=e;o&&o.generateReplacementPatches_(r[ke].base_,t,e)}else t=Wl(e,r);return pf(e,t,!0),Go(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ql?t:void 0}function Wl(t,e){if($n(e))return e;let r=e[ke];if(!r)return wn(e,t.handledSet_,t);if(!Dn(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);Ql(r,t)}return r.copy_}function pf(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&es(e,r)}function Yl(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Dn=(t,e)=>t.scope_===e,ff=[];function Zl(t,e,r,i){let o=Bt(t),n=t.type_;if(i!==void 0&&Wo(o,i,n)===e){An(o,i,r,n);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Rn(o,(l,d)=>{if(Rt(d)){let u=a.get(d)||[];u.push(l),a.set(d,u)}})}let s=t.draftLocations_.get(e)??ff;for(let a of s)An(o,a,r,n)}function hf(t,e,r){t.callbacks_.push(function(o){let n=e;if(!n||!Dn(n,o))return;o.mapSetPlugin_?.fixSetContents(n);let s=Jo(n);Zl(t,n.draft_??n,s,r),Ql(n,o)})}function Ql(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let o=i.getPath(t);o&&i.generatePatches_(t,o,e)}Yl(t)}}function mf(t,e,r){let{scope_:i}=t;if(Rt(r)){let o=r[ke];Dn(o,i)&&o.callbacks_.push(function(){xn(t);let s=Jo(o);Zl(t,r,s,e)})}else Ke(r)&&t.callbacks_.push(function(){let n=Bt(t);t.type_===3?n.has(r)&&wn(r,i.handledSet_,i):Wo(n,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&wn(Wo(t.copy_,e,t.type_),i.handledSet_,i)})}function wn(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Rt(t)||e.has(t)||!Ke(t)||$n(t)||(e.add(t),Rn(t,(i,o)=>{if(Rt(o)){let n=o[ke];if(Dn(n,r)){let s=Jo(n);An(t,i,s,t.type_),Yl(n)}}else Ke(o)&&wn(o,e,r)})),t}function gf(t,e){let r=Tn(t),i={type_:r?1:0,scope_:e?e.scope_:Xl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=i,n=_n;r&&(o=[i],n=$i);let{revoke:s,proxy:a}=Proxy.revocable(o,n);return i.draft_=a,i.revoke_=s,[a,i]}var _n={get(t,e){if(e===ke)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let o=Bt(t);if(!zo(o,e,t.type_))return bf(t,o,e);let n=o[e];if(t.finalized_||!Ke(n)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&lf(e))return n;if(n===Ho(t.base_,e)||yf(t,e,n)){xn(t);let s=t.type_===1?+e:e,a=Zo(t.scope_,n,t,s);return t.copy_[s]=a}return n},has(t,e){return e in Bt(t)},ownKeys(t){return Reflect.ownKeys(Bt(t))},set(t,e,r){let i=Jl(Bt(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let o=Ho(Bt(t),e),n=o?.[ke];if(n&&n.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(af(r,o)&&(r!==void 0||zo(t.base_,e,t.type_)))return!0;xn(t),Yo(t)}return t.copy_[e]===r&&(r!==void 0||zo(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),mf(t,e,r)),!0},deleteProperty(t,e){return xn(t),Ho(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),Yo(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Bt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[vn]:!0,[jo]:t.type_!==1||e!=="length",[En]:i[En],[ki]:r[e]}},defineProperty(){gt(11)},getPrototypeOf(t){return Xr(t.base_)},setPrototypeOf(){gt(12)}},$i={};for(let t in _n){let e=_n[t];$i[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}$i.deleteProperty=function(t,e){return $i.set.call(this,t,e,void 0)};$i.set=function(t,e,r){return _n.set.call(this,t[0],e,r,t[0])};function Ho(t,e){let r=t[ke];return(r?Bt(r):t)[e]}function yf(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!Ke(r)||r[ke]?!1:t.baseRefs_.has(r)}function bf(t,e,r){let i=Jl(e,r);return i?ki in i?i[ki]:i.get?.call(t.draft_):void 0}function Jl(t,e){if(!(e in t))return;let r=Xr(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Xr(r)}}function Yo(t){t.modified_||(t.modified_=!0,t.parent_&&Yo(t.parent_))}function xn(t){t.copy_||(t.assigned_=new Map,t.copy_=qo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var vf=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(Gr(e)&&!Gr(r)){let n=r;r=e;let s=this;return function(l=n,...d){return s.produce(l,u=>r.call(this,u,...d))}}Gr(r)||gt(6),i!==void 0&&!Gr(i)&&gt(7);let o;if(Ke(e)){let n=Hl(this),s=Zo(n,e,void 0),a=!0;try{o=r(s),a=!1}finally{a?Go(n):Xo(n)}return Vl(n,i),jl(o,n)}else if(!e||!Qo(e)){if(o=r(e),o===void 0&&(o=e),o===ql&&(o=void 0),this.autoFreeze_&&es(o,!0),i){let n=[],s=[];Ar(Ko).generateReplacementPatches_(e,o,{patches_:n,inversePatches_:s}),i(n,s)}return o}else gt(1,e)},this.produceWithPatches=(e,r)=>{if(Gr(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let i,o;return[this.produce(e,r,(s,a)=>{i=s,o=a}),i,o]},Vo(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Vo(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Vo(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Ke(t)||gt(8),Rt(t)&&(t=ec(t));let e=Hl(this),r=Zo(e,t,void 0);return r[ke].isManual_=!0,Xo(e),r}finishDraft(t,e){let r=t&&t[ke];(!r||!r.isManual_)&&gt(9);let{scope_:i}=r;return Vl(i,e),jl(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));let i=Ar(Ko).applyPatches_;return Rt(t)?i(t,e):this.produce(t,o=>i(o,e))}};function Zo(t,e,r,i){let[o,n]=kn(e)?Ar(Cn).proxyMap_(e,r):Ln(e)?Ar(Cn).proxySet_(e,r):gf(e,r);return(r?.scope_??Xl()).drafts_.push(o),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?hf(r,n,i):n.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:d}=l;n.modified_&&d&&d.generatePatches_(n,[],l)}),o}function ec(t){return Rt(t)||gt(10,t),tc(t)}function tc(t){if(!Ke(t)||$n(t))return t;let e=t[ke],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=qo(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=qo(t,!0);return Rn(r,(o,n)=>{An(r,o,tc(n))},i),e&&(e.finalized_=!1),r}var xf=globalThis.Iterator,vg=typeof xf?.from=="function";var Sf=new vf,ts=Sf.produce;function rc(t){return({dispatch:r,getState:i})=>o=>n=>typeof n=="function"?n(r,i,t):o(n)}var ic=rc(),nc=rc;var Ef=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ti:Ti.apply(null,arguments)},_g=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Af=t=>t&&typeof t.match=="function";function Yt(t,e){function r(...i){if(e){let o=e(...i);if(!o)throw new Error(Ut(0));return{type:t,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>Nl(i)&&i.type===t,r}var cc=class Pi extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Pi.prototype)}static get[Symbol.species](){return Pi}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Pi(...e[0].concat(this)):new Pi(...e.concat(this))}};function oc(t){return Ke(t)?ts(t,()=>{}):t}function Pn(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Cf(t){return typeof t=="boolean"}var wf=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:o=!0,actionCreatorCheck:n=!0}=e??{},s=new cc;return r&&(Cf(r)?s.push(ic):s.push(nc(r.extraArgument))),s},_f="RTK_autoBatch";var sc=t=>e=>{setTimeout(e,t)},Of=(t,e)=>r=>{let i=!1,o=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(s),r())},n=t(o),s=setTimeout(o,e)},Rf=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),o=!0,n=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Of(window.requestAnimationFrame,100):sc(10):t.type==="callback"?t.queueNotification:sc(t.timeout),d=()=>{s=!1,n&&(n=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let p=()=>o&&u(),f=i.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return o=!u?.meta?.[_f],n=!o,n&&(s||(s=!0,l(d))),i.dispatch(u)}finally{o=!0}}})},Tf=t=>function(r){let{autoBatch:i=!0}=r??{},o=new cc(t);return i&&o.push(Rf(typeof i=="object"?i:void 0)),o};function dc(t){let e=wf(),{reducer:r=void 0,middleware:i,devTools:o=!0,duplicateMiddlewareCheck:n=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(yn(r))l=Il(r);else throw new Error(Ut(1));let d;typeof i=="function"?d=i(e):d=e();let u=Ti;o&&(u=Ef({trace:!1,...typeof o=="object"&&o}));let p=Ml(...d),f=Tf(p),b=typeof a=="function"?a(f):f(),x=u(...b);return Uo(l,s,x)}function uc(t){let e={},r=[],i,o={addCase(n,s){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(Ut(28));if(a in e)throw new Error(Ut(29));return e[a]=s,o},addAsyncThunk(n,s){return s.pending&&(e[n.pending.type]=s.pending),s.rejected&&(e[n.rejected.type]=s.rejected),s.fulfilled&&(e[n.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:n.settled,reducer:s.settled}),o},addMatcher(n,s){return r.push({matcher:n,reducer:s}),o},addDefaultCase(n){return i=n,o}};return t(o),[e,r,i]}function kf(t){return typeof t=="function"}function Lf(t,e){let[r,i,o]=uc(e),n;if(kf(t))n=()=>oc(t());else{let a=oc(t);n=()=>a}function s(a=n(),l){let d=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[o]),d.reduce((u,p)=>{if(p)if(Rt(u)){let b=p(u,l);return b===void 0?u:b}else{if(Ke(u))return ts(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=n,s}var $f=(t,e)=>Af(t)?t.match(e):t(e);function Df(...t){return e=>t.some(r=>$f(r,e))}var Pf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",If=(t=21)=>{let e="",r=t;for(;r--;)e+=Pf[Math.random()*64|0];return e},Mf=["name","message","stack","code"],rs=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},ac=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Nf=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Mf)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},lc="External signal was aborted",Ff=(()=>{function t(e,r,i){let o=Yt(e+"/fulfilled",(l,d,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:d,requestStatus:"fulfilled"}})),n=Yt(e+"/pending",(l,d,u)=>({payload:void 0,meta:{...u||{},arg:d,requestId:l,requestStatus:"pending"}})),s=Yt(e+"/rejected",(l,d,u,p,f)=>({payload:p,error:(i&&i.serializeError||Nf)(l||"Rejected"),meta:{...f||{},arg:u,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:d}={}){return(u,p,f)=>{let b=i?.idGenerator?i.idGenerator(l):If(),x=new AbortController,O,v;function T(S){v=S,x.abort()}d&&(d.aborted?T(lc):d.addEventListener("abort",()=>T(lc),{once:!0}));let H=(async function(){let S;try{let B=i?.condition?.(l,{getState:p,extra:f});if(Uf(B)&&(B=await B),B===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let ae=new Promise((Q,le)=>{O=()=>{le({name:"AbortError",message:v||"Aborted"})},x.signal.addEventListener("abort",O,{once:!0})});u(n(b,l,i?.getPendingMeta?.({requestId:b,arg:l},{getState:p,extra:f}))),S=await Promise.race([ae,Promise.resolve(r(l,{dispatch:u,getState:p,extra:f,requestId:b,signal:x.signal,abort:T,rejectWithValue:((Q,le)=>new rs(Q,le)),fulfillWithValue:((Q,le)=>new ac(Q,le))})).then(Q=>{if(Q instanceof rs)throw Q;return Q instanceof ac?o(Q.payload,b,l,Q.meta):o(Q,b,l)})])}catch(B){S=B instanceof rs?s(null,b,l,B.payload,B.meta):s(B,b,l)}finally{O&&x.signal.removeEventListener("abort",O)}return i&&!i.dispatchConditionRejection&&s.match(S)&&S.meta.condition||u(S),S})();return Object.assign(H,{abort:T,requestId:b,arg:l,unwrap(){return H.then(Bf)}})}}return Object.assign(a,{pending:n,rejected:s,fulfilled:o,settled:Df(s,o),typePrefix:e})}return t.withTypes=()=>t,t})();function Bf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Uf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var pc=Symbol.for("rtk-slice-createasyncthunk"),Rg={[pc]:Ff};function zf(t,e){return`${t}/${e}`}function Vf({creators:t}={}){let e=t?.asyncThunk?.[pc];return function(i){let{name:o,reducerPath:n=o}=i;if(!o)throw new Error(Ut(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(jf()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(S,D){let B=typeof S=="string"?S:S.type;if(!B)throw new Error(Ut(12));if(B in l.sliceCaseReducersByType)throw new Error(Ut(13));return l.sliceCaseReducersByType[B]=D,d},addMatcher(S,D){return l.sliceMatchers.push({matcher:S,reducer:D}),d},exposeAction(S,D){return l.actionCreators[S]=D,d},exposeCaseReducer(S,D){return l.sliceCaseReducersByName[S]=D,d}};a.forEach(S=>{let D=s[S],B={reducerName:S,type:zf(o,S),createNotation:typeof i.reducers=="function"};qf(D)?Gf(B,D,d,e):Wf(B,D,d)});function u(){let[S={},D=[],B=void 0]=typeof i.extraReducers=="function"?uc(i.extraReducers):[i.extraReducers],ae={...S,...l.sliceCaseReducersByType};return Lf(i.initialState,Q=>{for(let le in ae)Q.addCase(le,ae[le]);for(let le of l.sliceMatchers)Q.addMatcher(le.matcher,le.reducer);for(let le of D)Q.addMatcher(le.matcher,le.reducer);B&&Q.addDefaultCase(B)})}let p=S=>S,f=new Map,b=new WeakMap,x;function O(S,D){return x||(x=u()),x(S,D)}function v(){return x||(x=u()),x.getInitialState()}function T(S,D=!1){function B(Q){let le=Q[S];return typeof le>"u"&&D&&(le=Pn(b,B,v)),le}function ae(Q=p){let le=Pn(f,D,()=>new WeakMap);return Pn(le,Q,()=>{let ci={};for(let[tt,or]of Object.entries(i.selectors??{}))ci[tt]=Hf(or,Q,()=>Pn(b,Q,v),D);return ci})}return{reducerPath:S,getSelectors:ae,get selectors(){return ae(B)},selectSlice:B}}let H={name:o,reducer:O,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...T(n),injectInto(S,{reducerPath:D,...B}={}){let ae=D??n;return S.inject({reducerPath:ae,reducer:O},B),{...H,...T(ae,!0)}}};return H}}function Hf(t,e,r,i){function o(n,...s){let a=e(n);return typeof a>"u"&&i&&(a=r()),t(a,...s)}return o.unwrapped=t,o}var fc=Vf();function jf(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function Wf({type:t,reducerName:e,createNotation:r},i,o){let n,s;if("reducer"in i){if(r&&!Kf(i))throw new Error(Ut(17));n=i.reducer,s=i.prepare}else n=i;o.addCase(t,n).exposeCaseReducer(e,n).exposeAction(e,s?Yt(t,s):Yt(t))}function qf(t){return t._reducerDefinitionType==="asyncThunk"}function Kf(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Gf({type:t,reducerName:e},r,i,o){if(!o)throw new Error(Ut(18));let{payloadCreator:n,fulfilled:s,pending:a,rejected:l,settled:d,options:u}=r,p=o(t,n,u);i.exposeAction(e,p),s&&i.addCase(p.fulfilled,s),a&&i.addCase(p.pending,a),l&&i.addCase(p.rejected,l),d&&i.addMatcher(p.settled,d),i.exposeCaseReducer(e,{fulfilled:s||In,pending:a||In,rejected:l||In,settled:d||In})}function In(){}var hc="listener",mc="completed",gc="cancelled",Tg=`task-${gc}`,kg=`task-${mc}`,Lg=`${hc}-${gc}`,$g=`${hc}-${mc}`;var{assign:yc}=Object;var is="listenerMiddleware";var Xf=yc(Yt(`${is}/add`),{withTypes:()=>Xf}),Dg=Yt(`${is}/removeAll`),Yf=yc(Yt(`${is}/remove`),{withTypes:()=>Yf});function Ut(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Zf=dn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,o){this.eventBus.addEventListener(r,i,o)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,o){this.eventBus.removeEventListener(r,i,o)}}}),Mn=class extends Zf(Object){};window.ftReduxStores||(window.ftReduxStores={});var bc=class t extends Mn{static get(e){var r;let i=typeof e=="string"?e:e.name,o=typeof e=="string"?void 0:e,n=window.ftReduxStores[i];if(mn(n))return n;if(o==null)return;let s=fc({...o,reducers:(r=o.reducers)!==null&&r!==void 0?r:{}}),a=dc({reducer:(l,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let u=_i(s.getInitialState());for(let p of d.keeping)u[p]=(l??u)[p];return u}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...d.overwrites};return s.reducer(l,d)}});return window.ftReduxStores[o.name]=new t(s,a,o.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new un,this.injectInto=(n,s)=>this.reduxSlice.injectInto(n,s),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let o=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,s,a)=>{let l=s,d=n[l];return d?(...u)=>{let p=d(...u.map(o));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];Wr(f,u)||this.setState({[p]:o(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Nn=class{static format(e,r,i,o,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,o,!!n)):this.getIntlDateTime(e,r,i,o,!!n)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,o,n){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return n?l:o?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Fn=c(m()),Qf="ft-app-info",Cr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Cr.eventName="authentication-change";var Ii=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ii.eventName="ui-locale-changed";var Jf={session:(t,e)=>{(0,Fn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>w.dispatchEvent(new Cr(e.payload)),0))}},w=Fn.FtReduxStore.get({name:Qf,reducers:Jf,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var vc=c(m()),Bn=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},cy=(0,vc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var o,n;return((n=(o=this.metadataDescriptors.find(a=>a.key===i))===null||o===void 0?void 0:o.date)!==null&&n!==void 0?n:!1)?a=>Nn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Bn([(0,ns.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Bn([(0,ns.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Bn([Fo({store:w.name,selector:r=>{var i,o;return(o=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&o!==void 0?o:[]}})],e.prototype,"metadataDescriptors",void 0),Bn([Fo({store:w.name})],e.prototype,"uiLocale",void 0),e});var xc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(xc||(xc={}));var Sc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Sc||(Sc={}));var Ec;(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"})(Ec||(Ec={}));var Ac;(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"})(Ac||(Ac={}));var Cc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cc||(Cc={}));var wc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(wc||(wc={}));var _c;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(_c||(_c={}));var Oc;(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"})(Oc||(Oc={}));var Rc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Rc||(Rc={}));var Tc;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Tc||(Tc={}));var kc;(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"})(kc||(kc={}));var Lc;(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"})(Lc||(Lc={}));var $c;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})($c||($c={}));var Dc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Dc||(Dc={}));var Pc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Pc||(Pc={}));var Ic;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ic||(Ic={}));var Mc;(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"})(Mc||(Mc={}));var Nc;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nc||(Nc={}));var Fc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Fc||(Fc={}));var Bc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Bc||(Bc={}));var Uc;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Uc||(Uc={}));var zc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(zc||(zc={}));var Vc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Vc||(Vc={}));var Hc;(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"})(Hc||(Hc={}));var jc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(jc||(jc={}));var Wc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Wc||(Wc={}));var qc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(qc||(qc={}));var Kc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Kc||(Kc={}));var me;(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"})(me||(me={}));var ot;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ot||(ot={}));var Gc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Gc||(Gc={}));var Xc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Xc||(Xc={}));var Yc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Yc||(Yc={}));var Zc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Zc||(Zc={}));var Qc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Qc||(Qc={}));var Jc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Jc||(Jc={}));var ed;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ed||(ed={}));var td;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(td||(td={}));var rd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(rd||(rd={}));var id;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(id||(id={}));var nd;(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"})(nd||(nd={}));var od;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(od||(od={}));var eh={[me.PERSONAL_BOOK_SHARE_USER]:[me.PERSONAL_BOOK_USER],[me.HTML_EXPORT_USER]:[me.PERSONAL_BOOK_USER],[me.PDF_EXPORT_USER]:[me.PERSONAL_BOOK_USER],[me.KHUB_ADMIN]:[me.CONTENT_PUBLISHER],[me.ADMIN]:[me.KHUB_ADMIN,me.USERS_ADMIN,me.PORTAL_ADMIN,me.BEHAVIOR_DATA_USER],[me.GENERATIVE_AI_EXPORT_USER]:[me.GENERATIVE_AI_USER]};function sd(t,e){return t===e||(eh[t]??[]).some(r=>sd(r,e))}function os(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>sd(i,e))}function ad(t,...e){return t==null?!1:e.some(r=>os(t,r))}var jn=c(m());var ss=c(m());var wr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),o=e??i;if(r&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,o,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let o=w.subscribe(()=>{i=t.get(e),i&&(o(),r(i))})}})}};var Yr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:wr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):wr.await()}};var Ge=class extends Yr{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(n,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let o=this.constructor;o.commonCache=(i=o.commonCache)!==null&&i!==void 0?i:new ss.CacheRegistry,this.cache=e?o.commonCache:new ss.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Un=class extends Ge{async listMySearches(){let{session:e}=w.getState();return os(e,me.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var zn=class extends Ge{async listMyBookmarks(){let e=w.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Vn=class extends Ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var Hn=class extends Ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var th="ft-user-assets",rh={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(ot).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:o}=e.payload;ls(t,r,[...as(t,r),o]),ld(t,r,1,i),cd(t,o)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;ls(t,r,as(t,r).map(o=>o.id===i.id?i:o)),cd(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:o}=e.payload;ls(t,r,as(t,r).filter(n=>n.id!==o)),ld(t,r,-1,i)}},dd={[ot.SEARCHES]:"savedSearches",[ot.BOOKMARKS]:"bookmarks",[ot.BOOKS]:void 0,[ot.COLLECTIONS]:void 0},as=(t,e)=>{var r;let i=dd[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},ls=(t,e,r)=>{let i=dd[e];i&&(t[i]=r)},ld=(t,e,r,i)=>{let o=t.assetCounts.allAsset[e];if(o!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,o+r),e===ot.BOOKMARKS&&i)){let n=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},cd=(t,e)=>{let r=t.assetLabels.map(o=>o.title),i=e.labels.filter(o=>!r.includes(o)).map(o=>({title:o}));t.assetLabels.push(...i)},De=jn.FtReduxStore.get({name:th,reducers:rh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ot).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),cs=class{constructor(e=new Vn,r=new Hn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new zn,this.savedSearchesService=new Un,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=w.getState();(0,jn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),De.actions.clearAssetCount(),De.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),De.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),De.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();De.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();De.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&De.getState().assetCounts.allAsset[e]!==r.count&&De.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&De.getState().assetCounts.bookmarkByMap[e]!==r.count&&De.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(De.getState().assetCounts.bookmarkByMap).length!==0;e===ot.BOOKMARKS&&r&&De.actions.clearBookmarkCountByMap(),De.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;De.actions.bookmarks(r)}}},ih=new cs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ih);var ds=class{addCommand(e,r=!1){w.commands.add(e,r)}consumeCommand(e){return w.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ds;var st=c(m());var ud,Zr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},nh=Symbol("clearAfterUnitTest"),Wn=class extends(0,st.withEventBus)(Ge){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ud]=()=>{this.defaultMessages={},this.cache=new st.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=w.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let o={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,st.deepEqual)(this.defaultMessages[e],o)||(this.defaultMessages[e]=o,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var o;let n=e.toLowerCase(),s=this.resolveContext(n);return new st.ParametrizedLabelResolver((o=this.defaultMessages[n])!==null&&o!==void 0?o:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(o){!(o instanceof st.CanceledPromiseError)&&r&&console.error(o)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var o;return(o=this.listeners[e])===null||o===void 0?void 0:o.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Zr({loadedContexts:e})),this.dispatchEvent(new Zr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Zr({loadedContexts:[e]})),this.dispatchEvent(new Zr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,st.delay)(0).then(()=>i()).catch(()=>null)))}};ud=nh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Wn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Wn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Mi=window.FluidTopicsI18nService,us=window.FluidTopicsCustomI18nService;var pd=c(m()),ps=class{highlightHtml(e,r,i){(0,pd.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new ps;var fd=c(m());var fs=class{isDate(e){var r,i,o,n;return(n=(o=((i=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||o===void 0?void 0:o.date)!==null&&n!==void 0?n:!1}format(e,r){var i,o,n,s;if(e==null)return"";try{return fd.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(o=r?.longFormat)!==null&&o!==void 0?o:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new fs;var hd=c(m());var Ni=class{static get(e,r){var i,o,n,s;let a=w.getState(),{lang:l,region:d}=(n=(o=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new hd.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${d}`)}};var hs=class{urlToSearchRequest(e){return Ni.get().parse(e)}searchRequestToUrl(e){return Ni.get().serialize(e)}};window.FluidTopicsUrlService=new hs;var zt=c(m());var _r=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};_r.eventName="before-location-change";var Or=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Or.eventName="change";var ms=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},md=new ms;var qn=class t extends zt.WithEventBus{static build(){return new t(window.history,md,()=>window.location,!1)}constructor(e,r,i,o){var n,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(n=e.state)===null||n===void 0?void 0:n.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(o)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,zt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Or(this.currentItem())),0)}installProxies(){let e=r=>(i,o,[n,s,a])=>{let l=new _r(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...n,index:d,href:l.detail.nextLocation.href};i.apply(o,[u,s,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(_r.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(_r.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Or.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Or.eventName,e)}currentItem(){return(0,zt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,zt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,zt.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,zt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let o=e,n=e+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(o=n),n++;return o}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let o=r??this.currentState.majorStateId,n=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=o}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=qn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var gd=c(E());var yd=gd.css`
618
+ `;var Xa=["top","right","bottom","left"],Ga=["start","end"],ko=Xa.reduce((t,e)=>t.concat(e,e+"-"+Ga[0],e+"-"+Ga[1]),[]),vi=Math.min,qt=Math.max,xi=Math.round;var _t=t=>({x:t,y:t}),Lp={left:"right",right:"left",bottom:"top",top:"bottom"};function Ya(t,e,r){return qt(t,vi(e,r))}function tn(t,e){return typeof t=="function"?t(e):t}function Si(t){return t.split("-")[0]}function Kt(t){return t.split("-")[1]}function Lo(t){return t==="x"?"y":"x"}function $o(t){return t==="y"?"height":"width"}function rn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Do(t){return Lo(rn(t))}function Za(t,e,r){r===void 0&&(r=!1);let i=Kt(t),o=Do(t),n=$o(o),s=o==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=To(s)),[s,To(s)]}function Qa(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function To(t){let e=Si(t);return Lp[e]+t.slice(e.length)}function $p(t){var e,r,i,o;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(o=t.left)!=null?o:0}}function Ja(t){return typeof t!="number"?$p(t):{top:t,right:t,bottom:t,left:t}}function br(t){let{x:e,y:r,width:i,height:o}=t;return{width:i,height:o,top:r,left:e,right:e+i,bottom:r+o,x:e,y:r}}function el(t,e,r){let{reference:i,floating:o}=t,n=rn(e),s=Do(e),a=$o(s),l=Si(e),d=n==="y",u=i.x+i.width/2-o.width/2,p=i.y+i.height/2-o.height/2,f=i[a]/2-o[a]/2,b;switch(l){case"top":b={x:u,y:i.y-o.height};break;case"bottom":b={x:u,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:p};break;case"left":b={x:i.x-o.width,y:p};break;default:b={x:i.x,y:i.y}}let x=Kt(e);return x&&(b[s]+=f*(x==="end"?1:-1)*(r&&d?-1:1)),b}async function tl(t,e){var r;e===void 0&&(e={});let{x:i,y:o,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:b=0}=tn(e,t),x=Ja(b),v=a[f?p==="floating"?"reference":"floating":p],T=br(await n.getClippingRect({element:(r=await(n.isElement==null?void 0:n.isElement(v)))==null||r?v:v.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),H=p==="floating"?{x:i,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),D=await(n.isElement==null?void 0:n.isElement(S))&&await(n.getScale==null?void 0:n.getScale(S))||{x:1,y:1},B=br(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:H,offsetParent:S,strategy:l}):H);return{top:(T.top-B.top+x.top)/D.y,bottom:(B.bottom-T.bottom+x.bottom)/D.y,left:(T.left-B.left+x.left)/D.x,right:(B.right-T.right+x.right)/D.x}}var Dp=50,rl=async(t,e,r)=>{let{placement:i="bottom",strategy:o="absolute",middleware:n=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:tl},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:p}=el(d,i,l),f=i,b=0,x={};for(let O=0;O<n.length;O++){let v=n[O];if(!v)continue;let{name:T,fn:H}=v,{x:S,y:D,data:B,reset:ae}=await H({x:u,y:p,initialPlacement:i,placement:f,strategy:o,middlewareData:x,rects:d,platform:a,elements:{reference:t,floating:e}});u=S??u,p=D??p,x[T]={...x[T],...B},ae&&b<Dp&&(b++,typeof ae=="object"&&(ae.placement&&(f=ae.placement),ae.rects&&(d=ae.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):ae.rects),{x:u,y:p}=el(d,f,l)),O=-1)}return{x:u,y:p,placement:f,strategy:o,middlewareData:x}};function Pp(t,e,r){return(t?[...r.filter(o=>Kt(o)===t),...r.filter(o=>Kt(o)!==t)]:r.filter(o=>Si(o)===o)).filter(o=>t?Kt(o)===t||(e?Qa(o)!==o:!1):!0)}var il=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,o;let{rects:n,middlewareData:s,placement:a,platform:l,elements:d}=e,{crossAxis:u=!1,alignment:p,allowedPlacements:f=ko,autoAlignment:b=!0,...x}=tn(t,e),O=p!==void 0||f===ko?Pp(p||null,b,f):f,v=((r=s.autoPlacement)==null?void 0:r.index)||0,T=O[v];if(T==null)return{};if(a!==T)return{reset:{placement:O[0]}};let H=await l.detectOverflow(e,x),S=Za(T,n,await(l.isRTL==null?void 0:l.isRTL(d.floating))),D=[H[Si(T)],H[S[0]],H[S[1]]],B=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:T,overflows:D}],ae=O[v+1];if(ae)return{data:{index:v+1,overflows:B},reset:{placement:ae}};let Q=B.map(tt=>{let or=Kt(tt.placement);return[tt.placement,or&&u?tt.overflows.slice(0,2).reduce((bp,vp)=>bp+vp,0):tt.overflows[0],tt.overflows]}).sort((tt,or)=>tt[1]-or[1]),ci=((o=Q.filter(tt=>tt[2].slice(0,Kt(tt[0])?2:3).every(or=>or<=0))[0])==null?void 0:o[0])||Q[0][0];return ci!==a?{data:{index:v+1,overflows:B},reset:{placement:ci}}:{}}}};var nl=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:o,platform:n}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:H=>{let{x:S,y:D}=H;return{x:S,y:D}}},...d}=tn(t,e),u={x:r,y:i},p=await n.detectOverflow(e,d),f=rn(o),b=Lo(f),x=u[b],O=u[f],v=(H,S)=>Ya(S+p[H==="y"?"top":"left"],S,S-p[H==="y"?"bottom":"right"]);s&&(x=v(b,x)),a&&(O=v(f,O));let T=l.fn({...e,[b]:x,[f]:O});return{...T,data:{x:T.x-r,y:T.y-i,enabled:{[b]:s,[f]:a}}}}}};function on(){return typeof window<"u"}function xr(t){return sl(t)?(t.nodeName||"").toLowerCase():"#document"}function ze(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Nt(t){var e;return(e=(sl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function sl(t){return on()?t instanceof Node||t instanceof ze(t).Node:!1}function ht(t){return on()?t instanceof Element||t instanceof ze(t).Element:!1}function Ft(t){return on()?t instanceof HTMLElement||t instanceof ze(t).HTMLElement:!1}function ol(t){return!on()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ze(t).ShadowRoot}function Ei(t){let{overflow:e,overflowX:r,overflowY:i,display:o}=mt(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&o!=="inline"&&o!=="contents"}function al(t){return/^(table|td|th)$/.test(xr(t))}function Ai(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Ip=/transform|translate|scale|rotate|perspective|filter/,Mp=/paint|layout|strict|content/,vr=t=>!!t&&t!=="none",Po;function Vr(t){let e=ht(t)?mt(t):t;return vr(e.transform)||vr(e.translate)||vr(e.scale)||vr(e.rotate)||vr(e.perspective)||!sn()&&(vr(e.backdropFilter)||vr(e.filter))||Ip.test(e.willChange||"")||Mp.test(e.contain||"")}function ll(t){let e=Gt(t);for(;Ft(e)&&!Hr(e);){if(Vr(e))return e;if(Ai(e))return null;e=Gt(e)}return null}function sn(){return Po==null&&(Po=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Po}function Hr(t){return/^(html|body|#document)$/.test(xr(t))}function mt(t){return ze(t).getComputedStyle(t)}function Ci(t){return ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Gt(t){if(xr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ol(t)&&t.host||Nt(t);return ol(e)?e.host:e}function cl(t){let e=Gt(t);return Hr(e)?(t.ownerDocument||t).body:Ft(e)&&Ei(e)?e:cl(e)}function nn(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let o=cl(t),n=o===((i=t.ownerDocument)==null?void 0:i.body),s=ze(o);if(n){let a=an(s);return e.concat(s,s.visualViewport||[],Ei(o)?o:[],a&&r?nn(a):[])}else return e.concat(o,nn(o,[],r))}function an(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pl(t){let e=mt(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,o=Ft(t),n=o?t.offsetWidth:r,s=o?t.offsetHeight:i,a=xi(r)!==n||xi(i)!==s;return a&&(r=n,i=s),{width:r,height:i,$:a}}function fl(t){return ht(t)?t:t.contextElement}function jr(t){let e=fl(t);if(!Ft(e))return _t(1);let r=e.getBoundingClientRect(),{width:i,height:o,$:n}=pl(e),s=(n?xi(r.width):r.width)/i,a=(n?xi(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Np=_t(0);function hl(t){let e=ze(t);return!sn()||!e.visualViewport?Np:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fp(t,e,r){return e===void 0&&(e=!1),!!r&&e&&r===ze(t)}function wi(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let o=t.getBoundingClientRect(),n=fl(t),s=_t(1);e&&(i?ht(i)&&(s=jr(i)):s=jr(t));let a=Fp(n,r,i)?hl(n):_t(0),l=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,u=o.width/s.x,p=o.height/s.y;if(n&&i){let f=ze(n),b=ht(i)?ze(i):i,x=f,O=an(x);for(;O&&b!==x;){let v=jr(O),T=O.getBoundingClientRect(),H=mt(O),S=T.left+(O.clientLeft+parseFloat(H.paddingLeft))*v.x,D=T.top+(O.clientTop+parseFloat(H.paddingTop))*v.y;l*=v.x,d*=v.y,u*=v.x,p*=v.y,l+=S,d+=D,x=ze(O),O=an(x)}}return br({width:u,height:p,x:l,y:d})}function ln(t,e){let r=Ci(t).scrollLeft;return e?e.left+r:wi(Nt(t)).left+r}function ml(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-ln(t,r),o=r.top+e.scrollTop;return{x:i,y:o}}function Bp(t){let{elements:e,rect:r,offsetParent:i,strategy:o}=t,n=o==="fixed",s=Nt(i),a=e?Ai(e.floating):!1;if(i===s||a&&n)return r;let l={scrollLeft:0,scrollTop:0},d=_t(1),u=_t(0),p=Ft(i);if((p||!n)&&((xr(i)!=="body"||Ei(s))&&(l=Ci(i)),p)){let b=wi(i);d=jr(i),u.x=b.x+i.clientLeft,u.y=b.y+i.clientTop}let f=s&&!p&&!n?ml(s,l):_t(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:r.y*d.y-l.scrollTop*d.y+u.y+f.y}}function Up(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function zp(t){let e=Ci(t),r=t.ownerDocument.body,i=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),n=-e.scrollLeft+ln(t),s=-e.scrollTop;return mt(r).direction==="rtl"&&(n+=qt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:n,y:s}}var Vp=25;function Hp(t,e,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",o=ze(t),n=Nt(t),s=o.visualViewport,a=n.clientWidth,l=n.clientHeight,d=0,u=0;if(s){let f=!sn()||e==="fixed";i?f||(d=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,f&&(d=s.offsetLeft,u=s.offsetTop))}if(ln(n)<=0){let f=n.ownerDocument,b=f.body,x=getComputedStyle(b),O=f.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,v=Math.abs(n.clientWidth-b.clientWidth-O),T=getComputedStyle(n).scrollbarGutter==="stable both-edges"?v/2:v;T<=Vp&&(a-=T)}return{width:a,height:l,x:d,y:u}}function jp(t,e){let r=wi(t,!0,e==="fixed"),i=r.top+t.clientTop,o=r.left+t.clientLeft,n=jr(t),s=t.clientWidth*n.x,a=t.clientHeight*n.y,l=o*n.x,d=i*n.y;return{width:s,height:a,x:l,y:d}}function dl(t,e,r){let i;if(e==="viewport"||e==="layoutViewport")i=Hp(t,r,e);else if(e==="document")i=zp(Nt(t));else if(ht(e))i=jp(e,r);else{let o=hl(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return br(i)}function Wp(t,e){let r=e.get(t);if(r)return r;let i=nn(t,[],!1).filter(a=>ht(a)&&xr(a)!=="body"),o=null,n=mt(t).position==="fixed",s=n?Gt(t):t;for(;ht(s)&&!Hr(s);){let a=mt(s),l=Vr(s),d=o?o.position:n?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):o=a,s=Gt(s)}return e.set(t,i),i}function qp(t){let{element:e,boundary:r,rootBoundary:i,strategy:o}=t,s=[...r==="clippingAncestors"?Ai(e)?[]:Wp(e,this._c):[].concat(r),i],a=dl(e,s[0],o),l=a.top,d=a.right,u=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let b=dl(e,s[f],o);l=qt(b.top,l),d=vi(b.right,d),u=vi(b.bottom,u),p=qt(b.left,p)}return{width:d-p,height:u-l,x:p,y:l}}function Kp(t){let{width:e,height:r}=pl(t);return{width:e,height:r}}function Gp(t,e,r){let i=Ft(e),o=Nt(e),n=r==="fixed",s=wi(t,!0,n,e),a={scrollLeft:0,scrollTop:0},l=_t(0);if((i||!n)&&((xr(e)!=="body"||Ei(o))&&(a=Ci(e)),i)){let f=wi(e,!0,n,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}!i&&o&&(l.x=ln(o));let d=o&&!i&&!n?ml(o,a):_t(0),u=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:u,y:p,width:s.width,height:s.height}}function Io(t){return mt(t).position==="static"}function ul(t,e){if(!Ft(t)||mt(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Nt(t)===r&&(r=r.ownerDocument.body),r}function gl(t,e){let r=ze(t);if(Ai(t))return r;if(!Ft(t)){let o=Gt(t);for(;o&&!Hr(o);){if(ht(o)&&!Io(o))return o;o=Gt(o)}return r}let i=ul(t,e);for(;i&&al(i)&&Io(i);)i=ul(i,e);return i&&Hr(i)&&Io(i)&&!Vr(i)?r:i||ll(t)||r}var Xp=async function(t){let e=this.getOffsetParent||gl,r=this.getDimensions,i=await r(t.floating);return{reference:Gp(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Yp(t){return mt(t).direction==="rtl"}var cn={convertOffsetParentRelativeRectToViewportRelativeRect:Bp,getDocumentElement:Nt,getClippingRect:qp,getOffsetParent:gl,getElementRects:Xp,getClientRects:Up,getDimensions:Kp,getScale:jr,isElement:ht,isRTL:Yp};var yl=il,bl=nl;var vl=(t,e,r)=>{let i=new Map,o=r??{},n={...cn,...o.platform,_c:i};return rl(t,e,{...o,platform:n})};function xl(t){return Zp(t)}function Mo(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Zp(t){for(let e=t;e;e=Mo(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Mo(t);e;e=Mo(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||Vr(r)||e.tagName==="BODY"))return e}return null}async function Sl(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},vl(t,e,{strategy:i.strategy,platform:{...cn,getOffsetParent:o=>cn.getOffsetParent(o,xl)},middleware:[bl({crossAxis:!0}),yl({allowedPlacements:[i.placement]})]})}var Jr=c(m());var ns=c(j());var El=c(j(),1);var No=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},Qp=t=>({fromAttribute:e=>{if(e==null)return _i(t);try{return JSON.parse(e)}catch{return _i(t)}},toAttribute:e=>JSON.stringify(e)});function Al(t,e){return(0,El.property)({type:Object,converter:Qp(t),hasChanged:Oi,...e??{}})}function Jp(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Wr(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Wr(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let o=s=>Object.keys(s).filter(a=>s[a]!=null),n=o(t);if(r=n.length,r!==o(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;i--!==0;){let s=n[i];if(!Wr(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Wr(t,e){try{return Jp(t,e)}catch{return!1}}function Oi(t,e){return!Wr(t,e)}function _i(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function dn(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let o=e(i);return o[t]=!0,o}}var Cl=c(j(),1);var Fo=t=>{let e=t??{};return(r,i)=>{var o;let n={hasChanged:Oi,attribute:!1,...e};(0,Cl.property)(n)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(o=e.selector)!==null&&o!==void 0?o:(a=>a[i]),store:e.store})}};var un=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var Sr=c(j(),1);var pn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let o=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),n=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){o(a);return}n(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var _l=c(E(),1);var fn=globalThis,ef=fn.ShadowRoot&&(fn.ShadyCSS===void 0||fn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var wl=(t,e)=>{if(ef)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),o=fn.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,t.appendChild(i)}};var hn=class extends _l.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return wl(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){No(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Ol(t,e,...r){var i;let o=t.querySelector(e);for(let n of r)o=(i=o?.shadowRoot)===null||i===void 0?void 0:i.querySelector(n);return o}var Kr=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},Ll,Rl=Symbol("constructorPrototype"),Tl=Symbol("constructorName"),$l=Symbol("exportpartsDebouncer"),kl=Symbol("dynamicDependenciesLoaded"),qr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};qr.eventName="exportparts-updated";var Ot=class extends hn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ll]=new pn(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[$l].run(()=>{var o,n;!((o=this.exportpartsPrefix)===null||o===void 0)&&o.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Tl]=this.constructor.name,this[Rl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Tl]&&Object.setPrototypeOf(this,this[Rl])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[kl]||(r[kl]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(qr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(qr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new qr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:o}=this.elementToFocus;if(i!=null){let n=[...o??[],i];r=Ol(this.shadowRoot,...n)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,o;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(n=>n.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((o=this.customStylesheet)!==null&&o!==void 0?o:"")}catch(n){console.error(n,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let n=document.createElement("style");n.classList.add("ft-lit-element--custom-stylesheet"),n.innerHTML=this.customStylesheet,this.shadowRoot.append(n)}}setExportpartsAttribute(e){var r,i,o,n,s,a;let l=f=>f!=null&&f.trim().length>0,d=e.filter(l).map(f=>f.trim());if(d.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(n=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let b=(s=(i=f.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&s!==void 0?s:[],x=(a=(o=f.getAttribute("exportparts"))===null||o===void 0?void 0:o.split(",").map(v=>v.split(":")[1]))!==null&&a!==void 0?a:[],O=[...b,...x].filter(l).map(v=>v.trim());for(let v of O)u.add(v)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>d.map(b=>`${f}:${b}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Ll=$l;Kr([(0,Sr.property)()],Ot.prototype,"exportpartsPrefix",void 0);Kr([Al([])],Ot.prototype,"exportpartsPrefixes",void 0);Kr([(0,Sr.property)({reflect:!0})],Ot.prototype,"exportparts",void 0);Kr([(0,Sr.property)()],Ot.prototype,"customStylesheet",void 0);Kr([(0,Sr.property)()],Ot.prototype,"elementToFocus",void 0);Kr([(0,Sr.state)()],Ot.prototype,"useAdoptedStyleSheets",void 0);function mn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ri=Symbol("internalReduxEventsUnsubscribers"),Xt=Symbol("internalStoresUnsubscribers"),Er=Symbol("internalStores"),tf=dn(Symbol("withRedux"),function(t){var e,r,i;class o extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Er].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Er].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Er].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Er].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Er].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Er].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let d=this.getStore(s.store);d&&(s.store?this[Xt].has(s.store):this[Xt].size>0)&&(this[a]=s.selector(d.getState(),this))}})}subscribeToStore(s,a){var l;this[Xt].set(s,a.subscribe(()=>this.updateFromStores())),this[Ri].set(s,[]),mn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((d,u)=>{if(typeof this[u]=="function"&&(!d.store||a.name===d.store)){let p=f=>this[u](f);a.addEventListener(d.eventName,p),this[Ri].get(s).push(()=>a.removeEventListener(d.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Xt].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Xt].has(s)&&this[Xt].get(s)(),this[Xt].delete(s),(a=this[Ri].get(s))===null||a===void 0||a.forEach(l=>l()),this[Ri].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Xt,r=Er,i=Ri,o.reduxProperties=new Map,o.reduxReactiveProperties=new Set,o.reduxEventListeners=new Map,o}),Dl=class extends tf(Ot){};function Ee(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 rf=typeof Symbol=="function"&&Symbol.observable||"@@observable",Pl=rf,Bo=()=>Math.random().toString(36).substring(7).split("").join("."),nf={INIT:`@@redux/INIT${Bo()}`,REPLACE:`@@redux/REPLACE${Bo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bo()}`},gn=nf;function yn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Uo(t,e,r){if(typeof t!="function")throw new Error(Ee(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ee(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ee(1));return r(Uo)(t,e)}let i=t,o=e,n=new Map,s=n,a=0,l=!1;function d(){s===n&&(s=new Map,n.forEach((v,T)=>{s.set(T,v)}))}function u(){if(l)throw new Error(Ee(3));return o}function p(v){if(typeof v!="function")throw new Error(Ee(4));if(l)throw new Error(Ee(5));let T=!0;d();let H=a++;return s.set(H,v),function(){if(T){if(l)throw new Error(Ee(6));T=!1,d(),s.delete(H),n=null}}}function f(v){if(!yn(v))throw new Error(Ee(7));if(typeof v.type>"u")throw new Error(Ee(8));if(typeof v.type!="string")throw new Error(Ee(17));if(l)throw new Error(Ee(9));try{l=!0,o=i(o,v)}finally{l=!1}return(n=s).forEach(H=>{H()}),v}function b(v){if(typeof v!="function")throw new Error(Ee(10));i=v,f({type:gn.REPLACE})}function x(){let v=p;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(Ee(11));function H(){let D=T;D.next&&D.next(u())}return H(),{unsubscribe:v(H)}},[Pl](){return this}}}return f({type:gn.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:b,[Pl]:x}}function of(t){Object.keys(t).forEach(e=>{let r=t[e];if(typeof r(void 0,{type:gn.INIT})>"u")throw new Error(Ee(12));if(typeof r(void 0,{type:gn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ee(13))})}function Il(t){let e=Object.keys(t),r={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(r[a]=t[a])}let i=Object.keys(r),o,n;try{of(r)}catch(s){n=s}return function(a={},l){if(n)throw n;let d=!1,u={};for(let p=0;p<i.length;p++){let f=i[p],b=r[f],x=a[f],O=b(x,l);if(typeof O>"u"){let v=l&&l.type;throw new Error(Ee(14))}u[f]=O,d=d||O!==x}return d=d||i.length!==Object.keys(a).length,d?u:a}}function Ti(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...i)=>e(r(...i)))}function Ml(...t){return e=>(r,i)=>{let o=e(r,i),n=()=>{throw new Error(Ee(15))},s={getState:o.getState,dispatch:(l,...d)=>n(l,...d)},a=t.map(l=>l(s));return n=Ti(...a)(o.dispatch),{...o,dispatch:n}}}function Nl(t){return yn(t)&&"type"in t&&typeof t.type=="string"}var ql=Symbol.for("immer-nothing"),Fl=Symbol.for("immer-draftable"),ke=Symbol.for("immer-state");function gt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var qe=Object,Xr=qe.getPrototypeOf,Sn="constructor",On="prototype",jo="configurable",En="enumerable",vn="writable",ki="value",Rt=t=>!!t&&!!t[ke];function Ke(t){return t?Kl(t)||Tn(t)||!!t[Fl]||!!t[Sn]?.[Fl]||kn(t)||Ln(t):!1}var sf=qe[On][Sn].toString(),Bl=new WeakMap;function Kl(t){if(!t||!Qo(t))return!1;let e=Xr(t);if(e===null||e===qe[On])return!0;let r=qe.hasOwnProperty.call(e,Sn)&&e[Sn];if(r===Object)return!0;if(!Gr(r))return!1;let i=Bl.get(r);return i===void 0&&(i=Function.toString.call(r),Bl.set(r,i)),i===sf}function Rn(t,e,r=!0){Di(t)===0?(r?Reflect.ownKeys(t):qe.keys(t)).forEach(o=>{e(o,t[o],t)}):t.forEach((i,o)=>e(o,i,t))}function Di(t){let e=t[ke];return e?e.type_:Tn(t)?1:kn(t)?2:Ln(t)?3:0}var zo=(t,e,r=Di(t))=>r===2?t.has(e):qe[On].hasOwnProperty.call(t,e),Wo=(t,e,r=Di(t))=>r===2?t.get(e):t[e],An=(t,e,r,i=Di(t))=>{i===2?t.set(e,r):i===3?t.add(r):t[e]=r};function af(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var Tn=Array.isArray,kn=t=>t instanceof Map,Ln=t=>t instanceof Set,Qo=t=>typeof t=="object",Gr=t=>typeof t=="function",Vo=t=>typeof t=="boolean";function lf(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var Bt=t=>t.copy_||t.base_;var Jo=t=>t.modified_?t.copy_:t.base_;function qo(t,e){if(kn(t))return new Map(t);if(Ln(t))return new Set(t);if(Tn(t))return Array[On].slice.call(t);let r=Kl(t);if(e===!0||e==="class_only"&&!r){let i=qe.getOwnPropertyDescriptors(t);delete i[ke];let o=Reflect.ownKeys(i);for(let n=0;n<o.length;n++){let s=o[n],a=i[s];a[vn]===!1&&(a[vn]=!0,a[jo]=!0),(a.get||a.set)&&(i[s]={[jo]:!0,[vn]:!0,[En]:a[En],[ki]:t[s]})}return qe.create(Xr(t),i)}else{let i=Xr(t);if(i!==null&&r)return{...t};let o=qe.create(i);return qe.assign(o,t)}}function es(t,e=!1){return $n(t)||Rt(t)||!Ke(t)||(Di(t)>1&&qe.defineProperties(t,{set:bn,add:bn,clear:bn,delete:bn}),qe.freeze(t),e&&Rn(t,(r,i)=>{es(i,!0)},!1)),t}function cf(){gt(2)}var bn={[ki]:cf};function $n(t){return t===null||!Qo(t)?!0:qe.isFrozen(t)}var Cn="MapSet",Ko="Patches",Ul="ArrayMethods",Gl={};function Ar(t){let e=Gl[t];return e||gt(0,t),e}var zl=t=>!!Gl[t];var Li,Xl=()=>Li,df=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:zl(Cn)?Ar(Cn):void 0,arrayMethodsPlugin_:zl(Ul)?Ar(Ul):void 0});function Vl(t,e){e&&(t.patchPlugin_=Ar(Ko),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Go(t){Xo(t),t.drafts_.forEach(uf),t.drafts_=null}function Xo(t){t===Li&&(Li=t.parent_)}var Hl=t=>Li=df(Li,t);function uf(t){let e=t[ke];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function jl(t,e){e.unfinalizedDrafts_=e.drafts_.length;let r=e.drafts_[0];if(t!==void 0&&t!==r){r[ke].modified_&&(Go(e),gt(4)),Ke(t)&&(t=Wl(e,t));let{patchPlugin_:o}=e;o&&o.generateReplacementPatches_(r[ke].base_,t,e)}else t=Wl(e,r);return pf(e,t,!0),Go(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==ql?t:void 0}function Wl(t,e){if($n(e))return e;let r=e[ke];if(!r)return wn(e,t.handledSet_,t);if(!Dn(r,t))return e;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:i}=r;if(i)for(;i.length>0;)i.pop()(t);Ql(r,t)}return r.copy_}function pf(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&es(e,r)}function Yl(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var Dn=(t,e)=>t.scope_===e,ff=[];function Zl(t,e,r,i){let o=Bt(t),n=t.type_;if(i!==void 0&&Wo(o,i,n)===e){An(o,i,r,n);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Rn(o,(l,d)=>{if(Rt(d)){let u=a.get(d)||[];u.push(l),a.set(d,u)}})}let s=t.draftLocations_.get(e)??ff;for(let a of s)An(o,a,r,n)}function hf(t,e,r){t.callbacks_.push(function(o){let n=e;if(!n||!Dn(n,o))return;o.mapSetPlugin_?.fixSetContents(n);let s=Jo(n);Zl(t,n.draft_??n,s,r),Ql(n,o)})}function Ql(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:i}=e;if(i){let o=i.getPath(t);o&&i.generatePatches_(t,o,e)}Yl(t)}}function mf(t,e,r){let{scope_:i}=t;if(Rt(r)){let o=r[ke];Dn(o,i)&&o.callbacks_.push(function(){xn(t);let s=Jo(o);Zl(t,r,s,e)})}else Ke(r)&&t.callbacks_.push(function(){let n=Bt(t);t.type_===3?n.has(r)&&wn(r,i.handledSet_,i):Wo(n,e,t.type_)===r&&i.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&wn(Wo(t.copy_,e,t.type_),i.handledSet_,i)})}function wn(t,e,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Rt(t)||e.has(t)||!Ke(t)||$n(t)||(e.add(t),Rn(t,(i,o)=>{if(Rt(o)){let n=o[ke];if(Dn(n,r)){let s=Jo(n);An(t,i,s,t.type_),Yl(n)}}else Ke(o)&&wn(o,e,r)})),t}function gf(t,e){let r=Tn(t),i={type_:r?1:0,scope_:e?e.scope_:Xl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=i,n=_n;r&&(o=[i],n=$i);let{revoke:s,proxy:a}=Proxy.revocable(o,n);return i.draft_=a,i.revoke_=s,[a,i]}var _n={get(t,e){if(e===ke)return t;let r=t.scope_.arrayMethodsPlugin_,i=t.type_===1&&typeof e=="string";if(i&&r?.isArrayOperationMethod(e))return r.createMethodInterceptor(t,e);let o=Bt(t);if(!zo(o,e,t.type_))return bf(t,o,e);let n=o[e];if(t.finalized_||!Ke(n)||i&&t.operationMethod&&r?.isMutatingArrayMethod(t.operationMethod)&&lf(e))return n;if(n===Ho(t.base_,e)||yf(t,e,n)){xn(t);let s=t.type_===1?+e:e,a=Zo(t.scope_,n,t,s);return t.copy_[s]=a}return n},has(t,e){return e in Bt(t)},ownKeys(t){return Reflect.ownKeys(Bt(t))},set(t,e,r){let i=Jl(Bt(t),e);if(i?.set)return i.set.call(t.draft_,r),!0;if(!t.modified_){let o=Ho(Bt(t),e),n=o?.[ke];if(n&&n.base_===r)return t.copy_[e]=r,t.assigned_.set(e,!1),!0;if(af(r,o)&&(r!==void 0||zo(t.base_,e,t.type_)))return!0;xn(t),Yo(t)}return t.copy_[e]===r&&(r!==void 0||zo(t.copy_,e,t.type_))||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_.set(e,!0),mf(t,e,r)),!0},deleteProperty(t,e){return xn(t),Ho(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),Yo(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let r=Bt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{[vn]:!0,[jo]:t.type_!==1||e!=="length",[En]:i[En],[ki]:r[e]}},defineProperty(){gt(11)},getPrototypeOf(t){return Xr(t.base_)},setPrototypeOf(){gt(12)}},$i={};for(let t in _n){let e=_n[t];$i[t]=function(){let r=arguments;return r[0]=r[0][0],e.apply(this,r)}}$i.deleteProperty=function(t,e){return $i.set.call(this,t,e,void 0)};$i.set=function(t,e,r){return _n.set.call(this,t[0],e,r,t[0])};function Ho(t,e){let r=t[ke];return(r?Bt(r):t)[e]}function yf(t,e,r){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!Ke(r)||r[ke]?!1:t.baseRefs_.has(r)}function bf(t,e,r){let i=Jl(e,r);return i?ki in i?i[ki]:i.get?.call(t.draft_):void 0}function Jl(t,e){if(!(e in t))return;let r=Xr(t);for(;r;){let i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Xr(r)}}function Yo(t){t.modified_||(t.modified_=!0,t.parent_&&Yo(t.parent_))}function xn(t){t.copy_||(t.assigned_=new Map,t.copy_=qo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var vf=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,r,i)=>{if(Gr(e)&&!Gr(r)){let n=r;r=e;let s=this;return function(l=n,...d){return s.produce(l,u=>r.call(this,u,...d))}}Gr(r)||gt(6),i!==void 0&&!Gr(i)&&gt(7);let o;if(Ke(e)){let n=Hl(this),s=Zo(n,e,void 0),a=!0;try{o=r(s),a=!1}finally{a?Go(n):Xo(n)}return Vl(n,i),jl(o,n)}else if(!e||!Qo(e)){if(o=r(e),o===void 0&&(o=e),o===ql&&(o=void 0),this.autoFreeze_&&es(o,!0),i){let n=[],s=[];Ar(Ko).generateReplacementPatches_(e,o,{patches_:n,inversePatches_:s}),i(n,s)}return o}else gt(1,e)},this.produceWithPatches=(e,r)=>{if(Gr(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let i,o;return[this.produce(e,r,(s,a)=>{i=s,o=a}),i,o]},Vo(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Vo(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Vo(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Ke(t)||gt(8),Rt(t)&&(t=ec(t));let e=Hl(this),r=Zo(e,t,void 0);return r[ke].isManual_=!0,Xo(e),r}finishDraft(t,e){let r=t&&t[ke];(!r||!r.isManual_)&&gt(9);let{scope_:i}=r;return Vl(i,e),jl(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){let o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));let i=Ar(Ko).applyPatches_;return Rt(t)?i(t,e):this.produce(t,o=>i(o,e))}};function Zo(t,e,r,i){let[o,n]=kn(e)?Ar(Cn).proxyMap_(e,r):Ln(e)?Ar(Cn).proxySet_(e,r):gf(e,r);return(r?.scope_??Xl()).drafts_.push(o),n.callbacks_=r?.callbacks_??[],n.key_=i,r&&i!==void 0?hf(r,n,i):n.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(n);let{patchPlugin_:d}=l;n.modified_&&d&&d.generatePatches_(n,[],l)}),o}function ec(t){return Rt(t)||gt(10,t),tc(t)}function tc(t){if(!Ke(t)||$n(t))return t;let e=t[ke],r,i=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=qo(t,e.scope_.immer_.useStrictShallowCopy_),i=e.scope_.immer_.shouldUseStrictIteration()}else r=qo(t,!0);return Rn(r,(o,n)=>{An(r,o,tc(n))},i),e&&(e.finalized_=!1),r}var xf=globalThis.Iterator,vg=typeof xf?.from=="function";var Sf=new vf,ts=Sf.produce;function rc(t){return({dispatch:r,getState:i})=>o=>n=>typeof n=="function"?n(r,i,t):o(n)}var ic=rc(),nc=rc;var Ef=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ti:Ti.apply(null,arguments)},_g=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Af=t=>t&&typeof t.match=="function";function Yt(t,e){function r(...i){if(e){let o=e(...i);if(!o)throw new Error(Ut(0));return{type:t,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:t,payload:i[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=i=>Nl(i)&&i.type===t,r}var cc=class Pi extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Pi.prototype)}static get[Symbol.species](){return Pi}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Pi(...e[0].concat(this)):new Pi(...e.concat(this))}};function oc(t){return Ke(t)?ts(t,()=>{}):t}function Pn(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function Cf(t){return typeof t=="boolean"}var wf=()=>function(e){let{thunk:r=!0,immutableCheck:i=!0,serializableCheck:o=!0,actionCreatorCheck:n=!0}=e??{},s=new cc;return r&&(Cf(r)?s.push(ic):s.push(nc(r.extraArgument))),s},_f="RTK_autoBatch";var sc=t=>e=>{setTimeout(e,t)},Of=(t,e)=>r=>{let i=!1,o=()=>{i||(i=!0,cancelAnimationFrame(n),clearTimeout(s),r())},n=t(o),s=setTimeout(o,e)},Rf=(t={type:"raf"})=>e=>(...r)=>{let i=e(...r),o=!0,n=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Of(window.requestAnimationFrame,100):sc(10):t.type==="callback"?t.queueNotification:sc(t.timeout),d=()=>{s=!1,n&&(n=!1,a.forEach(u=>u()))};return Object.assign({},i,{subscribe(u){let p=()=>o&&u(),f=i.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return o=!u?.meta?.[_f],n=!o,n&&(s||(s=!0,l(d))),i.dispatch(u)}finally{o=!0}}})},Tf=t=>function(r){let{autoBatch:i=!0}=r??{},o=new cc(t);return i&&o.push(Rf(typeof i=="object"?i:void 0)),o};function dc(t){let e=wf(),{reducer:r=void 0,middleware:i,devTools:o=!0,duplicateMiddlewareCheck:n=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof r=="function")l=r;else if(yn(r))l=Il(r);else throw new Error(Ut(1));let d;typeof i=="function"?d=i(e):d=e();let u=Ti;o&&(u=Ef({trace:!1,...typeof o=="object"&&o}));let p=Ml(...d),f=Tf(p),b=typeof a=="function"?a(f):f(),x=u(...b);return Uo(l,s,x)}function uc(t){let e={},r=[],i,o={addCase(n,s){let a=typeof n=="string"?n:n.type;if(!a)throw new Error(Ut(28));if(a in e)throw new Error(Ut(29));return e[a]=s,o},addAsyncThunk(n,s){return s.pending&&(e[n.pending.type]=s.pending),s.rejected&&(e[n.rejected.type]=s.rejected),s.fulfilled&&(e[n.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:n.settled,reducer:s.settled}),o},addMatcher(n,s){return r.push({matcher:n,reducer:s}),o},addDefaultCase(n){return i=n,o}};return t(o),[e,r,i]}function kf(t){return typeof t=="function"}function Lf(t,e){let[r,i,o]=uc(e),n;if(kf(t))n=()=>oc(t());else{let a=oc(t);n=()=>a}function s(a=n(),l){let d=[r[l.type],...i.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[o]),d.reduce((u,p)=>{if(p)if(Rt(u)){let b=p(u,l);return b===void 0?u:b}else{if(Ke(u))return ts(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=n,s}var $f=(t,e)=>Af(t)?t.match(e):t(e);function Df(...t){return e=>t.some(r=>$f(r,e))}var Pf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",If=(t=21)=>{let e="",r=t;for(;r--;)e+=Pf[Math.random()*64|0];return e},Mf=["name","message","stack","code"],rs=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},ac=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Nf=t=>{if(typeof t=="object"&&t!==null){let e={};for(let r of Mf)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},lc="External signal was aborted",Ff=(()=>{function t(e,r,i){let o=Yt(e+"/fulfilled",(l,d,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:d,requestStatus:"fulfilled"}})),n=Yt(e+"/pending",(l,d,u)=>({payload:void 0,meta:{...u||{},arg:d,requestId:l,requestStatus:"pending"}})),s=Yt(e+"/rejected",(l,d,u,p,f)=>({payload:p,error:(i&&i.serializeError||Nf)(l||"Rejected"),meta:{...f||{},arg:u,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:d}={}){return(u,p,f)=>{let b=i?.idGenerator?i.idGenerator(l):If(),x=new AbortController,O,v;function T(S){v=S,x.abort()}d&&(d.aborted?T(lc):d.addEventListener("abort",()=>T(lc),{once:!0}));let H=(async function(){let S;try{let B=i?.condition?.(l,{getState:p,extra:f});if(Uf(B)&&(B=await B),B===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let ae=new Promise((Q,le)=>{O=()=>{le({name:"AbortError",message:v||"Aborted"})},x.signal.addEventListener("abort",O,{once:!0})});u(n(b,l,i?.getPendingMeta?.({requestId:b,arg:l},{getState:p,extra:f}))),S=await Promise.race([ae,Promise.resolve(r(l,{dispatch:u,getState:p,extra:f,requestId:b,signal:x.signal,abort:T,rejectWithValue:((Q,le)=>new rs(Q,le)),fulfillWithValue:((Q,le)=>new ac(Q,le))})).then(Q=>{if(Q instanceof rs)throw Q;return Q instanceof ac?o(Q.payload,b,l,Q.meta):o(Q,b,l)})])}catch(B){S=B instanceof rs?s(null,b,l,B.payload,B.meta):s(B,b,l)}finally{O&&x.signal.removeEventListener("abort",O)}return i&&!i.dispatchConditionRejection&&s.match(S)&&S.meta.condition||u(S),S})();return Object.assign(H,{abort:T,requestId:b,arg:l,unwrap(){return H.then(Bf)}})}}return Object.assign(a,{pending:n,rejected:s,fulfilled:o,settled:Df(s,o),typePrefix:e})}return t.withTypes=()=>t,t})();function Bf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function Uf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var pc=Symbol.for("rtk-slice-createasyncthunk"),Rg={[pc]:Ff};function zf(t,e){return`${t}/${e}`}function Vf({creators:t}={}){let e=t?.asyncThunk?.[pc];return function(i){let{name:o,reducerPath:n=o}=i;if(!o)throw new Error(Ut(11));typeof process<"u";let s=(typeof i.reducers=="function"?i.reducers(jf()):i.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(S,D){let B=typeof S=="string"?S:S.type;if(!B)throw new Error(Ut(12));if(B in l.sliceCaseReducersByType)throw new Error(Ut(13));return l.sliceCaseReducersByType[B]=D,d},addMatcher(S,D){return l.sliceMatchers.push({matcher:S,reducer:D}),d},exposeAction(S,D){return l.actionCreators[S]=D,d},exposeCaseReducer(S,D){return l.sliceCaseReducersByName[S]=D,d}};a.forEach(S=>{let D=s[S],B={reducerName:S,type:zf(o,S),createNotation:typeof i.reducers=="function"};qf(D)?Gf(B,D,d,e):Wf(B,D,d)});function u(){let[S={},D=[],B=void 0]=typeof i.extraReducers=="function"?uc(i.extraReducers):[i.extraReducers],ae={...S,...l.sliceCaseReducersByType};return Lf(i.initialState,Q=>{for(let le in ae)Q.addCase(le,ae[le]);for(let le of l.sliceMatchers)Q.addMatcher(le.matcher,le.reducer);for(let le of D)Q.addMatcher(le.matcher,le.reducer);B&&Q.addDefaultCase(B)})}let p=S=>S,f=new Map,b=new WeakMap,x;function O(S,D){return x||(x=u()),x(S,D)}function v(){return x||(x=u()),x.getInitialState()}function T(S,D=!1){function B(Q){let le=Q[S];return typeof le>"u"&&D&&(le=Pn(b,B,v)),le}function ae(Q=p){let le=Pn(f,D,()=>new WeakMap);return Pn(le,Q,()=>{let ci={};for(let[tt,or]of Object.entries(i.selectors??{}))ci[tt]=Hf(or,Q,()=>Pn(b,Q,v),D);return ci})}return{reducerPath:S,getSelectors:ae,get selectors(){return ae(B)},selectSlice:B}}let H={name:o,reducer:O,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:v,...T(n),injectInto(S,{reducerPath:D,...B}={}){let ae=D??n;return S.inject({reducerPath:ae,reducer:O},B),{...H,...T(ae,!0)}}};return H}}function Hf(t,e,r,i){function o(n,...s){let a=e(n);return typeof a>"u"&&i&&(a=r()),t(a,...s)}return o.unwrapped=t,o}var fc=Vf();function jf(){function t(e,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...r}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...r){return e(...r)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:r}},asyncThunk:t}}function Wf({type:t,reducerName:e,createNotation:r},i,o){let n,s;if("reducer"in i){if(r&&!Kf(i))throw new Error(Ut(17));n=i.reducer,s=i.prepare}else n=i;o.addCase(t,n).exposeCaseReducer(e,n).exposeAction(e,s?Yt(t,s):Yt(t))}function qf(t){return t._reducerDefinitionType==="asyncThunk"}function Kf(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Gf({type:t,reducerName:e},r,i,o){if(!o)throw new Error(Ut(18));let{payloadCreator:n,fulfilled:s,pending:a,rejected:l,settled:d,options:u}=r,p=o(t,n,u);i.exposeAction(e,p),s&&i.addCase(p.fulfilled,s),a&&i.addCase(p.pending,a),l&&i.addCase(p.rejected,l),d&&i.addMatcher(p.settled,d),i.exposeCaseReducer(e,{fulfilled:s||In,pending:a||In,rejected:l||In,settled:d||In})}function In(){}var hc="listener",mc="completed",gc="cancelled",Tg=`task-${gc}`,kg=`task-${mc}`,Lg=`${hc}-${gc}`,$g=`${hc}-${mc}`;var{assign:yc}=Object;var is="listenerMiddleware";var Xf=yc(Yt(`${is}/add`),{withTypes:()=>Xf}),Dg=Yt(`${is}/removeAll`),Yf=yc(Yt(`${is}/remove`),{withTypes:()=>Yf});function Ut(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Zf=dn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,o){this.eventBus.addEventListener(r,i,o)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,o){this.eventBus.removeEventListener(r,i,o)}}}),Mn=class extends Zf(Object){};window.ftReduxStores||(window.ftReduxStores={});var bc=class t extends Mn{static get(e){var r;let i=typeof e=="string"?e:e.name,o=typeof e=="string"?void 0:e,n=window.ftReduxStores[i];if(mn(n))return n;if(o==null)return;let s=fc({...o,reducers:(r=o.reducers)!==null&&r!==void 0?r:{}}),a=dc({reducer:(l,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let u=_i(s.getInitialState());for(let p of d.keeping)u[p]=(l??u)[p];return u}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...d.overwrites};return s.reducer(l,d)}});return window.ftReduxStores[o.name]=new t(s,a,o.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new un,this.injectInto=(n,s)=>this.reduxSlice.injectInto(n,s),this.selectSlice=n=>this.reduxSlice.selectSlice(n);let o=n=>n!=null?JSON.parse(JSON.stringify(n)):n;this.actions=new Proxy(this.reduxSlice.actions,{get:(n,s,a)=>{let l=s,d=n[l];return d?(...u)=>{let p=d(...u.map(o));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];Wr(f,u)||this.setState({[p]:o(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var Nn=class{static format(e,r,i,o,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,o,!!n)):this.getIntlDateTime(e,r,i,o,!!n)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,o,n){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return n?l:o?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Fn=c(m()),Qf="ft-app-info",Cr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Cr.eventName="authentication-change";var Ii=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ii.eventName="ui-locale-changed";var Jf={session:(t,e)=>{(0,Fn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>w.dispatchEvent(new Cr(e.payload)),0))}},w=Fn.FtReduxStore.get({name:Qf,reducers:Jf,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var vc=c(m()),Bn=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},cy=(0,vc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var o,n;return((n=(o=this.metadataDescriptors.find(a=>a.key===i))===null||o===void 0?void 0:o.date)!==null&&n!==void 0?n:!1)?a=>Nn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Bn([(0,ns.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Bn([(0,ns.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Bn([Fo({store:w.name,selector:r=>{var i,o;return(o=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&o!==void 0?o:[]}})],e.prototype,"metadataDescriptors",void 0),Bn([Fo({store:w.name})],e.prototype,"uiLocale",void 0),e});var xc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(xc||(xc={}));var Sc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Sc||(Sc={}));var Ec;(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"})(Ec||(Ec={}));var Ac;(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"})(Ac||(Ac={}));var Cc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cc||(Cc={}));var wc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(wc||(wc={}));var _c;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(_c||(_c={}));var Oc;(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"})(Oc||(Oc={}));var Rc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(Rc||(Rc={}));var Tc;(function(t){t.METADATA_FILTER="METADATA_FILTER",t.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(Tc||(Tc={}));var kc;(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"})(kc||(kc={}));var Lc;(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"})(Lc||(Lc={}));var $c;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})($c||($c={}));var Dc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Dc||(Dc={}));var Pc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Pc||(Pc={}));var Ic;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ic||(Ic={}));var Mc;(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"})(Mc||(Mc={}));var Nc;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Nc||(Nc={}));var Fc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Fc||(Fc={}));var Bc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Bc||(Bc={}));var Uc;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Uc||(Uc={}));var zc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(zc||(zc={}));var Vc;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Vc||(Vc={}));var Hc;(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"})(Hc||(Hc={}));var jc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(jc||(jc={}));var Wc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Wc||(Wc={}));var qc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(qc||(qc={}));var Kc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Kc||(Kc={}));var me;(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"})(me||(me={}));var ot;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ot||(ot={}));var Gc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Gc||(Gc={}));var Xc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Xc||(Xc={}));var Yc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Yc||(Yc={}));var Zc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Zc||(Zc={}));var Qc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Qc||(Qc={}));var Jc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Jc||(Jc={}));var ed;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(ed||(ed={}));var td;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(td||(td={}));var rd;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(rd||(rd={}));var id;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(id||(id={}));var nd;(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"})(nd||(nd={}));var od;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(od||(od={}));var eh={[me.PERSONAL_BOOK_SHARE_USER]:[me.PERSONAL_BOOK_USER],[me.HTML_EXPORT_USER]:[me.PERSONAL_BOOK_USER],[me.PDF_EXPORT_USER]:[me.PERSONAL_BOOK_USER],[me.KHUB_ADMIN]:[me.CONTENT_PUBLISHER],[me.ADMIN]:[me.KHUB_ADMIN,me.USERS_ADMIN,me.PORTAL_ADMIN,me.BEHAVIOR_DATA_USER],[me.GENERATIVE_AI_EXPORT_USER]:[me.GENERATIVE_AI_USER]};function sd(t,e){return t===e||(eh[t]??[]).some(r=>sd(r,e))}function os(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>sd(i,e))}function ad(t,...e){return t==null?!1:e.some(r=>os(t,r))}var jn=c(m());var ss=c(m());var wr=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),o=e??i;if(r&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,o,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let o=w.subscribe(()=>{i=t.get(e),i&&(o(),r(i))})}})}};var Yr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:wr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):wr.await()}};var Ge=class extends Yr{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(n,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let o=this.constructor;o.commonCache=(i=o.commonCache)!==null&&i!==void 0?i:new ss.CacheRegistry,this.cache=e?o.commonCache:new ss.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Un=class extends Ge{async listMySearches(){let{session:e}=w.getState();return os(e,me.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var zn=class extends Ge{async listMyBookmarks(){let e=w.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Vn=class extends Ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var Hn=class extends Ge{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=w.getState().session;return!!e?.sessionAuthenticated}};var th="ft-user-assets",rh={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(ot).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:o}=e.payload;ls(t,r,[...as(t,r),o]),ld(t,r,1,i),cd(t,o)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;ls(t,r,as(t,r).map(o=>o.id===i.id?i:o)),cd(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:o}=e.payload;ls(t,r,as(t,r).filter(n=>n.id!==o)),ld(t,r,-1,i)}},dd={[ot.SEARCHES]:"savedSearches",[ot.BOOKMARKS]:"bookmarks",[ot.BOOKS]:void 0,[ot.COLLECTIONS]:void 0},as=(t,e)=>{var r;let i=dd[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},ls=(t,e,r)=>{let i=dd[e];i&&(t[i]=r)},ld=(t,e,r,i)=>{let o=t.assetCounts.allAsset[e];if(o!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,o+r),e===ot.BOOKMARKS&&i)){let n=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,n+r)}},cd=(t,e)=>{let r=t.assetLabels.map(o=>o.title),i=e.labels.filter(o=>!r.includes(o)).map(o=>({title:o}));t.assetLabels.push(...i)},De=jn.FtReduxStore.get({name:th,reducers:rh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ot).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),cs=class{constructor(e=new Vn,r=new Hn){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new zn,this.savedSearchesService=new Un,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=w.getState();(0,jn.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),De.actions.clearAssetCount(),De.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),De.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),De.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();De.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();De.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&De.getState().assetCounts.allAsset[e]!==r.count&&De.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&De.getState().assetCounts.bookmarkByMap[e]!==r.count&&De.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(De.getState().assetCounts.bookmarkByMap).length!==0;e===ot.BOOKMARKS&&r&&De.actions.clearBookmarkCountByMap(),De.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;De.actions.bookmarks(r)}}},ih=new cs;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ih);var ds=class{addCommand(e,r=!1){w.commands.add(e,r)}consumeCommand(e){return w.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ds;var st=c(m());var ud,Zr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},nh=Symbol("clearAfterUnitTest"),Wn=class extends(0,st.withEventBus)(Ge){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ud]=()=>{this.defaultMessages={},this.cache=new st.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=w.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let o={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,st.deepEqual)(this.defaultMessages[e],o)||(this.defaultMessages[e]=o,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var o;let n=e.toLowerCase(),s=this.resolveContext(n);return new st.ParametrizedLabelResolver((o=this.defaultMessages[n])!==null&&o!==void 0?o:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(o){!(o instanceof st.CanceledPromiseError)&&r&&console.error(o)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var o;return(o=this.listeners[e])===null||o===void 0?void 0:o.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new Zr({loadedContexts:e})),this.dispatchEvent(new Zr({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new Zr({loadedContexts:[e]})),this.dispatchEvent(new Zr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,st.delay)(0).then(()=>i()).catch(()=>null)))}};ud=nh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Wn{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Wn{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Mi=window.FluidTopicsI18nService,us=window.FluidTopicsCustomI18nService;var pd=c(m()),ps=class{highlightHtml(e,r,i){(0,pd.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new ps;var fd=c(m());var fs=class{isDate(e){var r,i,o,n;return(n=(i=((o=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(a=>a.key===e))===null||i===void 0?void 0:i.date)!==null&&n!==void 0?n:!1}format(e,r){var i,o,n,s;if(e==null)return"";try{return fd.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(o=r?.longFormat)!==null&&o!==void 0?o:!1,(n=r?.withTime)!==null&&n!==void 0?n:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new fs;var hd=c(m());var Ni=class{static get(e,r){var i,o,n,s;let a=w.getState(),{lang:l,region:d}=(s=(o=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&s!==void 0?s:{lang:"en",region:"US"};return new hd.SearchPlaceConverter(a.baseUrl,e??20,(n=a.localesConfiguration)===null||n===void 0?void 0:n.allLanguagesAllowed,r??`${l}-${d}`)}};var hs=class{urlToSearchRequest(e){return Ni.get().parse(e)}searchRequestToUrl(e){return Ni.get().serialize(e)}};window.FluidTopicsUrlService=new hs;var zt=c(m());var _r=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};_r.eventName="before-location-change";var Or=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Or.eventName="change";var ms=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let r=sessionStorage.getItem(this.itemName(e));return r?JSON.parse(r):void 0}set(e,r){sessionStorage.setItem(this.itemName(e),JSON.stringify(r))}},md=new ms;var qn=class t extends zt.WithEventBus{static build(){return new t(window.history,md,()=>window.location,!1)}constructor(e,r,i,o){var n,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(n=e.state)===null||n===void 0?void 0:n.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(o)}setCurrentState(e,r=!1){let i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,zt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Or(this.currentItem())),0)}installProxies(){let e=r=>(i,o,[n,s,a])=>{let l=new _r(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...n,index:d,href:l.detail.nextLocation.href};i.apply(o,[u,s,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addBeforeLocationChangeListener(e){this.addEventListener(_r.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(_r.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Or.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Or.eventName,e)}currentItem(){return(0,zt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,zt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,zt.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,zt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let o=e,n=e+1;for(;this.states.length>n&&!this.isDifferentMajorState(n,i);)this.hasState(n)&&(o=n),n++;return o}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var i;if(!this.hasState(e))return!1;let o=r??this.currentState.majorStateId,n=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return n==null||n!=o}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=qn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var gd=c(E());var yd=gd.css`
619
619
  `;var xd=c(E()),Pe=c(j()),kr=c(m());var Rr=c(m());function bd(t,e){let{authenticationRequired:r,session:i}=w.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Kn=class extends Yr{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var gs=class t extends Rr.FtStateManager{static build(e){return new t(w,e)}constructor(e,r){super(),this.store=e,this.cache=new Rr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Kn,this.cleanSessionDebouncer=new Rr.Debouncer,this.reloadConfiguration=()=>{var i;(i=this.cache)===null||i===void 0||i.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Rr.Debouncer(500),this.apiProvider=r??(()=>wr.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Cr.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Cr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>bd(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,r){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ii(i)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}userHasAnyRole(...e){return ad(w.getState().session,...e)}},vd=gs.build();var Tr=class extends Event{constructor(e,r,i,o){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=o??!1}};var Fi=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:o,callbackRef:n}of i){let s=o.deref(),a=n.deref();s===void 0||a===void 0||s.dispatchEvent(new Tr(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,o=this.pendingContextRequests.get(e.context);o===void 0&&this.pendingContextRequests.set(e.context,o={callbacks:new WeakMap,requests:[]});let n=o.callbacks.get(r);n===void 0&&o.callbacks.set(r,n=new WeakSet),n.has(i)||(n.add(i),o.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var ve=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},ie=class extends kr.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=vd,this.contextRoot=new Fi}render(){return xd.html`
620
620
  <slot></slot>
621
621
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Mi.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};ie.elementDefinitions={};ie.styles=yd;ve([(0,Pe.property)()],ie.prototype,"baseUrl",void 0);ve([(0,Pe.property)()],ie.prototype,"tenantId",void 0);ve([(0,Pe.property)()],ie.prototype,"apiIntegrationIdentifier",void 0);ve([(0,Pe.property)()],ie.prototype,"apiIntegrationAppVersion",void 0);ve([(0,Pe.property)()],ie.prototype,"uiLocale",void 0);ve([(0,kr.jsonProperty)(null)],ie.prototype,"availableUiLocales",void 0);ve([(0,kr.jsonProperty)(null)],ie.prototype,"metadataConfiguration",void 0);ve([(0,Pe.property)({type:Boolean})],ie.prototype,"editorMode",void 0);ve([(0,Pe.property)({type:Boolean})],ie.prototype,"noCustom",void 0);ve([(0,Pe.property)({type:Boolean})],ie.prototype,"openExternalDocumentInNewTab",void 0);ve([(0,Pe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ie.prototype,"noCustomComponent",void 0);ve([(0,Pe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],ie.prototype,"noCustomCode",void 0);ve([(0,Pe.property)({type:Boolean})],ie.prototype,"withManualResources",void 0);ve([(0,Pe.property)({type:Boolean})],ie.prototype,"navigatorOnline",void 0);ve([(0,Pe.property)({type:Boolean})],ie.prototype,"forcedOffline",void 0);ve([(0,Pe.property)({type:Boolean})],ie.prototype,"authenticationRequired",void 0);ve([(0,kr.jsonProperty)([])],ie.prototype,"messageContexts",void 0);ve([(0,kr.jsonProperty)(void 0)],ie.prototype,"session",void 0);var Ed=c(m());var Sd={"ft-app-context":ie};(0,Ed.customElements)(Sd);var Ad=c(j());var ys=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Qr=new ys;var ah=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n},Ui=Symbol("i18nAttributes"),Cd=Symbol("i18nListAttributes"),wd=Symbol("i18nProperties"),Gn=Symbol("i18nContexts"),Bi=Symbol("i18nUnsubs"),Zn=(0,Jr.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(n){return n??this.useCustomMessageContexts?us:Mi}i18n(n){let{context:s,key:a,message:l}=n,{custom:d,args:u,argsProvider:p}=n;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,d);let f=u??(p?p(this):[]);return this.getI18nService(d).resolveMessage(s,a,...f)}return l}async awaitI18n(n){let{context:s,custom:a}=n;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(n)}customI18n(n,s){if(Qr.isI18nKey(n)){let[a,l]=n.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||n}return n}firstUpdated(n){super.firstUpdated(n),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(n){super.update(n),this.updateI18nAttributes((s,a,l)=>n.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(n){this.updateI18nAttributes((s,a,l)=>{var d;return((d=l?.context)===null||d===void 0?void 0:d.toLowerCase())===n}),this.updateI18nProperties(s=>s.context.toLowerCase()===n),this.requestUpdate()}updateI18nAttributes(n){var s,a;let l=this,d=(u,p,f)=>f?.context&&f.key&&n(u,p,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...u})}:f;(s=this[Ui])===null||s===void 0||s.forEach((u,p)=>l[p]=d(u,p,l[p])),(a=this[Cd])===null||a===void 0||a.forEach((u,p)=>{var f;return l[p]=(f=l[p])===null||f===void 0?void 0:f.map(b=>d(u,p,b))})}updateI18nProperties(n){var s;(s=this[wd])===null||s===void 0||s.forEach((a,l)=>{n(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(n,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(n,s,a)}addI18nContext(n,s,a){let l=(typeof n=="string"?n:n.name).toLowerCase();a=typeof n=="string"?a:n.custom,this[Gn].set(l,{isCustomContext:a}),this[Bi].has(l)||this[Bi].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(n){return this[Gn].has(n.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Gn].forEach((n,s)=>this.addI18nContext(s,void 0,n.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Bi].forEach(n=>n()),this[Bi].clear()}}return e=Gn,r=Bi,ah([(0,Ad.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Xn=class extends Zn(Jr.FtLitElement){},Yn=class extends Zn(Jr.FtLitElementRedux){};var _d=c(m());var bs=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?Qr.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},lh=new bs;var Od=(t,e)=>(r,i)=>{var o;r.constructor.createProperty(i,{type:Object,hasChanged:_d.hasChanged,converter:Qr,...e}),r[Ui]=(o=r[Ui])!==null&&o!==void 0?o:new Map,r[Ui].set(i,t??{})};var Rd=c(E());var Td=Rd.css`
@@ -1895,7 +1895,7 @@
1895
1895
  </slot>
1896
1896
  ${this.isSlotEmpty?ni.html`<span>${this.label}</span>`:ni.html``}
1897
1897
  </div>
1898
- `}onSlotChange(){this.isSlotEmpty=(0,co.isSlotEmptyOrWithoutContent)(this.slotElement)}onClick(){this.dispatchEvent(new Event("select-option",{bubbles:!0,composed:!0}))}update(e){super.update(e),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};Le.elementDefinitions={"ft-ripple":I};Le.shadowRootOptions={...ni.LitElement.shadowRootOptions,delegatesFocus:!0};Le.styles=[Yu,zr];Gi([(0,ir.property)({type:String})],Le.prototype,"label",void 0);Gi([(0,ir.property)({type:Object,converter:t=>t})],Le.prototype,"value",void 0);Gi([(0,ir.property)({type:Boolean,reflect:!0})],Le.prototype,"selected",void 0);Gi([(0,ir.query)("slot")],Le.prototype,"slotElement",void 0);Gi([(0,ir.state)()],Le.prototype,"isSlotEmpty",void 0);var Re=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};var Z=class t extends ut.FtLitElement{constructor(){super(...arguments),this.label="",this.ariaLabel=null,this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.currentSearch="",this.lastSearchInputDate=new Date("01/01/1970"),this.isSlotEmpty=!0,this.hideOptions=e=>this.optionsDisplayed=this.optionsDisplayed&&e.composedPath().includes(this.container)}get firstOption(){return this.optionsList[0]}get optionsList(){let e=[...this.querySelectorAll("ft-select-option")];return e.length>0?e:[...this.shadowRoot.querySelectorAll("ft-select-option")]}get focusedOption(){return this.optionsList.find(e=>e.matches(":focus-within"))}get selectedOptionElement(){return this.optionsList.find(e=>e.selected)}get lastOption(){return(0,ut.last)(this.optionsList)}render(){var e,r,i,o,n;let s=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions,l=((e=this.selectedOption)===null||e===void 0?void 0:e.value)!=null||((i=(r=this.selectedOption)===null||r===void 0?void 0:r.label)!==null&&i!==void 0?i:"").length>0,d={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":s,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return oi.html`
1898
+ `}onSlotChange(){this.isSlotEmpty=(0,co.isSlotEmptyOrWithoutContent)(this.slotElement)}onClick(){this.dispatchEvent(new Event("select-option",{bubbles:!0,composed:!0}))}update(e){super.update(e),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};Le.elementDefinitions={"ft-ripple":I};Le.shadowRootOptions={...ni.LitElement.shadowRootOptions,delegatesFocus:!0};Le.styles=[Yu,zr];Gi([(0,ir.property)({type:String})],Le.prototype,"label",void 0);Gi([(0,ir.property)({type:Object,converter:t=>t})],Le.prototype,"value",void 0);Gi([(0,ir.property)({type:Boolean,reflect:!0})],Le.prototype,"selected",void 0);Gi([(0,ir.query)("slot")],Le.prototype,"slotElement",void 0);Gi([(0,ir.state)()],Le.prototype,"isSlotEmpty",void 0);var Re=function(t,e,r,i){var o=arguments.length,n=o<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};var Z=class t extends ut.FtLitElement{constructor(){super(...arguments),this.label="",this.ariaLabel=null,this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.currentSearch="",this.lastSearchInputDate=new Date("01/01/1970"),this.isSlotEmpty=!0,this.hideOptions=e=>this.optionsDisplayed=this.optionsDisplayed&&e.composedPath().includes(this.container)}get firstOption(){return this.optionsList[0]}get optionsList(){let e=[...this.querySelectorAll("ft-select-option")];return e.length>0?e:[...this.shadowRoot.querySelectorAll("ft-select-option")]}get focusedOption(){return this.optionsList.find(e=>e.matches(":focus-within"))}get selectedOptionElement(){return this.optionsList.find(e=>e.selected)}get lastOption(){return(0,ut.last)(this.optionsList)}render(){var e,r,i,o,n;let s=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions,l=((e=this.selectedOption)===null||e===void 0?void 0:e.value)!=null||((o=(r=this.selectedOption)===null||r===void 0?void 0:r.label)!==null&&o!==void 0?o:"").length>0,d={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":s,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return oi.html`
1899
1899
  <div class="${(0,Qu.classMap)(d)}" part="container">
1900
1900
  <div class="ft-select--main-panel" part="main-panel">
1901
1901
  <ft-input-label text="${this.label}"
@@ -1922,7 +1922,7 @@
1922
1922
  <ft-typography variant="${pe.body1}"
1923
1923
  aria-hidden="${l?"false":"true"}"
1924
1924
  class="ft-select--selected-option">
1925
- ${(n=(o=this.selectedOption)===null||o===void 0?void 0:o.label)!==null&&n!==void 0?n:this.label}
1925
+ ${(n=(i=this.selectedOption)===null||i===void 0?void 0:i.label)!==null&&n!==void 0?n:this.label}
1926
1926
  </ft-typography>
1927
1927
  </slot>
1928
1928
  <ft-icon aria-hidden="true" .value=${s?Xe.THIN_ARROW_UP:Xe.THIN_ARROW}></ft-icon>
@@ -1951,7 +1951,7 @@
1951
1951
  label="${e.label}"
1952
1952
  .value=${e.value}
1953
1953
  ></ft-select-option>
1954
- `}willUpdate(e){super.willUpdate(e),e.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),e.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),e.has("focusOptions")&&this.focusOptions&&((i=(r=this.selectedOptionElement)!==null&&r!==void 0?r:this.firstOption)===null||i===void 0||i.focus(),this.focusOptions=!1),e.has("optionsDisplayed")&&(this.optionsDisplayed?document.addEventListener("click",this.hideOptions):document.removeEventListener("click",this.hideOptions)),e.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let o=["bottom","top"];(0,ut.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",o,"fixed",L.optionsHeight,0).then(({x:n,y:s})=>{this.optionsMenu.style.left=`${n}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(e){var r;e.stopPropagation(),this.isSlotEmpty=(0,ut.isSlotEmptyOrWithoutContent)(this.optionsSlot);let i=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(o=>o);i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(e){switch(e.key===" "&&(e.preventDefault(),e.stopPropagation()),e.key){case" ":case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":e.preventDefault(),e.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(e){var r,i;let o,n=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),this.onSelectOption(e),this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Escape":this.optionsDisplayed=!1,(i=this.mainPanel)===null||i===void 0||i.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),o=this.optionsList[(n-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),o=this.optionsList[(n+1)%this.optionsList.length];break;default:if(e.key.length!=1)break;this.isKeyAlphanumeric(e.key)&&(o=this.handleAlphanumericPress(e.key));break}o?.focus()}isKeyAlphanumeric(e){let r=e.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(e){let r=new Date;r.getTime()-this.lastSearchInputDate.getTime()>t.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=e.toLowerCase();let i=this.options.find(o=>{var n;return((n=o.label)===null||n===void 0?void 0:n.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=r,i&&this.optionsList.find(o=>o.value===i.value)}getOptionId(e){if(!e)return;let r=this.options.findIndex(i=>(0,ut.deepEqual)(i.value,e.value));if(r!==-1)return`option-${r}`}onSelectOption(e){e.stopPropagation(),this.setValue(e.target.value)}setValue(e,r=!0){let i=this.options.find(o=>(0,ut.deepEqual)(o.value,e));i&&this.selectOption(i,r)}selectOption(e,r=!0){var i,o;if(!(0,ut.deepEqual)((i=this.selectedOption)===null||i===void 0?void 0:i.value,e?.value)){this.selectedOption=e;for(let n of this.options)n.selected=n===e;r&&this.dispatchEvent(new CustomEvent("change",{detail:(o=this.selectedOption)===null||o===void 0?void 0:o.value}))}this.optionsDisplayed=!1}};Z.elementDefinitions={"ft-input-label":St,"ft-typography":q,"ft-ripple":I,"ft-icon":ne,"ft-select-option":Le};Z.searchTimeoutMilliseconds=2e3;Z.styles=[jt,Gu];Re([(0,ye.property)({type:String})],Z.prototype,"label",void 0);Re([(0,ye.property)({type:String})],Z.prototype,"ariaLabel",void 0);Re([(0,ye.property)({type:String})],Z.prototype,"helper",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"outlined",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"disabled",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"error",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"fixedMenuPosition",void 0);Re([(0,ye.property)({type:Array})],Z.prototype,"options",void 0);Re([(0,ye.state)()],Z.prototype,"selectedOption",void 0);Re([(0,ye.state)()],Z.prototype,"optionsDisplayed",void 0);Re([(0,ye.state)()],Z.prototype,"focusOptions",void 0);Re([(0,ye.state)()],Z.prototype,"currentSearch",void 0);Re([(0,ye.state)()],Z.prototype,"lastSearchInputDate",void 0);Re([(0,ye.query)(".ft-select")],Z.prototype,"container",void 0);Re([(0,ye.query)(".ft-select--options")],Z.prototype,"optionsMenu",void 0);Re([(0,ye.query)(".ft-select--input-panel")],Z.prototype,"mainPanel",void 0);Re([(0,ye.query)("slot:not([name])")],Z.prototype,"optionsSlot",void 0);var tp=c(m());var ep={"ft-select":Z,"ft-select-option":Le};(0,tp.customElements)(ep);var R=c(m()),Ts=c(E());var rp=c(E()),Et=c(m()),Te={display:Et.FtCssVariableFactory.create("--ft-skeleton--display","","DISPLAY","block"),width:Et.FtCssVariableFactory.create("--ft-skeleton--width","","SIZE","100%"),height:Et.FtCssVariableFactory.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:Et.FtCssVariableFactory.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:Et.FtCssVariableFactory.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:Et.FtCssVariableFactory.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:Et.FtCssVariableFactory.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:Et.FtCssVariableFactory.external(Et.designSystemVariables.borderRadiusM,"Design system")},ip=rp.css`
1954
+ `}willUpdate(e){super.willUpdate(e),e.has("options")&&(this.selectedOption=this.options.filter(r=>r.selected)[0]),e.has("selectedOption")&&(this.optionsDisplayed=!1)}contentAvailableCallback(e){var r,i;if(super.contentAvailableCallback(e),e.has("focusOptions")&&this.focusOptions&&((r=(i=this.selectedOptionElement)!==null&&i!==void 0?i:this.firstOption)===null||r===void 0||r.focus(),this.focusOptions=!1),e.has("optionsDisplayed")&&(this.optionsDisplayed?document.addEventListener("click",this.hideOptions):document.removeEventListener("click",this.hideOptions)),e.has("optionsDisplayed")&&this.hasOptionsMenuOpen){this.optionsMenu.style.minWidth=this.mainPanel.getBoundingClientRect().width+"px";let o=["bottom","top"];(0,ut.computeOffsetAutoPosition)(this.mainPanel,this.optionsMenu,"bottom",o,"fixed",L.optionsHeight,0).then(({x:n,y:s})=>{this.optionsMenu.style.left=`${n}px`,this.optionsMenu.style.top=`${s}px`})}}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(e){var r;e.stopPropagation(),this.isSlotEmpty=(0,ut.isSlotEmptyOrWithoutContent)(this.optionsSlot);let i=(r=this.optionsSlot)===null||r===void 0?void 0:r.assignedElements().map(o=>o);i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(e){switch(e.key===" "&&(e.preventDefault(),e.stopPropagation()),e.key){case" ":case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":e.preventDefault(),e.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0;break}}onOptionsKeyDown(e){var r,i;let o,n=this.focusedOption?this.optionsList.indexOf(this.focusedOption):0;switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),this.onSelectOption(e),this.optionsDisplayed=!1,(r=this.mainPanel)===null||r===void 0||r.focus();break;case"Escape":this.optionsDisplayed=!1,(i=this.mainPanel)===null||i===void 0||i.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),o=this.optionsList[(n-1+this.optionsList.length)%this.optionsList.length];break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),o=this.optionsList[(n+1)%this.optionsList.length];break;default:if(e.key.length!=1)break;this.isKeyAlphanumeric(e.key)&&(o=this.handleAlphanumericPress(e.key));break}o?.focus()}isKeyAlphanumeric(e){let r=e.charCodeAt(0);return r>47&&r<58||r>64&&r<91||r>96&&r<123}handleAlphanumericPress(e){let r=new Date;r.getTime()-this.lastSearchInputDate.getTime()>t.searchTimeoutMilliseconds&&(this.currentSearch=""),this.currentSearch+=e.toLowerCase();let i=this.options.find(o=>{var n;return((n=o.label)===null||n===void 0?void 0:n.toLowerCase().substring(0,this.currentSearch.length))===this.currentSearch});return this.lastSearchInputDate=r,i&&this.optionsList.find(o=>o.value===i.value)}getOptionId(e){if(!e)return;let r=this.options.findIndex(i=>(0,ut.deepEqual)(i.value,e.value));if(r!==-1)return`option-${r}`}onSelectOption(e){e.stopPropagation(),this.setValue(e.target.value)}setValue(e,r=!0){let i=this.options.find(o=>(0,ut.deepEqual)(o.value,e));i&&this.selectOption(i,r)}selectOption(e,r=!0){var i,o;if(!(0,ut.deepEqual)((i=this.selectedOption)===null||i===void 0?void 0:i.value,e?.value)){this.selectedOption=e;for(let n of this.options)n.selected=n===e;r&&this.dispatchEvent(new CustomEvent("change",{detail:(o=this.selectedOption)===null||o===void 0?void 0:o.value}))}this.optionsDisplayed=!1}};Z.elementDefinitions={"ft-input-label":St,"ft-typography":q,"ft-ripple":I,"ft-icon":ne,"ft-select-option":Le};Z.searchTimeoutMilliseconds=2e3;Z.styles=[jt,Gu];Re([(0,ye.property)({type:String})],Z.prototype,"label",void 0);Re([(0,ye.property)({type:String})],Z.prototype,"ariaLabel",void 0);Re([(0,ye.property)({type:String})],Z.prototype,"helper",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"outlined",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"disabled",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"error",void 0);Re([(0,ye.property)({type:Boolean})],Z.prototype,"fixedMenuPosition",void 0);Re([(0,ye.property)({type:Array})],Z.prototype,"options",void 0);Re([(0,ye.state)()],Z.prototype,"selectedOption",void 0);Re([(0,ye.state)()],Z.prototype,"optionsDisplayed",void 0);Re([(0,ye.state)()],Z.prototype,"focusOptions",void 0);Re([(0,ye.state)()],Z.prototype,"currentSearch",void 0);Re([(0,ye.state)()],Z.prototype,"lastSearchInputDate",void 0);Re([(0,ye.query)(".ft-select")],Z.prototype,"container",void 0);Re([(0,ye.query)(".ft-select--options")],Z.prototype,"optionsMenu",void 0);Re([(0,ye.query)(".ft-select--input-panel")],Z.prototype,"mainPanel",void 0);Re([(0,ye.query)("slot:not([name])")],Z.prototype,"optionsSlot",void 0);var tp=c(m());var ep={"ft-select":Z,"ft-select-option":Le};(0,tp.customElements)(ep);var R=c(m()),Ts=c(E());var rp=c(E()),Et=c(m()),Te={display:Et.FtCssVariableFactory.create("--ft-skeleton--display","","DISPLAY","block"),width:Et.FtCssVariableFactory.create("--ft-skeleton--width","","SIZE","100%"),height:Et.FtCssVariableFactory.create("--ft-skeleton--height","","SIZE","20px"),backgroundColor:Et.FtCssVariableFactory.create("--ft-skeleton--background-color","","COLOR","#f1f1f1"),glareWidth:Et.FtCssVariableFactory.create("--ft-skeleton--glare-width","","SIZE","200px"),glareColor:Et.FtCssVariableFactory.create("--ft-skeleton--glare-color","","COLOR","rgba(255, 255, 255, .6)"),animationDuration:Et.FtCssVariableFactory.create("--ft-skeleton--animation-duration","","UNKNOWN","2s"),borderRadiusM:Et.FtCssVariableFactory.external(Et.designSystemVariables.borderRadiusM,"Design system")},ip=rp.css`
1955
1955
  :host {
1956
1956
  width: ${Te.width};
1957
1957
  height: ${Te.height};
@@ -2836,7 +2836,7 @@
2836
2836
  ></ft-filter>
2837
2837
  `})}
2838
2838
  </ft-snap-scroll>
2839
- `:V.nothing}firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,i,o,n,s;if(e.has("labels")&&(this.labelResolver=new X.ParametrizedLabelResolver(mp,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let a=l=>this.availableContentLocales.some(d=>d.lang==l);a(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&a(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((i=this.presets)!==null&&i!==void 0?i:[]).forEach(a=>a.metadataFilters.forEach(l=>{l.valueFilter&&(l.valueFilter.values=l.valueFilter.values.map(d=>en(d)))})),e.has("presets")||e.has("selectedPreset")){let a=((o=this.presets)!==null&&o!==void 0?o:[]).find(l=>l.name===this.selectedPreset);a&&!this.compareRequests(this.request,a)&&this.setFiltersFromPreset(a)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(a=>e.has(a))&&(this.selectedPreset=(s=((n=this.presets)!==null&&n!==void 0?n:[]).find(a=>this.compareRequests(a,this.request)))===null||s===void 0?void 0:s.name),["baseUrl","apiIntegrationIdentifier"].some(a=>e.has(a))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(a=>e.has(a))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(a=>e.has(a))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(a=>e.has(a))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new $s(this.request)))}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run(async()=>{await this.retrieveFacetsFromSearch(),this.facetsLoaded=!0,this.facetsInitialized=!0},this.facetsInitialized?500:10)):(this.facets=[],this.facetsLoaded=!0,this.facetsInitialized=!0)}contentAvailableCallback(e){var r,i,o;if(super.contentAvailableCallback(e),e.has("displayFacets")&&this.displayFacets&&((r=this.floatingContainer)===null||r===void 0||r.focus()),this.scrollToFacet!=null&&this.facetsLoaded){(i=this.scrollingFiltersContainer)===null||i===void 0||i.scrollIndexIntoView(this.facets.findIndex(s=>s.key===this.scrollToFacet));let n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);n&&(n.active=!0),this.scrollToFacet=void 0}}initApi(){this.api==null&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout(()=>this.initApi(),10))}async retrieveFacetsFromSearch(){var e;if(this.facetsRequest.length==0){this.facets=[];return}let r=new Map;await((e=this.api)===null||e===void 0?void 0:e.search({...this.request,query:""}).then(i=>i.facets.forEach(o=>{this.knownFacetLabels.set(o.key,o.label),r.set(o.key,o)})).catch(ph)),this.facets=[];for(let i of this.facetsRequest)r.has(i.id)?this.facets.push(r.get(i.id)):this.knownFacetLabels.has(i.id)&&this.facets.push({key:i.id,label:this.knownFacetLabels.get(i.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1})}onFloatingContainerKeyUp(e){var r;e.key==="Escape"&&(this.displayFacets=!1,(r=this.filtersOpener)===null||r===void 0||r.focus())}setQuery(e){this.input&&(this.input.value=e),this.query=e}onLaunchSearch(){if(this.query){let e=this.recentSearches.filter(r=>r.toLowerCase()!==this.query.toLowerCase()).filter((r,i)=>i<20);this.recentSearches=[this.query,...e],this.saveRecentSearches()}this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var e;this.recentSearches=JSON.parse((e=window.localStorage.getItem(this.recentSearchesStorageKey))!==null&&e!==void 0?e:"[]")}saveRecentSearches(){let e=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,e),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:e,storageArea:window.localStorage,url:window.location.href}))}async connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.closeSuggestListbox),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer),this.focusOnDisplay&&!X.isTouchScreen&&this.focusInput(),w.addEventListener("authentication-change",this.initSearchData),this.initSearchData()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeSuggestListbox),document.removeEventListener("focusin",this.closeFloatingContainer),document.removeEventListener("click",this.closeFloatingContainer),w.removeEventListener("authentication-change",this.initSearchData)}updateSize(e){this.sizeCategory=e.detail.category}setFilter(e,r){let i=this.metadataFilters.filter(o=>!o.valueFilter||o.key!==e);this.facets.forEach(o=>{o.key===e&&(0,X.flatDeep)(o.rootNodes,n=>n.childNodes).forEach(n=>n.selected=r.includes(n.value))}),r.length&&i.push({key:e,valueFilter:{negative:!1,values:r}}),this.metadataFilters=i,this.scrollToFacet=e}setFiltersFromPreset(e){e!=null&&(e.contentLocale!=null&&(this.contentLocale=e.contentLocale),this.metadataFilters=e.metadataFilters)}clearFilters(){this.facets.forEach(r=>(0,X.flatDeep)(r.rootNodes,i=>i.childNodes).forEach(i=>i.selected=!1)),this.metadataFilters=[];let e=this.facets[0];this.scrollToFacet=e?.key}querySelector(e){return this.shadowRoot.querySelector(e)}querySelectorAll(e){return this.shadowRoot.querySelectorAll(e)}renderDesktopFloatingMenu(){return this.forceMenuOpen?V.nothing:V.html`
2839
+ `:V.nothing}firstUpdated(e){super.firstUpdated(e),this.initApi(),window.addEventListener("storage",r=>{r.key===this.recentSearchesStorageKey&&this.initRecentSearches()})}update(e){var r,i,o,n,s;if(e.has("labels")&&(this.labelResolver=new X.ParametrizedLabelResolver(mp,this.labels)),e.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile()),super.update(e),(e.has("availableContentLocales")||e.has("contentLocale"))&&this.availableContentLocales.length>0){let a=l=>this.availableContentLocales.some(d=>d.lang==l);a(this.contentLocale)||(this.contentLocale=e.has("contentLocale")&&a(e.get("contentLocale"))?e.get("contentLocale"):(r=this.availableContentLocales[0])===null||r===void 0?void 0:r.lang)}if(e.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.initRecentSearches()),e.has("presets")&&((o=this.presets)!==null&&o!==void 0?o:[]).forEach(a=>a.metadataFilters.forEach(l=>{l.valueFilter&&(l.valueFilter.values=l.valueFilter.values.map(d=>en(d)))})),e.has("presets")||e.has("selectedPreset")){let a=((n=this.presets)!==null&&n!==void 0?n:[]).find(l=>l.name===this.selectedPreset);a&&!this.compareRequests(this.request,a)&&this.setFiltersFromPreset(a)}e.has("contentLocale")&&this.contentLocale!=null&&(this.knownFacetLabels=new Map),["contentLocale","metadataFilters"].some(a=>e.has(a))&&(this.selectedPreset=(i=((s=this.presets)!==null&&s!==void 0?s:[]).find(a=>this.compareRequests(a,this.request)))===null||i===void 0?void 0:i.name),["baseUrl","apiIntegrationIdentifier"].some(a=>e.has(a))&&(this.api=void 0,this.initApi()),e.has("api")&&this.api&&this.initSearchData(),["uiLocale","contentLocale","metadataFilters","displayedFilters"].some(a=>e.has(a))&&this.updateFacets(),["query","uiLocale","contentLocale","metadataFilters","displayedFilters","api"].some(a=>e.has(a))&&this.suggestManager.update(),["query","uiLocale","contentLocale","metadataFilters"].some(a=>e.has(a))&&this.dispatchStateChangeEvent()}dispatchStateChangeEvent(){this.stateChangeEventDebouncer.run(()=>this.dispatchEvent(new $s(this.request)))}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run(async()=>{await this.retrieveFacetsFromSearch(),this.facetsLoaded=!0,this.facetsInitialized=!0},this.facetsInitialized?500:10)):(this.facets=[],this.facetsLoaded=!0,this.facetsInitialized=!0)}contentAvailableCallback(e){var r,i,o;if(super.contentAvailableCallback(e),e.has("displayFacets")&&this.displayFacets&&((r=this.floatingContainer)===null||r===void 0||r.focus()),this.scrollToFacet!=null&&this.facetsLoaded){(i=this.scrollingFiltersContainer)===null||i===void 0||i.scrollIndexIntoView(this.facets.findIndex(s=>s.key===this.scrollToFacet));let n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);n&&(n.active=!0),this.scrollToFacet=void 0}}initApi(){this.api==null&&(this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier,!0):void 0,setTimeout(()=>this.initApi(),10))}async retrieveFacetsFromSearch(){var e;if(this.facetsRequest.length==0){this.facets=[];return}let r=new Map;await((e=this.api)===null||e===void 0?void 0:e.search({...this.request,query:""}).then(i=>i.facets.forEach(o=>{this.knownFacetLabels.set(o.key,o.label),r.set(o.key,o)})).catch(ph)),this.facets=[];for(let i of this.facetsRequest)r.has(i.id)?this.facets.push(r.get(i.id)):this.knownFacetLabels.has(i.id)&&this.facets.push({key:i.id,label:this.knownFacetLabels.get(i.id),rootNodes:[],multiSelectionable:!0,hierarchical:!1})}onFloatingContainerKeyUp(e){var r;e.key==="Escape"&&(this.displayFacets=!1,(r=this.filtersOpener)===null||r===void 0||r.focus())}setQuery(e){this.input&&(this.input.value=e),this.query=e}onLaunchSearch(){if(this.query){let e=this.recentSearches.filter(r=>r.toLowerCase()!==this.query.toLowerCase()).filter((r,i)=>i<20);this.recentSearches=[this.query,...e],this.saveRecentSearches()}this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}get recentSearchesStorageKey(){return this.baseUrl+":ft:recent-search-queries"}initRecentSearches(){var e;this.recentSearches=JSON.parse((e=window.localStorage.getItem(this.recentSearchesStorageKey))!==null&&e!==void 0?e:"[]")}saveRecentSearches(){let e=JSON.stringify(this.recentSearches);window.localStorage.setItem(this.recentSearchesStorageKey,e),window.dispatchEvent(new StorageEvent("storage",{key:this.recentSearchesStorageKey,newValue:e,storageArea:window.localStorage,url:window.location.href}))}async connectedCallback(){super.connectedCallback(),document.addEventListener("pointerdown",this.closeSuggestListbox),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer),this.focusOnDisplay&&!X.isTouchScreen&&this.focusInput(),w.addEventListener("authentication-change",this.initSearchData),this.initSearchData()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeSuggestListbox),document.removeEventListener("focusin",this.closeFloatingContainer),document.removeEventListener("click",this.closeFloatingContainer),w.removeEventListener("authentication-change",this.initSearchData)}updateSize(e){this.sizeCategory=e.detail.category}setFilter(e,r){let i=this.metadataFilters.filter(o=>!o.valueFilter||o.key!==e);this.facets.forEach(o=>{o.key===e&&(0,X.flatDeep)(o.rootNodes,n=>n.childNodes).forEach(n=>n.selected=r.includes(n.value))}),r.length&&i.push({key:e,valueFilter:{negative:!1,values:r}}),this.metadataFilters=i,this.scrollToFacet=e}setFiltersFromPreset(e){e!=null&&(e.contentLocale!=null&&(this.contentLocale=e.contentLocale),this.metadataFilters=e.metadataFilters)}clearFilters(){this.facets.forEach(r=>(0,X.flatDeep)(r.rootNodes,i=>i.childNodes).forEach(i=>i.selected=!1)),this.metadataFilters=[];let e=this.facets[0];this.scrollToFacet=e?.key}querySelector(e){return this.shadowRoot.querySelector(e)}querySelectorAll(e){return this.shadowRoot.querySelectorAll(e)}renderDesktopFloatingMenu(){return this.forceMenuOpen?V.nothing:V.html`
2840
2840
  <div class="ft-search-bar--floating-panel"
2841
2841
  id="ft-search-bar-floating-panel"
2842
2842
  @keyup=${this.onFloatingContainerKeyUp}