@fluid-topics/ft-search-bar 2.1.15 → 2.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -606,8 +606,8 @@
|
|
|
606
606
|
position: relative;
|
|
607
607
|
word-break: break-word;
|
|
608
608
|
}
|
|
609
|
-
`;var Ha=["top","right","bottom","left"],Ua=["start","end"],yo=Ha.reduce((t,e)=>t.concat(e,e+"-"+Ua[0],e+"-"+Ua[1]),[]),Ai=Math.min,Gt=Math.max,Oi=Math.round;var gt=t=>({x:t,y:t}),gd={left:"right",right:"left",bottom:"top",top:"bottom"};function za(t,e,r){return Gt(t,Ai(e,r))}function rn(t,e){return typeof t=="function"?t(e):t}function Ci(t){return t.split("-")[0]}function Yt(t){return t.split("-")[1]}function bo(t){return t==="x"?"y":"x"}function xo(t){return t==="y"?"height":"width"}function nn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function So(t){return bo(nn(t))}function ja(t,e,r){r===void 0&&(r=!1);let i=Yt(t),n=So(t),o=xo(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=vo(s)),[s,vo(s)]}function Va(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function vo(t){let e=Ci(t);return gd[e]+t.slice(e.length)}function vd(t){var e,r,i,n;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(n=t.left)!=null?n:0}}function Wa(t){return typeof t!="number"?vd(t):{top:t,right:t,bottom:t,left:t}}function mr(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function qa(t,e,r){let{reference:i,floating:n}=t,o=nn(e),s=So(e),a=xo(s),l=Ci(e),c=o==="y",p=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,f=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:p,y:i.y-n.height};break;case"bottom":h={x:p,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}let m=Yt(e);return m&&(h[s]+=f*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Ka(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=rn(e,t),m=Wa(h),S=a[f?d==="floating"?"reference":"floating":d],E=mr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(S)))==null||r?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:p,strategy:l})),O=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},me=mr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:_,strategy:l}):O);return{top:(E.top-me.top+m.top)/P.y,bottom:(me.bottom-E.bottom+m.bottom)/P.y,left:(E.left-me.left+m.left)/P.x,right:(me.right-E.right+m.right)/P.x}}var yd=50,Ga=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ka},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:p,y:d}=qa(c,i,l),f=i,h=0,m={};for(let g=0;g<o.length;g++){let S=o[g];if(!S)continue;let{name:E,fn:O}=S,{x:_,y:P,data:me,reset:le}=await O({x:p,y:d,initialPlacement:i,placement:f,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});p=_??p,d=P??d,m[E]={...m[E],...me},le&&h<yd&&(h++,typeof le=="object"&&(le.placement&&(f=le.placement),le.rects&&(c=le.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):le.rects),{x:p,y:d}=qa(c,f,l)),g=-1)}return{x:p,y:d,placement:f,strategy:n,middlewareData:m}};function bd(t,e,r){return(t?[...r.filter(n=>Yt(n)===t),...r.filter(n=>Yt(n)!==t)]:r.filter(n=>Ci(n)===n)).filter(n=>t?Yt(n)===t||(e?Va(n)!==n:!1):!0)}var Ya=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:p=!1,alignment:d,allowedPlacements:f=yo,autoAlignment:h=!0,...m}=rn(t,e),g=d!==void 0||f===yo?bd(d||null,h,f):f,S=((r=s.autoPlacement)==null?void 0:r.index)||0,E=g[S];if(E==null)return{};if(a!==E)return{reset:{placement:g[0]}};let O=await l.detectOverflow(e,m),_=ja(E,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),P=[O[Ci(E)],O[_[0]],O[_[1]]],me=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:E,overflows:P}],le=g[S+1];if(le)return{data:{index:S+1,overflows:me},reset:{placement:le}};let jt=me.map(He=>{let et=Yt(He.placement);return[He.placement,et&&p?He.overflows.slice(0,2).reduce((ze,lr)=>ze+lr,0):He.overflows[0],He.overflows]}).sort((He,et)=>He[1]-et[1]),Vt=((n=jt.filter(He=>He[2].slice(0,Yt(He[0])?2:3).every(et=>et<=0))[0])==null?void 0:n[0])||jt[0][0];return Vt!==a?{data:{index:S+1,overflows:me},reset:{placement:Vt}}:{}}}};var Xa=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:O=>{let{x:_,y:P}=O;return{x:_,y:P}}},...c}=rn(t,e),p={x:r,y:i},d=await o.detectOverflow(e,c),f=nn(n),h=bo(f),m=p[h],g=p[f],S=(O,_)=>za(_+d[O==="y"?"top":"left"],_,_-d[O==="y"?"bottom":"right"]);s&&(m=S(h,m)),a&&(g=S(f,g));let E=l.fn({...e,[h]:m,[f]:g});return{...E,data:{x:E.x-r,y:E.y-i,enabled:{[h]:s,[f]:a}}}}}};function sn(){return typeof window<"u"}function vr(t){return Ja(t)?(t.nodeName||"").toLowerCase():"#document"}function Ne(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Rt(t){var e;return(e=(Ja(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ja(t){return sn()?t instanceof Node||t instanceof Ne(t).Node:!1}function nt(t){return sn()?t instanceof Element||t instanceof Ne(t).Element:!1}function Tt(t){return sn()?t instanceof HTMLElement||t instanceof Ne(t).HTMLElement:!1}function Za(t){return!sn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ne(t).ShadowRoot}function Wr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function Qa(t){return/^(table|td|th)$/.test(vr(t))}function wi(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var xd=/transform|translate|scale|rotate|perspective|filter/,Sd=/paint|layout|strict|content/,gr=t=>!!t&&t!=="none",Eo;function qr(t){let e=nt(t)?ot(t):t;return gr(e.transform)||gr(e.translate)||gr(e.scale)||gr(e.rotate)||gr(e.perspective)||!an()&&(gr(e.backdropFilter)||gr(e.filter))||xd.test(e.willChange||"")||Sd.test(e.contain||"")}function el(t){let e=Ft(t);for(;Tt(e)&&!yr(e);){if(qr(e))return e;if(wi(e))return null;e=Ft(e)}return null}function an(){return Eo==null&&(Eo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Eo}function yr(t){return/^(html|body|#document)$/.test(vr(t))}function ot(t){return Ne(t).getComputedStyle(t)}function Ri(t){return nt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ft(t){if(vr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Za(t)&&t.host||Rt(t);return Za(e)?e.host:e}function tl(t){let e=Ft(t);return yr(e)?(t.ownerDocument||t).body:Tt(e)&&Wr(e)?e:tl(e)}function on(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=tl(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=Ne(n);if(o){let a=ln(s);return e.concat(s,s.visualViewport||[],Wr(n)?n:[],a&&r?on(a):[])}else return e.concat(n,on(n,[],r))}function ln(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ol(t){let e=ot(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=Tt(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=Oi(r)!==o||Oi(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function sl(t){return nt(t)?t:t.contextElement}function Kr(t){let e=sl(t);if(!Tt(e))return gt(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=ol(e),s=(o?Oi(r.width):r.width)/i,a=(o?Oi(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Ed=gt(0);function al(t){let e=Ne(t);return!an()||!e.visualViewport?Ed:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ad(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ne(t)?!1:e}function Ti(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=sl(t),s=gt(1);e&&(i?nt(i)&&(s=Kr(i)):s=Kr(t));let a=Ad(o,r,i)?al(o):gt(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,p=n.width/s.x,d=n.height/s.y;if(o){let f=Ne(o),h=i&&nt(i)?Ne(i):i,m=f,g=ln(m);for(;g&&i&&h!==m;){let S=Kr(g),E=g.getBoundingClientRect(),O=ot(g),_=E.left+(g.clientLeft+parseFloat(O.paddingLeft))*S.x,P=E.top+(g.clientTop+parseFloat(O.paddingTop))*S.y;l*=S.x,c*=S.y,p*=S.x,d*=S.y,l+=_,c+=P,m=Ne(g),g=ln(m)}}return mr({width:p,height:d,x:l,y:c})}function cn(t,e){let r=Ri(t).scrollLeft;return e?e.left+r:Ti(Rt(t)).left+r}function ll(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-cn(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Od(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=Rt(i),a=e?wi(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=gt(1),p=gt(0),d=Tt(i);if((d||!d&&!o)&&((vr(i)!=="body"||Wr(s))&&(l=Ri(i)),d)){let h=Ti(i);c=Kr(i),p.x=h.x+i.clientLeft,p.y=h.y+i.clientTop}let f=s&&!d&&!o?ll(s,l):gt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+p.x+f.x,y:r.y*c.y-l.scrollTop*c.y+p.y+f.y}}function Cd(t){return Array.from(t.getClientRects())}function wd(t){let e=Rt(t),r=Ri(t),i=t.ownerDocument.body,n=Gt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Gt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),s=-r.scrollLeft+cn(t),a=-r.scrollTop;return ot(i).direction==="rtl"&&(s+=Gt(e.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:a}}var rl=25;function Rd(t,e){let r=Ne(t),i=Rt(t),n=r.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let p=an();(!p||p&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let c=cn(i);if(c<=0){let p=i.ownerDocument,d=p.body,f=getComputedStyle(d),h=p.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-h);m<=rl&&(o-=m)}else c<=rl&&(o+=c);return{width:o,height:s,x:a,y:l}}function Td(t,e){let r=Ti(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=Tt(t)?Kr(t):gt(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function il(t,e,r){let i;if(e==="viewport")i=Rd(t,r);else if(e==="document")i=wd(Rt(t));else if(nt(e))i=Td(e,r);else{let n=al(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return mr(i)}function cl(t,e){let r=Ft(t);return r===e||!nt(r)||yr(r)?!1:ot(r).position==="fixed"||cl(r,e)}function _d(t,e){let r=e.get(t);if(r)return r;let i=on(t,[],!1).filter(a=>nt(a)&&vr(a)!=="body"),n=null,o=ot(t).position==="fixed",s=o?Ft(t):t;for(;nt(s)&&!yr(s);){let a=ot(s),l=qr(s);!l&&a.position==="fixed"&&(n=null),(o?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Wr(s)&&!l&&cl(t,s))?i=i.filter(p=>p!==s):n=a,s=Ft(s)}return e.set(t,i),i}function Ld(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?wi(e)?[]:_d(e,this._c):[].concat(r),i],a=il(e,s[0],n),l=a.top,c=a.right,p=a.bottom,d=a.left;for(let f=1;f<s.length;f++){let h=il(e,s[f],n);l=Gt(h.top,l),c=Ai(h.right,c),p=Ai(h.bottom,p),d=Gt(h.left,d)}return{width:c-d,height:p-l,x:d,y:l}}function kd(t){let{width:e,height:r}=ol(t);return{width:e,height:r}}function $d(t,e,r){let i=Tt(e),n=Rt(e),o=r==="fixed",s=Ti(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=gt(0);function c(){l.x=cn(n)}if(i||!i&&!o)if((vr(e)!=="body"||Wr(n))&&(a=Ri(e)),i){let h=Ti(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else n&&c();o&&!i&&n&&c();let p=n&&!i&&!o?ll(n,a):gt(0),d=s.left+a.scrollLeft-l.x-p.x,f=s.top+a.scrollTop-l.y-p.y;return{x:d,y:f,width:s.width,height:s.height}}function Ao(t){return ot(t).position==="static"}function nl(t,e){if(!Tt(t)||ot(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Rt(t)===r&&(r=r.ownerDocument.body),r}function ul(t,e){let r=Ne(t);if(wi(t))return r;if(!Tt(t)){let n=Ft(t);for(;n&&!yr(n);){if(nt(n)&&!Ao(n))return n;n=Ft(n)}return r}let i=nl(t,e);for(;i&&Qa(i)&&Ao(i);)i=nl(i,e);return i&&yr(i)&&Ao(i)&&!qr(i)?r:i||el(t)||r}var Pd=async function(t){let e=this.getOffsetParent||ul,r=this.getDimensions,i=await r(t.floating);return{reference:$d(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Dd(t){return ot(t).direction==="rtl"}var un={convertOffsetParentRelativeRectToViewportRelativeRect:Od,getDocumentElement:Rt,getClippingRect:Ld,getOffsetParent:ul,getElementRects:Pd,getClientRects:Cd,getDimensions:kd,getScale:Kr,isElement:nt,isRTL:Dd};var pl=Ya,dl=Xa;var fl=(t,e,r)=>{let i=new Map,n={platform:un,...r},o={...n.platform,_c:i};return Ga(t,e,{...n,platform:o})};function hl(t){return Id(t)}function Oo(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Id(t){for(let e=t;e;e=Oo(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Oo(t);e;e=Oo(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||qr(r)||e.tagName==="BODY"))return e}return null}async function ml(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},fl(t,e,{strategy:i.strategy,platform:{...un,getOffsetParent:n=>un.getOffsetParent(n,hl)},middleware:[dl({crossAxis:!0}),pl({allowedPlacements:[i.placement]})]})}var oi=u(v());var Xo=u(j());var gl=u(j(),1);var Co=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function vl(t,e){return(0,gl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return _i(t);try{return JSON.parse(r)}catch{return _i(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Li,...e??{}})}function Md(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!pn(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!pn(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!pn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function pn(t,e){try{return Md(t,e)}catch{return!1}}function Li(t,e){return!pn(t,e)}function _i(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function dn(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var yl=u(j(),1);var wo=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Li,attribute:!1,...e};(0,yl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var fn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var br=u(j(),1);var hn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var xl=u(A(),1);var mn=globalThis,Nd=mn.ShadowRoot&&(mn.ShadyCSS===void 0||mn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var bl=(t,e)=>{if(Nd)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=mn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var gn=class extends xl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return bl(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){Co(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Sl(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Yr=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Cl,El=Symbol("constructorPrototype"),Al=Symbol("constructorName"),wl=Symbol("exportpartsDebouncer"),Ol=Symbol("dynamicDependenciesLoaded"),Gr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Gr.eventName="exportparts-updated";var _t=class extends gn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Cl]=new hn(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[wl].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Al]=this.constructor.name,this[El]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Al]&&Object.setPrototypeOf(this,this[El])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Ol]||(r[Ol]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Gr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Gr.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 Gr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=Sl(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,c=e.filter(l).map(f=>f.trim());if(c.length===0){this.exportparts=void 0;return}let p=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&a!==void 0?a:[],g=[...h,...m].filter(l).map(S=>S.trim());for(let S of g)p.add(S)}if(p.size===0){this.exportparts=void 0;return}let d=[...p.values()].flatMap(f=>c.map(h=>`${f}:${h}--${f}`));this.exportparts=[...this.part,...d].join(", ")}};Cl=wl;Yr([(0,br.property)()],_t.prototype,"exportpartsPrefix",void 0);Yr([vl([])],_t.prototype,"exportpartsPrefixes",void 0);Yr([(0,br.property)({reflect:!0})],_t.prototype,"exportparts",void 0);Yr([(0,br.property)()],_t.prototype,"customStylesheet",void 0);Yr([(0,br.property)()],_t.prototype,"elementToFocus",void 0);Yr([(0,br.state)()],_t.prototype,"useAdoptedStyleSheets",void 0);function vn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ki=Symbol("internalReduxEventsUnsubscribers"),Xt=Symbol("internalStoresUnsubscribers"),xr=Symbol("internalStores"),Bd=dn(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[xr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[xr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[xr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xr].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[Xt].has(s.store):this[Xt].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[Xt].set(s,a.subscribe(()=>this.updateFromStores())),this[ki].set(s,[]),vn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,p)=>{if(typeof this[p]=="function"&&(!c.store||a.name===c.store)){let d=f=>this[p](f);a.addEventListener(c.eventName,d),this[ki].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Xt].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Xt].has(s)&&this[Xt].get(s)(),this[Xt].delete(s),(a=this[ki].get(s))===null||a===void 0||a.forEach(l=>l()),this[ki].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Xt,r=xr,i=ki,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Rl=class extends Bd(_t){};function st(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(0)var n,o;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 Ut(t){return!!t&&!!t[ee]}function vt(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===qd})(t)||Array.isArray(t)||!!t[Dl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Dl])||Io(t)||Mo(t))}function Sr(t,e,r){r===void 0&&(r=!1),Jr(t)===0?(r?Object.keys:Zr)(t).forEach((function(i){r&&typeof i=="symbol"||e(i,t[i],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Jr(t){var e=t[ee];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Io(t)?2:Mo(t)?3:0}function Xr(t,e){return Jr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Fd(t,e){return Jr(t)===2?t.get(e):t[e]}function Il(t,e,r){var i=Jr(t);i===2?t.set(e,r):i===3?t.add(r):t[e]=r}function Ml(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Io(t){return Vd&&t instanceof Map}function Mo(t){return Wd&&t instanceof Set}function Zt(t){return t.o||t.t}function No(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Fl(t);delete e[ee];for(var r=Zr(e),i=0;i<r.length;i++){var n=r[i],o=e[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Bo(t,e){return e===void 0&&(e=!1),Fo(t)||Ut(t)||!vt(t)||(Jr(t)>1&&(t.set=t.add=t.clear=t.delete=Ud),Object.freeze(t),e&&Sr(t,(function(r,i){return Bo(i,!0)}),!0)),t}function Ud(){st(2)}function Fo(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Lt(t){var e=Do[t];return e||st(18,t),e}function Hd(t,e){Do[t]||(Do[t]=e)}function ko(){return Pi}function Ro(t,e){e&&(Lt("Patches"),t.u=[],t.s=[],t.v=e)}function yn(t){$o(t),t.p.forEach(zd),t.p=null}function $o(t){t===Pi&&(Pi=t.l)}function Tl(t){return Pi={p:[],l:Pi,h:t,m:!0,_:0}}function zd(t){var e=t[ee];e.i===0||e.i===1?e.j():e.g=!0}function To(t,e){e._=e.p.length;var r=e.p[0],i=t!==void 0&&t!==r;return e.h.O||Lt("ES5").S(e,t,i),i?(r[ee].P&&(yn(e),st(4)),vt(t)&&(t=bn(e,t),e.l||xn(e,t)),e.u&&Lt("Patches").M(r[ee].t,t,e.u,e.s)):t=bn(e,r,[]),yn(e),e.u&&e.v(e.u,e.s),t!==Bl?t:void 0}function bn(t,e,r){if(Fo(e))return e;var i=e[ee];if(!i)return Sr(e,(function(a,l){return _l(t,i,e,a,l,r)}),!0),e;if(i.A!==t)return e;if(!i.P)return xn(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=No(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),Sr(o,(function(a,l){return _l(t,i,n,a,l,r,s)})),xn(t,n,!1),r&&t.u&&Lt("Patches").N(i,r,t.u,t.s)}return i.o}function _l(t,e,r,i,n,o,s){if(Ut(n)){var a=bn(t,n,o&&e&&e.i!==3&&!Xr(e.R,i)?o.concat(i):void 0);if(Il(r,i,a),!Ut(a))return;t.m=!1}else s&&r.add(n);if(vt(n)&&!Fo(n)){if(!t.h.D&&t._<1)return;bn(t,n),e&&e.A.l||xn(t,n)}}function xn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Bo(e,r)}function _o(t,e){var r=t[ee];return(r?Zt(r):t)[e]}function Ll(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Object.getPrototypeOf(r)}}function Jt(t){t.P||(t.P=!0,t.l&&Jt(t.l))}function Lo(t){t.o||(t.o=No(t.t))}function Po(t,e,r){var i=Io(e)?Lt("MapSet").F(e,r):Mo(e)?Lt("MapSet").T(e,r):t.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:ko(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=Di;s&&(l=[a],c=$i);var p=Proxy.revocable(l,c),d=p.revoke,f=p.proxy;return a.k=f,a.j=d,f})(e,r):Lt("ES5").J(e,r);return(r?r.A:ko()).p.push(i),i}function jd(t){return Ut(t)||st(22,t),(function e(r){if(!vt(r))return r;var i,n=r[ee],o=Jr(r);if(n){if(!n.P&&(n.i<4||!Lt("ES5").K(n)))return n.t;n.I=!0,i=kl(r,o),n.I=!1}else i=kl(r,o);return Sr(i,(function(s,a){n&&Fd(n.t,s)===a||Il(i,s,e(a))})),o===3?new Set(i):i})(t)}function kl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return No(t)}function Nl(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[ee];return Di.get(c,s)},set:function(c){var p=this[ee];Di.set(p,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][ee];if(!l.P)switch(l.i){case 5:i(l)&&Jt(l);break;case 4:r(l)&&Jt(l)}}}function r(s){for(var a=s.t,l=s.k,c=Zr(l),p=c.length-1;p>=0;p--){var d=c[p];if(d!==ee){var f=a[d];if(f===void 0&&!Xr(a,d))return!0;var h=l[d],m=h&&h[ee];if(m?m.t!==f:!Ml(h,f))return!0}}var g=!!a[ee];return c.length!==Zr(a).length+(g?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&st(3,JSON.stringify(Zt(s)))}var o={};Hd("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,f){if(d){for(var h=Array(f.length),m=0;m<f.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var g=Fl(f);delete g[ee];for(var S=Zr(g),E=0;E<S.length;E++){var O=S[E];g[O]=t(O,d||!!g[O].enumerable)}return Object.create(Object.getPrototypeOf(f),g)})(l,s),p={i:l?5:4,A:a?a.A:ko(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,ee,{value:p,writable:!0}),c},S:function(s,a,l){l?Ut(a)&&a[ee].A===s&&e(s.p):(s.u&&(function c(p){if(p&&typeof p=="object"){var d=p[ee];if(d){var f=d.t,h=d.k,m=d.R,g=d.i;if(g===4)Sr(h,(function(P){P!==ee&&(f[P]!==void 0||Xr(f,P)?m[P]||c(h[P]):(m[P]=!0,Jt(d)))})),Sr(f,(function(P){h[P]!==void 0||Xr(h,P)||(m[P]=!1,Jt(d))}));else if(g===5){if(i(d)&&(Jt(d),m.length=!0),h.length<f.length)for(var S=h.length;S<f.length;S++)m[S]=!1;else for(var E=f.length;E<h.length;E++)m[E]=!0;for(var O=Math.min(h.length,f.length),_=0;_<O;_++)h.hasOwnProperty(_)||(m[_]=!0),m[_]===void 0&&c(h[_])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var $l,Pi,Uo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Vd=typeof Map<"u",Wd=typeof Set<"u",Pl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Bl=Uo?Symbol.for("immer-nothing"):(($l={})["immer-nothing"]=!0,$l),Dl=Uo?Symbol.for("immer-draftable"):"__$immer_draftable",ee=Uo?Symbol.for("immer-state"):"__$immer_state";var qd=""+Object.prototype.constructor,Zr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Fl=Object.getOwnPropertyDescriptors||function(t){var e={};return Zr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Do={},Di={get:function(t,e){if(e===ee)return t;var r=Zt(t);if(!Xr(r,e))return(function(n,o,s){var a,l=Ll(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(t,r,e);var i=r[e];return t.I||!vt(i)?i:i===_o(t.t,e)?(Lo(t),t.o[e]=Po(t.A.h,i,t)):i},has:function(t,e){return e in Zt(t)},ownKeys:function(t){return Reflect.ownKeys(Zt(t))},set:function(t,e,r){var i=Ll(Zt(t),e);if(i?.set)return i.set.call(t.k,r),!0;if(!t.P){var n=_o(Zt(t),e),o=n?.[ee];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ml(r,n)&&(r!==void 0||Xr(t.t,e)))return!0;Lo(t),Jt(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 _o(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Lo(t),Jt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Zt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:r[e]}},defineProperty:function(){st(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){st(12)}},$i={};Sr(Di,(function(t,e){$i[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),$i.deleteProperty=function(t,e){return $i.set.call(this,t,e,void 0)},$i.set=function(t,e,r){return Di.set.call(this,t[0],e,r,t[0])};var Kd=(function(){function t(r){var i=this;this.O=Pl,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(g){var S=this;g===void 0&&(g=a);for(var E=arguments.length,O=Array(E>1?E-1:0),_=1;_<E;_++)O[_-1]=arguments[_];return l.produce(g,(function(P){var me;return(me=o).call.apply(me,[S,P].concat(O))}))}}var c;if(typeof o!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),vt(n)){var p=Tl(i),d=Po(i,n,void 0),f=!0;try{c=o(d),f=!1}finally{f?yn(p):$o(p)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Ro(p,s),To(g,p)}),(function(g){throw yn(p),g})):(Ro(p,s),To(c,p))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===Bl&&(c=void 0),i.D&&Bo(c,!0),s){var h=[],m=[];Lt("Patches").M(n,c,h,m),s(h,m)}return c}st(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var p=arguments.length,d=Array(p>1?p-1:0),f=1;f<p;f++)d[f-1]=arguments[f];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(d))}))};var s,a,l=i.produce(n,o,(function(c,p){s=c,a=p}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},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){vt(r)||st(8),Ut(r)&&(r=jd(r));var i=Tl(this),n=Po(this,r,void 0);return n[ee].C=!0,$o(i),n},e.finishDraft=function(r,i){var n=r&&r[ee],o=n.A;return Ro(o,i),To(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Pl&&st(20),this.O=r},e.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=Lt("Patches").$;return Ut(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},t})(),We=new Kd,Gd=We.produce,jm=We.produceWithPatches.bind(We),Vm=We.setAutoFreeze.bind(We),Wm=We.setUseProxies.bind(We),qm=We.applyPatches.bind(We),Km=We.createDraft.bind(We),Gm=We.finishDraft.bind(We),Sn=Gd;function Er(t){"@babel/helpers - typeof";return Er=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},Er(t)}function Ul(t,e){if(Er(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(Er(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hl(t){var e=Ul(t,"string");return Er(e)=="symbol"?e:e+""}function zl(t,e,r){return(e=Hl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Ho(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jl(Object(r),!0).forEach(function(i){zl(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jl(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Re(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Vl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),zo=function(){return Math.random().toString(36).substring(7).split("").join(".")},En={INIT:"@@redux/INIT"+zo(),REPLACE:"@@redux/REPLACE"+zo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+zo()}};function Yd(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 jo(t,e,r){var i;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Re(1));return r(jo)(t,e)}if(typeof t!="function")throw new Error(Re(2));var n=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function p(){if(l)throw new Error(Re(3));return o}function d(g){if(typeof g!="function")throw new Error(Re(4));if(l)throw new Error(Re(5));var S=!0;return c(),a.push(g),function(){if(S){if(l)throw new Error(Re(6));S=!1,c();var O=a.indexOf(g);a.splice(O,1),s=null}}}function f(g){if(!Yd(g))throw new Error(Re(7));if(typeof g.type>"u")throw new Error(Re(8));if(l)throw new Error(Re(9));try{l=!0,o=n(o,g)}finally{l=!1}for(var S=s=a,E=0;E<S.length;E++){var O=S[E];O()}return g}function h(g){if(typeof g!="function")throw new Error(Re(10));n=g,f({type:En.REPLACE})}function m(){var g,S=d;return g={subscribe:function(O){if(typeof O!="object"||O===null)throw new Error(Re(11));function _(){O.next&&O.next(p())}_();var P=S(_);return{unsubscribe:P}}},g[Vl]=function(){return this},g}return f({type:En.INIT}),i={dispatch:f,subscribe:d,getState:p,replaceReducer:h},i[Vl]=m,i}function Xd(t){Object.keys(t).forEach(function(e){var r=t[e],i=r(void 0,{type:En.INIT});if(typeof i>"u")throw new Error(Re(12));if(typeof r(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Wl(t){for(var e=Object.keys(t),r={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(r[n]=t[n])}var o=Object.keys(r),s,a;try{Xd(r)}catch(l){a=l}return function(c,p){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var f=!1,h={},m=0;m<o.length;m++){var g=o[m],S=r[g],E=c[g],O=S(E,p);if(typeof O>"u"){var _=p&&p.type;throw new Error(Re(14))}h[g]=O,f=f||O!==E}return f=f||o.length!==Object.keys(c).length,f?h:c}}function Qr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function ql(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(Re(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=Qr.apply(void 0,a)(n.dispatch),Ho(Ho({},n),{},{dispatch:o})}}}function Kl(t){var e=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,t):s(a)}}};return e}var Gl=Kl();Gl.withExtraArgument=Kl;var Vo=Gl;var Ql=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},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 i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),Zd=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(p){return l([c,p])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(p){c=[6,p],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ei=function(t,e){for(var r=0,i=e.length,n=t.length;r<i;r++,n++)t[n]=e[r];return t},Jd=Object.defineProperty,Qd=Object.defineProperties,ef=Object.getOwnPropertyDescriptors,Yl=Object.getOwnPropertySymbols,tf=Object.prototype.hasOwnProperty,rf=Object.prototype.propertyIsEnumerable,Xl=function(t,e,r){return e in t?Jd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Qt=function(t,e){for(var r in e||(e={}))tf.call(e,r)&&Xl(t,r,e[r]);if(Yl)for(var i=0,n=Yl(e);i<n.length;i++){var r=n[i];rf.call(e,r)&&Xl(t,r,e[r])}return t},Wo=function(t,e){return Qd(t,ef(e))},nf=function(t,e,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var of=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qr:Qr.apply(null,arguments)},dg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function sf(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 er(t,e){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var o=e.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return Qt(Qt({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:i[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(i){return i.type===t},r}var af=(function(t){Ql(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];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=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ei([void 0],r[0].concat(this)))):new(e.bind.apply(e,ei([void 0],r.concat(this))))},e})(Array),lf=(function(t){Ql(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];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=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ei([void 0],r[0].concat(this)))):new(e.bind.apply(e,ei([void 0],r.concat(this))))},e})(Array);function Go(t){return vt(t)?Sn(t,function(){}):t}function cf(t){return typeof t=="boolean"}function uf(){return function(e){return pf(e)}}function pf(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new af;if(r&&(cf(r)?c.push(Vo):c.push(Vo.withExtraArgument(r.extraArgument))),0){if(n)var p;if(s)var d;if(l)var f}return c}var qo=!0;function ec(t){var e=uf(),r=t||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,p=c===void 0?void 0:c,d=r.enhancers,f=d===void 0?void 0:d,h;if(typeof n=="function")h=n;else if(sf(n))h=Wl(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 m=s;if(typeof m=="function"&&(m=m(e),!qo&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qo&&m.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=ql.apply(void 0,m),S=Qr;l&&(S=of(Qt({trace:!qo},typeof l=="object"&&l)));var E=new lf(g),O=E;Array.isArray(f)?O=ei([g],f):typeof f=="function"&&(O=f(E));var _=S.apply(void 0,O);return jo(h,p,_)}function tc(t){var e={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return t(n),[e,r,i]}function df(t){return typeof t=="function"}function ff(t,e,r,i){r===void 0&&(r=[]);var n=typeof e=="function"?tc(e):[e,r,i],o=n[0],s=n[1],a=n[2],l;if(df(t))l=function(){return Go(t())};else{var c=Go(t);l=function(){return c}}function p(d,f){d===void 0&&(d=l());var h=ei([o[f.type]],s.filter(function(m){var g=m.matcher;return g(f)}).map(function(m){var g=m.reducer;return g}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,g){if(g)if(Ut(m)){var S=m,E=g(S,f);return E===void 0?m:E}else{if(vt(m))return Sn(m,function(O){return g(O,f)});var E=g(m,f);if(E===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return m},d)}return p.getInitialState=l,p}function hf(t,e){return t+"/"+e}function rc(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:Go(t.initialState),i=t.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(p){var d=i[p],f=hf(e,p),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[p]=h,s[f]=h,a[p]=m?er(f,m):er(f)});function l(){var p=typeof t.extraReducers=="function"?tc(t.extraReducers):[t.extraReducers],d=p[0],f=d===void 0?{}:d,h=p[1],m=h===void 0?[]:h,g=p[2],S=g===void 0?void 0:g,E=Qt(Qt({},f),s);return ff(r,function(O){for(var _ in E)O.addCase(_,E[_]);for(var P=0,me=m;P<me.length;P++){var le=me[P];O.addMatcher(le.matcher,le.reducer)}S&&O.addDefaultCase(S)})}var c;return{name:e,reducer:function(p,d){return c||(c=l()),c(p,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var mf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gf=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=mf[Math.random()*64|0];return e},vf=["name","message","stack","code"],Ko=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Zl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),yf=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,i=vf;r<i.length;r++){var n=i[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},gg=(function(){function t(e,r,i){var n=er(e+"/fulfilled",function(p,d,f,h){return{payload:p,meta:Wo(Qt({},h||{}),{arg:f,requestId:d,requestStatus:"fulfilled"})}}),o=er(e+"/pending",function(p,d,f){return{payload:void 0,meta:Wo(Qt({},f||{}),{arg:d,requestId:p,requestStatus:"pending"})}}),s=er(e+"/rejected",function(p,d,f,h,m){return{payload:h,error:(i&&i.serializeError||yf)(p||"Rejected"),meta:Wo(Qt({},m||{}),{arg:f,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p})();function c(p){return function(d,f,h){var m=i?.idGenerator?i.idGenerator(p):gf(),g=new l,S,E=!1;function O(P){S=P,g.abort()}var _=(function(){return nf(this,null,function(){var P,me,le,jt,Jn,Vt,He;return Zd(this,function(et){switch(et.label){case 0:return et.trys.push([0,4,,5]),jt=(P=i?.condition)==null?void 0:P.call(i,p,{getState:f,extra:h}),xf(jt)?[4,jt]:[3,2];case 1:jt=et.sent(),et.label=2;case 2:if(jt===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,Jn=new Promise(function(ze,lr){return g.signal.addEventListener("abort",function(){return lr({name:"AbortError",message:S||"Aborted"})})}),d(o(m,p,(me=i?.getPendingMeta)==null?void 0:me.call(i,{requestId:m,arg:p},{getState:f,extra:h}))),[4,Promise.race([Jn,Promise.resolve(r(p,{dispatch:d,getState:f,extra:h,requestId:m,signal:g.signal,abort:O,rejectWithValue:function(ze,lr){return new Ko(ze,lr)},fulfillWithValue:function(ze,lr){return new Zl(ze,lr)}})).then(function(ze){if(ze instanceof Ko)throw ze;return ze instanceof Zl?n(ze.payload,m,p,ze.meta):n(ze,m,p)})])];case 3:return le=et.sent(),[3,5];case 4:return Vt=et.sent(),le=Vt instanceof Ko?s(null,m,p,Vt.payload,Vt.meta):s(Vt,m,p),[3,5];case 5:return He=i&&!i.dispatchConditionRejection&&s.match(le)&&le.meta.condition,He||d(le),[2,le]}})})})();return Object.assign(_,{abort:O,requestId:m,arg:p,unwrap:function(){return _.then(bf)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t})();function bf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function xf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ic="listener",nc="completed",oc="cancelled",vg="task-"+oc,yg="task-"+nc,bg=ic+"-"+oc,xg=ic+"-"+nc;var Yo="listenerMiddleware";var Sg=er(Yo+"/add"),Eg=er(Yo+"/removeAll"),Ag=er(Yo+"/remove");var Jl,Og=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Jl||(Jl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Sf=function(t){return function(e){setTimeout(e,t)}},Cg=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Sf(10);Nl();var Ef=dn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),An=class extends Ef(Object){};window.ftReduxStores||(window.ftReduxStores={});var sc=class t extends An{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(vn(o))return o;if(n==null)return;let s=rc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=ec({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let p=_i(s.getInitialState());for(let d of c.keeping)p[d]=(l??p)[d];return p}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new fn;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...p)=>{let d=c(...p.map(n));return this.reduxStore.dispatch(d),d}:p=>{this.setState({[l]:n(p)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var On=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Cn=u(v()),Af="ft-app-info",ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ti.eventName="authentication-change";var Ii=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ii.eventName="ui-locale-changed";var Of={session:(t,e)=>{(0,Cn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>R.dispatchEvent(new ti(e.payload)),0))}},R=Cn.FtReduxStore.get({name:Af,reducers:Of,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var ac=u(v()),wn=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Qg=(0,ac.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>On.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wn([(0,Xo.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),wn([(0,Xo.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),wn([wo({store:R.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),wn([wo({store:R.name})],e.prototype,"uiLocale",void 0),e});var lc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(lc||(lc={}));var cc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(cc||(cc={}));var uc;(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"})(uc||(uc={}));var pc;(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"})(pc||(pc={}));var dc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(dc||(dc={}));var fc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(fc||(fc={}));var hc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(hc||(hc={}));var mc;(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"})(mc||(mc={}));var gc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(gc||(gc={}));var vc;(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"})(vc||(vc={}));var yc;(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"})(yc||(yc={}));var bc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(bc||(bc={}));var xc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(xc||(xc={}));var Sc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Sc||(Sc={}));var Ec;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ec||(Ec={}));var Ac;(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"})(Ac||(Ac={}));var Oc;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Oc||(Oc={}));var Cc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Cc||(Cc={}));var wc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(wc||(wc={}));var Rc;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Rc||(Rc={}));var Tc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Tc||(Tc={}));var _c;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(_c||(_c={}));var Lc;(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"})(Lc||(Lc={}));var kc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(kc||(kc={}));var $c;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})($c||($c={}));var Pc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pc||(Pc={}));var Dc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Dc||(Dc={}));var de;(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"})(de||(de={}));var at;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(at||(at={}));var Ic;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Ic||(Ic={}));var Mc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Mc||(Mc={}));var Nc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Nc||(Nc={}));var Bc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Bc||(Bc={}));var Fc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Fc||(Fc={}));var Uc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Uc||(Uc={}));var Hc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Hc||(Hc={}));var zc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(zc||(zc={}));var jc;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(jc||(jc={}));var Vc;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Vc||(Vc={}));var Wc;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Wc||(Wc={}));var qc;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(qc||(qc={}));var Cf={[de.PERSONAL_BOOK_SHARE_USER]:[de.PERSONAL_BOOK_USER],[de.HTML_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.PDF_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.KHUB_ADMIN]:[de.CONTENT_PUBLISHER],[de.ADMIN]:[de.KHUB_ADMIN,de.USERS_ADMIN,de.PORTAL_ADMIN,de.BEHAVIOR_DATA_USER],[de.GENERATIVE_AI_EXPORT_USER]:[de.GENERATIVE_AI_USER]};function Kc(t,e){return t===e||(Cf[t]??[]).some(r=>Kc(r,e))}function Gc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Kc(i,e))}var kn=u(v());var Zo=u(v());var Ar=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=R.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=R.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var ri=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ar.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ar.await()}};var qe=class extends ri{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new Zo.CacheRegistry,this.cache=e?n.commonCache:new Zo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Rn=class extends qe{async listMySearches(){let{session:e}=R.getState();return Gc(e,de.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Tn=class extends qe{async listMyBookmarks(){let e=R.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var _n=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var Ln=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var wf="ft-user-assets",Rf={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(at).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;Qo(t,r,[...Jo(t,r),n]),Yc(t,r,1,i),Xc(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Qo(t,r,Jo(t,r).map(n=>n.id===i.id?i:n)),Xc(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;Qo(t,r,Jo(t,r).filter(o=>o.id!==n)),Yc(t,r,-1,i)}},Zc={[at.SEARCHES]:"savedSearches",[at.BOOKMARKS]:"bookmarks",[at.BOOKS]:void 0,[at.COLLECTIONS]:void 0},Jo=(t,e)=>{var r;let i=Zc[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Qo=(t,e,r)=>{let i=Zc[e];i&&(t[i]=r)},Yc=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===at.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Xc=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},ke=kn.FtReduxStore.get({name:wf,reducers:Rf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(at).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),es=class{constructor(e=new _n,r=new Ln){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Tn,this.savedSearchesService=new Rn,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=R.getState();(0,kn.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(),ke.actions.clearAssetCount(),ke.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ke.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ke.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ke.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ke.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ke.getState().assetCounts.allAsset[e]!==r.count&&ke.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ke.getState().assetCounts.bookmarkByMap[e]!==r.count&&ke.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ke.getState().assetCounts.bookmarkByMap).length!==0;e===at.BOOKMARKS&&r&&ke.actions.clearBookmarkCountByMap(),ke.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;ke.actions.bookmarks(r)}}},Tf=new es;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Tf);var ts=class{addCommand(e,r=!1){R.commands.add(e,r)}consumeCommand(e){return R.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ts;var lt=u(v());var Jc,ii=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},_f=Symbol("clearAfterUnitTest"),$n=class extends(0,lt.withEventBus)(qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Jc]=()=>{this.defaultMessages={},this.cache=new lt.CacheRegistry,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=R.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,lt.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new lt.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof lt.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var 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 ii({loadedContexts:e})),this.dispatchEvent(new ii({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new ii({loadedContexts:[e]})),this.dispatchEvent(new ii({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,lt.delay)(0).then(()=>i()).catch(()=>null)))}};Jc=_f;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends $n{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends $n{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Mi=window.FluidTopicsI18nService,rs=window.FluidTopicsCustomI18nService;var Qc=u(v()),is=class{highlightHtml(e,r,i){(0,Qc.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new is;var eu=u(v());var ns=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=R.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return eu.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:R.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new ns;var tu=u(v());var Ni=class{static get(e,r){var i,n;let o=R.getState(),{lang:s,region:a}=(n=(i=o.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new tu.SearchPlaceConverter(o.baseUrl,e??20,o.searchInAllLanguagesAllowed,r??`${s}-${a}`)}};var os=class{urlToSearchRequest(e){return Ni.get().parse(e)}searchRequestToUrl(e){return Ni.get().serialize(e)}};window.FluidTopicsUrlService=new os;var Ht=u(v());var Or=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Or.eventName="change";var ss=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))}},ru=new ss;var Pn=class t extends Ht.WithEventBus{static build(){return new t(window.history,ru,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.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 i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ht.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Or(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(Or.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Or.eventName,e)}currentItem(){return(0,Ht.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,Ht.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Ht.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Ht.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;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 i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Pn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var iu=u(A());var nu=iu.css`
|
|
610
|
-
`;var au=u(A()),Ke=u(j()),Rr=u(v());var Cr=u(v());function ou(t,e){let{authenticationRequired:r,session:i}=R.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Dn=class extends ri{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var as=class t extends Cr.FtStateManager{static build(e){return new t(R,e)}constructor(e,r){super(),this.store=e,this.cache=new Cr.CacheRegistry,this.withManualResources=!0,this.
|
|
609
|
+
`;var Ha=["top","right","bottom","left"],Ua=["start","end"],yo=Ha.reduce((t,e)=>t.concat(e,e+"-"+Ua[0],e+"-"+Ua[1]),[]),Ai=Math.min,Gt=Math.max,Oi=Math.round;var gt=t=>({x:t,y:t}),gd={left:"right",right:"left",bottom:"top",top:"bottom"};function za(t,e,r){return Gt(t,Ai(e,r))}function rn(t,e){return typeof t=="function"?t(e):t}function Ci(t){return t.split("-")[0]}function Yt(t){return t.split("-")[1]}function bo(t){return t==="x"?"y":"x"}function xo(t){return t==="y"?"height":"width"}function nn(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function So(t){return bo(nn(t))}function ja(t,e,r){r===void 0&&(r=!1);let i=Yt(t),n=So(t),o=xo(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=vo(s)),[s,vo(s)]}function Va(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function vo(t){let e=Ci(t);return gd[e]+t.slice(e.length)}function vd(t){var e,r,i,n;return{top:(e=t.top)!=null?e:0,right:(r=t.right)!=null?r:0,bottom:(i=t.bottom)!=null?i:0,left:(n=t.left)!=null?n:0}}function Wa(t){return typeof t!="number"?vd(t):{top:t,right:t,bottom:t,left:t}}function mr(t){let{x:e,y:r,width:i,height:n}=t;return{width:i,height:n,top:r,left:e,right:e+i,bottom:r+n,x:e,y:r}}function qa(t,e,r){let{reference:i,floating:n}=t,o=nn(e),s=So(e),a=xo(s),l=Ci(e),c=o==="y",p=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,f=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:p,y:i.y-n.height};break;case"bottom":h={x:p,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}let m=Yt(e);return m&&(h[s]+=f*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Ka(t,e){var r;e===void 0&&(e={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=rn(e,t),m=Wa(h),S=a[f?d==="floating"?"reference":"floating":d],E=mr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(S)))==null||r?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:p,strategy:l})),O=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},me=mr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:_,strategy:l}):O);return{top:(E.top-me.top+m.top)/P.y,bottom:(me.bottom-E.bottom+m.bottom)/P.y,left:(E.left-me.left+m.left)/P.x,right:(me.right-E.right+m.right)/P.x}}var yd=50,Ga=async(t,e,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Ka},l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:p,y:d}=qa(c,i,l),f=i,h=0,m={};for(let g=0;g<o.length;g++){let S=o[g];if(!S)continue;let{name:E,fn:O}=S,{x:_,y:P,data:me,reset:le}=await O({x:p,y:d,initialPlacement:i,placement:f,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:e}});p=_??p,d=P??d,m[E]={...m[E],...me},le&&h<yd&&(h++,typeof le=="object"&&(le.placement&&(f=le.placement),le.rects&&(c=le.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):le.rects),{x:p,y:d}=qa(c,f,l)),g=-1)}return{x:p,y:d,placement:f,strategy:n,middlewareData:m}};function bd(t,e,r){return(t?[...r.filter(n=>Yt(n)===t),...r.filter(n=>Yt(n)!==t)]:r.filter(n=>Ci(n)===n)).filter(n=>t?Yt(n)===t||(e?Va(n)!==n:!1):!0)}var Ya=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:p=!1,alignment:d,allowedPlacements:f=yo,autoAlignment:h=!0,...m}=rn(t,e),g=d!==void 0||f===yo?bd(d||null,h,f):f,S=((r=s.autoPlacement)==null?void 0:r.index)||0,E=g[S];if(E==null)return{};if(a!==E)return{reset:{placement:g[0]}};let O=await l.detectOverflow(e,m),_=ja(E,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),P=[O[Ci(E)],O[_[0]],O[_[1]]],me=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:E,overflows:P}],le=g[S+1];if(le)return{data:{index:S+1,overflows:me},reset:{placement:le}};let jt=me.map(He=>{let et=Yt(He.placement);return[He.placement,et&&p?He.overflows.slice(0,2).reduce((ze,lr)=>ze+lr,0):He.overflows[0],He.overflows]}).sort((He,et)=>He[1]-et[1]),Vt=((n=jt.filter(He=>He[2].slice(0,Yt(He[0])?2:3).every(et=>et<=0))[0])==null?void 0:n[0])||jt[0][0];return Vt!==a?{data:{index:S+1,overflows:me},reset:{placement:Vt}}:{}}}};var Xa=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:i,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:O=>{let{x:_,y:P}=O;return{x:_,y:P}}},...c}=rn(t,e),p={x:r,y:i},d=await o.detectOverflow(e,c),f=nn(n),h=bo(f),m=p[h],g=p[f],S=(O,_)=>za(_+d[O==="y"?"top":"left"],_,_-d[O==="y"?"bottom":"right"]);s&&(m=S(h,m)),a&&(g=S(f,g));let E=l.fn({...e,[h]:m,[f]:g});return{...E,data:{x:E.x-r,y:E.y-i,enabled:{[h]:s,[f]:a}}}}}};function sn(){return typeof window<"u"}function vr(t){return Ja(t)?(t.nodeName||"").toLowerCase():"#document"}function Ne(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Rt(t){var e;return(e=(Ja(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ja(t){return sn()?t instanceof Node||t instanceof Ne(t).Node:!1}function nt(t){return sn()?t instanceof Element||t instanceof Ne(t).Element:!1}function Tt(t){return sn()?t instanceof HTMLElement||t instanceof Ne(t).HTMLElement:!1}function Za(t){return!sn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ne(t).ShadowRoot}function Wr(t){let{overflow:e,overflowX:r,overflowY:i,display:n}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+r)&&n!=="inline"&&n!=="contents"}function Qa(t){return/^(table|td|th)$/.test(vr(t))}function wi(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var xd=/transform|translate|scale|rotate|perspective|filter/,Sd=/paint|layout|strict|content/,gr=t=>!!t&&t!=="none",Eo;function qr(t){let e=nt(t)?ot(t):t;return gr(e.transform)||gr(e.translate)||gr(e.scale)||gr(e.rotate)||gr(e.perspective)||!an()&&(gr(e.backdropFilter)||gr(e.filter))||xd.test(e.willChange||"")||Sd.test(e.contain||"")}function el(t){let e=Ft(t);for(;Tt(e)&&!yr(e);){if(qr(e))return e;if(wi(e))return null;e=Ft(e)}return null}function an(){return Eo==null&&(Eo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Eo}function yr(t){return/^(html|body|#document)$/.test(vr(t))}function ot(t){return Ne(t).getComputedStyle(t)}function Ri(t){return nt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ft(t){if(vr(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Za(t)&&t.host||Rt(t);return Za(e)?e.host:e}function tl(t){let e=Ft(t);return yr(e)?(t.ownerDocument||t).body:Tt(e)&&Wr(e)?e:tl(e)}function on(t,e,r){var i;e===void 0&&(e=[]),r===void 0&&(r=!0);let n=tl(t),o=n===((i=t.ownerDocument)==null?void 0:i.body),s=Ne(n);if(o){let a=ln(s);return e.concat(s,s.visualViewport||[],Wr(n)?n:[],a&&r?on(a):[])}else return e.concat(n,on(n,[],r))}function ln(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ol(t){let e=ot(t),r=parseFloat(e.width)||0,i=parseFloat(e.height)||0,n=Tt(t),o=n?t.offsetWidth:r,s=n?t.offsetHeight:i,a=Oi(r)!==o||Oi(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function sl(t){return nt(t)?t:t.contextElement}function Kr(t){let e=sl(t);if(!Tt(e))return gt(1);let r=e.getBoundingClientRect(),{width:i,height:n,$:o}=ol(e),s=(o?Oi(r.width):r.width)/i,a=(o?Oi(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Ed=gt(0);function al(t){let e=Ne(t);return!an()||!e.visualViewport?Ed:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ad(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ne(t)?!1:e}function Ti(t,e,r,i){e===void 0&&(e=!1),r===void 0&&(r=!1);let n=t.getBoundingClientRect(),o=sl(t),s=gt(1);e&&(i?nt(i)&&(s=Kr(i)):s=Kr(t));let a=Ad(o,r,i)?al(o):gt(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,p=n.width/s.x,d=n.height/s.y;if(o){let f=Ne(o),h=i&&nt(i)?Ne(i):i,m=f,g=ln(m);for(;g&&i&&h!==m;){let S=Kr(g),E=g.getBoundingClientRect(),O=ot(g),_=E.left+(g.clientLeft+parseFloat(O.paddingLeft))*S.x,P=E.top+(g.clientTop+parseFloat(O.paddingTop))*S.y;l*=S.x,c*=S.y,p*=S.x,d*=S.y,l+=_,c+=P,m=Ne(g),g=ln(m)}}return mr({width:p,height:d,x:l,y:c})}function cn(t,e){let r=Ri(t).scrollLeft;return e?e.left+r:Ti(Rt(t)).left+r}function ll(t,e){let r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-cn(t,r),n=r.top+e.scrollTop;return{x:i,y:n}}function Od(t){let{elements:e,rect:r,offsetParent:i,strategy:n}=t,o=n==="fixed",s=Rt(i),a=e?wi(e.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=gt(1),p=gt(0),d=Tt(i);if((d||!d&&!o)&&((vr(i)!=="body"||Wr(s))&&(l=Ri(i)),d)){let h=Ti(i);c=Kr(i),p.x=h.x+i.clientLeft,p.y=h.y+i.clientTop}let f=s&&!d&&!o?ll(s,l):gt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+p.x+f.x,y:r.y*c.y-l.scrollTop*c.y+p.y+f.y}}function Cd(t){return Array.from(t.getClientRects())}function wd(t){let e=Rt(t),r=Ri(t),i=t.ownerDocument.body,n=Gt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Gt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),s=-r.scrollLeft+cn(t),a=-r.scrollTop;return ot(i).direction==="rtl"&&(s+=Gt(e.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:a}}var rl=25;function Rd(t,e){let r=Ne(t),i=Rt(t),n=r.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let p=an();(!p||p&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let c=cn(i);if(c<=0){let p=i.ownerDocument,d=p.body,f=getComputedStyle(d),h=p.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-h);m<=rl&&(o-=m)}else c<=rl&&(o+=c);return{width:o,height:s,x:a,y:l}}function Td(t,e){let r=Ti(t,!0,e==="fixed"),i=r.top+t.clientTop,n=r.left+t.clientLeft,o=Tt(t)?Kr(t):gt(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function il(t,e,r){let i;if(e==="viewport")i=Rd(t,r);else if(e==="document")i=wd(Rt(t));else if(nt(e))i=Td(e,r);else{let n=al(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return mr(i)}function cl(t,e){let r=Ft(t);return r===e||!nt(r)||yr(r)?!1:ot(r).position==="fixed"||cl(r,e)}function _d(t,e){let r=e.get(t);if(r)return r;let i=on(t,[],!1).filter(a=>nt(a)&&vr(a)!=="body"),n=null,o=ot(t).position==="fixed",s=o?Ft(t):t;for(;nt(s)&&!yr(s);){let a=ot(s),l=qr(s);!l&&a.position==="fixed"&&(n=null),(o?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Wr(s)&&!l&&cl(t,s))?i=i.filter(p=>p!==s):n=a,s=Ft(s)}return e.set(t,i),i}function Ld(t){let{element:e,boundary:r,rootBoundary:i,strategy:n}=t,s=[...r==="clippingAncestors"?wi(e)?[]:_d(e,this._c):[].concat(r),i],a=il(e,s[0],n),l=a.top,c=a.right,p=a.bottom,d=a.left;for(let f=1;f<s.length;f++){let h=il(e,s[f],n);l=Gt(h.top,l),c=Ai(h.right,c),p=Ai(h.bottom,p),d=Gt(h.left,d)}return{width:c-d,height:p-l,x:d,y:l}}function kd(t){let{width:e,height:r}=ol(t);return{width:e,height:r}}function $d(t,e,r){let i=Tt(e),n=Rt(e),o=r==="fixed",s=Ti(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=gt(0);function c(){l.x=cn(n)}if(i||!i&&!o)if((vr(e)!=="body"||Wr(n))&&(a=Ri(e)),i){let h=Ti(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else n&&c();o&&!i&&n&&c();let p=n&&!i&&!o?ll(n,a):gt(0),d=s.left+a.scrollLeft-l.x-p.x,f=s.top+a.scrollTop-l.y-p.y;return{x:d,y:f,width:s.width,height:s.height}}function Ao(t){return ot(t).position==="static"}function nl(t,e){if(!Tt(t)||ot(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Rt(t)===r&&(r=r.ownerDocument.body),r}function ul(t,e){let r=Ne(t);if(wi(t))return r;if(!Tt(t)){let n=Ft(t);for(;n&&!yr(n);){if(nt(n)&&!Ao(n))return n;n=Ft(n)}return r}let i=nl(t,e);for(;i&&Qa(i)&&Ao(i);)i=nl(i,e);return i&&yr(i)&&Ao(i)&&!qr(i)?r:i||el(t)||r}var Pd=async function(t){let e=this.getOffsetParent||ul,r=this.getDimensions,i=await r(t.floating);return{reference:$d(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Dd(t){return ot(t).direction==="rtl"}var un={convertOffsetParentRelativeRectToViewportRelativeRect:Od,getDocumentElement:Rt,getClippingRect:Ld,getOffsetParent:ul,getElementRects:Pd,getClientRects:Cd,getDimensions:kd,getScale:Kr,isElement:nt,isRTL:Dd};var pl=Ya,dl=Xa;var fl=(t,e,r)=>{let i=new Map,n={platform:un,...r},o={...n.platform,_c:i};return Ga(t,e,{...n,platform:o})};function hl(t){return Id(t)}function Oo(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Id(t){for(let e=t;e;e=Oo(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Oo(t);e;e=Oo(e)){if(!(e instanceof Element))continue;let r=getComputedStyle(e);if(r.display!=="contents"&&(r.position!=="static"||qr(r)||e.tagName==="BODY"))return e}return null}async function ml(t,e,r){let i;return typeof r=="object"?i=r:i={placement:r},fl(t,e,{strategy:i.strategy,platform:{...un,getOffsetParent:n=>un.getOffsetParent(n,hl)},middleware:[dl({crossAxis:!0}),pl({allowedPlacements:[i.placement]})]})}var oi=u(v());var Xo=u(j());var gl=u(j(),1);var Co=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function vl(t,e){return(0,gl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return _i(t);try{return JSON.parse(r)}catch{return _i(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Li,...e??{}})}function Md(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!pn(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!pn(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(r=o.length,r!==n(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!pn(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function pn(t,e){try{return Md(t,e)}catch{return!1}}function Li(t,e){return!pn(t,e)}function _i(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function dn(t,e){let r=i=>i[t]===!0;return i=>{if(r(i))return i;let n=e(i);return n[t]=!0,n}}var yl=u(j(),1);var wo=t=>{let e=t??{};return(r,i)=>{var n;let o={hasChanged:Li,attribute:!1,...e};(0,yl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[i]),store:e.store})}};var fn=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(i=>i.type===e);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};var br=u(j(),1);var hn=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let i=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var xl=u(A(),1);var mn=globalThis,Nd=mn.ShadowRoot&&(mn.ShadyCSS===void 0||mn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var bl=(t,e)=>{if(Nd)t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),n=mn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)}};var gn=class extends xl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let r={...e.shadowRootOptions,customElements:e.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return bl(i,e.elementStyles),i}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(e,r){Co(e)(r),this.canDefineScopedElement(e)&&this.registry.define(e,r)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,r){this.scopedRegistryConstructor.defineScopedElement(e,r)}};function Sl(t,e,...r){var i;let n=t.querySelector(e);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var Yr=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Cl,El=Symbol("constructorPrototype"),Al=Symbol("constructorName"),wl=Symbol("exportpartsDebouncer"),Ol=Symbol("dynamicDependenciesLoaded"),Gr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};Gr.eventName="exportparts-updated";var _t=class extends gn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Cl]=new hn(5),this.scheduleExportpartsUpdate=()=>{var e,r,i;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[wl].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Al]=this.constructor.name,this[El]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Al]&&Object.setPrototypeOf(this,this[El])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Ol]||(r[Ol]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(Gr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(Gr.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 Gr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=Sl(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var r,i,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,c=e.filter(l).map(f=>f.trim());if(c.length===0){this.exportparts=void 0;return}let p=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&a!==void 0?a:[],g=[...h,...m].filter(l).map(S=>S.trim());for(let S of g)p.add(S)}if(p.size===0){this.exportparts=void 0;return}let d=[...p.values()].flatMap(f=>c.map(h=>`${f}:${h}--${f}`));this.exportparts=[...this.part,...d].join(", ")}};Cl=wl;Yr([(0,br.property)()],_t.prototype,"exportpartsPrefix",void 0);Yr([vl([])],_t.prototype,"exportpartsPrefixes",void 0);Yr([(0,br.property)({reflect:!0})],_t.prototype,"exportparts",void 0);Yr([(0,br.property)()],_t.prototype,"customStylesheet",void 0);Yr([(0,br.property)()],_t.prototype,"elementToFocus",void 0);Yr([(0,br.state)()],_t.prototype,"useAdoptedStyleSheets",void 0);function vn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var ki=Symbol("internalReduxEventsUnsubscribers"),Xt=Symbol("internalStoresUnsubscribers"),xr=Symbol("internalStores"),Bd=dn(Symbol("withRedux"),function(t){var e,r,i;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[xr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[xr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[xr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[xr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[xr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[xr].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[Xt].has(s.store):this[Xt].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[Xt].set(s,a.subscribe(()=>this.updateFromStores())),this[ki].set(s,[]),vn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,p)=>{if(typeof this[p]=="function"&&(!c.store||a.name===c.store)){let d=f=>this[p](f);a.addEventListener(c.eventName,d),this[ki].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Xt].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[Xt].has(s)&&this[Xt].get(s)(),this[Xt].delete(s),(a=this[ki].get(s))===null||a===void 0||a.forEach(l=>l()),this[ki].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Xt,r=xr,i=ki,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Rl=class extends Bd(_t){};function st(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];if(0)var n,o;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 Ut(t){return!!t&&!!t[ee]}function vt(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===qd})(t)||Array.isArray(t)||!!t[Dl]||!!(!((e=t.constructor)===null||e===void 0)&&e[Dl])||Io(t)||Mo(t))}function Sr(t,e,r){r===void 0&&(r=!1),Jr(t)===0?(r?Object.keys:Zr)(t).forEach((function(i){r&&typeof i=="symbol"||e(i,t[i],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Jr(t){var e=t[ee];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Io(t)?2:Mo(t)?3:0}function Xr(t,e){return Jr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Fd(t,e){return Jr(t)===2?t.get(e):t[e]}function Il(t,e,r){var i=Jr(t);i===2?t.set(e,r):i===3?t.add(r):t[e]=r}function Ml(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Io(t){return Vd&&t instanceof Map}function Mo(t){return Wd&&t instanceof Set}function Zt(t){return t.o||t.t}function No(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Fl(t);delete e[ee];for(var r=Zr(e),i=0;i<r.length;i++){var n=r[i],o=e[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[n]})}return Object.create(Object.getPrototypeOf(t),e)}function Bo(t,e){return e===void 0&&(e=!1),Fo(t)||Ut(t)||!vt(t)||(Jr(t)>1&&(t.set=t.add=t.clear=t.delete=Ud),Object.freeze(t),e&&Sr(t,(function(r,i){return Bo(i,!0)}),!0)),t}function Ud(){st(2)}function Fo(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Lt(t){var e=Do[t];return e||st(18,t),e}function Hd(t,e){Do[t]||(Do[t]=e)}function ko(){return Pi}function Ro(t,e){e&&(Lt("Patches"),t.u=[],t.s=[],t.v=e)}function yn(t){$o(t),t.p.forEach(zd),t.p=null}function $o(t){t===Pi&&(Pi=t.l)}function Tl(t){return Pi={p:[],l:Pi,h:t,m:!0,_:0}}function zd(t){var e=t[ee];e.i===0||e.i===1?e.j():e.g=!0}function To(t,e){e._=e.p.length;var r=e.p[0],i=t!==void 0&&t!==r;return e.h.O||Lt("ES5").S(e,t,i),i?(r[ee].P&&(yn(e),st(4)),vt(t)&&(t=bn(e,t),e.l||xn(e,t)),e.u&&Lt("Patches").M(r[ee].t,t,e.u,e.s)):t=bn(e,r,[]),yn(e),e.u&&e.v(e.u,e.s),t!==Bl?t:void 0}function bn(t,e,r){if(Fo(e))return e;var i=e[ee];if(!i)return Sr(e,(function(a,l){return _l(t,i,e,a,l,r)}),!0),e;if(i.A!==t)return e;if(!i.P)return xn(t,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=No(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),Sr(o,(function(a,l){return _l(t,i,n,a,l,r,s)})),xn(t,n,!1),r&&t.u&&Lt("Patches").N(i,r,t.u,t.s)}return i.o}function _l(t,e,r,i,n,o,s){if(Ut(n)){var a=bn(t,n,o&&e&&e.i!==3&&!Xr(e.R,i)?o.concat(i):void 0);if(Il(r,i,a),!Ut(a))return;t.m=!1}else s&&r.add(n);if(vt(n)&&!Fo(n)){if(!t.h.D&&t._<1)return;bn(t,n),e&&e.A.l||xn(t,n)}}function xn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Bo(e,r)}function _o(t,e){var r=t[ee];return(r?Zt(r):t)[e]}function Ll(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var i=Object.getOwnPropertyDescriptor(r,e);if(i)return i;r=Object.getPrototypeOf(r)}}function Jt(t){t.P||(t.P=!0,t.l&&Jt(t.l))}function Lo(t){t.o||(t.o=No(t.t))}function Po(t,e,r){var i=Io(e)?Lt("MapSet").F(e,r):Mo(e)?Lt("MapSet").T(e,r):t.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:ko(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=Di;s&&(l=[a],c=$i);var p=Proxy.revocable(l,c),d=p.revoke,f=p.proxy;return a.k=f,a.j=d,f})(e,r):Lt("ES5").J(e,r);return(r?r.A:ko()).p.push(i),i}function jd(t){return Ut(t)||st(22,t),(function e(r){if(!vt(r))return r;var i,n=r[ee],o=Jr(r);if(n){if(!n.P&&(n.i<4||!Lt("ES5").K(n)))return n.t;n.I=!0,i=kl(r,o),n.I=!1}else i=kl(r,o);return Sr(i,(function(s,a){n&&Fd(n.t,s)===a||Il(i,s,e(a))})),o===3?new Set(i):i})(t)}function kl(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return No(t)}function Nl(){function t(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[ee];return Di.get(c,s)},set:function(c){var p=this[ee];Di.set(p,s,c)}},l}function e(s){for(var a=s.length-1;a>=0;a--){var l=s[a][ee];if(!l.P)switch(l.i){case 5:i(l)&&Jt(l);break;case 4:r(l)&&Jt(l)}}}function r(s){for(var a=s.t,l=s.k,c=Zr(l),p=c.length-1;p>=0;p--){var d=c[p];if(d!==ee){var f=a[d];if(f===void 0&&!Xr(a,d))return!0;var h=l[d],m=h&&h[ee];if(m?m.t!==f:!Ml(h,f))return!0}}var g=!!a[ee];return c.length!==Zr(a).length+(g?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&st(3,JSON.stringify(Zt(s)))}var o={};Hd("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,f){if(d){for(var h=Array(f.length),m=0;m<f.length;m++)Object.defineProperty(h,""+m,t(m,!0));return h}var g=Fl(f);delete g[ee];for(var S=Zr(g),E=0;E<S.length;E++){var O=S[E];g[O]=t(O,d||!!g[O].enumerable)}return Object.create(Object.getPrototypeOf(f),g)})(l,s),p={i:l?5:4,A:a?a.A:ko(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,ee,{value:p,writable:!0}),c},S:function(s,a,l){l?Ut(a)&&a[ee].A===s&&e(s.p):(s.u&&(function c(p){if(p&&typeof p=="object"){var d=p[ee];if(d){var f=d.t,h=d.k,m=d.R,g=d.i;if(g===4)Sr(h,(function(P){P!==ee&&(f[P]!==void 0||Xr(f,P)?m[P]||c(h[P]):(m[P]=!0,Jt(d)))})),Sr(f,(function(P){h[P]!==void 0||Xr(h,P)||(m[P]=!1,Jt(d))}));else if(g===5){if(i(d)&&(Jt(d),m.length=!0),h.length<f.length)for(var S=h.length;S<f.length;S++)m[S]=!1;else for(var E=f.length;E<h.length;E++)m[E]=!0;for(var O=Math.min(h.length,f.length),_=0;_<O;_++)h.hasOwnProperty(_)||(m[_]=!0),m[_]===void 0&&c(h[_])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var $l,Pi,Uo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Vd=typeof Map<"u",Wd=typeof Set<"u",Pl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Bl=Uo?Symbol.for("immer-nothing"):(($l={})["immer-nothing"]=!0,$l),Dl=Uo?Symbol.for("immer-draftable"):"__$immer_draftable",ee=Uo?Symbol.for("immer-state"):"__$immer_state";var qd=""+Object.prototype.constructor,Zr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Fl=Object.getOwnPropertyDescriptors||function(t){var e={};return Zr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Do={},Di={get:function(t,e){if(e===ee)return t;var r=Zt(t);if(!Xr(r,e))return(function(n,o,s){var a,l=Ll(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(t,r,e);var i=r[e];return t.I||!vt(i)?i:i===_o(t.t,e)?(Lo(t),t.o[e]=Po(t.A.h,i,t)):i},has:function(t,e){return e in Zt(t)},ownKeys:function(t){return Reflect.ownKeys(Zt(t))},set:function(t,e,r){var i=Ll(Zt(t),e);if(i?.set)return i.set.call(t.k,r),!0;if(!t.P){var n=_o(Zt(t),e),o=n?.[ee];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Ml(r,n)&&(r!==void 0||Xr(t.t,e)))return!0;Lo(t),Jt(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 _o(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Lo(t),Jt(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Zt(t),i=Reflect.getOwnPropertyDescriptor(r,e);return i&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:i.enumerable,value:r[e]}},defineProperty:function(){st(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){st(12)}},$i={};Sr(Di,(function(t,e){$i[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),$i.deleteProperty=function(t,e){return $i.set.call(this,t,e,void 0)},$i.set=function(t,e,r){return Di.set.call(this,t[0],e,r,t[0])};var Kd=(function(){function t(r){var i=this;this.O=Pl,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(g){var S=this;g===void 0&&(g=a);for(var E=arguments.length,O=Array(E>1?E-1:0),_=1;_<E;_++)O[_-1]=arguments[_];return l.produce(g,(function(P){var me;return(me=o).call.apply(me,[S,P].concat(O))}))}}var c;if(typeof o!="function"&&st(6),s!==void 0&&typeof s!="function"&&st(7),vt(n)){var p=Tl(i),d=Po(i,n,void 0),f=!0;try{c=o(d),f=!1}finally{f?yn(p):$o(p)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Ro(p,s),To(g,p)}),(function(g){throw yn(p),g})):(Ro(p,s),To(c,p))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===Bl&&(c=void 0),i.D&&Bo(c,!0),s){var h=[],m=[];Lt("Patches").M(n,c,h,m),s(h,m)}return c}st(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var p=arguments.length,d=Array(p>1?p-1:0),f=1;f<p;f++)d[f-1]=arguments[f];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(d))}))};var s,a,l=i.produce(n,o,(function(c,p){s=c,a=p}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},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){vt(r)||st(8),Ut(r)&&(r=jd(r));var i=Tl(this),n=Po(this,r,void 0);return n[ee].C=!0,$o(i),n},e.finishDraft=function(r,i){var n=r&&r[ee],o=n.A;return Ro(o,i),To(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!Pl&&st(20),this.O=r},e.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=Lt("Patches").$;return Ut(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},t})(),We=new Kd,Gd=We.produce,jm=We.produceWithPatches.bind(We),Vm=We.setAutoFreeze.bind(We),Wm=We.setUseProxies.bind(We),qm=We.applyPatches.bind(We),Km=We.createDraft.bind(We),Gm=We.finishDraft.bind(We),Sn=Gd;function Er(t){"@babel/helpers - typeof";return Er=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},Er(t)}function Ul(t,e){if(Er(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(Er(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hl(t){var e=Ul(t,"string");return Er(e)=="symbol"?e:e+""}function zl(t,e,r){return(e=Hl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Ho(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jl(Object(r),!0).forEach(function(i){zl(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jl(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Re(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Vl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),zo=function(){return Math.random().toString(36).substring(7).split("").join(".")},En={INIT:"@@redux/INIT"+zo(),REPLACE:"@@redux/REPLACE"+zo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+zo()}};function Yd(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 jo(t,e,r){var i;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Re(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Re(1));return r(jo)(t,e)}if(typeof t!="function")throw new Error(Re(2));var n=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function p(){if(l)throw new Error(Re(3));return o}function d(g){if(typeof g!="function")throw new Error(Re(4));if(l)throw new Error(Re(5));var S=!0;return c(),a.push(g),function(){if(S){if(l)throw new Error(Re(6));S=!1,c();var O=a.indexOf(g);a.splice(O,1),s=null}}}function f(g){if(!Yd(g))throw new Error(Re(7));if(typeof g.type>"u")throw new Error(Re(8));if(l)throw new Error(Re(9));try{l=!0,o=n(o,g)}finally{l=!1}for(var S=s=a,E=0;E<S.length;E++){var O=S[E];O()}return g}function h(g){if(typeof g!="function")throw new Error(Re(10));n=g,f({type:En.REPLACE})}function m(){var g,S=d;return g={subscribe:function(O){if(typeof O!="object"||O===null)throw new Error(Re(11));function _(){O.next&&O.next(p())}_();var P=S(_);return{unsubscribe:P}}},g[Vl]=function(){return this},g}return f({type:En.INIT}),i={dispatch:f,subscribe:d,getState:p,replaceReducer:h},i[Vl]=m,i}function Xd(t){Object.keys(t).forEach(function(e){var r=t[e],i=r(void 0,{type:En.INIT});if(typeof i>"u")throw new Error(Re(12));if(typeof r(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Re(13))})}function Wl(t){for(var e=Object.keys(t),r={},i=0;i<e.length;i++){var n=e[i];typeof t[n]=="function"&&(r[n]=t[n])}var o=Object.keys(r),s,a;try{Xd(r)}catch(l){a=l}return function(c,p){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var f=!1,h={},m=0;m<o.length;m++){var g=o[m],S=r[g],E=c[g],O=S(E,p);if(typeof O>"u"){var _=p&&p.type;throw new Error(Re(14))}h[g]=O,f=f||O!==E}return f=f||o.length!==Object.keys(c).length,f?h:c}}function Qr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(i){return i}:e.length===1?e[0]:e.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function ql(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(Re(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=e.map(function(l){return l(s)});return o=Qr.apply(void 0,a)(n.dispatch),Ho(Ho({},n),{},{dispatch:o})}}}function Kl(t){var e=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,t):s(a)}}};return e}var Gl=Kl();Gl.withExtraArgument=Kl;var Vo=Gl;var Ql=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},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 i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),Zd=function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(p){return l([c,p])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(p){c=[6,p],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},ei=function(t,e){for(var r=0,i=e.length,n=t.length;r<i;r++,n++)t[n]=e[r];return t},Jd=Object.defineProperty,Qd=Object.defineProperties,ef=Object.getOwnPropertyDescriptors,Yl=Object.getOwnPropertySymbols,tf=Object.prototype.hasOwnProperty,rf=Object.prototype.propertyIsEnumerable,Xl=function(t,e,r){return e in t?Jd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Qt=function(t,e){for(var r in e||(e={}))tf.call(e,r)&&Xl(t,r,e[r]);if(Yl)for(var i=0,n=Yl(e);i<n.length;i++){var r=n[i];rf.call(e,r)&&Xl(t,r,e[r])}return t},Wo=function(t,e){return Qd(t,ef(e))},nf=function(t,e,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(t,e)).next())})};var of=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qr:Qr.apply(null,arguments)},dg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function sf(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 er(t,e){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var o=e.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return Qt(Qt({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:i[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(i){return i.type===t},r}var af=(function(t){Ql(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];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=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ei([void 0],r[0].concat(this)))):new(e.bind.apply(e,ei([void 0],r.concat(this))))},e})(Array),lf=(function(t){Ql(e,t);function e(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];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=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,ei([void 0],r[0].concat(this)))):new(e.bind.apply(e,ei([void 0],r.concat(this))))},e})(Array);function Go(t){return vt(t)?Sn(t,function(){}):t}function cf(t){return typeof t=="boolean"}function uf(){return function(e){return pf(e)}}function pf(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,i=t.immutableCheck,n=i===void 0?!0:i,o=t.serializableCheck,s=o===void 0?!0:o,a=t.actionCreatorCheck,l=a===void 0?!0:a,c=new af;if(r&&(cf(r)?c.push(Vo):c.push(Vo.withExtraArgument(r.extraArgument))),0){if(n)var p;if(s)var d;if(l)var f}return c}var qo=!0;function ec(t){var e=uf(),r=t||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?e():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,p=c===void 0?void 0:c,d=r.enhancers,f=d===void 0?void 0:d,h;if(typeof n=="function")h=n;else if(sf(n))h=Wl(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 m=s;if(typeof m=="function"&&(m=m(e),!qo&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!qo&&m.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=ql.apply(void 0,m),S=Qr;l&&(S=of(Qt({trace:!qo},typeof l=="object"&&l)));var E=new lf(g),O=E;Array.isArray(f)?O=ei([g],f):typeof f=="function"&&(O=f(E));var _=S.apply(void 0,O);return jo(h,p,_)}function tc(t){var e={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return t(n),[e,r,i]}function df(t){return typeof t=="function"}function ff(t,e,r,i){r===void 0&&(r=[]);var n=typeof e=="function"?tc(e):[e,r,i],o=n[0],s=n[1],a=n[2],l;if(df(t))l=function(){return Go(t())};else{var c=Go(t);l=function(){return c}}function p(d,f){d===void 0&&(d=l());var h=ei([o[f.type]],s.filter(function(m){var g=m.matcher;return g(f)}).map(function(m){var g=m.reducer;return g}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,g){if(g)if(Ut(m)){var S=m,E=g(S,f);return E===void 0?m:E}else{if(vt(m))return Sn(m,function(O){return g(O,f)});var E=g(m,f);if(E===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return m},d)}return p.getInitialState=l,p}function hf(t,e){return t+"/"+e}function rc(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:Go(t.initialState),i=t.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(p){var d=i[p],f=hf(e,p),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[p]=h,s[f]=h,a[p]=m?er(f,m):er(f)});function l(){var p=typeof t.extraReducers=="function"?tc(t.extraReducers):[t.extraReducers],d=p[0],f=d===void 0?{}:d,h=p[1],m=h===void 0?[]:h,g=p[2],S=g===void 0?void 0:g,E=Qt(Qt({},f),s);return ff(r,function(O){for(var _ in E)O.addCase(_,E[_]);for(var P=0,me=m;P<me.length;P++){var le=me[P];O.addMatcher(le.matcher,le.reducer)}S&&O.addDefaultCase(S)})}var c;return{name:e,reducer:function(p,d){return c||(c=l()),c(p,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var mf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gf=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=mf[Math.random()*64|0];return e},vf=["name","message","stack","code"],Ko=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Zl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),yf=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,i=vf;r<i.length;r++){var n=i[r];typeof t[n]=="string"&&(e[n]=t[n])}return e}return{message:String(t)}},gg=(function(){function t(e,r,i){var n=er(e+"/fulfilled",function(p,d,f,h){return{payload:p,meta:Wo(Qt({},h||{}),{arg:f,requestId:d,requestStatus:"fulfilled"})}}),o=er(e+"/pending",function(p,d,f){return{payload:void 0,meta:Wo(Qt({},f||{}),{arg:d,requestId:p,requestStatus:"pending"})}}),s=er(e+"/rejected",function(p,d,f,h,m){return{payload:h,error:(i&&i.serializeError||yf)(p||"Rejected"),meta:Wo(Qt({},m||{}),{arg:f,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:p?.name==="AbortError",condition:p?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return p.prototype.abort=function(){},p})();function c(p){return function(d,f,h){var m=i?.idGenerator?i.idGenerator(p):gf(),g=new l,S,E=!1;function O(P){S=P,g.abort()}var _=(function(){return nf(this,null,function(){var P,me,le,jt,Jn,Vt,He;return Zd(this,function(et){switch(et.label){case 0:return et.trys.push([0,4,,5]),jt=(P=i?.condition)==null?void 0:P.call(i,p,{getState:f,extra:h}),xf(jt)?[4,jt]:[3,2];case 1:jt=et.sent(),et.label=2;case 2:if(jt===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return E=!0,Jn=new Promise(function(ze,lr){return g.signal.addEventListener("abort",function(){return lr({name:"AbortError",message:S||"Aborted"})})}),d(o(m,p,(me=i?.getPendingMeta)==null?void 0:me.call(i,{requestId:m,arg:p},{getState:f,extra:h}))),[4,Promise.race([Jn,Promise.resolve(r(p,{dispatch:d,getState:f,extra:h,requestId:m,signal:g.signal,abort:O,rejectWithValue:function(ze,lr){return new Ko(ze,lr)},fulfillWithValue:function(ze,lr){return new Zl(ze,lr)}})).then(function(ze){if(ze instanceof Ko)throw ze;return ze instanceof Zl?n(ze.payload,m,p,ze.meta):n(ze,m,p)})])];case 3:return le=et.sent(),[3,5];case 4:return Vt=et.sent(),le=Vt instanceof Ko?s(null,m,p,Vt.payload,Vt.meta):s(Vt,m,p),[3,5];case 5:return He=i&&!i.dispatchConditionRejection&&s.match(le)&&le.meta.condition,He||d(le),[2,le]}})})})();return Object.assign(_,{abort:O,requestId:m,arg:p,unwrap:function(){return _.then(bf)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:e})}return t.withTypes=function(){return t},t})();function bf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function xf(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var ic="listener",nc="completed",oc="cancelled",vg="task-"+oc,yg="task-"+nc,bg=ic+"-"+oc,xg=ic+"-"+nc;var Yo="listenerMiddleware";var Sg=er(Yo+"/add"),Eg=er(Yo+"/removeAll"),Ag=er(Yo+"/remove");var Jl,Og=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Jl||(Jl=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},Sf=function(t){return function(e){setTimeout(e,t)}},Cg=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Sf(10);Nl();var Ef=dn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),An=class extends Ef(Object){};window.ftReduxStores||(window.ftReduxStores={});var sc=class t extends An{static get(e){var r;let i=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[i];if(vn(o))return o;if(n==null)return;let s=rc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=ec({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let p=_i(s.getInitialState());for(let d of c.keeping)p[d]=(l??p)[d];return p}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,r,i){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new fn;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...p)=>{let d=c(...p.map(n));return this.reduxStore.dispatch(d),d}:p=>{this.setState({[l]:n(p)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var On=class{static format(e,r,i,n,o){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(e,r,i,n,!!o)}static getMomentDateFormat(e,r,i){return i?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,i,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var Cn=u(v()),Af="ft-app-info",ti=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};ti.eventName="authentication-change";var Ii=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Ii.eventName="ui-locale-changed";var Of={session:(t,e)=>{(0,Cn.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>R.dispatchEvent(new ti(e.payload)),0))}},R=Cn.FtReduxStore.get({name:Af,reducers:Of,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var ac=u(v()),wn=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Qg=(0,ac.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(R)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>On.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return wn([(0,Xo.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),wn([(0,Xo.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),wn([wo({store:R.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),wn([wo({store:R.name})],e.prototype,"uiLocale",void 0),e});var lc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(lc||(lc={}));var cc;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(cc||(cc={}));var uc;(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"})(uc||(uc={}));var pc;(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"})(pc||(pc={}));var dc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(dc||(dc={}));var fc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(fc||(fc={}));var hc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(hc||(hc={}));var mc;(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"})(mc||(mc={}));var gc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(gc||(gc={}));var vc;(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"})(vc||(vc={}));var yc;(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"})(yc||(yc={}));var bc;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(bc||(bc={}));var xc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(xc||(xc={}));var Sc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Sc||(Sc={}));var Ec;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Ec||(Ec={}));var Ac;(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"})(Ac||(Ac={}));var Oc;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Oc||(Oc={}));var Cc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Cc||(Cc={}));var wc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(wc||(wc={}));var Rc;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Rc||(Rc={}));var Tc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Tc||(Tc={}));var _c;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(_c||(_c={}));var Lc;(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"})(Lc||(Lc={}));var kc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(kc||(kc={}));var $c;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})($c||($c={}));var Pc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Pc||(Pc={}));var Dc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Dc||(Dc={}));var de;(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"})(de||(de={}));var at;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(at||(at={}));var Ic;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Ic||(Ic={}));var Mc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(Mc||(Mc={}));var Nc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Nc||(Nc={}));var Bc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(Bc||(Bc={}));var Fc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Fc||(Fc={}));var Uc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Uc||(Uc={}));var Hc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Hc||(Hc={}));var zc;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(zc||(zc={}));var jc;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(jc||(jc={}));var Vc;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(Vc||(Vc={}));var Wc;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(Wc||(Wc={}));var qc;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(qc||(qc={}));var Cf={[de.PERSONAL_BOOK_SHARE_USER]:[de.PERSONAL_BOOK_USER],[de.HTML_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.PDF_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.KHUB_ADMIN]:[de.CONTENT_PUBLISHER],[de.ADMIN]:[de.KHUB_ADMIN,de.USERS_ADMIN,de.PORTAL_ADMIN,de.BEHAVIOR_DATA_USER],[de.GENERATIVE_AI_EXPORT_USER]:[de.GENERATIVE_AI_USER]};function Kc(t,e){return t===e||(Cf[t]??[]).some(r=>Kc(r,e))}function Gc(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(i=>Kc(i,e))}var kn=u(v());var Zo=u(v());var Ar=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=R.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=R.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var ri=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ar.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ar.await()}};var qe=class extends ri{constructor(e=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new Zo.CacheRegistry,this.cache=e?n.commonCache:new Zo.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Rn=class extends qe{async listMySearches(){let{session:e}=R.getState();return Gc(e,de.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Tn=class extends qe{async listMyBookmarks(){let e=R.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var _n=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var Ln=class extends qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=R.getState().session;return!!e?.sessionAuthenticated}};var wf="ft-user-assets",Rf={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(at).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;Qo(t,r,[...Jo(t,r),n]),Yc(t,r,1,i),Xc(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;Qo(t,r,Jo(t,r).map(n=>n.id===i.id?i:n)),Xc(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;Qo(t,r,Jo(t,r).filter(o=>o.id!==n)),Yc(t,r,-1,i)}},Zc={[at.SEARCHES]:"savedSearches",[at.BOOKMARKS]:"bookmarks",[at.BOOKS]:void 0,[at.COLLECTIONS]:void 0},Jo=(t,e)=>{var r;let i=Zc[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},Qo=(t,e,r)=>{let i=Zc[e];i&&(t[i]=r)},Yc=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===at.BOOKMARKS&&i)){let o=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Xc=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},ke=kn.FtReduxStore.get({name:wf,reducers:Rf,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(at).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),es=class{constructor(e=new _n,r=new Ln){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=R.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Tn,this.savedSearchesService=new Rn,R.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=R.getState();(0,kn.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(),ke.actions.clearAssetCount(),ke.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ke.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ke.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();ke.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();ke.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&ke.getState().assetCounts.allAsset[e]!==r.count&&ke.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&ke.getState().assetCounts.bookmarkByMap[e]!==r.count&&ke.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys(ke.getState().assetCounts.bookmarkByMap).length!==0;e===at.BOOKMARKS&&r&&ke.actions.clearBookmarkCountByMap(),ke.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;ke.actions.bookmarks(r)}}},Tf=new es;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Tf);var ts=class{addCommand(e,r=!1){R.commands.add(e,r)}consumeCommand(e){return R.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ts;var lt=u(v());var Jc,ii=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},_f=Symbol("clearAfterUnitTest"),$n=class extends(0,lt.withEventBus)(qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Jc]=()=>{this.defaultMessages={},this.cache=new lt.CacheRegistry,this.listeners={}},this.currentUiLocale=R.getState().uiLocale,R.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=R.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let r=e.name.toLowerCase();this.cache.setFinal(r,e),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,r){var i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};(0,lt.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new lt.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof lt.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var 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 ii({loadedContexts:e})),this.dispatchEvent(new ii({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new ii({loadedContexts:[e]})),this.dispatchEvent(new ii({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>(0,lt.delay)(0).then(()=>i()).catch(()=>null)))}};Jc=_f;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends $n{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends $n{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Mi=window.FluidTopicsI18nService,rs=window.FluidTopicsCustomI18nService;var Qc=u(v()),is=class{highlightHtml(e,r,i){(0,Qc.highlightHtml)(e,r,i)}};window.FluidTopicsHighlightHtmlService=new is;var eu=u(v());var ns=class{isDate(e){var r,i,n,o;return(o=(n=((i=(r=R.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,r){var i,n,o,s;if(e==null)return"";try{return eu.DateFormatter.format(e,(i=r?.locale)!==null&&i!==void 0?i:R.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new ns;var tu=u(v());var Ni=class{static get(e,r){var i,n,o,s;let a=R.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new tu.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var os=class{urlToSearchRequest(e){return Ni.get().parse(e)}searchRequestToUrl(e){return Ni.get().serialize(e)}};window.FluidTopicsUrlService=new os;var Ht=u(v());var Or=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Or.eventName="change";var ss=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))}},ru=new ss;var Pn=class t extends Ht.WithEventBus{static build(){return new t(window.history,ru,()=>window.location,!1)}constructor(e,r,i,n){var o,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.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 i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ht.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Or(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(Or.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Or.eventName,e)}currentItem(){return(0,Ht.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,Ht.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Ht.deepCopy)(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Ht.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;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 i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Pn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var iu=u(A());var nu=iu.css`
|
|
610
|
+
`;var au=u(A()),Ke=u(j()),Rr=u(v());var Cr=u(v());function ou(t,e){let{authenticationRequired:r,session:i}=R.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Dn=class extends ri{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var as=class t extends Cr.FtStateManager{static build(e){return new t(R,e)}constructor(e,r){super(),this.store=e,this.cache=new Cr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Dn,this.cleanSessionDebouncer=new Cr.Debouncer,this.reloadDebouncer=new Cr.Debouncer(500),this.apiProvider=r??(()=>Ar.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(ti.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>ou(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Ii(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},su=as.build();var wr=class extends Event{constructor(e,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Bi=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new wr(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var Te=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},oe=class extends Rr.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=su,this.contextRoot=new Bi}render(){return au.html`
|
|
611
611
|
<slot></slot>
|
|
612
612
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Mi.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};oe.elementDefinitions={};oe.styles=nu;Te([(0,Ke.property)()],oe.prototype,"baseUrl",void 0);Te([(0,Ke.property)()],oe.prototype,"apiIntegrationIdentifier",void 0);Te([(0,Ke.property)()],oe.prototype,"apiIntegrationAppVersion",void 0);Te([(0,Ke.property)()],oe.prototype,"uiLocale",void 0);Te([(0,Rr.jsonProperty)(null)],oe.prototype,"availableUiLocales",void 0);Te([(0,Rr.jsonProperty)(null)],oe.prototype,"metadataConfiguration",void 0);Te([(0,Ke.property)({type:Boolean})],oe.prototype,"editorMode",void 0);Te([(0,Ke.property)({type:Boolean})],oe.prototype,"noCustom",void 0);Te([(0,Ke.property)({type:Boolean})],oe.prototype,"openExternalDocumentInNewTab",void 0);Te([(0,Ke.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],oe.prototype,"noCustomComponent",void 0);Te([(0,Ke.property)({type:Boolean})],oe.prototype,"withManualResources",void 0);Te([(0,Ke.property)({type:Boolean})],oe.prototype,"navigatorOnline",void 0);Te([(0,Ke.property)({type:Boolean})],oe.prototype,"forcedOffline",void 0);Te([(0,Ke.property)({type:Boolean})],oe.prototype,"authenticationRequired",void 0);Te([(0,Rr.jsonProperty)([])],oe.prototype,"messageContexts",void 0);Te([(0,Rr.jsonProperty)(void 0)],oe.prototype,"session",void 0);var cu=u(v());var lu={"ft-app-context":oe};(0,cu.customElements)(lu);var uu=u(j());var ls=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},ni=new ls;var $f=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},Ui=Symbol("i18nAttributes"),pu=Symbol("i18nListAttributes"),du=Symbol("i18nProperties"),In=Symbol("i18nContexts"),Fi=Symbol("i18nUnsubs"),Bn=(0,oi.applyMixinOnce)(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?rs:Mi}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:p,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let f=p??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...f)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(ni.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(p,d,f)=>f?.context&&f.key&&o(p,d,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...p})}:f;(s=this[Ui])===null||s===void 0||s.forEach((p,d)=>l[d]=c(p,d,l[d])),(a=this[pu])===null||a===void 0||a.forEach((p,d)=>{var f;return l[d]=(f=l[d])===null||f===void 0?void 0:f.map(h=>c(p,d,h))})}updateI18nProperties(o){var s;(s=this[du])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[In].set(l,{isCustomContext:a}),this[Fi].has(l)||this[Fi].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[In].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[In].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Fi].forEach(o=>o()),this[Fi].clear()}}return e=In,r=Fi,$f([(0,uu.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Mn=class extends Bn(oi.FtLitElement){},Nn=class extends Bn(oi.FtLitElementRedux){};var fu=u(v());var cs=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?ni.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},Pf=new cs;var hu=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:fu.hasChanged,converter:ni,...e}),r[Ui]=(n=r[Ui])!==null&&n!==void 0?n:new Map,r[Ui].set(i,t??{})};var mu=u(A());var gu=mu.css`
|
|
613
613
|
`;var Fn=u(A()),Un=u(j()),Hn=u(v());var Hi=function(t,e,r,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o},yt=class extends Nn{constructor(){super(),this.editorMode=!1,this.addStore(R)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Fn.nothing:Fn.html`
|
|
@@ -687,8 +687,8 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
687
687
|
position: relative;
|
|
688
688
|
word-break: break-word;
|
|
689
689
|
}
|
|
690
|
-
`;var rm="ft-app-info",so=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};so.eventName="authentication-change";var qo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};qo.eventName="ui-locale-changed";var om={session:(t,e)=>{Se(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>z.dispatchEvent(new so(e.payload)),0))}},z=yr.get({name:rm,reducers:om,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var $i=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);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},FE=Ee(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===i))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>br.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $i([m({type:Boolean})],e.prototype,"useLongDateFormat",void 0),$i([m({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),$i([Vr({store:z.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),$i([Vr({store:z.name})],e.prototype,"uiLocale",void 0),e});var Er=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=z.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=z.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var lo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Er.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Er.await()}};var Ke=class extends lo{constructor(e=!0,r){var i;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=(i=n.commonCache)!==null&&i!==void 0?i:new bt,this.cache=e?n.commonCache:new bt}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Mi=class extends Ke{async listMySearches(){let{session:e}=z.getState();return Pd(e,ye.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Bi=class extends Ke{async listMyBookmarks(){let e=z.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Fi=class extends Ke{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=z.getState().session;return!!e?.sessionAuthenticated}};var Ui=class extends Ke{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=z.getState().session;return!!e?.sessionAuthenticated}};var im="ft-user-assets",nm={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(it).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;xs(t,r,[...vs(t,r),n]),Sp(t,r,1,i),Cp(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;xs(t,r,vs(t,r).map(n=>n.id===i.id?i:n)),Cp(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;xs(t,r,vs(t,r).filter(a=>a.id!==n)),Sp(t,r,-1,i)}},Op={[it.SEARCHES]:"savedSearches",[it.BOOKMARKS]:"bookmarks",[it.BOOKS]:void 0,[it.COLLECTIONS]:void 0},vs=(t,e)=>{var r;let i=Op[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},xs=(t,e,r)=>{let i=Op[e];i&&(t[i]=r)},Sp=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===it.BOOKMARKS&&i)){let a=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,a+r)}},Cp=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},$e=yr.get({name:im,reducers:nm,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(it).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ss=class{constructor(e=new Fi,r=new Ui){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bi,this.savedSearchesService=new Mi,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=z.getState();Se((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),$e.actions.clearAssetCount(),$e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();$e.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&$e.getState().assetCounts.allAsset[e]!==r.count&&$e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&$e.getState().assetCounts.bookmarkByMap[e]!==r.count&&$e.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys($e.getState().assetCounts.bookmarkByMap).length!==0;e===it.BOOKMARKS&&r&&$e.actions.clearBookmarkCountByMap(),$e.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;$e.actions.bookmarks(r)}}},am=new Ss;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=am);var Cs=class{addCommand(e,r=!1){z.commands.add(e,r)}consumeCommand(e){return z.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Cs;var Ep,co=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},sm=Symbol("clearAfterUnitTest"),zi=class extends bi(Ke){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ep]=()=>{this.defaultMessages={},this.cache=new bt,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 i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};Se(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new Ft((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof rr)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var 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 co({loadedContexts:e})),this.dispatchEvent(new co({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new co({loadedContexts:[e]})),this.dispatchEvent(new co({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>gi(0).then(()=>i()).catch(()=>null)))}};Ep=sm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends zi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends zi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Yo=window.FluidTopicsI18nService,Os=window.FluidTopicsCustomI18nService;var Es=class{highlightHtml(e,r,i){pa(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Es;var ws=class{isDate(e){var r,i,n,a;return(a=(n=((i=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var i,n,a,s;if(e==null)return"";try{return br.format(e,(i=r?.locale)!==null&&i!==void 0?i:z.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 ws;var Xo=class{static get(e,r){var i,n;let a=z.getState(),{lang:s,region:l}=(n=(i=a.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new jt(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,r??`${s}-${l}`)}};var As=class{urlToSearchRequest(e){return Xo.get().parse(e)}searchRequestToUrl(e){return Xo.get().serialize(e)}};window.FluidTopicsUrlService=new As;var wr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};wr.eventName="change";var Rs=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))}},wp=new Rs;var Hi=class t extends Tt{static build(){return new t(window.history,wp,()=>window.location,!1)}constructor(e,r,i,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,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 i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Se(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new wr(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[a,s,l])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};i.apply(n,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(wr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(wr.eventName,e)}currentItem(){return lt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return lt(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return lt(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return lt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,i);)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 i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Hi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Ap=A`
|
|
691
|
-
`;function Rp(t,e){let{authenticationRequired:r,session:i}=z.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Vi=class extends lo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Ls=class t extends Wo{static build(e){return new t(z,e)}constructor(e,r){super(),this.store=e,this.cache=new bt,this.withManualResources=!0,this.
|
|
690
|
+
`;var rm="ft-app-info",so=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};so.eventName="authentication-change";var qo=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};qo.eventName="ui-locale-changed";var om={session:(t,e)=>{Se(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>z.dispatchEvent(new so(e.payload)),0))}},z=yr.get({name:rm,reducers:om,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var $i=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);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},FE=Ee(Symbol("withDateFormat"),function(t){class e extends t{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(z)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===i))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>br.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return $i([m({type:Boolean})],e.prototype,"useLongDateFormat",void 0),$i([m({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),$i([Vr({store:z.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),$i([Vr({store:z.name})],e.prototype,"uiLocale",void 0),e});var Er=class t{static get(e){let{baseUrl:r,apiIntegrationIdentifier:i}=z.getState(),n=e??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(e){return new Promise(r=>{let i=t.get(e);if(i)r(i);else{let n=z.subscribe(()=>{i=t.get(e),i&&(n(),r(i))})}})}};var lo=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Er.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Er.await()}};var Ke=class extends lo{constructor(e=!0,r){var i;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=(i=n.commonCache)!==null&&i!==void 0?i:new bt,this.cache=e?n.commonCache:new bt}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Mi=class extends Ke{async listMySearches(){let{session:e}=z.getState();return Pd(e,ye.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var Bi=class extends Ke{async listMyBookmarks(){let e=z.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var Fi=class extends Ke{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=z.getState().session;return!!e?.sessionAuthenticated}};var Ui=class extends Ke{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=z.getState().session;return!!e?.sessionAuthenticated}};var im="ft-user-assets",nm={setAssetCount:(t,e)=>{let{userAssetType:r,count:i}=e.payload.assetCount;t.assetCounts.allAsset[r]=i},clearAssetCount:t=>{Object.values(it).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let r=e.payload.mapId;t.assetCounts.bookmarkByMap[r]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:r,mapId:i,asset:n}=e.payload;xs(t,r,[...vs(t,r),n]),Sp(t,r,1,i),Cp(t,n)},editAsset:(t,e)=>{let{assetType:r,asset:i}=e.payload;xs(t,r,vs(t,r).map(n=>n.id===i.id?i:n)),Cp(t,i)},removeAsset:(t,e)=>{let{assetType:r,mapId:i,assetId:n}=e.payload;xs(t,r,vs(t,r).filter(a=>a.id!==n)),Sp(t,r,-1,i)}},Op={[it.SEARCHES]:"savedSearches",[it.BOOKMARKS]:"bookmarks",[it.BOOKS]:void 0,[it.COLLECTIONS]:void 0},vs=(t,e)=>{var r;let i=Op[e];return i?(r=t[i])!==null&&r!==void 0?r:[]:[]},xs=(t,e,r)=>{let i=Op[e];i&&(t[i]=r)},Sp=(t,e,r,i)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+r),e===it.BOOKMARKS&&i)){let a=t.assetCounts.bookmarkByMap[i];t.assetCounts.bookmarkByMap[i]=Math.max(0,a+r)}},Cp=(t,e)=>{let r=t.assetLabels.map(n=>n.title),i=e.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));t.assetLabels.push(...i)},$e=yr.get({name:im,reducers:nm,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(it).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Ss=class{constructor(e=new Fi,r=new Ui){this.assetCountsService=e,this.assetLabelsService=r,this.currentSession=z.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Bi,this.savedSearchesService=new Mi,z.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:r}=z.getState();Se((e=this.currentSession)===null||e===void 0?void 0:e.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),$e.actions.clearAssetCount(),$e.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),$e.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),$e.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();$e.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();$e.actions.assetLabels(e)}async loadAssetCount(e){let r=await this.assetCountsService.getUserAssetCount(e);r&&$e.getState().assetCounts.allAsset[e]!==r.count&&$e.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(e){let r=await this.assetCountsService.getUserBookmarkCountByMap(e);r&&$e.getState().assetCounts.bookmarkByMap[e]!==r.count&&$e.actions.setBookmarkCountByMap({count:r.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let r=Object.keys($e.getState().assetCounts.bookmarkByMap).length!==0;e===it.BOOKMARKS&&r&&$e.actions.clearBookmarkCountByMap(),$e.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let r=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;$e.actions.bookmarks(r)}}},am=new Ss;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=am);var Cs=class{addCommand(e,r=!1){z.commands.add(e,r)}consumeCommand(e){return z.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new Cs;var Ep,co=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},sm=Symbol("clearAfterUnitTest"),zi=class extends bi(Ke){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Ep]=()=>{this.defaultMessages={},this.cache=new bt,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 i;if(e=e.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[e])!==null&&i!==void 0?i:{},...r};Se(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var r,i;return this.fetchContext(e),(i=(r=this.cache.getNow(e))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(e,r){let i=e.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(e,r,...i){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new Ft((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(e){let r=!this.cache.has(e),i;try{i=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),r&&await this.notify(e)}catch(n){!(n instanceof rr)&&r&&console.error(n)}return i}subscribe(e,r){var i;return e=e.toLowerCase(),this.listeners[e]=(i=this.listeners[e])!==null&&i!==void 0?i:new Set,this.listeners[e].add(r),()=>{var 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 co({loadedContexts:e})),this.dispatchEvent(new co({loadedContexts:e})),await Promise.all(e.map(r=>this.notify(r,!1)))}async notify(e,r=!0){r&&(document.body.dispatchEvent(new co({loadedContexts:[e]})),this.dispatchEvent(new co({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(i=>gi(0).then(()=>i()).catch(()=>null)))}};Ep=sm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends zi{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends zi{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var Yo=window.FluidTopicsI18nService,Os=window.FluidTopicsCustomI18nService;var Es=class{highlightHtml(e,r,i){pa(e,r,i)}};window.FluidTopicsHighlightHtmlService=new Es;var ws=class{isDate(e){var r,i,n,a;return(a=(n=((i=(r=z.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,r){var i,n,a,s;if(e==null)return"";try{return br.format(e,(i=r?.locale)!==null&&i!==void 0?i:z.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 ws;var Xo=class{static get(e,r){var i,n,a,s;let l=z.getState(),{lang:d,region:u}=(a=(n=(i=l.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new jt(l.baseUrl,e??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${d}-${u}`)}};var As=class{urlToSearchRequest(e){return Xo.get().parse(e)}searchRequestToUrl(e){return Xo.get().serialize(e)}};window.FluidTopicsUrlService=new As;var wr=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};wr.eventName="change";var Rs=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))}},wp=new Rs;var Hi=class t extends Tt{static build(){return new t(window.history,wp,()=>window.location,!1)}constructor(e,r,i,n){var a,s;super(),this.history=e,this.historyStorage=r,this.windowLocation=i,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 i=r&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),Se(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new wr(this.currentItem())),0)}installProxies(){let e=r=>(i,n,[a,s,l])=>{let d=r(),u={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};i.apply(n,[u,s,l]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let r=this.history.length-1;r>=0;r--)e?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(e){var r;let i={...this.buildCurrentState(),...e,index:this.currentIndex,title:(r=e?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(e){this.addEventListener(wr.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(wr.eventName,e)}currentItem(){return lt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return lt(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return lt(r.find(i=>e(i)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return lt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var r;let i=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;if(!i)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,i);)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 i;if(!this.hasState(e))return!1;let n=r??this.currentState.majorStateId,a=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;return a==null||a!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Hi.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t)});var Ap=A`
|
|
691
|
+
`;function Rp(t,e){let{authenticationRequired:r,session:i}=z.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(e):t()}var Vi=class extends lo{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var Ls=class t extends Wo{static build(e){return new t(z,e)}constructor(e,r){super(),this.store=e,this.cache=new bt,this.withManualResources=!0,this.userLocaleService=new Vi,this.cleanSessionDebouncer=new re,this.reloadDebouncer=new re(500),this.apiProvider=r??(()=>Er.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(so.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let r=await this.cache.get("availableContentLocales",()=>Rp(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=r.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new qo(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},Lp=Ls.build();var Ar=class extends Event{constructor(e,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Jo=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let r=this.pendingContextRequests.get(e.context);if(r===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:a}of i){let s=n.deref(),l=a.deref();s===void 0||l===void 0||s.dispatchEvent(new Ar(e.context,s,l,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let r=e.contextTarget??e.composedPath()[0],i=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let a=n.callbacks.get(r);a===void 0&&n.callbacks.set(r,a=new WeakSet),a.has(i)||(a.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};var Pe=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);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},he=class extends hr{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Lp,this.contextRoot=new Jo}render(){return v`
|
|
692
692
|
<slot></slot>
|
|
693
693
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var r;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Yo.addContext(i)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};he.elementDefinitions={};he.styles=Ap;Pe([m()],he.prototype,"baseUrl",void 0);Pe([m()],he.prototype,"apiIntegrationIdentifier",void 0);Pe([m()],he.prototype,"apiIntegrationAppVersion",void 0);Pe([m()],he.prototype,"uiLocale",void 0);Pe([le(null)],he.prototype,"availableUiLocales",void 0);Pe([le(null)],he.prototype,"metadataConfiguration",void 0);Pe([m({type:Boolean})],he.prototype,"editorMode",void 0);Pe([m({type:Boolean})],he.prototype,"noCustom",void 0);Pe([m({type:Boolean})],he.prototype,"openExternalDocumentInNewTab",void 0);Pe([m({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],he.prototype,"noCustomComponent",void 0);Pe([m({type:Boolean})],he.prototype,"withManualResources",void 0);Pe([m({type:Boolean})],he.prototype,"navigatorOnline",void 0);Pe([m({type:Boolean})],he.prototype,"forcedOffline",void 0);Pe([m({type:Boolean})],he.prototype,"authenticationRequired",void 0);Pe([le([])],he.prototype,"messageContexts",void 0);Pe([le(void 0)],he.prototype,"session",void 0);var kp={"ft-app-context":he};G(kp);var ks=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[r,i]=e.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},po=new ks;var dm=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);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},ei=Symbol("i18nAttributes"),Tp=Symbol("i18nListAttributes"),_p=Symbol("i18nProperties"),Wi=Symbol("i18nContexts"),Qo=Symbol("i18nUnsubs"),Ki=Ee(Symbol("withI18n"),function(t){var e,r;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[r]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?Os:Yo}i18n(a){let{context:s,key:l,message:d}=a,{custom:u,args:h,argsProvider:f}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,u);let g=h??(f?f(this):[]);return this.getI18nService(u).resolveMessage(s,l,...g)}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(po.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 u;return((u=d?.context)===null||u===void 0?void 0:u.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,u=(h,f,g)=>g?.context&&g.key&&a(h,f,g)?{...g,message:this.i18n({context:g.context,key:g.key,custom:g.custom,...h})}:g;(s=this[ei])===null||s===void 0||s.forEach((h,f)=>d[f]=u(h,f,d[f])),(l=this[Tp])===null||l===void 0||l.forEach((h,f)=>{var g;return d[f]=(g=d[f])===null||g===void 0?void 0:g.map(y=>u(h,f,y))})}updateI18nProperties(a){var s;(s=this[_p])===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[Wi].set(d,{isCustomContext:l}),this[Qo].has(d)||this[Qo].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[Wi].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Wi].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Qo].forEach(a=>a()),this[Qo].clear()}}return e=Wi,r=Qo,dm([m({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),ji=class extends Ki(D){},Gi=class extends Ki(hr){};var Ts=class{fromAttribute(e){if(!e)return[];try{let r=JSON.parse(e);return Array.isArray(r)?r.map(i=>typeof i=="string"?po.fromAttribute(i):i):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},pm=new Ts;var Ip=(t,e)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:ct,converter:po,...e}),r[ei]=(n=r[ei])!==null&&n!==void 0?n:new Map,r[ei].set(i,t??{})};var Pp=A`
|
|
694
694
|
`;var ti=function(t,e,r,i){var n=arguments.length,a=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);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},ft=class extends Gi{constructor(){super(),this.editorMode=!1,this.addStore(z)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":_:v`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-bar",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.16",
|
|
4
4
|
"description": "Search bar component using Fluid Topics public API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-accordion": "2.1.
|
|
23
|
-
"@fluid-topics/ft-app-context": "2.1.
|
|
24
|
-
"@fluid-topics/ft-button": "2.1.
|
|
25
|
-
"@fluid-topics/ft-chip": "2.1.
|
|
26
|
-
"@fluid-topics/ft-filter": "2.1.
|
|
27
|
-
"@fluid-topics/ft-icon": "2.1.
|
|
28
|
-
"@fluid-topics/ft-select": "2.1.
|
|
29
|
-
"@fluid-topics/ft-size-watcher": "2.1.
|
|
30
|
-
"@fluid-topics/ft-skeleton": "2.1.
|
|
31
|
-
"@fluid-topics/ft-snap-scroll": "2.1.
|
|
32
|
-
"@fluid-topics/ft-tooltip": "2.1.
|
|
33
|
-
"@fluid-topics/ft-typography": "2.1.
|
|
34
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-accordion": "2.1.16",
|
|
23
|
+
"@fluid-topics/ft-app-context": "2.1.16",
|
|
24
|
+
"@fluid-topics/ft-button": "2.1.16",
|
|
25
|
+
"@fluid-topics/ft-chip": "2.1.16",
|
|
26
|
+
"@fluid-topics/ft-filter": "2.1.16",
|
|
27
|
+
"@fluid-topics/ft-icon": "2.1.16",
|
|
28
|
+
"@fluid-topics/ft-select": "2.1.16",
|
|
29
|
+
"@fluid-topics/ft-size-watcher": "2.1.16",
|
|
30
|
+
"@fluid-topics/ft-skeleton": "2.1.16",
|
|
31
|
+
"@fluid-topics/ft-snap-scroll": "2.1.16",
|
|
32
|
+
"@fluid-topics/ft-tooltip": "2.1.16",
|
|
33
|
+
"@fluid-topics/ft-typography": "2.1.16",
|
|
34
|
+
"@fluid-topics/ft-wc-utils": "2.1.16",
|
|
35
35
|
"lit": "3.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@fluid-topics/public-api": "1.0.129"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "64057d048f5055bec9279a012204c826d10bc8fc"
|
|
41
41
|
}
|