@fluid-topics/ft-reader-search-in-document 2.0.11 → 2.0.12

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.
@@ -530,8 +530,8 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
530
530
  position: relative;
531
531
  word-break: break-word;
532
532
  }
533
- `});function hd(t,e,r){return Uo(t,gi(e,r))}function Es(t,e){return typeof t=="function"?t(e):t}function ma(t){return t.split("-")[0]}function Ho(t){return t.split("-")[1]}function md(t){return t==="x"?"y":"x"}function gd(t){return t==="y"?"height":"width"}function Ls(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function yd(t){return md(Ls(t))}function U0(t,e,r){r===void 0&&(r=!1);let o=Ho(t),a=yd(t),i=gd(a),s=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=fd(s)),[s,fd(s)]}function H0(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function fd(t){let e=ma(t);return R7[e]+t.slice(e.length)}function w7(t){return{top:0,right:0,bottom:0,left:0,...t}}function G0(t){return typeof t!="number"?w7(t):{top:t,right:t,bottom:t,left:t}}function Ln(t){let{x:e,y:r,width:o,height:a}=t;return{width:o,height:a,top:r,left:e,right:e+o,bottom:r+a,x:e,y:r}}var F0,B0,pd,gi,Uo,yi,Nr,R7,As=d(()=>{F0=["top","right","bottom","left"],B0=["start","end"],pd=F0.reduce((t,e)=>t.concat(e,e+"-"+B0[0],e+"-"+B0[1]),[]),gi=Math.min,Uo=Math.max,yi=Math.round,Nr=t=>({x:t,y:t}),R7={left:"right",right:"left",bottom:"top",top:"bottom"}});function V0(t,e,r){let{reference:o,floating:a}=t,i=Ls(e),s=yd(e),l=gd(s),p=ma(e),h=i==="y",y=o.x+o.width/2-a.width/2,b=o.y+o.height/2-a.height/2,v=o[l]/2-a[l]/2,E;switch(p){case"top":E={x:y,y:o.y-a.height};break;case"bottom":E={x:y,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:b};break;case"left":E={x:o.x-a.width,y:b};break;default:E={x:o.x,y:o.y}}switch(Ho(e)){case"start":E[s]-=v*(r&&h?-1:1);break;case"end":E[s]+=v*(r&&h?-1:1);break}return E}async function W0(t,e){var r;e===void 0&&(e={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:p}=t,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:b="floating",altBoundary:v=!1,padding:E=0}=Es(e,t),L=G0(E),M=l[v?b==="floating"?"reference":"floating":b],P=Ln(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(M)))==null||r?M:M.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:y,strategy:p})),N=b==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,B=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),U=await(i.isElement==null?void 0:i.isElement(B))?await(i.getScale==null?void 0:i.getScale(B))||{x:1,y:1}:{x:1,y:1},le=Ln(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:B,strategy:p}):N);return{top:(P.top-le.top+L.top)/U.y,bottom:(le.bottom-P.bottom+L.bottom)/U.y,left:(P.left-le.left+L.left)/U.x,right:(le.right-P.right+L.right)/U.x}}function _7(t,e,r){return(t?[...r.filter(a=>Ho(a)===t),...r.filter(a=>Ho(a)!==t)]:r.filter(a=>ma(a)===a)).filter(a=>t?Ho(a)===t||(e?H0(a)!==a:!1):!0)}var k7,j0,K0,q0,Z0=d(()=>{As();As();k7=50,j0=async(t,e,r)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:W0},p=await(s.isRTL==null?void 0:s.isRTL(e)),h=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:y,y:b}=V0(h,o,p),v=o,E=0,L={};for(let R=0;R<i.length;R++){let M=i[R];if(!M)continue;let{name:P,fn:N}=M,{x:B,y:U,data:le,reset:$e}=await N({x:y,y:b,initialPlacement:o,placement:v,strategy:a,middlewareData:L,rects:h,platform:l,elements:{reference:t,floating:e}});y=B??y,b=U??b,L[P]={...L[P],...le},$e&&E<k7&&(E++,typeof $e=="object"&&($e.placement&&(v=$e.placement),$e.rects&&(h=$e.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):$e.rects),{x:y,y:b}=V0(h,v,p)),R=-1)}return{x:y,y:b,placement:v,strategy:a,middlewareData:L}};K0=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,o,a;let{rects:i,middlewareData:s,placement:l,platform:p,elements:h}=e,{crossAxis:y=!1,alignment:b,allowedPlacements:v=pd,autoAlignment:E=!0,...L}=Es(t,e),R=b!==void 0||v===pd?_7(b||null,E,v):v,M=await p.detectOverflow(e,L),P=((r=s.autoPlacement)==null?void 0:r.index)||0,N=R[P];if(N==null)return{};let B=U0(N,i,await(p.isRTL==null?void 0:p.isRTL(h.floating)));if(l!==N)return{reset:{placement:R[0]}};let U=[M[ma(N)],M[B[0]],M[B[1]]],le=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:U}],$e=R[P+1];if($e)return{data:{index:P+1,overflows:le},reset:{placement:$e}};let Ht=le.map(pt=>{let S=Ho(pt.placement);return[pt.placement,S&&y?pt.overflows.slice(0,2).reduce((A,V)=>A+V,0):pt.overflows[0],pt.overflows]}).sort((pt,S)=>pt[1]-S[1]),Wr=((a=Ht.filter(pt=>pt[2].slice(0,Ho(pt[0])?2:3).every(S=>S<=0))[0])==null?void 0:a[0])||Ht[0][0];return Wr!==l?{data:{index:P+1,overflows:le},reset:{placement:Wr}}:{}}}},q0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:o,placement:a,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:p={fn:P=>{let{x:N,y:B}=P;return{x:N,y:B}}},...h}=Es(t,e),y={x:r,y:o},b=await i.detectOverflow(e,h),v=Ls(ma(a)),E=md(v),L=y[E],R=y[v];if(s){let P=E==="y"?"top":"left",N=E==="y"?"bottom":"right",B=L+b[P],U=L-b[N];L=hd(B,L,U)}if(l){let P=v==="y"?"top":"left",N=v==="y"?"bottom":"right",B=R+b[P],U=R-b[N];R=hd(B,R,U)}let M=p.fn({...e,[E]:L,[v]:R});return{...M,data:{x:M.x-r,y:M.y-o,enabled:{[E]:s,[v]:l}}}}}}});function ws(){return typeof window<"u"}function Rn(t){return X0(t)?(t.nodeName||"").toLowerCase():"#document"}function Vt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xr(t){var e;return(e=(X0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function X0(t){return ws()?t instanceof Node||t instanceof Vt(t).Node:!1}function hr(t){return ws()?t instanceof Element||t instanceof Vt(t).Element:!1}function Qr(t){return ws()?t instanceof HTMLElement||t instanceof Vt(t).HTMLElement:!1}function Y0(t){return!ws()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Vt(t).ShadowRoot}function ga(t){let{overflow:e,overflowX:r,overflowY:o,display:a}=mr(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+r)&&a!=="inline"&&a!=="contents"}function Q0(t){return/^(table|td|th)$/.test(Rn(t))}function bi(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}function ks(t){let e=hr(t)?mr(t):t;return An(e.transform)||An(e.translate)||An(e.scale)||An(e.rotate)||An(e.perspective)||!_s()&&(An(e.backdropFilter)||An(e.filter))||T7.test(e.willChange||"")||M7.test(e.contain||"")}function J0(t){let e=Co(t);for(;Qr(e)&&!wn(e);){if(ks(e))return e;if(bi(e))return null;e=Co(e)}return null}function _s(){return bd==null&&(bd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bd}function wn(t){return/^(html|body|#document)$/.test(Rn(t))}function mr(t){return Vt(t).getComputedStyle(t)}function vi(t){return hr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Co(t){if(Rn(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Y0(t)&&t.host||Xr(t);return Y0(e)?e.host:e}function e4(t){let e=Co(t);return wn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Qr(e)&&ga(e)?e:e4(e)}function Rs(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=e4(t),i=a===((o=t.ownerDocument)==null?void 0:o.body),s=Vt(a);if(i){let l=Ts(s);return e.concat(s,s.visualViewport||[],ga(a)?a:[],l&&r?Rs(l):[])}else return e.concat(a,Rs(a,[],r))}function Ts(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}var T7,M7,An,bd,t4=d(()=>{T7=/transform|translate|scale|rotate|perspective|filter/,M7=/paint|layout|strict|content/,An=t=>!!t&&t!=="none"});function a4(t){let e=mr(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,a=Qr(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:o,l=yi(r)!==i||yi(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function i4(t){return hr(t)?t:t.contextElement}function ya(t){let e=i4(t);if(!Qr(e))return Nr(1);let r=e.getBoundingClientRect(),{width:o,height:a,$:i}=a4(e),s=(i?yi(r.width):r.width)/o,l=(i?yi(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}function s4(t){let e=Vt(t);return!_s()||!e.visualViewport?N7:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function I7(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Vt(t)?!1:e}function xi(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=i4(t),s=Nr(1);e&&(o?hr(o)&&(s=ya(o)):s=ya(t));let l=I7(i,r,o)?s4(i):Nr(0),p=(a.left+l.x)/s.x,h=(a.top+l.y)/s.y,y=a.width/s.x,b=a.height/s.y;if(i){let v=Vt(i),E=o&&hr(o)?Vt(o):o,L=v,R=Ts(L);for(;R&&o&&E!==L;){let M=ya(R),P=R.getBoundingClientRect(),N=mr(R),B=P.left+(R.clientLeft+parseFloat(N.paddingLeft))*M.x,U=P.top+(R.clientTop+parseFloat(N.paddingTop))*M.y;p*=M.x,h*=M.y,y*=M.x,b*=M.y,p+=B,h+=U,L=Vt(R),R=Ts(L)}}return Ln({width:y,height:b,x:p,y:h})}function Ms(t,e){let r=vi(t).scrollLeft;return e?e.left+r:xi(Xr(t)).left+r}function l4(t,e){let r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-Ms(t,r),a=r.top+e.scrollTop;return{x:o,y:a}}function P7(t){let{elements:e,rect:r,offsetParent:o,strategy:a}=t,i=a==="fixed",s=Xr(o),l=e?bi(e.floating):!1;if(o===s||l&&i)return r;let p={scrollLeft:0,scrollTop:0},h=Nr(1),y=Nr(0),b=Qr(o);if((b||!b&&!i)&&((Rn(o)!=="body"||ga(s))&&(p=vi(o)),b)){let E=xi(o);h=ya(o),y.x=E.x+o.clientLeft,y.y=E.y+o.clientTop}let v=s&&!b&&!i?l4(s,p):Nr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-p.scrollLeft*h.x+y.x+v.x,y:r.y*h.y-p.scrollTop*h.y+y.y+v.y}}function z7(t){return Array.from(t.getClientRects())}function $7(t){let e=Xr(t),r=vi(t),o=t.ownerDocument.body,a=Uo(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=Uo(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+Ms(t),l=-r.scrollTop;return mr(o).direction==="rtl"&&(s+=Uo(e.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:l}}function D7(t,e){let r=Vt(t),o=Xr(t),a=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,p=0;if(a){i=a.width,s=a.height;let y=_s();(!y||y&&e==="fixed")&&(l=a.offsetLeft,p=a.offsetTop)}let h=Ms(o);if(h<=0){let y=o.ownerDocument,b=y.body,v=getComputedStyle(b),E=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,L=Math.abs(o.clientWidth-b.clientWidth-E);L<=r4&&(i-=L)}else h<=r4&&(i+=h);return{width:i,height:s,x:l,y:p}}function B7(t,e){let r=xi(t,!0,e==="fixed"),o=r.top+t.clientTop,a=r.left+t.clientLeft,i=Qr(t)?ya(t):Nr(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,p=a*i.x,h=o*i.y;return{width:s,height:l,x:p,y:h}}function o4(t,e,r){let o;if(e==="viewport")o=D7(t,r);else if(e==="document")o=$7(Xr(t));else if(hr(e))o=B7(e,r);else{let a=s4(t);o={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Ln(o)}function c4(t,e){let r=Co(t);return r===e||!hr(r)||wn(r)?!1:mr(r).position==="fixed"||c4(r,e)}function F7(t,e){let r=e.get(t);if(r)return r;let o=Rs(t,[],!1).filter(l=>hr(l)&&Rn(l)!=="body"),a=null,i=mr(t).position==="fixed",s=i?Co(t):t;for(;hr(s)&&!wn(s);){let l=mr(s),p=ks(s);!p&&l.position==="fixed"&&(a=null),(i?!p&&!a:!p&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||ga(s)&&!p&&c4(t,s))?o=o.filter(y=>y!==s):a=l,s=Co(s)}return e.set(t,o),o}function U7(t){let{element:e,boundary:r,rootBoundary:o,strategy:a}=t,s=[...r==="clippingAncestors"?bi(e)?[]:F7(e,this._c):[].concat(r),o],l=o4(e,s[0],a),p=l.top,h=l.right,y=l.bottom,b=l.left;for(let v=1;v<s.length;v++){let E=o4(e,s[v],a);p=Uo(E.top,p),h=gi(E.right,h),y=gi(E.bottom,y),b=Uo(E.left,b)}return{width:h-b,height:y-p,x:b,y:p}}function H7(t){let{width:e,height:r}=a4(t);return{width:e,height:r}}function G7(t,e,r){let o=Qr(e),a=Xr(e),i=r==="fixed",s=xi(t,!0,i,e),l={scrollLeft:0,scrollTop:0},p=Nr(0);function h(){p.x=Ms(a)}if(o||!o&&!i)if((Rn(e)!=="body"||ga(a))&&(l=vi(e)),o){let E=xi(e,!0,i,e);p.x=E.x+e.clientLeft,p.y=E.y+e.clientTop}else a&&h();i&&!o&&a&&h();let y=a&&!o&&!i?l4(a,l):Nr(0),b=s.left+l.scrollLeft-p.x-y.x,v=s.top+l.scrollTop-p.y-y.y;return{x:b,y:v,width:s.width,height:s.height}}function vd(t){return mr(t).position==="static"}function n4(t,e){if(!Qr(t)||mr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Xr(t)===r&&(r=r.ownerDocument.body),r}function d4(t,e){let r=Vt(t);if(bi(t))return r;if(!Qr(t)){let a=Co(t);for(;a&&!wn(a);){if(hr(a)&&!vd(a))return a;a=Co(a)}return r}let o=n4(t,e);for(;o&&Q0(o)&&vd(o);)o=n4(o,e);return o&&wn(o)&&vd(o)&&!ks(o)?r:o||J0(t)||r}function W7(t){return mr(t).direction==="rtl"}var N7,r4,V7,Ns,u4,f4,p4,h4=d(()=>{Z0();As();t4();N7=Nr(0);r4=25;V7=async function(t){let e=this.getOffsetParent||d4,r=this.getDimensions,o=await r(t.floating);return{reference:G7(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};Ns={convertOffsetParentRelativeRectToViewportRelativeRect:P7,getDocumentElement:Xr,getClippingRect:U7,getOffsetParent:d4,getElementRects:V7,getClientRects:z7,getDimensions:H7,getScale:ya,isElement:hr,isRTL:W7},u4=K0,f4=q0,p4=(t,e,r)=>{let o=new Map,a={platform:Ns,...r},i={...a.platform,_c:o};return j0(t,e,{...a,platform:i})}});function m4(t){return j7(t)}function xd(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function j7(t){for(let e=t;e;e=xd(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=xd(t);e;e=xd(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||e.tagName==="BODY"))return e}return null}var g4=d(()=>{});async function y4(t,e,r){let o;return typeof r=="object"?o=r:o={placement:r},p4(t,e,{strategy:o.strategy,platform:{...Ns,getOffsetParent:a=>Ns.getOffsetParent(a,m4)},middleware:[f4({crossAxis:!0}),u4({allowedPlacements:[o.placement]})]})}var b4=d(()=>{"use strict";h4();g4()});function K7(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,o,a;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(o=r;o--!==0;)if(!Is(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!Is(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[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 i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(t),r=a.length,r!==i(e).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[o]))return!1;for(o=r;o--!==0;){let s=a[o];if(!Is(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Is(t,e){try{return K7(t,e)}catch{return!1}}function Si(t,e){return!Is(t,e)}function v4(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Ps(t,e){let r=o=>o[t]===!0;return o=>{if(r(o))return o;let a=e(o);return a[t]=!0,a}}var kn=d(()=>{"use strict"});var x4,Sd,S4=d(()=>{"use strict";kn();x4=f(H(),1),Sd=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Si,attribute:!1,...e};(0,x4.property)(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[o],store:e.store})}}});var zs,Cd=d(()=>{"use strict";zs=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}}});function O4(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,C4.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return r();try{return JSON.parse(o)}catch{return r()}},toAttribute:o=>JSON.stringify(o)},hasChanged:Si,...e??{}})}var C4,E4=d(()=>{"use strict";C4=f(H(),1);kn()});var $s,L4=d(()=>{"use strict";$s=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,o)=>{this.resolvePromise=r,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let o=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of o)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}});var Ds,q7,PT,A4,R4=d(()=>{Ds=globalThis,q7=Ds.ShadowRoot&&(Ds.ShadyCSS===void 0||Ds.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,PT=Symbol(),A4=(t,e)=>{if(q7)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let o=document.createElement("style"),a=Ds.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=r.cssText,t.appendChild(o)}}});var w4,Bs,k4=d(()=>{"use strict";w4=f(w(),1);R4();Bs=class extends w4.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let r={...e.shadowRootOptions,customElements:e.registry},o=this.renderOptions.creationScope=this.attachShadow(r);return A4(o,e.elementStyles),o}}});function _4(t,e,...r){var o;let a=t.querySelector(e);for(let i of r)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var T4=d(()=>{"use strict"});var _n,va,P4,M4,N4,z4,I4,ba,Jr,$4=d(()=>{"use strict";_n=f(H(),1);E4();L4();k4();T4();va=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},M4=Symbol("constructorPrototype"),N4=Symbol("constructorName"),z4=Symbol("exportpartsDebouncer"),I4=Symbol("dynamicDependenciesLoaded"),ba=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ba.eventName="exportparts-updated";Jr=class extends Bs{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[P4]=new $s(5),this.scheduleExportpartsUpdate=()=>{var e,r,o;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(o=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&o!==void 0&&o)&&this[z4].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[N4]=this.constructor.name,this[M4]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[N4]&&Object.setPrototypeOf(this,this[M4])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let r=this.constructor;r[I4]||(r[I4]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ba.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ba.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 ba)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];r=_4(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,o,a;if(((o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(e){var r,o,a,i,s,l;let p=v=>v!=null&&v.trim().length>0,h=e.filter(p).map(v=>v.trim());if(h.length===0){this.exportparts=void 0;return}let y=new Set;for(let v of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let E=(i=(a=v.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],L=(l=(s=v.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(M=>M.split(":")[1]))!==null&&l!==void 0?l:[],R=[...E,...L].filter(p).map(M=>M.trim());for(let M of R)y.add(M)}if(y.size===0){this.exportparts=void 0;return}let b=[...y.values()].flatMap(v=>h.map(E=>`${v}:${E}--${v}`));this.exportparts=[...this.part,...b].join(", ")}};P4=z4;va([(0,_n.property)()],Jr.prototype,"exportpartsPrefix",void 0);va([O4([])],Jr.prototype,"exportpartsPrefixes",void 0);va([(0,_n.property)({reflect:!0})],Jr.prototype,"exportparts",void 0);va([(0,_n.property)()],Jr.prototype,"customStylesheet",void 0);va([(0,_n.property)()],Jr.prototype,"elementToFocus",void 0);va([(0,_n.state)()],Jr.prototype,"useAdoptedStyleSheets",void 0)});function Fs(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Us=d(()=>{"use strict"});var Ci,Go,Tn,Z7,D4,B4=d(()=>{"use strict";$4();Us();kn();Ci=Symbol("internalReduxEventsUnsubscribers"),Go=Symbol("internalStoresUnsubscribers"),Tn=Symbol("internalStores"),Z7=Ps(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Tn].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Tn].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Tn].get(s)}addStore(s,l){var p;l=(p=l??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(l),this[Tn].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Tn].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Tn].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let p=this.constructor.getPropertyOptions(l);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:l)){let h=this.getStore(s.store);h&&(s.store?this[Go].has(s.store):this[Go].size>0)&&(this[l]=s.selector(h.getState(),this))}})}subscribeToStore(s,l){var p;this[Go].set(s,l.subscribe(()=>this.updateFromStores())),this[Ci].set(s,[]),Fs(l)&&l.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((h,y)=>{if(typeof this[y]=="function"&&(!h.store||l.name===h.store)){let b=v=>this[y](v);l.addEventListener(h.eventName,b),this[Ci].get(s).push(()=>l.removeEventListener(h.eventName,b))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Go].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Go].has(s)&&this[Go].get(s)(),this[Go].delete(s),(l=this[Ci].get(s))===null||l===void 0||l.forEach(p=>p()),this[Ci].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Go,r=Tn,o=Ci,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),D4=class extends Z7(Jr){}});function gr(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Oo(t){return!!t&&!!t[Be]}function Ir(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===ov}(t)||Array.isArray(t)||!!t[j4]||!!(!((e=t.constructor)===null||e===void 0)&&e[j4])||Td(t)||Md(t))}function Mn(t,e,r){r===void 0&&(r=!1),Ca(t)===0?(r?Object.keys:Sa)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function Ca(t){var e=t[Be];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Td(t)?2:Md(t)?3:0}function xa(t,e){return Ca(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Y7(t,e){return Ca(t)===2?t.get(e):t[e]}function K4(t,e,r){var o=Ca(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function q4(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Td(t){return tv&&t instanceof Map}function Md(t){return rv&&t instanceof Set}function Vo(t){return t.o||t.t}function Nd(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=X4(t);delete e[Be];for(var r=Sa(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Id(t,e){return e===void 0&&(e=!1),Pd(t)||Oo(t)||!Ir(t)||(Ca(t)>1&&(t.set=t.add=t.clear=t.delete=X7),Object.freeze(t),e&&Mn(t,function(r,o){return Id(o,!0)},!0)),t}function X7(){gr(2)}function Pd(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function eo(t){var e=_d[t];return e||gr(18,t),e}function Q7(t,e){_d[t]||(_d[t]=e)}function Rd(){return Ei}function Od(t,e){e&&(eo("Patches"),t.u=[],t.s=[],t.v=e)}function Hs(t){wd(t),t.p.forEach(J7),t.p=null}function wd(t){t===Ei&&(Ei=t.l)}function F4(t){return Ei={p:[],l:Ei,h:t,m:!0,_:0}}function J7(t){var e=t[Be];e.i===0||e.i===1?e.j():e.g=!0}function Ed(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||eo("ES5").S(e,t,o),o?(r[Be].P&&(Hs(e),gr(4)),Ir(t)&&(t=Gs(e,t),e.l||Vs(e,t)),e.u&&eo("Patches").M(r[Be].t,t,e.u,e.s)):t=Gs(e,r,[]),Hs(e),e.u&&e.v(e.u,e.s),t!==Y4?t:void 0}function Gs(t,e,r){if(Pd(e))return e;var o=e[Be];if(!o)return Mn(e,function(l,p){return U4(t,o,e,l,p,r)},!0),e;if(o.A!==t)return e;if(!o.P)return Vs(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Nd(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Mn(i,function(l,p){return U4(t,o,a,l,p,r,s)}),Vs(t,a,!1),r&&t.u&&eo("Patches").N(o,r,t.u,t.s)}return o.o}function U4(t,e,r,o,a,i,s){if(Oo(a)){var l=Gs(t,a,i&&e&&e.i!==3&&!xa(e.R,o)?i.concat(o):void 0);if(K4(r,o,l),!Oo(l))return;t.m=!1}else s&&r.add(a);if(Ir(a)&&!Pd(a)){if(!t.h.D&&t._<1)return;Gs(t,a),e&&e.A.l||Vs(t,a)}}function Vs(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Id(e,r)}function Ld(t,e){var r=t[Be];return(r?Vo(r):t)[e]}function H4(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function Wo(t){t.P||(t.P=!0,t.l&&Wo(t.l))}function Ad(t){t.o||(t.o=Nd(t.t))}function kd(t,e,r){var o=Td(e)?eo("MapSet").F(e,r):Md(e)?eo("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Rd(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=l,h=Li;s&&(p=[l],h=Oi);var y=Proxy.revocable(p,h),b=y.revoke,v=y.proxy;return l.k=v,l.j=b,v}(e,r):eo("ES5").J(e,r);return(r?r.A:Rd()).p.push(o),o}function ev(t){return Oo(t)||gr(22,t),function e(r){if(!Ir(r))return r;var o,a=r[Be],i=Ca(r);if(a){if(!a.P&&(a.i<4||!eo("ES5").K(a)))return a.t;a.I=!0,o=G4(r,i),a.I=!1}else o=G4(r,i);return Mn(o,function(s,l){a&&Y7(a.t,s)===l||K4(o,s,e(l))}),i===3?new Set(o):o}(t)}function G4(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Nd(t)}function Z4(){function t(s,l){var p=i[s];return p?p.enumerable=l:i[s]=p={configurable:!0,enumerable:l,get:function(){var h=this[Be];return Li.get(h,s)},set:function(h){var y=this[Be];Li.set(y,s,h)}},p}function e(s){for(var l=s.length-1;l>=0;l--){var p=s[l][Be];if(!p.P)switch(p.i){case 5:o(p)&&Wo(p);break;case 4:r(p)&&Wo(p)}}}function r(s){for(var l=s.t,p=s.k,h=Sa(p),y=h.length-1;y>=0;y--){var b=h[y];if(b!==Be){var v=l[b];if(v===void 0&&!xa(l,b))return!0;var E=p[b],L=E&&E[Be];if(L?L.t!==v:!q4(E,v))return!0}}var R=!!l[Be];return h.length!==Sa(l).length+(R?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(l,l.length-1);if(p&&!p.get)return!0;for(var h=0;h<l.length;h++)if(!l.hasOwnProperty(h))return!0;return!1}function a(s){s.g&&gr(3,JSON.stringify(Vo(s)))}var i={};Q7("ES5",{J:function(s,l){var p=Array.isArray(s),h=function(b,v){if(b){for(var E=Array(v.length),L=0;L<v.length;L++)Object.defineProperty(E,""+L,t(L,!0));return E}var R=X4(v);delete R[Be];for(var M=Sa(R),P=0;P<M.length;P++){var N=M[P];R[N]=t(N,b||!!R[N].enumerable)}return Object.create(Object.getPrototypeOf(v),R)}(p,s),y={i:p?5:4,A:l?l.A:Rd(),P:!1,I:!1,R:{},l,t:s,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,Be,{value:y,writable:!0}),h},S:function(s,l,p){p?Oo(l)&&l[Be].A===s&&e(s.p):(s.u&&function h(y){if(y&&typeof y=="object"){var b=y[Be];if(b){var v=b.t,E=b.k,L=b.R,R=b.i;if(R===4)Mn(E,function(U){U!==Be&&(v[U]!==void 0||xa(v,U)?L[U]||h(E[U]):(L[U]=!0,Wo(b)))}),Mn(v,function(U){E[U]!==void 0||xa(E,U)||(L[U]=!1,Wo(b))});else if(R===5){if(o(b)&&(Wo(b),L.length=!0),E.length<v.length)for(var M=E.length;M<v.length;M++)L[M]=!1;else for(var P=v.length;P<E.length;P++)L[P]=!0;for(var N=Math.min(E.length,v.length),B=0;B<N;B++)E.hasOwnProperty(B)||(L[B]=!0),L[B]===void 0&&h(E[B])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var V4,Ei,zd,tv,rv,W4,Y4,j4,Be,ov,Sa,X4,_d,Li,Oi,nv,Jt,av,YT,XT,QT,JT,eM,tM,Ws,js=d(()=>{zd=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",tv=typeof Map<"u",rv=typeof Set<"u",W4=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Y4=zd?Symbol.for("immer-nothing"):((V4={})["immer-nothing"]=!0,V4),j4=zd?Symbol.for("immer-draftable"):"__$immer_draftable",Be=zd?Symbol.for("immer-state"):"__$immer_state",ov=""+Object.prototype.constructor,Sa=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,X4=Object.getOwnPropertyDescriptors||function(t){var e={};return Sa(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},_d={},Li={get:function(t,e){if(e===Be)return t;var r=Vo(t);if(!xa(r,e))return function(a,i,s){var l,p=H4(i,s);return p?"value"in p?p.value:(l=p.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!Ir(o)?o:o===Ld(t.t,e)?(Ad(t),t.o[e]=kd(t.A.h,o,t)):o},has:function(t,e){return e in Vo(t)},ownKeys:function(t){return Reflect.ownKeys(Vo(t))},set:function(t,e,r){var o=H4(Vo(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ld(Vo(t),e),i=a?.[Be];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(q4(r,a)&&(r!==void 0||xa(t.t,e)))return!0;Ad(t),Wo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ld(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ad(t),Wo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Vo(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){gr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){gr(12)}},Oi={};Mn(Li,function(t,e){Oi[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Oi.deleteProperty=function(t,e){return Oi.set.call(this,t,e,void 0)},Oi.set=function(t,e,r){return Li.set.call(this,t[0],e,r,t[0])};nv=function(){function t(r){var o=this;this.O=W4,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var p=o;return function(R){var M=this;R===void 0&&(R=l);for(var P=arguments.length,N=Array(P>1?P-1:0),B=1;B<P;B++)N[B-1]=arguments[B];return p.produce(R,function(U){var le;return(le=i).call.apply(le,[M,U].concat(N))})}}var h;if(typeof i!="function"&&gr(6),s!==void 0&&typeof s!="function"&&gr(7),Ir(a)){var y=F4(o),b=kd(o,a,void 0),v=!0;try{h=i(b),v=!1}finally{v?Hs(y):wd(y)}return typeof Promise<"u"&&h instanceof Promise?h.then(function(R){return Od(y,s),Ed(R,y)},function(R){throw Hs(y),R}):(Od(y,s),Ed(h,y))}if(!a||typeof a!="object"){if((h=i(a))===void 0&&(h=a),h===Y4&&(h=void 0),o.D&&Id(h,!0),s){var E=[],L=[];eo("Patches").M(a,h,E,L),s(E,L)}return h}gr(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(h){for(var y=arguments.length,b=Array(y>1?y-1:0),v=1;v<y;v++)b[v-1]=arguments[v];return o.produceWithPatches(h,function(E){return a.apply(void 0,[E].concat(b))})};var s,l,p=o.produce(a,i,function(h,y){s=h,l=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(h){return[h,s,l]}):[p,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ir(r)||gr(8),Oo(r)&&(r=ev(r));var o=F4(this),a=kd(this,r,void 0);return a[Be].C=!0,wd(o),a},e.finishDraft=function(r,o){var a=r&&r[Be],i=a.A;return Od(i,o),Ed(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!W4&&gr(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=eo("Patches").$;return Oo(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),Jt=new nv,av=Jt.produce,YT=Jt.produceWithPatches.bind(Jt),XT=Jt.setAutoFreeze.bind(Jt),QT=Jt.setUseProxies.bind(Jt),JT=Jt.applyPatches.bind(Jt),eM=Jt.createDraft.bind(Jt),tM=Jt.finishDraft.bind(Jt),Ws=av});function Nn(t){"@babel/helpers - typeof";return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(t)}var $d=d(()=>{});function Q4(t,e){if(Nn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Nn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var J4=d(()=>{$d()});function eh(t){var e=Q4(t,"string");return Nn(e)=="symbol"?e:e+""}var th=d(()=>{$d();J4()});function rh(t,e,r){return(e=eh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var oh=d(()=>{th()});function nh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Dd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nh(Object(r),!0).forEach(function(o){rh(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}var ah=d(()=>{oh()});function Rt(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. "}function iv(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Fd(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Rt(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Rt(1));return r(Fd)(t,e)}if(typeof t!="function")throw new Error(Rt(2));var a=t,i=e,s=[],l=s,p=!1;function h(){l===s&&(l=s.slice())}function y(){if(p)throw new Error(Rt(3));return i}function b(R){if(typeof R!="function")throw new Error(Rt(4));if(p)throw new Error(Rt(5));var M=!0;return h(),l.push(R),function(){if(M){if(p)throw new Error(Rt(6));M=!1,h();var N=l.indexOf(R);l.splice(N,1),s=null}}}function v(R){if(!iv(R))throw new Error(Rt(7));if(typeof R.type>"u")throw new Error(Rt(8));if(p)throw new Error(Rt(9));try{p=!0,i=a(i,R)}finally{p=!1}for(var M=s=l,P=0;P<M.length;P++){var N=M[P];N()}return R}function E(R){if(typeof R!="function")throw new Error(Rt(10));a=R,v({type:Ks.REPLACE})}function L(){var R,M=b;return R={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Rt(11));function B(){N.next&&N.next(y())}B();var U=M(B);return{unsubscribe:U}}},R[ih]=function(){return this},R}return v({type:Ks.INIT}),o={dispatch:v,subscribe:b,getState:y,replaceReducer:E},o[ih]=L,o}function sv(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Ks.INIT});if(typeof o>"u")throw new Error(Rt(12));if(typeof r(void 0,{type:Ks.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Rt(13))})}function sh(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{sv(r)}catch(p){l=p}return function(h,y){if(h===void 0&&(h={}),l)throw l;if(0)var b;for(var v=!1,E={},L=0;L<i.length;L++){var R=i[L],M=r[R],P=h[R],N=M(P,y);if(typeof N>"u"){var B=y&&y.type;throw new Error(Rt(14))}E[R]=N,v=v||N!==P}return v=v||i.length!==Object.keys(h).length,v?E:h}}function Oa(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function lh(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(Rt(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(p){return p(s)});return i=Oa.apply(void 0,l)(a.dispatch),Dd(Dd({},a),{},{dispatch:i})}}}var ih,Bd,Ks,qs=d(()=>{ah();ih=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Bd=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ks={INIT:"@@redux/INIT"+Bd(),REPLACE:"@@redux/REPLACE"+Bd(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Bd()}}});function ch(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var dh,Ud,uh=d(()=>{dh=ch();dh.withExtraArgument=ch;Ud=dh});function gv(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Wd(t){return Ir(t)?Ws(t,function(){}):t}function vv(t){return typeof t=="boolean"}function xv(){return function(e){return Sv(e)}}function Sv(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,l=new yv;if(r&&(vv(r)?l.push(Ud):l.push(Ud.withExtraArgument(r.extraArgument))),0){if(a)var p;if(s)var h}return l}function yh(t){var e=xv(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,l=r.devTools,p=l===void 0?!0:l,h=r.preloadedState,y=h===void 0?void 0:h,b=r.enhancers,v=b===void 0?void 0:b,E;if(typeof a=="function")E=a;else if(gv(a))E=sh(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var L=s;if(typeof L=="function"&&(L=L(e),!Gd&&!Array.isArray(L)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gd&&L.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=lh.apply(void 0,L),M=Oa;p&&(M=mv(jo({trace:!Gd},typeof p=="object"&&p)));var P=new bv(R),N=P;Array.isArray(v)?N=Ea([R],v):typeof v=="function"&&(N=v(P));var B=M.apply(void 0,N);return Fd(E,y,B)}function Ko(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return jo(jo({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function bh(t){var e={},r=[],o,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function Cv(t){return typeof t=="function"}function Ov(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?bh(e):[e,r,o],i=a[0],s=a[1],l=a[2],p;if(Cv(t))p=function(){return Wd(t())};else{var h=Wd(t);p=function(){return h}}function y(b,v){b===void 0&&(b=p());var E=Ea([i[v.type]],s.filter(function(L){var R=L.matcher;return R(v)}).map(function(L){var R=L.reducer;return R}));return E.filter(function(L){return!!L}).length===0&&(E=[l]),E.reduce(function(L,R){if(R)if(Oo(L)){var M=L,P=R(M,v);return P===void 0?L:P}else{if(Ir(L))return Ws(L,function(N){return R(N,v)});var P=R(L,v);if(P===void 0){if(L===null)return L;throw Error("A case reducer on a non-draftable value must not return undefined")}return P}return L},b)}return y.getInitialState=p,y}function Ev(t,e){return t+"/"+e}function vh(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Wd(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},l={};a.forEach(function(y){var b=o[y],v=Ev(e,y),E,L;"reducer"in b?(E=b.reducer,L=b.prepare):E=b,i[y]=E,s[v]=E,l[y]=L?Ko(v,L):Ko(v)});function p(){var y=typeof t.extraReducers=="function"?bh(t.extraReducers):[t.extraReducers],b=y[0],v=b===void 0?{}:b,E=y[1],L=E===void 0?[]:E,R=y[2],M=R===void 0?void 0:R,P=jo(jo({},v),s);return Ov(r,function(N){for(var B in P)N.addCase(B,P[B]);for(var U=0,le=L;U<le.length;U++){var $e=le[U];N.addMatcher($e.matcher,$e.reducer)}M&&N.addDefaultCase(M)})}var h;return{name:e,reducer:function(y,b){return h||(h=p()),h(y,b)},actions:l,caseReducers:i,getInitialState:function(){return h||(h=p()),h.getInitialState()}}}function kv(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function _v(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var gh,lv,Ea,cv,dv,uv,fh,fv,pv,ph,jo,Hd,hv,mv,vM,yv,bv,Gd,Lv,Av,Rv,Vd,hh,wv,OM,xh,Sh,Ch,EM,LM,AM,RM,jd,wM,kM,_M,mh,TM,Tv,MM,Oh=d(()=>{js();qs();qs();qs();uh();js();js();gh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),lv=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(h){return function(y){return p([h,y])}}function p(h){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=h[0]&2?a.return:h[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,h[1])).done)return i;switch(a=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,a=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){r.label=h[1];break}if(h[0]===6&&r.label<i[1]){r.label=i[1],i=h;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(h);break}i[2]&&r.ops.pop(),r.trys.pop();continue}h=e.call(t,r)}catch(y){h=[6,y],a=0}finally{o=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},Ea=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},cv=Object.defineProperty,dv=Object.defineProperties,uv=Object.getOwnPropertyDescriptors,fh=Object.getOwnPropertySymbols,fv=Object.prototype.hasOwnProperty,pv=Object.prototype.propertyIsEnumerable,ph=function(t,e,r){return e in t?cv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},jo=function(t,e){for(var r in e||(e={}))fv.call(e,r)&&ph(t,r,e[r]);if(fh)for(var o=0,a=fh(e);o<a.length;o++){var r=a[o];pv.call(e,r)&&ph(t,r,e[r])}return t},Hd=function(t,e){return dv(t,uv(e))},hv=function(t,e,r){return new Promise(function(o,a){var i=function(p){try{l(r.next(p))}catch(h){a(h)}},s=function(p){try{l(r.throw(p))}catch(h){a(h)}},l=function(p){return p.done?o(p.value):Promise.resolve(p.value).then(i,s)};l((r=r.apply(t,e)).next())})},mv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Oa:Oa.apply(null,arguments)},vM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};yv=function(t){gh(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ea([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ea([void 0],r.concat(this))))},e}(Array),bv=function(t){gh(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ea([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ea([void 0],r.concat(this))))},e}(Array);Gd=!0;Lv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Av=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Lv[Math.random()*64|0];return e},Rv=["name","message","stack","code"],Vd=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),hh=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),wv=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Rv;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},OM=function(){function t(e,r,o){var a=Ko(e+"/fulfilled",function(y,b,v,E){return{payload:y,meta:Hd(jo({},E||{}),{arg:v,requestId:b,requestStatus:"fulfilled"})}}),i=Ko(e+"/pending",function(y,b,v){return{payload:void 0,meta:Hd(jo({},v||{}),{arg:b,requestId:y,requestStatus:"pending"})}}),s=Ko(e+"/rejected",function(y,b,v,E,L){return{payload:E,error:(o&&o.serializeError||wv)(y||"Rejected"),meta:Hd(jo({},L||{}),{arg:v,requestId:b,rejectedWithValue:!!E,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),l=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function h(y){return function(b,v,E){var L=o?.idGenerator?o.idGenerator(y):Av(),R=new p,M,P=!1;function N(U){M=U,R.abort()}var B=function(){return hv(this,null,function(){var U,le,$e,Ht,ft,Wr,pt;return lv(this,function(S){switch(S.label){case 0:return S.trys.push([0,4,,5]),Ht=(U=o?.condition)==null?void 0:U.call(o,y,{getState:v,extra:E}),_v(Ht)?[4,Ht]:[3,2];case 1:Ht=S.sent(),S.label=2;case 2:if(Ht===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return P=!0,ft=new Promise(function(A,V){return R.signal.addEventListener("abort",function(){return V({name:"AbortError",message:M||"Aborted"})})}),b(i(L,y,(le=o?.getPendingMeta)==null?void 0:le.call(o,{requestId:L,arg:y},{getState:v,extra:E}))),[4,Promise.race([ft,Promise.resolve(r(y,{dispatch:b,getState:v,extra:E,requestId:L,signal:R.signal,abort:N,rejectWithValue:function(A,V){return new Vd(A,V)},fulfillWithValue:function(A,V){return new hh(A,V)}})).then(function(A){if(A instanceof Vd)throw A;return A instanceof hh?a(A.payload,L,y,A.meta):a(A,L,y)})])];case 3:return $e=S.sent(),[3,5];case 4:return Wr=S.sent(),$e=Wr instanceof Vd?s(null,L,y,Wr.payload,Wr.meta):s(Wr,L,y),[3,5];case 5:return pt=o&&!o.dispatchConditionRejection&&s.match($e)&&$e.meta.condition,pt||b($e),[2,$e]}})})}();return Object.assign(B,{abort:N,requestId:L,arg:y,unwrap:function(){return B.then(kv)}})}}return Object.assign(h,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();xh="listener",Sh="completed",Ch="cancelled",EM="task-"+Ch,LM="task-"+Sh,AM=xh+"-"+Ch,RM=xh+"-"+Sh,jd="listenerMiddleware",wM=Ko(jd+"/add"),kM=Ko(jd+"/removeAll"),_M=Ko(jd+"/remove"),TM=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(mh||(mh=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Tv=function(t){return function(e){setTimeout(e,t)}},MM=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Tv(10);Z4()});var Mv,Zs,Eh=d(()=>{"use strict";kn();Mv=Ps(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,o,a){this.eventBus.addEventListener(r,o,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,o,a){this.eventBus.removeEventListener(r,o,a)}}}),Zs=class extends Mv(Object){}});var Lh,Ah=d(()=>{"use strict";Oh();Us();Cd();Eh();kn();window.ftReduxStores||(window.ftReduxStores={});Lh=class t extends Zs{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(Fs(i))return i;if(a==null)return;let s=vh({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=yh({reducer:(p,h)=>{if(h.type==="CLEAR_FT_REDUX_STORE"){let y=v4(s.getInitialState());for(let b of h.keeping)y[b]=(p??y)[b];return y}else if(typeof h.type=="string"&&h.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...p,...h.overwrites};return s.reducer(p,h)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new zs;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let p=s,h=i[p];return h?(...y)=>{let b=h(...y.map(a));return this.reduxStore.dispatch(b),b}:y=>{this.setState({[p]:a(y)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}});var Rh=d(()=>{"use strict";kn()});var wh=d(()=>{"use strict"});var kh=d(()=>{"use strict";S4();Cd();B4();Ah();Us();Rh();wh()});var Ys,_h=d(()=>{"use strict";Ys=class{static format(e,r,o,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a)):this.getIntlDateTime(e,r,o,a)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a){let i=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(i);if(!a)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(i);return`${s} ${l}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var Xs,Nv,In,Iv,z,wt=d(()=>{"use strict";Xs=f(C()),Nv="ft-app-info",In=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};In.eventName="authentication-change";Iv={session:(t,e)=>{(0,Xs.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>z.dispatchEvent(new In(e.payload)),0))}},z=Xs.FtReduxStore.get({name:Nv,reducers:Iv,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}})});var Kd,Th,Qs,iN,Mh=d(()=>{"use strict";Kd=f(H());kh();_h();wt();Th=f(C()),Qs=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},iN=(0,Th.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Ys.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Qs([(0,Kd.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Qs([(0,Kd.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Qs([Sd({store:z.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Qs([Sd({store:z.name})],e.prototype,"uiLocale",void 0),e})});var Ih=bn((qo,Nh)=>{var Js=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,el=function(){function t(){this.fetch=!1,this.DOMException=Js.DOMException}return t.prototype=Js,new t}();(function(t){var e=function(r){var o=typeof t<"u"&&t||typeof self<"u"&&self||typeof global<"u"&&global||{},a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function i(S){return S&&DataView.prototype.isPrototypeOf(S)}if(a.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(S){return S&&s.indexOf(Object.prototype.toString.call(S))>-1};function p(S){if(typeof S!="string"&&(S=String(S)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(S)||S==="")throw new TypeError('Invalid character in header field name: "'+S+'"');return S.toLowerCase()}function h(S){return typeof S!="string"&&(S=String(S)),S}function y(S){var A={next:function(){var V=S.shift();return{done:V===void 0,value:V}}};return a.iterable&&(A[Symbol.iterator]=function(){return A}),A}function b(S){this.map={},S instanceof b?S.forEach(function(A,V){this.append(V,A)},this):Array.isArray(S)?S.forEach(function(A){if(A.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+A.length);this.append(A[0],A[1])},this):S&&Object.getOwnPropertyNames(S).forEach(function(A){this.append(A,S[A])},this)}b.prototype.append=function(S,A){S=p(S),A=h(A);var V=this.map[S];this.map[S]=V?V+", "+A:A},b.prototype.delete=function(S){delete this.map[p(S)]},b.prototype.get=function(S){return S=p(S),this.has(S)?this.map[S]:null},b.prototype.has=function(S){return this.map.hasOwnProperty(p(S))},b.prototype.set=function(S,A){this.map[p(S)]=h(A)},b.prototype.forEach=function(S,A){for(var V in this.map)this.map.hasOwnProperty(V)&&S.call(A,this.map[V],V,this)},b.prototype.keys=function(){var S=[];return this.forEach(function(A,V){S.push(V)}),y(S)},b.prototype.values=function(){var S=[];return this.forEach(function(A){S.push(A)}),y(S)},b.prototype.entries=function(){var S=[];return this.forEach(function(A,V){S.push([V,A])}),y(S)},a.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function v(S){if(!S._noBody){if(S.bodyUsed)return Promise.reject(new TypeError("Already read"));S.bodyUsed=!0}}function E(S){return new Promise(function(A,V){S.onload=function(){A(S.result)},S.onerror=function(){V(S.error)}})}function L(S){var A=new FileReader,V=E(A);return A.readAsArrayBuffer(S),V}function R(S){var A=new FileReader,V=E(A),Ce=/charset=([A-Za-z0-9_-]+)/.exec(S.type),Fe=Ce?Ce[1]:"utf-8";return A.readAsText(S,Fe),V}function M(S){for(var A=new Uint8Array(S),V=new Array(A.length),Ce=0;Ce<A.length;Ce++)V[Ce]=String.fromCharCode(A[Ce]);return V.join("")}function P(S){if(S.slice)return S.slice(0);var A=new Uint8Array(S.byteLength);return A.set(new Uint8Array(S)),A.buffer}function N(){return this.bodyUsed=!1,this._initBody=function(S){this.bodyUsed=this.bodyUsed,this._bodyInit=S,S?typeof S=="string"?this._bodyText=S:a.blob&&Blob.prototype.isPrototypeOf(S)?this._bodyBlob=S:a.formData&&FormData.prototype.isPrototypeOf(S)?this._bodyFormData=S:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)?this._bodyText=S.toString():a.arrayBuffer&&a.blob&&i(S)?(this._bodyArrayBuffer=P(S.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(S)||l(S))?this._bodyArrayBuffer=P(S):this._bodyText=S=Object.prototype.toString.call(S):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof S=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var S=v(this);if(S)return S;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var S=v(this);return S||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(a.blob)return this.blob().then(L);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var S=v(this);if(S)return S;if(this._bodyBlob)return R(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then($e)}),this.json=function(){return this.text().then(JSON.parse)},this}var B=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function U(S){var A=S.toUpperCase();return B.indexOf(A)>-1?A:S}function le(S,A){if(!(this instanceof le))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');A=A||{};var V=A.body;if(S instanceof le){if(S.bodyUsed)throw new TypeError("Already read");this.url=S.url,this.credentials=S.credentials,A.headers||(this.headers=new b(S.headers)),this.method=S.method,this.mode=S.mode,this.signal=S.signal,!V&&S._bodyInit!=null&&(V=S._bodyInit,S.bodyUsed=!0)}else this.url=String(S);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new b(A.headers)),this.method=U(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal||function(){if("AbortController"in o){var ce=new AbortController;return ce.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(V),(this.method==="GET"||this.method==="HEAD")&&(A.cache==="no-store"||A.cache==="no-cache")){var Ce=/([?&])_=[^&]*/;if(Ce.test(this.url))this.url=this.url.replace(Ce,"$1_="+new Date().getTime());else{var Fe=/\?/;this.url+=(Fe.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}le.prototype.clone=function(){return new le(this,{body:this._bodyInit})};function $e(S){var A=new FormData;return S.trim().split("&").forEach(function(V){if(V){var Ce=V.split("="),Fe=Ce.shift().replace(/\+/g," "),ce=Ce.join("=").replace(/\+/g," ");A.append(decodeURIComponent(Fe),decodeURIComponent(ce))}}),A}function Ht(S){var A=new b,V=S.replace(/\r?\n[\t ]+/g," ");return V.split("\r").map(function(Ce){return Ce.indexOf(`
534
- `)===0?Ce.substr(1,Ce.length):Ce}).forEach(function(Ce){var Fe=Ce.split(":"),ce=Fe.shift().trim();if(ce){var vs=Fe.join(":").trim();try{A.append(ce,vs)}catch(Uc){console.warn("Response "+Uc.message)}}}),A}N.call(le.prototype);function ft(S,A){if(!(this instanceof ft))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=A.statusText===void 0?"":""+A.statusText,this.headers=new b(A.headers),this.url=A.url||"",this._initBody(S)}N.call(ft.prototype),ft.prototype.clone=function(){return new ft(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},ft.error=function(){var S=new ft(null,{status:200,statusText:""});return S.ok=!1,S.status=0,S.type="error",S};var Wr=[301,302,303,307,308];ft.redirect=function(S,A){if(Wr.indexOf(A)===-1)throw new RangeError("Invalid status code");return new ft(null,{status:A,headers:{location:S}})},r.DOMException=o.DOMException;try{new r.DOMException}catch{r.DOMException=function(A,V){this.message=A,this.name=V;var Ce=Error(A);this.stack=Ce.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function pt(S,A){return new Promise(function(V,Ce){var Fe=new le(S,A);if(Fe.signal&&Fe.signal.aborted)return Ce(new r.DOMException("Aborted","AbortError"));var ce=new XMLHttpRequest;function vs(){ce.abort()}ce.onload=function(){var ht={statusText:ce.statusText,headers:Ht(ce.getAllResponseHeaders()||"")};Fe.url.indexOf("file://")===0&&(ce.status<200||ce.status>599)?ht.status=200:ht.status=ce.status,ht.url="responseURL"in ce?ce.responseURL:ht.headers.get("X-Request-URL");var yn="response"in ce?ce.response:ce.responseText;setTimeout(function(){V(new ft(yn,ht))},0)},ce.onerror=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},ce.ontimeout=function(){setTimeout(function(){Ce(new TypeError("Network request timed out"))},0)},ce.onabort=function(){setTimeout(function(){Ce(new r.DOMException("Aborted","AbortError"))},0)};function Uc(ht){try{return ht===""&&o.location.href?o.location.href:ht}catch{return ht}}if(ce.open(Fe.method,Uc(Fe.url),!0),Fe.credentials==="include"?ce.withCredentials=!0:Fe.credentials==="omit"&&(ce.withCredentials=!1),"responseType"in ce&&(a.blob?ce.responseType="blob":a.arrayBuffer&&(ce.responseType="arraybuffer")),A&&typeof A.headers=="object"&&!(A.headers instanceof b||o.Headers&&A.headers instanceof o.Headers)){var $p=[];Object.getOwnPropertyNames(A.headers).forEach(function(ht){$p.push(p(ht)),ce.setRequestHeader(ht,h(A.headers[ht]))}),Fe.headers.forEach(function(ht,yn){$p.indexOf(yn)===-1&&ce.setRequestHeader(yn,ht)})}else Fe.headers.forEach(function(ht,yn){ce.setRequestHeader(yn,ht)});Fe.signal&&(Fe.signal.addEventListener("abort",vs),ce.onreadystatechange=function(){ce.readyState===4&&Fe.signal.removeEventListener("abort",vs)}),ce.send(typeof Fe._bodyInit>"u"?null:Fe._bodyInit)})}return pt.polyfill=!0,o.fetch||(o.fetch=pt,o.Headers=b,o.Request=le,o.Response=ft),r.Headers=b,r.Request=le,r.Response=ft,r.fetch=pt,r}({})})(el);el.fetch.ponyfill=!0;delete el.fetch.polyfill;var La=Js.fetch?Js:el;qo=La.fetch;qo.default=La.fetch;qo.fetch=La.fetch;qo.Headers=La.Headers;qo.Request=La.Request;qo.Response=La.Response;Nh.exports=qo});var qd=d(()=>{});var Ph,zh,$h,Zo,Dh,Bh,Pn,Fh,Uh,Hh,Gh,Vh,Wh,jh,tl,Kh,qh,Aa,Zh,rl,Yh,Xh,to,Ra,Qh,Ke,yr,Jh,Zd=d(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ph||(Ph={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(zh||(zh={}));(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"})($h||($h={}));(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"})(Zo||(Zo={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Dh||(Dh={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Bh||(Bh={}));(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"})(Pn||(Pn={}));(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"})(Fh||(Fh={}));(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"})(Uh||(Uh={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Hh||(Hh={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Gh||(Gh={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Vh||(Vh={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Wh||(Wh={}));(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"})(jh||(jh={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(tl||(tl={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(Kh||(Kh={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(qh||(qh={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Aa||(Aa={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Zh||(Zh={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(rl||(rl={}));(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"})(Yh||(Yh={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Xh||(Xh={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(to||(to={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ra||(Ra={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Qh||(Qh={}));(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"})(Ke||(Ke={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(yr||(yr={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Jh||(Jh={}))});var e3,t3,r3,o3,n3,a3,i3,s3,l3=d(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(e3||(e3={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(t3||(t3={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(r3||(r3={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(o3||(o3={}));(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(n3||(n3={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(a3||(a3={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(i3||(i3={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(s3||(s3={}))});var c3=d(()=>{Zd();l3()});function d3(t,e){return t===e||(Pv[t]??[]).some(r=>d3(r,e))}function u3(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>d3(o,e))}var Pv,f3=d(()=>{Zd();Pv={[Ke.PERSONAL_BOOK_SHARE_USER]:[Ke.PERSONAL_BOOK_USER],[Ke.HTML_EXPORT_USER]:[Ke.PERSONAL_BOOK_USER],[Ke.PDF_EXPORT_USER]:[Ke.PERSONAL_BOOK_USER],[Ke.KHUB_ADMIN]:[Ke.CONTENT_PUBLISHER],[Ke.ADMIN]:[Ke.KHUB_ADMIN,Ke.USERS_ADMIN,Ke.PORTAL_ADMIN,Ke.BEHAVIOR_DATA_USER],[Ke.GENERATIVE_AI_EXPORT_USER]:[Ke.GENERATIVE_AI_USER]}});var p3=d(()=>{});var zv,zn=d(()=>{zv=f(Ih(),1);qd();c3();f3();p3();qd()});var $n,Yd=d(()=>{"use strict";wt();$n=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=z.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=z.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}}});var ol,h3=d(()=>{"use strict";Yd();ol=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:$n.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$n.await()}}});var Xd,kt,Yo=d(()=>{"use strict";Xd=f(C());h3();kt=class extends ol{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[p])=>l.localeCompare(p)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Xd.CacheRegistry,this.cache=e?a.commonCache:new Xd.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}}});var nl,Qd=d(()=>{"use strict";wt();zn();Yo();nl=class extends kt{async listMySearches(){let{session:e}=z.getState();return u3(e,Ke.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}}});var al,Jd=d(()=>{"use strict";wt();Yo();al=class extends kt{async listMyBookmarks(){let e=z.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}}});var il,m3=d(()=>{"use strict";wt();Yo();il=class extends kt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=z.getState().session;return!!e?.sessionAuthenticated}}});var sl,g3=d(()=>{"use strict";Yo();wt();sl=class extends kt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=z.getState().session;return!!e?.sessionAuthenticated}}});var ll,$v,Dv,v3,eu,tu,y3,b3,er,ru,ou,cl=d(()=>{"use strict";zn();ll=f(C());Qd();Jd();wt();m3();g3();$v="ft-user-assets",Dv={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(yr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;tu(t,r,[...eu(t,r),a]),y3(t,r,1,o),b3(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;tu(t,r,eu(t,r).map(a=>a.id===o.id?o:a)),b3(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;tu(t,r,eu(t,r).filter(i=>i.id!==a)),y3(t,r,-1,o)}},v3={[yr.SEARCHES]:"savedSearches",[yr.BOOKMARKS]:"bookmarks",[yr.BOOKS]:void 0,[yr.COLLECTIONS]:void 0},eu=(t,e)=>{var r;let o=v3[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},tu=(t,e,r)=>{let o=v3[e];o&&(t[o]=r)},y3=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===yr.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},b3=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},er=ll.FtReduxStore.get({name:$v,reducers:Dv,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(yr).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ru=class{constructor(e=new il,r=new sl){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new al,this.savedSearchesService=new nl,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=z.getState();(0,ll.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(),er.actions.clearAssetCount(),er.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),er.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),er.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();er.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();er.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&er.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&er.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(er.getState().assetCounts.bookmarkByMap).length!==0;e===yr.BOOKMARKS&&r&&er.actions.clearBookmarkCountByMap(),er.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;er.actions.bookmarks(r)}}},ou=new ru;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ou)});var x3=d(()=>{"use strict";zn();cl()});var nu,S3=d(()=>{"use strict";wt();nu=class{addCommand(e,r=!1){z.commands.add(e,r)}consumeCommand(e){return z.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new nu});var br,C3,wa,Bv,dl,ka,ul,O3=d(()=>{"use strict";wt();br=f(C());Yo();wa=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Bv=Symbol("clearAfterUnitTest"),dl=class extends(0,br.withEventBus)(kt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[C3]=()=>{this.defaultMessages={},this.cache=new br.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=z.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};(0,br.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new br.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof br.CanceledPromiseError)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new wa({loadedContexts:e})),this.dispatchEvent(new wa({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new wa({loadedContexts:[e]})),this.dispatchEvent(new wa({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,br.delay)(0).then(()=>o()).catch(()=>null)))}};C3=Bv;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends dl{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends dl{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});ka=window.FluidTopicsI18nService,ul=window.FluidTopicsCustomI18nService});var E3,au,L3=d(()=>{"use strict";E3=f(C()),au=class{highlightHtml(e,r,o){(0,E3.highlightHtml)(e,r,o)}};window.FluidTopicsHighlightHtmlService=new au});var A3,iu,R3=d(()=>{"use strict";A3=f(C());wt();iu=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i;if(e==null)return"";try{return A3.DateFormatter.format(e,(o=r?.locale)!==null&&o!==void 0?o:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new iu});var w3,Eo,su=d(()=>{"use strict";w3=f(C());wt();Eo=class{static get(e,r){var o,a;let i=z.getState(),{lang:s,region:l}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new w3.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}}});var fl,k3=d(()=>{"use strict";Yo();fl=class extends kt{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,a])=>Array.isArray(a)?[o,a.map(i=>typeof i=="object"&&i!=null&&!Array.isArray(i)?this.sortEventArrays(i):i).sort((i,s)=>typeof i=="object"&&i!==null&&"key"in i?i.key.localeCompare(s.key):typeof i=="string"&&typeof s=="string"?i.localeCompare(s):String(i).localeCompare(String(s)))]:typeof a=="object"&&a!==null?[o,this.sortEventArrays(a)]:[o,a]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(a=>(console.info(r),console.debug(a),o)),1e3)}}});var lu,_3=d(()=>{"use strict";su();lu=class{urlToSearchRequest(e){return Eo.get().parse(e)}searchRequestToUrl(e){return Eo.get().serialize(e)}};window.FluidTopicsUrlService=new lu});var Dn,T3=d(()=>{"use strict";Dn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Dn.eventName="change"});var cu,M3,N3=d(()=>{"use strict";cu=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))}},M3=new cu});var Xo,pl,I3=d(()=>{"use strict";Xo=f(C());T3();N3();pl=class t extends Xo.WithEventBus{static build(){return new t(window.history,M3,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Xo.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Dn(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,l])=>{let p=r(),h={...p===this.currentIndex?this.currentState:void 0,...i,index:p,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(a,[h,s,l]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Dn.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Dn.eventName,e)}currentItem(){return(0,Xo.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,Xo.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,Xo.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 o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}}});var P3=d(()=>{"use strict";I3();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=pl.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)})});var z3=d(()=>{"use strict";wt()});var du=d(()=>{"use strict";Jd();Yd();S3();O3();Yo();L3();Qd();R3();su();k3();_3();P3();z3()});var $3,D3,uu=d(()=>{"use strict";$3=f(w()),D3=$3.css`
533
+ `});function hd(t,e,r){return Uo(t,gi(e,r))}function Es(t,e){return typeof t=="function"?t(e):t}function ma(t){return t.split("-")[0]}function Ho(t){return t.split("-")[1]}function md(t){return t==="x"?"y":"x"}function gd(t){return t==="y"?"height":"width"}function Ls(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function yd(t){return md(Ls(t))}function U0(t,e,r){r===void 0&&(r=!1);let o=Ho(t),a=yd(t),i=gd(a),s=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=fd(s)),[s,fd(s)]}function H0(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function fd(t){let e=ma(t);return R7[e]+t.slice(e.length)}function w7(t){return{top:0,right:0,bottom:0,left:0,...t}}function G0(t){return typeof t!="number"?w7(t):{top:t,right:t,bottom:t,left:t}}function Ln(t){let{x:e,y:r,width:o,height:a}=t;return{width:o,height:a,top:r,left:e,right:e+o,bottom:r+a,x:e,y:r}}var F0,B0,pd,gi,Uo,yi,Nr,R7,As=d(()=>{F0=["top","right","bottom","left"],B0=["start","end"],pd=F0.reduce((t,e)=>t.concat(e,e+"-"+B0[0],e+"-"+B0[1]),[]),gi=Math.min,Uo=Math.max,yi=Math.round,Nr=t=>({x:t,y:t}),R7={left:"right",right:"left",bottom:"top",top:"bottom"}});function V0(t,e,r){let{reference:o,floating:a}=t,i=Ls(e),s=yd(e),l=gd(s),p=ma(e),h=i==="y",y=o.x+o.width/2-a.width/2,b=o.y+o.height/2-a.height/2,v=o[l]/2-a[l]/2,E;switch(p){case"top":E={x:y,y:o.y-a.height};break;case"bottom":E={x:y,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:b};break;case"left":E={x:o.x-a.width,y:b};break;default:E={x:o.x,y:o.y}}switch(Ho(e)){case"start":E[s]-=v*(r&&h?-1:1);break;case"end":E[s]+=v*(r&&h?-1:1);break}return E}async function W0(t,e){var r;e===void 0&&(e={});let{x:o,y:a,platform:i,rects:s,elements:l,strategy:p}=t,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:b="floating",altBoundary:v=!1,padding:E=0}=Es(e,t),L=G0(E),M=l[v?b==="floating"?"reference":"floating":b],P=Ln(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(M)))==null||r?M:M.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:h,rootBoundary:y,strategy:p})),N=b==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,B=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),U=await(i.isElement==null?void 0:i.isElement(B))?await(i.getScale==null?void 0:i.getScale(B))||{x:1,y:1}:{x:1,y:1},le=Ln(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:B,strategy:p}):N);return{top:(P.top-le.top+L.top)/U.y,bottom:(le.bottom-P.bottom+L.bottom)/U.y,left:(P.left-le.left+L.left)/U.x,right:(le.right-P.right+L.right)/U.x}}function _7(t,e,r){return(t?[...r.filter(a=>Ho(a)===t),...r.filter(a=>Ho(a)!==t)]:r.filter(a=>ma(a)===a)).filter(a=>t?Ho(a)===t||(e?H0(a)!==a:!1):!0)}var k7,j0,K0,q0,Z0=d(()=>{As();As();k7=50,j0=async(t,e,r)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,l=s.detectOverflow?s:{...s,detectOverflow:W0},p=await(s.isRTL==null?void 0:s.isRTL(e)),h=await s.getElementRects({reference:t,floating:e,strategy:a}),{x:y,y:b}=V0(h,o,p),v=o,E=0,L={};for(let R=0;R<i.length;R++){let M=i[R];if(!M)continue;let{name:P,fn:N}=M,{x:B,y:U,data:le,reset:$e}=await N({x:y,y:b,initialPlacement:o,placement:v,strategy:a,middlewareData:L,rects:h,platform:l,elements:{reference:t,floating:e}});y=B??y,b=U??b,L[P]={...L[P],...le},$e&&E<k7&&(E++,typeof $e=="object"&&($e.placement&&(v=$e.placement),$e.rects&&(h=$e.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:a}):$e.rects),{x:y,y:b}=V0(h,v,p)),R=-1)}return{x:y,y:b,placement:v,strategy:a,middlewareData:L}};K0=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,o,a;let{rects:i,middlewareData:s,placement:l,platform:p,elements:h}=e,{crossAxis:y=!1,alignment:b,allowedPlacements:v=pd,autoAlignment:E=!0,...L}=Es(t,e),R=b!==void 0||v===pd?_7(b||null,E,v):v,M=await p.detectOverflow(e,L),P=((r=s.autoPlacement)==null?void 0:r.index)||0,N=R[P];if(N==null)return{};let B=U0(N,i,await(p.isRTL==null?void 0:p.isRTL(h.floating)));if(l!==N)return{reset:{placement:R[0]}};let U=[M[ma(N)],M[B[0]],M[B[1]]],le=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:U}],$e=R[P+1];if($e)return{data:{index:P+1,overflows:le},reset:{placement:$e}};let Ht=le.map(pt=>{let S=Ho(pt.placement);return[pt.placement,S&&y?pt.overflows.slice(0,2).reduce((A,V)=>A+V,0):pt.overflows[0],pt.overflows]}).sort((pt,S)=>pt[1]-S[1]),Wr=((a=Ht.filter(pt=>pt[2].slice(0,Ho(pt[0])?2:3).every(S=>S<=0))[0])==null?void 0:a[0])||Ht[0][0];return Wr!==l?{data:{index:P+1,overflows:le},reset:{placement:Wr}}:{}}}},q0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:o,placement:a,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:p={fn:P=>{let{x:N,y:B}=P;return{x:N,y:B}}},...h}=Es(t,e),y={x:r,y:o},b=await i.detectOverflow(e,h),v=Ls(ma(a)),E=md(v),L=y[E],R=y[v];if(s){let P=E==="y"?"top":"left",N=E==="y"?"bottom":"right",B=L+b[P],U=L-b[N];L=hd(B,L,U)}if(l){let P=v==="y"?"top":"left",N=v==="y"?"bottom":"right",B=R+b[P],U=R-b[N];R=hd(B,R,U)}let M=p.fn({...e,[E]:L,[v]:R});return{...M,data:{x:M.x-r,y:M.y-o,enabled:{[E]:s,[v]:l}}}}}}});function ws(){return typeof window<"u"}function Rn(t){return X0(t)?(t.nodeName||"").toLowerCase():"#document"}function Vt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xr(t){var e;return(e=(X0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function X0(t){return ws()?t instanceof Node||t instanceof Vt(t).Node:!1}function hr(t){return ws()?t instanceof Element||t instanceof Vt(t).Element:!1}function Qr(t){return ws()?t instanceof HTMLElement||t instanceof Vt(t).HTMLElement:!1}function Y0(t){return!ws()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Vt(t).ShadowRoot}function ga(t){let{overflow:e,overflowX:r,overflowY:o,display:a}=mr(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+r)&&a!=="inline"&&a!=="contents"}function Q0(t){return/^(table|td|th)$/.test(Rn(t))}function bi(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}function ks(t){let e=hr(t)?mr(t):t;return An(e.transform)||An(e.translate)||An(e.scale)||An(e.rotate)||An(e.perspective)||!_s()&&(An(e.backdropFilter)||An(e.filter))||T7.test(e.willChange||"")||M7.test(e.contain||"")}function J0(t){let e=Co(t);for(;Qr(e)&&!wn(e);){if(ks(e))return e;if(bi(e))return null;e=Co(e)}return null}function _s(){return bd==null&&(bd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),bd}function wn(t){return/^(html|body|#document)$/.test(Rn(t))}function mr(t){return Vt(t).getComputedStyle(t)}function vi(t){return hr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Co(t){if(Rn(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Y0(t)&&t.host||Xr(t);return Y0(e)?e.host:e}function e4(t){let e=Co(t);return wn(e)?t.ownerDocument?t.ownerDocument.body:t.body:Qr(e)&&ga(e)?e:e4(e)}function Rs(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=e4(t),i=a===((o=t.ownerDocument)==null?void 0:o.body),s=Vt(a);if(i){let l=Ts(s);return e.concat(s,s.visualViewport||[],ga(a)?a:[],l&&r?Rs(l):[])}else return e.concat(a,Rs(a,[],r))}function Ts(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}var T7,M7,An,bd,t4=d(()=>{T7=/transform|translate|scale|rotate|perspective|filter/,M7=/paint|layout|strict|content/,An=t=>!!t&&t!=="none"});function a4(t){let e=mr(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,a=Qr(t),i=a?t.offsetWidth:r,s=a?t.offsetHeight:o,l=yi(r)!==i||yi(o)!==s;return l&&(r=i,o=s),{width:r,height:o,$:l}}function i4(t){return hr(t)?t:t.contextElement}function ya(t){let e=i4(t);if(!Qr(e))return Nr(1);let r=e.getBoundingClientRect(),{width:o,height:a,$:i}=a4(e),s=(i?yi(r.width):r.width)/o,l=(i?yi(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}function s4(t){let e=Vt(t);return!_s()||!e.visualViewport?N7:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function I7(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Vt(t)?!1:e}function xi(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=i4(t),s=Nr(1);e&&(o?hr(o)&&(s=ya(o)):s=ya(t));let l=I7(i,r,o)?s4(i):Nr(0),p=(a.left+l.x)/s.x,h=(a.top+l.y)/s.y,y=a.width/s.x,b=a.height/s.y;if(i){let v=Vt(i),E=o&&hr(o)?Vt(o):o,L=v,R=Ts(L);for(;R&&o&&E!==L;){let M=ya(R),P=R.getBoundingClientRect(),N=mr(R),B=P.left+(R.clientLeft+parseFloat(N.paddingLeft))*M.x,U=P.top+(R.clientTop+parseFloat(N.paddingTop))*M.y;p*=M.x,h*=M.y,y*=M.x,b*=M.y,p+=B,h+=U,L=Vt(R),R=Ts(L)}}return Ln({width:y,height:b,x:p,y:h})}function Ms(t,e){let r=vi(t).scrollLeft;return e?e.left+r:xi(Xr(t)).left+r}function l4(t,e){let r=t.getBoundingClientRect(),o=r.left+e.scrollLeft-Ms(t,r),a=r.top+e.scrollTop;return{x:o,y:a}}function P7(t){let{elements:e,rect:r,offsetParent:o,strategy:a}=t,i=a==="fixed",s=Xr(o),l=e?bi(e.floating):!1;if(o===s||l&&i)return r;let p={scrollLeft:0,scrollTop:0},h=Nr(1),y=Nr(0),b=Qr(o);if((b||!b&&!i)&&((Rn(o)!=="body"||ga(s))&&(p=vi(o)),b)){let E=xi(o);h=ya(o),y.x=E.x+o.clientLeft,y.y=E.y+o.clientTop}let v=s&&!b&&!i?l4(s,p):Nr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-p.scrollLeft*h.x+y.x+v.x,y:r.y*h.y-p.scrollTop*h.y+y.y+v.y}}function z7(t){return Array.from(t.getClientRects())}function $7(t){let e=Xr(t),r=vi(t),o=t.ownerDocument.body,a=Uo(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=Uo(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-r.scrollLeft+Ms(t),l=-r.scrollTop;return mr(o).direction==="rtl"&&(s+=Uo(e.clientWidth,o.clientWidth)-a),{width:a,height:i,x:s,y:l}}function D7(t,e){let r=Vt(t),o=Xr(t),a=r.visualViewport,i=o.clientWidth,s=o.clientHeight,l=0,p=0;if(a){i=a.width,s=a.height;let y=_s();(!y||y&&e==="fixed")&&(l=a.offsetLeft,p=a.offsetTop)}let h=Ms(o);if(h<=0){let y=o.ownerDocument,b=y.body,v=getComputedStyle(b),E=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,L=Math.abs(o.clientWidth-b.clientWidth-E);L<=r4&&(i-=L)}else h<=r4&&(i+=h);return{width:i,height:s,x:l,y:p}}function B7(t,e){let r=xi(t,!0,e==="fixed"),o=r.top+t.clientTop,a=r.left+t.clientLeft,i=Qr(t)?ya(t):Nr(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,p=a*i.x,h=o*i.y;return{width:s,height:l,x:p,y:h}}function o4(t,e,r){let o;if(e==="viewport")o=D7(t,r);else if(e==="document")o=$7(Xr(t));else if(hr(e))o=B7(e,r);else{let a=s4(t);o={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Ln(o)}function c4(t,e){let r=Co(t);return r===e||!hr(r)||wn(r)?!1:mr(r).position==="fixed"||c4(r,e)}function F7(t,e){let r=e.get(t);if(r)return r;let o=Rs(t,[],!1).filter(l=>hr(l)&&Rn(l)!=="body"),a=null,i=mr(t).position==="fixed",s=i?Co(t):t;for(;hr(s)&&!wn(s);){let l=mr(s),p=ks(s);!p&&l.position==="fixed"&&(a=null),(i?!p&&!a:!p&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||ga(s)&&!p&&c4(t,s))?o=o.filter(y=>y!==s):a=l,s=Co(s)}return e.set(t,o),o}function U7(t){let{element:e,boundary:r,rootBoundary:o,strategy:a}=t,s=[...r==="clippingAncestors"?bi(e)?[]:F7(e,this._c):[].concat(r),o],l=o4(e,s[0],a),p=l.top,h=l.right,y=l.bottom,b=l.left;for(let v=1;v<s.length;v++){let E=o4(e,s[v],a);p=Uo(E.top,p),h=gi(E.right,h),y=gi(E.bottom,y),b=Uo(E.left,b)}return{width:h-b,height:y-p,x:b,y:p}}function H7(t){let{width:e,height:r}=a4(t);return{width:e,height:r}}function G7(t,e,r){let o=Qr(e),a=Xr(e),i=r==="fixed",s=xi(t,!0,i,e),l={scrollLeft:0,scrollTop:0},p=Nr(0);function h(){p.x=Ms(a)}if(o||!o&&!i)if((Rn(e)!=="body"||ga(a))&&(l=vi(e)),o){let E=xi(e,!0,i,e);p.x=E.x+e.clientLeft,p.y=E.y+e.clientTop}else a&&h();i&&!o&&a&&h();let y=a&&!o&&!i?l4(a,l):Nr(0),b=s.left+l.scrollLeft-p.x-y.x,v=s.top+l.scrollTop-p.y-y.y;return{x:b,y:v,width:s.width,height:s.height}}function vd(t){return mr(t).position==="static"}function n4(t,e){if(!Qr(t)||mr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Xr(t)===r&&(r=r.ownerDocument.body),r}function d4(t,e){let r=Vt(t);if(bi(t))return r;if(!Qr(t)){let a=Co(t);for(;a&&!wn(a);){if(hr(a)&&!vd(a))return a;a=Co(a)}return r}let o=n4(t,e);for(;o&&Q0(o)&&vd(o);)o=n4(o,e);return o&&wn(o)&&vd(o)&&!ks(o)?r:o||J0(t)||r}function W7(t){return mr(t).direction==="rtl"}var N7,r4,V7,Ns,u4,f4,p4,h4=d(()=>{Z0();As();t4();N7=Nr(0);r4=25;V7=async function(t){let e=this.getOffsetParent||d4,r=this.getDimensions,o=await r(t.floating);return{reference:G7(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};Ns={convertOffsetParentRelativeRectToViewportRelativeRect:P7,getDocumentElement:Xr,getClippingRect:U7,getOffsetParent:d4,getElementRects:V7,getClientRects:z7,getDimensions:H7,getScale:ya,isElement:hr,isRTL:W7},u4=K0,f4=q0,p4=(t,e,r)=>{let o=new Map,a={platform:Ns,...r},i={...a.platform,_c:o};return j0(t,e,{...a,platform:i})}});function m4(t){return j7(t)}function xd(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function j7(t){for(let e=t;e;e=xd(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=xd(t);e;e=xd(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||r.filter!=="none"||e.tagName==="BODY"))return e}return null}var g4=d(()=>{});async function y4(t,e,r){let o;return typeof r=="object"?o=r:o={placement:r},p4(t,e,{strategy:o.strategy,platform:{...Ns,getOffsetParent:a=>Ns.getOffsetParent(a,m4)},middleware:[f4({crossAxis:!0}),u4({allowedPlacements:[o.placement]})]})}var b4=d(()=>{"use strict";h4();g4()});function K7(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,o,a;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(o=r;o--!==0;)if(!Is(t[o],e[o]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[0]))return!1;for(o of t.entries())if(!Is(o[1],e.get(o[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o of t.entries())if(!e.has(o[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 i=s=>Object.keys(s).filter(l=>s[l]!=null);if(a=i(t),r=a.length,r!==i(e).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[o]))return!1;for(o=r;o--!==0;){let s=a[o];if(!Is(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Is(t,e){try{return K7(t,e)}catch{return!1}}function Si(t,e){return!Is(t,e)}function v4(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Ps(t,e){let r=o=>o[t]===!0;return o=>{if(r(o))return o;let a=e(o);return a[t]=!0,a}}var kn=d(()=>{"use strict"});var x4,Sd,S4=d(()=>{"use strict";kn();x4=f(H(),1),Sd=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:Si,attribute:!1,...e};(0,x4.property)(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:l=>l[o],store:e.store})}}});var zs,Cd=d(()=>{"use strict";zs=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}}});function O4(t,e){let r=()=>JSON.parse(JSON.stringify(t));return(0,C4.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return r();try{return JSON.parse(o)}catch{return r()}},toAttribute:o=>JSON.stringify(o)},hasChanged:Si,...e??{}})}var C4,E4=d(()=>{"use strict";C4=f(H(),1);kn()});var $s,L4=d(()=>{"use strict";$s=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,o)=>{this.resolvePromise=r,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let o=[...this.callbacks];this.callbacks=[];let a=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,i=(r=this.resolvePromise)!==null&&r!==void 0?r:()=>null;this.clearPromise();for(let s of o)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}});var Ds,q7,PT,A4,R4=d(()=>{Ds=globalThis,q7=Ds.ShadowRoot&&(Ds.ShadyCSS===void 0||Ds.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,PT=Symbol(),A4=(t,e)=>{if(q7)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let o=document.createElement("style"),a=Ds.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=r.cssText,t.appendChild(o)}}});var w4,Bs,k4=d(()=>{"use strict";w4=f(w(),1);R4();Bs=class extends w4.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([a,i])=>e.registry.define(a,i)));let r={...e.shadowRootOptions,customElements:e.registry},o=this.renderOptions.creationScope=this.attachShadow(r);return A4(o,e.elementStyles),o}}});function _4(t,e,...r){var o;let a=t.querySelector(e);for(let i of r)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var T4=d(()=>{"use strict"});var _n,va,P4,M4,N4,z4,I4,ba,Jr,$4=d(()=>{"use strict";_n=f(H(),1);E4();L4();k4();T4();va=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},M4=Symbol("constructorPrototype"),N4=Symbol("constructorName"),z4=Symbol("exportpartsDebouncer"),I4=Symbol("dynamicDependenciesLoaded"),ba=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};ba.eventName="exportparts-updated";Jr=class extends Bs{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[P4]=new $s(5),this.scheduleExportpartsUpdate=()=>{var e,r,o;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(o=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&o!==void 0&&o)&&this[z4].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[N4]=this.constructor.name,this[M4]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[N4]&&Object.setPrototypeOf(this,this[M4])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let r=this.constructor;r[I4]||(r[I4]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(ba.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(ba.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 ba)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];r=_4(this.shadowRoot,...i)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,o,a;if(((o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(e){var r,o,a,i,s,l;let p=v=>v!=null&&v.trim().length>0,h=e.filter(p).map(v=>v.trim());if(h.length===0){this.exportparts=void 0;return}let y=new Set;for(let v of(o=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&o!==void 0?o:[]){let E=(i=(a=v.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],L=(l=(s=v.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(M=>M.split(":")[1]))!==null&&l!==void 0?l:[],R=[...E,...L].filter(p).map(M=>M.trim());for(let M of R)y.add(M)}if(y.size===0){this.exportparts=void 0;return}let b=[...y.values()].flatMap(v=>h.map(E=>`${v}:${E}--${v}`));this.exportparts=[...this.part,...b].join(", ")}};P4=z4;va([(0,_n.property)()],Jr.prototype,"exportpartsPrefix",void 0);va([O4([])],Jr.prototype,"exportpartsPrefixes",void 0);va([(0,_n.property)({reflect:!0})],Jr.prototype,"exportparts",void 0);va([(0,_n.property)()],Jr.prototype,"customStylesheet",void 0);va([(0,_n.property)()],Jr.prototype,"elementToFocus",void 0);va([(0,_n.state)()],Jr.prototype,"useAdoptedStyleSheets",void 0)});function Fs(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Us=d(()=>{"use strict"});var Ci,Go,Tn,Z7,D4,B4=d(()=>{"use strict";$4();Us();kn();Ci=Symbol("internalReduxEventsUnsubscribers"),Go=Symbol("internalStoresUnsubscribers"),Tn=Symbol("internalStores"),Z7=Ps(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Tn].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Tn].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Tn].get(s)}addStore(s,l){var p;l=(p=l??s.name)!==null&&p!==void 0?p:"default-store",this.unsubscribeFromStore(l),this[Tn].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Tn].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Tn].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let p=this.constructor.getPropertyOptions(l);if(!p?.attribute||!this.hasAttribute(typeof p?.attribute=="string"?p.attribute:l)){let h=this.getStore(s.store);h&&(s.store?this[Go].has(s.store):this[Go].size>0)&&(this[l]=s.selector(h.getState(),this))}})}subscribeToStore(s,l){var p;this[Go].set(s,l.subscribe(()=>this.updateFromStores())),this[Ci].set(s,[]),Fs(l)&&l.eventBus&&((p=this.reduxConstructor.reduxEventListeners)===null||p===void 0||p.forEach((h,y)=>{if(typeof this[y]=="function"&&(!h.store||l.name===h.store)){let b=v=>this[y](v);l.addEventListener(h.eventName,b),this[Ci].get(s).push(()=>l.removeEventListener(h.eventName,b))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Go].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[Go].has(s)&&this[Go].get(s)(),this[Go].delete(s),(l=this[Ci].get(s))===null||l===void 0||l.forEach(p=>p()),this[Ci].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Go,r=Tn,o=Ci,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),D4=class extends Z7(Jr){}});function gr(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Oo(t){return!!t&&!!t[Be]}function Ir(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===ov}(t)||Array.isArray(t)||!!t[j4]||!!(!((e=t.constructor)===null||e===void 0)&&e[j4])||Td(t)||Md(t))}function Mn(t,e,r){r===void 0&&(r=!1),Ca(t)===0?(r?Object.keys:Sa)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,a){return e(a,o,t)})}function Ca(t){var e=t[Be];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Td(t)?2:Md(t)?3:0}function xa(t,e){return Ca(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Y7(t,e){return Ca(t)===2?t.get(e):t[e]}function K4(t,e,r){var o=Ca(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function q4(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Td(t){return tv&&t instanceof Map}function Md(t){return rv&&t instanceof Set}function Vo(t){return t.o||t.t}function Nd(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=X4(t);delete e[Be];for(var r=Sa(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Id(t,e){return e===void 0&&(e=!1),Pd(t)||Oo(t)||!Ir(t)||(Ca(t)>1&&(t.set=t.add=t.clear=t.delete=X7),Object.freeze(t),e&&Mn(t,function(r,o){return Id(o,!0)},!0)),t}function X7(){gr(2)}function Pd(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function eo(t){var e=_d[t];return e||gr(18,t),e}function Q7(t,e){_d[t]||(_d[t]=e)}function Rd(){return Ei}function Od(t,e){e&&(eo("Patches"),t.u=[],t.s=[],t.v=e)}function Hs(t){wd(t),t.p.forEach(J7),t.p=null}function wd(t){t===Ei&&(Ei=t.l)}function F4(t){return Ei={p:[],l:Ei,h:t,m:!0,_:0}}function J7(t){var e=t[Be];e.i===0||e.i===1?e.j():e.g=!0}function Ed(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||eo("ES5").S(e,t,o),o?(r[Be].P&&(Hs(e),gr(4)),Ir(t)&&(t=Gs(e,t),e.l||Vs(e,t)),e.u&&eo("Patches").M(r[Be].t,t,e.u,e.s)):t=Gs(e,r,[]),Hs(e),e.u&&e.v(e.u,e.s),t!==Y4?t:void 0}function Gs(t,e,r){if(Pd(e))return e;var o=e[Be];if(!o)return Mn(e,function(l,p){return U4(t,o,e,l,p,r)},!0),e;if(o.A!==t)return e;if(!o.P)return Vs(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=Nd(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),Mn(i,function(l,p){return U4(t,o,a,l,p,r,s)}),Vs(t,a,!1),r&&t.u&&eo("Patches").N(o,r,t.u,t.s)}return o.o}function U4(t,e,r,o,a,i,s){if(Oo(a)){var l=Gs(t,a,i&&e&&e.i!==3&&!xa(e.R,o)?i.concat(o):void 0);if(K4(r,o,l),!Oo(l))return;t.m=!1}else s&&r.add(a);if(Ir(a)&&!Pd(a)){if(!t.h.D&&t._<1)return;Gs(t,a),e&&e.A.l||Vs(t,a)}}function Vs(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Id(e,r)}function Ld(t,e){var r=t[Be];return(r?Vo(r):t)[e]}function H4(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function Wo(t){t.P||(t.P=!0,t.l&&Wo(t.l))}function Ad(t){t.o||(t.o=Nd(t.t))}function kd(t,e,r){var o=Td(e)?eo("MapSet").F(e,r):Md(e)?eo("MapSet").T(e,r):t.O?function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Rd(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},p=l,h=Li;s&&(p=[l],h=Oi);var y=Proxy.revocable(p,h),b=y.revoke,v=y.proxy;return l.k=v,l.j=b,v}(e,r):eo("ES5").J(e,r);return(r?r.A:Rd()).p.push(o),o}function ev(t){return Oo(t)||gr(22,t),function e(r){if(!Ir(r))return r;var o,a=r[Be],i=Ca(r);if(a){if(!a.P&&(a.i<4||!eo("ES5").K(a)))return a.t;a.I=!0,o=G4(r,i),a.I=!1}else o=G4(r,i);return Mn(o,function(s,l){a&&Y7(a.t,s)===l||K4(o,s,e(l))}),i===3?new Set(o):o}(t)}function G4(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Nd(t)}function Z4(){function t(s,l){var p=i[s];return p?p.enumerable=l:i[s]=p={configurable:!0,enumerable:l,get:function(){var h=this[Be];return Li.get(h,s)},set:function(h){var y=this[Be];Li.set(y,s,h)}},p}function e(s){for(var l=s.length-1;l>=0;l--){var p=s[l][Be];if(!p.P)switch(p.i){case 5:o(p)&&Wo(p);break;case 4:r(p)&&Wo(p)}}}function r(s){for(var l=s.t,p=s.k,h=Sa(p),y=h.length-1;y>=0;y--){var b=h[y];if(b!==Be){var v=l[b];if(v===void 0&&!xa(l,b))return!0;var E=p[b],L=E&&E[Be];if(L?L.t!==v:!q4(E,v))return!0}}var R=!!l[Be];return h.length!==Sa(l).length+(R?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(l,l.length-1);if(p&&!p.get)return!0;for(var h=0;h<l.length;h++)if(!l.hasOwnProperty(h))return!0;return!1}function a(s){s.g&&gr(3,JSON.stringify(Vo(s)))}var i={};Q7("ES5",{J:function(s,l){var p=Array.isArray(s),h=function(b,v){if(b){for(var E=Array(v.length),L=0;L<v.length;L++)Object.defineProperty(E,""+L,t(L,!0));return E}var R=X4(v);delete R[Be];for(var M=Sa(R),P=0;P<M.length;P++){var N=M[P];R[N]=t(N,b||!!R[N].enumerable)}return Object.create(Object.getPrototypeOf(v),R)}(p,s),y={i:p?5:4,A:l?l.A:Rd(),P:!1,I:!1,R:{},l,t:s,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,Be,{value:y,writable:!0}),h},S:function(s,l,p){p?Oo(l)&&l[Be].A===s&&e(s.p):(s.u&&function h(y){if(y&&typeof y=="object"){var b=y[Be];if(b){var v=b.t,E=b.k,L=b.R,R=b.i;if(R===4)Mn(E,function(U){U!==Be&&(v[U]!==void 0||xa(v,U)?L[U]||h(E[U]):(L[U]=!0,Wo(b)))}),Mn(v,function(U){E[U]!==void 0||xa(E,U)||(L[U]=!1,Wo(b))});else if(R===5){if(o(b)&&(Wo(b),L.length=!0),E.length<v.length)for(var M=E.length;M<v.length;M++)L[M]=!1;else for(var P=v.length;P<E.length;P++)L[P]=!0;for(var N=Math.min(E.length,v.length),B=0;B<N;B++)E.hasOwnProperty(B)||(L[B]=!0),L[B]===void 0&&h(E[B])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var V4,Ei,zd,tv,rv,W4,Y4,j4,Be,ov,Sa,X4,_d,Li,Oi,nv,Jt,av,YT,XT,QT,JT,eM,tM,Ws,js=d(()=>{zd=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",tv=typeof Map<"u",rv=typeof Set<"u",W4=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Y4=zd?Symbol.for("immer-nothing"):((V4={})["immer-nothing"]=!0,V4),j4=zd?Symbol.for("immer-draftable"):"__$immer_draftable",Be=zd?Symbol.for("immer-state"):"__$immer_state",ov=""+Object.prototype.constructor,Sa=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,X4=Object.getOwnPropertyDescriptors||function(t){var e={};return Sa(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},_d={},Li={get:function(t,e){if(e===Be)return t;var r=Vo(t);if(!xa(r,e))return function(a,i,s){var l,p=H4(i,s);return p?"value"in p?p.value:(l=p.get)===null||l===void 0?void 0:l.call(a.k):void 0}(t,r,e);var o=r[e];return t.I||!Ir(o)?o:o===Ld(t.t,e)?(Ad(t),t.o[e]=kd(t.A.h,o,t)):o},has:function(t,e){return e in Vo(t)},ownKeys:function(t){return Reflect.ownKeys(Vo(t))},set:function(t,e,r){var o=H4(Vo(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ld(Vo(t),e),i=a?.[Be];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(q4(r,a)&&(r!==void 0||xa(t.t,e)))return!0;Ad(t),Wo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ld(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Ad(t),Wo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Vo(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){gr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){gr(12)}},Oi={};Mn(Li,function(t,e){Oi[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Oi.deleteProperty=function(t,e){return Oi.set.call(this,t,e,void 0)},Oi.set=function(t,e,r){return Li.set.call(this,t[0],e,r,t[0])};nv=function(){function t(r){var o=this;this.O=W4,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var p=o;return function(R){var M=this;R===void 0&&(R=l);for(var P=arguments.length,N=Array(P>1?P-1:0),B=1;B<P;B++)N[B-1]=arguments[B];return p.produce(R,function(U){var le;return(le=i).call.apply(le,[M,U].concat(N))})}}var h;if(typeof i!="function"&&gr(6),s!==void 0&&typeof s!="function"&&gr(7),Ir(a)){var y=F4(o),b=kd(o,a,void 0),v=!0;try{h=i(b),v=!1}finally{v?Hs(y):wd(y)}return typeof Promise<"u"&&h instanceof Promise?h.then(function(R){return Od(y,s),Ed(R,y)},function(R){throw Hs(y),R}):(Od(y,s),Ed(h,y))}if(!a||typeof a!="object"){if((h=i(a))===void 0&&(h=a),h===Y4&&(h=void 0),o.D&&Id(h,!0),s){var E=[],L=[];eo("Patches").M(a,h,E,L),s(E,L)}return h}gr(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(h){for(var y=arguments.length,b=Array(y>1?y-1:0),v=1;v<y;v++)b[v-1]=arguments[v];return o.produceWithPatches(h,function(E){return a.apply(void 0,[E].concat(b))})};var s,l,p=o.produce(a,i,function(h,y){s=h,l=y});return typeof Promise<"u"&&p instanceof Promise?p.then(function(h){return[h,s,l]}):[p,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ir(r)||gr(8),Oo(r)&&(r=ev(r));var o=F4(this),a=kd(this,r,void 0);return a[Be].C=!0,wd(o),a},e.finishDraft=function(r,o){var a=r&&r[Be],i=a.A;return Od(i,o),Ed(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!W4&&gr(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=eo("Patches").$;return Oo(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),Jt=new nv,av=Jt.produce,YT=Jt.produceWithPatches.bind(Jt),XT=Jt.setAutoFreeze.bind(Jt),QT=Jt.setUseProxies.bind(Jt),JT=Jt.applyPatches.bind(Jt),eM=Jt.createDraft.bind(Jt),tM=Jt.finishDraft.bind(Jt),Ws=av});function Nn(t){"@babel/helpers - typeof";return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nn(t)}var $d=d(()=>{});function Q4(t,e){if(Nn(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(Nn(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var J4=d(()=>{$d()});function eh(t){var e=Q4(t,"string");return Nn(e)=="symbol"?e:e+""}var th=d(()=>{$d();J4()});function rh(t,e,r){return(e=eh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var oh=d(()=>{th()});function nh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Dd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nh(Object(r),!0).forEach(function(o){rh(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}var ah=d(()=>{oh()});function Rt(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. "}function iv(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Fd(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Rt(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Rt(1));return r(Fd)(t,e)}if(typeof t!="function")throw new Error(Rt(2));var a=t,i=e,s=[],l=s,p=!1;function h(){l===s&&(l=s.slice())}function y(){if(p)throw new Error(Rt(3));return i}function b(R){if(typeof R!="function")throw new Error(Rt(4));if(p)throw new Error(Rt(5));var M=!0;return h(),l.push(R),function(){if(M){if(p)throw new Error(Rt(6));M=!1,h();var N=l.indexOf(R);l.splice(N,1),s=null}}}function v(R){if(!iv(R))throw new Error(Rt(7));if(typeof R.type>"u")throw new Error(Rt(8));if(p)throw new Error(Rt(9));try{p=!0,i=a(i,R)}finally{p=!1}for(var M=s=l,P=0;P<M.length;P++){var N=M[P];N()}return R}function E(R){if(typeof R!="function")throw new Error(Rt(10));a=R,v({type:Ks.REPLACE})}function L(){var R,M=b;return R={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(Rt(11));function B(){N.next&&N.next(y())}B();var U=M(B);return{unsubscribe:U}}},R[ih]=function(){return this},R}return v({type:Ks.INIT}),o={dispatch:v,subscribe:b,getState:y,replaceReducer:E},o[ih]=L,o}function sv(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Ks.INIT});if(typeof o>"u")throw new Error(Rt(12));if(typeof r(void 0,{type:Ks.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Rt(13))})}function sh(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,l;try{sv(r)}catch(p){l=p}return function(h,y){if(h===void 0&&(h={}),l)throw l;if(0)var b;for(var v=!1,E={},L=0;L<i.length;L++){var R=i[L],M=r[R],P=h[R],N=M(P,y);if(typeof N>"u"){var B=y&&y.type;throw new Error(Rt(14))}E[R]=N,v=v||N!==P}return v=v||i.length!==Object.keys(h).length,v?E:h}}function Oa(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function lh(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(Rt(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=e.map(function(p){return p(s)});return i=Oa.apply(void 0,l)(a.dispatch),Dd(Dd({},a),{},{dispatch:i})}}}var ih,Bd,Ks,qs=d(()=>{ah();ih=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Bd=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ks={INIT:"@@redux/INIT"+Bd(),REPLACE:"@@redux/REPLACE"+Bd(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Bd()}}});function ch(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,t):s(l)}}};return e}var dh,Ud,uh=d(()=>{dh=ch();dh.withExtraArgument=ch;Ud=dh});function gv(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Wd(t){return Ir(t)?Ws(t,function(){}):t}function vv(t){return typeof t=="boolean"}function xv(){return function(e){return Sv(e)}}function Sv(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,l=new yv;if(r&&(vv(r)?l.push(Ud):l.push(Ud.withExtraArgument(r.extraArgument))),0){if(a)var p;if(s)var h}return l}function yh(t){var e=xv(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,l=r.devTools,p=l===void 0?!0:l,h=r.preloadedState,y=h===void 0?void 0:h,b=r.enhancers,v=b===void 0?void 0:b,E;if(typeof a=="function")E=a;else if(gv(a))E=sh(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var L=s;if(typeof L=="function"&&(L=L(e),!Gd&&!Array.isArray(L)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Gd&&L.some(function(U){return typeof U!="function"}))throw new Error("each middleware provided to configureStore must be a function");var R=lh.apply(void 0,L),M=Oa;p&&(M=mv(jo({trace:!Gd},typeof p=="object"&&p)));var P=new bv(R),N=P;Array.isArray(v)?N=Ea([R],v):typeof v=="function"&&(N=v(P));var B=M.apply(void 0,N);return Fd(E,y,B)}function Ko(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return jo(jo({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function bh(t){var e={},r=[],o,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function Cv(t){return typeof t=="function"}function Ov(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?bh(e):[e,r,o],i=a[0],s=a[1],l=a[2],p;if(Cv(t))p=function(){return Wd(t())};else{var h=Wd(t);p=function(){return h}}function y(b,v){b===void 0&&(b=p());var E=Ea([i[v.type]],s.filter(function(L){var R=L.matcher;return R(v)}).map(function(L){var R=L.reducer;return R}));return E.filter(function(L){return!!L}).length===0&&(E=[l]),E.reduce(function(L,R){if(R)if(Oo(L)){var M=L,P=R(M,v);return P===void 0?L:P}else{if(Ir(L))return Ws(L,function(N){return R(N,v)});var P=R(L,v);if(P===void 0){if(L===null)return L;throw Error("A case reducer on a non-draftable value must not return undefined")}return P}return L},b)}return y.getInitialState=p,y}function Ev(t,e){return t+"/"+e}function vh(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Wd(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},l={};a.forEach(function(y){var b=o[y],v=Ev(e,y),E,L;"reducer"in b?(E=b.reducer,L=b.prepare):E=b,i[y]=E,s[v]=E,l[y]=L?Ko(v,L):Ko(v)});function p(){var y=typeof t.extraReducers=="function"?bh(t.extraReducers):[t.extraReducers],b=y[0],v=b===void 0?{}:b,E=y[1],L=E===void 0?[]:E,R=y[2],M=R===void 0?void 0:R,P=jo(jo({},v),s);return Ov(r,function(N){for(var B in P)N.addCase(B,P[B]);for(var U=0,le=L;U<le.length;U++){var $e=le[U];N.addMatcher($e.matcher,$e.reducer)}M&&N.addDefaultCase(M)})}var h;return{name:e,reducer:function(y,b){return h||(h=p()),h(y,b)},actions:l,caseReducers:i,getInitialState:function(){return h||(h=p()),h.getInitialState()}}}function kv(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function _v(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var gh,lv,Ea,cv,dv,uv,fh,fv,pv,ph,jo,Hd,hv,mv,vM,yv,bv,Gd,Lv,Av,Rv,Vd,hh,wv,OM,xh,Sh,Ch,EM,LM,AM,RM,jd,wM,kM,_M,mh,TM,Tv,MM,Oh=d(()=>{js();qs();qs();qs();uh();js();js();gh=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),lv=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(h){return function(y){return p([h,y])}}function p(h){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=h[0]&2?a.return:h[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,h[1])).done)return i;switch(a=0,i&&(h=[h[0]&2,i.value]),h[0]){case 0:case 1:i=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,a=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!i||h[1]>i[0]&&h[1]<i[3])){r.label=h[1];break}if(h[0]===6&&r.label<i[1]){r.label=i[1],i=h;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(h);break}i[2]&&r.ops.pop(),r.trys.pop();continue}h=e.call(t,r)}catch(y){h=[6,y],a=0}finally{o=i=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},Ea=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},cv=Object.defineProperty,dv=Object.defineProperties,uv=Object.getOwnPropertyDescriptors,fh=Object.getOwnPropertySymbols,fv=Object.prototype.hasOwnProperty,pv=Object.prototype.propertyIsEnumerable,ph=function(t,e,r){return e in t?cv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},jo=function(t,e){for(var r in e||(e={}))fv.call(e,r)&&ph(t,r,e[r]);if(fh)for(var o=0,a=fh(e);o<a.length;o++){var r=a[o];pv.call(e,r)&&ph(t,r,e[r])}return t},Hd=function(t,e){return dv(t,uv(e))},hv=function(t,e,r){return new Promise(function(o,a){var i=function(p){try{l(r.next(p))}catch(h){a(h)}},s=function(p){try{l(r.throw(p))}catch(h){a(h)}},l=function(p){return p.done?o(p.value):Promise.resolve(p.value).then(i,s)};l((r=r.apply(t,e)).next())})},mv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Oa:Oa.apply(null,arguments)},vM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};yv=function(t){gh(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ea([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ea([void 0],r.concat(this))))},e}(Array),bv=function(t){gh(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Ea([void 0],r[0].concat(this)))):new(e.bind.apply(e,Ea([void 0],r.concat(this))))},e}(Array);Gd=!0;Lv="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Av=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Lv[Math.random()*64|0];return e},Rv=["name","message","stack","code"],Vd=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),hh=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),wv=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=Rv;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},OM=function(){function t(e,r,o){var a=Ko(e+"/fulfilled",function(y,b,v,E){return{payload:y,meta:Hd(jo({},E||{}),{arg:v,requestId:b,requestStatus:"fulfilled"})}}),i=Ko(e+"/pending",function(y,b,v){return{payload:void 0,meta:Hd(jo({},v||{}),{arg:b,requestId:y,requestStatus:"pending"})}}),s=Ko(e+"/rejected",function(y,b,v,E,L){return{payload:E,error:(o&&o.serializeError||wv)(y||"Rejected"),meta:Hd(jo({},L||{}),{arg:v,requestId:b,rejectedWithValue:!!E,requestStatus:"rejected",aborted:y?.name==="AbortError",condition:y?.name==="ConditionError"})}}),l=!1,p=typeof AbortController<"u"?AbortController:function(){function y(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return y.prototype.abort=function(){},y}();function h(y){return function(b,v,E){var L=o?.idGenerator?o.idGenerator(y):Av(),R=new p,M,P=!1;function N(U){M=U,R.abort()}var B=function(){return hv(this,null,function(){var U,le,$e,Ht,ft,Wr,pt;return lv(this,function(S){switch(S.label){case 0:return S.trys.push([0,4,,5]),Ht=(U=o?.condition)==null?void 0:U.call(o,y,{getState:v,extra:E}),_v(Ht)?[4,Ht]:[3,2];case 1:Ht=S.sent(),S.label=2;case 2:if(Ht===!1||R.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return P=!0,ft=new Promise(function(A,V){return R.signal.addEventListener("abort",function(){return V({name:"AbortError",message:M||"Aborted"})})}),b(i(L,y,(le=o?.getPendingMeta)==null?void 0:le.call(o,{requestId:L,arg:y},{getState:v,extra:E}))),[4,Promise.race([ft,Promise.resolve(r(y,{dispatch:b,getState:v,extra:E,requestId:L,signal:R.signal,abort:N,rejectWithValue:function(A,V){return new Vd(A,V)},fulfillWithValue:function(A,V){return new hh(A,V)}})).then(function(A){if(A instanceof Vd)throw A;return A instanceof hh?a(A.payload,L,y,A.meta):a(A,L,y)})])];case 3:return $e=S.sent(),[3,5];case 4:return Wr=S.sent(),$e=Wr instanceof Vd?s(null,L,y,Wr.payload,Wr.meta):s(Wr,L,y),[3,5];case 5:return pt=o&&!o.dispatchConditionRejection&&s.match($e)&&$e.meta.condition,pt||b($e),[2,$e]}})})}();return Object.assign(B,{abort:N,requestId:L,arg:y,unwrap:function(){return B.then(kv)}})}}return Object.assign(h,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t}();xh="listener",Sh="completed",Ch="cancelled",EM="task-"+Ch,LM="task-"+Sh,AM=xh+"-"+Ch,RM=xh+"-"+Sh,jd="listenerMiddleware",wM=Ko(jd+"/add"),kM=Ko(jd+"/removeAll"),_M=Ko(jd+"/remove"),TM=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(mh||(mh=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Tv=function(t){return function(e){setTimeout(e,t)}},MM=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Tv(10);Z4()});var Mv,Zs,Eh=d(()=>{"use strict";kn();Mv=Ps(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,o,a){this.eventBus.addEventListener(r,o,a)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,o,a){this.eventBus.removeEventListener(r,o,a)}}}),Zs=class extends Mv(Object){}});var Lh,Ah=d(()=>{"use strict";Oh();Us();Cd();Eh();kn();window.ftReduxStores||(window.ftReduxStores={});Lh=class t extends Zs{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(Fs(i))return i;if(a==null)return;let s=vh({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),l=yh({reducer:(p,h)=>{if(h.type==="CLEAR_FT_REDUX_STORE"){let y=v4(s.getInitialState());for(let b of h.keeping)y[b]=(p??y)[b];return y}else if(typeof h.type=="string"&&h.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...p,...h.overwrites};return s.reducer(p,h)}});return window.ftReduxStores[a.name]=new t(s,l,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new zs;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let p=s,h=i[p];return h?(...y)=>{let b=h(...y.map(a));return this.reduxStore.dispatch(b),b}:y=>{this.setState({[p]:a(y)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}});var Rh=d(()=>{"use strict";kn()});var wh=d(()=>{"use strict"});var kh=d(()=>{"use strict";S4();Cd();B4();Ah();Us();Rh();wh()});var Ys,_h=d(()=>{"use strict";Ys=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),p=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?p:a?`${l} ${p}`:l}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var Xs,Nv,In,Iv,z,wt=d(()=>{"use strict";Xs=f(C()),Nv="ft-app-info",In=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};In.eventName="authentication-change";Iv={session:(t,e)=>{(0,Xs.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>z.dispatchEvent(new In(e.payload)),0))}},z=Xs.FtReduxStore.get({name:Nv,reducers:Iv,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}})});var Kd,Th,Qs,iN,Mh=d(()=>{"use strict";Kd=f(H());kh();_h();wt();Th=f(C()),Qs=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},iN=(0,Th.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Ys.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Qs([(0,Kd.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Qs([(0,Kd.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Qs([Sd({store:z.name,selector:r=>{var o,a;return(a=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],e.prototype,"metadataDescriptors",void 0),Qs([Sd({store:z.name})],e.prototype,"uiLocale",void 0),e})});var Ih=bn((qo,Nh)=>{var Js=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,el=function(){function t(){this.fetch=!1,this.DOMException=Js.DOMException}return t.prototype=Js,new t}();(function(t){var e=function(r){var o=typeof t<"u"&&t||typeof self<"u"&&self||typeof global<"u"&&global||{},a={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function i(S){return S&&DataView.prototype.isPrototypeOf(S)}if(a.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(S){return S&&s.indexOf(Object.prototype.toString.call(S))>-1};function p(S){if(typeof S!="string"&&(S=String(S)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(S)||S==="")throw new TypeError('Invalid character in header field name: "'+S+'"');return S.toLowerCase()}function h(S){return typeof S!="string"&&(S=String(S)),S}function y(S){var A={next:function(){var V=S.shift();return{done:V===void 0,value:V}}};return a.iterable&&(A[Symbol.iterator]=function(){return A}),A}function b(S){this.map={},S instanceof b?S.forEach(function(A,V){this.append(V,A)},this):Array.isArray(S)?S.forEach(function(A){if(A.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+A.length);this.append(A[0],A[1])},this):S&&Object.getOwnPropertyNames(S).forEach(function(A){this.append(A,S[A])},this)}b.prototype.append=function(S,A){S=p(S),A=h(A);var V=this.map[S];this.map[S]=V?V+", "+A:A},b.prototype.delete=function(S){delete this.map[p(S)]},b.prototype.get=function(S){return S=p(S),this.has(S)?this.map[S]:null},b.prototype.has=function(S){return this.map.hasOwnProperty(p(S))},b.prototype.set=function(S,A){this.map[p(S)]=h(A)},b.prototype.forEach=function(S,A){for(var V in this.map)this.map.hasOwnProperty(V)&&S.call(A,this.map[V],V,this)},b.prototype.keys=function(){var S=[];return this.forEach(function(A,V){S.push(V)}),y(S)},b.prototype.values=function(){var S=[];return this.forEach(function(A){S.push(A)}),y(S)},b.prototype.entries=function(){var S=[];return this.forEach(function(A,V){S.push([V,A])}),y(S)},a.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function v(S){if(!S._noBody){if(S.bodyUsed)return Promise.reject(new TypeError("Already read"));S.bodyUsed=!0}}function E(S){return new Promise(function(A,V){S.onload=function(){A(S.result)},S.onerror=function(){V(S.error)}})}function L(S){var A=new FileReader,V=E(A);return A.readAsArrayBuffer(S),V}function R(S){var A=new FileReader,V=E(A),Ce=/charset=([A-Za-z0-9_-]+)/.exec(S.type),Fe=Ce?Ce[1]:"utf-8";return A.readAsText(S,Fe),V}function M(S){for(var A=new Uint8Array(S),V=new Array(A.length),Ce=0;Ce<A.length;Ce++)V[Ce]=String.fromCharCode(A[Ce]);return V.join("")}function P(S){if(S.slice)return S.slice(0);var A=new Uint8Array(S.byteLength);return A.set(new Uint8Array(S)),A.buffer}function N(){return this.bodyUsed=!1,this._initBody=function(S){this.bodyUsed=this.bodyUsed,this._bodyInit=S,S?typeof S=="string"?this._bodyText=S:a.blob&&Blob.prototype.isPrototypeOf(S)?this._bodyBlob=S:a.formData&&FormData.prototype.isPrototypeOf(S)?this._bodyFormData=S:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)?this._bodyText=S.toString():a.arrayBuffer&&a.blob&&i(S)?(this._bodyArrayBuffer=P(S.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(S)||l(S))?this._bodyArrayBuffer=P(S):this._bodyText=S=Object.prototype.toString.call(S):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof S=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(S)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var S=v(this);if(S)return S;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var S=v(this);return S||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(a.blob)return this.blob().then(L);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var S=v(this);if(S)return S;if(this._bodyBlob)return R(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(M(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then($e)}),this.json=function(){return this.text().then(JSON.parse)},this}var B=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function U(S){var A=S.toUpperCase();return B.indexOf(A)>-1?A:S}function le(S,A){if(!(this instanceof le))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');A=A||{};var V=A.body;if(S instanceof le){if(S.bodyUsed)throw new TypeError("Already read");this.url=S.url,this.credentials=S.credentials,A.headers||(this.headers=new b(S.headers)),this.method=S.method,this.mode=S.mode,this.signal=S.signal,!V&&S._bodyInit!=null&&(V=S._bodyInit,S.bodyUsed=!0)}else this.url=String(S);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new b(A.headers)),this.method=U(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal||function(){if("AbortController"in o){var ce=new AbortController;return ce.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(V),(this.method==="GET"||this.method==="HEAD")&&(A.cache==="no-store"||A.cache==="no-cache")){var Ce=/([?&])_=[^&]*/;if(Ce.test(this.url))this.url=this.url.replace(Ce,"$1_="+new Date().getTime());else{var Fe=/\?/;this.url+=(Fe.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}le.prototype.clone=function(){return new le(this,{body:this._bodyInit})};function $e(S){var A=new FormData;return S.trim().split("&").forEach(function(V){if(V){var Ce=V.split("="),Fe=Ce.shift().replace(/\+/g," "),ce=Ce.join("=").replace(/\+/g," ");A.append(decodeURIComponent(Fe),decodeURIComponent(ce))}}),A}function Ht(S){var A=new b,V=S.replace(/\r?\n[\t ]+/g," ");return V.split("\r").map(function(Ce){return Ce.indexOf(`
534
+ `)===0?Ce.substr(1,Ce.length):Ce}).forEach(function(Ce){var Fe=Ce.split(":"),ce=Fe.shift().trim();if(ce){var vs=Fe.join(":").trim();try{A.append(ce,vs)}catch(Uc){console.warn("Response "+Uc.message)}}}),A}N.call(le.prototype);function ft(S,A){if(!(this instanceof ft))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=A.statusText===void 0?"":""+A.statusText,this.headers=new b(A.headers),this.url=A.url||"",this._initBody(S)}N.call(ft.prototype),ft.prototype.clone=function(){return new ft(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},ft.error=function(){var S=new ft(null,{status:200,statusText:""});return S.ok=!1,S.status=0,S.type="error",S};var Wr=[301,302,303,307,308];ft.redirect=function(S,A){if(Wr.indexOf(A)===-1)throw new RangeError("Invalid status code");return new ft(null,{status:A,headers:{location:S}})},r.DOMException=o.DOMException;try{new r.DOMException}catch{r.DOMException=function(A,V){this.message=A,this.name=V;var Ce=Error(A);this.stack=Ce.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function pt(S,A){return new Promise(function(V,Ce){var Fe=new le(S,A);if(Fe.signal&&Fe.signal.aborted)return Ce(new r.DOMException("Aborted","AbortError"));var ce=new XMLHttpRequest;function vs(){ce.abort()}ce.onload=function(){var ht={statusText:ce.statusText,headers:Ht(ce.getAllResponseHeaders()||"")};Fe.url.indexOf("file://")===0&&(ce.status<200||ce.status>599)?ht.status=200:ht.status=ce.status,ht.url="responseURL"in ce?ce.responseURL:ht.headers.get("X-Request-URL");var yn="response"in ce?ce.response:ce.responseText;setTimeout(function(){V(new ft(yn,ht))},0)},ce.onerror=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},ce.ontimeout=function(){setTimeout(function(){Ce(new TypeError("Network request timed out"))},0)},ce.onabort=function(){setTimeout(function(){Ce(new r.DOMException("Aborted","AbortError"))},0)};function Uc(ht){try{return ht===""&&o.location.href?o.location.href:ht}catch{return ht}}if(ce.open(Fe.method,Uc(Fe.url),!0),Fe.credentials==="include"?ce.withCredentials=!0:Fe.credentials==="omit"&&(ce.withCredentials=!1),"responseType"in ce&&(a.blob?ce.responseType="blob":a.arrayBuffer&&(ce.responseType="arraybuffer")),A&&typeof A.headers=="object"&&!(A.headers instanceof b||o.Headers&&A.headers instanceof o.Headers)){var $p=[];Object.getOwnPropertyNames(A.headers).forEach(function(ht){$p.push(p(ht)),ce.setRequestHeader(ht,h(A.headers[ht]))}),Fe.headers.forEach(function(ht,yn){$p.indexOf(yn)===-1&&ce.setRequestHeader(yn,ht)})}else Fe.headers.forEach(function(ht,yn){ce.setRequestHeader(yn,ht)});Fe.signal&&(Fe.signal.addEventListener("abort",vs),ce.onreadystatechange=function(){ce.readyState===4&&Fe.signal.removeEventListener("abort",vs)}),ce.send(typeof Fe._bodyInit>"u"?null:Fe._bodyInit)})}return pt.polyfill=!0,o.fetch||(o.fetch=pt,o.Headers=b,o.Request=le,o.Response=ft),r.Headers=b,r.Request=le,r.Response=ft,r.fetch=pt,r}({})})(el);el.fetch.ponyfill=!0;delete el.fetch.polyfill;var La=Js.fetch?Js:el;qo=La.fetch;qo.default=La.fetch;qo.fetch=La.fetch;qo.Headers=La.Headers;qo.Request=La.Request;qo.Response=La.Response;Nh.exports=qo});var qd=d(()=>{});var Ph,zh,$h,Zo,Dh,Bh,Pn,Fh,Uh,Hh,Gh,Vh,Wh,jh,tl,Kh,qh,Aa,Zh,rl,Yh,Xh,to,Ra,Qh,Ke,yr,Jh,Zd=d(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Ph||(Ph={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(zh||(zh={}));(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"})($h||($h={}));(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"})(Zo||(Zo={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Dh||(Dh={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Bh||(Bh={}));(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"})(Pn||(Pn={}));(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"})(Fh||(Fh={}));(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"})(Uh||(Uh={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Hh||(Hh={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Gh||(Gh={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Vh||(Vh={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Wh||(Wh={}));(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"})(jh||(jh={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(tl||(tl={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(Kh||(Kh={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(qh||(qh={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Aa||(Aa={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Zh||(Zh={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(rl||(rl={}));(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"})(Yh||(Yh={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Xh||(Xh={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(to||(to={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Ra||(Ra={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Qh||(Qh={}));(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"})(Ke||(Ke={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(yr||(yr={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Jh||(Jh={}))});var e3,t3,r3,o3,n3,a3,i3,s3,l3=d(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(e3||(e3={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(t3||(t3={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(r3||(r3={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(o3||(o3={}));(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(n3||(n3={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(a3||(a3={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(i3||(i3={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(s3||(s3={}))});var c3=d(()=>{Zd();l3()});function d3(t,e){return t===e||(Pv[t]??[]).some(r=>d3(r,e))}function u3(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>d3(o,e))}var Pv,f3=d(()=>{Zd();Pv={[Ke.PERSONAL_BOOK_SHARE_USER]:[Ke.PERSONAL_BOOK_USER],[Ke.HTML_EXPORT_USER]:[Ke.PERSONAL_BOOK_USER],[Ke.PDF_EXPORT_USER]:[Ke.PERSONAL_BOOK_USER],[Ke.KHUB_ADMIN]:[Ke.CONTENT_PUBLISHER],[Ke.ADMIN]:[Ke.KHUB_ADMIN,Ke.USERS_ADMIN,Ke.PORTAL_ADMIN,Ke.BEHAVIOR_DATA_USER],[Ke.GENERATIVE_AI_EXPORT_USER]:[Ke.GENERATIVE_AI_USER]}});var p3=d(()=>{});var zv,zn=d(()=>{zv=f(Ih(),1);qd();c3();f3();p3();qd()});var $n,Yd=d(()=>{"use strict";wt();$n=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=z.getState(),a=e??o;if(r&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,a,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let a=z.subscribe(()=>{o=t.get(e),o&&(a(),r(o))})}})}}});var ol,h3=d(()=>{"use strict";Yd();ol=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:$n.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):$n.await()}}});var Xd,kt,Yo=d(()=>{"use strict";Xd=f(C());h3();kt=class extends ol{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[p])=>l.localeCompare(p)));let a=this.constructor;a.commonCache=(o=a.commonCache)!==null&&o!==void 0?o:new Xd.CacheRegistry,this.cache=e?a.commonCache:new Xd.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}}});var nl,Qd=d(()=>{"use strict";wt();zn();Yo();nl=class extends kt{async listMySearches(){let{session:e}=z.getState();return u3(e,Ke.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}}});var al,Jd=d(()=>{"use strict";wt();Yo();al=class extends kt{async listMyBookmarks(){let e=z.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}}});var il,m3=d(()=>{"use strict";wt();Yo();il=class extends kt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=z.getState().session;return!!e?.sessionAuthenticated}}});var sl,g3=d(()=>{"use strict";Yo();wt();sl=class extends kt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=z.getState().session;return!!e?.sessionAuthenticated}}});var ll,$v,Dv,v3,eu,tu,y3,b3,er,ru,ou,cl=d(()=>{"use strict";zn();ll=f(C());Qd();Jd();wt();m3();g3();$v="ft-user-assets",Dv={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(yr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:a}=e.payload;tu(t,r,[...eu(t,r),a]),y3(t,r,1,o),b3(t,a)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;tu(t,r,eu(t,r).map(a=>a.id===o.id?o:a)),b3(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:a}=e.payload;tu(t,r,eu(t,r).filter(i=>i.id!==a)),y3(t,r,-1,o)}},v3={[yr.SEARCHES]:"savedSearches",[yr.BOOKMARKS]:"bookmarks",[yr.BOOKS]:void 0,[yr.COLLECTIONS]:void 0},eu=(t,e)=>{var r;let o=v3[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},tu=(t,e,r)=>{let o=v3[e];o&&(t[o]=r)},y3=(t,e,r,o)=>{let a=t.assetCounts.allAsset[e];if(a!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,a+r),e===yr.BOOKMARKS&&o)){let i=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,i+r)}},b3=(t,e)=>{let r=t.assetLabels.map(a=>a.title),o=e.labels.filter(a=>!r.includes(a)).map(a=>({title:a}));t.assetLabels.push(...o)},er=ll.FtReduxStore.get({name:$v,reducers:Dv,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(yr).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ru=class{constructor(e=new il,r=new sl){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new al,this.savedSearchesService=new nl,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=z.getState();(0,ll.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(),er.actions.clearAssetCount(),er.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),er.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),er.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();er.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();er.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&er.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&er.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(er.getState().assetCounts.bookmarkByMap).length!==0;e===yr.BOOKMARKS&&r&&er.actions.clearBookmarkCountByMap(),er.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;er.actions.bookmarks(r)}}},ou=new ru;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ou)});var x3=d(()=>{"use strict";zn();cl()});var nu,S3=d(()=>{"use strict";wt();nu=class{addCommand(e,r=!1){z.commands.add(e,r)}consumeCommand(e){return z.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new nu});var br,C3,wa,Bv,dl,ka,ul,O3=d(()=>{"use strict";wt();br=f(C());Yo();wa=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},Bv=Symbol("clearAfterUnitTest"),dl=class extends(0,br.withEventBus)(kt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[C3]=()=>{this.defaultMessages={},this.cache=new br.CacheRegistry,this.listeners={}},this.currentUiLocale=z.getState().uiLocale,z.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=z.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let a={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};(0,br.deepEqual)(this.defaultMessages[e],a)||(this.defaultMessages[e]=a,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var a;let i=e.toLowerCase(),s=this.resolveContext(i);return new br.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(a){!(a instanceof br.CanceledPromiseError)&&r&&console.error(a)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var a;return(a=this.listeners[e])===null||a===void 0?void 0:a.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new wa({loadedContexts:e})),this.dispatchEvent(new wa({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new wa({loadedContexts:[e]})),this.dispatchEvent(new wa({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,br.delay)(0).then(()=>o()).catch(()=>null)))}};C3=Bv;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends dl{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends dl{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});ka=window.FluidTopicsI18nService,ul=window.FluidTopicsCustomI18nService});var E3,au,L3=d(()=>{"use strict";E3=f(C()),au=class{highlightHtml(e,r,o){(0,E3.highlightHtml)(e,r,o)}};window.FluidTopicsHighlightHtmlService=new au});var A3,iu,R3=d(()=>{"use strict";A3=f(C());wt();iu=class{isDate(e){var r,o,a,i;return(i=(a=((o=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(e,r){var o,a,i,s;if(e==null)return"";try{return A3.DateFormatter.format(e,(o=r?.locale)!==null&&o!==void 0?o:z.getState().uiLocale,(a=r?.longFormat)!==null&&a!==void 0?a:!1,(i=r?.withTime)!==null&&i!==void 0?i:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new iu});var w3,Eo,su=d(()=>{"use strict";w3=f(C());wt();Eo=class{static get(e,r){var o,a;let i=z.getState(),{lang:s,region:l}=(a=(o=i.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new w3.SearchPlaceConverter(i.baseUrl,e??20,i.searchInAllLanguagesAllowed,r??`${s}-${l}`)}}});var fl,k3=d(()=>{"use strict";Yo();fl=class extends kt{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,a])=>Array.isArray(a)?[o,a.map(i=>typeof i=="object"&&i!=null&&!Array.isArray(i)?this.sortEventArrays(i):i).sort((i,s)=>typeof i=="object"&&i!==null&&"key"in i?i.key.localeCompare(s.key):typeof i=="string"&&typeof s=="string"?i.localeCompare(s):String(i).localeCompare(String(s)))]:typeof a=="object"&&a!==null?[o,this.sortEventArrays(a)]:[o,a]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(a=>(console.info(r),console.debug(a),o)),1e3)}}});var lu,_3=d(()=>{"use strict";su();lu=class{urlToSearchRequest(e){return Eo.get().parse(e)}searchRequestToUrl(e){return Eo.get().serialize(e)}};window.FluidTopicsUrlService=new lu});var Dn,T3=d(()=>{"use strict";Dn=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Dn.eventName="change"});var cu,M3,N3=d(()=>{"use strict";cu=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))}},M3=new cu});var Xo,pl,I3=d(()=>{"use strict";Xo=f(C());T3();N3();pl=class t extends Xo.WithEventBus{static build(){return new t(window.history,M3,()=>window.location,!1)}constructor(e,r,o,a){var i,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(i=e.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Xo.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Dn(this.currentItem())),0)}installProxies(){let e=r=>(o,a,[i,s,l])=>{let p=r(),h={...p===this.currentIndex?this.currentState:void 0,...i,index:p,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(a,[h,s,l]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Dn.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Dn.eventName,e)}currentItem(){return(0,Xo.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,Xo.deepCopy)(this.states[this.previousDifferentMajorPosition()])}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,Xo.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 o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let a=e,i=e+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let a=r??this.currentState.majorStateId,i=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}}});var P3=d(()=>{"use strict";I3();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=pl.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)})});var z3=d(()=>{"use strict";wt()});var du=d(()=>{"use strict";Jd();Yd();S3();O3();Yo();L3();Qd();R3();su();k3();_3();P3();z3()});var $3,D3,uu=d(()=>{"use strict";$3=f(w()),D3=$3.css`
535
535
  `});var B3=d(()=>{"use strict"});function F3(t,e){let{authenticationRequired:r,session:o}=z.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var U3=d(()=>{"use strict";wt()});var H3,yt,Pr,at,Te,fu=d(()=>{"use strict";H3=f(w()),yt=f(H()),Pr=f(C());uu();wt();du();U3();at=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Te=class extends Pr.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>$n.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Pr.CacheRegistry,this.cleanSessionDebouncer=new Pr.Debouncer,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return H3.html`
536
536
  <slot></slot>
537
537
  `}connectedCallback(){super.connectedCallback(),z.addEventListener(In.eventName,this.reloadConfiguration)}disconnectedCallback(){z.addEventListener(In.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,a,i,s,l,p;super.update(e),e.has("baseUrl")&&(z.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&z.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&z.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&z.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&z.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&z.actions.noCustom(this.noCustom),e.has("editorMode")&&z.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&z.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&z.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(h=>ka.addContext(h)),e.has("openExternalDocumentInNewTab")&&z.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&z.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&z.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(z.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),z.actions.availableUiLocales((a=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&a!==void 0?a:[]),z.actions.searchInAllLanguagesAllowed((s=(i=this.localesConfiguration)===null||i===void 0?void 0:i.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&z.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&z.actions.availableContentLocales((p=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&p!==void 0?p:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>F3(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Te.elementDefinitions={};Te.styles=D3;at([(0,yt.property)()],Te.prototype,"baseUrl",void 0);at([(0,yt.property)()],Te.prototype,"apiIntegrationIdentifier",void 0);at([(0,yt.property)()],Te.prototype,"apiIntegrationAppVersion",void 0);at([(0,yt.property)()],Te.prototype,"uiLocale",void 0);at([(0,Pr.jsonProperty)(null)],Te.prototype,"availableUiLocales",void 0);at([(0,Pr.jsonProperty)(null)],Te.prototype,"metadataConfiguration",void 0);at([(0,yt.property)({type:Boolean})],Te.prototype,"editorMode",void 0);at([(0,yt.property)({type:Boolean})],Te.prototype,"noCustom",void 0);at([(0,yt.property)({type:Boolean})],Te.prototype,"openExternalDocumentInNewTab",void 0);at([(0,yt.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],Te.prototype,"noCustomComponent",void 0);at([(0,yt.property)({type:Boolean})],Te.prototype,"withManualResources",void 0);at([(0,yt.property)({type:Boolean})],Te.prototype,"navigatorOnline",void 0);at([(0,yt.property)({type:Boolean})],Te.prototype,"forcedOffline",void 0);at([(0,yt.property)({type:Object})],Te.prototype,"apiProvider",void 0);at([(0,yt.property)({type:Boolean})],Te.prototype,"authenticationRequired",void 0);at([(0,Pr.jsonProperty)([])],Te.prototype,"messageContexts",void 0);at([(0,Pr.jsonProperty)(void 0)],Te.prototype,"session",void 0);at([(0,yt.state)()],Te.prototype,"localesConfiguration",void 0);at([(0,yt.state)()],Te.prototype,"availableContentLocales",void 0)});var G3,V3=d(()=>{"use strict";G3=f(C());fu();(0,G3.customElement)("ft-app-context")(Te)});var ro=d(()=>{"use strict";Mh();wt();cl();x3();du();uu();B3();fu();V3()});var pu,_a,hl=d(()=>{"use strict";pu=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},_a=new pu});var Ta,W3,Fv,Ri,j3,K3,ml,Ai,Wt,gl,yl,wi=d(()=>{"use strict";Ta=f(C());ro();W3=f(H());hl();Fv=function(t,e,r,o){var a=arguments.length,i=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(i=(a<3?s(i):a>3?s(e,r,i):s(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},Ri=Symbol("i18nAttributes"),j3=Symbol("i18nListAttributes"),K3=Symbol("i18nProperties"),ml=Symbol("i18nContexts"),Ai=Symbol("i18nUnsubs"),Wt=(0,Ta.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ul:ka}i18n(i){let{context:s,key:l,message:p}=i,{custom:h,args:y,argsProvider:b}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,h);let v=y??(b?b(this):[]);return this.getI18nService(h).resolveMessage(s,l,...v)}return p}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(_a.isI18nKey(i)){let[l,p]=i.split(".");return this.i18n({custom:!0,context:l,key:p,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,p)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,p)=>{var h;return((h=p?.context)===null||h===void 0?void 0:h.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let p=this,h=(y,b,v)=>v?.context&&v.key&&i(y,b,v)?{...v,message:this.i18n({context:v.context,key:v.key,custom:v.custom,...y})}:v;(s=this[Ri])===null||s===void 0||s.forEach((y,b)=>p[b]=h(y,b,p[b])),(l=this[j3])===null||l===void 0||l.forEach((y,b)=>{var v;return p[b]=(v=p[b])===null||v===void 0?void 0:v.map(E=>h(y,b,E))})}updateI18nProperties(i){var s;(s=this[K3])===null||s===void 0||s.forEach((l,p)=>{i(l,p)&&(this[p]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let p=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[ml].set(p,{isCustomContext:l}),this[Ai].has(p)||this[Ai].set(p,this.getI18nService(l).subscribe(p,()=>this.onI18nUpdate(p))),this.getI18nService(l).prepareContext(p,s)}hasI18nContext(i){return this[ml].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ml].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ai].forEach(i=>i()),this[Ai].clear()}}return e=ml,r=Ai,Fv([(0,W3.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),gl=class extends Wt(Ta.FtLitElement){},yl=class extends Wt(Ta.FtLitElementRedux){}});var hu,Uv,q3=d(()=>{"use strict";hl();hu=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?_a.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Uv=new hu});var Z3,Ma,bl=d(()=>{"use strict";wi();Z3=f(C());hl();q3();Ma=(t,e)=>(r,o)=>{var a;r.constructor.createProperty(o,{type:Object,hasChanged:Z3.hasChanged,converter:_a,...e}),r[Ri]=(a=r[Ri])!==null&&a!==void 0?a:new Map,r[Ri].set(o,t??{})}});var oo,Y3=d(()=>{"use strict";ro();oo=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?ul:ka}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(o,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(o,a)=>()=>a}),this.attributes=new Proxy({},{get:(o,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}}});var X3=d(()=>{"use strict";wi()});var Q3,J3,mu=d(()=>{"use strict";Q3=f(w()),J3=Q3.css`
@@ -45,7 +45,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
45
45
  display: none;
46
46
  }
47
47
  `});var Ph={};var Gd=u(()=>{"use strict"});var Vd={};oe(Vd,{ParametrizedLabelResolver:()=>ko});var ko,Wd=u(()=>{"use strict";ko=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,n;e=this.resolvePluralKey(e,r);let a=(n=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&n!==void 0?n:"";return t.replaceParameters(a,...r)}static replaceParameters(e,...r){return r.forEach((o,n)=>e=e.replace(new RegExp(`\\{${n}([^}]*)\\}`,"g"),(a,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let n=`${String(e)}[\\=${o}]`;if(n in this.labels||n in this.defaultLabels)return n}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=n=>r?.includes("date")?e.toLocaleDateString(n):r?.includes("time")?e.toLocaleTimeString(n):e.toLocaleString(n);try{return o(document.documentElement.lang)}catch{return o()}}}});var b5,Te,v5,Ih=u(()=>{"use strict";kt();J();b5=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Te=t=>{let e=t??{};return(r,o)=>{var n;let a={hasChanged:Vt,attribute:!1,...e};h(a)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(n=e.selector)!==null&&n!==void 0?n:l=>l[o],store:e.store})}},v5=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)}});var pa,jd=u(()=>{"use strict";pa=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}}});function on(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ms=u(()=>{"use strict"});var fa,To,bi,$h,Er,zh=u(()=>{"use strict";ca();Ms();kt();fa=Symbol("internalReduxEventsUnsubscribers"),To=Symbol("internalStoresUnsubscribers"),bi=Symbol("internalStores"),$h=We(Symbol("withRedux"),function(t){var e,r,o;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[bi].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[bi].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[bi].get(s)}addStore(s,l){var d;l=(d=l??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(l),this[bi].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[bi].delete(l)}setupStores(){this.unsubscribeFromStores(),this[bi].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let d=this.constructor.getPropertyOptions(l);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[To].has(s.store):this[To].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var d;this[To].set(s,l.subscribe(()=>this.updateFromStores())),this[fa].set(s,[]),on(l)&&l.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=b=>this[m](b);l.addEventListener(p.eventName,g),this[fa].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[To].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[To].has(s)&&this[To].get(s)(),this[To].delete(s),(l=this[fa].get(s))===null||l===void 0||l.forEach(d=>d()),this[fa].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=To,r=bi,o=fa,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Er=class extends $h(W){}});function sr(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var n,a;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function co(t){return!!t&&!!t[Ge]}function Lr(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var n=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===R5}(t)||Array.isArray(t)||!!t[Vh]||!!(!((e=t.constructor)===null||e===void 0)&&e[Vh])||tu(t)||ru(t))}function vi(t,e,r){r===void 0&&(r=!1),sn(t)===0?(r?Object.keys:an)(t).forEach(function(o){r&&typeof o=="symbol"||e(o,t[o],t)}):t.forEach(function(o,n){return e(n,o,t)})}function sn(t){var e=t[Ge];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:tu(t)?2:ru(t)?3:0}function nn(t,e){return sn(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function x5(t,e){return sn(t)===2?t.get(e):t[e]}function Wh(t,e,r){var o=sn(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function jh(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function tu(t){return L5&&t instanceof Map}function ru(t){return A5&&t instanceof Set}function Mo(t){return t.o||t.t}function ou(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Zh(t);delete e[Ge];for(var r=an(e),o=0;o<r.length;o++){var n=r[o],a=e[n];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[n]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function iu(t,e){return e===void 0&&(e=!1),nu(t)||co(t)||!Lr(t)||(sn(t)>1&&(t.set=t.add=t.clear=t.delete=S5),Object.freeze(t),e&&vi(t,function(r,o){return iu(o,!0)},!0)),t}function S5(){sr(2)}function nu(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Br(t){var e=eu[t];return e||sr(18,t),e}function C5(t,e){eu[t]||(eu[t]=e)}function Xd(){return ma}function Kd(t,e){e&&(Br("Patches"),t.u=[],t.s=[],t.v=e)}function Ns(t){Qd(t),t.p.forEach(O5),t.p=null}function Qd(t){t===ma&&(ma=t.l)}function Dh(t){return ma={p:[],l:ma,h:t,m:!0,_:0}}function O5(t){var e=t[Ge];e.i===0||e.i===1?e.j():e.g=!0}function qd(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||Br("ES5").S(e,t,o),o?(r[Ge].P&&(Ns(e),sr(4)),Lr(t)&&(t=Ps(e,t),e.l||Is(e,t)),e.u&&Br("Patches").M(r[Ge].t,t,e.u,e.s)):t=Ps(e,r,[]),Ns(e),e.u&&e.v(e.u,e.s),t!==qh?t:void 0}function Ps(t,e,r){if(nu(e))return e;var o=e[Ge];if(!o)return vi(e,function(l,d){return Bh(t,o,e,l,d,r)},!0),e;if(o.A!==t)return e;if(!o.P)return Is(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=o.i===4||o.i===5?o.o=ou(o.k):o.o,a=n,s=!1;o.i===3&&(a=new Set(n),n.clear(),s=!0),vi(a,function(l,d){return Bh(t,o,n,l,d,r,s)}),Is(t,n,!1),r&&t.u&&Br("Patches").N(o,r,t.u,t.s)}return o.o}function Bh(t,e,r,o,n,a,s){if(co(n)){var l=Ps(t,n,a&&e&&e.i!==3&&!nn(e.R,o)?a.concat(o):void 0);if(Wh(r,o,l),!co(l))return;t.m=!1}else s&&r.add(n);if(Lr(n)&&!nu(n)){if(!t.h.D&&t._<1)return;Ps(t,n),e&&e.A.l||Is(t,n)}}function Is(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&iu(e,r)}function Zd(t,e){var r=t[Ge];return(r?Mo(r):t)[e]}function Fh(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function No(t){t.P||(t.P=!0,t.l&&No(t.l))}function Yd(t){t.o||(t.o=ou(t.t))}function Jd(t,e,r){var o=tu(e)?Br("MapSet").F(e,r):ru(e)?Br("MapSet").T(e,r):t.O?function(n,a){var s=Array.isArray(n),l={i:s?1:0,A:a?a.A:Xd(),P:!1,I:!1,R:{},l:a,t:n,k:null,o:null,j:null,C:!1},d=l,p=ga;s&&(d=[l],p=ha);var m=Proxy.revocable(d,p),g=m.revoke,b=m.proxy;return l.k=b,l.j=g,b}(e,r):Br("ES5").J(e,r);return(r?r.A:Xd()).p.push(o),o}function E5(t){return co(t)||sr(22,t),function e(r){if(!Lr(r))return r;var o,n=r[Ge],a=sn(r);if(n){if(!n.P&&(n.i<4||!Br("ES5").K(n)))return n.t;n.I=!0,o=Uh(r,a),n.I=!1}else o=Uh(r,a);return vi(o,function(s,l){n&&x5(n.t,s)===l||Wh(o,s,e(l))}),a===3?new Set(o):o}(t)}function Uh(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ou(t)}function Kh(){function t(s,l){var d=a[s];return d?d.enumerable=l:a[s]=d={configurable:!0,enumerable:l,get:function(){var p=this[Ge];return ga.get(p,s)},set:function(p){var m=this[Ge];ga.set(m,s,p)}},d}function e(s){for(var l=s.length-1;l>=0;l--){var d=s[l][Ge];if(!d.P)switch(d.i){case 5:o(d)&&No(d);break;case 4:r(d)&&No(d)}}}function r(s){for(var l=s.t,d=s.k,p=an(d),m=p.length-1;m>=0;m--){var g=p[m];if(g!==Ge){var b=l[g];if(b===void 0&&!nn(l,g))return!0;var E=d[g],L=E&&E[Ge];if(L?L.t!==b:!jh(E,b))return!0}}var N=!!l[Ge];return p.length!==an(l).length+(N?0:1)}function o(s){var l=s.k;if(l.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function n(s){s.g&&sr(3,JSON.stringify(Mo(s)))}var a={};C5("ES5",{J:function(s,l){var d=Array.isArray(s),p=function(g,b){if(g){for(var E=Array(b.length),L=0;L<b.length;L++)Object.defineProperty(E,""+L,t(L,!0));return E}var N=Zh(b);delete N[Ge];for(var z=an(N),B=0;B<z.length;B++){var F=z[B];N[F]=t(F,g||!!N[F].enumerable)}return Object.create(Object.getPrototypeOf(b),N)}(d,s),m={i:d?5:4,A:l?l.A:Xd(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,Ge,{value:m,writable:!0}),p},S:function(s,l,d){d?co(l)&&l[Ge].A===s&&e(s.p):(s.u&&function p(m){if(m&&typeof m=="object"){var g=m[Ge];if(g){var b=g.t,E=g.k,L=g.R,N=g.i;if(N===4)vi(E,function(A){A!==Ge&&(b[A]!==void 0||nn(b,A)?L[A]||p(E[A]):(L[A]=!0,No(g)))}),vi(b,function(A){E[A]!==void 0||nn(E,A)||(L[A]=!1,No(g))});else if(N===5){if(o(g)&&(No(g),L.length=!0),E.length<b.length)for(var z=E.length;z<b.length;z++)L[z]=!1;else for(var B=b.length;B<E.length;B++)L[B]=!0;for(var F=Math.min(E.length,b.length),k=0;k<F;k++)E.hasOwnProperty(k)||(L[k]=!0),L[k]===void 0&&p(E[k])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Hh,ma,au,L5,A5,Gh,qh,Vh,Ge,R5,an,Zh,eu,ga,ha,w5,jt,_5,hT,mT,gT,yT,bT,vT,$s,zs=u(()=>{au=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",L5=typeof Map<"u",A5=typeof Set<"u",Gh=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",qh=au?Symbol.for("immer-nothing"):((Hh={})["immer-nothing"]=!0,Hh),Vh=au?Symbol.for("immer-draftable"):"__$immer_draftable",Ge=au?Symbol.for("immer-state"):"__$immer_state",R5=""+Object.prototype.constructor,an=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Zh=Object.getOwnPropertyDescriptors||function(t){var e={};return an(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},eu={},ga={get:function(t,e){if(e===Ge)return t;var r=Mo(t);if(!nn(r,e))return function(n,a,s){var l,d=Fh(a,s);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(n.k):void 0}(t,r,e);var o=r[e];return t.I||!Lr(o)?o:o===Zd(t.t,e)?(Yd(t),t.o[e]=Jd(t.A.h,o,t)):o},has:function(t,e){return e in Mo(t)},ownKeys:function(t){return Reflect.ownKeys(Mo(t))},set:function(t,e,r){var o=Fh(Mo(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var n=Zd(Mo(t),e),a=n?.[Ge];if(a&&a.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(jh(r,n)&&(r!==void 0||nn(t.t,e)))return!0;Yd(t),No(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Zd(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Yd(t),No(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Mo(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){sr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){sr(12)}},ha={};vi(ga,function(t,e){ha[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),ha.deleteProperty=function(t,e){return ha.set.call(this,t,e,void 0)},ha.set=function(t,e,r){return ga.set.call(this,t[0],e,r,t[0])};w5=function(){function t(r){var o=this;this.O=Gh,this.D=!0,this.produce=function(n,a,s){if(typeof n=="function"&&typeof a!="function"){var l=a;a=n;var d=o;return function(N){var z=this;N===void 0&&(N=l);for(var B=arguments.length,F=Array(B>1?B-1:0),k=1;k<B;k++)F[k-1]=arguments[k];return d.produce(N,function(A){var P;return(P=a).call.apply(P,[z,A].concat(F))})}}var p;if(typeof a!="function"&&sr(6),s!==void 0&&typeof s!="function"&&sr(7),Lr(n)){var m=Dh(o),g=Jd(o,n,void 0),b=!0;try{p=a(g),b=!1}finally{b?Ns(m):Qd(m)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(N){return Kd(m,s),qd(N,m)},function(N){throw Ns(m),N}):(Kd(m,s),qd(p,m))}if(!n||typeof n!="object"){if((p=a(n))===void 0&&(p=n),p===qh&&(p=void 0),o.D&&iu(p,!0),s){var E=[],L=[];Br("Patches").M(n,p,E,L),s(E,L)}return p}sr(21,n)},this.produceWithPatches=function(n,a){if(typeof n=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),b=1;b<m;b++)g[b-1]=arguments[b];return o.produceWithPatches(p,function(E){return n.apply(void 0,[E].concat(g))})};var s,l,d=o.produce(n,a,function(p,m){s=p,l=m});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,s,l]}):[d,s,l]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Lr(r)||sr(8),co(r)&&(r=E5(r));var o=Dh(this),n=Jd(this,r,void 0);return n[Ge].C=!0,Qd(o),n},e.finishDraft=function(r,o){var n=r&&r[Ge],a=n.A;return Kd(a,o),qd(void 0,a)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Gh&&sr(20),this.O=r},e.applyPatches=function(r,o){var n;for(n=o.length-1;n>=0;n--){var a=o[n];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}n>-1&&(o=o.slice(n+1));var s=Br("Patches").$;return co(r)?s(r,o):this.produce(r,function(l){return s(l,o)})},t}(),jt=new w5,_5=jt.produce,hT=jt.produceWithPatches.bind(jt),mT=jt.setAutoFreeze.bind(jt),gT=jt.setUseProxies.bind(jt),yT=jt.applyPatches.bind(jt),bT=jt.createDraft.bind(jt),vT=jt.finishDraft.bind(jt),$s=_5});function xi(t){"@babel/helpers - typeof";return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xi(t)}var su=u(()=>{});function Yh(t,e){if(xi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(xi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xh=u(()=>{su()});function Qh(t){var e=Yh(t,"string");return xi(e)=="symbol"?e:e+""}var Jh=u(()=>{su();Xh()});function e4(t,e,r){return(e=Qh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var t4=u(()=>{Jh()});function r4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function lu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?r4(Object(r),!0).forEach(function(o){e4(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):r4(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}var o4=u(()=>{t4()});function Ot(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. "}function k5(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function du(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ot(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ot(1));return r(du)(t,e)}if(typeof t!="function")throw new Error(Ot(2));var n=t,a=e,s=[],l=s,d=!1;function p(){l===s&&(l=s.slice())}function m(){if(d)throw new Error(Ot(3));return a}function g(N){if(typeof N!="function")throw new Error(Ot(4));if(d)throw new Error(Ot(5));var z=!0;return p(),l.push(N),function(){if(z){if(d)throw new Error(Ot(6));z=!1,p();var F=l.indexOf(N);l.splice(F,1),s=null}}}function b(N){if(!k5(N))throw new Error(Ot(7));if(typeof N.type>"u")throw new Error(Ot(8));if(d)throw new Error(Ot(9));try{d=!0,a=n(a,N)}finally{d=!1}for(var z=s=l,B=0;B<z.length;B++){var F=z[B];F()}return N}function E(N){if(typeof N!="function")throw new Error(Ot(10));n=N,b({type:Ds.REPLACE})}function L(){var N,z=g;return N={subscribe:function(F){if(typeof F!="object"||F===null)throw new Error(Ot(11));function k(){F.next&&F.next(m())}k();var A=z(k);return{unsubscribe:A}}},N[i4]=function(){return this},N}return b({type:Ds.INIT}),o={dispatch:b,subscribe:g,getState:m,replaceReducer:E},o[i4]=L,o}function T5(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:Ds.INIT});if(typeof o>"u")throw new Error(Ot(12));if(typeof r(void 0,{type:Ds.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ot(13))})}function n4(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var n=e[o];typeof t[n]=="function"&&(r[n]=t[n])}var a=Object.keys(r),s,l;try{T5(r)}catch(d){l=d}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var b=!1,E={},L=0;L<a.length;L++){var N=a[L],z=r[N],B=p[N],F=z(B,m);if(typeof F>"u"){var k=m&&m.type;throw new Error(Ot(14))}E[N]=F,b=b||F!==B}return b=b||a.length!==Object.keys(p).length,b?E:p}}function ln(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,n){return function(){return o(n.apply(void 0,arguments))}})}function a4(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var n=o.apply(void 0,arguments),a=function(){throw new Error(Ot(15))},s={getState:n.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(d){return d(s)});return a=ln.apply(void 0,l)(n.dispatch),lu(lu({},n),{},{dispatch:a})}}}var i4,cu,Ds,Bs=u(()=>{o4();i4=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cu=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ds={INIT:"@@redux/INIT"+cu(),REPLACE:"@@redux/REPLACE"+cu(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cu()}}});function s4(t){var e=function(o){var n=o.dispatch,a=o.getState;return function(s){return function(l){return typeof l=="function"?l(n,a,t):s(l)}}};return e}var l4,uu,c4=u(()=>{l4=s4();l4.withExtraArgument=s4;uu=l4});function F5(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function mu(t){return Lr(t)?$s(t,function(){}):t}function G5(t){return typeof t=="boolean"}function V5(){return function(e){return W5(e)}}function W5(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,n=o===void 0?!0:o,a=t.serializableCheck,s=a===void 0?!0:a,l=new U5;if(r&&(G5(r)?l.push(uu):l.push(uu.withExtraArgument(r.extraArgument))),0){if(n)var d;if(s)var p}return l}function m4(t){var e=V5(),r=t||{},o=r.reducer,n=o===void 0?void 0:o,a=r.middleware,s=a===void 0?e():a,l=r.devTools,d=l===void 0?!0:l,p=r.preloadedState,m=p===void 0?void 0:p,g=r.enhancers,b=g===void 0?void 0:g,E;if(typeof n=="function")E=n;else if(F5(n))E=n4(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var L=s;if(typeof L=="function"&&(L=L(e),!fu&&!Array.isArray(L)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!fu&&L.some(function(A){return typeof A!="function"}))throw new Error("each middleware provided to configureStore must be a function");var N=a4.apply(void 0,L),z=ln;d&&(z=B5(Po({trace:!fu},typeof d=="object"&&d)));var B=new H5(N),F=B;Array.isArray(b)?F=cn([N],b):typeof b=="function"&&(F=b(B));var k=z.apply(void 0,F);return du(E,m,k)}function Io(t,e){function r(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(e){var a=e.apply(void 0,o);if(!a)throw new Error("prepareAction did not return an object");return Po(Po({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}function g4(t){var e={},r=[],o,n={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,n},addMatcher:function(a,s){return r.push({matcher:a,reducer:s}),n},addDefaultCase:function(a){return o=a,n}};return t(n),[e,r,o]}function j5(t){return typeof t=="function"}function K5(t,e,r,o){r===void 0&&(r=[]);var n=typeof e=="function"?g4(e):[e,r,o],a=n[0],s=n[1],l=n[2],d;if(j5(t))d=function(){return mu(t())};else{var p=mu(t);d=function(){return p}}function m(g,b){g===void 0&&(g=d());var E=cn([a[b.type]],s.filter(function(L){var N=L.matcher;return N(b)}).map(function(L){var N=L.reducer;return N}));return E.filter(function(L){return!!L}).length===0&&(E=[l]),E.reduce(function(L,N){if(N)if(co(L)){var z=L,B=N(z,b);return B===void 0?L:B}else{if(Lr(L))return $s(L,function(F){return N(F,b)});var B=N(L,b);if(B===void 0){if(L===null)return L;throw Error("A case reducer on a non-draftable value must not return undefined")}return B}return L},g)}return m.getInitialState=d,m}function q5(t,e){return t+"/"+e}function y4(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:mu(t.initialState),o=t.reducers||{},n=Object.keys(o),a={},s={},l={};n.forEach(function(m){var g=o[m],b=q5(e,m),E,L;"reducer"in g?(E=g.reducer,L=g.prepare):E=g,a[m]=E,s[b]=E,l[m]=L?Io(b,L):Io(b)});function d(){var m=typeof t.extraReducers=="function"?g4(t.extraReducers):[t.extraReducers],g=m[0],b=g===void 0?{}:g,E=m[1],L=E===void 0?[]:E,N=m[2],z=N===void 0?void 0:N,B=Po(Po({},b),s);return K5(r,function(F){for(var k in B)F.addCase(k,B[k]);for(var A=0,P=L;A<P.length;A++){var K=P[A];F.addMatcher(K.matcher,K.reducer)}z&&F.addDefaultCase(z)})}var p;return{name:e,reducer:function(m,g){return p||(p=d()),p(m,g)},actions:l,caseReducers:a,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}function J5(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function e7(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var h4,M5,cn,N5,P5,I5,d4,$5,z5,u4,Po,pu,D5,B5,zT,U5,H5,fu,Z5,Y5,X5,hu,p4,Q5,UT,b4,v4,x4,HT,GT,VT,WT,gu,jT,KT,qT,f4,ZT,t7,YT,S4=u(()=>{zs();Bs();Bs();Bs();c4();zs();zs();h4=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(o[a]=n[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),M5=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return d([p,m])}}function d(p){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=p[0]&2?n.return:p[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;switch(n=0,a&&(p=[p[0]&2,a.value]),p[0]){case 0:case 1:a=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,n=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1],a=p;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(p);break}a[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(m){p=[6,m],n=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},cn=function(t,e){for(var r=0,o=e.length,n=t.length;r<o;r++,n++)t[n]=e[r];return t},N5=Object.defineProperty,P5=Object.defineProperties,I5=Object.getOwnPropertyDescriptors,d4=Object.getOwnPropertySymbols,$5=Object.prototype.hasOwnProperty,z5=Object.prototype.propertyIsEnumerable,u4=function(t,e,r){return e in t?N5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Po=function(t,e){for(var r in e||(e={}))$5.call(e,r)&&u4(t,r,e[r]);if(d4)for(var o=0,n=d4(e);o<n.length;o++){var r=n[o];z5.call(e,r)&&u4(t,r,e[r])}return t},pu=function(t,e){return P5(t,I5(e))},D5=function(t,e,r){return new Promise(function(o,n){var a=function(d){try{l(r.next(d))}catch(p){n(p)}},s=function(d){try{l(r.throw(d))}catch(p){n(p)}},l=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(a,s)};l((r=r.apply(t,e)).next())})},B5=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ln:ln.apply(null,arguments)},zT=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};U5=function(t){h4(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,cn([void 0],r[0].concat(this)))):new(e.bind.apply(e,cn([void 0],r.concat(this))))},e}(Array),H5=function(t){h4(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var n=t.apply(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,cn([void 0],r[0].concat(this)))):new(e.bind.apply(e,cn([void 0],r.concat(this))))},e}(Array);fu=!0;Z5="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Y5=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=Z5[Math.random()*64|0];return e},X5=["name","message","stack","code"],hu=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),p4=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),Q5=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=X5;r<o.length;r++){var n=o[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},UT=function(){function t(e,r,o){var n=Io(e+"/fulfilled",function(m,g,b,E){return{payload:m,meta:pu(Po({},E||{}),{arg:b,requestId:g,requestStatus:"fulfilled"})}}),a=Io(e+"/pending",function(m,g,b){return{payload:void 0,meta:pu(Po({},b||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=Io(e+"/rejected",function(m,g,b,E,L){return{payload:E,error:(o&&o.serializeError||Q5)(m||"Rejected"),meta:pu(Po({},L||{}),{arg:b,requestId:g,rejectedWithValue:!!E,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,d=typeof AbortController<"u"?AbortController:function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m}();function p(m){return function(g,b,E){var L=o?.idGenerator?o.idGenerator(m):Y5(),N=new d,z,B=!1;function F(A){z=A,N.abort()}var k=function(){return D5(this,null,function(){var A,P,K,te,ye,me,X;return M5(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,,5]),te=(A=o?.condition)==null?void 0:A.call(o,m,{getState:b,extra:E}),e7(te)?[4,te]:[3,2];case 1:te=C.sent(),C.label=2;case 2:if(te===!1||N.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return B=!0,ye=new Promise(function(M,Z){return N.signal.addEventListener("abort",function(){return Z({name:"AbortError",message:z||"Aborted"})})}),g(a(L,m,(P=o?.getPendingMeta)==null?void 0:P.call(o,{requestId:L,arg:m},{getState:b,extra:E}))),[4,Promise.race([ye,Promise.resolve(r(m,{dispatch:g,getState:b,extra:E,requestId:L,signal:N.signal,abort:F,rejectWithValue:function(M,Z){return new hu(M,Z)},fulfillWithValue:function(M,Z){return new p4(M,Z)}})).then(function(M){if(M instanceof hu)throw M;return M instanceof p4?n(M.payload,L,m,M.meta):n(M,L,m)})])];case 3:return K=C.sent(),[3,5];case 4:return me=C.sent(),K=me instanceof hu?s(null,L,m,me.payload,me.meta):s(me,L,m),[3,5];case 5:return X=o&&!o.dispatchConditionRejection&&s.match(K)&&K.meta.condition,X||g(K),[2,K]}})})}();return Object.assign(k,{abort:F,requestId:L,arg:m,unwrap:function(){return k.then(J5)}})}}return Object.assign(p,{pending:a,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t}();b4="listener",v4="completed",x4="cancelled",HT="task-"+x4,GT="task-"+v4,VT=b4+"-"+x4,WT=b4+"-"+v4,gu="listenerMiddleware",jT=Io(gu+"/add"),KT=Io(gu+"/removeAll"),qT=Io(gu+"/remove"),ZT=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(f4||(f4=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},t7=function(t){return function(e){setTimeout(e,t)}},YT=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:t7(10);Kh()});function r7(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))on(e)&&e.clear()}var uo,C4=u(()=>{"use strict";S4();Ms();jd();Yi();kt();window.ftReduxStores||(window.ftReduxStores={});uo=class t extends so{static get(e){var r;let o=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,a=window.ftReduxStores[o];if(on(a))return a;if(n==null)return;let s=y4({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),l=m4({reducer:(d,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=si(s.getInitialState());for(let g of p.keeping)m[g]=(d??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...p.overwrites};return s.reducer(d,p)}});return window.ftReduxStores[n.name]=new t(s,l,n.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new pa;let n=a=>a!=null?JSON.parse(JSON.stringify(a)):a;this.actions=new Proxy(this.reduxSlice.actions,{get:(a,s,l)=>{let d=s,p=a[d];return p?(...m)=>{let g=p(...m.map(n));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[d]:n(m)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}});function dn(t,e,r){return new Fs(t,e,r).watch()}var Fs,O4=u(()=>{"use strict";kt();Fs=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);Vt(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}}});var ya,E4=u(()=>{"use strict";ya=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}}});var yu={};oe(yu,{FtCommandQueue:()=>pa,FtLitElementRedux:()=>Er,FtReduxStore:()=>uo,FtStateManager:()=>ya,ReduxWatcher:()=>Fs,clearAllStores:()=>r7,isFtReduxStore:()=>on,redux:()=>Te,reduxEventListener:()=>v5,reduxReactive:()=>b5,watch:()=>dn,withRedux:()=>$h});var Us=u(()=>{"use strict";Ih();jd();zh();C4();Ms();O4();E4()});var Su={};oe(Su,{scrollHelper:()=>xu});var bu,Hs,vu,xu,Cu=u(()=>{"use strict";kt();Hs=new Map,vu=class{lock(e,r){if(r){let o=Hs.get(r);if(o==null||o===e)return Hs.set(r,e),r}}release(e,r){r&&Hs.get(r)===e&&Hs.delete(r)}findFirstScrollableParent(e){var r;let o,n;for(let a of Mc(e)){let s=a,l=this.elementCanScroll(s);if(l&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else l&&n==null&&(n=s)}return(r=o??n)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,n;let a=0;for(;r&&r.offsetParent!==e.offsetParent;)a+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return a+((n=r?.offsetTop)!==null&&n!==void 0?n:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let n=this.getAbsoluteScrollOffset(o,e),a=n-o.clientHeight+e.clientHeight,s=n,l=ao(0,(s-o.scrollTop)/(s-a),1),d=this.computeTopOffsetRatio(r?.position,l)*(a-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(bu=window.FluidTopicsScrollHelper)!==null&&bu!==void 0?bu:new vu;xu=window.FluidTopicsScrollHelper});var A4=H8(($o,L4)=>{var Gs=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Vs=function(){function t(){this.fetch=!1,this.DOMException=Gs.DOMException}return t.prototype=Gs,new t}();(function(t){var e=function(r){var o=typeof t<"u"&&t||typeof self<"u"&&self||typeof global<"u"&&global||{},n={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function a(C){return C&&DataView.prototype.isPrototypeOf(C)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(C){return C&&s.indexOf(Object.prototype.toString.call(C))>-1};function d(C){if(typeof C!="string"&&(C=String(C)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(C)||C==="")throw new TypeError('Invalid character in header field name: "'+C+'"');return C.toLowerCase()}function p(C){return typeof C!="string"&&(C=String(C)),C}function m(C){var M={next:function(){var Z=C.shift();return{done:Z===void 0,value:Z}}};return n.iterable&&(M[Symbol.iterator]=function(){return M}),M}function g(C){this.map={},C instanceof g?C.forEach(function(M,Z){this.append(Z,M)},this):Array.isArray(C)?C.forEach(function(M){if(M.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+M.length);this.append(M[0],M[1])},this):C&&Object.getOwnPropertyNames(C).forEach(function(M){this.append(M,C[M])},this)}g.prototype.append=function(C,M){C=d(C),M=p(M);var Z=this.map[C];this.map[C]=Z?Z+", "+M:M},g.prototype.delete=function(C){delete this.map[d(C)]},g.prototype.get=function(C){return C=d(C),this.has(C)?this.map[C]:null},g.prototype.has=function(C){return this.map.hasOwnProperty(d(C))},g.prototype.set=function(C,M){this.map[d(C)]=p(M)},g.prototype.forEach=function(C,M){for(var Z in this.map)this.map.hasOwnProperty(Z)&&C.call(M,this.map[Z],Z,this)},g.prototype.keys=function(){var C=[];return this.forEach(function(M,Z){C.push(Z)}),m(C)},g.prototype.values=function(){var C=[];return this.forEach(function(M){C.push(M)}),m(C)},g.prototype.entries=function(){var C=[];return this.forEach(function(M,Z){C.push([Z,M])}),m(C)},n.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function b(C){if(!C._noBody){if(C.bodyUsed)return Promise.reject(new TypeError("Already read"));C.bodyUsed=!0}}function E(C){return new Promise(function(M,Z){C.onload=function(){M(C.result)},C.onerror=function(){Z(C.error)}})}function L(C){var M=new FileReader,Z=E(M);return M.readAsArrayBuffer(C),Z}function N(C){var M=new FileReader,Z=E(M),Ce=/charset=([A-Za-z0-9_-]+)/.exec(C.type),Ne=Ce?Ce[1]:"utf-8";return M.readAsText(C,Ne),Z}function z(C){for(var M=new Uint8Array(C),Z=new Array(M.length),Ce=0;Ce<M.length;Ce++)Z[Ce]=String.fromCharCode(M[Ce]);return Z.join("")}function B(C){if(C.slice)return C.slice(0);var M=new Uint8Array(C.byteLength);return M.set(new Uint8Array(C)),M.buffer}function F(){return this.bodyUsed=!1,this._initBody=function(C){this.bodyUsed=this.bodyUsed,this._bodyInit=C,C?typeof C=="string"?this._bodyText=C:n.blob&&Blob.prototype.isPrototypeOf(C)?this._bodyBlob=C:n.formData&&FormData.prototype.isPrototypeOf(C)?this._bodyFormData=C:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(C)?this._bodyText=C.toString():n.arrayBuffer&&n.blob&&a(C)?(this._bodyArrayBuffer=B(C.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(C)||l(C))?this._bodyArrayBuffer=B(C):this._bodyText=C=Object.prototype.toString.call(C):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof C=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(C)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var C=b(this);if(C)return C;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var C=b(this);return C||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(n.blob)return this.blob().then(L);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var C=b(this);if(C)return C;if(this._bodyBlob)return N(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(z(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function A(C){var M=C.toUpperCase();return k.indexOf(M)>-1?M:C}function P(C,M){if(!(this instanceof P))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');M=M||{};var Z=M.body;if(C instanceof P){if(C.bodyUsed)throw new TypeError("Already read");this.url=C.url,this.credentials=C.credentials,M.headers||(this.headers=new g(C.headers)),this.method=C.method,this.mode=C.mode,this.signal=C.signal,!Z&&C._bodyInit!=null&&(Z=C._bodyInit,C.bodyUsed=!0)}else this.url=String(C);if(this.credentials=M.credentials||this.credentials||"same-origin",(M.headers||!this.headers)&&(this.headers=new g(M.headers)),this.method=A(M.method||this.method||"GET"),this.mode=M.mode||this.mode||null,this.signal=M.signal||this.signal||function(){if("AbortController"in o){var be=new AbortController;return be.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Z)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Z),(this.method==="GET"||this.method==="HEAD")&&(M.cache==="no-store"||M.cache==="no-cache")){var Ce=/([?&])_=[^&]*/;if(Ce.test(this.url))this.url=this.url.replace(Ce,"$1_="+new Date().getTime());else{var Ne=/\?/;this.url+=(Ne.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}P.prototype.clone=function(){return new P(this,{body:this._bodyInit})};function K(C){var M=new FormData;return C.trim().split("&").forEach(function(Z){if(Z){var Ce=Z.split("="),Ne=Ce.shift().replace(/\+/g," "),be=Ce.join("=").replace(/\+/g," ");M.append(decodeURIComponent(Ne),decodeURIComponent(be))}}),M}function te(C){var M=new g,Z=C.replace(/\r?\n[\t ]+/g," ");return Z.split("\r").map(function(Ce){return Ce.indexOf(`
48
- `)===0?Ce.substr(1,Ce.length):Ce}).forEach(function(Ce){var Ne=Ce.split(":"),be=Ne.shift().trim();if(be){var Ja=Ne.join(":").trim();try{M.append(be,Ja)}catch(ic){console.warn("Response "+ic.message)}}}),M}F.call(P.prototype);function ye(C,M){if(!(this instanceof ye))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(M||(M={}),this.type="default",this.status=M.status===void 0?200:M.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=M.statusText===void 0?"":""+M.statusText,this.headers=new g(M.headers),this.url=M.url||"",this._initBody(C)}F.call(ye.prototype),ye.prototype.clone=function(){return new ye(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},ye.error=function(){var C=new ye(null,{status:200,statusText:""});return C.ok=!1,C.status=0,C.type="error",C};var me=[301,302,303,307,308];ye.redirect=function(C,M){if(me.indexOf(M)===-1)throw new RangeError("Invalid status code");return new ye(null,{status:M,headers:{location:C}})},r.DOMException=o.DOMException;try{new r.DOMException}catch{r.DOMException=function(M,Z){this.message=M,this.name=Z;var Ce=Error(M);this.stack=Ce.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function X(C,M){return new Promise(function(Z,Ce){var Ne=new P(C,M);if(Ne.signal&&Ne.signal.aborted)return Ce(new r.DOMException("Aborted","AbortError"));var be=new XMLHttpRequest;function Ja(){be.abort()}be.onload=function(){var ft={statusText:be.statusText,headers:te(be.getAllResponseHeaders()||"")};Ne.url.indexOf("file://")===0&&(be.status<200||be.status>599)?ft.status=200:ft.status=be.status,ft.url="responseURL"in be?be.responseURL:ft.headers.get("X-Request-URL");var ei="response"in be?be.response:be.responseText;setTimeout(function(){Z(new ye(ei,ft))},0)},be.onerror=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},be.ontimeout=function(){setTimeout(function(){Ce(new TypeError("Network request timed out"))},0)},be.onabort=function(){setTimeout(function(){Ce(new r.DOMException("Aborted","AbortError"))},0)};function ic(ft){try{return ft===""&&o.location.href?o.location.href:ft}catch{return ft}}if(be.open(Ne.method,ic(Ne.url),!0),Ne.credentials==="include"?be.withCredentials=!0:Ne.credentials==="omit"&&(be.withCredentials=!1),"responseType"in be&&(n.blob?be.responseType="blob":n.arrayBuffer&&(be.responseType="arraybuffer")),M&&typeof M.headers=="object"&&!(M.headers instanceof g||o.Headers&&M.headers instanceof o.Headers)){var x2=[];Object.getOwnPropertyNames(M.headers).forEach(function(ft){x2.push(d(ft)),be.setRequestHeader(ft,p(M.headers[ft]))}),Ne.headers.forEach(function(ft,ei){x2.indexOf(ei)===-1&&be.setRequestHeader(ei,ft)})}else Ne.headers.forEach(function(ft,ei){be.setRequestHeader(ei,ft)});Ne.signal&&(Ne.signal.addEventListener("abort",Ja),be.onreadystatechange=function(){be.readyState===4&&Ne.signal.removeEventListener("abort",Ja)}),be.send(typeof Ne._bodyInit>"u"?null:Ne._bodyInit)})}return X.polyfill=!0,o.fetch||(o.fetch=X,o.Headers=g,o.Request=P,o.Response=ye),r.Headers=g,r.Request=P,r.Response=ye,r.fetch=X,r}({})})(Vs);Vs.fetch.ponyfill=!0;delete Vs.fetch.polyfill;var un=Gs.fetch?Gs:Vs;$o=un.fetch;$o.default=un.fetch;$o.fetch=un.fetch;$o.Headers=un.Headers;$o.Request=un.Request;$o.Response=un.Response;L4.exports=$o});var Ou=u(()=>{});var R4,w4,_4,zo,k4,T4,Si,M4,N4,P4,I4,$4,z4,D4,Do,B4,F4,Ci,W4,U4,Ws,H4,pn,j4,Fr,fn,G4,Je,lr,V4,Eu=u(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(R4||(R4={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(w4||(w4={}));(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"})(_4||(_4={}));(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"})(zo||(zo={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(k4||(k4={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(T4||(T4={}));(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"})(Si||(Si={}));(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"})(M4||(M4={}));(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"})(N4||(N4={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(P4||(P4={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(I4||(I4={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})($4||($4={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(z4||(z4={}));(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"})(D4||(D4={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Do||(Do={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(B4||(B4={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(F4||(F4={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ci||(Ci={}));W4=t=>Object.keys(Ci).includes(t);(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(U4||(U4={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ws||(Ws={}));(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"})(H4||(H4={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(pn||(pn={}));j4=t=>Object.keys(pn).includes(t);(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Fr||(Fr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(fn||(fn={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G4||(G4={}));(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"})(Je||(Je={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(lr||(lr={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(V4||(V4={}))});var K4,q4,Z4,Y4,X4,Q4,J4,em,tm=u(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(K4||(K4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(q4||(q4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Z4||(Z4={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Y4||(Y4={}));(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(X4||(X4={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Q4||(Q4={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(J4||(J4={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(em||(em={}))});var rm=u(()=>{Eu();tm()});function om(t,e){return t===e||(o7[t]??[]).some(r=>om(r,e))}function im(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>om(o,e))}var o7,nm=u(()=>{Eu();o7={[Je.PERSONAL_BOOK_SHARE_USER]:[Je.PERSONAL_BOOK_USER],[Je.HTML_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.PDF_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.KHUB_ADMIN]:[Je.CONTENT_PUBLISHER],[Je.ADMIN]:[Je.KHUB_ADMIN,Je.USERS_ADMIN,Je.PORTAL_ADMIN,Je.BEHAVIOR_DATA_USER],[Je.GENERATIVE_AI_EXPORT_USER]:[Je.GENERATIVE_AI_USER]}});var am=u(()=>{});var i7,Bo=u(()=>{i7=V8(A4(),1);Ou();rm();nm();am();Ou()});var Lu={};oe(Lu,{SearchPlaceConverter:()=>Fo,SearchPlaceQueryParams:()=>Re,isSearchPlaceQueryParams:()=>lm,serializeRequest:()=>a7});function n7(t){return`"${t}"`}function sm(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function a7(t,e){return new Fo(t).serialize(e)}function lm(t){return s7.has(t)}var Re,s7,Fo,Au=u(()=>{"use strict";Bo();kt();(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(Re||(Re={}));s7=new Set(Object.values(Re));Fo=class{constructor(e,r=20,o=!1,n="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=n,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,n=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return n.search=this.toURLSearchParams(e),n.toString()}toURLSearchParams(e,r=!1){var o,n,a,s,l,d,p,m,g,b,E;let L=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&L.append(Re.LOCALE,e.contentLocale):L.append(Re.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&L.append(Re.QUERY,e.query);let N=(a=(n=e.metadataFilters)===null||n===void 0?void 0:n.filter(A=>A.valueFilter&&!A.valueFilter.negative))!==null&&a!==void 0?a:[];if(N.length>0){let A=N.map(P=>{var K,te;let ye=((te=(K=P.valueFilter)===null||K===void 0?void 0:K.values)!==null&&te!==void 0?te:[]).map(me=>this.escapeFilters(me)).map(me=>n7(sm(me))).join("_");return`${P.key}~${ye}`}).join("*");L.append(Re.VALUE_FILTERS,A)}let z=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(A=>A.dateFilter))!==null&&l!==void 0?l:[];if(z.length>0){let A=z.map(P=>{var K;return`${P.key}~${(K=P.dateFilter)===null||K===void 0?void 0:K.type.toLowerCase()}`}).join("*");L.append(Re.DATE_FILTERS,A)}let B=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(A=>A.rangeFilter))!==null&&p!==void 0?p:[];if(B.length>0){let A=B.map(P=>{var K,te;return`${P.key}~${(K=P.rangeFilter)===null||K===void 0?void 0:K.from}_${(te=P.rangeFilter)===null||te===void 0?void 0:te.to}`}).join("*");L.append(Re.RANGE_FILTERS,A)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&L.append(Re.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&L.append(Re.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&L.append(Re.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((b=(g=e.paging)===null||g===void 0?void 0:g.perPage)!==null&&b!==void 0?b:this.defaultPerPage)!=this.defaultPerPage&&L.append(Re.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&L.append(Re.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let F=(E=e.otherQueryParams)!==null&&E!==void 0?E:{};for(let A in F)L.append(A,F[A]);let k=new Array;return L.forEach((A,P)=>{k.push(this.encodeQueryString(P)+"="+this.encodeQueryString(A))}),encodeURI(k.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),n=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?n:{...n,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:n.scope}}fromURLSearchParams(e){var r,o,n,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(B){console.warn("Could not decode search request query params, fallback on raw value",B)}let d=new URLSearchParams(e),p=d.get(Re.LOCALE)==="all"?void 0:d.get(Re.LOCALE),m=((r=d.get(Re.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),g=(o=d.get(Re.SORT))===null||o===void 0?void 0:o.toLowerCase(),b=(n=d.get(Re.SCOPE))!==null&&n!==void 0?n:"default",E=+((a=d.get(Re.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),L=d.get(Re.KEYWORD_MATCH),N=L?L.toUpperCase()===Do.MANDATORY?Do.MANDATORY:Do.OPTIONAL:void 0,z={};for(let B of d.keys())lm(B)||(z[B]=d.get(B));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(Re.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[b])!==null&&l!==void 0?l:"DEFAULT",virtualField:W4(m)?m:"EVERYWHERE",sortId:g,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:ao(1,isNaN(E)?this.defaultPerPage:E,1e3)},keywordMatch:N,otherQueryParams:z}}parseCompatFilters(e){var r,o,n,a,s,l;let d=[];return e.has(Re.FILTERS)&&(d=this.parseValueFilters((r=e.get(Re.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(Re.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((n=e.get(Re.PERIOD))!==null&&n!==void 0?n:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(Re.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(Re.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(Re.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(sm).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:pn[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}unescapeFilterValue(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replace(n,r);return e}parseLegacyPeriodFilter(e){if(j4(e))return[{key:"ft:lastEdition",dateFilter:{type:pn[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,n]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:n}}]}return[]}}});var _u={};oe(_u,{toFtFormComponent:()=>wu});var Ru,wu,ku=u(()=>{"use strict";kt();Ru=Symbol("elementInternals"),wu=We(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ru].form}constructor(...o){super(o),this[Ru]=this.attachInternals()}setFormValue(o){this[Ru].setFormValue(o)}}return e})});var Tu={};oe(Tu,{DateFormatter:()=>Oi});var Oi,js=u(()=>{"use strict";Oi=class{static format(e,r,o,n){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,n)):this.getIntlDateTime(e,r,o,n)}static getMomentDateFormat(e,r){return e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,n){let a=typeof e=="string"?new Date(e):e,s=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(a);if(!n)return s;let l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(a);return`${s} ${l}`}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var Nu={};oe(Nu,{ALL_KEYS_VALUE:()=>Mu,SameWindowStorageEvent:()=>hn});var Mu,hn,Pu=u(()=>{"use strict";Mu="__all__",hn=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Mu}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new hn(Mu))}})});var $u={};oe($u,{FocusMainContentEvent:()=>Iu});var Iu,zu=u(()=>{"use strict";Iu=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}}});var cm={};function l7(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function c7(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}var Du=u(()=>{"use strict";window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};document.addEventListener("keydown",l7);document.addEventListener("click",c7)});var mn,Bu=u(()=>{"use strict";I();mn=_`
48
+ `)===0?Ce.substr(1,Ce.length):Ce}).forEach(function(Ce){var Ne=Ce.split(":"),be=Ne.shift().trim();if(be){var Ja=Ne.join(":").trim();try{M.append(be,Ja)}catch(ic){console.warn("Response "+ic.message)}}}),M}F.call(P.prototype);function ye(C,M){if(!(this instanceof ye))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(M||(M={}),this.type="default",this.status=M.status===void 0?200:M.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=M.statusText===void 0?"":""+M.statusText,this.headers=new g(M.headers),this.url=M.url||"",this._initBody(C)}F.call(ye.prototype),ye.prototype.clone=function(){return new ye(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},ye.error=function(){var C=new ye(null,{status:200,statusText:""});return C.ok=!1,C.status=0,C.type="error",C};var me=[301,302,303,307,308];ye.redirect=function(C,M){if(me.indexOf(M)===-1)throw new RangeError("Invalid status code");return new ye(null,{status:M,headers:{location:C}})},r.DOMException=o.DOMException;try{new r.DOMException}catch{r.DOMException=function(M,Z){this.message=M,this.name=Z;var Ce=Error(M);this.stack=Ce.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function X(C,M){return new Promise(function(Z,Ce){var Ne=new P(C,M);if(Ne.signal&&Ne.signal.aborted)return Ce(new r.DOMException("Aborted","AbortError"));var be=new XMLHttpRequest;function Ja(){be.abort()}be.onload=function(){var ft={statusText:be.statusText,headers:te(be.getAllResponseHeaders()||"")};Ne.url.indexOf("file://")===0&&(be.status<200||be.status>599)?ft.status=200:ft.status=be.status,ft.url="responseURL"in be?be.responseURL:ft.headers.get("X-Request-URL");var ei="response"in be?be.response:be.responseText;setTimeout(function(){Z(new ye(ei,ft))},0)},be.onerror=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},be.ontimeout=function(){setTimeout(function(){Ce(new TypeError("Network request timed out"))},0)},be.onabort=function(){setTimeout(function(){Ce(new r.DOMException("Aborted","AbortError"))},0)};function ic(ft){try{return ft===""&&o.location.href?o.location.href:ft}catch{return ft}}if(be.open(Ne.method,ic(Ne.url),!0),Ne.credentials==="include"?be.withCredentials=!0:Ne.credentials==="omit"&&(be.withCredentials=!1),"responseType"in be&&(n.blob?be.responseType="blob":n.arrayBuffer&&(be.responseType="arraybuffer")),M&&typeof M.headers=="object"&&!(M.headers instanceof g||o.Headers&&M.headers instanceof o.Headers)){var x2=[];Object.getOwnPropertyNames(M.headers).forEach(function(ft){x2.push(d(ft)),be.setRequestHeader(ft,p(M.headers[ft]))}),Ne.headers.forEach(function(ft,ei){x2.indexOf(ei)===-1&&be.setRequestHeader(ei,ft)})}else Ne.headers.forEach(function(ft,ei){be.setRequestHeader(ei,ft)});Ne.signal&&(Ne.signal.addEventListener("abort",Ja),be.onreadystatechange=function(){be.readyState===4&&Ne.signal.removeEventListener("abort",Ja)}),be.send(typeof Ne._bodyInit>"u"?null:Ne._bodyInit)})}return X.polyfill=!0,o.fetch||(o.fetch=X,o.Headers=g,o.Request=P,o.Response=ye),r.Headers=g,r.Request=P,r.Response=ye,r.fetch=X,r}({})})(Vs);Vs.fetch.ponyfill=!0;delete Vs.fetch.polyfill;var un=Gs.fetch?Gs:Vs;$o=un.fetch;$o.default=un.fetch;$o.fetch=un.fetch;$o.Headers=un.Headers;$o.Request=un.Request;$o.Response=un.Response;L4.exports=$o});var Ou=u(()=>{});var R4,w4,_4,zo,k4,T4,Si,M4,N4,P4,I4,$4,z4,D4,Do,B4,F4,Ci,W4,U4,Ws,H4,pn,j4,Fr,fn,G4,Je,lr,V4,Eu=u(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(R4||(R4={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(w4||(w4={}));(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"})(_4||(_4={}));(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"})(zo||(zo={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(k4||(k4={}));(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(T4||(T4={}));(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"})(Si||(Si={}));(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"})(M4||(M4={}));(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"})(N4||(N4={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(P4||(P4={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(I4||(I4={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})($4||($4={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(z4||(z4={}));(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"})(D4||(D4={}));(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Do||(Do={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(B4||(B4={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(F4||(F4={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ci||(Ci={}));W4=t=>Object.keys(Ci).includes(t);(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(U4||(U4={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(Ws||(Ws={}));(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"})(H4||(H4={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(pn||(pn={}));j4=t=>Object.keys(pn).includes(t);(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Fr||(Fr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(fn||(fn={}));(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(G4||(G4={}));(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"})(Je||(Je={}));(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(lr||(lr={}));(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(V4||(V4={}))});var K4,q4,Z4,Y4,X4,Q4,J4,em,tm=u(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(K4||(K4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(q4||(q4={}));(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Z4||(Z4={}));(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Y4||(Y4={}));(function(t){t.USER="USER",t.ASSISTANT="ASSISTANT"})(X4||(X4={}));(function(t){t.TEXT="TEXT",t.HTML="HTML"})(Q4||(Q4={}));(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(J4||(J4={}));(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(em||(em={}))});var rm=u(()=>{Eu();tm()});function om(t,e){return t===e||(o7[t]??[]).some(r=>om(r,e))}function im(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>om(o,e))}var o7,nm=u(()=>{Eu();o7={[Je.PERSONAL_BOOK_SHARE_USER]:[Je.PERSONAL_BOOK_USER],[Je.HTML_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.PDF_EXPORT_USER]:[Je.PERSONAL_BOOK_USER],[Je.KHUB_ADMIN]:[Je.CONTENT_PUBLISHER],[Je.ADMIN]:[Je.KHUB_ADMIN,Je.USERS_ADMIN,Je.PORTAL_ADMIN,Je.BEHAVIOR_DATA_USER],[Je.GENERATIVE_AI_EXPORT_USER]:[Je.GENERATIVE_AI_USER]}});var am=u(()=>{});var i7,Bo=u(()=>{i7=V8(A4(),1);Ou();rm();nm();am();Ou()});var Lu={};oe(Lu,{SearchPlaceConverter:()=>Fo,SearchPlaceQueryParams:()=>Re,isSearchPlaceQueryParams:()=>lm,serializeRequest:()=>a7});function n7(t){return`"${t}"`}function sm(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function a7(t,e){return new Fo(t).serialize(e)}function lm(t){return s7.has(t)}var Re,s7,Fo,Au=u(()=>{"use strict";Bo();kt();(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(Re||(Re={}));s7=new Set(Object.values(Re));Fo=class{constructor(e,r=20,o=!1,n="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=n,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,n=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return n.search=this.toURLSearchParams(e),n.toString()}toURLSearchParams(e,r=!1){var o,n,a,s,l,d,p,m,g,b,E;let L=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&L.append(Re.LOCALE,e.contentLocale):L.append(Re.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&L.append(Re.QUERY,e.query);let N=(a=(n=e.metadataFilters)===null||n===void 0?void 0:n.filter(A=>A.valueFilter&&!A.valueFilter.negative))!==null&&a!==void 0?a:[];if(N.length>0){let A=N.map(P=>{var K,te;let ye=((te=(K=P.valueFilter)===null||K===void 0?void 0:K.values)!==null&&te!==void 0?te:[]).map(me=>this.escapeFilters(me)).map(me=>n7(sm(me))).join("_");return`${P.key}~${ye}`}).join("*");L.append(Re.VALUE_FILTERS,A)}let z=(l=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(A=>A.dateFilter))!==null&&l!==void 0?l:[];if(z.length>0){let A=z.map(P=>{var K;return`${P.key}~${(K=P.dateFilter)===null||K===void 0?void 0:K.type.toLowerCase()}`}).join("*");L.append(Re.DATE_FILTERS,A)}let B=(p=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(A=>A.rangeFilter))!==null&&p!==void 0?p:[];if(B.length>0){let A=B.map(P=>{var K,te;return`${P.key}~${(K=P.rangeFilter)===null||K===void 0?void 0:K.from}_${(te=P.rangeFilter)===null||te===void 0?void 0:te.to}`}).join("*");L.append(Re.RANGE_FILTERS,A)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&L.append(Re.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&L.append(Re.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&L.append(Re.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((b=(g=e.paging)===null||g===void 0?void 0:g.perPage)!==null&&b!==void 0?b:this.defaultPerPage)!=this.defaultPerPage&&L.append(Re.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&L.append(Re.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let F=(E=e.otherQueryParams)!==null&&E!==void 0?E:{};for(let A in F)L.append(A,F[A]);let k=new Array;return L.forEach((A,P)=>{k.push(this.encodeQueryString(P)+"="+this.encodeQueryString(A))}),encodeURI(k.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),n=this.fromURLSearchParams(o.slice(1).join("?")),a=o[0].split("/search/")[1];return a==null?n:{...n,scope:(r=this.scopeMapping[a])!==null&&r!==void 0?r:n.scope}}fromURLSearchParams(e){var r,o,n,a,s,l;try{e=decodeURI(e).replace(/%23/g,"#")}catch(B){console.warn("Could not decode search request query params, fallback on raw value",B)}let d=new URLSearchParams(e),p=d.get(Re.LOCALE)==="all"?void 0:d.get(Re.LOCALE),m=((r=d.get(Re.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),g=(o=d.get(Re.SORT))===null||o===void 0?void 0:o.toLowerCase(),b=(n=d.get(Re.SCOPE))!==null&&n!==void 0?n:"default",E=+((a=d.get(Re.PER_PAGE))!==null&&a!==void 0?a:this.defaultPerPage),L=d.get(Re.KEYWORD_MATCH),N=L?L.toUpperCase()===Do.MANDATORY?Do.MANDATORY:Do.OPTIONAL:void 0,z={};for(let B of d.keys())lm(B)||(z[B]=d.get(B));return{contentLocale:p??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(Re.QUERY))!==null&&s!==void 0?s:"",scope:(l=this.scopeMapping[b])!==null&&l!==void 0?l:"DEFAULT",virtualField:W4(m)?m:"EVERYWHERE",sortId:g,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:ao(1,isNaN(E)?this.defaultPerPage:E,1e3)},keywordMatch:N,otherQueryParams:z}}parseCompatFilters(e){var r,o,n,a,s,l;let d=[];return e.has(Re.FILTERS)&&(d=this.parseValueFilters((r=e.get(Re.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(Re.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((n=e.get(Re.PERIOD))!==null&&n!==void 0?n:"").toUpperCase())]),[...d,...this.parseValueFilters((a=e.get(Re.VALUE_FILTERS))!==null&&a!==void 0?a:""),...this.parseDateFilters((s=e.get(Re.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((l=e.get(Re.RANGE_FILTERS))!==null&&l!==void 0?l:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(sm).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:pn[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replaceAll(o,n);return e}unescapeFilterValue(e){for(let[r,o,n]of this.filtersEscapeMapping)e=e.replace(n,r);return e}parseLegacyPeriodFilter(e){if(j4(e))return[{key:"ft:lastEdition",dateFilter:{type:pn[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,n]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:n}}]}return[]}}});var _u={};oe(_u,{toFtFormComponent:()=>wu});var Ru,wu,ku=u(()=>{"use strict";kt();Ru=Symbol("elementInternals"),wu=We(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[Ru].form}constructor(...o){super(o),this[Ru]=this.attachInternals()}setFormValue(o){this[Ru].setFormValue(o)}}return e})});var Tu={};oe(Tu,{DateFormatter:()=>Oi});var Oi,js=u(()=>{"use strict";Oi=class{static format(e,r,o,n,a){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,n,!!a)):this.getIntlDateTime(e,r,o,n,!!a)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,n,a){let s=typeof e=="string"?new Date(e):e,l=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return a?d:n?`${l} ${d}`:l}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}}});var Nu={};oe(Nu,{ALL_KEYS_VALUE:()=>Mu,SameWindowStorageEvent:()=>hn});var Mu,hn,Pu=u(()=>{"use strict";Mu="__all__",hn=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==Mu}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new hn(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new hn(Mu))}})});var $u={};oe($u,{FocusMainContentEvent:()=>Iu});var Iu,zu=u(()=>{"use strict";Iu=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}}});var cm={};function l7(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function c7(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}var Du=u(()=>{"use strict";window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};document.addEventListener("keydown",l7);document.addEventListener("click",c7)});var mn,Bu=u(()=>{"use strict";I();mn=_`
49
49
  .sr-only {
50
50
  position:absolute;
51
51
  left:-10000px;
@@ -611,7 +611,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
611
611
  position: relative;
612
612
  word-break: break-word;
613
613
  }
614
- `});var y7,_i,b7,j,Et=u(()=>{"use strict";w();y7="ft-app-info",_i=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_i.eventName="authentication-change";b7={session:(t,e)=>{it(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>j.dispatchEvent(new _i(e.payload)),0))}},j=uo.get({name:y7,reducers:b7,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}})});var Xs,zI,Qm=u(()=>{"use strict";J();Us();js();Et();w();Xs=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},zI=We(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(j)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>Oi.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Xs([h({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Xs([h({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Xs([Te({store:j.name,selector:r=>{var o,n;return(n=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Xs([Te({store:j.name})],e.prototype,"uiLocale",void 0),e})});var ki,op=u(()=>{"use strict";Et();ki=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=j.getState(),n=e??o;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let n=j.subscribe(()=>{o=t.get(e),o&&(n(),r(o))})}})}}});var Qs,Jm=u(()=>{"use strict";op();Qs=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ki.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ki.await()}}});var Lt,Ho=u(()=>{"use strict";w();Jm();Lt=class extends Qs{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new Ir,this.cache=e?n.commonCache:new Ir}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}}});var Js,ip=u(()=>{"use strict";Et();Bo();Ho();Js=class extends Lt{async listMySearches(){let{session:e}=j.getState();return im(e,Je.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}}});var el,np=u(()=>{"use strict";Et();Ho();el=class extends Lt{async listMyBookmarks(){let e=j.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}}});var tl,e3=u(()=>{"use strict";Et();Ho();tl=class extends Lt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=j.getState().session;return!!e?.sessionAuthenticated}}});var rl,t3=u(()=>{"use strict";Ho();Et();rl=class extends Lt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=j.getState().session;return!!e?.sessionAuthenticated}}});var v7,x7,i3,ap,sp,r3,o3,Kt,lp,cp,ol=u(()=>{"use strict";Bo();w();ip();np();Et();e3();t3();v7="ft-user-assets",x7={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(lr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:n}=e.payload;sp(t,r,[...ap(t,r),n]),r3(t,r,1,o),o3(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;sp(t,r,ap(t,r).map(n=>n.id===o.id?o:n)),o3(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:n}=e.payload;sp(t,r,ap(t,r).filter(a=>a.id!==n)),r3(t,r,-1,o)}},i3={[lr.SEARCHES]:"savedSearches",[lr.BOOKMARKS]:"bookmarks",[lr.BOOKS]:void 0,[lr.COLLECTIONS]:void 0},ap=(t,e)=>{var r;let o=i3[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},sp=(t,e,r)=>{let o=i3[e];o&&(t[o]=r)},r3=(t,e,r,o)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===lr.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},o3=(t,e)=>{let r=t.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...o)},Kt=uo.get({name:v7,reducers:x7,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(lr).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),lp=class{constructor(e=new tl,r=new rl){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=j.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new el,this.savedSearchesService=new Js,j.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=j.getState();it((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(),Kt.actions.clearAssetCount(),Kt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Kt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Kt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Kt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Kt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Kt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Kt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Kt.getState().assetCounts.bookmarkByMap).length!==0;e===lr.BOOKMARKS&&r&&Kt.actions.clearBookmarkCountByMap(),Kt.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;Kt.actions.bookmarks(r)}}},cp=new lp;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cp)});var n3=u(()=>{"use strict";Bo();ol()});var dp,a3=u(()=>{"use strict";Et();dp=class{addCommand(e,r=!1){j.commands.add(e,r)}consumeCommand(e){return j.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new dp});var s3,En,S7,il,Ln,nl,l3=u(()=>{"use strict";Et();w();Ho();En=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},S7=Symbol("clearAfterUnitTest"),il=class extends hs(Lt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[s3]=()=>{this.defaultMessages={},this.cache=new Ir,this.listeners={}},this.currentUiLocale=j.getState().uiLocale,j.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=j.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};it(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new ko((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Nr)&&r&&console.error(n)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new En({loadedContexts:e})),this.dispatchEvent(new En({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new En({loadedContexts:[e]})),this.dispatchEvent(new En({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>fs(0).then(()=>o()).catch(()=>null)))}};s3=S7;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});Ln=window.FluidTopicsI18nService,nl=window.FluidTopicsCustomI18nService});var up,c3=u(()=>{"use strict";w();up=class{highlightHtml(e,r,o){Dd(e,r,o)}};window.FluidTopicsHighlightHtmlService=new up});var pp,d3=u(()=>{"use strict";w();Et();pp=class{isDate(e){var r,o,n,a;return(a=(n=((o=(r=j.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var o,n,a;if(e==null)return"";try{return Oi.format(e,(o=r?.locale)!==null&&o!==void 0?o:j.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1)}catch(s){throw console.error(`Date ${JSON.stringify(e)} is not valid`,s),s}}};window.FluidTopicsDateService=new pp});var mo,fp=u(()=>{"use strict";w();Et();mo=class{static get(e,r){var o,n;let a=j.getState(),{lang:s,region:l}=(n=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Fo(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}}});var al,u3=u(()=>{"use strict";Ho();al=class extends Lt{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,n])=>Array.isArray(n)?[o,n.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[o,this.sortEventArrays(n)]:[o,n]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(n=>(console.info(r),console.debug(n),o)),1e3)}}});var hp,p3=u(()=>{"use strict";fp();hp=class{urlToSearchRequest(e){return mo.get().parse(e)}searchRequestToUrl(e){return mo.get().serialize(e)}};window.FluidTopicsUrlService=new hp});var Ti,f3=u(()=>{"use strict";Ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ti.eventName="change"});var mp,h3,m3=u(()=>{"use strict";mp=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))}},h3=new mp});var sl,g3=u(()=>{"use strict";w();f3();m3();sl=class t extends so{static build(){return new t(window.history,h3,()=>window.location,!1)}constructor(e,r,o,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),it(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ti(this.currentItem())),0)}installProxies(){let e=r=>(o,n,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Ti.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ti.eventName,e)}currentItem(){return si(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 si(this.states[this.previousDifferentMajorPosition()])}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 si(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}}});var y3=u(()=>{"use strict";g3();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=sl.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)})});var b3=u(()=>{"use strict";Et()});var gp=u(()=>{"use strict";np();op();a3();l3();Ho();c3();ip();d3();fp();u3();p3();y3();b3()});var v3,yp=u(()=>{"use strict";I();v3=_`
614
+ `});var y7,_i,b7,j,Et=u(()=>{"use strict";w();y7="ft-app-info",_i=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};_i.eventName="authentication-change";b7={session:(t,e)=>{it(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>j.dispatchEvent(new _i(e.payload)),0))}},j=uo.get({name:y7,reducers:b7,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}})});var Xs,zI,Qm=u(()=>{"use strict";J();Us();js();Et();w();Xs=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},zI=We(Symbol("withDateFormat"),function(t){class e extends t{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(j)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>Oi.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Xs([h({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Xs([h({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Xs([Te({store:j.name,selector:r=>{var o,n;return(n=(o=r.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Xs([Te({store:j.name})],e.prototype,"uiLocale",void 0),e})});var ki,op=u(()=>{"use strict";Et();ki=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:o}=j.getState(),n=e??o;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let o=t.get(e);if(o)r(o);else{let n=j.subscribe(()=>{o=t.get(e),o&&(n(),r(o))})}})}}});var Qs,Jm=u(()=>{"use strict";op();Qs=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:ki.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):ki.await()}}});var Lt,Ho=u(()=>{"use strict";w();Jm();Lt=class extends Qs{constructor(e=!0,r){var o;super(r),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new Ir,this.cache=e?n.commonCache:new Ir}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,o)=>0|31*r+o.charCodeAt(0),0))}}});var Js,ip=u(()=>{"use strict";Et();Bo();Ho();Js=class extends Lt{async listMySearches(){let{session:e}=j.getState();return im(e,Je.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}}});var el,np=u(()=>{"use strict";Et();Ho();el=class extends Lt{async listMyBookmarks(){let e=j.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}}});var tl,e3=u(()=>{"use strict";Et();Ho();tl=class extends Lt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=j.getState().session;return!!e?.sessionAuthenticated}}});var rl,t3=u(()=>{"use strict";Ho();Et();rl=class extends Lt{constructor(){super(...arguments),this.CACHE_DURATION=3*60*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=j.getState().session;return!!e?.sessionAuthenticated}}});var v7,x7,i3,ap,sp,r3,o3,Kt,lp,cp,ol=u(()=>{"use strict";Bo();w();ip();np();Et();e3();t3();v7="ft-user-assets",x7={setAssetCount:(t,e)=>{let{userAssetType:r,count:o}=e.payload.assetCount;t.assetCounts.allAsset[r]=o},clearAssetCount:t=>{Object.values(lr).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:o,asset:n}=e.payload;sp(t,r,[...ap(t,r),n]),r3(t,r,1,o),o3(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:o}=e.payload;sp(t,r,ap(t,r).map(n=>n.id===o.id?o:n)),o3(t,o)},removeAsset:(t,e)=>{let{assetType:r,mapId:o,assetId:n}=e.payload;sp(t,r,ap(t,r).filter(a=>a.id!==n)),r3(t,r,-1,o)}},i3={[lr.SEARCHES]:"savedSearches",[lr.BOOKMARKS]:"bookmarks",[lr.BOOKS]:void 0,[lr.COLLECTIONS]:void 0},ap=(t,e)=>{var r;let o=i3[e];return o?(r=t[o])!==null&&r!==void 0?r:[]:[]},sp=(t,e,r)=>{let o=i3[e];o&&(t[o]=r)},r3=(t,e,r,o)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===lr.BOOKMARKS&&o)){let a=t.assetCounts.bookmarkByMap[o];t.assetCounts.bookmarkByMap[o]=Math.max(0,a+r)}},o3=(t,e)=>{let r=t.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...o)},Kt=uo.get({name:v7,reducers:x7,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(lr).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),lp=class{constructor(e=new tl,r=new rl){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=j.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new el,this.savedSearchesService=new Js,j.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=j.getState();it((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(),Kt.actions.clearAssetCount(),Kt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Kt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Kt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Kt.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Kt.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&Kt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&Kt.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(Kt.getState().assetCounts.bookmarkByMap).length!==0;e===lr.BOOKMARKS&&r&&Kt.actions.clearBookmarkCountByMap(),Kt.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;Kt.actions.bookmarks(r)}}},cp=new lp;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=cp)});var n3=u(()=>{"use strict";Bo();ol()});var dp,a3=u(()=>{"use strict";Et();dp=class{addCommand(e,r=!1){j.commands.add(e,r)}consumeCommand(e){return j.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new dp});var s3,En,S7,il,Ln,nl,l3=u(()=>{"use strict";Et();w();Ho();En=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},S7=Symbol("clearAfterUnitTest"),il=class extends hs(Lt){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[s3]=()=>{this.defaultMessages={},this.cache=new Ir,this.listeners={}},this.currentUiLocale=j.getState().uiLocale,j.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=j.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var o;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...r};it(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,o;return this.fetchContext(e),(o=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,r){let o=e.toLowerCase();return this.resolveContext(o)[r]}resolveMessage(e,r,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new ko((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...o)}async fetchContext(e){let r=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof Nr)&&r&&console.error(n)}return o}subscribe(e,r){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(r),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new En({loadedContexts:e})),this.dispatchEvent(new En({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new En({loadedContexts:[e]})),this.dispatchEvent(new En({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>fs(0).then(()=>o()).catch(()=>null)))}};s3=S7;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends il{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});Ln=window.FluidTopicsI18nService,nl=window.FluidTopicsCustomI18nService});var up,c3=u(()=>{"use strict";w();up=class{highlightHtml(e,r,o){Dd(e,r,o)}};window.FluidTopicsHighlightHtmlService=new up});var pp,d3=u(()=>{"use strict";w();Et();pp=class{isDate(e){var r,o,n,a;return(a=(n=((o=(r=j.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var o,n,a,s;if(e==null)return"";try{return Oi.format(e,(o=r?.locale)!==null&&o!==void 0?o:j.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(a=r?.withTime)!==null&&a!==void 0?a:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new pp});var mo,fp=u(()=>{"use strict";w();Et();mo=class{static get(e,r){var o,n;let a=j.getState(),{lang:s,region:l}=(n=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Fo(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}}});var al,u3=u(()=>{"use strict";Ho();al=class extends Lt{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on-demand_translate event")}convertMapToAnalyticsDocument(e){let r;switch(e.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:r,metadata:e.metadata}}sortEventArrays(e){let r=Object.entries(e).map(([o,n])=>Array.isArray(n)?[o,n.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[o,this.sortEventArrays(n)]:[o,n]);return Object.fromEntries(r)}sendEvents(e,r){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(n=>(console.info(r),console.debug(n),o)),1e3)}}});var hp,p3=u(()=>{"use strict";fp();hp=class{urlToSearchRequest(e){return mo.get().parse(e)}searchRequestToUrl(e){return mo.get().serialize(e)}};window.FluidTopicsUrlService=new hp});var Ti,f3=u(()=>{"use strict";Ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Ti.eventName="change"});var mp,h3,m3=u(()=>{"use strict";mp=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))}},h3=new mp});var sl,g3=u(()=>{"use strict";w();f3();m3();sl=class t extends so{static build(){return new t(window.history,h3,()=>window.location,!1)}constructor(e,r,o,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,r=!1){let o=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),it(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ti(this.currentItem())),0)}installProxies(){let e=r=>(o,n,[a,s,l])=>{let d=r(),p={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(Ti.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Ti.eventName,e)}currentItem(){return si(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 si(this.states[this.previousDifferentMajorPosition()])}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 si(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&r!==void 0?r:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,r){var o;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}}});var y3=u(()=>{"use strict";g3();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=sl.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)})});var b3=u(()=>{"use strict";Et()});var gp=u(()=>{"use strict";np();op();a3();l3();Ho();c3();ip();d3();fp();u3();p3();y3();b3()});var v3,yp=u(()=>{"use strict";I();v3=_`
615
615
  `});var x3=u(()=>{"use strict"});function S3(t,e){let{authenticationRequired:r,session:o}=j.getState();return r&&!o?.sessionAuthenticated?Promise.resolve(e):t()}var C3=u(()=>{"use strict";Et()});var lt,Be,bp=u(()=>{"use strict";I();J();w();yp();Et();gp();C3();lt=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Be=class extends W{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.apiProvider=()=>ki.get(),this.authenticationRequired=!1,this.messageContexts=[],this.cache=new Ir,this.cleanSessionDebouncer=new ge,this.reloadConfiguration=()=>{this.cache.clear("availableContentLocales"),this.updateAvailableContentLocales()}}render(){return S`
616
616
  <slot></slot>
617
617
  `}connectedCallback(){super.connectedCallback(),j.addEventListener(_i.eventName,this.reloadConfiguration)}disconnectedCallback(){j.addEventListener(_i.eventName,this.reloadConfiguration),super.disconnectedCallback()}update(e){var r,o,n,a,s,l,d;super.update(e),e.has("baseUrl")&&(j.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&j.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&j.actions.apiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&j.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&j.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&j.actions.noCustom(this.noCustom),e.has("editorMode")&&j.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&j.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&j.actions.session(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(p=>Ln.addContext(p)),e.has("openExternalDocumentInNewTab")&&j.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&j.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&j.actions.forcedOffline(this.forcedOffline),e.has("localesConfiguration")&&(j.actions.defaultLocales((r=this.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales),j.actions.availableUiLocales((n=(o=this.localesConfiguration)===null||o===void 0?void 0:o.availableUiLocales)!==null&&n!==void 0?n:[]),j.actions.searchInAllLanguagesAllowed((s=(a=this.localesConfiguration)===null||a===void 0?void 0:a.allLanguagesAllowed)!==null&&s!==void 0?s:!1)),e.has("authenticationRequired")&&j.actions.authenticationRequired(this.authenticationRequired),e.has("availableContentLocales")&&j.actions.availableContentLocales((d=(l=this.availableContentLocales)===null||l===void 0?void 0:l.contentLocales)!==null&&d!==void 0?d:[]),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.session==null&&this.updateSession(),this.metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),this.availableContentLocales==null&&this.updateAvailableContentLocales())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}async updateLocalesConfiguration(){this.localesConfiguration=await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration())}async updateAvailableContentLocales(){this.availableContentLocales=await this.cache.get("availableContentLocales",()=>S3(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}))}};Be.elementDefinitions={};Be.styles=v3;lt([h()],Be.prototype,"baseUrl",void 0);lt([h()],Be.prototype,"apiIntegrationIdentifier",void 0);lt([h()],Be.prototype,"apiIntegrationAppVersion",void 0);lt([h()],Be.prototype,"uiLocale",void 0);lt([Ae(null)],Be.prototype,"availableUiLocales",void 0);lt([Ae(null)],Be.prototype,"metadataConfiguration",void 0);lt([h({type:Boolean})],Be.prototype,"editorMode",void 0);lt([h({type:Boolean})],Be.prototype,"noCustom",void 0);lt([h({type:Boolean})],Be.prototype,"openExternalDocumentInNewTab",void 0);lt([h({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],Be.prototype,"noCustomComponent",void 0);lt([h({type:Boolean})],Be.prototype,"withManualResources",void 0);lt([h({type:Boolean})],Be.prototype,"navigatorOnline",void 0);lt([h({type:Boolean})],Be.prototype,"forcedOffline",void 0);lt([h({type:Object})],Be.prototype,"apiProvider",void 0);lt([h({type:Boolean})],Be.prototype,"authenticationRequired",void 0);lt([Ae([])],Be.prototype,"messageContexts",void 0);lt([Ae(void 0)],Be.prototype,"session",void 0);lt([H()],Be.prototype,"localesConfiguration",void 0);lt([H()],Be.prototype,"availableContentLocales",void 0)});var O3=u(()=>{"use strict";w();bp();G("ft-app-context")(Be)});var Wr=u(()=>{"use strict";Qm();Et();ol();n3();gp();yp();x3();bp();O3()});var vp,An,ll=u(()=>{"use strict";vp=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,o]=e.split(".");return{context:r,key:o,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},An=new vp});var C7,Ea,E3,L3,cl,Oa,Dt,dl,ul,La=u(()=>{"use strict";w();Wr();J();ll();C7=function(t,e,r,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,o);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(n<3?s(a):n>3?s(e,r,a):s(e,r))||a);return n>3&&a&&Object.defineProperty(e,r,a),a},Ea=Symbol("i18nAttributes"),E3=Symbol("i18nListAttributes"),L3=Symbol("i18nProperties"),cl=Symbol("i18nContexts"),Oa=Symbol("i18nUnsubs"),Dt=We(Symbol("withI18n"),function(t){var e,r;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?nl:Ln}i18n(a){let{context:s,key:l,message:d}=a,{custom:p,args:m,argsProvider:g}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let b=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...b)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(An.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var p;return((p=d?.context)===null||p===void 0?void 0:p.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,p=(m,g,b)=>b?.context&&b.key&&a(m,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...m})}:b;(s=this[Ea])===null||s===void 0||s.forEach((m,g)=>d[g]=p(m,g,d[g])),(l=this[E3])===null||l===void 0||l.forEach((m,g)=>{var b;return d[g]=(b=d[g])===null||b===void 0?void 0:b.map(E=>p(m,g,E))})}updateI18nProperties(a){var s;(s=this[L3])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[cl].set(d,{isCustomContext:l}),this[Oa].has(d)||this[Oa].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[cl].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[cl].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Oa].forEach(a=>a()),this[Oa].clear()}}return e=cl,r=Oa,C7([h({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),dl=class extends Dt(W){},ul=class extends Dt(Er){}});var xp,O7,A3=u(()=>{"use strict";ll();xp=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(o=>typeof o=="string"?An.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},O7=new xp});var Rn,pl=u(()=>{"use strict";La();w();ll();A3();Rn=(t,e)=>(r,o)=>{var n;r.constructor.createProperty(o,{type:Object,hasChanged:Vt,converter:An,...e}),r[Ea]=(n=r[Ea])!==null&&n!==void 0?n:new Map,r[Ea].set(o,t??{})}});var jr,R3=u(()=>{"use strict";Wr();jr=class t{static build(e){return new t(e)}static buildCustom(e){return new t(e,!0)}static fromGwt(e){return new t(e)}get service(){return this.custom?nl:Ln}constructor(e,r=!1){this.name=e,this.custom=r,this.properties=new Proxy({},{get:(o,n)=>{let a=n;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...a)=>this.service.resolveMessage(this.name,n,...a)}),this.rawMessages=new Proxy({},{get:(o,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(o,n)=>()=>n}),this.attributes=new Proxy({},{get:(o,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}}});var w3=u(()=>{"use strict";La()});var _3,Sp=u(()=>{"use strict";I();_3=_`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-search-in-document",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "A search component to retrieve occurrences in documents",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,20 +19,20 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-button": "2.0.11",
23
- "@fluid-topics/ft-card": "2.0.11",
24
- "@fluid-topics/ft-i18n": "2.0.11",
25
- "@fluid-topics/ft-search-context": "2.0.11",
26
- "@fluid-topics/ft-search-input": "2.0.11",
27
- "@fluid-topics/ft-search-load-more-button": "2.0.11",
28
- "@fluid-topics/ft-search-result-abstract": "2.0.11",
29
- "@fluid-topics/ft-search-result-title": "2.0.11",
30
- "@fluid-topics/ft-search-results": "2.0.11",
31
- "@fluid-topics/ft-search-results-number": "2.0.11",
32
- "@fluid-topics/ft-typography": "2.0.11",
33
- "@fluid-topics/ft-wc-utils": "2.0.11",
22
+ "@fluid-topics/ft-button": "2.0.12",
23
+ "@fluid-topics/ft-card": "2.0.12",
24
+ "@fluid-topics/ft-i18n": "2.0.12",
25
+ "@fluid-topics/ft-search-context": "2.0.12",
26
+ "@fluid-topics/ft-search-input": "2.0.12",
27
+ "@fluid-topics/ft-search-load-more-button": "2.0.12",
28
+ "@fluid-topics/ft-search-result-abstract": "2.0.12",
29
+ "@fluid-topics/ft-search-result-title": "2.0.12",
30
+ "@fluid-topics/ft-search-results": "2.0.12",
31
+ "@fluid-topics/ft-search-results-number": "2.0.12",
32
+ "@fluid-topics/ft-typography": "2.0.12",
33
+ "@fluid-topics/ft-wc-utils": "2.0.12",
34
34
  "@fluid-topics/public-api": "1.0.117",
35
35
  "lit": "3.1.0"
36
36
  },
37
- "gitHead": "aedc97fb65c7bafd16b7adef8218a58f59fea690"
37
+ "gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
38
38
  }