@fluid-topics/ftds-chip-group 2.2.15 → 2.2.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.
- package/build/ftds-chip-group.light.js +1 -1
- package/build/ftds-chip-group.min.js +37 -37
- package/package.json +11 -11
|
@@ -1959,7 +1959,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
1959
1959
|
position: relative;
|
|
1960
1960
|
word-break: break-word;
|
|
1961
1961
|
}
|
|
1962
|
-
`;var Ql=["top","right","bottom","left"],Xl=["start","end"],Ta=Ql.reduce((e,t)=>e.concat(t,t+"-"+Xl[0],t+"-"+Xl[1]),[]),Vr=Math.min,pt=Math.max,jr=Math.round;var He=e=>({x:e,y:e}),Xu={left:"right",right:"left",bottom:"top",top:"bottom"};function Jl(e,t,o){return pt(e,Vr(t,o))}function Uo(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function mt(e){return e.split("-")[1]}function Pa(e){return e==="x"?"y":"x"}function Da(e){return e==="y"?"height":"width"}function Fo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ua(e){return Pa(Fo(e))}function e1(e,t,o){o===void 0&&(o=!1);let n=mt(e),a=Ua(e),i=Da(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ia(s)),[s,Ia(s)]}function t1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Ia(e){let t=Kr(e);return Xu[t]+e.slice(t.length)}function Qu(e){var t,o,n,a;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(n=e.bottom)!=null?n:0,left:(a=e.left)!=null?a:0}}function r1(e){return typeof e!="number"?Qu(e):{top:e,right:e,bottom:e,left:e}}function Bt(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function o1(e,t,o){let{reference:n,floating:a}=e,i=Fo(t),s=Ua(t),l=Da(s),f=Kr(t),m=i==="y",h=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,b=n[l]/2-a[l]/2,x;switch(f){case"top":x={x:h,y:n.y-a.height};break;case"bottom":x={x:h,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:g};break;case"left":x={x:n.x-a.width,y:g};break;default:x={x:n.x,y:n.y}}let A=mt(t);return A&&(x[s]+=b*(A==="end"?1:-1)*(o&&m?-1:1)),x}async function n1(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:b=!1,padding:x=0}=Uo(t,e),A=r1(x),O=l[b?g==="floating"?"reference":"floating":g],N=Bt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(O)))==null||o?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),T=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),k=await(i.isElement==null?void 0:i.isElement(R))&&await(i.getScale==null?void 0:i.getScale(R))||{x:1,y:1},I=Bt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:R,strategy:f}):T);return{top:(N.top-I.top+A.top)/k.y,bottom:(I.bottom-N.bottom+A.bottom)/k.y,left:(N.left-I.left+A.left)/k.x,right:(I.right-N.right+A.right)/k.x}}var Ju=50,a1=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:n1},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=o1(m,n,f),b=n,x=0,A={};for(let w=0;w<i.length;w++){let O=i[w];if(!O)continue;let{name:N,fn:T}=O,{x:R,y:k,data:I,reset:G}=await T({x:h,y:g,initialPlacement:n,placement:b,strategy:a,middlewareData:A,rects:m,platform:l,elements:{reference:e,floating:t}});h=R??h,g=k??g,A[N]={...A[N],...I},G&&x<Ju&&(x++,typeof G=="object"&&(G.placement&&(b=G.placement),G.rects&&(m=G.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):G.rects),{x:h,y:g}=o1(m,b,f)),w=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:A}};function e3(e,t,o){return(e?[...o.filter(a=>mt(a)===e),...o.filter(a=>mt(a)!==e)]:o.filter(a=>Kr(a)===a)).filter(a=>e?mt(a)===e||(t?t1(a)!==a:!1):!0)}var i1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=Ta,autoAlignment:x=!0,...A}=Uo(e,t),w=g!==void 0||b===Ta?e3(g||null,x,b):b,O=((o=s.autoPlacement)==null?void 0:o.index)||0,N=w[O];if(N==null)return{};if(l!==N)return{reset:{placement:w[0]}};let T=await f.detectOverflow(t,A),R=e1(N,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),k=[T[Kr(N)],T[R[0]],T[R[1]]],I=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:k}],G=w[O+1];if(G)return{data:{index:O+1,overflows:I},reset:{placement:G}};let B=I.map(Ee=>{let Ct=mt(Ee.placement);return[Ee.placement,Ct&&h?Ee.overflows.slice(0,2).reduce((a4,i4)=>a4+i4,0):Ee.overflows[0],Ee.overflows]}).sort((Ee,Ct)=>Ee[1]-Ct[1]),St=((a=B.filter(Ee=>Ee[2].slice(0,mt(Ee[0])?2:3).every(Ct=>Ct<=0))[0])==null?void 0:a[0])||B[0][0];return St!==l?{data:{index:O+1,overflows:I},reset:{placement:St}}:{}}}};var s1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:T=>{let{x:R,y:k}=T;return{x:R,y:k}}},...m}=Uo(e,t),h={x:o,y:n},g=await i.detectOverflow(t,m),b=Fo(a),x=Pa(b),A=h[x],w=h[b],O=(T,R)=>Jl(R+g[T==="y"?"top":"left"],R,R-g[T==="y"?"bottom":"right"]);s&&(A=O(x,A)),l&&(w=O(b,w));let N=f.fn({...t,[x]:A,[b]:w});return{...N,data:{x:N.x-o,y:N.y-n,enabled:{[x]:s,[b]:l}}}}}};function Bo(){return typeof window<"u"}function Gt(e){return l1(e)?(e.nodeName||"").toLowerCase():"#document"}function be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(l1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l1(e){return Bo()?e instanceof Node||e instanceof be(e).Node:!1}function Pe(e){return Bo()?e instanceof Element||e instanceof be(e).Element:!1}function Je(e){return Bo()?e instanceof HTMLElement||e instanceof be(e).HTMLElement:!1}function c1(e){return!Bo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof be(e).ShadowRoot}function qr(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=De(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function d1(e){return/^(table|td|th)$/.test(Gt(e))}function Zr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var t3=/transform|translate|scale|rotate|perspective|filter/,r3=/paint|layout|strict|content/,Ht=e=>!!e&&e!=="none",Fa;function fr(e){let t=Pe(e)?De(e):e;return Ht(t.transform)||Ht(t.translate)||Ht(t.scale)||Ht(t.rotate)||Ht(t.perspective)||!Ho()&&(Ht(t.backdropFilter)||Ht(t.filter))||t3.test(t.willChange||"")||r3.test(t.contain||"")}function f1(e){let t=ht(e);for(;Je(t)&&!ur(t);){if(fr(t))return t;if(Zr(t))return null;t=ht(t)}return null}function Ho(){return Fa==null&&(Fa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fa}function ur(e){return/^(html|body|#document)$/.test(Gt(e))}function De(e){return be(e).getComputedStyle(e)}function Yr(e){return Pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(Gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||c1(e)&&e.host||Qe(e);return c1(t)?t.host:t}function u1(e){let t=ht(e);return ur(t)?(e.ownerDocument||e).body:Je(t)&&qr(t)?t:u1(t)}function $o(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=u1(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=be(a);if(i){let l=Go(s);return t.concat(s,s.visualViewport||[],qr(a)?a:[],l&&o?$o(l):[])}else return t.concat(a,$o(a,[],o))}function Go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function h1(e){let t=De(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Je(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=jr(o)!==i||jr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function g1(e){return Pe(e)?e:e.contextElement}function pr(e){let t=g1(e);if(!Je(t))return He(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=h1(t),s=(i?jr(o.width):o.width)/n,l=(i?jr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var o3=He(0);function y1(e){let t=be(e);return!Ho()||!t.visualViewport?o3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function n3(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===be(e)}function Xr(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=g1(e),s=He(1);t&&(n?Pe(n)&&(s=pr(n)):s=pr(e));let l=n3(i,o,n)?y1(i):He(0),f=(a.left+l.x)/s.x,m=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i&&n){let b=be(i),x=Pe(n)?be(n):n,A=b,w=Go(A);for(;w&&x!==A;){let O=pr(w),N=w.getBoundingClientRect(),T=De(w),R=N.left+(w.clientLeft+parseFloat(T.paddingLeft))*O.x,k=N.top+(w.clientTop+parseFloat(T.paddingTop))*O.y;f*=O.x,m*=O.y,h*=O.x,g*=O.y,f+=R,m+=k,A=be(w),w=Go(A)}}return Bt({width:h,height:g,x:f,y:m})}function Wo(e,t){let o=Yr(e).scrollLeft;return t?t.left+o:Xr(Qe(e)).left+o}function b1(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Wo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function a3(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Qe(n),l=t?Zr(t.floating):!1;if(n===s||l&&i)return o;let f={scrollLeft:0,scrollTop:0},m=He(1),h=He(0),g=Je(n);if((g||!i)&&((Gt(n)!=="body"||qr(s))&&(f=Yr(n)),g)){let x=Xr(n);m=pr(n),h.x=x.x+n.clientLeft,h.y=x.y+n.clientTop}let b=s&&!g&&!i?b1(s,f):He(0);return{width:o.width*m.x,height:o.height*m.y,x:o.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:o.y*m.y-f.scrollTop*m.y+h.y+b.y}}function i3(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function s3(e){let t=Yr(e),o=e.ownerDocument.body,n=pt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=pt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),i=-t.scrollLeft+Wo(e),s=-t.scrollTop;return De(o).direction==="rtl"&&(i+=pt(e.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var c3=25;function l3(e,t,o){o===void 0&&(o="viewport");let n=o==="layoutViewport",a=be(e),i=Qe(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!Ho()||t==="fixed";n?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(Wo(i)<=0){let b=i.ownerDocument,x=b.body,A=getComputedStyle(x),w=b.compatMode==="CSS1Compat"&&parseFloat(A.marginLeft)+parseFloat(A.marginRight)||0,O=Math.abs(i.clientWidth-x.clientWidth-w),N=getComputedStyle(i).scrollbarGutter==="stable both-edges"?O/2:O;N<=c3&&(l-=N)}return{width:l,height:f,x:m,y:h}}function d3(e,t){let o=Xr(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=pr(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=n*i.y;return{width:s,height:l,x:f,y:m}}function p1(e,t,o){let n;if(t==="viewport"||t==="layoutViewport")n=l3(e,o,t);else if(t==="document")n=s3(Qe(e));else if(Pe(t))n=d3(t,o);else{let a=y1(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Bt(n)}function f3(e,t){let o=t.get(e);if(o)return o;let n=$o(e,[],!1).filter(l=>Pe(l)&&Gt(l)!=="body"),a=null,i=De(e).position==="fixed",s=i?ht(e):e;for(;Pe(s)&&!ur(s);){let l=De(s),f=fr(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?n=n.filter(g=>g!==s):a=l,s=ht(s)}return t.set(e,n),n}function u3(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Zr(t)?[]:f3(t,this._c):[].concat(o),n],l=p1(t,s[0],a),f=l.top,m=l.right,h=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let x=p1(t,s[b],a);f=pt(x.top,f),m=Vr(x.right,m),h=Vr(x.bottom,h),g=pt(x.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function p3(e){let{width:t,height:o}=h1(e);return{width:t,height:o}}function m3(e,t,o){let n=Je(t),a=Qe(t),i=o==="fixed",s=Xr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=He(0);if((n||!i)&&((Gt(t)!=="body"||qr(a))&&(l=Yr(t)),n)){let b=Xr(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!n&&a&&(f.x=Wo(a));let m=a&&!n&&!i?b1(a,l):He(0),h=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:h,y:g,width:s.width,height:s.height}}function $a(e){return De(e).position==="static"}function m1(e,t){if(!Je(e)||De(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Qe(e)===o&&(o=o.ownerDocument.body),o}function x1(e,t){let o=be(e);if(Zr(e))return o;if(!Je(e)){let a=ht(e);for(;a&&!ur(a);){if(Pe(a)&&!$a(a))return a;a=ht(a)}return o}let n=m1(e,t);for(;n&&d1(n)&&$a(n);)n=m1(n,t);return n&&ur(n)&&$a(n)&&!fr(n)?o:n||f1(e)||o}var h3=async function(e){let t=this.getOffsetParent||x1,o=this.getDimensions,n=await o(e.floating);return{reference:m3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function g3(e){return De(e).direction==="rtl"}var Vo={convertOffsetParentRelativeRectToViewportRelativeRect:a3,getDocumentElement:Qe,getClippingRect:u3,getOffsetParent:x1,getElementRects:h3,getClientRects:i3,getDimensions:p3,getScale:pr,isElement:Pe,isRTL:g3};var v1=i1,S1=s1;var C1=(e,t,o)=>{let n=new Map,a=o??{},i={...Vo,...a.platform,_c:n};return a1(e,t,{...a,platform:i})};function E1(e){return y3(e)}function Ba(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function y3(e){for(let t=e;t;t=Ba(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Ba(e);t;t=Ba(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||fr(o)||t.tagName==="BODY"))return t}return null}async function L1(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},C1(e,t,{strategy:n.strategy,platform:{...Vo,getOffsetParent:a=>Vo.getOffsetParent(a,E1)},middleware:[S1({crossAxis:!0}),v1({allowedPlacements:[n.placement]})]})}var Er=v(P());var li=v(ae());var A1=v(ae(),1);var Ha=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function O1(e,t){return(0,A1.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Qr(e);try{return JSON.parse(o)}catch{return Qr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:Jr,...t??{}})}function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!mr(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!mr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!mr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function mr(e,t){try{return b3(e,t)}catch{return!1}}function Jr(e,t){return!mr(e,t)}function Qr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function jo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var w1=v(ae(),1);var Ga=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:Jr,attribute:!1,...t};(0,w1.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var Ko=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Wt=v(ae(),1);var qo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var _1=v(H(),1);var Zo=globalThis,x3=Zo.ShadowRoot&&(Zo.ShadyCSS===void 0||Zo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var R1=(e,t)=>{if(x3)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),a=Zo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Yo=class extends _1.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return R1(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){Ha(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function N1(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var gr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},I1,M1=Symbol("constructorPrototype"),z1=Symbol("constructorName"),T1=Symbol("exportpartsDebouncer"),k1=Symbol("dynamicDependenciesLoaded"),hr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};hr.eventName="exportparts-updated";var Ge=class extends Yo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[I1]=new qo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[T1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[z1]=this.constructor.name,this[M1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[z1]&&Object.setPrototypeOf(this,this[M1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[k1]||(o[k1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(hr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(hr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new hr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=N1(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,n,a,i,s,l;let f=b=>b!=null&&b.trim().length>0,m=t.filter(f).map(b=>b.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],A=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],w=[...x,...A].filter(f).map(O=>O.trim());for(let O of w)h.add(O)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(b=>m.map(x=>`${b}:${x}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};I1=T1;gr([(0,Wt.property)()],Ge.prototype,"exportpartsPrefix",void 0);gr([O1([])],Ge.prototype,"exportpartsPrefixes",void 0);gr([(0,Wt.property)({reflect:!0})],Ge.prototype,"exportparts",void 0);gr([(0,Wt.property)()],Ge.prototype,"customStylesheet",void 0);gr([(0,Wt.property)()],Ge.prototype,"elementToFocus",void 0);gr([(0,Wt.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Xo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var eo=Symbol("internalReduxEventsUnsubscribers"),gt=Symbol("internalStoresUnsubscribers"),Vt=Symbol("internalStores"),v3=jo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Vt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Vt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Vt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Vt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Vt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Vt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[gt].has(s.store):this[gt].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f;this[gt].set(s,l.subscribe(()=>this.updateFromStores())),this[eo].set(s,[]),Xo(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((m,h)=>{if(typeof this[h]=="function"&&(!m.store||l.name===m.store)){let g=b=>this[h](b);l.addEventListener(m.eventName,g),this[eo].get(s).push(()=>l.removeEventListener(m.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[gt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[gt].has(s)&&this[gt].get(s)(),this[gt].delete(s),(l=this[eo].get(s))===null||l===void 0||l.forEach(f=>f()),this[eo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=gt,o=Vt,n=eo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),P1=class extends v3(Ge){};function le(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var S3=typeof Symbol=="function"&&Symbol.observable||"@@observable",D1=S3,Wa=()=>Math.random().toString(36).substring(7).split("").join("."),C3={INIT:`@@redux/INIT${Wa()}`,REPLACE:`@@redux/REPLACE${Wa()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Wa()}`},Qo=C3;function Jo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Va(e,t,o){if(typeof e!="function")throw new Error(le(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(le(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(le(1));return o(Va)(e,t)}let n=e,a=t,i=new Map,s=i,l=0,f=!1;function m(){s===i&&(s=new Map,i.forEach((O,N)=>{s.set(N,O)}))}function h(){if(f)throw new Error(le(3));return a}function g(O){if(typeof O!="function")throw new Error(le(4));if(f)throw new Error(le(5));let N=!0;m();let T=l++;return s.set(T,O),function(){if(N){if(f)throw new Error(le(6));N=!1,m(),s.delete(T),i=null}}}function b(O){if(!Jo(O))throw new Error(le(7));if(typeof O.type>"u")throw new Error(le(8));if(typeof O.type!="string")throw new Error(le(17));if(f)throw new Error(le(9));try{f=!0,a=n(a,O)}finally{f=!1}return(i=s).forEach(T=>{T()}),O}function x(O){if(typeof O!="function")throw new Error(le(10));n=O,b({type:Qo.REPLACE})}function A(){let O=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(le(11));function T(){let k=N;k.next&&k.next(h())}return T(),{unsubscribe:O(T)}},[D1](){return this}}}return b({type:Qo.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:x,[D1]:A}}function E3(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:Qo.INIT})>"u")throw new Error(le(12));if(typeof o(void 0,{type:Qo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(le(13))})}function U1(e){let t=Object.keys(e),o={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(o[l]=e[l])}let n=Object.keys(o),a,i;try{E3(o)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<n.length;g++){let b=n[g],x=o[b],A=l[b],w=x(A,f);if(typeof w>"u"){let O=f&&f.type;throw new Error(le(14))}h[b]=w,m=m||w!==A}return m=m||n.length!==Object.keys(l).length,m?h:l}}function to(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function F1(...e){return t=>(o,n)=>{let a=t(o,n),i=()=>{throw new Error(le(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=to(...l)(a.dispatch),{...a,dispatch:i}}}function $1(e){return Jo(e)&&"type"in e&&typeof e.type=="string"}var Z1=Symbol.for("immer-nothing"),B1=Symbol.for("immer-draftable"),fe=Symbol.for("immer-state");function Ue(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ve=Object,br=ve.getPrototypeOf,on="constructor",dn="prototype",Za="configurable",nn="enumerable",tn="writable",ro="value",We=e=>!!e&&!!e[fe];function Se(e){return e?Y1(e)||un(e)||!!e[B1]||!!e[on]?.[B1]||pn(e)||mn(e):!1}var L3=ve[dn][on].toString(),H1=new WeakMap;function Y1(e){if(!e||!oi(e))return!1;let t=br(e);if(t===null||t===ve[dn])return!0;let o=ve.hasOwnProperty.call(t,on)&&t[on];if(o===Object)return!0;if(!yr(o))return!1;let n=H1.get(o);return n===void 0&&(n=Function.toString.call(o),H1.set(o,n)),n===L3}function fn(e,t,o=!0){ao(e)===0?(o?Reflect.ownKeys(e):ve.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function ao(e){let t=e[fe];return t?t.type_:un(e)?1:pn(e)?2:mn(e)?3:0}var ja=(e,t,o=ao(e))=>o===2?e.has(t):ve[dn].hasOwnProperty.call(e,t),Ya=(e,t,o=ao(e))=>o===2?e.get(t):e[t],an=(e,t,o,n=ao(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function A3(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var un=Array.isArray,pn=e=>e instanceof Map,mn=e=>e instanceof Set,oi=e=>typeof e=="object",yr=e=>typeof e=="function",Ka=e=>typeof e=="boolean";function O3(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var et=e=>e.copy_||e.base_;var ni=e=>e.modified_?e.copy_:e.base_;function Xa(e,t){if(pn(e))return new Map(e);if(mn(e))return new Set(e);if(un(e))return Array[dn].slice.call(e);let o=Y1(e);if(t===!0||t==="class_only"&&!o){let n=ve.getOwnPropertyDescriptors(e);delete n[fe];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[tn]===!1&&(l[tn]=!0,l[Za]=!0),(l.get||l.set)&&(n[s]={[Za]:!0,[tn]:!0,[nn]:l[nn],[ro]:e[s]})}return ve.create(br(e),n)}else{let n=br(e);if(n!==null&&o)return{...e};let a=ve.create(n);return ve.assign(a,e)}}function ai(e,t=!1){return hn(e)||We(e)||!Se(e)||(ao(e)>1&&ve.defineProperties(e,{set:en,add:en,clear:en,delete:en}),ve.freeze(e),t&&fn(e,(o,n)=>{ai(n,!0)},!1)),e}function w3(){Ue(2)}var en={[ro]:w3};function hn(e){return e===null||!oi(e)?!0:ve.isFrozen(e)}var sn="MapSet",Qa="Patches",G1="ArrayMethods",X1={};function jt(e){let t=X1[e];return t||Ue(0,e),t}var W1=e=>!!X1[e];var oo,Q1=()=>oo,R3=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:W1(sn)?jt(sn):void 0,arrayMethodsPlugin_:W1(G1)?jt(G1):void 0});function V1(e,t){t&&(e.patchPlugin_=jt(Qa),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ja(e){ei(e),e.drafts_.forEach(_3),e.drafts_=null}function ei(e){e===oo&&(oo=e.parent_)}var j1=e=>oo=R3(oo,e);function _3(e){let t=e[fe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K1(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[fe].modified_&&(Ja(t),Ue(4)),Se(e)&&(e=q1(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(o[fe].base_,e,t)}else e=q1(t,o);return N3(t,e,!0),Ja(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Z1?e:void 0}function q1(e,t){if(hn(t))return t;let o=t[fe];if(!o)return cn(t,e.handledSet_,e);if(!gn(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);t2(o,e)}return o.copy_}function N3(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ai(t,o)}function J1(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var gn=(e,t)=>e.scope_===t,M3=[];function e2(e,t,o,n){let a=et(e),i=e.type_;if(n!==void 0&&Ya(a,n,i)===t){an(a,n,o,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;fn(a,(f,m)=>{if(We(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??M3;for(let l of s)an(a,l,o,i)}function z3(e,t,o){e.callbacks_.push(function(a){let i=t;if(!i||!gn(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=ni(i);e2(e,i.draft_??i,s,o),t2(i,a)})}function t2(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}J1(e)}}function k3(e,t,o){let{scope_:n}=e;if(We(o)){let a=o[fe];gn(a,n)&&a.callbacks_.push(function(){rn(e);let s=ni(a);e2(e,o,s,t)})}else Se(o)&&e.callbacks_.push(function(){let i=et(e);e.type_===3?i.has(o)&&cn(o,n.handledSet_,n):Ya(i,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&cn(Ya(e.copy_,t,e.type_),n.handledSet_,n)})}function cn(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||We(e)||t.has(e)||!Se(e)||hn(e)||(t.add(e),fn(e,(n,a)=>{if(We(a)){let i=a[fe];if(gn(i,o)){let s=ni(i);an(e,n,s,e.type_),J1(i)}}else Se(a)&&cn(a,t,o)})),e}function I3(e,t){let o=un(e),n={type_:o?1:0,scope_:t?t.scope_:Q1(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,i=ln;o&&(a=[n],i=no);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var ln={get(e,t){if(t===fe)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let a=et(e);if(!ja(a,t,e.type_))return P3(e,a,t);let i=a[t];if(e.finalized_||!Se(i)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&O3(t))return i;if(i===qa(e.base_,t)||T3(e,t,i)){rn(e);let s=e.type_===1?+t:t,l=ri(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in et(e)},ownKeys(e){return Reflect.ownKeys(et(e))},set(e,t,o){let n=r2(et(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let a=qa(et(e),t),i=a?.[fe];if(i&&i.base_===o)return e.copy_[t]=o,e.assigned_.set(t,!1),!0;if(A3(o,a)&&(o!==void 0||ja(e.base_,t,e.type_)))return!0;rn(e),ti(e)}return e.copy_[t]===o&&(o!==void 0||ja(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),k3(e,t,o)),!0},deleteProperty(e,t){return rn(e),qa(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ti(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=et(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[tn]:!0,[Za]:e.type_!==1||t!=="length",[nn]:n[nn],[ro]:o[t]}},defineProperty(){Ue(11)},getPrototypeOf(e){return br(e.base_)},setPrototypeOf(){Ue(12)}},no={};for(let e in ln){let t=ln[e];no[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}no.deleteProperty=function(e,t){return no.set.call(this,e,t,void 0)};no.set=function(e,t,o){return ln.set.call(this,e[0],t,o,e[0])};function qa(e,t){let o=e[fe];return(o?et(o):e)[t]}function T3(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Se(o)||o[fe]?!1:e.baseRefs_.has(o)}function P3(e,t,o){let n=r2(t,o);return n?ro in n?n[ro]:n.get?.call(e.draft_):void 0}function r2(e,t){if(!(t in e))return;let o=br(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=br(o)}}function ti(e){e.modified_||(e.modified_=!0,e.parent_&&ti(e.parent_))}function rn(e){e.copy_||(e.assigned_=new Map,e.copy_=Xa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var D3=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(yr(t)&&!yr(o)){let i=o;o=t;let s=this;return function(f=i,...m){return s.produce(f,h=>o.call(this,h,...m))}}yr(o)||Ue(6),n!==void 0&&!yr(n)&&Ue(7);let a;if(Se(t)){let i=j1(this),s=ri(i,t,void 0),l=!0;try{a=o(s),l=!1}finally{l?Ja(i):ei(i)}return V1(i,n),K1(a,i)}else if(!t||!oi(t)){if(a=o(t),a===void 0&&(a=t),a===Z1&&(a=void 0),this.autoFreeze_&&ai(a,!0),n){let i=[],s=[];jt(Qa).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else Ue(1,t)},this.produceWithPatches=(t,o)=>{if(yr(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let n,a;return[this.produce(t,o,(s,l)=>{n=s,a=l}),n,a]},Ka(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ka(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ka(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Se(e)||Ue(8),We(e)&&(e=o2(e));let t=j1(this),o=ri(t,e,void 0);return o[fe].isManual_=!0,ei(t),o}finishDraft(e,t){let o=e&&e[fe];(!o||!o.isManual_)&&Ue(9);let{scope_:n}=o;return V1(n,t),K1(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let o;for(o=t.length-1;o>=0;o--){let a=t[o];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}o>-1&&(t=t.slice(o+1));let n=jt(Qa).applyPatches_;return We(e)?n(e,t):this.produce(e,a=>n(a,t))}};function ri(e,t,o,n){let[a,i]=pn(t)?jt(sn).proxyMap_(t,o):mn(t)?jt(sn).proxySet_(t,o):I3(t,o);return(o?.scope_??Q1()).drafts_.push(a),i.callbacks_=o?.callbacks_??[],i.key_=n,o&&n!==void 0?z3(o,i,n):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function o2(e){return We(e)||Ue(10,e),n2(e)}function n2(e){if(!Se(e)||hn(e))return e;let t=e[fe],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=Xa(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=Xa(e,!0);return fn(o,(a,i)=>{an(o,a,n2(i))},n),t&&(t.finalized_=!1),o}var U3=globalThis.Iterator,pg=typeof U3?.from=="function";var F3=new D3,ii=F3.produce;function a2(e){return({dispatch:o,getState:n})=>a=>i=>typeof i=="function"?i(o,n,e):a(i)}var i2=a2(),s2=a2;var $3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?to:to.apply(null,arguments)},vg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},B3=e=>e&&typeof e.match=="function";function yt(e,t){function o(...n){if(t){let a=t(...n);if(!a)throw new Error(tt(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return o.toString=()=>`${e}`,o.type=e,o.match=n=>$1(n)&&n.type===e,o}var u2=class io extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,io.prototype)}static get[Symbol.species](){return io}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new io(...t[0].concat(this)):new io(...t.concat(this))}};function c2(e){return Se(e)?ii(e,()=>{}):e}function yn(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function H3(e){return typeof e=="boolean"}var G3=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new u2;return o&&(H3(o)?s.push(i2):s.push(s2(o.extraArgument))),s},W3="RTK_autoBatch";var l2=e=>t=>{setTimeout(t,e)},V3=(e,t)=>o=>{let n=!1,a=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),o())},i=e(a),s=setTimeout(a,t)},j3=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?V3(window.requestAnimationFrame,100):l2(10):e.type==="callback"?e.queueNotification:l2(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let g=()=>a&&h(),b=n.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[W3],i=!a,i&&(s||(s=!0,f(m))),n.dispatch(h)}finally{a=!0}}})},K3=e=>function(o){let{autoBatch:n=!0}=o??{},a=new u2(e);return n&&a.push(j3(typeof n=="object"?n:void 0)),a};function p2(e){let t=G3(),{reducer:o=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof o=="function")f=o;else if(Jo(o))f=U1(o);else throw new Error(tt(1));let m;typeof n=="function"?m=n(t):m=t();let h=to;a&&(h=$3({trace:!1,...typeof a=="object"&&a}));let g=F1(...m),b=K3(g),x=typeof l=="function"?l(b):b(),A=h(...x);return Va(f,s,A)}function m2(e){let t={},o=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(tt(28));if(l in t)throw new Error(tt(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&o.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase(i){return n=i,a}};return e(a),[t,o,n]}function q3(e){return typeof e=="function"}function Z3(e,t){let[o,n,a]=m2(t),i;if(q3(e))i=()=>c2(e());else{let l=c2(e);i=()=>l}function s(l=i(),f){let m=[o[f.type],...n.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(We(h)){let x=g(h,f);return x===void 0?h:x}else{if(Se(h))return ii(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return h},l)}return s.getInitialState=i,s}var Y3=(e,t)=>B3(e)?e.match(t):e(t);function X3(...e){return t=>e.some(o=>Y3(o,t))}var Q3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",J3=(e=21)=>{let t="",o=e;for(;o--;)t+=Q3[Math.random()*64|0];return t},ep=["name","message","stack","code"],si=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},d2=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},tp=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of ep)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},f2="External signal was aborted",rp=(()=>{function e(t,o,n){let a=yt(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=yt(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=yt(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(n&&n.serializeError||tp)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:!!g,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let x=n?.idGenerator?n.idGenerator(f):J3(),A=new AbortController,w,O;function N(R){O=R,A.abort()}m&&(m.aborted?N(f2):m.addEventListener("abort",()=>N(f2),{once:!0}));let T=(async function(){let R;try{let I=n?.condition?.(f,{getState:g,extra:b});if(np(I)&&(I=await I),I===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let G=new Promise((B,W)=>{w=()=>{W({name:"AbortError",message:O||"Aborted"})},A.signal.addEventListener("abort",w,{once:!0})});h(i(x,f,n?.getPendingMeta?.({requestId:x,arg:f},{getState:g,extra:b}))),R=await Promise.race([G,Promise.resolve(o(f,{dispatch:h,getState:g,extra:b,requestId:x,signal:A.signal,abort:N,rejectWithValue:((B,W)=>new si(B,W)),fulfillWithValue:((B,W)=>new d2(B,W))})).then(B=>{if(B instanceof si)throw B;return B instanceof d2?a(B.payload,x,f,B.meta):a(B,x,f)})])}catch(I){R=I instanceof si?s(null,x,f,I.payload,I.meta):s(I,x,f)}finally{w&&A.signal.removeEventListener("abort",w)}return n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition||h(R),R})();return Object.assign(T,{abort:N,requestId:x,arg:f,unwrap(){return T.then(op)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:X3(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function op(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function np(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var h2=Symbol.for("rtk-slice-createasyncthunk"),Cg={[h2]:rp};function ap(e,t){return`${e}/${t}`}function ip({creators:e}={}){let t=e?.asyncThunk?.[h2];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(tt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(cp()):n.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(R,k){let I=typeof R=="string"?R:R.type;if(!I)throw new Error(tt(12));if(I in f.sliceCaseReducersByType)throw new Error(tt(13));return f.sliceCaseReducersByType[I]=k,m},addMatcher(R,k){return f.sliceMatchers.push({matcher:R,reducer:k}),m},exposeAction(R,k){return f.actionCreators[R]=k,m},exposeCaseReducer(R,k){return f.sliceCaseReducersByName[R]=k,m}};l.forEach(R=>{let k=s[R],I={reducerName:R,type:ap(a,R),createNotation:typeof n.reducers=="function"};dp(k)?up(I,k,m,t):lp(I,k,m)});function h(){let[R={},k=[],I=void 0]=typeof n.extraReducers=="function"?m2(n.extraReducers):[n.extraReducers],G={...R,...f.sliceCaseReducersByType};return Z3(n.initialState,B=>{for(let W in G)B.addCase(W,G[W]);for(let W of f.sliceMatchers)B.addMatcher(W.matcher,W.reducer);for(let W of k)B.addMatcher(W.matcher,W.reducer);I&&B.addDefaultCase(I)})}let g=R=>R,b=new Map,x=new WeakMap,A;function w(R,k){return A||(A=h()),A(R,k)}function O(){return A||(A=h()),A.getInitialState()}function N(R,k=!1){function I(B){let W=B[R];return typeof W>"u"&&k&&(W=yn(x,I,O)),W}function G(B=g){let W=yn(b,k,()=>new WeakMap);return yn(W,B,()=>{let St={};for(let[Ee,Ct]of Object.entries(n.selectors??{}))St[Ee]=sp(Ct,B,()=>yn(x,B,O),k);return St})}return{reducerPath:R,getSelectors:G,get selectors(){return G(I)},selectSlice:I}}let T={name:a,reducer:w,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:O,...N(i),injectInto(R,{reducerPath:k,...I}={}){let G=k??i;return R.inject({reducerPath:G,reducer:w},I),{...T,...N(G,!0)}}};return T}}function sp(e,t,o,n){function a(i,...s){let l=t(i);return typeof l>"u"&&n&&(l=o()),e(l,...s)}return a.unwrapped=e,a}var g2=ip();function cp(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function lp({type:e,reducerName:t,createNotation:o},n,a){let i,s;if("reducer"in n){if(o&&!fp(n))throw new Error(tt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?yt(e,s):yt(e))}function dp(e){return e._reducerDefinitionType==="asyncThunk"}function fp(e){return e._reducerDefinitionType==="reducerWithPrepare"}function up({type:e,reducerName:t},o,n,a){if(!a)throw new Error(tt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=o,g=a(e,i,h);n.exposeAction(t,g),s&&n.addCase(g.fulfilled,s),l&&n.addCase(g.pending,l),f&&n.addCase(g.rejected,f),m&&n.addMatcher(g.settled,m),n.exposeCaseReducer(t,{fulfilled:s||bn,pending:l||bn,rejected:f||bn,settled:m||bn})}function bn(){}var y2="listener",b2="completed",x2="cancelled",Eg=`task-${x2}`,Lg=`task-${b2}`,Ag=`${y2}-${x2}`,Og=`${y2}-${b2}`;var{assign:v2}=Object;var ci="listenerMiddleware";var pp=v2(yt(`${ci}/add`),{withTypes:()=>pp}),wg=yt(`${ci}/removeAll`),mp=v2(yt(`${ci}/remove`),{withTypes:()=>mp});function tt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hp=jo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),xn=class extends hp(Object){};window.ftReduxStores||(window.ftReduxStores={});var S2=class e extends xn{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Xo(i))return i;if(a==null)return;let s=g2({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=p2({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Qr(s.getInitialState());for(let g of m.keeping)h[g]=(f??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...m.overwrites};return s.reducer(f,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ko,this.injectInto=(i,s)=>this.reduxSlice.injectInto(i,s),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,m=i[f];return m?(...h)=>{let g=m(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{let g=f,b=this.getState()[g];mr(b,h)||this.setState({[g]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var vn=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Sn=v(P()),gp="ft-app-info",Kt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Kt.eventName="authentication-change";var so=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};so.eventName="ui-locale-changed";var yp={session:(e,t)=>{(0,Sn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new Kt(t.payload)),0))}},U=Sn.FtReduxStore.get({name:gp,reducers:yp,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var C2=v(P()),Cn=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},oy=(0,C2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>vn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Cn([(0,li.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Cn([(0,li.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Cn([Ga({store:U.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Cn([Ga({store:U.name})],t.prototype,"uiLocale",void 0),t});var E2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(E2||(E2={}));var L2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(L2||(L2={}));var A2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(A2||(A2={}));var O2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(O2||(O2={}));var w2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(w2||(w2={}));var R2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(R2||(R2={}));var _2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(_2||(_2={}));var N2;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(N2||(N2={}));var M2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(M2||(M2={}));var z2;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(z2||(z2={}));var k2;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(k2||(k2={}));var I2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(I2||(I2={}));var T2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(T2||(T2={}));var P2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(P2||(P2={}));var D2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(D2||(D2={}));var U2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(U2||(U2={}));var F2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(F2||(F2={}));var $2;(function(e){e.ASC="ASC",e.DESC="DESC"})($2||($2={}));var B2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(B2||(B2={}));var H2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(H2||(H2={}));var G2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(G2||(G2={}));var W2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(W2||(W2={}));var V2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(V2||(V2={}));var j2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(j2||(j2={}));var K2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(K2||(K2={}));var q2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(q2||(q2={}));var Z2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Z2||(Z2={}));var ne;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(ne||(ne={}));var Oe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Oe||(Oe={}));var Y2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Y2||(Y2={}));var X2;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(X2||(X2={}));var Q2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Q2||(Q2={}));var J2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(J2||(J2={}));var e0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(e0||(e0={}));var t0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(t0||(t0={}));var r0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(r0||(r0={}));var o0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(o0||(o0={}));var n0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(n0||(n0={}));var a0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(a0||(a0={}));var i0;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(i0||(i0={}));var s0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(s0||(s0={}));var bp={[ne.PERSONAL_BOOK_SHARE_USER]:[ne.PERSONAL_BOOK_USER],[ne.HTML_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.PDF_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.KHUB_ADMIN]:[ne.CONTENT_PUBLISHER],[ne.ADMIN]:[ne.KHUB_ADMIN,ne.USERS_ADMIN,ne.PORTAL_ADMIN,ne.BEHAVIOR_DATA_USER],[ne.GENERATIVE_AI_EXPORT_USER]:[ne.GENERATIVE_AI_USER]};function c0(e,t){return e===t||(bp[e]??[]).some(o=>c0(o,t))}function l0(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>c0(n,t))}var wn=v(P());var di=v(P());var qt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var xr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:qt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):qt.await()}};var Ce=class extends xr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new di.CacheRegistry,this.cache=t?a.commonCache:new di.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var En=class extends Ce{async listMySearches(){let{session:t}=U.getState();return l0(t,ne.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ln=class extends Ce{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var An=class extends Ce{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var On=class extends Ce{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var xp="ft-user-assets",vp={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Oe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;ui(e,o,[...fi(e,o),a]),d0(e,o,1,n),f0(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ui(e,o,fi(e,o).map(a=>a.id===n.id?n:a)),f0(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;ui(e,o,fi(e,o).filter(i=>i.id!==a)),d0(e,o,-1,n)}},u0={[Oe.SEARCHES]:"savedSearches",[Oe.BOOKMARKS]:"bookmarks",[Oe.BOOKS]:void 0,[Oe.COLLECTIONS]:void 0},fi=(e,t)=>{var o;let n=u0[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ui=(e,t,o)=>{let n=u0[t];n&&(e[n]=o)},d0=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Oe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},f0=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},pe=wn.FtReduxStore.get({name:xp,reducers:vp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Oe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),pi=class{constructor(t=new An,o=new On){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ln,this.savedSearchesService=new En,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=U.getState();(0,wn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),pe.actions.clearAssetCount(),pe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),pe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),pe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();pe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();pe.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&pe.getState().assetCounts.allAsset[t]!==o.count&&pe.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&pe.getState().assetCounts.bookmarkByMap[t]!==o.count&&pe.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(pe.getState().assetCounts.bookmarkByMap).length!==0;t===Oe.BOOKMARKS&&o&&pe.actions.clearBookmarkCountByMap(),pe.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;pe.actions.bookmarks(o)}}},Sp=new pi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Sp);var mi=class{addCommand(t,o=!1){U.commands.add(t,o)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new mi;var we=v(P());var p0,vr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Cp=Symbol("clearAfterUnitTest"),Rn=class extends(0,we.withEventBus)(Ce){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[p0]=()=>{this.defaultMessages={},this.cache=new we.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,we.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new we.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof we.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new vr({loadedContexts:t})),this.dispatchEvent(new vr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new vr({loadedContexts:[t]})),this.dispatchEvent(new vr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,we.delay)(0).then(()=>n()).catch(()=>null)))}};p0=Cp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Rn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Rn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Sr=window.FluidTopicsI18nService,_n=window.FluidTopicsCustomI18nService;var m0=v(P()),hi=class{highlightHtml(t,o,n){(0,m0.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new hi;var h0=v(P());var gi=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=U.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return h0.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new gi;var g0=v(P());var co=class{static get(t,o){var n,a,i,s;let l=U.getState(),{lang:f,region:m}=(i=(a=(n=l.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new g0.SearchPlaceConverter(l.baseUrl,t??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,o??`${f}-${m}`)}};var yi=class{urlToSearchRequest(t){return co.get().parse(t)}searchRequestToUrl(t){return co.get().serialize(t)}};window.FluidTopicsUrlService=new yi;var rt=v(P());var Zt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Zt.eventName="before-location-change";var Yt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Yt.eventName="change";var bi=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},y0=new bi;var Nn=class e extends rt.WithEventBus{static build(){return new e(window.history,y0,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,rt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Yt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let f=new Zt(new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin));this.dispatchEvent(f);let m=o(),h={...m===this.currentIndex?this.currentState:void 0,...i,index:m,href:f.detail.nextLocation.href};n.apply(a,[h,s,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Zt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Zt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Yt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Yt.eventName,t)}currentItem(){return(0,rt.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,rt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,rt.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,rt.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Nn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var b0=v(H());var x0=b0.css`
|
|
1962
|
+
`;var Ql=["top","right","bottom","left"],Xl=["start","end"],Ta=Ql.reduce((e,t)=>e.concat(t,t+"-"+Xl[0],t+"-"+Xl[1]),[]),Vr=Math.min,pt=Math.max,jr=Math.round;var He=e=>({x:e,y:e}),Xu={left:"right",right:"left",bottom:"top",top:"bottom"};function Jl(e,t,o){return pt(e,Vr(t,o))}function Uo(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function mt(e){return e.split("-")[1]}function Pa(e){return e==="x"?"y":"x"}function Da(e){return e==="y"?"height":"width"}function Fo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ua(e){return Pa(Fo(e))}function e1(e,t,o){o===void 0&&(o=!1);let n=mt(e),a=Ua(e),i=Da(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ia(s)),[s,Ia(s)]}function t1(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Ia(e){let t=Kr(e);return Xu[t]+e.slice(t.length)}function Qu(e){var t,o,n,a;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(n=e.bottom)!=null?n:0,left:(a=e.left)!=null?a:0}}function r1(e){return typeof e!="number"?Qu(e):{top:e,right:e,bottom:e,left:e}}function Bt(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function o1(e,t,o){let{reference:n,floating:a}=e,i=Fo(t),s=Ua(t),l=Da(s),f=Kr(t),m=i==="y",h=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,b=n[l]/2-a[l]/2,x;switch(f){case"top":x={x:h,y:n.y-a.height};break;case"bottom":x={x:h,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y:g};break;case"left":x={x:n.x-a.width,y:g};break;default:x={x:n.x,y:n.y}}let A=mt(t);return A&&(x[s]+=b*(A==="end"?1:-1)*(o&&m?-1:1)),x}async function n1(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:b=!1,padding:x=0}=Uo(t,e),A=r1(x),O=l[b?g==="floating"?"reference":"floating":g],N=Bt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(O)))==null||o?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),T=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),k=await(i.isElement==null?void 0:i.isElement(R))&&await(i.getScale==null?void 0:i.getScale(R))||{x:1,y:1},I=Bt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:T,offsetParent:R,strategy:f}):T);return{top:(N.top-I.top+A.top)/k.y,bottom:(I.bottom-N.bottom+A.bottom)/k.y,left:(N.left-I.left+A.left)/k.x,right:(I.right-N.right+A.right)/k.x}}var Ju=50,a1=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:n1},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=o1(m,n,f),b=n,x=0,A={};for(let w=0;w<i.length;w++){let O=i[w];if(!O)continue;let{name:N,fn:T}=O,{x:R,y:k,data:I,reset:G}=await T({x:h,y:g,initialPlacement:n,placement:b,strategy:a,middlewareData:A,rects:m,platform:l,elements:{reference:e,floating:t}});h=R??h,g=k??g,A[N]={...A[N],...I},G&&x<Ju&&(x++,typeof G=="object"&&(G.placement&&(b=G.placement),G.rects&&(m=G.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):G.rects),{x:h,y:g}=o1(m,b,f)),w=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:A}};function e3(e,t,o){return(e?[...o.filter(a=>mt(a)===e),...o.filter(a=>mt(a)!==e)]:o.filter(a=>Kr(a)===a)).filter(a=>e?mt(a)===e||(t?t1(a)!==a:!1):!0)}var i1=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=Ta,autoAlignment:x=!0,...A}=Uo(e,t),w=g!==void 0||b===Ta?e3(g||null,x,b):b,O=((o=s.autoPlacement)==null?void 0:o.index)||0,N=w[O];if(N==null)return{};if(l!==N)return{reset:{placement:w[0]}};let T=await f.detectOverflow(t,A),R=e1(N,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),k=[T[Kr(N)],T[R[0]],T[R[1]]],I=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:k}],G=w[O+1];if(G)return{data:{index:O+1,overflows:I},reset:{placement:G}};let B=I.map(Ee=>{let Ct=mt(Ee.placement);return[Ee.placement,Ct&&h?Ee.overflows.slice(0,2).reduce((a4,i4)=>a4+i4,0):Ee.overflows[0],Ee.overflows]}).sort((Ee,Ct)=>Ee[1]-Ct[1]),St=((a=B.filter(Ee=>Ee[2].slice(0,mt(Ee[0])?2:3).every(Ct=>Ct<=0))[0])==null?void 0:a[0])||B[0][0];return St!==l?{data:{index:O+1,overflows:I},reset:{placement:St}}:{}}}};var s1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:T=>{let{x:R,y:k}=T;return{x:R,y:k}}},...m}=Uo(e,t),h={x:o,y:n},g=await i.detectOverflow(t,m),b=Fo(a),x=Pa(b),A=h[x],w=h[b],O=(T,R)=>Jl(R+g[T==="y"?"top":"left"],R,R-g[T==="y"?"bottom":"right"]);s&&(A=O(x,A)),l&&(w=O(b,w));let N=f.fn({...t,[x]:A,[b]:w});return{...N,data:{x:N.x-o,y:N.y-n,enabled:{[x]:s,[b]:l}}}}}};function Bo(){return typeof window<"u"}function Gt(e){return l1(e)?(e.nodeName||"").toLowerCase():"#document"}function be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(l1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l1(e){return Bo()?e instanceof Node||e instanceof be(e).Node:!1}function Pe(e){return Bo()?e instanceof Element||e instanceof be(e).Element:!1}function Je(e){return Bo()?e instanceof HTMLElement||e instanceof be(e).HTMLElement:!1}function c1(e){return!Bo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof be(e).ShadowRoot}function qr(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=De(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function d1(e){return/^(table|td|th)$/.test(Gt(e))}function Zr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var t3=/transform|translate|scale|rotate|perspective|filter/,r3=/paint|layout|strict|content/,Ht=e=>!!e&&e!=="none",Fa;function fr(e){let t=Pe(e)?De(e):e;return Ht(t.transform)||Ht(t.translate)||Ht(t.scale)||Ht(t.rotate)||Ht(t.perspective)||!Ho()&&(Ht(t.backdropFilter)||Ht(t.filter))||t3.test(t.willChange||"")||r3.test(t.contain||"")}function f1(e){let t=ht(e);for(;Je(t)&&!ur(t);){if(fr(t))return t;if(Zr(t))return null;t=ht(t)}return null}function Ho(){return Fa==null&&(Fa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fa}function ur(e){return/^(html|body|#document)$/.test(Gt(e))}function De(e){return be(e).getComputedStyle(e)}function Yr(e){return Pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(Gt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||c1(e)&&e.host||Qe(e);return c1(t)?t.host:t}function u1(e){let t=ht(e);return ur(t)?(e.ownerDocument||e).body:Je(t)&&qr(t)?t:u1(t)}function $o(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=u1(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=be(a);if(i){let l=Go(s);return t.concat(s,s.visualViewport||[],qr(a)?a:[],l&&o?$o(l):[])}else return t.concat(a,$o(a,[],o))}function Go(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function h1(e){let t=De(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Je(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=jr(o)!==i||jr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function g1(e){return Pe(e)?e:e.contextElement}function pr(e){let t=g1(e);if(!Je(t))return He(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=h1(t),s=(i?jr(o.width):o.width)/n,l=(i?jr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var o3=He(0);function y1(e){let t=be(e);return!Ho()||!t.visualViewport?o3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function n3(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===be(e)}function Xr(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=g1(e),s=He(1);t&&(n?Pe(n)&&(s=pr(n)):s=pr(e));let l=n3(i,o,n)?y1(i):He(0),f=(a.left+l.x)/s.x,m=(a.top+l.y)/s.y,h=a.width/s.x,g=a.height/s.y;if(i&&n){let b=be(i),x=Pe(n)?be(n):n,A=b,w=Go(A);for(;w&&x!==A;){let O=pr(w),N=w.getBoundingClientRect(),T=De(w),R=N.left+(w.clientLeft+parseFloat(T.paddingLeft))*O.x,k=N.top+(w.clientTop+parseFloat(T.paddingTop))*O.y;f*=O.x,m*=O.y,h*=O.x,g*=O.y,f+=R,m+=k,A=be(w),w=Go(A)}}return Bt({width:h,height:g,x:f,y:m})}function Wo(e,t){let o=Yr(e).scrollLeft;return t?t.left+o:Xr(Qe(e)).left+o}function b1(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-Wo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function a3(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Qe(n),l=t?Zr(t.floating):!1;if(n===s||l&&i)return o;let f={scrollLeft:0,scrollTop:0},m=He(1),h=He(0),g=Je(n);if((g||!i)&&((Gt(n)!=="body"||qr(s))&&(f=Yr(n)),g)){let x=Xr(n);m=pr(n),h.x=x.x+n.clientLeft,h.y=x.y+n.clientTop}let b=s&&!g&&!i?b1(s,f):He(0);return{width:o.width*m.x,height:o.height*m.y,x:o.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:o.y*m.y-f.scrollTop*m.y+h.y+b.y}}function i3(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function s3(e){let t=Yr(e),o=e.ownerDocument.body,n=pt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=pt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),i=-t.scrollLeft+Wo(e),s=-t.scrollTop;return De(o).direction==="rtl"&&(i+=pt(e.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var c3=25;function l3(e,t,o){o===void 0&&(o="viewport");let n=o==="layoutViewport",a=be(e),i=Qe(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!Ho()||t==="fixed";n?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(Wo(i)<=0){let b=i.ownerDocument,x=b.body,A=getComputedStyle(x),w=b.compatMode==="CSS1Compat"&&parseFloat(A.marginLeft)+parseFloat(A.marginRight)||0,O=Math.abs(i.clientWidth-x.clientWidth-w),N=getComputedStyle(i).scrollbarGutter==="stable both-edges"?O/2:O;N<=c3&&(l-=N)}return{width:l,height:f,x:m,y:h}}function d3(e,t){let o=Xr(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=pr(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=n*i.y;return{width:s,height:l,x:f,y:m}}function p1(e,t,o){let n;if(t==="viewport"||t==="layoutViewport")n=l3(e,o,t);else if(t==="document")n=s3(Qe(e));else if(Pe(t))n=d3(t,o);else{let a=y1(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Bt(n)}function f3(e,t){let o=t.get(e);if(o)return o;let n=$o(e,[],!1).filter(l=>Pe(l)&&Gt(l)!=="body"),a=null,i=De(e).position==="fixed",s=i?ht(e):e;for(;Pe(s)&&!ur(s);){let l=De(s),f=fr(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?n=n.filter(g=>g!==s):a=l,s=ht(s)}return t.set(e,n),n}function u3(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Zr(t)?[]:f3(t,this._c):[].concat(o),n],l=p1(t,s[0],a),f=l.top,m=l.right,h=l.bottom,g=l.left;for(let b=1;b<s.length;b++){let x=p1(t,s[b],a);f=pt(x.top,f),m=Vr(x.right,m),h=Vr(x.bottom,h),g=pt(x.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function p3(e){let{width:t,height:o}=h1(e);return{width:t,height:o}}function m3(e,t,o){let n=Je(t),a=Qe(t),i=o==="fixed",s=Xr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=He(0);if((n||!i)&&((Gt(t)!=="body"||qr(a))&&(l=Yr(t)),n)){let b=Xr(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!n&&a&&(f.x=Wo(a));let m=a&&!n&&!i?b1(a,l):He(0),h=s.left+l.scrollLeft-f.x-m.x,g=s.top+l.scrollTop-f.y-m.y;return{x:h,y:g,width:s.width,height:s.height}}function $a(e){return De(e).position==="static"}function m1(e,t){if(!Je(e)||De(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Qe(e)===o&&(o=o.ownerDocument.body),o}function x1(e,t){let o=be(e);if(Zr(e))return o;if(!Je(e)){let a=ht(e);for(;a&&!ur(a);){if(Pe(a)&&!$a(a))return a;a=ht(a)}return o}let n=m1(e,t);for(;n&&d1(n)&&$a(n);)n=m1(n,t);return n&&ur(n)&&$a(n)&&!fr(n)?o:n||f1(e)||o}var h3=async function(e){let t=this.getOffsetParent||x1,o=this.getDimensions,n=await o(e.floating);return{reference:m3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function g3(e){return De(e).direction==="rtl"}var Vo={convertOffsetParentRelativeRectToViewportRelativeRect:a3,getDocumentElement:Qe,getClippingRect:u3,getOffsetParent:x1,getElementRects:h3,getClientRects:i3,getDimensions:p3,getScale:pr,isElement:Pe,isRTL:g3};var v1=i1,S1=s1;var C1=(e,t,o)=>{let n=new Map,a=o??{},i={...Vo,...a.platform,_c:n};return a1(e,t,{...a,platform:i})};function E1(e){return y3(e)}function Ba(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function y3(e){for(let t=e;t;t=Ba(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Ba(e);t;t=Ba(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||fr(o)||t.tagName==="BODY"))return t}return null}async function L1(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},C1(e,t,{strategy:n.strategy,platform:{...Vo,getOffsetParent:a=>Vo.getOffsetParent(a,E1)},middleware:[S1({crossAxis:!0}),v1({allowedPlacements:[n.placement]})]})}var Er=v(P());var li=v(ae());var A1=v(ae(),1);var Ha=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function O1(e,t){return(0,A1.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return Qr(e);try{return JSON.parse(o)}catch{return Qr(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:Jr,...t??{}})}function b3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!mr(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!mr(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!mr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function mr(e,t){try{return b3(e,t)}catch{return!1}}function Jr(e,t){return!mr(e,t)}function Qr(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function jo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var w1=v(ae(),1);var Ga=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:Jr,attribute:!1,...t};(0,w1.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var Ko=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Wt=v(ae(),1);var qo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var _1=v(H(),1);var Zo=globalThis,x3=Zo.ShadowRoot&&(Zo.ShadyCSS===void 0||Zo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var R1=(e,t)=>{if(x3)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let n=document.createElement("style"),a=Zo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Yo=class extends _1.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return R1(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){Ha(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function N1(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var gr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},I1,M1=Symbol("constructorPrototype"),z1=Symbol("constructorName"),T1=Symbol("exportpartsDebouncer"),k1=Symbol("dynamicDependenciesLoaded"),hr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};hr.eventName="exportparts-updated";var Ge=class extends Yo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[I1]=new qo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[T1].run(()=>{var a,i;!((a=this.exportpartsPrefix)===null||a===void 0)&&a.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[z1]=this.constructor.name,this[M1]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[z1]&&Object.setPrototypeOf(this,this[M1])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[k1]||(o[k1]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(hr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(hr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new hr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=N1(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,n,a,i,s,l;let f=b=>b!=null&&b.trim().length>0,m=t.filter(f).map(b=>b.trim());if(m.length===0){this.exportparts=void 0;return}let h=new Set;for(let b of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(i=(a=b.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],A=(l=(s=b.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],w=[...x,...A].filter(f).map(O=>O.trim());for(let O of w)h.add(O)}if(h.size===0){this.exportparts=void 0;return}let g=[...h.values()].flatMap(b=>m.map(x=>`${b}:${x}--${b}`));this.exportparts=[...this.part,...g].join(", ")}};I1=T1;gr([(0,Wt.property)()],Ge.prototype,"exportpartsPrefix",void 0);gr([O1([])],Ge.prototype,"exportpartsPrefixes",void 0);gr([(0,Wt.property)({reflect:!0})],Ge.prototype,"exportparts",void 0);gr([(0,Wt.property)()],Ge.prototype,"customStylesheet",void 0);gr([(0,Wt.property)()],Ge.prototype,"elementToFocus",void 0);gr([(0,Wt.state)()],Ge.prototype,"useAdoptedStyleSheets",void 0);function Xo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var eo=Symbol("internalReduxEventsUnsubscribers"),gt=Symbol("internalStoresUnsubscribers"),Vt=Symbol("internalStores"),v3=jo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Vt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Vt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Vt].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Vt].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Vt].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Vt].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let f=this.constructor.getPropertyOptions(l);if(!f?.attribute||!this.hasAttribute(typeof f?.attribute=="string"?f.attribute:l)){let m=this.getStore(s.store);m&&(s.store?this[gt].has(s.store):this[gt].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f;this[gt].set(s,l.subscribe(()=>this.updateFromStores())),this[eo].set(s,[]),Xo(l)&&l.eventBus&&((f=this.reduxConstructor.reduxEventListeners)===null||f===void 0||f.forEach((m,h)=>{if(typeof this[h]=="function"&&(!m.store||l.name===m.store)){let g=b=>this[h](b);l.addEventListener(m.eventName,g),this[eo].get(s).push(()=>l.removeEventListener(m.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[gt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[gt].has(s)&&this[gt].get(s)(),this[gt].delete(s),(l=this[eo].get(s))===null||l===void 0||l.forEach(f=>f()),this[eo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=gt,o=Vt,n=eo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),P1=class extends v3(Ge){};function le(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var S3=typeof Symbol=="function"&&Symbol.observable||"@@observable",D1=S3,Wa=()=>Math.random().toString(36).substring(7).split("").join("."),C3={INIT:`@@redux/INIT${Wa()}`,REPLACE:`@@redux/REPLACE${Wa()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Wa()}`},Qo=C3;function Jo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Va(e,t,o){if(typeof e!="function")throw new Error(le(2));if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(le(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(le(1));return o(Va)(e,t)}let n=e,a=t,i=new Map,s=i,l=0,f=!1;function m(){s===i&&(s=new Map,i.forEach((O,N)=>{s.set(N,O)}))}function h(){if(f)throw new Error(le(3));return a}function g(O){if(typeof O!="function")throw new Error(le(4));if(f)throw new Error(le(5));let N=!0;m();let T=l++;return s.set(T,O),function(){if(N){if(f)throw new Error(le(6));N=!1,m(),s.delete(T),i=null}}}function b(O){if(!Jo(O))throw new Error(le(7));if(typeof O.type>"u")throw new Error(le(8));if(typeof O.type!="string")throw new Error(le(17));if(f)throw new Error(le(9));try{f=!0,a=n(a,O)}finally{f=!1}return(i=s).forEach(T=>{T()}),O}function x(O){if(typeof O!="function")throw new Error(le(10));n=O,b({type:Qo.REPLACE})}function A(){let O=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(le(11));function T(){let k=N;k.next&&k.next(h())}return T(),{unsubscribe:O(T)}},[D1](){return this}}}return b({type:Qo.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:x,[D1]:A}}function E3(e){Object.keys(e).forEach(t=>{let o=e[t];if(typeof o(void 0,{type:Qo.INIT})>"u")throw new Error(le(12));if(typeof o(void 0,{type:Qo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(le(13))})}function U1(e){let t=Object.keys(e),o={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(o[l]=e[l])}let n=Object.keys(o),a,i;try{E3(o)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<n.length;g++){let b=n[g],x=o[b],A=l[b],w=x(A,f);if(typeof w>"u"){let O=f&&f.type;throw new Error(le(14))}h[b]=w,m=m||w!==A}return m=m||n.length!==Object.keys(l).length,m?h:l}}function to(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,o)=>(...n)=>t(o(...n)))}function F1(...e){return t=>(o,n)=>{let a=t(o,n),i=()=>{throw new Error(le(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=to(...l)(a.dispatch),{...a,dispatch:i}}}function $1(e){return Jo(e)&&"type"in e&&typeof e.type=="string"}var Z1=Symbol.for("immer-nothing"),B1=Symbol.for("immer-draftable"),fe=Symbol.for("immer-state");function Ue(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ve=Object,br=ve.getPrototypeOf,on="constructor",dn="prototype",Za="configurable",nn="enumerable",tn="writable",ro="value",We=e=>!!e&&!!e[fe];function Se(e){return e?Y1(e)||un(e)||!!e[B1]||!!e[on]?.[B1]||pn(e)||mn(e):!1}var L3=ve[dn][on].toString(),H1=new WeakMap;function Y1(e){if(!e||!oi(e))return!1;let t=br(e);if(t===null||t===ve[dn])return!0;let o=ve.hasOwnProperty.call(t,on)&&t[on];if(o===Object)return!0;if(!yr(o))return!1;let n=H1.get(o);return n===void 0&&(n=Function.toString.call(o),H1.set(o,n)),n===L3}function fn(e,t,o=!0){ao(e)===0?(o?Reflect.ownKeys(e):ve.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((n,a)=>t(a,n,e))}function ao(e){let t=e[fe];return t?t.type_:un(e)?1:pn(e)?2:mn(e)?3:0}var ja=(e,t,o=ao(e))=>o===2?e.has(t):ve[dn].hasOwnProperty.call(e,t),Ya=(e,t,o=ao(e))=>o===2?e.get(t):e[t],an=(e,t,o,n=ao(e))=>{n===2?e.set(t,o):n===3?e.add(o):e[t]=o};function A3(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var un=Array.isArray,pn=e=>e instanceof Map,mn=e=>e instanceof Set,oi=e=>typeof e=="object",yr=e=>typeof e=="function",Ka=e=>typeof e=="boolean";function O3(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var et=e=>e.copy_||e.base_;var ni=e=>e.modified_?e.copy_:e.base_;function Xa(e,t){if(pn(e))return new Map(e);if(mn(e))return new Set(e);if(un(e))return Array[dn].slice.call(e);let o=Y1(e);if(t===!0||t==="class_only"&&!o){let n=ve.getOwnPropertyDescriptors(e);delete n[fe];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){let s=a[i],l=n[s];l[tn]===!1&&(l[tn]=!0,l[Za]=!0),(l.get||l.set)&&(n[s]={[Za]:!0,[tn]:!0,[nn]:l[nn],[ro]:e[s]})}return ve.create(br(e),n)}else{let n=br(e);if(n!==null&&o)return{...e};let a=ve.create(n);return ve.assign(a,e)}}function ai(e,t=!1){return hn(e)||We(e)||!Se(e)||(ao(e)>1&&ve.defineProperties(e,{set:en,add:en,clear:en,delete:en}),ve.freeze(e),t&&fn(e,(o,n)=>{ai(n,!0)},!1)),e}function w3(){Ue(2)}var en={[ro]:w3};function hn(e){return e===null||!oi(e)?!0:ve.isFrozen(e)}var sn="MapSet",Qa="Patches",G1="ArrayMethods",X1={};function jt(e){let t=X1[e];return t||Ue(0,e),t}var W1=e=>!!X1[e];var oo,Q1=()=>oo,R3=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:W1(sn)?jt(sn):void 0,arrayMethodsPlugin_:W1(G1)?jt(G1):void 0});function V1(e,t){t&&(e.patchPlugin_=jt(Qa),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ja(e){ei(e),e.drafts_.forEach(_3),e.drafts_=null}function ei(e){e===oo&&(oo=e.parent_)}var j1=e=>oo=R3(oo,e);function _3(e){let t=e[fe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function K1(e,t){t.unfinalizedDrafts_=t.drafts_.length;let o=t.drafts_[0];if(e!==void 0&&e!==o){o[fe].modified_&&(Ja(t),Ue(4)),Se(e)&&(e=q1(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(o[fe].base_,e,t)}else e=q1(t,o);return N3(t,e,!0),Ja(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Z1?e:void 0}function q1(e,t){if(hn(t))return t;let o=t[fe];if(!o)return cn(t,e.handledSet_,e);if(!gn(o,e))return t;if(!o.modified_)return o.base_;if(!o.finalized_){let{callbacks_:n}=o;if(n)for(;n.length>0;)n.pop()(e);t2(o,e)}return o.copy_}function N3(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ai(t,o)}function J1(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var gn=(e,t)=>e.scope_===t,M3=[];function e2(e,t,o,n){let a=et(e),i=e.type_;if(n!==void 0&&Ya(a,n,i)===t){an(a,n,o,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;fn(a,(f,m)=>{if(We(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??M3;for(let l of s)an(a,l,o,i)}function z3(e,t,o){e.callbacks_.push(function(a){let i=t;if(!i||!gn(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=ni(i);e2(e,i.draft_??i,s,o),t2(i,a)})}function t2(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let a=n.getPath(e);a&&n.generatePatches_(e,a,t)}J1(e)}}function k3(e,t,o){let{scope_:n}=e;if(We(o)){let a=o[fe];gn(a,n)&&a.callbacks_.push(function(){rn(e);let s=ni(a);e2(e,o,s,t)})}else Se(o)&&e.callbacks_.push(function(){let i=et(e);e.type_===3?i.has(o)&&cn(o,n.handledSet_,n):Ya(i,t,e.type_)===o&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&cn(Ya(e.copy_,t,e.type_),n.handledSet_,n)})}function cn(e,t,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||We(e)||t.has(e)||!Se(e)||hn(e)||(t.add(e),fn(e,(n,a)=>{if(We(a)){let i=a[fe];if(gn(i,o)){let s=ni(i);an(e,n,s,e.type_),J1(i)}}else Se(a)&&cn(a,t,o)})),e}function I3(e,t){let o=un(e),n={type_:o?1:0,scope_:t?t.scope_:Q1(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=n,i=ln;o&&(a=[n],i=no);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return n.draft_=l,n.revoke_=s,[l,n]}var ln={get(e,t){if(t===fe)return e;let o=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&o?.isArrayOperationMethod(t))return o.createMethodInterceptor(e,t);let a=et(e);if(!ja(a,t,e.type_))return P3(e,a,t);let i=a[t];if(e.finalized_||!Se(i)||n&&e.operationMethod&&o?.isMutatingArrayMethod(e.operationMethod)&&O3(t))return i;if(i===qa(e.base_,t)||T3(e,t,i)){rn(e);let s=e.type_===1?+t:t,l=ri(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in et(e)},ownKeys(e){return Reflect.ownKeys(et(e))},set(e,t,o){let n=r2(et(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){let a=qa(et(e),t),i=a?.[fe];if(i&&i.base_===o)return e.copy_[t]=o,e.assigned_.set(t,!1),!0;if(A3(o,a)&&(o!==void 0||ja(e.base_,t,e.type_)))return!0;rn(e),ti(e)}return e.copy_[t]===o&&(o!==void 0||ja(e.copy_,t,e.type_))||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_.set(t,!0),k3(e,t,o)),!0},deleteProperty(e,t){return rn(e),qa(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),ti(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let o=et(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{[tn]:!0,[Za]:e.type_!==1||t!=="length",[nn]:n[nn],[ro]:o[t]}},defineProperty(){Ue(11)},getPrototypeOf(e){return br(e.base_)},setPrototypeOf(){Ue(12)}},no={};for(let e in ln){let t=ln[e];no[e]=function(){let o=arguments;return o[0]=o[0][0],t.apply(this,o)}}no.deleteProperty=function(e,t){return no.set.call(this,e,t,void 0)};no.set=function(e,t,o){return ln.set.call(this,e[0],t,o,e[0])};function qa(e,t){let o=e[fe];return(o?et(o):e)[t]}function T3(e,t,o){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Se(o)||o[fe]?!1:e.baseRefs_.has(o)}function P3(e,t,o){let n=r2(t,o);return n?ro in n?n[ro]:n.get?.call(e.draft_):void 0}function r2(e,t){if(!(t in e))return;let o=br(e);for(;o;){let n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=br(o)}}function ti(e){e.modified_||(e.modified_=!0,e.parent_&&ti(e.parent_))}function rn(e){e.copy_||(e.assigned_=new Map,e.copy_=Xa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var D3=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,o,n)=>{if(yr(t)&&!yr(o)){let i=o;o=t;let s=this;return function(f=i,...m){return s.produce(f,h=>o.call(this,h,...m))}}yr(o)||Ue(6),n!==void 0&&!yr(n)&&Ue(7);let a;if(Se(t)){let i=j1(this),s=ri(i,t,void 0),l=!0;try{a=o(s),l=!1}finally{l?Ja(i):ei(i)}return V1(i,n),K1(a,i)}else if(!t||!oi(t)){if(a=o(t),a===void 0&&(a=t),a===Z1&&(a=void 0),this.autoFreeze_&&ai(a,!0),n){let i=[],s=[];jt(Qa).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),n(i,s)}return a}else Ue(1,t)},this.produceWithPatches=(t,o)=>{if(yr(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let n,a;return[this.produce(t,o,(s,l)=>{n=s,a=l}),n,a]},Ka(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ka(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ka(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Se(e)||Ue(8),We(e)&&(e=o2(e));let t=j1(this),o=ri(t,e,void 0);return o[fe].isManual_=!0,ei(t),o}finishDraft(e,t){let o=e&&e[fe];(!o||!o.isManual_)&&Ue(9);let{scope_:n}=o;return V1(n,t),K1(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let o;for(o=t.length-1;o>=0;o--){let a=t[o];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}o>-1&&(t=t.slice(o+1));let n=jt(Qa).applyPatches_;return We(e)?n(e,t):this.produce(e,a=>n(a,t))}};function ri(e,t,o,n){let[a,i]=pn(t)?jt(sn).proxyMap_(t,o):mn(t)?jt(sn).proxySet_(t,o):I3(t,o);return(o?.scope_??Q1()).drafts_.push(a),i.callbacks_=o?.callbacks_??[],i.key_=n,o&&n!==void 0?z3(o,i,n):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function o2(e){return We(e)||Ue(10,e),n2(e)}function n2(e){if(!Se(e)||hn(e))return e;let t=e[fe],o,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=Xa(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else o=Xa(e,!0);return fn(o,(a,i)=>{an(o,a,n2(i))},n),t&&(t.finalized_=!1),o}var U3=globalThis.Iterator,pg=typeof U3?.from=="function";var F3=new D3,ii=F3.produce;function a2(e){return({dispatch:o,getState:n})=>a=>i=>typeof i=="function"?i(o,n,e):a(i)}var i2=a2(),s2=a2;var $3=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?to:to.apply(null,arguments)},vg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},B3=e=>e&&typeof e.match=="function";function yt(e,t){function o(...n){if(t){let a=t(...n);if(!a)throw new Error(tt(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:n[0]}}return o.toString=()=>`${e}`,o.type=e,o.match=n=>$1(n)&&n.type===e,o}var u2=class io extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,io.prototype)}static get[Symbol.species](){return io}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new io(...t[0].concat(this)):new io(...t.concat(this))}};function c2(e){return Se(e)?ii(e,()=>{}):e}function yn(e,t,o){return e.has(t)?e.get(t):e.set(t,o(t)).get(t)}function H3(e){return typeof e=="boolean"}var G3=()=>function(t){let{thunk:o=!0,immutableCheck:n=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new u2;return o&&(H3(o)?s.push(i2):s.push(s2(o.extraArgument))),s},W3="RTK_autoBatch";var l2=e=>t=>{setTimeout(t,e)},V3=(e,t)=>o=>{let n=!1,a=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(s),o())},i=e(a),s=setTimeout(a,t)},j3=(e={type:"raf"})=>t=>(...o)=>{let n=t(...o),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?V3(window.requestAnimationFrame,100):l2(10):e.type==="callback"?e.queueNotification:l2(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},n,{subscribe(h){let g=()=>a&&h(),b=n.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[W3],i=!a,i&&(s||(s=!0,f(m))),n.dispatch(h)}finally{a=!0}}})},K3=e=>function(o){let{autoBatch:n=!0}=o??{},a=new u2(e);return n&&a.push(j3(typeof n=="object"?n:void 0)),a};function p2(e){let t=G3(),{reducer:o=void 0,middleware:n,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof o=="function")f=o;else if(Jo(o))f=U1(o);else throw new Error(tt(1));let m;typeof n=="function"?m=n(t):m=t();let h=to;a&&(h=$3({trace:!1,...typeof a=="object"&&a}));let g=F1(...m),b=K3(g),x=typeof l=="function"?l(b):b(),A=h(...x);return Va(f,s,A)}function m2(e){let t={},o=[],n,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(tt(28));if(l in t)throw new Error(tt(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&o.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase(i){return n=i,a}};return e(a),[t,o,n]}function q3(e){return typeof e=="function"}function Z3(e,t){let[o,n,a]=m2(t),i;if(q3(e))i=()=>c2(e());else{let l=c2(e);i=()=>l}function s(l=i(),f){let m=[o[f.type],...n.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return m.filter(h=>!!h).length===0&&(m=[a]),m.reduce((h,g)=>{if(g)if(We(h)){let x=g(h,f);return x===void 0?h:x}else{if(Se(h))return ii(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return h},l)}return s.getInitialState=i,s}var Y3=(e,t)=>B3(e)?e.match(t):e(t);function X3(...e){return t=>e.some(o=>Y3(o,t))}var Q3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",J3=(e=21)=>{let t="",o=e;for(;o--;)t+=Q3[Math.random()*64|0];return t},ep=["name","message","stack","code"],si=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},d2=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},tp=e=>{if(typeof e=="object"&&e!==null){let t={};for(let o of ep)typeof e[o]=="string"&&(t[o]=e[o]);return t}return{message:String(e)}},f2="External signal was aborted",rp=(()=>{function e(t,o,n){let a=yt(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=yt(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=yt(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(n&&n.serializeError||tp)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:!!g,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let x=n?.idGenerator?n.idGenerator(f):J3(),A=new AbortController,w,O;function N(R){O=R,A.abort()}m&&(m.aborted?N(f2):m.addEventListener("abort",()=>N(f2),{once:!0}));let T=(async function(){let R;try{let I=n?.condition?.(f,{getState:g,extra:b});if(np(I)&&(I=await I),I===!1||A.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let G=new Promise((B,W)=>{w=()=>{W({name:"AbortError",message:O||"Aborted"})},A.signal.addEventListener("abort",w,{once:!0})});h(i(x,f,n?.getPendingMeta?.({requestId:x,arg:f},{getState:g,extra:b}))),R=await Promise.race([G,Promise.resolve(o(f,{dispatch:h,getState:g,extra:b,requestId:x,signal:A.signal,abort:N,rejectWithValue:((B,W)=>new si(B,W)),fulfillWithValue:((B,W)=>new d2(B,W))})).then(B=>{if(B instanceof si)throw B;return B instanceof d2?a(B.payload,x,f,B.meta):a(B,x,f)})])}catch(I){R=I instanceof si?s(null,x,f,I.payload,I.meta):s(I,x,f)}finally{w&&A.signal.removeEventListener("abort",w)}return n&&!n.dispatchConditionRejection&&s.match(R)&&R.meta.condition||h(R),R})();return Object.assign(T,{abort:N,requestId:x,arg:f,unwrap(){return T.then(op)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:X3(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function op(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function np(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var h2=Symbol.for("rtk-slice-createasyncthunk"),Cg={[h2]:rp};function ap(e,t){return`${e}/${t}`}function ip({creators:e}={}){let t=e?.asyncThunk?.[h2];return function(n){let{name:a,reducerPath:i=a}=n;if(!a)throw new Error(tt(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(cp()):n.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(R,k){let I=typeof R=="string"?R:R.type;if(!I)throw new Error(tt(12));if(I in f.sliceCaseReducersByType)throw new Error(tt(13));return f.sliceCaseReducersByType[I]=k,m},addMatcher(R,k){return f.sliceMatchers.push({matcher:R,reducer:k}),m},exposeAction(R,k){return f.actionCreators[R]=k,m},exposeCaseReducer(R,k){return f.sliceCaseReducersByName[R]=k,m}};l.forEach(R=>{let k=s[R],I={reducerName:R,type:ap(a,R),createNotation:typeof n.reducers=="function"};dp(k)?up(I,k,m,t):lp(I,k,m)});function h(){let[R={},k=[],I=void 0]=typeof n.extraReducers=="function"?m2(n.extraReducers):[n.extraReducers],G={...R,...f.sliceCaseReducersByType};return Z3(n.initialState,B=>{for(let W in G)B.addCase(W,G[W]);for(let W of f.sliceMatchers)B.addMatcher(W.matcher,W.reducer);for(let W of k)B.addMatcher(W.matcher,W.reducer);I&&B.addDefaultCase(I)})}let g=R=>R,b=new Map,x=new WeakMap,A;function w(R,k){return A||(A=h()),A(R,k)}function O(){return A||(A=h()),A.getInitialState()}function N(R,k=!1){function I(B){let W=B[R];return typeof W>"u"&&k&&(W=yn(x,I,O)),W}function G(B=g){let W=yn(b,k,()=>new WeakMap);return yn(W,B,()=>{let St={};for(let[Ee,Ct]of Object.entries(n.selectors??{}))St[Ee]=sp(Ct,B,()=>yn(x,B,O),k);return St})}return{reducerPath:R,getSelectors:G,get selectors(){return G(I)},selectSlice:I}}let T={name:a,reducer:w,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:O,...N(i),injectInto(R,{reducerPath:k,...I}={}){let G=k??i;return R.inject({reducerPath:G,reducer:w},I),{...T,...N(G,!0)}}};return T}}function sp(e,t,o,n){function a(i,...s){let l=t(i);return typeof l>"u"&&n&&(l=o()),e(l,...s)}return a.unwrapped=e,a}var g2=ip();function cp(){function e(t,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...o}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...o){return t(...o)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:o}},asyncThunk:e}}function lp({type:e,reducerName:t,createNotation:o},n,a){let i,s;if("reducer"in n){if(o&&!fp(n))throw new Error(tt(17));i=n.reducer,s=n.prepare}else i=n;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?yt(e,s):yt(e))}function dp(e){return e._reducerDefinitionType==="asyncThunk"}function fp(e){return e._reducerDefinitionType==="reducerWithPrepare"}function up({type:e,reducerName:t},o,n,a){if(!a)throw new Error(tt(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=o,g=a(e,i,h);n.exposeAction(t,g),s&&n.addCase(g.fulfilled,s),l&&n.addCase(g.pending,l),f&&n.addCase(g.rejected,f),m&&n.addMatcher(g.settled,m),n.exposeCaseReducer(t,{fulfilled:s||bn,pending:l||bn,rejected:f||bn,settled:m||bn})}function bn(){}var y2="listener",b2="completed",x2="cancelled",Eg=`task-${x2}`,Lg=`task-${b2}`,Ag=`${y2}-${x2}`,Og=`${y2}-${b2}`;var{assign:v2}=Object;var ci="listenerMiddleware";var pp=v2(yt(`${ci}/add`),{withTypes:()=>pp}),wg=yt(`${ci}/removeAll`),mp=v2(yt(`${ci}/remove`),{withTypes:()=>mp});function tt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var hp=jo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),xn=class extends hp(Object){};window.ftReduxStores||(window.ftReduxStores={});var S2=class e extends xn{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Xo(i))return i;if(a==null)return;let s=g2({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=p2({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Qr(s.getInitialState());for(let g of m.keeping)h[g]=(f??h)[g];return h}else if(typeof m.type=="string"&&m.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...f,...m.overwrites};return s.reducer(f,m)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new Ko,this.injectInto=(i,s)=>this.reduxSlice.injectInto(i,s),this.selectSlice=i=>this.reduxSlice.selectSlice(i);let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let f=s,m=i[f];return m?(...h)=>{let g=m(...h.map(a));return this.reduxStore.dispatch(g),g}:h=>{let g=f,b=this.getState()[g];mr(b,h)||this.setState({[g]:a(h)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var vn=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var Sn=v(P()),gp="ft-app-info",Kt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Kt.eventName="authentication-change";var so=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};so.eventName="ui-locale-changed";var yp={session:(e,t)=>{(0,Sn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new Kt(t.payload)),0))}},U=Sn.FtReduxStore.get({name:gp,reducers:yp,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var C2=v(P()),Cn=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},oy=(0,C2.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>vn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Cn([(0,li.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Cn([(0,li.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Cn([Ga({store:U.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Cn([Ga({store:U.name})],t.prototype,"uiLocale",void 0),t});var E2;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(E2||(E2={}));var L2;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(L2||(L2={}));var A2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(A2||(A2={}));var O2;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(O2||(O2={}));var w2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(w2||(w2={}));var R2;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(R2||(R2={}));var _2;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(_2||(_2={}));var N2;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(N2||(N2={}));var M2;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(M2||(M2={}));var z2;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(z2||(z2={}));var k2;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(k2||(k2={}));var I2;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(I2||(I2={}));var T2;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(T2||(T2={}));var P2;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(P2||(P2={}));var D2;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(D2||(D2={}));var U2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(U2||(U2={}));var F2;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(F2||(F2={}));var $2;(function(e){e.ASC="ASC",e.DESC="DESC"})($2||($2={}));var B2;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(B2||(B2={}));var H2;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(H2||(H2={}));var G2;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(G2||(G2={}));var W2;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(W2||(W2={}));var V2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(V2||(V2={}));var j2;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(j2||(j2={}));var K2;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(K2||(K2={}));var q2;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(q2||(q2={}));var Z2;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Z2||(Z2={}));var ne;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(ne||(ne={}));var Oe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Oe||(Oe={}));var Y2;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Y2||(Y2={}));var X2;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(X2||(X2={}));var Q2;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Q2||(Q2={}));var J2;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(J2||(J2={}));var e0;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(e0||(e0={}));var t0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(t0||(t0={}));var r0;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(r0||(r0={}));var o0;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(o0||(o0={}));var n0;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(n0||(n0={}));var a0;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(a0||(a0={}));var i0;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(i0||(i0={}));var s0;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(s0||(s0={}));var bp={[ne.PERSONAL_BOOK_SHARE_USER]:[ne.PERSONAL_BOOK_USER],[ne.HTML_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.PDF_EXPORT_USER]:[ne.PERSONAL_BOOK_USER],[ne.KHUB_ADMIN]:[ne.CONTENT_PUBLISHER],[ne.ADMIN]:[ne.KHUB_ADMIN,ne.USERS_ADMIN,ne.PORTAL_ADMIN,ne.BEHAVIOR_DATA_USER],[ne.GENERATIVE_AI_EXPORT_USER]:[ne.GENERATIVE_AI_USER]};function c0(e,t){return e===t||(bp[e]??[]).some(o=>c0(o,t))}function l0(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>c0(n,t))}var wn=v(P());var di=v(P());var qt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var xr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:qt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):qt.await()}};var Ce=class extends xr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[f])=>l.localeCompare(f)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new di.CacheRegistry,this.cache=t?a.commonCache:new di.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var En=class extends Ce{async listMySearches(){let{session:t}=U.getState();return l0(t,ne.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Ln=class extends Ce{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var An=class extends Ce{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var On=class extends Ce{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var xp="ft-user-assets",vp={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Oe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;ui(e,o,[...fi(e,o),a]),d0(e,o,1,n),f0(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ui(e,o,fi(e,o).map(a=>a.id===n.id?n:a)),f0(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;ui(e,o,fi(e,o).filter(i=>i.id!==a)),d0(e,o,-1,n)}},u0={[Oe.SEARCHES]:"savedSearches",[Oe.BOOKMARKS]:"bookmarks",[Oe.BOOKS]:void 0,[Oe.COLLECTIONS]:void 0},fi=(e,t)=>{var o;let n=u0[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ui=(e,t,o)=>{let n=u0[t];n&&(e[n]=o)},d0=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Oe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},f0=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},pe=wn.FtReduxStore.get({name:xp,reducers:vp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Oe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),pi=class{constructor(t=new An,o=new On){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ln,this.savedSearchesService=new En,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=U.getState();(0,wn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),pe.actions.clearAssetCount(),pe.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),pe.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),pe.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();pe.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();pe.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&pe.getState().assetCounts.allAsset[t]!==o.count&&pe.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&pe.getState().assetCounts.bookmarkByMap[t]!==o.count&&pe.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(pe.getState().assetCounts.bookmarkByMap).length!==0;t===Oe.BOOKMARKS&&o&&pe.actions.clearBookmarkCountByMap(),pe.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;pe.actions.bookmarks(o)}}},Sp=new pi;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Sp);var mi=class{addCommand(t,o=!1){U.commands.add(t,o)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new mi;var we=v(P());var p0,vr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Cp=Symbol("clearAfterUnitTest"),Rn=class extends(0,we.withEventBus)(Ce){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[p0]=()=>{this.defaultMessages={},this.cache=new we.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,we.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new we.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof we.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new vr({loadedContexts:t})),this.dispatchEvent(new vr({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new vr({loadedContexts:[t]})),this.dispatchEvent(new vr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,we.delay)(0).then(()=>n()).catch(()=>null)))}};p0=Cp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Rn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Rn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Sr=window.FluidTopicsI18nService,_n=window.FluidTopicsCustomI18nService;var m0=v(P()),hi=class{highlightHtml(t,o,n){(0,m0.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new hi;var h0=v(P());var gi=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=U.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return h0.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new gi;var g0=v(P());var co=class{static get(t,o){var n,a,i,s;let l=U.getState(),{lang:f,region:m}=(i=(a=(n=l.localesConfiguration)===null||n===void 0?void 0:n.defaultLocales)===null||a===void 0?void 0:a.defaultContentLocale)!==null&&i!==void 0?i:{lang:"en",region:"US"};return new g0.SearchPlaceConverter(l.baseUrl,t??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,o??`${f}-${m}`)}};var yi=class{urlToSearchRequest(t){return co.get().parse(t)}searchRequestToUrl(t){return co.get().serialize(t)}};window.FluidTopicsUrlService=new yi;var rt=v(P());var Zt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Zt.eventName="before-location-change";var Yt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Yt.eventName="change";var bi=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},y0=new bi;var Nn=class e extends rt.WithEventBus{static build(){return new e(window.history,y0,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,rt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Yt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let f=new Zt(new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin));this.dispatchEvent(f);let m=o(),h={...m===this.currentIndex?this.currentState:void 0,...i,index:m,href:f.detail.nextLocation.href};n.apply(a,[h,s,h.href]),this.setCurrentState(h,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addBeforeLocationChangeListener(t){this.addEventListener(Zt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Zt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Yt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Yt.eventName,t)}currentItem(){return(0,rt.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,rt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,rt.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,rt.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Nn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e),addBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(e),removeBeforeLocationChangeListener:e=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(e)});var b0=v(H());var x0=b0.css`
|
|
1963
1963
|
`;var C0=v(H()),me=v(ae()),Jt=v(P());var Xt=v(P());function v0(e,t){let{authenticationRequired:o,session:n}=U.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var Mn=class extends xr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var xi=class e extends Xt.FtStateManager{static build(t){return new e(U,t)}constructor(t,o){super(),this.store=t,this.cache=new Xt.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Mn,this.cleanSessionDebouncer=new Xt.Debouncer,this.reloadConfiguration=()=>{var n;(n=this.cache)===null||n===void 0||n.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Xt.Debouncer(500),this.apiProvider=o??(()=>qt.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(Kt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(Kt.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 t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>v0(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}setStickyFilters(t){this.store.actions.stickyFilters(t)}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,o){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:o}).then(n=>{n.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new so(n)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setNoCustomCode(t){this.store.actions.noCustomCode(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},S0=xi.build();var Qt=class extends Event{constructor(t,o,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=a??!1}};var lo=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Qt(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(o);i===void 0&&a.callbacks.set(o,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var ie=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},q=class extends Jt.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=S0,this.contextRoot=new lo}render(){return C0.html`
|
|
1964
1964
|
<slot></slot>
|
|
1965
1965
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>Sr.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};q.elementDefinitions={};q.styles=x0;ie([(0,me.property)()],q.prototype,"baseUrl",void 0);ie([(0,me.property)()],q.prototype,"tenantId",void 0);ie([(0,me.property)()],q.prototype,"apiIntegrationIdentifier",void 0);ie([(0,me.property)()],q.prototype,"apiIntegrationAppVersion",void 0);ie([(0,me.property)()],q.prototype,"uiLocale",void 0);ie([(0,Jt.jsonProperty)(null)],q.prototype,"availableUiLocales",void 0);ie([(0,Jt.jsonProperty)(null)],q.prototype,"metadataConfiguration",void 0);ie([(0,me.property)({type:Boolean})],q.prototype,"editorMode",void 0);ie([(0,me.property)({type:Boolean})],q.prototype,"noCustom",void 0);ie([(0,me.property)({type:Boolean})],q.prototype,"openExternalDocumentInNewTab",void 0);ie([(0,me.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],q.prototype,"noCustomComponent",void 0);ie([(0,me.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],q.prototype,"noCustomCode",void 0);ie([(0,me.property)({type:Boolean})],q.prototype,"withManualResources",void 0);ie([(0,me.property)({type:Boolean})],q.prototype,"navigatorOnline",void 0);ie([(0,me.property)({type:Boolean})],q.prototype,"forcedOffline",void 0);ie([(0,me.property)({type:Boolean})],q.prototype,"authenticationRequired",void 0);ie([(0,Jt.jsonProperty)([])],q.prototype,"messageContexts",void 0);ie([(0,Jt.jsonProperty)(void 0)],q.prototype,"session",void 0);var L0=v(P());var E0={"ft-app-context":q};(0,L0.customElements)(E0);var A0=v(ae());var vi=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Cr=new vi;var Ap=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},uo=Symbol("i18nAttributes"),O0=Symbol("i18nListAttributes"),w0=Symbol("i18nProperties"),zn=Symbol("i18nContexts"),fo=Symbol("i18nUnsubs"),Tn=(0,Er.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?_n:Sr}i18n(i){let{context:s,key:l,message:f}=i,{custom:m,args:h,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,m);let b=h??(g?g(this):[]);return this.getI18nService(m).resolveMessage(s,l,...b)}return f}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Cr.isI18nKey(i)){let[l,f]=i.split(".");return this.i18n({custom:!0,context:l,key:f,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,f)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,f)=>{var m;return((m=f?.context)===null||m===void 0?void 0:m.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let f=this,m=(h,g,b)=>b?.context&&b.key&&i(h,g,b)?{...b,message:this.i18n({context:b.context,key:b.key,custom:b.custom,...h})}:b;(s=this[uo])===null||s===void 0||s.forEach((h,g)=>f[g]=m(h,g,f[g])),(l=this[O0])===null||l===void 0||l.forEach((h,g)=>{var b;return f[g]=(b=f[g])===null||b===void 0?void 0:b.map(x=>m(h,g,x))})}updateI18nProperties(i){var s;(s=this[w0])===null||s===void 0||s.forEach((l,f)=>{i(l,f)&&(this[f]=this.i18n(l))})}addI18nMessages(i,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(i,s,l)}addI18nContext(i,s,l){let f=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[zn].set(f,{isCustomContext:l}),this[fo].has(f)||this[fo].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[zn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[zn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[fo].forEach(i=>i()),this[fo].clear()}}return t=zn,o=fo,Ap([(0,A0.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),kn=class extends Tn(Er.FtLitElement){},In=class extends Tn(Er.FtLitElementRedux){};var R0=v(P());var Si=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?Cr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},Op=new Si;var _0=(e,t)=>(o,n)=>{var a;o.constructor.createProperty(n,{type:Object,hasChanged:R0.hasChanged,converter:Cr,...t}),o[uo]=(a=o[uo])!==null&&a!==void 0?a:new Map,o[uo].set(n,e??{})};var Pn=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?_n:Sr}constructor(t,o=!1){this.name=t,this.custom=o,this.properties=new Proxy({},{get:(n,a)=>{let i=a;return s=>({context:this.name,key:i,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(n,a)=>(...i)=>this.service.resolveMessage(this.name,a,...i)}),this.rawMessages=new Proxy({},{get:(n,a)=>this.service.resolveRawMessage(this.name,a)}),this.keys=new Proxy({},{get:(n,a)=>()=>a}),this.attributes=new Proxy({},{get:(n,a)=>()=>({context:this.name,key:a,message:this.service.resolveRawMessage(this.name,a)})})}};var N0=v(H());var M0=N0.css`
|