@fluid-topics/ftds-file-button 2.2.40 → 2.2.41
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.
|
@@ -831,7 +831,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
831
831
|
position: relative;
|
|
832
832
|
word-break: break-word;
|
|
833
833
|
}
|
|
834
|
-
`;var Rs=["top","right","bottom","left"],Os=["start","end"],Mo=Rs.reduce((e,t)=>e.concat(t,t+"-"+Os[0],t+"-"+Os[1]),[]),xr=Math.min,Xe=Math.max,vr=Math.round;var we=e=>({x:e,y:e}),I4={left:"right",right:"left",bottom:"top",top:"bottom"};function _s(e,t,n){return Xe(e,xr(t,n))}function rn(e,t){return typeof e=="function"?e(t):e}function Sr(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function zo(e){return e==="x"?"y":"x"}function ko(e){return e==="y"?"height":"width"}function nn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Io(e){return zo(nn(e))}function ws(e,t,n){n===void 0&&(n=!1);let o=Qe(e),a=Io(e),i=ko(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=No(s)),[s,No(s)]}function Ns(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function No(e){let t=Sr(e);return I4[t]+e.slice(t.length)}function T4(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function Ms(e){return typeof e!="number"?T4(e):{top:e,right:e,bottom:e,left:e}}function Ct(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function zs(e,t,n){let{reference:o,floating:a}=e,i=nn(t),s=Io(t),l=ko(s),f=Sr(t),m=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,x;switch(f){case"top":x={x:h,y:o.y-a.height};break;case"bottom":x={x:h,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:g};break;case"left":x={x:o.x-a.width,y:g};break;default:x={x:o.x,y:o.y}}let L=Qe(t);return L&&(x[s]+=b*(L==="end"?1:-1)*(n&&m?-1:1)),x}async function ks(e,t){var n;t===void 0&&(t={});let{x:o,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}=rn(t,e),L=Ms(x),O=l[b?g==="floating"?"reference":"floating":g],N=Ct(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(O)))==null||n?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),I=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),M=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},D=Ct(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:I,offsetParent:_,strategy:f}):I);return{top:(N.top-D.top+L.top)/M.y,bottom:(D.bottom-N.bottom+L.bottom)/M.y,left:(N.left-D.left+L.left)/M.x,right:(D.right-N.right+L.right)/M.x}}var P4=50,Is=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:ks},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=zs(m,o,f),b=o,x=0,L={};for(let R=0;R<i.length;R++){let O=i[R];if(!O)continue;let{name:N,fn:I}=O,{x:_,y:M,data:D,reset:U}=await I({x:h,y:g,initialPlacement:o,placement:b,strategy:a,middlewareData:L,rects:m,platform:l,elements:{reference:e,floating:t}});h=_??h,g=M??g,L[N]={...L[N],...D},U&&x<P4&&(x++,typeof U=="object"&&(U.placement&&(b=U.placement),U.rects&&(m=U.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):U.rects),{x:h,y:g}=zs(m,b,f)),R=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:L}};function D4(e,t,n){return(e?[...n.filter(a=>Qe(a)===e),...n.filter(a=>Qe(a)!==e)]:n.filter(a=>Sr(a)===a)).filter(a=>e?Qe(a)===e||(t?Ns(a)!==a:!1):!0)}var Ts=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=Mo,autoAlignment:x=!0,...L}=rn(e,t),R=g!==void 0||b===Mo?D4(g||null,x,b):b,O=((n=s.autoPlacement)==null?void 0:n.index)||0,N=R[O];if(N==null)return{};if(l!==N)return{reset:{placement:R[0]}};let I=await f.detectOverflow(t,L),_=ws(N,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),M=[I[Sr(N)],I[_[0]],I[_[1]]],D=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:M}],U=R[O+1];if(U)return{data:{index:O+1,overflows:D},reset:{placement:U}};let V=D.map(me=>{let dr=Qe(me.placement);return[me.placement,dr&&h?me.overflows.slice(0,2).reduce((x4,v4)=>x4+v4,0):me.overflows[0],me.overflows]}).sort((me,dr)=>me[1]-dr[1]),Dt=((a=V.filter(me=>me[2].slice(0,Qe(me[0])?2:3).every(dr=>dr<=0))[0])==null?void 0:a[0])||V[0][0];return Dt!==l?{data:{index:O+1,overflows:D},reset:{placement:Dt}}:{}}}};var Ps=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:I=>{let{x:_,y:M}=I;return{x:_,y:M}}},...m}=rn(e,t),h={x:n,y:o},g=await i.detectOverflow(t,m),b=nn(a),x=zo(b),L=h[x],R=h[b],O=(I,_)=>_s(_+g[I==="y"?"top":"left"],_,_-g[I==="y"?"bottom":"right"]);s&&(L=O(x,L)),l&&(R=O(b,R));let N=f.fn({...t,[x]:L,[b]:R});return{...N,data:{x:N.x-n,y:N.y-o,enabled:{[x]:s,[b]:l}}}}}};function an(){return typeof window<"u"}function At(e){return Us(e)?(e.nodeName||"").toLowerCase():"#document"}function ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(Us(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Us(e){return an()?e instanceof Node||e instanceof ce(e).Node:!1}function Ee(e){return an()?e instanceof Element||e instanceof ce(e).Element:!1}function Be(e){return an()?e instanceof HTMLElement||e instanceof ce(e).HTMLElement:!1}function Ds(e){return!an()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ce(e).ShadowRoot}function Cr(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function Fs(e){return/^(table|td|th)$/.test(At(e))}function Er(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var U4=/transform|translate|scale|rotate|perspective|filter/,F4=/paint|layout|strict|content/,Et=e=>!!e&&e!=="none",To;function Vt(e){let t=Ee(e)?Ae(e):e;return Et(t.transform)||Et(t.translate)||Et(t.scale)||Et(t.rotate)||Et(t.perspective)||!sn()&&(Et(t.backdropFilter)||Et(t.filter))||U4.test(t.willChange||"")||F4.test(t.contain||"")}function Bs(e){let t=Je(e);for(;Be(t)&&!jt(t);){if(Vt(t))return t;if(Er(t))return null;t=Je(t)}return null}function sn(){return To==null&&(To=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),To}function jt(e){return/^(html|body|#document)$/.test(At(e))}function Ae(e){return ce(e).getComputedStyle(e)}function Ar(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(At(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||Fe(e);return Ds(t)?t.host:t}function $s(e){let t=Je(e);return jt(t)?(e.ownerDocument||e).body:Be(t)&&Cr(t)?t:$s(t)}function on(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=$s(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=ce(a);if(i){let l=cn(s);return t.concat(s,s.visualViewport||[],Cr(a)?a:[],l&&n?on(l):[])}else return t.concat(a,on(a,[],n))}function cn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ws(e){let t=Ae(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=Be(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=vr(n)!==i||vr(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function Vs(e){return Ee(e)?e:e.contextElement}function Kt(e){let t=Vs(e);if(!Be(t))return we(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=Ws(t),s=(i?vr(n.width):n.width)/o,l=(i?vr(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var B4=we(0);function js(e){let t=ce(e);return!sn()||!t.visualViewport?B4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $4(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ce(e)}function Lr(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=Vs(e),s=we(1);t&&(o?Ee(o)&&(s=Kt(o)):s=Kt(e));let l=$4(i,n,o)?js(i):we(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&&o){let b=ce(i),x=Ee(o)?ce(o):o,L=b,R=cn(L);for(;R&&x!==L;){let O=Kt(R),N=R.getBoundingClientRect(),I=Ae(R),_=N.left+(R.clientLeft+parseFloat(I.paddingLeft))*O.x,M=N.top+(R.clientTop+parseFloat(I.paddingTop))*O.y;f*=O.x,m*=O.y,h*=O.x,g*=O.y,f+=_,m+=M,L=ce(R),R=cn(L)}}return Ct({width:h,height:g,x:f,y:m})}function ln(e,t){let n=Ar(e).scrollLeft;return t?t.left+n:Lr(Fe(e)).left+n}function Ks(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-ln(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function G4(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=Fe(o),l=t?Er(t.floating):!1;if(o===s||l&&i)return n;let f={scrollLeft:0,scrollTop:0},m=we(1),h=we(0),g=Be(o);if((g||!i)&&((At(o)!=="body"||Cr(s))&&(f=Ar(o)),g)){let x=Lr(o);m=Kt(o),h.x=x.x+o.clientLeft,h.y=x.y+o.clientTop}let b=s&&!g&&!i?Ks(s,f):we(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:n.y*m.y-f.scrollTop*m.y+h.y+b.y}}function H4(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function W4(e){let t=Ar(e),n=e.ownerDocument.body,o=Xe(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Xe(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+ln(e),s=-t.scrollTop;return Ae(n).direction==="rtl"&&(i+=Xe(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var V4=25;function j4(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=ce(e),i=Fe(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!sn()||t==="fixed";o?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(ln(i)<=0){let b=i.ownerDocument,x=b.body,L=getComputedStyle(x),R=b.compatMode==="CSS1Compat"&&parseFloat(L.marginLeft)+parseFloat(L.marginRight)||0,O=Math.abs(i.clientWidth-x.clientWidth-R),N=getComputedStyle(i).scrollbarGutter==="stable both-edges"?O/2:O;N<=V4&&(l-=N)}return{width:l,height:f,x:m,y:h}}function K4(e,t){let n=Lr(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=Kt(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=o*i.y;return{width:s,height:l,x:f,y:m}}function Gs(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=j4(e,n,t);else if(t==="document")o=W4(Fe(e));else if(Ee(t))o=K4(t,n);else{let a=js(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ct(o)}function Z4(e,t){let n=t.get(e);if(n)return n;let o=on(e,[],!1).filter(l=>Ee(l)&&At(l)!=="body"),a=null,i=Ae(e).position==="fixed",s=i?Je(e):e;for(;Ee(s)&&!jt(s);){let l=Ae(s),f=Vt(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?o=o.filter(g=>g!==s):a=l,s=Je(s)}return t.set(e,o),o}function q4(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?Er(t)?[]:Z4(t,this._c):[].concat(n),o],l=Gs(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=Gs(t,s[b],a);f=Xe(x.top,f),m=xr(x.right,m),h=xr(x.bottom,h),g=Xe(x.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function Y4(e){let{width:t,height:n}=Ws(e);return{width:t,height:n}}function X4(e,t,n){let o=Be(t),a=Fe(t),i=n==="fixed",s=Lr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=we(0);if((o||!i)&&((At(t)!=="body"||Cr(a))&&(l=Ar(t)),o)){let b=Lr(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!o&&a&&(f.x=ln(a));let m=a&&!o&&!i?Ks(a,l):we(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 Po(e){return Ae(e).position==="static"}function Hs(e,t){if(!Be(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function Zs(e,t){let n=ce(e);if(Er(e))return n;if(!Be(e)){let a=Je(e);for(;a&&!jt(a);){if(Ee(a)&&!Po(a))return a;a=Je(a)}return n}let o=Hs(e,t);for(;o&&Fs(o)&&Po(o);)o=Hs(o,t);return o&&jt(o)&&Po(o)&&!Vt(o)?n:o||Bs(e)||n}var Q4=async function(e){let t=this.getOffsetParent||Zs,n=this.getDimensions,o=await n(e.floating);return{reference:X4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function J4(e){return Ae(e).direction==="rtl"}var dn={convertOffsetParentRelativeRectToViewportRelativeRect:G4,getDocumentElement:Fe,getClippingRect:q4,getOffsetParent:Zs,getElementRects:Q4,getClientRects:H4,getDimensions:Y4,getScale:Kt,isElement:Ee,isRTL:J4};var qs=Ts,Ys=Ps;var Xs=(e,t,n)=>{let o=new Map,a=n??{},i={...dn,...a.platform,_c:o};return Is(e,t,{...a,platform:i})};function Qs(e){return e0(e)}function Do(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function e0(e){for(let t=e;t;t=Do(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Do(e);t;t=Do(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||Vt(n)||t.tagName==="BODY"))return t}return null}async function Js(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},Xs(e,t,{strategy:o.strategy,platform:{...dn,getOffsetParent:a=>dn.getOffsetParent(a,Qs)},middleware:[Ys({crossAxis:!0}),qs({allowedPlacements:[o.placement]})]})}var rr=E(P());var aa=E(oe());var ec=E(oe(),1);var Uo=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},t0=e=>({fromAttribute:t=>{if(t==null)return Or(e);try{return JSON.parse(t)}catch{return Or(e)}},toAttribute:t=>JSON.stringify(t)});function tc(e,t){return(0,ec.property)({type:Object,converter:t0(e),hasChanged:Rr,...t??{}})}function r0(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!Zt(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!Zt(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[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(n=i.length,n!==a(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){let s=i[o];if(!Zt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Zt(e,t){try{return r0(e,t)}catch{return!1}}function Rr(e,t){return!Zt(e,t)}function Or(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function fn(e,t){let n=o=>o[e]===!0;return o=>{if(n(o))return o;let a=t(o);return a[e]=!0,a}}var rc=E(oe(),1);var Fo=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:Rr,attribute:!1,...t};(0,rc.property)(i)(n,o);let s=n.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[o]),store:t.store})}};var un=class{constructor(){this.queue=[]}add(t,n=!1){n&&this.clear(t.type),this.queue.push(t)}consume(t){let n=this.queue.find(o=>o.type===t);return n&&(this.queue=this.queue.filter(o=>o!==n)),n}clear(t){typeof t=="string"?this.queue=this.queue.filter(n=>n.type!==t):this.queue=this.queue.filter(n=>!t.test(n.type))}};var Lt=E(oe(),1);var pn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,n){return this.callbacks=[t],this.debounce(n)}queue(t,n){return this.callbacks.push(t),this.debounce(n)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((n,o)=>{this.resolvePromise=n,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,n;let o=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(n=this.resolvePromise)!==null&&n!==void 0?n:(()=>null);this.clearPromise();for(let s of o)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var hn=E(j(),1);var mn=class extends hn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let n={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(n);return(0,hn.adoptStyles)(o,t.elementStyles),o}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([n,o])=>this.defineScopedElement(n,o))}static defineScopedElement(t,n){Uo(t)(n),this.canDefineScopedElement(t)&&this.registry.define(t,n)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,n){this.scopedRegistryConstructor.defineScopedElement(t,n)}};function nc(e,t,...n){var o;let a=e.querySelector(t);for(let i of n)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var Yt=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},sc,oc=Symbol("constructorPrototype"),ac=Symbol("constructorName"),cc=Symbol("exportpartsDebouncer"),ic=Symbol("dynamicDependenciesLoaded"),qt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};qt.eventName="exportparts-updated";var Ne=class extends mn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[sc]=new pn(5),this.scheduleExportpartsUpdate=()=>{var t,n,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)!==null&&o!==void 0&&o)&&this[cc].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[ac]=this.constructor.name,this[oc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ac]&&Object.setPrototypeOf(this,this[oc])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let n=this.constructor;n[ic]||(n[ic]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(qt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(qt.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 qt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:n,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];n=nc(this.shadowRoot,...i)}n?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||n?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var n,o,a;if(((o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).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 n,o,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(i=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let x=(s=(o=b.getAttribute("part"))===null||o===void 0?void 0:o.split(" "))!==null&&s!==void 0?s:[],L=(l=(a=b.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],R=[...x,...L].filter(f).map(O=>O.trim());for(let O of R)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(", ")}};sc=cc;Yt([(0,Lt.property)()],Ne.prototype,"exportpartsPrefix",void 0);Yt([tc([])],Ne.prototype,"exportpartsPrefixes",void 0);Yt([(0,Lt.property)({reflect:!0})],Ne.prototype,"exportparts",void 0);Yt([(0,Lt.property)()],Ne.prototype,"customStylesheet",void 0);Yt([(0,Lt.property)()],Ne.prototype,"elementToFocus",void 0);Yt([(0,Lt.state)()],Ne.prototype,"useAdoptedStyleSheets",void 0);function gn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var _r=Symbol("internalReduxEventsUnsubscribers"),et=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),n0=fn(Symbol("withRedux"),function(e){var t,n,o;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[n]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ot].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Ot].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ot].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ot].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let 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[et].has(s.store):this[et].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f,m;this[et].set(s,l.subscribe(()=>this.updateFromStores())),this[_r].set(s,[]),gn(l)&&(!((f=l.deprecatedKeys)===null||f===void 0)&&f.length&&this.reduxConstructor.reduxProperties.forEach((h,g)=>{this.getStore(h.store)===l&&l.deprecatedKeys.includes(g)&&console.warn("Element",this,"is subscribed to deprecated key",g,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((h,g)=>{if(typeof this[g]=="function"&&(!h.store||l.name===h.store)){let b=x=>this[g](x);l.addEventListener(h.eventName,b),this[_r].get(s).push(()=>l.removeEventListener(h.eventName,b))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[et].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[et].has(s)&&this[et].get(s)(),this[et].delete(s),(l=this[_r].get(s))===null||l===void 0||l.forEach(f=>f()),this[_r].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=et,n=Ot,o=_r,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),lc=class extends n0(Ne){};function te(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 o0=typeof Symbol=="function"&&Symbol.observable||"@@observable",dc=o0,Bo=()=>Math.random().toString(36).substring(7).split("").join("."),a0={INIT:`@@redux/INIT${Bo()}`,REPLACE:`@@redux/REPLACE${Bo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bo()}`},yn=a0;function bn(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 $o(e,t,n){if(typeof e!="function")throw new Error(te(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(te(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(te(1));return n($o)(e,t)}let o=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(te(3));return a}function g(O){if(typeof O!="function")throw new Error(te(4));if(f)throw new Error(te(5));let N=!0;m();let I=l++;return s.set(I,O),function(){if(N){if(f)throw new Error(te(6));N=!1,m(),s.delete(I),i=null}}}function b(O){if(!bn(O))throw new Error(te(7));if(typeof O.type>"u")throw new Error(te(8));if(typeof O.type!="string")throw new Error(te(17));if(f)throw new Error(te(9));try{f=!0,a=o(a,O)}finally{f=!1}return(i=s).forEach(I=>{I()}),O}function x(O){if(typeof O!="function")throw new Error(te(10));o=O,b({type:yn.REPLACE})}function L(){let O=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(te(11));function I(){let M=N;M.next&&M.next(h())}return I(),{unsubscribe:O(I)}},[dc](){return this}}}return b({type:yn.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:x,[dc]:L}}function i0(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:yn.INIT})>"u")throw new Error(te(12));if(typeof n(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(te(13))})}function Go(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(n[l]=e[l])}let o=Object.keys(n),a,i;try{i0(n)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<o.length;g++){let b=o[g],x=n[b],L=l[b],R=x(L,f);if(typeof R>"u"){let O=f&&f.type;throw new Error(te(14))}h[b]=R,m=m||R!==L}return m=m||o.length!==Object.keys(l).length,m?h:l}}function wr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function fc(...e){return t=>(n,o)=>{let a=t(n,o),i=()=>{throw new Error(te(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=wr(...l)(a.dispatch),{...a,dispatch:i}}}function uc(e){return bn(e)&&"type"in e&&typeof e.type=="string"}var Sc=Symbol.for("immer-nothing"),pc=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function Le(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var de=Object,Qt=de.getPrototypeOf,Cn="constructor",_n="prototype",jo="configurable",En="enumerable",vn="writable",Nr="value",Me=e=>!!e&&!!e[ne];function fe(e){return e?Cc(e)||Nn(e)||!!e[pc]||!!e[Cn]?.[pc]||Mn(e)||Ir(e):!1}var s0=de[_n][Cn].toString(),mc=new WeakMap;function Cc(e){if(!e||!ea(e))return!1;let t=Qt(e);if(t===null||t===de[_n])return!0;let n=de.hasOwnProperty.call(t,Cn)&&t[Cn];if(n===Object)return!0;if(!Xt(n))return!1;let o=mc.get(n);return o===void 0&&(o=Function.toString.call(n),mc.set(n,o)),o===s0}function wn(e,t,n=!0){kr(e)===0?(n?Reflect.ownKeys(e):de.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((o,a)=>t(a,o,e))}function kr(e){let t=e[ne];return t?t.type_:Nn(e)?1:Mn(e)?2:Ir(e)?3:0}var Ho=(e,t,n=kr(e))=>n===2?e.has(t):de[_n].hasOwnProperty.call(e,t),Ko=(e,t,n=kr(e))=>n===2?e.get(t):e[t],An=(e,t,n,o=kr(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function c0(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Nn=Array.isArray,Mn=e=>e instanceof Map,Ir=e=>e instanceof Set,ea=e=>typeof e=="object",Xt=e=>typeof e=="function",Wo=e=>typeof e=="boolean";function l0(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var $e=e=>e.copy_||e.base_;var ta=e=>e.modified_?e.copy_:e.base_;function Zo(e,t){if(Mn(e))return new Map(e);if(Ir(e))return new Set(e);if(Nn(e))return Array[_n].slice.call(e);let n=Cc(e);if(t===!0||t==="class_only"&&!n){let o=de.getOwnPropertyDescriptors(e);delete o[ne];let a=Reflect.ownKeys(o);for(let i=0;i<a.length;i++){let s=a[i],l=o[s];l[vn]===!1&&(l[vn]=!0,l[jo]=!0),(l.get||l.set)&&(o[s]={[jo]:!0,[vn]:!0,[En]:l[En],[Nr]:e[s]})}return de.create(Qt(e),o)}else{let o=Qt(e);if(o!==null&&n)return{...e};let a=de.create(o);return de.assign(a,e)}}function zn(e,t=!1){return kn(e)||Me(e)||!fe(e)||(kr(e)>1&&de.defineProperties(e,{set:xn,add:xn,clear:xn,delete:xn}),de.freeze(e),t&&wn(e,(n,o)=>{zn(o,!0)},!1)),e}function d0(){Le(2)}var xn={[Nr]:d0};function kn(e){return e===null||!ea(e)?!0:de.isFrozen(e)}var Ln="MapSet",qo="Patches",hc="ArrayMethods",Ec={};function Rt(e){let t=Ec[e];return t||Le(0,e),t}var gc=e=>!!Ec[e];var Mr,Ac=()=>Mr,f0=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gc(Ln)?Rt(Ln):void 0,arrayMethodsPlugin_:gc(hc)?Rt(hc):void 0});function yc(e,t){t&&(e.patchPlugin_=Rt(qo),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yo(e){Xo(e),e.drafts_.forEach(u0),e.drafts_=null}function Xo(e){e===Mr&&(Mr=e.parent_)}var bc=e=>Mr=f0(Mr,e);function u0(e){let t=e[ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ne].modified_&&(Yo(t),Le(4)),fe(e)&&(e=vc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[ne].base_,e,t)}else e=vc(t,n);return p0(t,e,!0),Yo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Sc?e:void 0}function vc(e,t){if(kn(t))return t;let n=t[ne];if(!n)return On(t,e.handledSet_,e);if(!In(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);Rc(n,e)}return n.copy_}function p0(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,n)}function Lc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var In=(e,t)=>e.scope_===t,m0=[];function Oc(e,t,n,o){let a=$e(e),i=e.type_;if(o!==void 0&&Ko(a,o,i)===t){An(a,o,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;wn(a,(f,m)=>{if(Me(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??m0;for(let l of s)An(a,l,n,i)}function h0(e,t,n){e.callbacks_.push(function(a){let i=t;if(!i||!In(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=ta(i);Oc(e,i.draft_??i,s,n),Rc(i,a)})}function Rc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:o}=t;if(o){let a=o.getPath(e);a&&o.generatePatches_(e,a,t)}Lc(e)}}function g0(e,t,n){let{scope_:o}=e;if(Me(n)){let a=n[ne];In(a,o)&&a.callbacks_.push(function(){Sn(e);let s=ta(a);Oc(e,n,s,t)})}else fe(n)&&e.callbacks_.push(function(){let i=$e(e);e.type_===3?i.has(n)&&On(n,o.handledSet_,o):Ko(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&On(Ko(e.copy_,t,e.type_),o.handledSet_,o)})}function On(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Me(e)||t.has(e)||!fe(e)||kn(e)||(t.add(e),wn(e,(o,a)=>{if(Me(a)){let i=a[ne];if(In(i,n)){let s=ta(i);An(e,o,s,e.type_),Lc(i)}}else fe(a)&&On(a,t,n)})),e}function y0(e,t){let n=Nn(e),o={type_:n?1:0,scope_:t?t.scope_:Ac(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=o,i=Rn;n&&(a=[o],i=zr);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,[l,o]}var Rn={get(e,t){if(t===ne)return e;let n=e.scope_.arrayMethodsPlugin_,o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=$e(e);if(!Ho(a,t,e.type_))return x0(e,a,t);let i=a[t];if(e.finalized_||!fe(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&l0(t))return i;if(i===Vo(e.base_,t)||b0(e,t,i)){Sn(e);let s=e.type_===1?+t:t,l=Jo(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in $e(e)},ownKeys(e){return Reflect.ownKeys($e(e))},set(e,t,n){let o=_c($e(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){let a=Vo($e(e),t),i=a?.[ne];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(c0(n,a)&&(n!==void 0||Ho(e.base_,t,e.type_)))return!0;Sn(e),Qo(e)}return e.copy_[t]===n&&(n!==void 0||Ho(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),g0(e,t,n)),!0},deleteProperty(e,t){return Sn(e),Vo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Qo(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=$e(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[vn]:!0,[jo]:e.type_!==1||t!=="length",[En]:o[En],[Nr]:n[t]}},defineProperty(){Le(11)},getPrototypeOf(e){return Qt(e.base_)},setPrototypeOf(){Le(12)}},zr={};for(let e in Rn){let t=Rn[e];zr[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}zr.deleteProperty=function(e,t){return zr.set.call(this,e,t,void 0)};zr.set=function(e,t,n){return Rn.set.call(this,e[0],t,n,e[0])};function Vo(e,t){let n=e[ne];return(n?$e(n):e)[t]}function b0(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!fe(n)||n[ne]?!1:e.baseRefs_.has(n)}function x0(e,t,n){let o=_c(t,n);return o?Nr in o?o[Nr]:o.get?.call(e.draft_):void 0}function _c(e,t){if(!(t in e))return;let n=Qt(e);for(;n;){let o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Qt(n)}}function Qo(e){e.modified_||(e.modified_=!0,e.parent_&&Qo(e.parent_))}function Sn(e){e.copy_||(e.assigned_=new Map,e.copy_=Zo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var v0=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(Xt(t)&&!Xt(n)){let i=n;n=t;let s=this;return function(f=i,...m){return s.produce(f,h=>n.call(this,h,...m))}}Xt(n)||Le(6),o!==void 0&&!Xt(o)&&Le(7);let a;if(fe(t)){let i=bc(this),s=Jo(i,t,void 0),l=!0;try{a=n(s),l=!1}finally{l?Yo(i):Xo(i)}return yc(i,o),xc(a,i)}else if(!t||!ea(t)){if(a=n(t),a===void 0&&(a=t),a===Sc&&(a=void 0),this.autoFreeze_&&zn(a,!0),o){let i=[],s=[];Rt(qo).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),o(i,s)}return a}else Le(1,t)},this.produceWithPatches=(t,n)=>{if(Xt(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let o,a;return[this.produce(t,n,(s,l)=>{o=s,a=l}),o,a]},Wo(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Wo(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Wo(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fe(e)||Le(8),Me(e)&&(e=wc(e));let t=bc(this),n=Jo(t,e,void 0);return n[ne].isManual_=!0,Xo(t),n}finishDraft(e,t){let n=e&&e[ne];(!n||!n.isManual_)&&Le(9);let{scope_:o}=n;return yc(o,t),xc(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));let o=Rt(qo).applyPatches_;return Me(e)?o(e,t):this.produce(e,a=>o(a,t))}};function Jo(e,t,n,o){let[a,i]=Mn(t)?Rt(Ln).proxyMap_(t,n):Ir(t)?Rt(Ln).proxySet_(t,n):y0(t,n);return(n?.scope_??Ac()).drafts_.push(a),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?h0(n,i,o):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function wc(e){return Me(e)||Le(10,e),Nc(e)}function Nc(e){if(!fe(e)||kn(e))return e;let t=e[ne],n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zo(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Zo(e,!0);let a=n;return Ir(n)&&(n=new Set),wn(a,(i,s)=>{An(n,i,Nc(s))},o),t&&(t.finalized_=!1),n}var S0=globalThis.Iterator,Zh=typeof S0?.from=="function";var C0=new v0,ra=C0.produce;function Mc(e){return({dispatch:n,getState:o})=>a=>i=>typeof i=="function"?i(n,o,e):a(i)}var zc=Mc(),kc=Mc;var E0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wr:wr.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var A0=e=>e&&typeof e.match=="function";function tt(e,t){function n(...o){if(t){let a=t(...o);if(!a)throw new Error(ze(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:o[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=o=>uc(o)&&o.type===e,n}var Uc=class Tr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Tr.prototype)}static get[Symbol.species](){return Tr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Tr(...t[0].concat(this)):new Tr(...t.concat(this))}};function Ic(e){return fe(e)?ra(e,()=>{}):e}function Tn(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function L0(e){return typeof e=="boolean"}var O0=()=>function(t){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new Uc;return n&&(L0(n)?s.push(zc):s.push(kc(n.extraArgument))),s},R0="RTK_autoBatch";var Tc=e=>t=>{setTimeout(t,e)},_0=(e,t)=>n=>{let o=!1,a,i,s=()=>{o||(o=!0,cancelAnimationFrame(a),clearTimeout(i),n())};a=e(s),i=setTimeout(s,t)},w0=(e={type:"raf"})=>t=>(...n)=>{let o=t(...n),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?_0(window.requestAnimationFrame,100):Tc(10):e.type==="callback"?e.queueNotification:Tc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},o,{subscribe(h){let g=()=>a&&h(),b=o.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[R0],i=!a,i&&(s||(s=!0,f(m))),o.dispatch(h)}finally{a=!0}}})},N0=e=>function(n){let{autoBatch:o=!0}=n??{},a=new Uc(e);return o&&a.push(w0(typeof o=="object"?o:void 0)),a};function Fc(e){let t=O0(),{reducer:n=void 0,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof n=="function")f=n;else if(bn(n))f=Go(n);else throw new Error(ze(1));let m;typeof o=="function"?m=o(t):m=t();let h=wr;a&&(h=E0({trace:!1,...typeof a=="object"&&a}));let g=fc(...m),b=N0(g),x=typeof l=="function"?l(b):b(),L=h(...x);return $o(f,s,L)}function Bc(e){let t={},n=[],o,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(ze(28));if(l in t)throw new Error(ze(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&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return o=i,a}};return e(a),[t,n,o]}function M0(e){return typeof e=="function"}function z0(e,t){let[n,o,a]=Bc(t),i;if(M0(e))i=()=>Ic(e());else{let l=Ic(e);i=()=>l}function s(l=i(),f){let m=[n[f.type],...o.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(Me(h)){let b=g(h,f);return b===void 0?h:b}else{if(fe(h))return ra(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw new Error(ze(9))}return b}}return h},l)}return s.getInitialState=i,s}var k0=(e,t)=>A0(e)?e.match(t):e(t);function I0(...e){return t=>e.some(n=>k0(n,t))}var T0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",P0=(e=21)=>{let t="",n=e;for(;n--;)t+=T0[Math.random()*64|0];return t},D0=["name","message","stack","code"],na=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Pc=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},U0=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of D0)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Dc="External signal was aborted",F0=(()=>{function e(t,n,o){let a=tt(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=tt(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=tt(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(o&&o.serializeError||U0)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:g!==void 0,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let x=o?.idGenerator?o.idGenerator(f):P0(),L=new AbortController,R,O;function N(_){O=_,L.abort()}m&&(m.aborted?N(Dc):m.addEventListener("abort",()=>N(Dc),{once:!0}));let I=(async function(){let _;try{let M=o?.condition?.(f,{getState:g,extra:b});if($0(M)&&(M=await M),M===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(L.signal.aborted)throw{name:"AbortError",message:O||"Aborted"};let D=new Promise((U,V)=>{R=()=>{V({name:"AbortError",message:O||"Aborted"})},L.signal.addEventListener("abort",R,{once:!0})});h(i(x,f,o?.getPendingMeta?.({requestId:x,arg:f},{getState:g,extra:b}))),_=await Promise.race([D,Promise.resolve(n(f,{dispatch:h,getState:g,extra:b,requestId:x,signal:L.signal,abort:N,rejectWithValue:((U,V)=>new na(U,V)),fulfillWithValue:((U,V)=>new Pc(U,V))})).then(U=>{if(U instanceof na)throw U;return U instanceof Pc?a(U.payload,x,f,U.meta):a(U,x,f)})])}catch(M){_=M instanceof na?s(null,x,f,M.payload,M.meta):s(M,x,f)}finally{R&&L.signal.removeEventListener("abort",R)}return o&&!o.dispatchConditionRejection&&s.match(_)&&_.meta.condition||h(_),_})();return Object.assign(I,{abort:N,requestId:x,arg:f,unwrap(){return I.then(B0)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:I0(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function B0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $c=Symbol.for("rtk-slice-createasyncthunk"),r7={[$c]:F0};function G0(e,t){return`${e}/${t}`}function H0({creators:e}={}){let t=e?.asyncThunk?.[$c];return function(o){let{name:a,reducerPath:i=a}=o;if(!a)throw new Error(ze(11));typeof process<"u";let s=(typeof o.reducers=="function"?o.reducers(V0()):o.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(_,M){let D=typeof _=="string"?_:_.type;if(!D)throw new Error(ze(12));if(D in f.sliceCaseReducersByType)throw new Error(ze(13));return f.sliceCaseReducersByType[D]=M,m},addMatcher(_,M){return f.sliceMatchers.push({matcher:_,reducer:M}),m},exposeAction(_,M){return f.actionCreators[_]=M,m},exposeCaseReducer(_,M){return f.sliceCaseReducersByName[_]=M,m}};l.forEach(_=>{let M=s[_],D={reducerName:_,type:G0(a,_),createNotation:typeof o.reducers=="function"};K0(M)?q0(D,M,m,t):j0(D,M,m)});function h(){let[_={},M=[],D=void 0]=typeof o.extraReducers=="function"?Bc(o.extraReducers):[o.extraReducers],U={..._,...f.sliceCaseReducersByType};return z0(o.initialState,V=>{for(let Z in U)V.addCase(Z,U[Z]);for(let Z of f.sliceMatchers)V.addMatcher(Z.matcher,Z.reducer);for(let Z of M)V.addMatcher(Z.matcher,Z.reducer);D&&V.addDefaultCase(D)})}let g=_=>_,b=new Map,x=new WeakMap,L;function R(_,M){return L||(L=h()),L(_,M)}function O(){return L||(L=h()),L.getInitialState()}function N(_,M=!1){function D(V){let Z=V[_];return typeof Z>"u"&&M&&(Z=Tn(x,D,O)),Z}function U(V=g){return Tn(Tn(b,M,()=>new WeakMap),V,()=>{let Z={};for(let[Dt,me]of Object.entries(o.selectors??{}))Z[Dt]=W0(me,V,()=>Tn(x,V,O),M);return Z})}return{reducerPath:_,getSelectors:U,get selectors(){return U(D)},selectSlice:D}}let I={name:a,reducer:R,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:O,...N(i),injectInto(_,{reducerPath:M,...D}={}){let U=M??i;return _.inject({reducerPath:U,reducer:R},D),{...I,...N(U,!0)}}};return I}}function W0(e,t,n,o){function a(i,...s){let l=t(i);return typeof l>"u"&&o&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var Gc=H0();function V0(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function j0({type:e,reducerName:t,createNotation:n},o,a){let i,s;if("reducer"in o){if(n&&!Z0(o))throw new Error(ze(17));i=o.reducer,s=o.prepare}else i=o;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?tt(e,s):tt(e))}function K0(e){return e._reducerDefinitionType==="asyncThunk"}function Z0(e){return e._reducerDefinitionType==="reducerWithPrepare"}function q0({type:e,reducerName:t},n,o,a){if(!a)throw new Error(ze(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=n,g=a(e,i,h);o.exposeAction(t,g),s&&o.addCase(g.fulfilled,s),l&&o.addCase(g.pending,l),f&&o.addCase(g.rejected,f),m&&o.addMatcher(g.settled,m),o.exposeCaseReducer(t,{fulfilled:s||Pn,pending:l||Pn,rejected:f||Pn,settled:m||Pn})}function Pn(){}var Hc="listener",Wc="completed",Vc="cancelled",n7=`task-${Vc}`,o7=`task-${Wc}`,a7=`${Hc}-${Vc}`,i7=`${Hc}-${Wc}`;var{assign:jc}=Object;var oa="listenerMiddleware";var Y0=jc(tt(`${oa}/add`),{withTypes:()=>Y0}),s7=tt(`${oa}/removeAll`),X0=jc(tt(`${oa}/remove`),{withTypes:()=>X0});function ze(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 Q0=fn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(n,o,a){this.eventBus.addEventListener(n,o,a)}dispatchEvent(n){return this.eventBus.dispatchEvent(n)}removeEventListener(n,o,a){this.eventBus.removeEventListener(n,o,a)}}}),Dn=class extends Q0(Object){};window.ftReduxStores||(window.ftReduxStores={});var Kc=class e extends Dn{static get(t){var n;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(gn(i))return i;if(a==null)return;let s=Gc({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=Fc({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Or(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,a.deprecatedKeys)}constructor(t,n,o,a){super(),this.reduxSlice=t,this.reduxStore=n,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new un,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,f)=>{let m=l,h=s[m];return h?(...g)=>{let b=h(...g.map(i));return this.reduxStore.dispatch(b),b}:g=>{let b=m,x=this.getState()[b];Zt(x,g)||this.setState({[b]:i(g)})}}}),this.eventBus=o??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 Un=class{static format(t,n,o,a,i){return window.moment?window.moment(t).locale(n).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(t,n,o,a,!!i)}static getMomentDateFormat(t,n,o){return o?"LT":t?n?"lll":"ll":n?"L LT":"L"}static getIntlDateTime(t,n,o,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(n,{dateStyle:o?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),n=new Date().getTimezoneOffset();return`${n<0?"+":"-"}${t(Math.abs(n)/60)}:${t(Math.abs(n)%60)}`}};var Fn=E(P()),J0="ft-app-info",_t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};_t.eventName="authentication-change";var Pr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Pr.eventName="ui-locale-changed";var ed={session:(e,t)=>{(0,Fn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>T.dispatchEvent(new _t(t.payload)),0))}},T=Fn.FtReduxStore.get({name:J0,reducers:ed,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 Zc=E(P()),Bn=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},D7=(0,Zc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Un.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Bn([(0,aa.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Bn([(0,aa.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Bn([Fo({store:T.name,selector:n=>{var o,a;return(a=(o=n.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Bn([Fo({store:T.name})],t.prototype,"uiLocale",void 0),t});var qc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(qc||(qc={}));var Yc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Yc||(Yc={}));var Xc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Xc||(Xc={}));var Qc;(function(e){e.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"})(Qc||(Qc={}));var Jc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Jc||(Jc={}));var el;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(el||(el={}));var tl;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(tl||(tl={}));var rl;(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"})(rl||(rl={}));var nl;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(nl||(nl={}));var ol;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(ol||(ol={}));var al;(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",e.DOC_DIFF="DOC_DIFF"})(al||(al={}));var il;(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"})(il||(il={}));var sl;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(sl||(sl={}));var cl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(cl||(cl={}));var ll;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ll||(ll={}));var dl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(dl||(dl={}));var fl;(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"})(fl||(fl={}));var ul;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ul||(ul={}));var pl;(function(e){e.ASC="ASC",e.DESC="DESC"})(pl||(pl={}));var ml;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(ml||(ml={}));var hl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(hl||(hl={}));var gl;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gl||(gl={}));var yl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(yl||(yl={}));var bl;(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"})(bl||(bl={}));var xl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(xl||(xl={}));var vl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(vl||(vl={}));var Sl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Sl||(Sl={}));var Cl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Cl||(Cl={}));var X;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(X||(X={}));var ge;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ge||(ge={}));var El;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(El||(El={}));var Al;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Al||(Al={}));var Ll;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ll||(Ll={}));var Ol;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ol||(Ol={}));var Rl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rl||(Rl={}));var _l;(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"})(_l||(_l={}));var wl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(wl||(wl={}));var Nl;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Nl||(Nl={}));var Ml;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Ml||(Ml={}));var zl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(zl||(zl={}));var kl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(kl||(kl={}));var Il;(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"})(Il||(Il={}));var Tl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Tl||(Tl={}));var td={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function Pl(e,t){return e===t||(td[e]??[]).some(n=>Pl(n,t))}function ia(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(o=>Pl(o,t))}function Dl(e,...t){return e==null?!1:t.some(n=>ia(e,n))}var Vn=E(P());var sa=E(P());var wt=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=T.getState(),a=t??o;if(n&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(n,a,!0)}static await(t){return new Promise(n=>{let o=e.get(t);if(o)n(o);else{let a=T.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var Jt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:wt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):wt.await()}};var ue=class extends Jt{constructor(t=!0,n){var o;super(n),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=(o=a.commonCache)!==null&&o!==void 0?o:new sa.CacheRegistry,this.cache=t?a.commonCache:new sa.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((n,o)=>0|31*n+o.charCodeAt(0),0))}};var $n=class extends ue{async listMySearches(){let{session:t}=T.getState();return ia(t,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Gn=class extends ue{async listMyBookmarks(){let t=T.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Hn=class extends ue{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=T.getState().session;return!!t?.sessionAuthenticated}};var Wn=class extends ue{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=T.getState().session;return!!t?.sessionAuthenticated}};var rd="ft-user-assets",nd={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(ge).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let n=t.payload.mapId;e.assetCounts.bookmarkByMap[n]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:n,mapId:o,asset:a}=t.payload;la(e,n,[...ca(e,n),a]),Ul(e,n,1,o),Fl(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;la(e,n,ca(e,n).map(a=>a.id===o.id?o:a)),Fl(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;la(e,n,ca(e,n).filter(i=>i.id!==a)),Ul(e,n,-1,o)}},Bl={[ge.SEARCHES]:"savedSearches",[ge.BOOKMARKS]:"bookmarks",[ge.BOOKS]:void 0,[ge.COLLECTIONS]:void 0},ca=(e,t)=>{var n;let o=Bl[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},la=(e,t,n)=>{let o=Bl[t];o&&(e[o]=n)},Ul=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===ge.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},Fl=(e,t)=>{let n=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!n.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},ae=Vn.FtReduxStore.get({name:rd,reducers:nd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ge).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),da=class{constructor(t=new Hn,n=new Wn){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Gn,this.savedSearchesService=new $n,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=T.getState();(0,Vn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,n?.profile)||(this.currentSession=n,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ae.actions.clearAssetCount(),ae.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ae.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ae.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ae.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ae.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&ae.getState().assetCounts.allAsset[t]!==n.count&&ae.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&ae.getState().assetCounts.bookmarkByMap[t]!==n.count&&ae.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(ae.getState().assetCounts.bookmarkByMap).length!==0;t===ge.BOOKMARKS&&n&&ae.actions.clearBookmarkCountByMap(),ae.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 n=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ae.actions.bookmarks(n)}}},od=new da;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=od);var fa=class{addCommand(t,n=!1){T.commands.add(t,n)}consumeCommand(t){return T.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new fa;var ye=E(P());var $l,er=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ad=Symbol("clearAfterUnitTest"),jn=class extends(0,ye.withEventBus)(ue){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$l]=()=>{this.defaultMessages={},this.cache=new ye.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=T.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let n=t.name.toLowerCase();this.cache.setFinal(n,t),this.notify(n)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,n){var o;if(t=t.toLowerCase(),n&&Object.keys(n).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...n};(0,ye.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var n,o;return this.fetchContext(t),(o=(n=this.cache.getNow(t))===null||n===void 0?void 0:n.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,n){let o=t.toLowerCase();return this.resolveContext(o)[n]}resolveMessage(t,n,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(n,...o)}async fetchContext(t){let n=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),n&&await this.notify(t)}catch(a){!(a instanceof ye.CanceledPromiseError)&&n&&console.error(a)}return o}subscribe(t,n){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(n),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(n)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new er({loadedContexts:t})),this.dispatchEvent(new er({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new er({loadedContexts:[t]})),this.dispatchEvent(new er({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,ye.delay)(0).then(()=>o()).catch(()=>null)))}};$l=ad;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends jn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends jn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Dr=window.FluidTopicsI18nService,ua=window.FluidTopicsCustomI18nService;var Gl=E(P()),pa=class{highlightHtml(t,n,o){(0,Gl.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new pa;var Hl=E(P());var ma=class{isDate(t){var n,o,a,i;return(i=(o=((a=(n=T.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||o===void 0?void 0:o.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return Hl.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:T.getState().uiLocale,(a=n?.longFormat)!==null&&a!==void 0?a:!1,(i=n?.withTime)!==null&&i!==void 0?i:!1,(s=n?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new ma;var Wl=E(P());var Ur=class{static get(t,n,{baseUrl:o,localesConfiguration:a,availableContentLocales:i}=T.getState()){var s;if(!n||i.length>0&&!i.some(l=>l.lang===n)){let l=a?.defaultLocales.defaultContentLocale;n=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new Wl.SearchPlaceConverter(o,t??20,a?.allLanguagesAllowed,n,i)}};var ha=class{urlToSearchRequest(t){return Ur.get().parse(t)}searchRequestToUrl(t){return Ur.get().serialize(t)}};window.FluidTopicsUrlService=new ha;var Ge=E(P());var Nt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Nt.eventName="before-location-change";var Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Mt.eventName="change";var ga=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let n=sessionStorage.getItem(this.itemName(t));return n?JSON.parse(n):void 0}set(t,n){sessionStorage.setItem(this.itemName(t),JSON.stringify(n))}},Vl=new ga;var Kn=class e extends Ge.WithEventBus{static build(){return new e(window.history,Vl,()=>window.location,!1)}constructor(t,n,o,a){var i,s;super(),this.history=t,this.historyStorage=n,this.windowLocation=o,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,n=!1){let o=n&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ge.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Mt(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let f=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new Nt(f);this.dispatchEvent(m);let h=n(),g={...h===this.currentIndex?this.currentState:void 0,...i,index:h,href:m.detail.nextLocation.href};o.apply(a,[g,s,g.href]),this.setCurrentState(g,!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 n=this.history.length-1;n>=0;n--)t?this.states[n]=this.historyStorage.get(n):setTimeout(()=>this.states[n]=this.historyStorage.get(n),this.history.length-n)}updateCurrentState(t){var n;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title};this.setCurrentState(o)}addBeforeLocationChangeListener(t){this.addEventListener(Nt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Nt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Mt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Mt.eventName,t)}currentItem(){return(0,Ge.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,Ge.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,Ge.deepCopy)(n.find(o=>t(o)))}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,Ge.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 n;let o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,n;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(n=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&n!==void 0?n:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,n){var o;if(!this.hasState(t))return!1;let a=n??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Kn.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 jl=E(j());var Kl=jl.css`
|
|
834
|
+
`;var Rs=["top","right","bottom","left"],Os=["start","end"],Mo=Rs.reduce((e,t)=>e.concat(t,t+"-"+Os[0],t+"-"+Os[1]),[]),xr=Math.min,Xe=Math.max,vr=Math.round;var we=e=>({x:e,y:e}),I4={left:"right",right:"left",bottom:"top",top:"bottom"};function _s(e,t,n){return Xe(e,xr(t,n))}function rn(e,t){return typeof e=="function"?e(t):e}function Sr(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function zo(e){return e==="x"?"y":"x"}function ko(e){return e==="y"?"height":"width"}function nn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Io(e){return zo(nn(e))}function ws(e,t,n){n===void 0&&(n=!1);let o=Qe(e),a=Io(e),i=ko(a),s=a==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=No(s)),[s,No(s)]}function Ns(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function No(e){let t=Sr(e);return I4[t]+e.slice(t.length)}function T4(e){var t,n,o,a;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(a=e.left)!=null?a:0}}function Ms(e){return typeof e!="number"?T4(e):{top:e,right:e,bottom:e,left:e}}function Ct(e){let{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function zs(e,t,n){let{reference:o,floating:a}=e,i=nn(t),s=Io(t),l=ko(s),f=Sr(t),m=i==="y",h=o.x+o.width/2-a.width/2,g=o.y+o.height/2-a.height/2,b=o[l]/2-a[l]/2,x;switch(f){case"top":x={x:h,y:o.y-a.height};break;case"bottom":x={x:h,y:o.y+o.height};break;case"right":x={x:o.x+o.width,y:g};break;case"left":x={x:o.x-a.width,y:g};break;default:x={x:o.x,y:o.y}}let L=Qe(t);return L&&(x[s]+=b*(L==="end"?1:-1)*(n&&m?-1:1)),x}async function ks(e,t){var n;t===void 0&&(t={});let{x:o,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}=rn(t,e),L=Ms(x),O=l[b?g==="floating"?"reference":"floating":g],N=Ct(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(O)))==null||n?O:O.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:h,strategy:f})),I=g==="floating"?{x:o,y:a,width:s.floating.width,height:s.floating.height}:s.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),M=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},D=Ct(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:I,offsetParent:_,strategy:f}):I);return{top:(N.top-D.top+L.top)/M.y,bottom:(D.bottom-N.bottom+L.bottom)/M.y,left:(N.left-D.left+L.left)/M.x,right:(D.right-N.right+L.right)/M.x}}var P4=50,Is=async(e,t,n)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:ks},f=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:g}=zs(m,o,f),b=o,x=0,L={};for(let R=0;R<i.length;R++){let O=i[R];if(!O)continue;let{name:N,fn:I}=O,{x:_,y:M,data:D,reset:U}=await I({x:h,y:g,initialPlacement:o,placement:b,strategy:a,middlewareData:L,rects:m,platform:l,elements:{reference:e,floating:t}});h=_??h,g=M??g,L[N]={...L[N],...D},U&&x<P4&&(x++,typeof U=="object"&&(U.placement&&(b=U.placement),U.rects&&(m=U.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):U.rects),{x:h,y:g}=zs(m,b,f)),R=-1)}return{x:h,y:g,placement:b,strategy:a,middlewareData:L}};function D4(e,t,n){return(e?[...n.filter(a=>Qe(a)===e),...n.filter(a=>Qe(a)!==e)]:n.filter(a=>Sr(a)===a)).filter(a=>e?Qe(a)===e||(t?Ns(a)!==a:!1):!0)}var Ts=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,a;let{rects:i,middlewareData:s,placement:l,platform:f,elements:m}=t,{crossAxis:h=!1,alignment:g,allowedPlacements:b=Mo,autoAlignment:x=!0,...L}=rn(e,t),R=g!==void 0||b===Mo?D4(g||null,x,b):b,O=((n=s.autoPlacement)==null?void 0:n.index)||0,N=R[O];if(N==null)return{};if(l!==N)return{reset:{placement:R[0]}};let I=await f.detectOverflow(t,L),_=ws(N,i,await(f.isRTL==null?void 0:f.isRTL(m.floating))),M=[I[Sr(N)],I[_[0]],I[_[1]]],D=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:N,overflows:M}],U=R[O+1];if(U)return{data:{index:O+1,overflows:D},reset:{placement:U}};let V=D.map(me=>{let dr=Qe(me.placement);return[me.placement,dr&&h?me.overflows.slice(0,2).reduce((x4,v4)=>x4+v4,0):me.overflows[0],me.overflows]}).sort((me,dr)=>me[1]-dr[1]),Dt=((a=V.filter(me=>me[2].slice(0,Qe(me[0])?2:3).every(dr=>dr<=0))[0])==null?void 0:a[0])||V[0][0];return Dt!==l?{data:{index:O+1,overflows:D},reset:{placement:Dt}}:{}}}};var Ps=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:f={fn:I=>{let{x:_,y:M}=I;return{x:_,y:M}}},...m}=rn(e,t),h={x:n,y:o},g=await i.detectOverflow(t,m),b=nn(a),x=zo(b),L=h[x],R=h[b],O=(I,_)=>_s(_+g[I==="y"?"top":"left"],_,_-g[I==="y"?"bottom":"right"]);s&&(L=O(x,L)),l&&(R=O(b,R));let N=f.fn({...t,[x]:L,[b]:R});return{...N,data:{x:N.x-n,y:N.y-o,enabled:{[x]:s,[b]:l}}}}}};function an(){return typeof window<"u"}function At(e){return Us(e)?(e.nodeName||"").toLowerCase():"#document"}function ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fe(e){var t;return(t=(Us(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Us(e){return an()?e instanceof Node||e instanceof ce(e).Node:!1}function Ee(e){return an()?e instanceof Element||e instanceof ce(e).Element:!1}function Be(e){return an()?e instanceof HTMLElement||e instanceof ce(e).HTMLElement:!1}function Ds(e){return!an()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ce(e).ShadowRoot}function Cr(e){let{overflow:t,overflowX:n,overflowY:o,display:a}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&a!=="inline"&&a!=="contents"}function Fs(e){return/^(table|td|th)$/.test(At(e))}function Er(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var U4=/transform|translate|scale|rotate|perspective|filter/,F4=/paint|layout|strict|content/,Et=e=>!!e&&e!=="none",To;function Vt(e){let t=Ee(e)?Ae(e):e;return Et(t.transform)||Et(t.translate)||Et(t.scale)||Et(t.rotate)||Et(t.perspective)||!sn()&&(Et(t.backdropFilter)||Et(t.filter))||U4.test(t.willChange||"")||F4.test(t.contain||"")}function Bs(e){let t=Je(e);for(;Be(t)&&!jt(t);){if(Vt(t))return t;if(Er(t))return null;t=Je(t)}return null}function sn(){return To==null&&(To=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),To}function jt(e){return/^(html|body|#document)$/.test(At(e))}function Ae(e){return ce(e).getComputedStyle(e)}function Ar(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(At(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ds(e)&&e.host||Fe(e);return Ds(t)?t.host:t}function $s(e){let t=Je(e);return jt(t)?(e.ownerDocument||e).body:Be(t)&&Cr(t)?t:$s(t)}function on(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);let a=$s(e),i=a===((o=e.ownerDocument)==null?void 0:o.body),s=ce(a);if(i){let l=cn(s);return t.concat(s,s.visualViewport||[],Cr(a)?a:[],l&&n?on(l):[])}else return t.concat(a,on(a,[],n))}function cn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ws(e){let t=Ae(e),n=parseFloat(t.width)||0,o=parseFloat(t.height)||0,a=Be(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:o,l=vr(n)!==i||vr(o)!==s;return l&&(n=i,o=s),{width:n,height:o,$:l}}function Vs(e){return Ee(e)?e:e.contextElement}function Kt(e){let t=Vs(e);if(!Be(t))return we(1);let n=t.getBoundingClientRect(),{width:o,height:a,$:i}=Ws(t),s=(i?vr(n.width):n.width)/o,l=(i?vr(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var B4=we(0);function js(e){let t=ce(e);return!sn()||!t.visualViewport?B4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $4(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ce(e)}function Lr(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);let a=e.getBoundingClientRect(),i=Vs(e),s=we(1);t&&(o?Ee(o)&&(s=Kt(o)):s=Kt(e));let l=$4(i,n,o)?js(i):we(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&&o){let b=ce(i),x=Ee(o)?ce(o):o,L=b,R=cn(L);for(;R&&x!==L;){let O=Kt(R),N=R.getBoundingClientRect(),I=Ae(R),_=N.left+(R.clientLeft+parseFloat(I.paddingLeft))*O.x,M=N.top+(R.clientTop+parseFloat(I.paddingTop))*O.y;f*=O.x,m*=O.y,h*=O.x,g*=O.y,f+=_,m+=M,L=ce(R),R=cn(L)}}return Ct({width:h,height:g,x:f,y:m})}function ln(e,t){let n=Ar(e).scrollLeft;return t?t.left+n:Lr(Fe(e)).left+n}function Ks(e,t){let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-ln(e,n),a=n.top+t.scrollTop;return{x:o,y:a}}function G4(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e,i=a==="fixed",s=Fe(o),l=t?Er(t.floating):!1;if(o===s||l&&i)return n;let f={scrollLeft:0,scrollTop:0},m=we(1),h=we(0),g=Be(o);if((g||!i)&&((At(o)!=="body"||Cr(s))&&(f=Ar(o)),g)){let x=Lr(o);m=Kt(o),h.x=x.x+o.clientLeft,h.y=x.y+o.clientTop}let b=s&&!g&&!i?Ks(s,f):we(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+h.x+b.x,y:n.y*m.y-f.scrollTop*m.y+h.y+b.y}}function H4(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function W4(e){let t=Ar(e),n=e.ownerDocument.body,o=Xe(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Xe(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+ln(e),s=-t.scrollTop;return Ae(n).direction==="rtl"&&(i+=Xe(e.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var V4=25;function j4(e,t,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",a=ce(e),i=Fe(e),s=a.visualViewport,l=i.clientWidth,f=i.clientHeight,m=0,h=0;if(s){let b=!sn()||t==="fixed";o?b||(m=-s.offsetLeft,h=-s.offsetTop):(l=s.width,f=s.height,b&&(m=s.offsetLeft,h=s.offsetTop))}if(ln(i)<=0){let b=i.ownerDocument,x=b.body,L=getComputedStyle(x),R=b.compatMode==="CSS1Compat"&&parseFloat(L.marginLeft)+parseFloat(L.marginRight)||0,O=Math.abs(i.clientWidth-x.clientWidth-R),N=getComputedStyle(i).scrollbarGutter==="stable both-edges"?O/2:O;N<=V4&&(l-=N)}return{width:l,height:f,x:m,y:h}}function K4(e,t){let n=Lr(e,!0,t==="fixed"),o=n.top+e.clientTop,a=n.left+e.clientLeft,i=Kt(e),s=e.clientWidth*i.x,l=e.clientHeight*i.y,f=a*i.x,m=o*i.y;return{width:s,height:l,x:f,y:m}}function Gs(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=j4(e,n,t);else if(t==="document")o=W4(Fe(e));else if(Ee(t))o=K4(t,n);else{let a=js(e);o={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ct(o)}function Z4(e,t){let n=t.get(e);if(n)return n;let o=on(e,[],!1).filter(l=>Ee(l)&&At(l)!=="body"),a=null,i=Ae(e).position==="fixed",s=i?Je(e):e;for(;Ee(s)&&!jt(s);){let l=Ae(s),f=Vt(s),m=a?a.position:i?"fixed":"";!f&&(m==="fixed"||m==="absolute"&&l.position==="static")?o=o.filter(g=>g!==s):a=l,s=Je(s)}return t.set(e,o),o}function q4(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e,s=[...n==="clippingAncestors"?Er(t)?[]:Z4(t,this._c):[].concat(n),o],l=Gs(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=Gs(t,s[b],a);f=Xe(x.top,f),m=xr(x.right,m),h=xr(x.bottom,h),g=Xe(x.left,g)}return{width:m-g,height:h-f,x:g,y:f}}function Y4(e){let{width:t,height:n}=Ws(e);return{width:t,height:n}}function X4(e,t,n){let o=Be(t),a=Fe(t),i=n==="fixed",s=Lr(e,!0,i,t),l={scrollLeft:0,scrollTop:0},f=we(0);if((o||!i)&&((At(t)!=="body"||Cr(a))&&(l=Ar(t)),o)){let b=Lr(t,!0,i,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!o&&a&&(f.x=ln(a));let m=a&&!o&&!i?Ks(a,l):we(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 Po(e){return Ae(e).position==="static"}function Hs(e,t){if(!Be(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function Zs(e,t){let n=ce(e);if(Er(e))return n;if(!Be(e)){let a=Je(e);for(;a&&!jt(a);){if(Ee(a)&&!Po(a))return a;a=Je(a)}return n}let o=Hs(e,t);for(;o&&Fs(o)&&Po(o);)o=Hs(o,t);return o&&jt(o)&&Po(o)&&!Vt(o)?n:o||Bs(e)||n}var Q4=async function(e){let t=this.getOffsetParent||Zs,n=this.getDimensions,o=await n(e.floating);return{reference:X4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function J4(e){return Ae(e).direction==="rtl"}var dn={convertOffsetParentRelativeRectToViewportRelativeRect:G4,getDocumentElement:Fe,getClippingRect:q4,getOffsetParent:Zs,getElementRects:Q4,getClientRects:H4,getDimensions:Y4,getScale:Kt,isElement:Ee,isRTL:J4};var qs=Ts,Ys=Ps;var Xs=(e,t,n)=>{let o=new Map,a=n??{},i={...dn,...a.platform,_c:o};return Is(e,t,{...a,platform:i})};function Qs(e){return e0(e)}function Do(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function e0(e){for(let t=e;t;t=Do(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Do(e);t;t=Do(t)){if(!(t instanceof Element))continue;let n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||Vt(n)||t.tagName==="BODY"))return t}return null}async function Js(e,t,n){let o;return typeof n=="object"?o=n:o={placement:n},Xs(e,t,{strategy:o.strategy,platform:{...dn,getOffsetParent:a=>dn.getOffsetParent(a,Qs)},middleware:[Ys({crossAxis:!0}),qs({allowedPlacements:[o.placement]})]})}var rr=E(P());var aa=E(oe());var ec=E(oe(),1);var Uo=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)},t0=e=>({fromAttribute:t=>{if(t==null)return Or(e);try{return JSON.parse(t)}catch{return Or(e)}},toAttribute:t=>JSON.stringify(t)});function tc(e,t){return(0,ec.property)({type:Object,converter:t0(e),hasChanged:Rr,...t??{}})}function r0(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let n,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!Zt(e[o],t[o]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!Zt(o[1],t.get(o[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[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(n=i.length,n!==a(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){let s=i[o];if(!Zt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Zt(e,t){try{return r0(e,t)}catch{return!1}}function Rr(e,t){return!Zt(e,t)}function Or(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function fn(e,t){let n=o=>o[e]===!0;return o=>{if(n(o))return o;let a=t(o);return a[e]=!0,a}}var rc=E(oe(),1);var Fo=e=>{let t=e??{};return(n,o)=>{var a;let i={hasChanged:Rr,attribute:!1,...t};(0,rc.property)(i)(n,o);let s=n.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[o]),store:t.store})}};var un=class{constructor(){this.queue=[]}add(t,n=!1){n&&this.clear(t.type),this.queue.push(t)}consume(t){let n=this.queue.find(o=>o.type===t);return n&&(this.queue=this.queue.filter(o=>o!==n)),n}clear(t){typeof t=="string"?this.queue=this.queue.filter(n=>n.type!==t):this.queue=this.queue.filter(n=>!t.test(n.type))}};var Lt=E(oe(),1);var pn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,n){return this.callbacks=[t],this.debounce(n)}queue(t,n){return this.callbacks.push(t),this.debounce(n)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((n,o)=>{this.resolvePromise=n,this.rejectPromise=o})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,n;let o=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(n=this.resolvePromise)!==null&&n!==void 0?n:(()=>null);this.clearPromise();for(let s of o)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var hn=E(j(),1);var mn=class extends hn.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let n={...t.shadowRootOptions,customElements:t.registry},o=this.renderOptions.creationScope=this.attachShadow(n);return(0,hn.adoptStyles)(o,t.elementStyles),o}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([n,o])=>this.defineScopedElement(n,o))}static defineScopedElement(t,n){Uo(t)(n),this.canDefineScopedElement(t)&&this.registry.define(t,n)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,n){this.scopedRegistryConstructor.defineScopedElement(t,n)}};function nc(e,t,...n){var o;let a=e.querySelector(t);for(let i of n)a=(o=a?.shadowRoot)===null||o===void 0?void 0:o.querySelector(i);return a}var Yt=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},sc,oc=Symbol("constructorPrototype"),ac=Symbol("constructorName"),cc=Symbol("exportpartsDebouncer"),ic=Symbol("dynamicDependenciesLoaded"),qt=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};qt.eventName="exportparts-updated";var Ne=class extends mn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[sc]=new pn(5),this.scheduleExportpartsUpdate=()=>{var t,n,o;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(o=(n=this.exportpartsPrefixes)===null||n===void 0?void 0:n.length)!==null&&o!==void 0&&o)&&this[cc].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[ac]=this.constructor.name,this[oc]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[ac]&&Object.setPrototypeOf(this,this[oc])}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(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let n=this.constructor;n[ic]||(n[ic]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(qt.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(qt.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 qt)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:n,selector:o,shadowPath:a}=this.elementToFocus;if(o!=null){let i=[...a??[],o];n=nc(this.shadowRoot,...i)}n?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||n?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var n,o,a;if(((o=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&o!==void 0?o:[]).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 n,o,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(i=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let x=(s=(o=b.getAttribute("part"))===null||o===void 0?void 0:o.split(" "))!==null&&s!==void 0?s:[],L=(l=(a=b.getAttribute("exportparts"))===null||a===void 0?void 0:a.split(",").map(O=>O.split(":")[1]))!==null&&l!==void 0?l:[],R=[...x,...L].filter(f).map(O=>O.trim());for(let O of R)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(", ")}};sc=cc;Yt([(0,Lt.property)()],Ne.prototype,"exportpartsPrefix",void 0);Yt([tc([])],Ne.prototype,"exportpartsPrefixes",void 0);Yt([(0,Lt.property)({reflect:!0})],Ne.prototype,"exportparts",void 0);Yt([(0,Lt.property)()],Ne.prototype,"customStylesheet",void 0);Yt([(0,Lt.property)()],Ne.prototype,"elementToFocus",void 0);Yt([(0,Lt.state)()],Ne.prototype,"useAdoptedStyleSheets",void 0);function gn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var _r=Symbol("internalReduxEventsUnsubscribers"),et=Symbol("internalStoresUnsubscribers"),Ot=Symbol("internalStores"),n0=fn(Symbol("withRedux"),function(e){var t,n,o;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[n]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ot].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ot].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ot].get(s)}addStore(s,l){var f;l=(f=l??s.name)!==null&&f!==void 0?f:"default-store",this.unsubscribeFromStore(l),this[Ot].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ot].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ot].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let 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[et].has(s.store):this[et].size>0)&&(this[l]=s.selector(m.getState(),this))}})}subscribeToStore(s,l){var f,m;this[et].set(s,l.subscribe(()=>this.updateFromStores())),this[_r].set(s,[]),gn(l)&&(!((f=l.deprecatedKeys)===null||f===void 0)&&f.length&&this.reduxConstructor.reduxProperties.forEach((h,g)=>{this.getStore(h.store)===l&&l.deprecatedKeys.includes(g)&&console.warn("Element",this,"is subscribed to deprecated key",g,"in store",l.name)}),l.eventBus&&((m=this.reduxConstructor.reduxEventListeners)===null||m===void 0||m.forEach((h,g)=>{if(typeof this[g]=="function"&&(!h.store||l.name===h.store)){let b=x=>this[g](x);l.addEventListener(h.eventName,b),this[_r].get(s).push(()=>l.removeEventListener(h.eventName,b))}}))),this.onStoreAvailable(s)}unsubscribeFromStores(){this[et].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[et].has(s)&&this[et].get(s)(),this[et].delete(s),(l=this[_r].get(s))===null||l===void 0||l.forEach(f=>f()),this[_r].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=et,n=Ot,o=_r,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),lc=class extends n0(Ne){};function te(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 o0=typeof Symbol=="function"&&Symbol.observable||"@@observable",dc=o0,Bo=()=>Math.random().toString(36).substring(7).split("").join("."),a0={INIT:`@@redux/INIT${Bo()}`,REPLACE:`@@redux/REPLACE${Bo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bo()}`},yn=a0;function bn(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 $o(e,t,n){if(typeof e!="function")throw new Error(te(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(te(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(te(1));return n($o)(e,t)}let o=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(te(3));return a}function g(O){if(typeof O!="function")throw new Error(te(4));if(f)throw new Error(te(5));let N=!0;m();let I=l++;return s.set(I,O),function(){if(N){if(f)throw new Error(te(6));N=!1,m(),s.delete(I),i=null}}}function b(O){if(!bn(O))throw new Error(te(7));if(typeof O.type>"u")throw new Error(te(8));if(typeof O.type!="string")throw new Error(te(17));if(f)throw new Error(te(9));try{f=!0,a=o(a,O)}finally{f=!1}return(i=s).forEach(I=>{I()}),O}function x(O){if(typeof O!="function")throw new Error(te(10));o=O,b({type:yn.REPLACE})}function L(){let O=g;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(te(11));function I(){let M=N;M.next&&M.next(h())}return I(),{unsubscribe:O(I)}},[dc](){return this}}}return b({type:yn.INIT}),{dispatch:b,subscribe:g,getState:h,replaceReducer:x,[dc]:L}}function i0(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:yn.INIT})>"u")throw new Error(te(12));if(typeof n(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(te(13))})}function Go(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let l=t[s];typeof e[l]=="function"&&(n[l]=e[l])}let o=Object.keys(n),a,i;try{i0(n)}catch(s){i=s}return function(l={},f){if(i)throw i;let m=!1,h={};for(let g=0;g<o.length;g++){let b=o[g],x=n[b],L=l[b],R=x(L,f);if(typeof R>"u"){let O=f&&f.type;throw new Error(te(14))}h[b]=R,m=m||R!==L}return m=m||o.length!==Object.keys(l).length,m?h:l}}function wr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function fc(...e){return t=>(n,o)=>{let a=t(n,o),i=()=>{throw new Error(te(15))},s={getState:a.getState,dispatch:(f,...m)=>i(f,...m)},l=e.map(f=>f(s));return i=wr(...l)(a.dispatch),{...a,dispatch:i}}}function uc(e){return bn(e)&&"type"in e&&typeof e.type=="string"}var Sc=Symbol.for("immer-nothing"),pc=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function Le(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var de=Object,Qt=de.getPrototypeOf,Cn="constructor",_n="prototype",jo="configurable",En="enumerable",vn="writable",Nr="value",Me=e=>!!e&&!!e[ne];function fe(e){return e?Cc(e)||Nn(e)||!!e[pc]||!!e[Cn]?.[pc]||Mn(e)||Ir(e):!1}var s0=de[_n][Cn].toString(),mc=new WeakMap;function Cc(e){if(!e||!ea(e))return!1;let t=Qt(e);if(t===null||t===de[_n])return!0;let n=de.hasOwnProperty.call(t,Cn)&&t[Cn];if(n===Object)return!0;if(!Xt(n))return!1;let o=mc.get(n);return o===void 0&&(o=Function.toString.call(n),mc.set(n,o)),o===s0}function wn(e,t,n=!0){kr(e)===0?(n?Reflect.ownKeys(e):de.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((o,a)=>t(a,o,e))}function kr(e){let t=e[ne];return t?t.type_:Nn(e)?1:Mn(e)?2:Ir(e)?3:0}var Ho=(e,t,n=kr(e))=>n===2?e.has(t):de[_n].hasOwnProperty.call(e,t),Ko=(e,t,n=kr(e))=>n===2?e.get(t):e[t],An=(e,t,n,o=kr(e))=>{o===2?e.set(t,n):o===3?e.add(n):e[t]=n};function c0(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Nn=Array.isArray,Mn=e=>e instanceof Map,Ir=e=>e instanceof Set,ea=e=>typeof e=="object",Xt=e=>typeof e=="function",Wo=e=>typeof e=="boolean";function l0(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var $e=e=>e.copy_||e.base_;var ta=e=>e.modified_?e.copy_:e.base_;function Zo(e,t){if(Mn(e))return new Map(e);if(Ir(e))return new Set(e);if(Nn(e))return Array[_n].slice.call(e);let n=Cc(e);if(t===!0||t==="class_only"&&!n){let o=de.getOwnPropertyDescriptors(e);delete o[ne];let a=Reflect.ownKeys(o);for(let i=0;i<a.length;i++){let s=a[i],l=o[s];l[vn]===!1&&(l[vn]=!0,l[jo]=!0),(l.get||l.set)&&(o[s]={[jo]:!0,[vn]:!0,[En]:l[En],[Nr]:e[s]})}return de.create(Qt(e),o)}else{let o=Qt(e);if(o!==null&&n)return{...e};let a=de.create(o);return de.assign(a,e)}}function zn(e,t=!1){return kn(e)||Me(e)||!fe(e)||(kr(e)>1&&de.defineProperties(e,{set:xn,add:xn,clear:xn,delete:xn}),de.freeze(e),t&&wn(e,(n,o)=>{zn(o,!0)},!1)),e}function d0(){Le(2)}var xn={[Nr]:d0};function kn(e){return e===null||!ea(e)?!0:de.isFrozen(e)}var Ln="MapSet",qo="Patches",hc="ArrayMethods",Ec={};function Rt(e){let t=Ec[e];return t||Le(0,e),t}var gc=e=>!!Ec[e];var Mr,Ac=()=>Mr,f0=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gc(Ln)?Rt(Ln):void 0,arrayMethodsPlugin_:gc(hc)?Rt(hc):void 0});function yc(e,t){t&&(e.patchPlugin_=Rt(qo),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yo(e){Xo(e),e.drafts_.forEach(u0),e.drafts_=null}function Xo(e){e===Mr&&(Mr=e.parent_)}var bc=e=>Mr=f0(Mr,e);function u0(e){let t=e[ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[ne].modified_&&(Yo(t),Le(4)),fe(e)&&(e=vc(t,e));let{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[ne].base_,e,t)}else e=vc(t,n);return p0(t,e,!0),Yo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Sc?e:void 0}function vc(e,t){if(kn(t))return t;let n=t[ne];if(!n)return On(t,e.handledSet_,e);if(!In(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:o}=n;if(o)for(;o.length>0;)o.pop()(e);Rc(n,e)}return n.copy_}function p0(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zn(t,n)}function Lc(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var In=(e,t)=>e.scope_===t,m0=[];function Oc(e,t,n,o){let a=$e(e),i=e.type_;if(o!==void 0&&Ko(a,o,i)===t){An(a,o,n,i);return}if(!e.draftLocations_){let l=e.draftLocations_=new Map;wn(a,(f,m)=>{if(Me(m)){let h=l.get(m)||[];h.push(f),l.set(m,h)}})}let s=e.draftLocations_.get(t)??m0;for(let l of s)An(a,l,n,i)}function h0(e,t,n){e.callbacks_.push(function(a){let i=t;if(!i||!In(i,a))return;a.mapSetPlugin_?.fixSetContents(i);let s=ta(i);Oc(e,i.draft_??i,s,n),Rc(i,a)})}function Rc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:o}=t;if(o){let a=o.getPath(e);a&&o.generatePatches_(e,a,t)}Lc(e)}}function g0(e,t,n){let{scope_:o}=e;if(Me(n)){let a=n[ne];In(a,o)&&a.callbacks_.push(function(){Sn(e);let s=ta(a);Oc(e,n,s,t)})}else fe(n)&&e.callbacks_.push(function(){let i=$e(e);e.type_===3?i.has(n)&&On(n,o.handledSet_,o):Ko(i,t,e.type_)===n&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&On(Ko(e.copy_,t,e.type_),o.handledSet_,o)})}function On(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Me(e)||t.has(e)||!fe(e)||kn(e)||(t.add(e),wn(e,(o,a)=>{if(Me(a)){let i=a[ne];if(In(i,n)){let s=ta(i);An(e,o,s,e.type_),Lc(i)}}else fe(a)&&On(a,t,n)})),e}function y0(e,t){let n=Nn(e),o={type_:n?1:0,scope_:t?t.scope_:Ac(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=o,i=Rn;n&&(a=[o],i=zr);let{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,[l,o]}var Rn={get(e,t){if(t===ne)return e;let n=e.scope_.arrayMethodsPlugin_,o=e.type_===1&&typeof t=="string";if(o&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let a=$e(e);if(!Ho(a,t,e.type_))return x0(e,a,t);let i=a[t];if(e.finalized_||!fe(i)||o&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&l0(t))return i;if(i===Vo(e.base_,t)||b0(e,t,i)){Sn(e);let s=e.type_===1?+t:t,l=Jo(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in $e(e)},ownKeys(e){return Reflect.ownKeys($e(e))},set(e,t,n){let o=_c($e(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){let a=Vo($e(e),t),i=a?.[ne];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(c0(n,a)&&(n!==void 0||Ho(e.base_,t,e.type_)))return!0;Sn(e),Qo(e)}return e.copy_[t]===n&&(n!==void 0||Ho(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),g0(e,t,n)),!0},deleteProperty(e,t){return Sn(e),Vo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Qo(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=$e(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o&&{[vn]:!0,[jo]:e.type_!==1||t!=="length",[En]:o[En],[Nr]:n[t]}},defineProperty(){Le(11)},getPrototypeOf(e){return Qt(e.base_)},setPrototypeOf(){Le(12)}},zr={};for(let e in Rn){let t=Rn[e];zr[e]=function(){let n=arguments;return n[0]=n[0][0],t.apply(this,n)}}zr.deleteProperty=function(e,t){return zr.set.call(this,e,t,void 0)};zr.set=function(e,t,n){return Rn.set.call(this,e[0],t,n,e[0])};function Vo(e,t){let n=e[ne];return(n?$e(n):e)[t]}function b0(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!fe(n)||n[ne]?!1:e.baseRefs_.has(n)}function x0(e,t,n){let o=_c(t,n);return o?Nr in o?o[Nr]:o.get?.call(e.draft_):void 0}function _c(e,t){if(!(t in e))return;let n=Qt(e);for(;n;){let o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Qt(n)}}function Qo(e){e.modified_||(e.modified_=!0,e.parent_&&Qo(e.parent_))}function Sn(e){e.copy_||(e.assigned_=new Map,e.copy_=Zo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var v0=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,o)=>{if(Xt(t)&&!Xt(n)){let i=n;n=t;let s=this;return function(f=i,...m){return s.produce(f,h=>n.call(this,h,...m))}}Xt(n)||Le(6),o!==void 0&&!Xt(o)&&Le(7);let a;if(fe(t)){let i=bc(this),s=Jo(i,t,void 0),l=!0;try{a=n(s),l=!1}finally{l?Yo(i):Xo(i)}return yc(i,o),xc(a,i)}else if(!t||!ea(t)){if(a=n(t),a===void 0&&(a=t),a===Sc&&(a=void 0),this.autoFreeze_&&zn(a,!0),o){let i=[],s=[];Rt(qo).generateReplacementPatches_(t,a,{patches_:i,inversePatches_:s}),o(i,s)}return a}else Le(1,t)},this.produceWithPatches=(t,n)=>{if(Xt(t))return(s,...l)=>this.produceWithPatches(s,f=>t(f,...l));let o,a;return[this.produce(t,n,(s,l)=>{o=s,a=l}),o,a]},Wo(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Wo(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Wo(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){fe(e)||Le(8),Me(e)&&(e=wc(e));let t=bc(this),n=Jo(t,e,void 0);return n[ne].isManual_=!0,Xo(t),n}finishDraft(e,t){let n=e&&e[ne];(!n||!n.isManual_)&&Le(9);let{scope_:o}=n;return yc(o,t),xc(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));let o=Rt(qo).applyPatches_;return Me(e)?o(e,t):this.produce(e,a=>o(a,t))}};function Jo(e,t,n,o){let[a,i]=Mn(t)?Rt(Ln).proxyMap_(t,n):Ir(t)?Rt(Ln).proxySet_(t,n):y0(t,n);return(n?.scope_??Ac()).drafts_.push(a),i.callbacks_=n?.callbacks_??[],i.key_=o,n&&o!==void 0?h0(n,i,o):i.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:m}=f;i.modified_&&m&&m.generatePatches_(i,[],f)}),a}function wc(e){return Me(e)||Le(10,e),Nc(e)}function Nc(e){if(!fe(e)||kn(e))return e;let t=e[ne],n,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zo(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else n=Zo(e,!0);let a=n;return Ir(n)&&(n=new Set),wn(a,(i,s)=>{An(n,i,Nc(s))},o),t&&(t.finalized_=!1),n}var S0=globalThis.Iterator,Zh=typeof S0?.from=="function";var C0=new v0,ra=C0.produce;function Mc(e){return({dispatch:n,getState:o})=>a=>i=>typeof i=="function"?i(n,o,e):a(i)}var zc=Mc(),kc=Mc;var E0=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wr:wr.apply(null,arguments)};typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var A0=e=>e&&typeof e.match=="function";function tt(e,t){function n(...o){if(t){let a=t(...o);if(!a)throw new Error(ze(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:o[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=o=>uc(o)&&o.type===e,n}var Uc=class Tr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Tr.prototype)}static get[Symbol.species](){return Tr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Tr(...t[0].concat(this)):new Tr(...t.concat(this))}};function Ic(e){return fe(e)?ra(e,()=>{}):e}function Tn(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function L0(e){return typeof e=="boolean"}var O0=()=>function(t){let{thunk:n=!0,immutableCheck:o=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{},s=new Uc;return n&&(L0(n)?s.push(zc):s.push(kc(n.extraArgument))),s},R0="RTK_autoBatch";var Tc=e=>t=>{setTimeout(t,e)},_0=(e,t)=>n=>{let o=!1,a,i,s=()=>{o||(o=!0,cancelAnimationFrame(a),clearTimeout(i),n())};a=e(s),i=setTimeout(s,t)},w0=(e={type:"raf"})=>t=>(...n)=>{let o=t(...n),a=!0,i=!1,s=!1,l=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?_0(window.requestAnimationFrame,100):Tc(10):e.type==="callback"?e.queueNotification:Tc(e.timeout),m=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},o,{subscribe(h){let g=()=>a&&h(),b=o.subscribe(g);return l.add(h),()=>{b(),l.delete(h)}},dispatch(h){try{return a=!h?.meta?.[R0],i=!a,i&&(s||(s=!0,f(m))),o.dispatch(h)}finally{a=!0}}})},N0=e=>function(n){let{autoBatch:o=!0}=n??{},a=new Uc(e);return o&&a.push(w0(typeof o=="object"?o:void 0)),a};function Fc(e){let t=O0(),{reducer:n=void 0,middleware:o,devTools:a=!0,duplicateMiddlewareCheck:i=!0,preloadedState:s=void 0,enhancers:l=void 0}=e||{},f;if(typeof n=="function")f=n;else if(bn(n))f=Go(n);else throw new Error(ze(1));let m;typeof o=="function"?m=o(t):m=t();let h=wr;a&&(h=E0({trace:!1,...typeof a=="object"&&a}));let g=fc(...m),b=N0(g),x=typeof l=="function"?l(b):b(),L=h(...x);return $o(f,s,L)}function Bc(e){let t={},n=[],o,a={addCase(i,s){let l=typeof i=="string"?i:i.type;if(!l)throw new Error(ze(28));if(l in t)throw new Error(ze(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&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return o=i,a}};return e(a),[t,n,o]}function M0(e){return typeof e=="function"}function z0(e,t){let[n,o,a]=Bc(t),i;if(M0(e))i=()=>Ic(e());else{let l=Ic(e);i=()=>l}function s(l=i(),f){let m=[n[f.type],...o.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(Me(h)){let b=g(h,f);return b===void 0?h:b}else{if(fe(h))return ra(h,b=>g(b,f));{let b=g(h,f);if(b===void 0){if(h===null)return h;throw new Error(ze(9))}return b}}return h},l)}return s.getInitialState=i,s}var k0=(e,t)=>A0(e)?e.match(t):e(t);function I0(...e){return t=>e.some(n=>k0(n,t))}var T0="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",P0=(e=21)=>{let t="",n=e;for(;n--;)t+=T0[Math.random()*64|0];return t},D0=["name","message","stack","code"],na=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},Pc=class{payload;meta;_type;constructor(e,t){this.payload=e,this.meta=t}},U0=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of D0)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Dc="External signal was aborted",F0=(()=>{function e(t,n,o){let a=tt(t+"/fulfilled",(f,m,h,g)=>({payload:f,meta:{...g||{},arg:h,requestId:m,requestStatus:"fulfilled"}})),i=tt(t+"/pending",(f,m,h)=>({payload:void 0,meta:{...h||{},arg:m,requestId:f,requestStatus:"pending"}})),s=tt(t+"/rejected",(f,m,h,g,b)=>({payload:g,error:(o&&o.serializeError||U0)(f||"Rejected"),meta:{...b||{},arg:h,requestId:m,rejectedWithValue:g!==void 0,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function l(f,{signal:m}={}){return(h,g,b)=>{let x=o?.idGenerator?o.idGenerator(f):P0(),L=new AbortController,R,O;function N(_){O=_,L.abort()}m&&(m.aborted?N(Dc):m.addEventListener("abort",()=>N(Dc),{once:!0}));let I=(async function(){let _;try{let M=o?.condition?.(f,{getState:g,extra:b});if($0(M)&&(M=await M),M===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};if(L.signal.aborted)throw{name:"AbortError",message:O||"Aborted"};let D=new Promise((U,V)=>{R=()=>{V({name:"AbortError",message:O||"Aborted"})},L.signal.addEventListener("abort",R,{once:!0})});h(i(x,f,o?.getPendingMeta?.({requestId:x,arg:f},{getState:g,extra:b}))),_=await Promise.race([D,Promise.resolve(n(f,{dispatch:h,getState:g,extra:b,requestId:x,signal:L.signal,abort:N,rejectWithValue:((U,V)=>new na(U,V)),fulfillWithValue:((U,V)=>new Pc(U,V))})).then(U=>{if(U instanceof na)throw U;return U instanceof Pc?a(U.payload,x,f,U.meta):a(U,x,f)})])}catch(M){_=M instanceof na?s(null,x,f,M.payload,M.meta):s(M,x,f)}finally{R&&L.signal.removeEventListener("abort",R)}return o&&!o.dispatchConditionRejection&&s.match(_)&&_.meta.condition||h(_),_})();return Object.assign(I,{abort:N,requestId:x,arg:f,unwrap(){return I.then(B0)}})}}return Object.assign(l,{pending:i,rejected:s,fulfilled:a,settled:I0(s,a),typePrefix:t})}return e.withTypes=()=>e,e})();function B0(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $0(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $c=Symbol.for("rtk-slice-createasyncthunk"),r7={[$c]:F0};function G0(e,t){return`${e}/${t}`}function H0({creators:e}={}){let t=e?.asyncThunk?.[$c];return function(o){let{name:a,reducerPath:i=a}=o;if(!a)throw new Error(ze(11));typeof process<"u";let s=(typeof o.reducers=="function"?o.reducers(V0()):o.reducers)||{},l=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(_,M){let D=typeof _=="string"?_:_.type;if(!D)throw new Error(ze(12));if(D in f.sliceCaseReducersByType)throw new Error(ze(13));return f.sliceCaseReducersByType[D]=M,m},addMatcher(_,M){return f.sliceMatchers.push({matcher:_,reducer:M}),m},exposeAction(_,M){return f.actionCreators[_]=M,m},exposeCaseReducer(_,M){return f.sliceCaseReducersByName[_]=M,m}};l.forEach(_=>{let M=s[_],D={reducerName:_,type:G0(a,_),createNotation:typeof o.reducers=="function"};K0(M)?q0(D,M,m,t):j0(D,M,m)});function h(){let[_={},M=[],D=void 0]=typeof o.extraReducers=="function"?Bc(o.extraReducers):[o.extraReducers],U={..._,...f.sliceCaseReducersByType};return z0(o.initialState,V=>{for(let Z in U)V.addCase(Z,U[Z]);for(let Z of f.sliceMatchers)V.addMatcher(Z.matcher,Z.reducer);for(let Z of M)V.addMatcher(Z.matcher,Z.reducer);D&&V.addDefaultCase(D)})}let g=_=>_,b=new Map,x=new WeakMap,L;function R(_,M){return L||(L=h()),L(_,M)}function O(){return L||(L=h()),L.getInitialState()}function N(_,M=!1){function D(V){let Z=V[_];return typeof Z>"u"&&M&&(Z=Tn(x,D,O)),Z}function U(V=g){return Tn(Tn(b,M,()=>new WeakMap),V,()=>{let Z={};for(let[Dt,me]of Object.entries(o.selectors??{}))Z[Dt]=W0(me,V,()=>Tn(x,V,O),M);return Z})}return{reducerPath:_,getSelectors:U,get selectors(){return U(D)},selectSlice:D}}let I={name:a,reducer:R,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:O,...N(i),injectInto(_,{reducerPath:M,...D}={}){let U=M??i;return _.inject({reducerPath:U,reducer:R},D),{...I,...N(U,!0)}}};return I}}function W0(e,t,n,o){function a(i,...s){let l=t(i);return typeof l>"u"&&o&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var Gc=H0();function V0(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function j0({type:e,reducerName:t,createNotation:n},o,a){let i,s;if("reducer"in o){if(n&&!Z0(o))throw new Error(ze(17));i=o.reducer,s=o.prepare}else i=o;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?tt(e,s):tt(e))}function K0(e){return e._reducerDefinitionType==="asyncThunk"}function Z0(e){return e._reducerDefinitionType==="reducerWithPrepare"}function q0({type:e,reducerName:t},n,o,a){if(!a)throw new Error(ze(18));let{payloadCreator:i,fulfilled:s,pending:l,rejected:f,settled:m,options:h}=n,g=a(e,i,h);o.exposeAction(t,g),s&&o.addCase(g.fulfilled,s),l&&o.addCase(g.pending,l),f&&o.addCase(g.rejected,f),m&&o.addMatcher(g.settled,m),o.exposeCaseReducer(t,{fulfilled:s||Pn,pending:l||Pn,rejected:f||Pn,settled:m||Pn})}function Pn(){}var Hc="listener",Wc="completed",Vc="cancelled",n7=`task-${Vc}`,o7=`task-${Wc}`,a7=`${Hc}-${Vc}`,i7=`${Hc}-${Wc}`;var{assign:jc}=Object;var oa="listenerMiddleware";var Y0=jc(tt(`${oa}/add`),{withTypes:()=>Y0}),s7=tt(`${oa}/removeAll`),X0=jc(tt(`${oa}/remove`),{withTypes:()=>X0});function ze(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 Q0=fn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(n,o,a){this.eventBus.addEventListener(n,o,a)}dispatchEvent(n){return this.eventBus.dispatchEvent(n)}removeEventListener(n,o,a){this.eventBus.removeEventListener(n,o,a)}}}),Dn=class extends Q0(Object){};window.ftReduxStores||(window.ftReduxStores={});var Kc=class e extends Dn{static get(t){var n;let o=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[o];if(gn(i))return i;if(a==null)return;let s=Gc({...a,reducers:(n=a.reducers)!==null&&n!==void 0?n:{}}),l=Fc({reducer:(f,m)=>{if(m.type==="CLEAR_FT_REDUX_STORE"){let h=Or(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,a.deprecatedKeys)}constructor(t,n,o,a){super(),this.reduxSlice=t,this.reduxStore=n,this.deprecatedKeys=a,this.isFtReduxStore=!0,this.commands=new un,this.injectInto=(s,l)=>this.reduxSlice.injectInto(s,l),this.selectSlice=s=>this.reduxSlice.selectSlice(s);let i=s=>s!=null?JSON.parse(JSON.stringify(s)):s;this.actions=new Proxy(this.reduxSlice.actions,{get:(s,l,f)=>{let m=l,h=s[m];return h?(...g)=>{let b=h(...g.map(i));return this.reduxStore.dispatch(b),b}:g=>{let b=m,x=this.getState()[b];Zt(x,g)||this.setState({[b]:i(g)})}}}),this.eventBus=o??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 Un=class{static format(t,n,o,a,i){return window.moment?window.moment(t).locale(n).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(t,n,o,a,!!i)}static getMomentDateFormat(t,n,o){return o?"LT":t?n?"lll":"ll":n?"L LT":"L"}static getIntlDateTime(t,n,o,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(n,{dateStyle:o?"medium":"short"}).format(s),f=new Intl.DateTimeFormat(n,{timeStyle:"short"}).format(s);return i?f:a?`${l} ${f}`:l}static getTimezoneAsString(){let t=o=>String(Math.floor(o)).padStart(2,"0"),n=new Date().getTimezoneOffset();return`${n<0?"+":"-"}${t(Math.abs(n)/60)}:${t(Math.abs(n)%60)}`}};var Fn=E(P()),J0="ft-app-info",_t=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};_t.eventName="authentication-change";var Pr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Pr.eventName="ui-locale-changed";var ed={session:(e,t)=>{(0,Fn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>T.dispatchEvent(new _t(t.payload)),0))}},T=Fn.FtReduxStore.get({name:J0,reducers:ed,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 Zc=E(P()),Bn=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},D7=(0,Zc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(T)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===o))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>Un.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Bn([(0,aa.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Bn([(0,aa.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Bn([Fo({store:T.name,selector:n=>{var o,a;return(a=(o=n.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),Bn([Fo({store:T.name})],t.prototype,"uiLocale",void 0),t});var qc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(qc||(qc={}));var Yc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(Yc||(Yc={}));var Xc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(Xc||(Xc={}));var Qc;(function(e){e.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"})(Qc||(Qc={}));var Jc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Jc||(Jc={}));var el;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(el||(el={}));var tl;(function(e){e.PUBLISHED="PUBLISHED",e.AI="AI"})(tl||(tl={}));var rl;(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"})(rl||(rl={}));var nl;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(nl||(nl={}));var ol;(function(e){e.METADATA_FILTER="METADATA_FILTER",e.ACCESS_RIGHTS_FILTER="ACCESS_RIGHTS_FILTER"})(ol||(ol={}));var al;(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",e.DOC_DIFF="DOC_DIFF"})(al||(al={}));var il;(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"})(il||(il={}));var sl;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(sl||(sl={}));var cl;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(cl||(cl={}));var ll;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ll||(ll={}));var dl;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(dl||(dl={}));var fl;(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"})(fl||(fl={}));var ul;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ul||(ul={}));var pl;(function(e){e.ASC="ASC",e.DESC="DESC"})(pl||(pl={}));var ml;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(ml||(ml={}));var hl;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(hl||(hl={}));var gl;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(gl||(gl={}));var yl;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(yl||(yl={}));var bl;(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"})(bl||(bl={}));var xl;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(xl||(xl={}));var vl;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(vl||(vl={}));var Sl;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Sl||(Sl={}));var Cl;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Cl||(Cl={}));var X;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(X||(X={}));var ge;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(ge||(ge={}));var El;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(El||(El={}));var Al;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Al||(Al={}));var Ll;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Ll||(Ll={}));var Ol;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ol||(Ol={}));var Rl;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Rl||(Rl={}));var _l;(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"})(_l||(_l={}));var wl;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(wl||(wl={}));var Nl;(function(e){e.CHAT="CHAT",e.COMPLETION="COMPLETION",e.RAG="RAG",e.AGENT="AGENT"})(Nl||(Nl={}));var Ml;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Ml||(Ml={}));var zl;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(zl||(zl={}));var kl;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(kl||(kl={}));var Il;(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"})(Il||(Il={}));var Tl;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Tl||(Tl={}));var td={[X.PERSONAL_BOOK_SHARE_USER]:[X.PERSONAL_BOOK_USER],[X.HTML_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.PDF_EXPORT_USER]:[X.PERSONAL_BOOK_USER],[X.KHUB_ADMIN]:[X.CONTENT_PUBLISHER],[X.ADMIN]:[X.KHUB_ADMIN,X.USERS_ADMIN,X.PORTAL_ADMIN,X.BEHAVIOR_DATA_USER],[X.GENERATIVE_AI_EXPORT_USER]:[X.GENERATIVE_AI_USER]};function Pl(e,t){return e===t||(td[e]??[]).some(n=>Pl(n,t))}function ia(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(o=>Pl(o,t))}function Dl(e,...t){return e==null?!1:t.some(n=>ia(e,n))}var Vn=E(P());var sa=E(P());var wt=class e{static get(t){let{baseUrl:n,apiIntegrationIdentifier:o}=T.getState(),a=t??o;if(n&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(n,a,!0)}static await(t){return new Promise(n=>{let o=e.get(t);if(o)n(o);else{let a=T.subscribe(()=>{o=e.get(t),o&&(a(),n(o))})}})}};var Jt=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:wt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):wt.await()}};var ue=class extends Jt{constructor(t=!0,n){var o;super(n),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=(o=a.commonCache)!==null&&o!==void 0?o:new sa.CacheRegistry,this.cache=t?a.commonCache:new sa.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((n,o)=>0|31*n+o.charCodeAt(0),0))}};var $n=class extends ue{async listMySearches(){let{session:t}=T.getState();return ia(t,X.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var Gn=class extends ue{async listMyBookmarks(){let t=T.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var Hn=class extends ue{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=T.getState().session;return!!t?.sessionAuthenticated}};var Wn=class extends ue{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=T.getState().session;return!!t?.sessionAuthenticated}};var rd="ft-user-assets",nd={setAssetCount:(e,t)=>{let{userAssetType:n,count:o}=t.payload.assetCount;e.assetCounts.allAsset[n]=o},clearAssetCount:e=>{Object.values(ge).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let n=t.payload.mapId;e.assetCounts.bookmarkByMap[n]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:n,mapId:o,asset:a}=t.payload;la(e,n,[...ca(e,n),a]),Ul(e,n,1,o),Fl(e,a)},editAsset:(e,t)=>{let{assetType:n,asset:o}=t.payload;la(e,n,ca(e,n).map(a=>a.id===o.id?o:a)),Fl(e,o)},removeAsset:(e,t)=>{let{assetType:n,mapId:o,assetId:a}=t.payload;la(e,n,ca(e,n).filter(i=>i.id!==a)),Ul(e,n,-1,o)}},Bl={[ge.SEARCHES]:"savedSearches",[ge.BOOKMARKS]:"bookmarks",[ge.BOOKS]:void 0,[ge.COLLECTIONS]:void 0},ca=(e,t)=>{var n;let o=Bl[t];return o?(n=e[o])!==null&&n!==void 0?n:[]:[]},la=(e,t,n)=>{let o=Bl[t];o&&(e[o]=n)},Ul=(e,t,n,o)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+n),t===ge.BOOKMARKS&&o)){let i=e.assetCounts.bookmarkByMap[o];e.assetCounts.bookmarkByMap[o]=Math.max(0,i+n)}},Fl=(e,t)=>{let n=e.assetLabels.map(a=>a.title),o=t.labels.filter(a=>!n.includes(a)).map(a=>({title:a}));e.assetLabels.push(...o)},ae=Vn.FtReduxStore.get({name:rd,reducers:nd,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ge).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),da=class{constructor(t=new Hn,n=new Wn){this.assetCountsService=t,this.assetLabelsService=n,this.currentSession=T.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Gn,this.savedSearchesService=new $n,T.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:n}=T.getState();(0,Vn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,n?.profile)||(this.currentSession=n,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ae.actions.clearAssetCount(),ae.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ae.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ae.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ae.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ae.actions.assetLabels(t)}async loadAssetCount(t){let n=await this.assetCountsService.getUserAssetCount(t);n&&ae.getState().assetCounts.allAsset[t]!==n.count&&ae.actions.setAssetCount({assetCount:n})}async loadBookmarkByMapId(t){let n=await this.assetCountsService.getUserBookmarkCountByMap(t);n&&ae.getState().assetCounts.bookmarkByMap[t]!==n.count&&ae.actions.setBookmarkCountByMap({count:n.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let n=Object.keys(ae.getState().assetCounts.bookmarkByMap).length!==0;t===ge.BOOKMARKS&&n&&ae.actions.clearBookmarkCountByMap(),ae.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 n=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ae.actions.bookmarks(n)}}},od=new da;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=od);var fa=class{addCommand(t,n=!1){T.commands.add(t,n)}consumeCommand(t){return T.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new fa;var ye=E(P());var $l,er=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},ad=Symbol("clearAfterUnitTest"),jn=class extends(0,ye.withEventBus)(ue){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[$l]=()=>{this.defaultMessages={},this.cache=new ye.CacheRegistry,this.listeners={}},this.currentUiLocale=T.getState().uiLocale,T.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=T.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let n=t.name.toLowerCase();this.cache.setFinal(n,t),this.notify(n)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,n){var o;if(t=t.toLowerCase(),n&&Object.keys(n).length>0){let a={...(o=this.defaultMessages[t])!==null&&o!==void 0?o:{},...n};(0,ye.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var n,o;return this.fetchContext(t),(o=(n=this.cache.getNow(t))===null||n===void 0?void 0:n.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(t,n){let o=t.toLowerCase();return this.resolveContext(o)[n]}resolveMessage(t,n,...o){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new ye.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(n,...o)}async fetchContext(t){let n=!this.cache.has(t),o;try{o=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),n&&await this.notify(t)}catch(a){!(a instanceof ye.CanceledPromiseError)&&n&&console.error(a)}return o}subscribe(t,n){var o;return t=t.toLowerCase(),this.listeners[t]=(o=this.listeners[t])!==null&&o!==void 0?o:new Set,this.listeners[t].add(n),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(n)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new er({loadedContexts:t})),this.dispatchEvent(new er({loadedContexts:t})),await Promise.all(t.map(n=>this.notify(n,!1)))}async notify(t,n=!0){n&&(document.body.dispatchEvent(new er({loadedContexts:[t]})),this.dispatchEvent(new er({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(o=>(0,ye.delay)(0).then(()=>o()).catch(()=>null)))}};$l=ad;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends jn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends jn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Dr=window.FluidTopicsI18nService,ua=window.FluidTopicsCustomI18nService;var Gl=E(P()),pa=class{highlightHtml(t,n,o){(0,Gl.highlightHtml)(t,n,o)}};window.FluidTopicsHighlightHtmlService=new pa;var Hl=E(P());var ma=class{isDate(t){var n,o,a,i;return(i=(o=((a=(n=T.getState().metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]).find(l=>l.key===t))===null||o===void 0?void 0:o.date)!==null&&i!==void 0?i:!1}format(t,n){var o,a,i,s;if(t==null)return"";try{return Hl.DateFormatter.format(t,(o=n?.locale)!==null&&o!==void 0?o:T.getState().uiLocale,(a=n?.longFormat)!==null&&a!==void 0?a:!1,(i=n?.withTime)!==null&&i!==void 0?i:!1,(s=n?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new ma;var Wl=E(P());var Ur=class{static get(t,n,{baseUrl:o,localesConfiguration:a,availableContentLocales:i}=T.getState()){var s;if(n==="all"&&a?.allLanguagesAllowed)n=void 0;else if(!n||i.length>0&&!i.some(l=>l.lang===n)){let l=a?.defaultLocales.defaultContentLocale;n=l?`${l.lang}-${l.region}`:(s=i[0])===null||s===void 0?void 0:s.lang}return new Wl.SearchPlaceConverter(o,t??20,a?.allLanguagesAllowed,n,i)}};var ha=class{urlToSearchRequest(t){return Ur.get().parse(t)}searchRequestToUrl(t){return Ur.get().serialize(t)}};window.FluidTopicsUrlService=new ha;var Ge=E(P());var Nt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{nextLocation:t}})}};Nt.eventName="before-location-change";var Mt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Mt.eventName="change";var ga=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let n=sessionStorage.getItem(this.itemName(t));return n?JSON.parse(n):void 0}set(t,n){sessionStorage.setItem(this.itemName(t),JSON.stringify(n))}},Vl=new ga;var Kn=class e extends Ge.WithEventBus{static build(){return new e(window.history,Vl,()=>window.location,!1)}constructor(t,n,o,a){var i,s;super(),this.history=t,this.historyStorage=n,this.windowLocation=o,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,n=!1){let o=n&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Ge.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Mt(this.currentItem())),0)}installProxies(){let t=n=>(o,a,[i,s,l])=>{let f=new URL(typeof l=="string"?l:(l??this.windowLocation()).href,window.location.origin!=="null"?window.location.origin:void 0),m=new Nt(f);this.dispatchEvent(m);let h=n(),g={...h===this.currentIndex?this.currentState:void 0,...i,index:h,href:m.detail.nextLocation.href};o.apply(a,[g,s,g.href]),this.setCurrentState(g,!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 n=this.history.length-1;n>=0;n--)t?this.states[n]=this.historyStorage.get(n):setTimeout(()=>this.states[n]=this.historyStorage.get(n),this.history.length-n)}updateCurrentState(t){var n;let o={...this.buildCurrentState(),...t,index:this.currentIndex,title:(n=t?.title)!==null&&n!==void 0?n:this.currentState.title};this.setCurrentState(o)}addBeforeLocationChangeListener(t){this.addEventListener(Nt.eventName,t)}removeBeforeLocationChangeListener(t){this.removeEventListener(Nt.eventName,t)}addHistoryChangeListener(t){this.addEventListener(Mt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Mt.eventName,t)}currentItem(){return(0,Ge.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,Ge.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let n=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return(0,Ge.deepCopy)(n.find(o=>t(o)))}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,Ge.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 n;let o=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;if(!o)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,o);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,n;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(n=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&n!==void 0?n:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,n){var o;if(!this.hasState(t))return!1;let a=n??this.currentState.majorStateId,i=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=Kn.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 jl=E(j());var Kl=jl.css`
|
|
835
835
|
`;var Yl=E(j()),ie=E(oe()),kt=E(P());var ke=E(P());function Zl(e,t){let{authenticationRequired:n,session:o}=T.getState();return n&&!o?.sessionAuthenticated?Promise.resolve(t):e()}var Zn=class extends Jt{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var ya=class e extends ke.FtStateManager{static build(t){return new e(T,t)}constructor(t,n){super(),this.store=t,this.cache=new ke.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Zn,this.knownContexts=new ke.AbstractRegistry,this.knownCustomComponents=new ke.AbstractRegistry,this.cleanSessionDebouncer=new ke.Debouncer,this.reloadConfiguration=()=>{var o;(o=this.cache)===null||o===void 0||o.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new ke.Debouncer(500),this.apiProvider=n??(()=>wt.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}addListeners(){this.store.addEventListener(_t.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(_t.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 n=await this.apiProvider().getCurrentSession();return n.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},n.idleTimeoutInMillis),n});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 n=await this.cache.get("availableContentLocales",()=>Zl(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=n.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,n){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:n}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Pr(o)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}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)}userHasAnyRole(...t){return Dl(T.getState().session,...t)}},ql=ya.build();var zt=class extends Event{constructor(t,n,o,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=n,this.callback=o,this.subscribe=a??!1}};var Fr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let n=this.pendingContextRequests.get(t.context);if(n===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:o}=n;for(let{elementRef:a,callbackRef:i}of o){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new zt(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let n=t.contextTarget??t.composedPath()[0],o=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(n);i===void 0&&a.callbacks.set(n,i=new WeakSet),i.has(o)||(i.add(o),a.requests.push({elementRef:new WeakRef(n),callbackRef:new WeakRef(o)}))}}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 J=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},G=class extends kt.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=ql,this.contextRoot=new Fr}render(){return Yl.html`
|
|
836
836
|
<slot></slot>
|
|
837
837
|
`}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 n;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(o=>Dr.addContext(o)),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")&&((n=this.stateManager)===null||n===void 0||n.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};G.elementDefinitions={};G.styles=Kl;J([(0,ie.property)()],G.prototype,"baseUrl",void 0);J([(0,ie.property)()],G.prototype,"tenantId",void 0);J([(0,ie.property)()],G.prototype,"apiIntegrationIdentifier",void 0);J([(0,ie.property)()],G.prototype,"apiIntegrationAppVersion",void 0);J([(0,ie.property)()],G.prototype,"uiLocale",void 0);J([(0,kt.jsonProperty)(null)],G.prototype,"availableUiLocales",void 0);J([(0,kt.jsonProperty)(null)],G.prototype,"metadataConfiguration",void 0);J([(0,ie.property)({type:Boolean})],G.prototype,"editorMode",void 0);J([(0,ie.property)({type:Boolean})],G.prototype,"noCustom",void 0);J([(0,ie.property)({type:Boolean})],G.prototype,"openExternalDocumentInNewTab",void 0);J([(0,ie.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],G.prototype,"noCustomComponent",void 0);J([(0,ie.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],G.prototype,"noCustomCode",void 0);J([(0,ie.property)({type:Boolean})],G.prototype,"withManualResources",void 0);J([(0,ie.property)({type:Boolean})],G.prototype,"navigatorOnline",void 0);J([(0,ie.property)({type:Boolean})],G.prototype,"forcedOffline",void 0);J([(0,ie.property)({type:Boolean})],G.prototype,"authenticationRequired",void 0);J([(0,kt.jsonProperty)([])],G.prototype,"messageContexts",void 0);J([(0,kt.jsonProperty)(void 0)],G.prototype,"session",void 0);var Ql=E(P());var Xl={"ft-app-context":G};(0,Ql.customElements)(Xl);var Jl=E(oe());var ba=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[n,o]=t.split(".");return{context:n,key:o,custom:n!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},tr=new ba;var cd=function(e,t,n,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,n):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,o);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},$r=Symbol("i18nAttributes"),e1=Symbol("i18nListAttributes"),t1=Symbol("i18nProperties"),qn=Symbol("i18nContexts"),Br=Symbol("i18nUnsubs"),r1=(0,rr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,n;class o extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[n]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?ua:Dr}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(tr.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[$r])===null||s===void 0||s.forEach((h,g)=>f[g]=m(h,g,f[g])),(l=this[e1])===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[t1])===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[qn].set(f,{isCustomContext:l}),this[Br].has(f)||this[Br].set(f,this.getI18nService(l).subscribe(f,()=>this.onI18nUpdate(f))),this.getI18nService(l).prepareContext(f,s)}hasI18nContext(i){return this[qn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[qn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Br].forEach(i=>i()),this[Br].clear()}}return t=qn,n=Br,cd([(0,Jl.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Yn=class extends r1(rr.FtLitElement){},Xn=class extends r1(rr.FtLitElementRedux){};var n1=E(P());var xa=class{fromAttribute(t){if(!t)return[];try{let n=JSON.parse(t);return Array.isArray(n)?n.map(o=>typeof o=="string"?tr.fromAttribute(o):o):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},ld=new xa;var o1=(e,t)=>(n,o)=>{var a;n.constructor.createProperty(o,{type:Object,hasChanged:n1.hasChanged,converter:tr,...t}),n[$r]=(a=n[$r])!==null&&a!==void 0?a:new Map,n[$r].set(o,e??{})};var a1=E(j());var i1=a1.css`
|