@fluid-topics/ftds-base-input 2.1.5 → 2.1.6

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.
@@ -1535,7 +1535,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
1535
1535
  position: relative;
1536
1536
  word-break: break-word;
1537
1537
  }
1538
- `;var Zl=["top","right","bottom","left"],Kl=["start","end"],Ca=Zl.reduce((e,t)=>e.concat(t,t+"-"+Kl[0],t+"-"+Kl[1]),[]),Yr=Math.min,mt=Math.max,Xr=Math.round;var Be=e=>({x:e,y:e}),uf={left:"right",right:"left",bottom:"top",top:"bottom"};function Ea(e,t,o){return mt(e,Yr(t,o))}function Bo(e,t){return typeof e=="function"?e(t):e}function yr(e){return e.split("-")[0]}function gt(e){return e.split("-")[1]}function La(e){return e==="x"?"y":"x"}function Aa(e){return e==="y"?"height":"width"}function Fo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Oa(e){return La(Fo(e))}function ql(e,t,o){o===void 0&&(o=!1);let n=gt(e),a=Oa(e),i=Aa(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sa(s)),[s,Sa(s)]}function Yl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Sa(e){let t=yr(e);return uf[t]+e.slice(t.length)}function ff(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xl(e){return typeof e!="number"?ff(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function Ql(e,t,o){let{reference:n,floating:a}=e,i=Fo(t),s=Oa(t),l=Aa(s),u=yr(t),p=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,v;switch(u){case"top":v={x:m,y:n.y-a.height};break;case"bottom":v={x:m,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}switch(gt(t)){case"start":v[s]-=y*(o&&p?-1:1);break;case"end":v[s]+=y*(o&&p?-1:1);break}return v}async function Jl(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=Bo(t,e),x=Xl(v),R=l[y?g==="floating"?"reference":"floating":g],O=Tt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(R)))==null||o?R:R.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),_=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,z=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),T=await(i.isElement==null?void 0:i.isElement(z))?await(i.getScale==null?void 0:i.getScale(z))||{x:1,y:1}:{x:1,y:1},F=Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:z,strategy:u}):_);return{top:(O.top-F.top+x.top)/T.y,bottom:(F.bottom-O.bottom+x.bottom)/T.y,left:(O.left-F.left+x.left)/T.x,right:(F.right-O.right+x.right)/T.x}}var pf=50,e2=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:Jl},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=Ql(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let R=i[S];if(!R)continue;let{name:O,fn:_}=R,{x:z,y:T,data:F,reset:j}=await _({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});m=z??m,g=T??g,x[O]={...x[O],...F},j&&v<pf&&(v++,typeof j=="object"&&(j.placement&&(y=j.placement),j.rects&&(p=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):j.rects),{x:m,y:g}=Ql(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function hf(e,t,o){return(e?[...o.filter(a=>gt(a)===e),...o.filter(a=>gt(a)!==e)]:o.filter(a=>yr(a)===a)).filter(a=>e?gt(a)===e||(t?Yl(a)!==a:!1):!0)}var t2=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Ca,autoAlignment:v=!0,...x}=Bo(e,t),S=g!==void 0||y===Ca?hf(g||null,v,y):y,R=await u.detectOverflow(t,x),O=((o=s.autoPlacement)==null?void 0:o.index)||0,_=S[O];if(_==null)return{};let z=ql(_,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==_)return{reset:{placement:S[0]}};let T=[R[yr(_)],R[z[0]],R[z[1]]],F=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:T}],j=S[O+1];if(j)return{data:{index:O+1,overflows:F},reset:{placement:j}};let Ge=F.map(he=>{let xe=gt(he.placement);return[he.placement,xe&&m?he.overflows.slice(0,2).reduce((me,Lt)=>me+Lt,0):he.overflows[0],he.overflows]}).sort((he,xe)=>he[1]-xe[1]),We=((a=Ge.filter(he=>he[2].slice(0,gt(he[0])?2:3).every(xe=>xe<=0))[0])==null?void 0:a[0])||Ge[0][0];return We!==l?{data:{index:O+1,overflows:F},reset:{placement:We}}:{}}}};var r2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:O=>{let{x:_,y:z}=O;return{x:_,y:z}}},...p}=Bo(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=Fo(yr(a)),v=La(y),x=m[v],S=m[y];if(s){let O=v==="y"?"top":"left",_=v==="y"?"bottom":"right",z=x+g[O],T=x-g[_];x=Ea(z,x,T)}if(l){let O=y==="y"?"top":"left",_=y==="y"?"bottom":"right",z=S+g[O],T=S-g[_];S=Ea(z,S,T)}let R=u.fn({...t,[v]:x,[y]:S});return{...R,data:{x:R.x-o,y:R.y-n,enabled:{[v]:s,[y]:l}}}}}};function $o(){return typeof window<"u"}function Dt(e){return n2(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(n2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function n2(e){return $o()?e instanceof Node||e instanceof pe(e).Node:!1}function Ee(e){return $o()?e instanceof Element||e instanceof pe(e).Element:!1}function Ze(e){return $o()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function o2(e){return!$o()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function br(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function a2(e){return/^(table|td|th)$/.test(Dt(e))}function Qr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var mf=/transform|translate|scale|rotate|perspective|filter/,gf=/paint|layout|strict|content/,Pt=e=>!!e&&e!=="none",Ra;function vr(e){let t=Ee(e)?Le(e):e;return Pt(t.transform)||Pt(t.translate)||Pt(t.scale)||Pt(t.rotate)||Pt(t.perspective)||!Go()&&(Pt(t.backdropFilter)||Pt(t.filter))||mf.test(t.willChange||"")||gf.test(t.contain||"")}function i2(e){let t=nt(e);for(;Ze(t)&&!Ut(t);){if(vr(t))return t;if(Qr(t))return null;t=nt(t)}return null}function Go(){return Ra==null&&(Ra=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ra}function Ut(e){return/^(html|body|#document)$/.test(Dt(e))}function Le(e){return pe(e).getComputedStyle(e)}function Jr(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(Dt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||o2(e)&&e.host||Ke(e);return o2(t)?t.host:t}function s2(e){let t=nt(e);return Ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&br(t)?t:s2(t)}function Ho(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=s2(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=pe(a);if(i){let l=Wo(s);return t.concat(s,s.visualViewport||[],br(a)?a:[],l&&o?Ho(l):[])}else return t.concat(a,Ho(a,[],o))}function Wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function u2(e){let t=Le(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Ze(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=Xr(o)!==i||Xr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function f2(e){return Ee(e)?e:e.contextElement}function xr(e){let t=f2(e);if(!Ze(t))return Be(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=u2(t),s=(i?Xr(o.width):o.width)/n,l=(i?Xr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var yf=Be(0);function p2(e){let t=pe(e);return!Go()||!t.visualViewport?yf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bf(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==pe(e)?!1:t}function eo(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=f2(e),s=Be(1);t&&(n?Ee(n)&&(s=xr(n)):s=xr(e));let l=bf(i,o,n)?p2(i):Be(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=pe(i),v=n&&Ee(n)?pe(n):n,x=y,S=Wo(x);for(;S&&n&&v!==x;){let R=xr(S),O=S.getBoundingClientRect(),_=Le(S),z=O.left+(S.clientLeft+parseFloat(_.paddingLeft))*R.x,T=O.top+(S.clientTop+parseFloat(_.paddingTop))*R.y;u*=R.x,p*=R.y,m*=R.x,g*=R.y,u+=z,p+=T,x=pe(S),S=Wo(x)}}return Tt({width:m,height:g,x:u,y:p})}function jo(e,t){let o=Jr(e).scrollLeft;return t?t.left+o:eo(Ke(e)).left+o}function h2(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-jo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function vf(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Ke(n),l=t?Qr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Be(1),m=Be(0),g=Ze(n);if((g||!g&&!i)&&((Dt(n)!=="body"||br(s))&&(u=Jr(n)),g)){let v=eo(n);p=xr(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?h2(s,u):Be(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function xf(e){return Array.from(e.getClientRects())}function Sf(e){let t=Ke(e),o=Jr(e),n=e.ownerDocument.body,a=mt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=mt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+jo(e),l=-o.scrollTop;return Le(n).direction==="rtl"&&(s+=mt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var c2=25;function Cf(e,t){let o=pe(e),n=Ke(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=Go();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=jo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(n.clientWidth-g.clientWidth-v);x<=c2&&(i-=x)}else p<=c2&&(i+=p);return{width:i,height:s,x:l,y:u}}function Ef(e,t){let o=eo(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Ze(e)?xr(e):Be(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function l2(e,t,o){let n;if(t==="viewport")n=Cf(e,o);else if(t==="document")n=Sf(Ke(e));else if(Ee(t))n=Ef(t,o);else{let a=p2(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Tt(n)}function m2(e,t){let o=nt(e);return o===t||!Ee(o)||Ut(o)?!1:Le(o).position==="fixed"||m2(o,t)}function Lf(e,t){let o=t.get(e);if(o)return o;let n=Ho(e,[],!1).filter(l=>Ee(l)&&Dt(l)!=="body"),a=null,i=Le(e).position==="fixed",s=i?nt(e):e;for(;Ee(s)&&!Ut(s);){let l=Le(s),u=vr(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||br(s)&&!u&&m2(e,s))?n=n.filter(m=>m!==s):a=l,s=nt(s)}return t.set(e,n),n}function Af(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Qr(t)?[]:Lf(t,this._c):[].concat(o),n],l=l2(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=l2(t,s[y],a);u=mt(v.top,u),p=Yr(v.right,p),m=Yr(v.bottom,m),g=mt(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function Of(e){let{width:t,height:o}=u2(e);return{width:t,height:o}}function Rf(e,t,o){let n=Ze(t),a=Ke(t),i=o==="fixed",s=eo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Be(0);function p(){u.x=jo(a)}if(n||!n&&!i)if((Dt(t)!=="body"||br(a))&&(l=Jr(t)),n){let v=eo(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?h2(a,l):Be(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function wa(e){return Le(e).position==="static"}function d2(e,t){if(!Ze(e)||Le(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Ke(e)===o&&(o=o.ownerDocument.body),o}function g2(e,t){let o=pe(e);if(Qr(e))return o;if(!Ze(e)){let a=nt(e);for(;a&&!Ut(a);){if(Ee(a)&&!wa(a))return a;a=nt(a)}return o}let n=d2(e,t);for(;n&&a2(n)&&wa(n);)n=d2(n,t);return n&&Ut(n)&&wa(n)&&!vr(n)?o:n||i2(e)||o}var wf=async function(e){let t=this.getOffsetParent||g2,o=this.getDimensions,n=await o(e.floating);return{reference:Rf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nf(e){return Le(e).direction==="rtl"}var Vo={convertOffsetParentRelativeRectToViewportRelativeRect:vf,getDocumentElement:Ke,getClippingRect:Af,getOffsetParent:g2,getElementRects:wf,getClientRects:xf,getDimensions:Of,getScale:xr,isElement:Ee,isRTL:Nf};var y2=t2,b2=r2;var v2=(e,t,o)=>{let n=new Map,a={platform:Vo,...o},i={...a.platform,_c:n};return e2(e,t,{...a,platform:i})};function x2(e){return _f(e)}function Na(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function _f(e){for(let t=e;t;t=Na(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Na(e);t;t=Na(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||vr(o)||t.tagName==="BODY"))return t}return null}async function S2(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},v2(e,t,{strategy:n.strategy,platform:{...Vo,getOffsetParent:a=>Vo.getOffsetParent(a,x2)},middleware:[b2({crossAxis:!0}),y2({allowedPlacements:[n.placement]})]})}var zr=C(P());var ti=C(ae());var C2=C(ae(),1);var _a=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function E2(e,t){return(0,C2.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return to(e);try{return JSON.parse(o)}catch{return to(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:ro,...t??{}})}function Mf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Ko(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Ko(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Ko(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ko(e,t){try{return Mf(e,t)}catch{return!1}}function ro(e,t){return!Ko(e,t)}function to(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Zo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var L2=C(ae(),1);var Ma=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:ro,attribute:!1,...t};(0,L2.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var qo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Bt=C(ae(),1);var Yo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var O2=C(H(),1);var Xo=globalThis,zf=Xo.ShadowRoot&&(Xo.ShadyCSS===void 0||Xo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var A2=(e,t)=>{if(zf)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=Xo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Qo=class extends O2.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return A2(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){_a(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function R2(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Cr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},M2,w2=Symbol("constructorPrototype"),N2=Symbol("constructorName"),z2=Symbol("exportpartsDebouncer"),_2=Symbol("dynamicDependenciesLoaded"),Sr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Sr.eventName="exportparts-updated";var qe=class extends Qo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[M2]=new Yo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[z2].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[N2]=this.constructor.name,this[w2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[N2]&&Object.setPrototypeOf(this,this[w2])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[_2]||(o[_2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Sr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Sr.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 Sr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=R2(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(R=>R.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(R=>R.trim());for(let R of S)m.add(R)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};M2=z2;Cr([(0,Bt.property)()],qe.prototype,"exportpartsPrefix",void 0);Cr([E2([])],qe.prototype,"exportpartsPrefixes",void 0);Cr([(0,Bt.property)({reflect:!0})],qe.prototype,"exportparts",void 0);Cr([(0,Bt.property)()],qe.prototype,"customStylesheet",void 0);Cr([(0,Bt.property)()],qe.prototype,"elementToFocus",void 0);Cr([(0,Bt.state)()],qe.prototype,"useAdoptedStyleSheets",void 0);function Jo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var oo=Symbol("internalReduxEventsUnsubscribers"),yt=Symbol("internalStoresUnsubscribers"),Ft=Symbol("internalStores"),If=Zo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ft].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ft].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ft].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Ft].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ft].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ft].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[yt].has(s.store):this[yt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[yt].set(s,l.subscribe(()=>this.updateFromStores())),this[oo].set(s,[]),Jo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[oo].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[yt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[yt].has(s)&&this[yt].get(s)(),this[yt].delete(s),(l=this[oo].get(s))===null||l===void 0||l.forEach(u=>u()),this[oo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=yt,o=Ft,n=oo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),I2=class extends If(qe){};function Ae(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function at(e){return!!e&&!!e[V]}function Fe(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Hf})(e)||Array.isArray(e)||!!e[F2]||!!(!((t=e.constructor)===null||t===void 0)&&t[F2])||Fa(e)||Ha(e))}function Ht(e,t,o){o===void 0&&(o=!1),Ar(e)===0?(o?Object.keys:Lr)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function Ar(e){var t=e[V];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Fa(e)?2:Ha(e)?3:0}function Er(e,t){return Ar(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kf(e,t){return Ar(e)===2?e.get(t):e[t]}function H2(e,t,o){var n=Ar(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function $2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Fa(e){return Bf&&e instanceof Map}function Ha(e){return Ff&&e instanceof Set}function bt(e){return e.o||e.t}function $a(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=j2(e);delete t[V];for(var o=Lr(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Ga(e,t){return t===void 0&&(t=!1),Wa(e)||at(e)||!Fe(e)||(Ar(e)>1&&(e.set=e.add=e.clear=e.delete=Tf),Object.freeze(e),t&&Ht(e,(function(o,n){return Ga(n,!0)}),!0)),e}function Tf(){Ae(2)}function Wa(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ye(e){var t=Ba[e];return t||Ae(18,e),t}function Pf(e,t){Ba[e]||(Ba[e]=t)}function Pa(){return ao}function za(e,t){t&&(Ye("Patches"),e.u=[],e.s=[],e.v=t)}function en(e){Da(e),e.p.forEach(Df),e.p=null}function Da(e){e===ao&&(ao=e.l)}function k2(e){return ao={p:[],l:ao,h:e,m:!0,_:0}}function Df(e){var t=e[V];t.i===0||t.i===1?t.j():t.g=!0}function Ia(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ye("ES5").S(t,e,n),n?(o[V].P&&(en(t),Ae(4)),Fe(e)&&(e=tn(t,e),t.l||rn(t,e)),t.u&&Ye("Patches").M(o[V].t,e,t.u,t.s)):e=tn(t,o,[]),en(t),t.u&&t.v(t.u,t.s),e!==W2?e:void 0}function tn(e,t,o){if(Wa(t))return t;var n=t[V];if(!n)return Ht(t,(function(l,u){return T2(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return rn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=$a(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Ht(i,(function(l,u){return T2(e,n,a,l,u,o,s)})),rn(e,a,!1),o&&e.u&&Ye("Patches").N(n,o,e.u,e.s)}return n.o}function T2(e,t,o,n,a,i,s){if(at(a)){var l=tn(e,a,i&&t&&t.i!==3&&!Er(t.R,n)?i.concat(n):void 0);if(H2(o,n,l),!at(l))return;e.m=!1}else s&&o.add(a);if(Fe(a)&&!Wa(a)){if(!e.h.D&&e._<1)return;tn(e,a),t&&t.A.l||rn(e,a)}}function rn(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Ga(t,o)}function ka(e,t){var o=e[V];return(o?bt(o):e)[t]}function P2(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function vt(e){e.P||(e.P=!0,e.l&&vt(e.l))}function Ta(e){e.o||(e.o=$a(e.t))}function Ua(e,t,o){var n=Fa(t)?Ye("MapSet").F(t,o):Ha(t)?Ye("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Pa(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=io;s&&(u=[l],p=no);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):Ye("ES5").J(t,o);return(o?o.A:Pa()).p.push(n),n}function Uf(e){return at(e)||Ae(22,e),(function t(o){if(!Fe(o))return o;var n,a=o[V],i=Ar(o);if(a){if(!a.P&&(a.i<4||!Ye("ES5").K(a)))return a.t;a.I=!0,n=D2(o,i),a.I=!1}else n=D2(o,i);return Ht(n,(function(s,l){a&&kf(a.t,s)===l||H2(n,s,t(l))})),i===3?new Set(n):n})(e)}function D2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return $a(e)}function G2(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[V];return io.get(p,s)},set:function(p){var m=this[V];io.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][V];if(!u.P)switch(u.i){case 5:n(u)&&vt(u);break;case 4:o(u)&&vt(u)}}}function o(s){for(var l=s.t,u=s.k,p=Lr(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==V){var y=l[g];if(y===void 0&&!Er(l,g))return!0;var v=u[g],x=v&&v[V];if(x?x.t!==y:!$2(v,y))return!0}}var S=!!l[V];return p.length!==Lr(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&Ae(3,JSON.stringify(bt(s)))}var i={};Pf("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var v=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(v,""+x,e(x,!0));return v}var S=j2(y);delete S[V];for(var R=Lr(S),O=0;O<R.length;O++){var _=R[O];S[_]=e(_,g||!!S[_].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),m={i:u?5:4,A:l?l.A:Pa(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,V,{value:m,writable:!0}),p},S:function(s,l,u){u?at(l)&&l[V].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[V];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)Ht(v,(function(T){T!==V&&(y[T]!==void 0||Er(y,T)?x[T]||p(v[T]):(x[T]=!0,vt(g)))})),Ht(y,(function(T){v[T]!==void 0||Er(v,T)||(x[T]=!1,vt(g))}));else if(S===5){if(n(g)&&(vt(g),x.length=!0),v.length<y.length)for(var R=v.length;R<y.length;R++)x[R]=!1;else for(var O=y.length;O<v.length;O++)x[O]=!0;for(var _=Math.min(v.length,y.length),z=0;z<_;z++)v.hasOwnProperty(z)||(x[z]=!0),x[z]===void 0&&p(v[z])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var U2,ao,ja=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Bf=typeof Map<"u",Ff=typeof Set<"u",B2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",W2=ja?Symbol.for("immer-nothing"):((U2={})["immer-nothing"]=!0,U2),F2=ja?Symbol.for("immer-draftable"):"__$immer_draftable",V=ja?Symbol.for("immer-state"):"__$immer_state";var Hf=""+Object.prototype.constructor,Lr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,j2=Object.getOwnPropertyDescriptors||function(e){var t={};return Lr(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Ba={},io={get:function(e,t){if(t===V)return e;var o=bt(e);if(!Er(o,t))return(function(a,i,s){var l,u=P2(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!Fe(n)?n:n===ka(e.t,t)?(Ta(e),e.o[t]=Ua(e.A.h,n,e)):n},has:function(e,t){return t in bt(e)},ownKeys:function(e){return Reflect.ownKeys(bt(e))},set:function(e,t,o){var n=P2(bt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=ka(bt(e),t),i=a?.[V];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if($2(o,a)&&(o!==void 0||Er(e.t,t)))return!0;Ta(e),vt(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return ka(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Ta(e),vt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=bt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Ae(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ae(12)}},no={};Ht(io,(function(e,t){no[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),no.deleteProperty=function(e,t){return no.set.call(this,e,t,void 0)},no.set=function(e,t,o){return io.set.call(this,e[0],t,o,e[0])};var $f=(function(){function e(o){var n=this;this.O=B2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(S){var R=this;S===void 0&&(S=l);for(var O=arguments.length,_=Array(O>1?O-1:0),z=1;z<O;z++)_[z-1]=arguments[z];return u.produce(S,(function(T){var F;return(F=i).call.apply(F,[R,T].concat(_))}))}}var p;if(typeof i!="function"&&Ae(6),s!==void 0&&typeof s!="function"&&Ae(7),Fe(a)){var m=k2(n),g=Ua(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?en(m):Da(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return za(m,s),Ia(S,m)}),(function(S){throw en(m),S})):(za(m,s),Ia(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===W2&&(p=void 0),n.D&&Ga(p,!0),s){var v=[],x=[];Ye("Patches").M(a,p,v,x),s(v,x)}return p}Ae(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Fe(o)||Ae(8),at(o)&&(o=Uf(o));var n=k2(this),a=Ua(this,o,void 0);return a[V].C=!0,Da(n),a},t.finishDraft=function(o,n){var a=o&&o[V],i=a.A;return za(i,n),Ia(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!B2&&Ae(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Ye("Patches").$;return at(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),ye=new $f,Gf=ye.produce,xg=ye.produceWithPatches.bind(ye),Sg=ye.setAutoFreeze.bind(ye),Cg=ye.setUseProxies.bind(ye),Eg=ye.applyPatches.bind(ye),Lg=ye.createDraft.bind(ye),Ag=ye.finishDraft.bind(ye),on=Gf;function $t(e){"@babel/helpers - typeof";return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$t(e)}function V2(e,t){if($t(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if($t(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K2(e){var t=V2(e,"string");return $t(t)=="symbol"?t:t+""}function Z2(e,t,o){return(t=K2(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function q2(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Va(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q2(Object(o),!0).forEach(function(n){Z2(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q2(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function le(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Y2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ka=function(){return Math.random().toString(36).substring(7).split("").join(".")},nn={INIT:"@@redux/INIT"+Ka(),REPLACE:"@@redux/REPLACE"+Ka(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ka()}};function Wf(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Za(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(le(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(le(1));return o(Za)(e,t)}if(typeof e!="function")throw new Error(le(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(le(3));return i}function g(S){if(typeof S!="function")throw new Error(le(4));if(u)throw new Error(le(5));var R=!0;return p(),l.push(S),function(){if(R){if(u)throw new Error(le(6));R=!1,p();var _=l.indexOf(S);l.splice(_,1),s=null}}}function y(S){if(!Wf(S))throw new Error(le(7));if(typeof S.type>"u")throw new Error(le(8));if(u)throw new Error(le(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var R=s=l,O=0;O<R.length;O++){var _=R[O];_()}return S}function v(S){if(typeof S!="function")throw new Error(le(10));a=S,y({type:nn.REPLACE})}function x(){var S,R=g;return S={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(le(11));function z(){_.next&&_.next(m())}z();var T=R(z);return{unsubscribe:T}}},S[Y2]=function(){return this},S}return y({type:nn.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[Y2]=x,n}function jf(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:nn.INIT});if(typeof n>"u")throw new Error(le(12));if(typeof o(void 0,{type:nn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(le(13))})}function X2(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{jf(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],R=o[S],O=p[S],_=R(O,m);if(typeof _>"u"){var z=m&&m.type;throw new Error(le(14))}v[S]=_,y=y||_!==O}return y=y||i.length!==Object.keys(p).length,y?v:p}}function Or(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Q2(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(le(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=Or.apply(void 0,l)(a.dispatch),Va(Va({},a),{},{dispatch:i})}}}function J2(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var e1=J2();e1.withExtraArgument=J2;var qa=e1;var a1=(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),Vf=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Rr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},Kf=Object.defineProperty,Zf=Object.defineProperties,qf=Object.getOwnPropertyDescriptors,t1=Object.getOwnPropertySymbols,Yf=Object.prototype.hasOwnProperty,Xf=Object.prototype.propertyIsEnumerable,r1=function(e,t,o){return t in e?Kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},xt=function(e,t){for(var o in t||(t={}))Yf.call(t,o)&&r1(e,o,t[o]);if(t1)for(var n=0,a=t1(t);n<a.length;n++){var o=a[n];Xf.call(t,o)&&r1(e,o,t[o])}return e},Ya=function(e,t){return Zf(e,qf(t))},Qf=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var Jf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Or:Or.apply(null,arguments)},Gg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function e3(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function St(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return xt(xt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var t3=(function(e){a1(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Rr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Rr([void 0],o.concat(this))))},t})(Array),r3=(function(e){a1(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Rr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Rr([void 0],o.concat(this))))},t})(Array);function Ja(e){return Fe(e)?on(e,function(){}):e}function o3(e){return typeof e=="boolean"}function n3(){return function(t){return a3(t)}}function a3(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new t3;if(o&&(o3(o)?p.push(qa):p.push(qa.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var Xa=!0;function i1(e){var t=n3(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(e3(a))v=X2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(t),!Xa&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xa&&x.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Q2.apply(void 0,x),R=Or;u&&(R=Jf(xt({trace:!Xa},typeof u=="object"&&u)));var O=new r3(S),_=O;Array.isArray(y)?_=Rr([S],y):typeof y=="function"&&(_=y(O));var z=R.apply(void 0,_);return Za(v,m,z)}function s1(e){var t={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function i3(e){return typeof e=="function"}function s3(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?s1(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(i3(e))u=function(){return Ja(e())};else{var p=Ja(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=Rr([i[y.type]],s.filter(function(x){var S=x.matcher;return S(y)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[l]),v.reduce(function(x,S){if(S)if(at(x)){var R=x,O=S(R,y);return O===void 0?x:O}else{if(Fe(x))return on(x,function(_){return S(_,y)});var O=S(x,y);if(O===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return x},g)}return m.getInitialState=u,m}function c3(e,t){return e+"/"+t}function c1(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Ja(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=c3(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?St(y,x):St(y)});function u(){var m=typeof e.extraReducers=="function"?s1(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],R=S===void 0?void 0:S,O=xt(xt({},y),s);return s3(o,function(_){for(var z in O)_.addCase(z,O[z]);for(var T=0,F=x;T<F.length;T++){var j=F[T];_.addMatcher(j.matcher,j.reducer)}R&&_.addDefaultCase(R)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var l3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",d3=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=l3[Math.random()*64|0];return t},u3=["name","message","stack","code"],Qa=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),o1=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),f3=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=u3;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Kg=(function(){function e(t,o,n){var a=St(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:Ya(xt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=St(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ya(xt({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=St(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||f3)(m||"Rejected"),meta:Ya(xt({},x||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function p(m){return function(g,y,v){var x=n?.idGenerator?n.idGenerator(m):d3(),S=new u,R,O=!1;function _(T){R=T,S.abort()}var z=(function(){return Qf(this,null,function(){var T,F,j,Ge,Et,We,he;return Vf(this,function(xe){switch(xe.label){case 0:return xe.trys.push([0,4,,5]),Ge=(T=n?.condition)==null?void 0:T.call(n,m,{getState:y,extra:v}),h3(Ge)?[4,Ge]:[3,2];case 1:Ge=xe.sent(),xe.label=2;case 2:if(Ge===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return O=!0,Et=new Promise(function(me,Lt){return S.signal.addEventListener("abort",function(){return Lt({name:"AbortError",message:R||"Aborted"})})}),g(i(x,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([Et,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:_,rejectWithValue:function(me,Lt){return new Qa(me,Lt)},fulfillWithValue:function(me,Lt){return new o1(me,Lt)}})).then(function(me){if(me instanceof Qa)throw me;return me instanceof o1?a(me.payload,x,m,me.meta):a(me,x,m)})])];case 3:return j=xe.sent(),[3,5];case 4:return We=xe.sent(),j=We instanceof Qa?s(null,x,m,We.payload,We.meta):s(We,x,m),[3,5];case 5:return he=n&&!n.dispatchConditionRejection&&s.match(j)&&j.meta.condition,he||g(j),[2,j]}})})})();return Object.assign(z,{abort:_,requestId:x,arg:m,unwrap:function(){return z.then(p3)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function p3(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function h3(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var l1="listener",d1="completed",u1="cancelled",Zg="task-"+u1,qg="task-"+d1,Yg=l1+"-"+u1,Xg=l1+"-"+d1;var ei="listenerMiddleware";var Qg=St(ei+"/add"),Jg=St(ei+"/removeAll"),e9=St(ei+"/remove");var n1,t9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(n1||(n1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},m3=function(e){return function(t){setTimeout(t,e)}},r9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:m3(10);G2();var g3=Zo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),an=class extends g3(Object){};window.ftReduxStores||(window.ftReduxStores={});var f1=class e extends an{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Jo(i))return i;if(a==null)return;let s=c1({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=i1({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=to(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new qo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,p=i[u];return p?(...m)=>{let g=p(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var sn=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var cn=C(P()),y3="ft-app-info",wr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};wr.eventName="authentication-change";var so=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};so.eventName="ui-locale-changed";var b3={session:(e,t)=>{(0,cn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new wr(t.payload)),0))}},U=cn.FtReduxStore.get({name:y3,reducers:b3,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var p1=C(P()),ln=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},_9=(0,p1.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>sn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ln([(0,ti.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ln([(0,ti.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ln([Ma({store:U.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ln([Ma({store:U.name})],t.prototype,"uiLocale",void 0),t});var h1;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(h1||(h1={}));var m1;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(m1||(m1={}));var g1;(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"})(g1||(g1={}));var y1;(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"})(y1||(y1={}));var b1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(b1||(b1={}));var v1;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(v1||(v1={}));var x1;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(x1||(x1={}));var S1;(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"})(S1||(S1={}));var C1;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(C1||(C1={}));var E1;(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"})(E1||(E1={}));var L1;(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"})(L1||(L1={}));var A1;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(A1||(A1={}));var O1;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(O1||(O1={}));var R1;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(R1||(R1={}));var w1;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(w1||(w1={}));var N1;(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"})(N1||(N1={}));var _1;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(_1||(_1={}));var M1;(function(e){e.ASC="ASC",e.DESC="DESC"})(M1||(M1={}));var z1;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(z1||(z1={}));var I1;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(I1||(I1={}));var k1;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(k1||(k1={}));var T1;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(T1||(T1={}));var P1;(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"})(P1||(P1={}));var D1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(D1||(D1={}));var U1;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(U1||(U1={}));var B1;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(B1||(B1={}));var F1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(F1||(F1={}));var oe;(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"})(oe||(oe={}));var Oe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Oe||(Oe={}));var H1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(H1||(H1={}));var $1;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})($1||($1={}));var G1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(G1||(G1={}));var W1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.OTHER="OTHER"})(W1||(W1={}));var j1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(j1||(j1={}));var V1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(V1||(V1={}));var K1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(K1||(K1={}));var Z1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Z1||(Z1={}));var q1;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(q1||(q1={}));var Y1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Y1||(Y1={}));var X1;(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"})(X1||(X1={}));var Q1;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Q1||(Q1={}));var v3={[oe.PERSONAL_BOOK_SHARE_USER]:[oe.PERSONAL_BOOK_USER],[oe.HTML_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.PDF_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.KHUB_ADMIN]:[oe.CONTENT_PUBLISHER],[oe.ADMIN]:[oe.KHUB_ADMIN,oe.USERS_ADMIN,oe.PORTAL_ADMIN,oe.BEHAVIOR_DATA_USER],[oe.GENERATIVE_AI_EXPORT_USER]:[oe.GENERATIVE_AI_USER]};function J1(e,t){return e===t||(v3[e]??[]).some(o=>J1(o,t))}function e4(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>J1(n,t))}var hn=C(P());var ri=C(P());var Gt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var Nr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Gt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Gt.await()}};var be=class extends Nr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ri.CacheRegistry,this.cache=t?a.commonCache:new ri.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var dn=class extends be{async listMySearches(){let{session:t}=U.getState();return e4(t,oe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var un=class extends be{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var fn=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var pn=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var x3="ft-user-assets",S3={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Oe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;ni(e,o,[...oi(e,o),a]),t4(e,o,1,n),r4(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ni(e,o,oi(e,o).map(a=>a.id===n.id?n:a)),r4(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;ni(e,o,oi(e,o).filter(i=>i.id!==a)),t4(e,o,-1,n)}},o4={[Oe.SEARCHES]:"savedSearches",[Oe.BOOKMARKS]:"bookmarks",[Oe.BOOKS]:void 0,[Oe.COLLECTIONS]:void 0},oi=(e,t)=>{var o;let n=o4[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ni=(e,t,o)=>{let n=o4[t];n&&(e[n]=o)},t4=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Oe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},r4=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ue=hn.FtReduxStore.get({name:x3,reducers:S3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Oe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ai=class{constructor(t=new fn,o=new pn){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new un,this.savedSearchesService=new dn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=U.getState();(0,hn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ue.actions.clearAssetCount(),ue.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ue.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ue.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ue.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ue.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ue.getState().assetCounts.allAsset[t]!==o.count&&ue.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ue.getState().assetCounts.bookmarkByMap[t]!==o.count&&ue.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ue.getState().assetCounts.bookmarkByMap).length!==0;t===Oe.BOOKMARKS&&o&&ue.actions.clearBookmarkCountByMap(),ue.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ue.actions.bookmarks(o)}}},C3=new ai;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=C3);var ii=class{addCommand(t,o=!1){U.commands.add(t,o)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ii;var Re=C(P());var n4,_r=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},E3=Symbol("clearAfterUnitTest"),mn=class extends(0,Re.withEventBus)(be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[n4]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Re.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Re.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Re.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new _r({loadedContexts:t})),this.dispatchEvent(new _r({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new _r({loadedContexts:[t]})),this.dispatchEvent(new _r({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Re.delay)(0).then(()=>n()).catch(()=>null)))}};n4=E3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends mn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends mn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var co=window.FluidTopicsI18nService,si=window.FluidTopicsCustomI18nService;var a4=C(P()),ci=class{highlightHtml(t,o,n){(0,a4.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new ci;var i4=C(P());var li=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=U.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return i4.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new li;var s4=C(P());var lo=class{static get(t,o){var n,a;let i=U.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new s4.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var di=class{urlToSearchRequest(t){return lo.get().parse(t)}searchRequestToUrl(t){return lo.get().serialize(t)}};window.FluidTopicsUrlService=new di;var it=C(P());var Wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Wt.eventName="change";var ui=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},c4=new ui;var gn=class e extends it.WithEventBus{static build(){return new e(window.history,c4,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,it.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Wt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Wt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Wt.eventName,t)}currentItem(){return(0,it.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,it.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,it.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,it.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.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)});var l4=C(H());var d4=l4.css`
1538
+ `;var Zl=["top","right","bottom","left"],Kl=["start","end"],Ca=Zl.reduce((e,t)=>e.concat(t,t+"-"+Kl[0],t+"-"+Kl[1]),[]),Yr=Math.min,mt=Math.max,Xr=Math.round;var Be=e=>({x:e,y:e}),uf={left:"right",right:"left",bottom:"top",top:"bottom"};function Ea(e,t,o){return mt(e,Yr(t,o))}function Bo(e,t){return typeof e=="function"?e(t):e}function yr(e){return e.split("-")[0]}function gt(e){return e.split("-")[1]}function La(e){return e==="x"?"y":"x"}function Aa(e){return e==="y"?"height":"width"}function Fo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Oa(e){return La(Fo(e))}function ql(e,t,o){o===void 0&&(o=!1);let n=gt(e),a=Oa(e),i=Aa(a),s=a==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sa(s)),[s,Sa(s)]}function Yl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Sa(e){let t=yr(e);return uf[t]+e.slice(t.length)}function ff(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xl(e){return typeof e!="number"?ff(e):{top:e,right:e,bottom:e,left:e}}function Tt(e){let{x:t,y:o,width:n,height:a}=e;return{width:n,height:a,top:o,left:t,right:t+n,bottom:o+a,x:t,y:o}}function Ql(e,t,o){let{reference:n,floating:a}=e,i=Fo(t),s=Oa(t),l=Aa(s),u=yr(t),p=i==="y",m=n.x+n.width/2-a.width/2,g=n.y+n.height/2-a.height/2,y=n[l]/2-a[l]/2,v;switch(u){case"top":v={x:m,y:n.y-a.height};break;case"bottom":v={x:m,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:g};break;case"left":v={x:n.x-a.width,y:g};break;default:v={x:n.x,y:n.y}}switch(gt(t)){case"start":v[s]-=y*(o&&p?-1:1);break;case"end":v[s]+=y*(o&&p?-1:1);break}return v}async function Jl(e,t){var o;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:y=!1,padding:v=0}=Bo(t,e),x=Xl(v),R=l[y?g==="floating"?"reference":"floating":g],O=Tt(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(R)))==null||o?R:R.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),_=g==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,z=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),T=await(i.isElement==null?void 0:i.isElement(z))?await(i.getScale==null?void 0:i.getScale(z))||{x:1,y:1}:{x:1,y:1},F=Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:z,strategy:u}):_);return{top:(O.top-F.top+x.top)/T.y,bottom:(F.bottom-O.bottom+x.bottom)/T.y,left:(O.left-F.left+x.left)/T.x,right:(F.right-O.right+x.right)/T.x}}var pf=50,e2=async(e,t,o)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=o,l=s.detectOverflow?s:{...s,detectOverflow:Jl},u=await(s.isRTL==null?void 0:s.isRTL(t)),p=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:g}=Ql(p,n,u),y=n,v=0,x={};for(let S=0;S<i.length;S++){let R=i[S];if(!R)continue;let{name:O,fn:_}=R,{x:z,y:T,data:F,reset:j}=await _({x:m,y:g,initialPlacement:n,placement:y,strategy:a,middlewareData:x,rects:p,platform:l,elements:{reference:e,floating:t}});m=z??m,g=T??g,x[O]={...x[O],...F},j&&v<pf&&(v++,typeof j=="object"&&(j.placement&&(y=j.placement),j.rects&&(p=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):j.rects),{x:m,y:g}=Ql(p,y,u)),S=-1)}return{x:m,y:g,placement:y,strategy:a,middlewareData:x}};function hf(e,t,o){return(e?[...o.filter(a=>gt(a)===e),...o.filter(a=>gt(a)!==e)]:o.filter(a=>yr(a)===a)).filter(a=>e?gt(a)===e||(t?Yl(a)!==a:!1):!0)}var t2=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var o,n,a;let{rects:i,middlewareData:s,placement:l,platform:u,elements:p}=t,{crossAxis:m=!1,alignment:g,allowedPlacements:y=Ca,autoAlignment:v=!0,...x}=Bo(e,t),S=g!==void 0||y===Ca?hf(g||null,v,y):y,R=await u.detectOverflow(t,x),O=((o=s.autoPlacement)==null?void 0:o.index)||0,_=S[O];if(_==null)return{};let z=ql(_,i,await(u.isRTL==null?void 0:u.isRTL(p.floating)));if(l!==_)return{reset:{placement:S[0]}};let T=[R[yr(_)],R[z[0]],R[z[1]]],F=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:T}],j=S[O+1];if(j)return{data:{index:O+1,overflows:F},reset:{placement:j}};let Ge=F.map(he=>{let xe=gt(he.placement);return[he.placement,xe&&m?he.overflows.slice(0,2).reduce((me,Lt)=>me+Lt,0):he.overflows[0],he.overflows]}).sort((he,xe)=>he[1]-xe[1]),We=((a=Ge.filter(he=>he[2].slice(0,gt(he[0])?2:3).every(xe=>xe<=0))[0])==null?void 0:a[0])||Ge[0][0];return We!==l?{data:{index:O+1,overflows:F},reset:{placement:We}}:{}}}};var r2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:u={fn:O=>{let{x:_,y:z}=O;return{x:_,y:z}}},...p}=Bo(e,t),m={x:o,y:n},g=await i.detectOverflow(t,p),y=Fo(yr(a)),v=La(y),x=m[v],S=m[y];if(s){let O=v==="y"?"top":"left",_=v==="y"?"bottom":"right",z=x+g[O],T=x-g[_];x=Ea(z,x,T)}if(l){let O=y==="y"?"top":"left",_=y==="y"?"bottom":"right",z=S+g[O],T=S-g[_];S=Ea(z,S,T)}let R=u.fn({...t,[v]:x,[y]:S});return{...R,data:{x:R.x-o,y:R.y-n,enabled:{[v]:s,[y]:l}}}}}};function $o(){return typeof window<"u"}function Dt(e){return n2(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ke(e){var t;return(t=(n2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function n2(e){return $o()?e instanceof Node||e instanceof pe(e).Node:!1}function Ee(e){return $o()?e instanceof Element||e instanceof pe(e).Element:!1}function Ze(e){return $o()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function o2(e){return!$o()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}function br(e){let{overflow:t,overflowX:o,overflowY:n,display:a}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&a!=="inline"&&a!=="contents"}function a2(e){return/^(table|td|th)$/.test(Dt(e))}function Qr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var mf=/transform|translate|scale|rotate|perspective|filter/,gf=/paint|layout|strict|content/,Pt=e=>!!e&&e!=="none",Ra;function vr(e){let t=Ee(e)?Le(e):e;return Pt(t.transform)||Pt(t.translate)||Pt(t.scale)||Pt(t.rotate)||Pt(t.perspective)||!Go()&&(Pt(t.backdropFilter)||Pt(t.filter))||mf.test(t.willChange||"")||gf.test(t.contain||"")}function i2(e){let t=nt(e);for(;Ze(t)&&!Ut(t);){if(vr(t))return t;if(Qr(t))return null;t=nt(t)}return null}function Go(){return Ra==null&&(Ra=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ra}function Ut(e){return/^(html|body|#document)$/.test(Dt(e))}function Le(e){return pe(e).getComputedStyle(e)}function Jr(e){return Ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(Dt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||o2(e)&&e.host||Ke(e);return o2(t)?t.host:t}function s2(e){let t=nt(e);return Ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&br(t)?t:s2(t)}function Ho(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=s2(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=pe(a);if(i){let l=Wo(s);return t.concat(s,s.visualViewport||[],br(a)?a:[],l&&o?Ho(l):[])}else return t.concat(a,Ho(a,[],o))}function Wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function u2(e){let t=Le(e),o=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Ze(e),i=a?e.offsetWidth:o,s=a?e.offsetHeight:n,l=Xr(o)!==i||Xr(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function f2(e){return Ee(e)?e:e.contextElement}function xr(e){let t=f2(e);if(!Ze(t))return Be(1);let o=t.getBoundingClientRect(),{width:n,height:a,$:i}=u2(t),s=(i?Xr(o.width):o.width)/n,l=(i?Xr(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var yf=Be(0);function p2(e){let t=pe(e);return!Go()||!t.visualViewport?yf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bf(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==pe(e)?!1:t}function eo(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),i=f2(e),s=Be(1);t&&(n?Ee(n)&&(s=xr(n)):s=xr(e));let l=bf(i,o,n)?p2(i):Be(0),u=(a.left+l.x)/s.x,p=(a.top+l.y)/s.y,m=a.width/s.x,g=a.height/s.y;if(i){let y=pe(i),v=n&&Ee(n)?pe(n):n,x=y,S=Wo(x);for(;S&&n&&v!==x;){let R=xr(S),O=S.getBoundingClientRect(),_=Le(S),z=O.left+(S.clientLeft+parseFloat(_.paddingLeft))*R.x,T=O.top+(S.clientTop+parseFloat(_.paddingTop))*R.y;u*=R.x,p*=R.y,m*=R.x,g*=R.y,u+=z,p+=T,x=pe(S),S=Wo(x)}}return Tt({width:m,height:g,x:u,y:p})}function jo(e,t){let o=Jr(e).scrollLeft;return t?t.left+o:eo(Ke(e)).left+o}function h2(e,t){let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-jo(e,o),a=o.top+t.scrollTop;return{x:n,y:a}}function vf(e){let{elements:t,rect:o,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Ke(n),l=t?Qr(t.floating):!1;if(n===s||l&&i)return o;let u={scrollLeft:0,scrollTop:0},p=Be(1),m=Be(0),g=Ze(n);if((g||!g&&!i)&&((Dt(n)!=="body"||br(s))&&(u=Jr(n)),g)){let v=eo(n);p=xr(n),m.x=v.x+n.clientLeft,m.y=v.y+n.clientTop}let y=s&&!g&&!i?h2(s,u):Be(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-u.scrollLeft*p.x+m.x+y.x,y:o.y*p.y-u.scrollTop*p.y+m.y+y.y}}function xf(e){return Array.from(e.getClientRects())}function Sf(e){let t=Ke(e),o=Jr(e),n=e.ownerDocument.body,a=mt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=mt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+jo(e),l=-o.scrollTop;return Le(n).direction==="rtl"&&(s+=mt(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:l}}var c2=25;function Cf(e,t){let o=pe(e),n=Ke(e),a=o.visualViewport,i=n.clientWidth,s=n.clientHeight,l=0,u=0;if(a){i=a.width,s=a.height;let m=Go();(!m||m&&t==="fixed")&&(l=a.offsetLeft,u=a.offsetTop)}let p=jo(n);if(p<=0){let m=n.ownerDocument,g=m.body,y=getComputedStyle(g),v=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,x=Math.abs(n.clientWidth-g.clientWidth-v);x<=c2&&(i-=x)}else p<=c2&&(i+=p);return{width:i,height:s,x:l,y:u}}function Ef(e,t){let o=eo(e,!0,t==="fixed"),n=o.top+e.clientTop,a=o.left+e.clientLeft,i=Ze(e)?xr(e):Be(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,u=a*i.x,p=n*i.y;return{width:s,height:l,x:u,y:p}}function l2(e,t,o){let n;if(t==="viewport")n=Cf(e,o);else if(t==="document")n=Sf(Ke(e));else if(Ee(t))n=Ef(t,o);else{let a=p2(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Tt(n)}function m2(e,t){let o=nt(e);return o===t||!Ee(o)||Ut(o)?!1:Le(o).position==="fixed"||m2(o,t)}function Lf(e,t){let o=t.get(e);if(o)return o;let n=Ho(e,[],!1).filter(l=>Ee(l)&&Dt(l)!=="body"),a=null,i=Le(e).position==="fixed",s=i?nt(e):e;for(;Ee(s)&&!Ut(s);){let l=Le(s),u=vr(s);!u&&l.position==="fixed"&&(a=null),(i?!u&&!a:!u&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||br(s)&&!u&&m2(e,s))?n=n.filter(m=>m!==s):a=l,s=nt(s)}return t.set(e,n),n}function Af(e){let{element:t,boundary:o,rootBoundary:n,strategy:a}=e,s=[...o==="clippingAncestors"?Qr(t)?[]:Lf(t,this._c):[].concat(o),n],l=l2(t,s[0],a),u=l.top,p=l.right,m=l.bottom,g=l.left;for(let y=1;y<s.length;y++){let v=l2(t,s[y],a);u=mt(v.top,u),p=Yr(v.right,p),m=Yr(v.bottom,m),g=mt(v.left,g)}return{width:p-g,height:m-u,x:g,y:u}}function Of(e){let{width:t,height:o}=u2(e);return{width:t,height:o}}function Rf(e,t,o){let n=Ze(t),a=Ke(t),i=o==="fixed",s=eo(e,!0,i,t),l={scrollLeft:0,scrollTop:0},u=Be(0);function p(){u.x=jo(a)}if(n||!n&&!i)if((Dt(t)!=="body"||br(a))&&(l=Jr(t)),n){let v=eo(t,!0,i,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else a&&p();i&&!n&&a&&p();let m=a&&!n&&!i?h2(a,l):Be(0),g=s.left+l.scrollLeft-u.x-m.x,y=s.top+l.scrollTop-u.y-m.y;return{x:g,y,width:s.width,height:s.height}}function wa(e){return Le(e).position==="static"}function d2(e,t){if(!Ze(e)||Le(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Ke(e)===o&&(o=o.ownerDocument.body),o}function g2(e,t){let o=pe(e);if(Qr(e))return o;if(!Ze(e)){let a=nt(e);for(;a&&!Ut(a);){if(Ee(a)&&!wa(a))return a;a=nt(a)}return o}let n=d2(e,t);for(;n&&a2(n)&&wa(n);)n=d2(n,t);return n&&Ut(n)&&wa(n)&&!vr(n)?o:n||i2(e)||o}var wf=async function(e){let t=this.getOffsetParent||g2,o=this.getDimensions,n=await o(e.floating);return{reference:Rf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Nf(e){return Le(e).direction==="rtl"}var Vo={convertOffsetParentRelativeRectToViewportRelativeRect:vf,getDocumentElement:Ke,getClippingRect:Af,getOffsetParent:g2,getElementRects:wf,getClientRects:xf,getDimensions:Of,getScale:xr,isElement:Ee,isRTL:Nf};var y2=t2,b2=r2;var v2=(e,t,o)=>{let n=new Map,a={platform:Vo,...o},i={...a.platform,_c:n};return e2(e,t,{...a,platform:i})};function x2(e){return _f(e)}function Na(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function _f(e){for(let t=e;t;t=Na(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Na(e);t;t=Na(t)){if(!(t instanceof Element))continue;let o=getComputedStyle(t);if(o.display!=="contents"&&(o.position!=="static"||vr(o)||t.tagName==="BODY"))return t}return null}async function S2(e,t,o){let n;return typeof o=="object"?n=o:n={placement:o},v2(e,t,{strategy:n.strategy,platform:{...Vo,getOffsetParent:a=>Vo.getOffsetParent(a,x2)},middleware:[b2({crossAxis:!0}),y2({allowedPlacements:[n.placement]})]})}var zr=C(P());var ti=C(ae());var C2=C(ae(),1);var _a=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function E2(e,t){return(0,C2.property)({type:Object,converter:{fromAttribute:o=>{if(o==null)return to(e);try{return JSON.parse(o)}catch{return to(e)}},toAttribute:o=>JSON.stringify(o)},hasChanged:ro,...t??{}})}function Mf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let o,n;if(Array.isArray(e)){if(o=e.length,o!=t.length)return!1;for(n=o;n--!==0;)if(!Ko(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!Ko(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let a=s=>Object.keys(s).filter(l=>s[l]!=null),i=a(e);if(o=i.length,o!==a(t).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=o;n--!==0;){let s=i[n];if(!Ko(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Ko(e,t){try{return Mf(e,t)}catch{return!1}}function ro(e,t){return!Ko(e,t)}function to(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Zo(e,t){let o=n=>n[e]===!0;return n=>{if(o(n))return n;let a=t(n);return a[e]=!0,a}}var L2=C(ae(),1);var Ma=e=>{let t=e??{};return(o,n)=>{var a;let i={hasChanged:ro,attribute:!1,...t};(0,L2.property)(i)(o,n);let s=o.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(n,{selector:(a=t.selector)!==null&&a!==void 0?a:(l=>l[n]),store:t.store})}};var qo=class{constructor(){this.queue=[]}add(t,o=!1){o&&this.clear(t.type),this.queue.push(t)}consume(t){let o=this.queue.find(n=>n.type===t);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}clear(t){typeof t=="string"?this.queue=this.queue.filter(o=>o.type!==t):this.queue=this.queue.filter(o=>!t.test(o.type))}};var Bt=C(ae(),1);var Yo=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,o){return this.callbacks=[t],this.debounce(o)}queue(t,o){return this.callbacks.push(t),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,o;let n=[...this.callbacks];this.callbacks=[];let a=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),i=(o=this.resolvePromise)!==null&&o!==void 0?o:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){a(l);return}i(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var O2=C(H(),1);var Xo=globalThis,zf=Xo.ShadowRoot&&(Xo.ShadyCSS===void 0||Xo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var A2=(e,t)=>{if(zf)e.adoptedStyleSheets=t.map((o=>o instanceof CSSStyleSheet?o:o.styleSheet));else for(let o of t){let n=document.createElement("style"),a=Xo.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,e.appendChild(n)}};var Qo=class extends O2.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let o={...t.shadowRootOptions,customElements:t.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return A2(n,t.elementStyles),n}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([o,n])=>this.defineScopedElement(o,n))}static defineScopedElement(t,o){_a(t)(o),this.canDefineScopedElement(t)&&this.registry.define(t,o)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,o){this.scopedRegistryConstructor.defineScopedElement(t,o)}};function R2(e,t,...o){var n;let a=e.querySelector(t);for(let i of o)a=(n=a?.shadowRoot)===null||n===void 0?void 0:n.querySelector(i);return a}var Cr=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},M2,w2=Symbol("constructorPrototype"),N2=Symbol("constructorName"),z2=Symbol("exportpartsDebouncer"),_2=Symbol("dynamicDependenciesLoaded"),Sr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Sr.eventName="exportparts-updated";var qe=class extends Qo{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[M2]=new Yo(5),this.scheduleExportpartsUpdate=()=>{var t,o,n;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[z2].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[N2]=this.constructor.name,this[w2]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[N2]&&Object.setPrototypeOf(this,this[w2])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(n){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",n)}let o=this.constructor;o[_2]||(o[_2]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Sr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Sr.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 Sr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:o,selector:n,shadowPath:a}=this.elementToFocus;if(n!=null){let i=[...a??[],n];o=R2(this.shadowRoot,...i)}o?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||o?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var o,n,a;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(i=>i.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((a=this.customStylesheet)!==null&&a!==void 0?a:"")}catch(i){console.error(i,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let i=document.createElement("style");i.classList.add("ft-lit-element--custom-stylesheet"),i.innerHTML=this.customStylesheet,this.shadowRoot.append(i)}}setExportpartsAttribute(t){var o,n,a,i,s,l;let u=y=>y!=null&&y.trim().length>0,p=t.filter(u).map(y=>y.trim());if(p.length===0){this.exportparts=void 0;return}let m=new Set;for(let y of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let v=(i=(a=y.getAttribute("part"))===null||a===void 0?void 0:a.split(" "))!==null&&i!==void 0?i:[],x=(l=(s=y.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(R=>R.split(":")[1]))!==null&&l!==void 0?l:[],S=[...v,...x].filter(u).map(R=>R.trim());for(let R of S)m.add(R)}if(m.size===0){this.exportparts=void 0;return}let g=[...m.values()].flatMap(y=>p.map(v=>`${y}:${v}--${y}`));this.exportparts=[...this.part,...g].join(", ")}};M2=z2;Cr([(0,Bt.property)()],qe.prototype,"exportpartsPrefix",void 0);Cr([E2([])],qe.prototype,"exportpartsPrefixes",void 0);Cr([(0,Bt.property)({reflect:!0})],qe.prototype,"exportparts",void 0);Cr([(0,Bt.property)()],qe.prototype,"customStylesheet",void 0);Cr([(0,Bt.property)()],qe.prototype,"elementToFocus",void 0);Cr([(0,Bt.state)()],qe.prototype,"useAdoptedStyleSheets",void 0);function Jo(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var oo=Symbol("internalReduxEventsUnsubscribers"),yt=Symbol("internalStoresUnsubscribers"),Ft=Symbol("internalStores"),If=Zo(Symbol("withRedux"),function(e){var t,o,n;class a extends e{constructor(){super(...arguments),this[t]=new Map,this[o]=new Map,this[n]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(l=>s.has(l))&&this.updateFromStores()}getUnnamedStore(){if(this[Ft].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ft].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ft].get(s)}addStore(s,l){var u;l=(u=l??s.name)!==null&&u!==void 0?u:"default-store",this.unsubscribeFromStore(l),this[Ft].set(l,s),this.subscribeToStore(l,s),this.updateFromStores()}removeStore(s){let l=typeof s=="string"?s:s.name;this.unsubscribeFromStore(l),this[Ft].delete(l)}setupStores(){this.unsubscribeFromStores(),this[Ft].forEach((s,l)=>this.subscribeToStore(l,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,l)=>{let u=this.constructor.getPropertyOptions(l);if(!u?.attribute||!this.hasAttribute(typeof u?.attribute=="string"?u.attribute:l)){let p=this.getStore(s.store);p&&(s.store?this[yt].has(s.store):this[yt].size>0)&&(this[l]=s.selector(p.getState(),this))}})}subscribeToStore(s,l){var u;this[yt].set(s,l.subscribe(()=>this.updateFromStores())),this[oo].set(s,[]),Jo(l)&&l.eventBus&&((u=this.reduxConstructor.reduxEventListeners)===null||u===void 0||u.forEach((p,m)=>{if(typeof this[m]=="function"&&(!p.store||l.name===p.store)){let g=y=>this[m](y);l.addEventListener(p.eventName,g),this[oo].get(s).push(()=>l.removeEventListener(p.eventName,g))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[yt].forEach((s,l)=>this.unsubscribeFromStore(l))}unsubscribeFromStore(s){var l;this[yt].has(s)&&this[yt].get(s)(),this[yt].delete(s),(l=this[oo].get(s))===null||l===void 0||l.forEach(u=>u()),this[oo].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=yt,o=Ft,n=oo,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),I2=class extends If(qe){};function Ae(e){for(var t=arguments.length,o=Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(0)var a,i;throw Error("[Immer] minified error nr: "+e+(o.length?" "+o.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function at(e){return!!e&&!!e[V]}function Fe(e){var t;return!!e&&((function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var a=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Hf})(e)||Array.isArray(e)||!!e[F2]||!!(!((t=e.constructor)===null||t===void 0)&&t[F2])||Fa(e)||Ha(e))}function Ht(e,t,o){o===void 0&&(o=!1),Ar(e)===0?(o?Object.keys:Lr)(e).forEach((function(n){o&&typeof n=="symbol"||t(n,e[n],e)})):e.forEach((function(n,a){return t(a,n,e)}))}function Ar(e){var t=e[V];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Fa(e)?2:Ha(e)?3:0}function Er(e,t){return Ar(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kf(e,t){return Ar(e)===2?e.get(t):e[t]}function H2(e,t,o){var n=Ar(e);n===2?e.set(t,o):n===3?e.add(o):e[t]=o}function $2(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Fa(e){return Bf&&e instanceof Map}function Ha(e){return Ff&&e instanceof Set}function bt(e){return e.o||e.t}function $a(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=j2(e);delete t[V];for(var o=Lr(t),n=0;n<o.length;n++){var a=o[n],i=t[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function Ga(e,t){return t===void 0&&(t=!1),Wa(e)||at(e)||!Fe(e)||(Ar(e)>1&&(e.set=e.add=e.clear=e.delete=Tf),Object.freeze(e),t&&Ht(e,(function(o,n){return Ga(n,!0)}),!0)),e}function Tf(){Ae(2)}function Wa(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ye(e){var t=Ba[e];return t||Ae(18,e),t}function Pf(e,t){Ba[e]||(Ba[e]=t)}function Pa(){return ao}function za(e,t){t&&(Ye("Patches"),e.u=[],e.s=[],e.v=t)}function en(e){Da(e),e.p.forEach(Df),e.p=null}function Da(e){e===ao&&(ao=e.l)}function k2(e){return ao={p:[],l:ao,h:e,m:!0,_:0}}function Df(e){var t=e[V];t.i===0||t.i===1?t.j():t.g=!0}function Ia(e,t){t._=t.p.length;var o=t.p[0],n=e!==void 0&&e!==o;return t.h.O||Ye("ES5").S(t,e,n),n?(o[V].P&&(en(t),Ae(4)),Fe(e)&&(e=tn(t,e),t.l||rn(t,e)),t.u&&Ye("Patches").M(o[V].t,e,t.u,t.s)):e=tn(t,o,[]),en(t),t.u&&t.v(t.u,t.s),e!==W2?e:void 0}function tn(e,t,o){if(Wa(t))return t;var n=t[V];if(!n)return Ht(t,(function(l,u){return T2(e,n,t,l,u,o)}),!0),t;if(n.A!==e)return t;if(!n.P)return rn(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var a=n.i===4||n.i===5?n.o=$a(n.k):n.o,i=a,s=!1;n.i===3&&(i=new Set(a),a.clear(),s=!0),Ht(i,(function(l,u){return T2(e,n,a,l,u,o,s)})),rn(e,a,!1),o&&e.u&&Ye("Patches").N(n,o,e.u,e.s)}return n.o}function T2(e,t,o,n,a,i,s){if(at(a)){var l=tn(e,a,i&&t&&t.i!==3&&!Er(t.R,n)?i.concat(n):void 0);if(H2(o,n,l),!at(l))return;e.m=!1}else s&&o.add(a);if(Fe(a)&&!Wa(a)){if(!e.h.D&&e._<1)return;tn(e,a),t&&t.A.l||rn(e,a)}}function rn(e,t,o){o===void 0&&(o=!1),!e.l&&e.h.D&&e.m&&Ga(t,o)}function ka(e,t){var o=e[V];return(o?bt(o):e)[t]}function P2(e,t){if(t in e)for(var o=Object.getPrototypeOf(e);o;){var n=Object.getOwnPropertyDescriptor(o,t);if(n)return n;o=Object.getPrototypeOf(o)}}function vt(e){e.P||(e.P=!0,e.l&&vt(e.l))}function Ta(e){e.o||(e.o=$a(e.t))}function Ua(e,t,o){var n=Fa(t)?Ye("MapSet").F(t,o):Ha(t)?Ye("MapSet").T(t,o):e.O?(function(a,i){var s=Array.isArray(a),l={i:s?1:0,A:i?i.A:Pa(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},u=l,p=io;s&&(u=[l],p=no);var m=Proxy.revocable(u,p),g=m.revoke,y=m.proxy;return l.k=y,l.j=g,y})(t,o):Ye("ES5").J(t,o);return(o?o.A:Pa()).p.push(n),n}function Uf(e){return at(e)||Ae(22,e),(function t(o){if(!Fe(o))return o;var n,a=o[V],i=Ar(o);if(a){if(!a.P&&(a.i<4||!Ye("ES5").K(a)))return a.t;a.I=!0,n=D2(o,i),a.I=!1}else n=D2(o,i);return Ht(n,(function(s,l){a&&kf(a.t,s)===l||H2(n,s,t(l))})),i===3?new Set(n):n})(e)}function D2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return $a(e)}function G2(){function e(s,l){var u=i[s];return u?u.enumerable=l:i[s]=u={configurable:!0,enumerable:l,get:function(){var p=this[V];return io.get(p,s)},set:function(p){var m=this[V];io.set(m,s,p)}},u}function t(s){for(var l=s.length-1;l>=0;l--){var u=s[l][V];if(!u.P)switch(u.i){case 5:n(u)&&vt(u);break;case 4:o(u)&&vt(u)}}}function o(s){for(var l=s.t,u=s.k,p=Lr(u),m=p.length-1;m>=0;m--){var g=p[m];if(g!==V){var y=l[g];if(y===void 0&&!Er(l,g))return!0;var v=u[g],x=v&&v[V];if(x?x.t!==y:!$2(v,y))return!0}}var S=!!l[V];return p.length!==Lr(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var u=Object.getOwnPropertyDescriptor(l,l.length-1);if(u&&!u.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function a(s){s.g&&Ae(3,JSON.stringify(bt(s)))}var i={};Pf("ES5",{J:function(s,l){var u=Array.isArray(s),p=(function(g,y){if(g){for(var v=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(v,""+x,e(x,!0));return v}var S=j2(y);delete S[V];for(var R=Lr(S),O=0;O<R.length;O++){var _=R[O];S[_]=e(_,g||!!S[_].enumerable)}return Object.create(Object.getPrototypeOf(y),S)})(u,s),m={i:u?5:4,A:l?l.A:Pa(),P:!1,I:!1,R:{},l,t:s,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,V,{value:m,writable:!0}),p},S:function(s,l,u){u?at(l)&&l[V].A===s&&t(s.p):(s.u&&(function p(m){if(m&&typeof m=="object"){var g=m[V];if(g){var y=g.t,v=g.k,x=g.R,S=g.i;if(S===4)Ht(v,(function(T){T!==V&&(y[T]!==void 0||Er(y,T)?x[T]||p(v[T]):(x[T]=!0,vt(g)))})),Ht(y,(function(T){v[T]!==void 0||Er(v,T)||(x[T]=!1,vt(g))}));else if(S===5){if(n(g)&&(vt(g),x.length=!0),v.length<y.length)for(var R=v.length;R<y.length;R++)x[R]=!1;else for(var O=y.length;O<v.length;O++)x[O]=!0;for(var _=Math.min(v.length,y.length),z=0;z<_;z++)v.hasOwnProperty(z)||(x[z]=!0),x[z]===void 0&&p(v[z])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var U2,ao,ja=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Bf=typeof Map<"u",Ff=typeof Set<"u",B2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",W2=ja?Symbol.for("immer-nothing"):((U2={})["immer-nothing"]=!0,U2),F2=ja?Symbol.for("immer-draftable"):"__$immer_draftable",V=ja?Symbol.for("immer-state"):"__$immer_state";var Hf=""+Object.prototype.constructor,Lr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,j2=Object.getOwnPropertyDescriptors||function(e){var t={};return Lr(e).forEach((function(o){t[o]=Object.getOwnPropertyDescriptor(e,o)})),t},Ba={},io={get:function(e,t){if(t===V)return e;var o=bt(e);if(!Er(o,t))return(function(a,i,s){var l,u=P2(i,s);return u?"value"in u?u.value:(l=u.get)===null||l===void 0?void 0:l.call(a.k):void 0})(e,o,t);var n=o[t];return e.I||!Fe(n)?n:n===ka(e.t,t)?(Ta(e),e.o[t]=Ua(e.A.h,n,e)):n},has:function(e,t){return t in bt(e)},ownKeys:function(e){return Reflect.ownKeys(bt(e))},set:function(e,t,o){var n=P2(bt(e),t);if(n?.set)return n.set.call(e.k,o),!0;if(!e.P){var a=ka(bt(e),t),i=a?.[V];if(i&&i.t===o)return e.o[t]=o,e.R[t]=!1,!0;if($2(o,a)&&(o!==void 0||Er(e.t,t)))return!0;Ta(e),vt(e)}return e.o[t]===o&&(o!==void 0||t in e.o)||Number.isNaN(o)&&Number.isNaN(e.o[t])||(e.o[t]=o,e.R[t]=!0),!0},deleteProperty:function(e,t){return ka(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Ta(e),vt(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var o=bt(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:o[t]}},defineProperty:function(){Ae(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ae(12)}},no={};Ht(io,(function(e,t){no[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),no.deleteProperty=function(e,t){return no.set.call(this,e,t,void 0)},no.set=function(e,t,o){return io.set.call(this,e[0],t,o,e[0])};var $f=(function(){function e(o){var n=this;this.O=B2,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var l=i;i=a;var u=n;return function(S){var R=this;S===void 0&&(S=l);for(var O=arguments.length,_=Array(O>1?O-1:0),z=1;z<O;z++)_[z-1]=arguments[z];return u.produce(S,(function(T){var F;return(F=i).call.apply(F,[R,T].concat(_))}))}}var p;if(typeof i!="function"&&Ae(6),s!==void 0&&typeof s!="function"&&Ae(7),Fe(a)){var m=k2(n),g=Ua(n,a,void 0),y=!0;try{p=i(g),y=!1}finally{y?en(m):Da(m)}return typeof Promise<"u"&&p instanceof Promise?p.then((function(S){return za(m,s),Ia(S,m)}),(function(S){throw en(m),S})):(za(m,s),Ia(p,m))}if(!a||typeof a!="object"){if((p=i(a))===void 0&&(p=a),p===W2&&(p=void 0),n.D&&Ga(p,!0),s){var v=[],x=[];Ye("Patches").M(a,p,v,x),s(v,x)}return p}Ae(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(p){for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];return n.produceWithPatches(p,(function(v){return a.apply(void 0,[v].concat(g))}))};var s,l,u=n.produce(a,i,(function(p,m){s=p,l=m}));return typeof Promise<"u"&&u instanceof Promise?u.then((function(p){return[p,s,l]})):[u,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var t=e.prototype;return t.createDraft=function(o){Fe(o)||Ae(8),at(o)&&(o=Uf(o));var n=k2(this),a=Ua(this,o,void 0);return a[V].C=!0,Da(n),a},t.finishDraft=function(o,n){var a=o&&o[V],i=a.A;return za(i,n),Ia(void 0,i)},t.setAutoFreeze=function(o){this.D=o},t.setUseProxies=function(o){o&&!B2&&Ae(20),this.O=o},t.applyPatches=function(o,n){var a;for(a=n.length-1;a>=0;a--){var i=n[a];if(i.path.length===0&&i.op==="replace"){o=i.value;break}}a>-1&&(n=n.slice(a+1));var s=Ye("Patches").$;return at(o)?s(o,n):this.produce(o,(function(l){return s(l,n)}))},e})(),ye=new $f,Gf=ye.produce,xg=ye.produceWithPatches.bind(ye),Sg=ye.setAutoFreeze.bind(ye),Cg=ye.setUseProxies.bind(ye),Eg=ye.applyPatches.bind(ye),Lg=ye.createDraft.bind(ye),Ag=ye.finishDraft.bind(ye),on=Gf;function $t(e){"@babel/helpers - typeof";return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$t(e)}function V2(e,t){if($t(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var n=o.call(e,t||"default");if($t(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K2(e){var t=V2(e,"string");return $t(t)=="symbol"?t:t+""}function Z2(e,t,o){return(t=K2(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function q2(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,n)}return o}function Va(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q2(Object(o),!0).forEach(function(n){Z2(e,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q2(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}function le(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Y2=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ka=function(){return Math.random().toString(36).substring(7).split("").join(".")},nn={INIT:"@@redux/INIT"+Ka(),REPLACE:"@@redux/REPLACE"+Ka(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ka()}};function Wf(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Za(e,t,o){var n;if(typeof t=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(le(0));if(typeof t=="function"&&typeof o>"u"&&(o=t,t=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(le(1));return o(Za)(e,t)}if(typeof e!="function")throw new Error(le(2));var a=e,i=t,s=[],l=s,u=!1;function p(){l===s&&(l=s.slice())}function m(){if(u)throw new Error(le(3));return i}function g(S){if(typeof S!="function")throw new Error(le(4));if(u)throw new Error(le(5));var R=!0;return p(),l.push(S),function(){if(R){if(u)throw new Error(le(6));R=!1,p();var _=l.indexOf(S);l.splice(_,1),s=null}}}function y(S){if(!Wf(S))throw new Error(le(7));if(typeof S.type>"u")throw new Error(le(8));if(u)throw new Error(le(9));try{u=!0,i=a(i,S)}finally{u=!1}for(var R=s=l,O=0;O<R.length;O++){var _=R[O];_()}return S}function v(S){if(typeof S!="function")throw new Error(le(10));a=S,y({type:nn.REPLACE})}function x(){var S,R=g;return S={subscribe:function(_){if(typeof _!="object"||_===null)throw new Error(le(11));function z(){_.next&&_.next(m())}z();var T=R(z);return{unsubscribe:T}}},S[Y2]=function(){return this},S}return y({type:nn.INIT}),n={dispatch:y,subscribe:g,getState:m,replaceReducer:v},n[Y2]=x,n}function jf(e){Object.keys(e).forEach(function(t){var o=e[t],n=o(void 0,{type:nn.INIT});if(typeof n>"u")throw new Error(le(12));if(typeof o(void 0,{type:nn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(le(13))})}function X2(e){for(var t=Object.keys(e),o={},n=0;n<t.length;n++){var a=t[n];typeof e[a]=="function"&&(o[a]=e[a])}var i=Object.keys(o),s,l;try{jf(o)}catch(u){l=u}return function(p,m){if(p===void 0&&(p={}),l)throw l;if(0)var g;for(var y=!1,v={},x=0;x<i.length;x++){var S=i[x],R=o[S],O=p[S],_=R(O,m);if(typeof _>"u"){var z=m&&m.type;throw new Error(le(14))}v[S]=_,y=y||_!==O}return y=y||i.length!==Object.keys(p).length,y?v:p}}function Or(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.length===0?function(n){return n}:t.length===1?t[0]:t.reduce(function(n,a){return function(){return n(a.apply(void 0,arguments))}})}function Q2(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(n){return function(){var a=n.apply(void 0,arguments),i=function(){throw new Error(le(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=t.map(function(u){return u(s)});return i=Or.apply(void 0,l)(a.dispatch),Va(Va({},a),{},{dispatch:i})}}}function J2(e){var t=function(n){var a=n.dispatch,i=n.getState;return function(s){return function(l){return typeof l=="function"?l(a,i,e):s(l)}}};return t}var e1=J2();e1.withExtraArgument=J2;var qa=e1;var a1=(function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,o)};return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");e(t,o);function n(){this.constructor=t}t.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}})(),Vf=function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(p){return function(m){return u([p,m])}}function u(p){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=p[0]&2?a.return:p[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,p[1])).done)return i;switch(a=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){o=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){o.label=p[1];break}if(p[0]===6&&o.label<i[1]){o.label=i[1],i=p;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(p);break}i[2]&&o.ops.pop(),o.trys.pop();continue}p=t.call(e,o)}catch(m){p=[6,m],a=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},Rr=function(e,t){for(var o=0,n=t.length,a=e.length;o<n;o++,a++)e[a]=t[o];return e},Kf=Object.defineProperty,Zf=Object.defineProperties,qf=Object.getOwnPropertyDescriptors,t1=Object.getOwnPropertySymbols,Yf=Object.prototype.hasOwnProperty,Xf=Object.prototype.propertyIsEnumerable,r1=function(e,t,o){return t in e?Kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o},xt=function(e,t){for(var o in t||(t={}))Yf.call(t,o)&&r1(e,o,t[o]);if(t1)for(var n=0,a=t1(t);n<a.length;n++){var o=a[n];Xf.call(t,o)&&r1(e,o,t[o])}return e},Ya=function(e,t){return Zf(e,qf(t))},Qf=function(e,t,o){return new Promise(function(n,a){var i=function(u){try{l(o.next(u))}catch(p){a(p)}},s=function(u){try{l(o.throw(u))}catch(p){a(p)}},l=function(u){return u.done?n(u.value):Promise.resolve(u.value).then(i,s)};l((o=o.apply(e,t)).next())})};var Jf=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Or:Or.apply(null,arguments)},Gg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function e3(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var o=t;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return t===o}function St(e,t){function o(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];if(t){var i=t.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return xt(xt({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:n[0]}}return o.toString=function(){return""+e},o.type=e,o.match=function(n){return n.type===e},o}var t3=(function(e){a1(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Rr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Rr([void 0],o.concat(this))))},t})(Array),r3=(function(e){a1(t,e);function t(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var a=e.apply(this,o)||this;return Object.setPrototypeOf(a,t.prototype),a}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.prototype.concat.apply(this,o)},t.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(t.bind.apply(t,Rr([void 0],o[0].concat(this)))):new(t.bind.apply(t,Rr([void 0],o.concat(this))))},t})(Array);function Ja(e){return Fe(e)?on(e,function(){}):e}function o3(e){return typeof e=="boolean"}function n3(){return function(t){return a3(t)}}function a3(e){e===void 0&&(e={});var t=e.thunk,o=t===void 0?!0:t,n=e.immutableCheck,a=n===void 0?!0:n,i=e.serializableCheck,s=i===void 0?!0:i,l=e.actionCreatorCheck,u=l===void 0?!0:l,p=new t3;if(o&&(o3(o)?p.push(qa):p.push(qa.withExtraArgument(o.extraArgument))),0){if(a)var m;if(s)var g;if(u)var y}return p}var Xa=!0;function i1(e){var t=n3(),o=e||{},n=o.reducer,a=n===void 0?void 0:n,i=o.middleware,s=i===void 0?t():i,l=o.devTools,u=l===void 0?!0:l,p=o.preloadedState,m=p===void 0?void 0:p,g=o.enhancers,y=g===void 0?void 0:g,v;if(typeof a=="function")v=a;else if(e3(a))v=X2(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(t),!Xa&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Xa&&x.some(function(T){return typeof T!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Q2.apply(void 0,x),R=Or;u&&(R=Jf(xt({trace:!Xa},typeof u=="object"&&u)));var O=new r3(S),_=O;Array.isArray(y)?_=Rr([S],y):typeof y=="function"&&(_=y(O));var z=R.apply(void 0,_);return Za(v,m,z)}function s1(e){var t={},o=[],n,a={addCase:function(i,s){var l=typeof i=="string"?i:i.type;if(!l)throw new Error("`builder.addCase` cannot be called with an empty action type");if(l in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[l]=s,a},addMatcher:function(i,s){return o.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return n=i,a}};return e(a),[t,o,n]}function i3(e){return typeof e=="function"}function s3(e,t,o,n){o===void 0&&(o=[]);var a=typeof t=="function"?s1(t):[t,o,n],i=a[0],s=a[1],l=a[2],u;if(i3(e))u=function(){return Ja(e())};else{var p=Ja(e);u=function(){return p}}function m(g,y){g===void 0&&(g=u());var v=Rr([i[y.type]],s.filter(function(x){var S=x.matcher;return S(y)}).map(function(x){var S=x.reducer;return S}));return v.filter(function(x){return!!x}).length===0&&(v=[l]),v.reduce(function(x,S){if(S)if(at(x)){var R=x,O=S(R,y);return O===void 0?x:O}else{if(Fe(x))return on(x,function(_){return S(_,y)});var O=S(x,y);if(O===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return O}return x},g)}return m.getInitialState=u,m}function c3(e,t){return e+"/"+t}function c1(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof e.initialState=="function"?e.initialState:Ja(e.initialState),n=e.reducers||{},a=Object.keys(n),i={},s={},l={};a.forEach(function(m){var g=n[m],y=c3(t,m),v,x;"reducer"in g?(v=g.reducer,x=g.prepare):v=g,i[m]=v,s[y]=v,l[m]=x?St(y,x):St(y)});function u(){var m=typeof e.extraReducers=="function"?s1(e.extraReducers):[e.extraReducers],g=m[0],y=g===void 0?{}:g,v=m[1],x=v===void 0?[]:v,S=m[2],R=S===void 0?void 0:S,O=xt(xt({},y),s);return s3(o,function(_){for(var z in O)_.addCase(z,O[z]);for(var T=0,F=x;T<F.length;T++){var j=F[T];_.addMatcher(j.matcher,j.reducer)}R&&_.addDefaultCase(R)})}var p;return{name:t,reducer:function(m,g){return p||(p=u()),p(m,g)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=u()),p.getInitialState()}}}var l3="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",d3=function(e){e===void 0&&(e=21);for(var t="",o=e;o--;)t+=l3[Math.random()*64|0];return t},u3=["name","message","stack","code"],Qa=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),o1=(function(){function e(t,o){this.payload=t,this.meta=o}return e})(),f3=function(e){if(typeof e=="object"&&e!==null){for(var t={},o=0,n=u3;o<n.length;o++){var a=n[o];typeof e[a]=="string"&&(t[a]=e[a])}return t}return{message:String(e)}},Kg=(function(){function e(t,o,n){var a=St(t+"/fulfilled",function(m,g,y,v){return{payload:m,meta:Ya(xt({},v||{}),{arg:y,requestId:g,requestStatus:"fulfilled"})}}),i=St(t+"/pending",function(m,g,y){return{payload:void 0,meta:Ya(xt({},y||{}),{arg:g,requestId:m,requestStatus:"pending"})}}),s=St(t+"/rejected",function(m,g,y,v,x){return{payload:v,error:(n&&n.serializeError||f3)(m||"Rejected"),meta:Ya(xt({},x||{}),{arg:y,requestId:g,rejectedWithValue:!!v,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),l=!1,u=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function p(m){return function(g,y,v){var x=n?.idGenerator?n.idGenerator(m):d3(),S=new u,R,O=!1;function _(T){R=T,S.abort()}var z=(function(){return Qf(this,null,function(){var T,F,j,Ge,Et,We,he;return Vf(this,function(xe){switch(xe.label){case 0:return xe.trys.push([0,4,,5]),Ge=(T=n?.condition)==null?void 0:T.call(n,m,{getState:y,extra:v}),h3(Ge)?[4,Ge]:[3,2];case 1:Ge=xe.sent(),xe.label=2;case 2:if(Ge===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return O=!0,Et=new Promise(function(me,Lt){return S.signal.addEventListener("abort",function(){return Lt({name:"AbortError",message:R||"Aborted"})})}),g(i(x,m,(F=n?.getPendingMeta)==null?void 0:F.call(n,{requestId:x,arg:m},{getState:y,extra:v}))),[4,Promise.race([Et,Promise.resolve(o(m,{dispatch:g,getState:y,extra:v,requestId:x,signal:S.signal,abort:_,rejectWithValue:function(me,Lt){return new Qa(me,Lt)},fulfillWithValue:function(me,Lt){return new o1(me,Lt)}})).then(function(me){if(me instanceof Qa)throw me;return me instanceof o1?a(me.payload,x,m,me.meta):a(me,x,m)})])];case 3:return j=xe.sent(),[3,5];case 4:return We=xe.sent(),j=We instanceof Qa?s(null,x,m,We.payload,We.meta):s(We,x,m),[3,5];case 5:return he=n&&!n.dispatchConditionRejection&&s.match(j)&&j.meta.condition,he||g(j),[2,j]}})})})();return Object.assign(z,{abort:_,requestId:x,arg:m,unwrap:function(){return z.then(p3)}})}}return Object.assign(p,{pending:i,rejected:s,fulfilled:a,typePrefix:t})}return e.withTypes=function(){return e},e})();function p3(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function h3(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var l1="listener",d1="completed",u1="cancelled",Zg="task-"+u1,qg="task-"+d1,Yg=l1+"-"+u1,Xg=l1+"-"+d1;var ei="listenerMiddleware";var Qg=St(ei+"/add"),Jg=St(ei+"/removeAll"),e9=St(ei+"/remove");var n1,t9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(n1||(n1=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},m3=function(e){return function(t){setTimeout(t,e)}},r9=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:m3(10);G2();var g3=Zo(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),an=class extends g3(Object){};window.ftReduxStores||(window.ftReduxStores={});var f1=class e extends an{static get(t){var o;let n=typeof t=="string"?t:t.name,a=typeof t=="string"?void 0:t,i=window.ftReduxStores[n];if(Jo(i))return i;if(a==null)return;let s=c1({...a,reducers:(o=a.reducers)!==null&&o!==void 0?o:{}}),l=i1({reducer:(u,p)=>{if(p.type==="CLEAR_FT_REDUX_STORE"){let m=to(s.getInitialState());for(let g of p.keeping)m[g]=(u??m)[g];return m}else if(typeof p.type=="string"&&p.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...u,...p.overwrites};return s.reducer(u,p)}});return window.ftReduxStores[a.name]=new e(s,l,a.eventBus)}constructor(t,o,n){super(),this.reduxSlice=t,this.reduxStore=o,this.isFtReduxStore=!0,this.commands=new qo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,l)=>{let u=s,p=i[u];return p?(...m)=>{let g=p(...m.map(a));return this.reduxStore.dispatch(g),g}:m=>{this.setState({[u]:a(m)})}}}),this.eventBus=n??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var sn=class{static format(t,o,n,a,i){return window.moment?window.moment(t).locale(o).format(this.getMomentDateFormat(n,a,!!i)):this.getIntlDateTime(t,o,n,a,!!i)}static getMomentDateFormat(t,o,n){return n?"LT":t?o?"lll":"ll":o?"L LT":"L"}static getIntlDateTime(t,o,n,a,i){let s=typeof t=="string"?new Date(t):t,l=new Intl.DateTimeFormat(o,{dateStyle:n?"medium":"short"}).format(s),u=new Intl.DateTimeFormat(o,{timeStyle:"short"}).format(s);return i?u:a?`${l} ${u}`:l}static getTimezoneAsString(){let t=n=>String(Math.floor(n)).padStart(2,"0"),o=new Date().getTimezoneOffset();return`${o<0?"+":"-"}${t(Math.abs(o)/60)}:${t(Math.abs(o)%60)}`}};var cn=C(P()),y3="ft-app-info",wr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};wr.eventName="authentication-change";var so=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};so.eventName="ui-locale-changed";var b3={session:(e,t)=>{(0,cn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>U.dispatchEvent(new wr(t.payload)),0))}},U=cn.FtReduxStore.get({name:y3,reducers:b3,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var p1=C(P()),ln=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},_9=(0,p1.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...n){super(n),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(U)}dateFormatOptionsChanged(n){return n.has("metadataDescriptors")||n.has("useLongDateFormat")||n.has("useDateTimeFormat")||n.has("uiLocale")}getDateFormatter(n){var a,i;return((i=(a=this.metadataDescriptors.find(l=>l.key===n))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1)?l=>sn.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return ln([(0,ti.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),ln([(0,ti.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),ln([Ma({store:U.name,selector:o=>{var n,a;return(a=(n=o.metadataConfiguration)===null||n===void 0?void 0:n.descriptors)!==null&&a!==void 0?a:[]}})],t.prototype,"metadataDescriptors",void 0),ln([Ma({store:U.name})],t.prototype,"uiLocale",void 0),t});var h1;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(h1||(h1={}));var m1;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(m1||(m1={}));var g1;(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"})(g1||(g1={}));var y1;(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"})(y1||(y1={}));var b1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(b1||(b1={}));var v1;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(v1||(v1={}));var x1;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(x1||(x1={}));var S1;(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"})(S1||(S1={}));var C1;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(C1||(C1={}));var E1;(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"})(E1||(E1={}));var L1;(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"})(L1||(L1={}));var A1;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(A1||(A1={}));var O1;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(O1||(O1={}));var R1;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(R1||(R1={}));var w1;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(w1||(w1={}));var N1;(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"})(N1||(N1={}));var _1;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(_1||(_1={}));var M1;(function(e){e.ASC="ASC",e.DESC="DESC"})(M1||(M1={}));var z1;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(z1||(z1={}));var I1;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(I1||(I1={}));var k1;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(k1||(k1={}));var T1;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(T1||(T1={}));var P1;(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"})(P1||(P1={}));var D1;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(D1||(D1={}));var U1;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(U1||(U1={}));var B1;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(B1||(B1={}));var F1;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(F1||(F1={}));var oe;(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"})(oe||(oe={}));var Oe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Oe||(Oe={}));var H1;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(H1||(H1={}));var $1;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})($1||($1={}));var G1;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(G1||(G1={}));var W1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(W1||(W1={}));var j1;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(j1||(j1={}));var V1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(V1||(V1={}));var K1;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(K1||(K1={}));var Z1;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Z1||(Z1={}));var q1;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(q1||(q1={}));var Y1;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Y1||(Y1={}));var X1;(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"})(X1||(X1={}));var Q1;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Q1||(Q1={}));var v3={[oe.PERSONAL_BOOK_SHARE_USER]:[oe.PERSONAL_BOOK_USER],[oe.HTML_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.PDF_EXPORT_USER]:[oe.PERSONAL_BOOK_USER],[oe.KHUB_ADMIN]:[oe.CONTENT_PUBLISHER],[oe.ADMIN]:[oe.KHUB_ADMIN,oe.USERS_ADMIN,oe.PORTAL_ADMIN,oe.BEHAVIOR_DATA_USER],[oe.GENERATIVE_AI_EXPORT_USER]:[oe.GENERATIVE_AI_USER]};function J1(e,t){return e===t||(v3[e]??[]).some(o=>J1(o,t))}function e4(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(n=>J1(n,t))}var hn=C(P());var ri=C(P());var Gt=class e{static get(t){let{baseUrl:o,apiIntegrationIdentifier:n}=U.getState(),a=t??n;if(o&&a&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,a,!0)}static await(t){return new Promise(o=>{let n=e.get(t);if(n)o(n);else{let a=U.subscribe(()=>{n=e.get(t),n&&(a(),o(n))})}})}};var Nr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Gt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Gt.await()}};var be=class extends Nr{constructor(t=!0,o){var n;super(o),this.sortObjectFields=(i,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[u])=>l.localeCompare(u)));let a=this.constructor;a.commonCache=(n=a.commonCache)!==null&&n!==void 0?n:new ri.CacheRegistry,this.cache=t?a.commonCache:new ri.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0))}};var dn=class extends be{async listMySearches(){let{session:t}=U.getState();return e4(t,oe.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var un=class extends be{async listMyBookmarks(){let t=U.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var fn=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var pn=class extends be{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=U.getState().session;return!!t?.sessionAuthenticated}};var x3="ft-user-assets",S3={setAssetCount:(e,t)=>{let{userAssetType:o,count:n}=t.payload.assetCount;e.assetCounts.allAsset[o]=n},clearAssetCount:e=>{Object.values(Oe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let o=t.payload.mapId;e.assetCounts.bookmarkByMap[o]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:o,mapId:n,asset:a}=t.payload;ni(e,o,[...oi(e,o),a]),t4(e,o,1,n),r4(e,a)},editAsset:(e,t)=>{let{assetType:o,asset:n}=t.payload;ni(e,o,oi(e,o).map(a=>a.id===n.id?n:a)),r4(e,n)},removeAsset:(e,t)=>{let{assetType:o,mapId:n,assetId:a}=t.payload;ni(e,o,oi(e,o).filter(i=>i.id!==a)),t4(e,o,-1,n)}},o4={[Oe.SEARCHES]:"savedSearches",[Oe.BOOKMARKS]:"bookmarks",[Oe.BOOKS]:void 0,[Oe.COLLECTIONS]:void 0},oi=(e,t)=>{var o;let n=o4[t];return n?(o=e[n])!==null&&o!==void 0?o:[]:[]},ni=(e,t,o)=>{let n=o4[t];n&&(e[n]=o)},t4=(e,t,o,n)=>{let a=e.assetCounts.allAsset[t];if(a!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,a+o),t===Oe.BOOKMARKS&&n)){let i=e.assetCounts.bookmarkByMap[n];e.assetCounts.bookmarkByMap[n]=Math.max(0,i+o)}},r4=(e,t)=>{let o=e.assetLabels.map(a=>a.title),n=t.labels.filter(a=>!o.includes(a)).map(a=>({title:a}));e.assetLabels.push(...n)},ue=hn.FtReduxStore.get({name:x3,reducers:S3,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Oe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ai=class{constructor(t=new fn,o=new pn){this.assetCountsService=t,this.assetLabelsService=o,this.currentSession=U.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new un,this.savedSearchesService=new dn,U.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:o}=U.getState();(0,hn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),ue.actions.clearAssetCount(),ue.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),ue.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),ue.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();ue.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();ue.actions.assetLabels(t)}async loadAssetCount(t){let o=await this.assetCountsService.getUserAssetCount(t);o&&ue.getState().assetCounts.allAsset[t]!==o.count&&ue.actions.setAssetCount({assetCount:o})}async loadBookmarkByMapId(t){let o=await this.assetCountsService.getUserBookmarkCountByMap(t);o&&ue.getState().assetCounts.bookmarkByMap[t]!==o.count&&ue.actions.setBookmarkCountByMap({count:o.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let o=Object.keys(ue.getState().assetCounts.bookmarkByMap).length!==0;t===Oe.BOOKMARKS&&o&&ue.actions.clearBookmarkCountByMap(),ue.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let o=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;ue.actions.bookmarks(o)}}},C3=new ai;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=C3);var ii=class{addCommand(t,o=!1){U.commands.add(t,o)}consumeCommand(t){return U.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ii;var Re=C(P());var n4,_r=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},E3=Symbol("clearAfterUnitTest"),mn=class extends(0,Re.withEventBus)(be){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[n4]=()=>{this.defaultMessages={},this.cache=new Re.CacheRegistry,this.listeners={}},this.currentUiLocale=U.getState().uiLocale,U.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=U.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let o=t.name.toLowerCase();this.cache.setFinal(o,t),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,o){var n;if(t=t.toLowerCase(),o&&Object.keys(o).length>0){let a={...(n=this.defaultMessages[t])!==null&&n!==void 0?n:{},...o};(0,Re.deepEqual)(this.defaultMessages[t],a)||(this.defaultMessages[t]=a,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var o,n;return this.fetchContext(t),(n=(o=this.cache.getNow(t))===null||o===void 0?void 0:o.messages)!==null&&n!==void 0?n:{}}resolveRawMessage(t,o){let n=t.toLowerCase();return this.resolveContext(n)[o]}resolveMessage(t,o,...n){var a;let i=t.toLowerCase(),s=this.resolveContext(i);return new Re.ParametrizedLabelResolver((a=this.defaultMessages[i])!==null&&a!==void 0?a:{},s).resolve(o,...n)}async fetchContext(t){let o=!this.cache.has(t),n;try{n=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),o&&await this.notify(t)}catch(a){!(a instanceof Re.CanceledPromiseError)&&o&&console.error(a)}return n}subscribe(t,o){var n;return t=t.toLowerCase(),this.listeners[t]=(n=this.listeners[t])!==null&&n!==void 0?n:new Set,this.listeners[t].add(o),()=>{var a;return(a=this.listeners[t])===null||a===void 0?void 0:a.delete(o)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new _r({loadedContexts:t})),this.dispatchEvent(new _r({loadedContexts:t})),await Promise.all(t.map(o=>this.notify(o,!1)))}async notify(t,o=!0){o&&(document.body.dispatchEvent(new _r({loadedContexts:[t]})),this.dispatchEvent(new _r({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(n=>(0,Re.delay)(0).then(()=>n()).catch(()=>null)))}};n4=E3;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends mn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends mn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var co=window.FluidTopicsI18nService,si=window.FluidTopicsCustomI18nService;var a4=C(P()),ci=class{highlightHtml(t,o,n){(0,a4.highlightHtml)(t,o,n)}};window.FluidTopicsHighlightHtmlService=new ci;var i4=C(P());var li=class{isDate(t){var o,n,a,i;return(i=(a=((n=(o=U.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===t))===null||a===void 0?void 0:a.date)!==null&&i!==void 0?i:!1}format(t,o){var n,a,i,s;if(t==null)return"";try{return i4.DateFormatter.format(t,(n=o?.locale)!==null&&n!==void 0?n:U.getState().uiLocale,(a=o?.longFormat)!==null&&a!==void 0?a:!1,(i=o?.withTime)!==null&&i!==void 0?i:!1,(s=o?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(t)} is not valid`,l),l}}};window.FluidTopicsDateService=new li;var s4=C(P());var lo=class{static get(t,o){var n,a;let i=U.getState(),{lang:s,region:l}=(a=(n=i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new s4.SearchPlaceConverter(i.baseUrl,t??20,i.searchInAllLanguagesAllowed,o??`${s}-${l}`)}};var di=class{urlToSearchRequest(t){return lo.get().parse(t)}searchRequestToUrl(t){return lo.get().serialize(t)}};window.FluidTopicsUrlService=new di;var it=C(P());var Wt=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Wt.eventName="change";var ui=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let o=sessionStorage.getItem(this.itemName(t));return o?JSON.parse(o):void 0}set(t,o){sessionStorage.setItem(this.itemName(t),JSON.stringify(o))}},c4=new ui;var gn=class e extends it.WithEventBus{static build(){return new e(window.history,c4,()=>window.location,!1)}constructor(t,o,n,a){var i,s;super(),this.history=t,this.historyStorage=o,this.windowLocation=n,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(i=t.state)===null||i===void 0?void 0:i.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(a)}setCurrentState(t,o=!1){let n=o&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,n&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,it.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Wt(this.currentItem())),0)}installProxies(){let t=o=>(n,a,[i,s,l])=>{let u=o(),p={...u===this.currentIndex?this.currentState:void 0,...i,index:u,href:typeof l=="string"?l:(l??this.windowLocation()).href};n.apply(a,[p,s,l]),this.setCurrentState(p,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let o=this.history.length-1;o>=0;o--)t?this.states[o]=this.historyStorage.get(o):setTimeout(()=>this.states[o]=this.historyStorage.get(o),this.history.length-o)}updateCurrentState(t){var o;let n={...this.buildCurrentState(),...t,index:this.currentIndex,title:(o=t?.title)!==null&&o!==void 0?o:this.currentState.title};this.setCurrentState(n)}addHistoryChangeListener(t){this.addEventListener(Wt.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Wt.eventName,t)}currentItem(){return(0,it.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,it.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let o=this.states.filter(n=>!!n).filter(n=>n.index<this.currentIndex).reverse();return(0,it.deepCopy)(o.find(n=>t(n)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,it.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var o;let n=(o=this.states[t])===null||o===void 0?void 0:o.majorStateId;if(!n)return t;let a=t,i=t+1;for(;this.states.length>i&&!this.isDifferentMajorState(i,n);)this.hasState(i)&&(a=i),i++;return a}buildCurrentState(){var t,o;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(o=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&o!==void 0?o:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,o){var n;if(!this.hasState(t))return!1;let a=o??this.currentState.majorStateId,i=(n=this.states[t])===null||n===void 0?void 0:n.majorStateId;return i==null||i!=a}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.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)});var l4=C(H());var d4=l4.css`
1539
1539
  `;var p4=C(H()),ve=C(ae()),Kt=C(P());var jt=C(P());function u4(e,t){let{authenticationRequired:o,session:n}=U.getState();return o&&!n?.sessionAuthenticated?Promise.resolve(t):e()}var yn=class extends Nr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var fi=class e extends jt.FtStateManager{static build(t){return new e(U,t)}constructor(t,o){super(),this.store=t,this.cache=new jt.CacheRegistry,this.withManualResources=!0,this.localesConfiguration=null,this.userLocaleService=new yn,this.cleanSessionDebouncer=new jt.Debouncer,this.reloadDebouncer=new jt.Debouncer(500),this.apiProvider=o??(()=>Gt.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(wr.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let o=await this.apiProvider().getCurrentSession();return o.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},o.idleTimeoutInMillis),o});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let o=await this.cache.get("availableContentLocales",()=>u4(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=o.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){var o,n,a,i,s;this.localesConfiguration=t,this.store.actions.defaultLocales(this.localesConfiguration.defaultLocales),this.store.actions.availableUiLocales((o=this.localesConfiguration.availableUiLocales)!==null&&o!==void 0?o:[]),this.store.actions.searchInAllLanguagesAllowed((n=this.localesConfiguration.allLanguagesAllowed)!==null&&n!==void 0?n:!1),this.store.actions.searchLanguageSetsUiLanguage((a=this.localesConfiguration.searchLanguageSetsUiLanguage)!==null&&a!==void 0?a:!1),this.store.actions.uiLanguageSetsSearchLanguage((i=this.localesConfiguration.uiLanguageSetsSearchLanguage)!==null&&i!==void 0?i:!1),this.store.actions.uiLanguageSetsReaderLanguage((s=this.localesConfiguration.uiLanguageSetsReaderLanguage)!==null&&s!==void 0?s:!1),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(o=>{o.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new so(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)}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)}},f4=fi.build();var Vt=class extends Event{constructor(t,o,n,a){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=o,this.callback=n,this.subscribe=a??!1}};var uo=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:n}=o;for(let{elementRef:a,callbackRef:i}of n){let s=a.deref(),l=i.deref();s===void 0||l===void 0||s.dispatchEvent(new Vt(t.context,s,l,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.contextTarget??t.composedPath()[0],n=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let i=a.callbacks.get(o);i===void 0&&a.callbacks.set(o,i=new WeakSet),i.has(n)||(i.add(n),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(n)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var de=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},X=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.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=f4,this.contextRoot=new uo}render(){return p4.html`
1540
1540
  <slot></slot>
1541
1541
  `}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var o;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),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("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(n=>co.addContext(n)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((o=this.stateManager)===null||o===void 0||o.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};X.elementDefinitions={};X.styles=d4;de([(0,ve.property)()],X.prototype,"baseUrl",void 0);de([(0,ve.property)()],X.prototype,"apiIntegrationIdentifier",void 0);de([(0,ve.property)()],X.prototype,"apiIntegrationAppVersion",void 0);de([(0,ve.property)()],X.prototype,"uiLocale",void 0);de([(0,Kt.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);de([(0,Kt.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"editorMode",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"noCustom",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);de([(0,ve.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],X.prototype,"noCustomComponent",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"withManualResources",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);de([(0,ve.property)({type:Boolean})],X.prototype,"authenticationRequired",void 0);de([(0,Kt.jsonProperty)([])],X.prototype,"messageContexts",void 0);de([(0,Kt.jsonProperty)(void 0)],X.prototype,"session",void 0);var m4=C(P());var h4={"ft-app-context":X};(0,m4.customElements)(h4);var g4=C(ae());var pi=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[o,n]=t.split(".");return{context:o,key:n,custom:o!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Mr=new pi;var O3=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},po=Symbol("i18nAttributes"),y4=Symbol("i18nListAttributes"),b4=Symbol("i18nProperties"),bn=Symbol("i18nContexts"),fo=Symbol("i18nUnsubs"),v4=(0,zr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,o;class n extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[o]=new Map}getI18nService(i){return i??this.useCustomMessageContexts?si:co}i18n(i){let{context:s,key:l,message:u}=i,{custom:p,args:m,argsProvider:g}=i;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,p);let y=m??(g?g(this):[]);return this.getI18nService(p).resolveMessage(s,l,...y)}return u}async awaitI18n(i){let{context:s,custom:l}=i;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(i)}customI18n(i,s){if(Mr.isI18nKey(i)){let[l,u]=i.split(".");return this.i18n({custom:!0,context:l,key:u,...s})||i}return i}firstUpdated(i){super.firstUpdated(i),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(i){super.update(i),this.updateI18nAttributes((s,l,u)=>i.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(i){this.updateI18nAttributes((s,l,u)=>{var p;return((p=u?.context)===null||p===void 0?void 0:p.toLowerCase())===i}),this.updateI18nProperties(s=>s.context.toLowerCase()===i),this.requestUpdate()}updateI18nAttributes(i){var s,l;let u=this,p=(m,g,y)=>y?.context&&y.key&&i(m,g,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...m})}:y;(s=this[po])===null||s===void 0||s.forEach((m,g)=>u[g]=p(m,g,u[g])),(l=this[y4])===null||l===void 0||l.forEach((m,g)=>{var y;return u[g]=(y=u[g])===null||y===void 0?void 0:y.map(v=>p(m,g,v))})}updateI18nProperties(i){var s;(s=this[b4])===null||s===void 0||s.forEach((l,u)=>{i(l,u)&&(this[u]=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 u=(typeof i=="string"?i:i.name).toLowerCase();l=typeof i=="string"?l:i.custom,this[bn].set(u,{isCustomContext:l}),this[fo].has(u)||this[fo].set(u,this.getI18nService(l).subscribe(u,()=>this.onI18nUpdate(u))),this.getI18nService(l).prepareContext(u,s)}hasI18nContext(i){return this[bn].has(i.toLowerCase())}connectedCallback(){super.connectedCallback(),this[bn].forEach((i,s)=>this.addI18nContext(s,void 0,i.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[fo].forEach(i=>i()),this[fo].clear()}}return t=bn,o=fo,O3([(0,g4.property)({type:Boolean})],n.prototype,"useCustomMessageContexts",void 0),n}),vn=class extends v4(zr.FtLitElement){},xn=class extends v4(zr.FtLitElementRedux){};var x4=C(P());var hi=class{fromAttribute(t){if(!t)return[];try{let o=JSON.parse(t);return Array.isArray(o)?o.map(n=>typeof n=="string"?Mr.fromAttribute(n):n):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},R3=new hi;var S4=(e,t)=>(o,n)=>{var a;o.constructor.createProperty(n,{type:Object,hasChanged:x4.hasChanged,converter:Mr,...t}),o[po]=(a=o[po])!==null&&a!==void 0?a:new Map,o[po].set(n,e??{})};var C4=C(H());var E4=C4.css`
@@ -44,7 +44,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
44
44
  input::-webkit-search-results-decoration {
45
45
  display: none;
46
46
  }
47
- `;var Rl={};var Li={};j(Li,{ParametrizedLabelResolver:()=>Eo});var Eo=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Zi={};j(Zi,{FtCommandQueue:()=>Lo,FtLitElementRedux:()=>Qt,FtReduxStore:()=>rr,FtStateManager:()=>_o,ReduxWatcher:()=>Sn,clearAllStores:()=>hf,isFtReduxStore:()=>Or,redux:()=>Ar,reduxEventListener:()=>Nu,reduxReactive:()=>_u,watch:()=>mf,withRedux:()=>wl});var _u=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Ar=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:ft,attribute:!1,...e};L(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},Nu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var Lo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function Or(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ao=Symbol("internalReduxEventsUnsubscribers"),Rt=Symbol("internalStoresUnsubscribers"),Jt=Symbol("internalStores"),wl=he(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Jt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Jt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Jt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Jt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Jt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Jt].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[Rt].has(s.store):this[Rt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[Rt].set(s,c.subscribe(()=>this.updateFromStores())),this[Ao].set(s,[]),Or(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[Ao].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Rt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Rt].has(s)&&this[Rt].get(s)(),this[Rt].delete(s),(c=this[Ao].get(s))===null||c===void 0||c.forEach(d=>d()),this[Ao].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Rt,r=Jt,o=Ao,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Qt=class extends wl(Z){};function Fe(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function gt(t){return!!t&&!!t[re]}function Ve(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Uu})(t)||Array.isArray(t)||!!t[zl]||!!(!((e=t.constructor)===null||e===void 0)&&e[zl])||Ti(t)||ki(t))}function er(t,e,r){r===void 0&&(r=!1),_r(t)===0?(r?Object.keys:wr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function _r(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ti(t)?2:ki(t)?3:0}function Rr(t,e){return _r(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Mu(t,e){return _r(t)===2?t.get(e):t[e]}function Pl(t,e,r){var o=_r(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Dl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ti(t){return Pu&&t instanceof Map}function ki(t){return Du&&t instanceof Set}function wt(t){return t.o||t.t}function zi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=$l(t);delete e[re];for(var r=wr(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Pi(t,e){return e===void 0&&(e=!1),Di(t)||gt(t)||!Ve(t)||(_r(t)>1&&(t.set=t.add=t.clear=t.delete=Iu),Object.freeze(t),e&&er(t,(function(r,o){return Pi(o,!0)}),!0)),t}function Iu(){Fe(2)}function Di(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ct(t){var e=Ii[t];return e||Fe(18,t),e}function Tu(t,e){Ii[t]||(Ii[t]=e)}function _i(){return Ro}function Ai(t,e){e&&(ct("Patches"),t.u=[],t.s=[],t.v=e)}function gn(t){Ni(t),t.p.forEach(ku),t.p=null}function Ni(t){t===Ro&&(Ro=t.l)}function _l(t){return Ro={p:[],l:Ro,h:t,m:!0,_:0}}function ku(t){var e=t[re];e.i===0||e.i===1?e.j():e.g=!0}function Oi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||ct("ES5").S(e,t,o),o?(r[re].P&&(gn(e),Fe(4)),Ve(t)&&(t=yn(e,t),e.l||bn(e,t)),e.u&&ct("Patches").M(r[re].t,t,e.u,e.s)):t=yn(e,r,[]),gn(e),e.u&&e.v(e.u,e.s),t!==Fl?t:void 0}function yn(t,e,r){if(Di(e))return e;var o=e[re];if(!o)return er(e,(function(c,d){return Nl(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return bn(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=zi(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),er(i,(function(c,d){return Nl(t,o,a,c,d,r,s)})),bn(t,a,!1),r&&t.u&&ct("Patches").N(o,r,t.u,t.s)}return o.o}function Nl(t,e,r,o,a,i,s){if(gt(a)){var c=yn(t,a,i&&e&&e.i!==3&&!Rr(e.R,o)?i.concat(o):void 0);if(Pl(r,o,c),!gt(c))return;t.m=!1}else s&&r.add(a);if(Ve(a)&&!Di(a)){if(!t.h.D&&t._<1)return;yn(t,a),e&&e.A.l||bn(t,a)}}function bn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Pi(e,r)}function Ri(t,e){var r=t[re];return(r?wt(r):t)[e]}function Ml(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function wi(t){t.o||(t.o=zi(t.t))}function Mi(t,e,r){var o=Ti(e)?ct("MapSet").F(e,r):ki(e)?ct("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:_i(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=wo;s&&(d=[c],u=Oo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):ct("ES5").J(e,r);return(r?r.A:_i()).p.push(o),o}function zu(t){return gt(t)||Fe(22,t),(function e(r){if(!Ve(r))return r;var o,a=r[re],i=_r(r);if(a){if(!a.P&&(a.i<4||!ct("ES5").K(a)))return a.t;a.I=!0,o=Il(r,i),a.I=!1}else o=Il(r,i);return er(o,(function(s,c){a&&Mu(a.t,s)===c||Pl(o,s,e(c))})),i===3?new Set(o):o})(t)}function Il(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return zi(t)}function Ul(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[re];return wo.get(u,s)},set:function(u){var m=this[re];wo.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][re];if(!d.P)switch(d.i){case 5:o(d)&&_t(d);break;case 4:r(d)&&_t(d)}}}function r(s){for(var c=s.t,d=s.k,u=wr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==re){var y=c[h];if(y===void 0&&!Rr(c,h))return!0;var b=d[h],x=b&&b[re];if(x?x.t!==y:!Dl(b,y))return!0}}var C=!!c[re];return u.length!==wr(c).length+(C?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&Fe(3,JSON.stringify(wt(s)))}var i={};Tu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(b,""+x,t(x,!0));return b}var C=$l(y);delete C[re];for(var R=wr(C),w=0;w<R.length;w++){var N=R[w];C[N]=t(N,h||!!C[N].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(d,s),m={i:d?5:4,A:c?c.A:_i(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,re,{value:m,writable:!0}),u},S:function(s,c,d){d?gt(c)&&c[re].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[re];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)er(b,(function(S){S!==re&&(y[S]!==void 0||Rr(y,S)?x[S]||u(b[S]):(x[S]=!0,_t(h)))})),er(y,(function(S){b[S]!==void 0||Rr(b,S)||(x[S]=!1,_t(h))}));else if(C===5){if(o(h)&&(_t(h),x.length=!0),b.length<y.length)for(var R=b.length;R<y.length;R++)x[R]=!1;else for(var w=y.length;w<b.length;w++)x[w]=!0;for(var N=Math.min(b.length,y.length),E=0;E<N;E++)b.hasOwnProperty(E)||(x[E]=!0),x[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Tl,Ro,Ui=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Pu=typeof Map<"u",Du=typeof Set<"u",kl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Fl=Ui?Symbol.for("immer-nothing"):((Tl={})["immer-nothing"]=!0,Tl),zl=Ui?Symbol.for("immer-draftable"):"__$immer_draftable",re=Ui?Symbol.for("immer-state"):"__$immer_state";var Uu=""+Object.prototype.constructor,wr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$l=Object.getOwnPropertyDescriptors||function(t){var e={};return wr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ii={},wo={get:function(t,e){if(e===re)return t;var r=wt(t);if(!Rr(r,e))return(function(a,i,s){var c,d=Ml(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!Ve(o)?o:o===Ri(t.t,e)?(wi(t),t.o[e]=Mi(t.A.h,o,t)):o},has:function(t,e){return e in wt(t)},ownKeys:function(t){return Reflect.ownKeys(wt(t))},set:function(t,e,r){var o=Ml(wt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ri(wt(t),e),i=a?.[re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Dl(r,a)&&(r!==void 0||Rr(t.t,e)))return!0;wi(t),_t(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ri(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,wi(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=wt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){Fe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Fe(12)}},Oo={};er(wo,(function(t,e){Oo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Oo.deleteProperty=function(t,e){return Oo.set.call(this,t,e,void 0)},Oo.set=function(t,e,r){return wo.set.call(this,t[0],e,r,t[0])};var Fu=(function(){function t(r){var o=this;this.O=kl,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(C){var R=this;C===void 0&&(C=c);for(var w=arguments.length,N=Array(w>1?w-1:0),E=1;E<w;E++)N[E-1]=arguments[E];return d.produce(C,(function(S){var A;return(A=i).call.apply(A,[R,S].concat(N))}))}}var u;if(typeof i!="function"&&Fe(6),s!==void 0&&typeof s!="function"&&Fe(7),Ve(a)){var m=_l(o),h=Mi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?gn(m):Ni(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return Ai(m,s),Oi(C,m)}),(function(C){throw gn(m),C})):(Ai(m,s),Oi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Fl&&(u=void 0),o.D&&Pi(u,!0),s){var b=[],x=[];ct("Patches").M(a,u,b,x),s(b,x)}return u}Fe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,s,c]})):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ve(r)||Fe(8),gt(r)&&(r=zu(r));var o=_l(this),a=Mi(this,r,void 0);return a[re].C=!0,Ni(o),a},e.finishDraft=function(r,o){var a=r&&r[re],i=a.A;return Ai(i,o),Oi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!kl&&Fe(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=ct("Patches").$;return gt(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),Ie=new Fu,$u=Ie.produce,K7=Ie.produceWithPatches.bind(Ie),Z7=Ie.setAutoFreeze.bind(Ie),q7=Ie.setUseProxies.bind(Ie),Y7=Ie.applyPatches.bind(Ie),X7=Ie.createDraft.bind(Ie),J7=Ie.finishDraft.bind(Ie),vn=$u;function tr(t){"@babel/helpers - typeof";return tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tr(t)}function Bl(t,e){if(tr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(tr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hl(t){var e=Bl(t,"string");return tr(e)=="symbol"?e:e+""}function Gl(t,e,r){return(e=Hl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Fi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wl(Object(r),!0).forEach(function(o){Gl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wl(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ye(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var jl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),$i=function(){return Math.random().toString(36).substring(7).split("").join(".")},xn={INIT:"@@redux/INIT"+$i(),REPLACE:"@@redux/REPLACE"+$i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+$i()}};function Bu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Bi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ye(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ye(1));return r(Bi)(t,e)}if(typeof t!="function")throw new Error(ye(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(ye(3));return i}function h(C){if(typeof C!="function")throw new Error(ye(4));if(d)throw new Error(ye(5));var R=!0;return u(),c.push(C),function(){if(R){if(d)throw new Error(ye(6));R=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!Bu(C))throw new Error(ye(7));if(typeof C.type>"u")throw new Error(ye(8));if(d)throw new Error(ye(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var R=s=c,w=0;w<R.length;w++){var N=R[w];N()}return C}function b(C){if(typeof C!="function")throw new Error(ye(10));a=C,y({type:xn.REPLACE})}function x(){var C,R=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ye(11));function E(){N.next&&N.next(m())}E();var S=R(E);return{unsubscribe:S}}},C[jl]=function(){return this},C}return y({type:xn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[jl]=x,o}function Hu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:xn.INIT});if(typeof o>"u")throw new Error(ye(12));if(typeof r(void 0,{type:xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ye(13))})}function Vl(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{Hu(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},x=0;x<i.length;x++){var C=i[x],R=r[C],w=u[C],N=R(w,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(ye(14))}b[C]=N,y=y||N!==w}return y=y||i.length!==Object.keys(u).length,y?b:u}}function Nr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function Kl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ye(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=Nr.apply(void 0,c)(a.dispatch),Fi(Fi({},a),{},{dispatch:i})}}}function Zl(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var ql=Zl();ql.withExtraArgument=Zl;var Hi=ql;var e1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Gu=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Mr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Wu=Object.defineProperty,ju=Object.defineProperties,Vu=Object.getOwnPropertyDescriptors,Yl=Object.getOwnPropertySymbols,Ku=Object.prototype.hasOwnProperty,Zu=Object.prototype.propertyIsEnumerable,Xl=function(t,e,r){return e in t?Wu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Nt=function(t,e){for(var r in e||(e={}))Ku.call(e,r)&&Xl(t,r,e[r]);if(Yl)for(var o=0,a=Yl(e);o<a.length;o++){var r=a[o];Zu.call(e,r)&&Xl(t,r,e[r])}return t},Gi=function(t,e){return ju(t,Vu(e))},qu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Yu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Nr:Nr.apply(null,arguments)},gy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Xu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Mt(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return Nt(Nt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}var Ju=(function(t){e1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Mr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Mr([void 0],r.concat(this))))},e})(Array),Qu=(function(t){e1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Mr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Mr([void 0],r.concat(this))))},e})(Array);function Vi(t){return Ve(t)?vn(t,function(){}):t}function ef(t){return typeof t=="boolean"}function tf(){return function(e){return rf(e)}}function rf(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Ju;if(r&&(ef(r)?u.push(Hi):u.push(Hi.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Wi=!0;function t1(t){var e=tf(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Xu(a))b=Vl(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(e),!Wi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Wi&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Kl.apply(void 0,x),R=Nr;d&&(R=Yu(Nt({trace:!Wi},typeof d=="object"&&d)));var w=new Qu(C),N=w;Array.isArray(y)?N=Mr([C],y):typeof y=="function"&&(N=y(w));var E=R.apply(void 0,N);return Bi(b,m,E)}function r1(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function of(t){return typeof t=="function"}function nf(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?r1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(of(t))d=function(){return Vi(t())};else{var u=Vi(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=Mr([i[y.type]],s.filter(function(x){var C=x.matcher;return C(y)}).map(function(x){var C=x.reducer;return C}));return b.filter(function(x){return!!x}).length===0&&(b=[c]),b.reduce(function(x,C){if(C)if(gt(x)){var R=x,w=C(R,y);return w===void 0?x:w}else{if(Ve(x))return vn(x,function(N){return C(N,y)});var w=C(x,y);if(w===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return x},h)}return m.getInitialState=d,m}function af(t,e){return t+"/"+e}function o1(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Vi(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=af(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?Mt(y,x):Mt(y)});function d(){var m=typeof t.extraReducers=="function"?r1(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],R=C===void 0?void 0:C,w=Nt(Nt({},y),s);return nf(r,function(N){for(var E in w)N.addCase(E,w[E]);for(var S=0,A=x;S<A.length;S++){var I=A[S];N.addMatcher(I.matcher,I.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var sf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cf=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=sf[Math.random()*64|0];return e},lf=["name","message","stack","code"],ji=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Jl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),df=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=lf;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},xy=(function(){function t(e,r,o){var a=Mt(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Gi(Nt({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=Mt(e+"/pending",function(m,h,y){return{payload:void 0,meta:Gi(Nt({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Mt(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||df)(m||"Rejected"),meta:Gi(Nt({},x||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function u(m){return function(h,y,b){var x=o?.idGenerator?o.idGenerator(m):cf(),C=new d,R,w=!1;function N(S){R=S,C.abort()}var E=(function(){return qu(this,null,function(){var S,A,I,$,te,W,z;return Gu(this,function(U){switch(U.label){case 0:return U.trys.push([0,4,,5]),$=(S=o?.condition)==null?void 0:S.call(o,m,{getState:y,extra:b}),ff($)?[4,$]:[3,2];case 1:$=U.sent(),U.label=2;case 2:if($===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,te=new Promise(function(V,de){return C.signal.addEventListener("abort",function(){return de({name:"AbortError",message:R||"Aborted"})})}),h(i(x,m,(A=o?.getPendingMeta)==null?void 0:A.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([te,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(V,de){return new ji(V,de)},fulfillWithValue:function(V,de){return new Jl(V,de)}})).then(function(V){if(V instanceof ji)throw V;return V instanceof Jl?a(V.payload,x,m,V.meta):a(V,x,m)})])];case 3:return I=U.sent(),[3,5];case 4:return W=U.sent(),I=W instanceof ji?s(null,x,m,W.payload,W.meta):s(W,x,m),[3,5];case 5:return z=o&&!o.dispatchConditionRejection&&s.match(I)&&I.meta.condition,z||h(I),[2,I]}})})})();return Object.assign(E,{abort:N,requestId:x,arg:m,unwrap:function(){return E.then(uf)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function uf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ff(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var n1="listener",a1="completed",i1="cancelled",Sy="task-"+i1,Cy="task-"+a1,Ey=n1+"-"+i1,Ly=n1+"-"+a1;var Ki="listenerMiddleware";var Ay=Mt(Ki+"/add"),Oy=Mt(Ki+"/removeAll"),Ry=Mt(Ki+"/remove");var Ql,wy=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Ql||(Ql=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},pf=function(t){return function(e){setTimeout(e,t)}},_y=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:pf(10);Ul();window.ftReduxStores||(window.ftReduxStores={});var rr=class t extends pt{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(Or(i))return i;if(a==null)return;let s=o1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=t1({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Ge(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Lo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function hf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Or(e)&&e.clear()}var Sn=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);ft(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function mf(t,e,r){return new Sn(t,e,r).watch()}var _o=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Xi={};j(Xi,{scrollHelper:()=>gf});var qi,Cn=new Map,Yi=class{lock(e,r){if(r){let o=Cn.get(r);if(o==null||o===e)return Cn.set(r,e),r}}release(e,r){r&&Cn.get(r)===e&&Cn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of Ea(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=Wt(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(qi=window.FluidTopicsScrollHelper)!==null&&qi!==void 0?qi:new Yi;var gf=window.FluidTopicsScrollHelper;var Qi={};j(Qi,{SearchPlaceConverter:()=>kr,SearchPlaceQueryParams:()=>G,isSearchPlaceQueryParams:()=>Z1,serializeRequest:()=>vf});var s1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(s1||(s1={}));var c1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(c1||(c1={}));var l1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(l1||(l1={}));var d1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(d1||(d1={}));var u1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(u1||(u1={}));var f1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(f1||(f1={}));var p1;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(p1||(p1={}));var h1;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(h1||(h1={}));var m1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(m1||(m1={}));var g1;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(g1||(g1={}));var y1;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(y1||(y1={}));var b1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(b1||(b1={}));var v1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(v1||(v1={}));var x1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(x1||(x1={}));var S1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(S1||(S1={}));var C1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(C1||(C1={}));var Ir;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Ir||(Ir={}));var E1;(function(t){t.ASC="ASC",t.DESC="DESC"})(E1||(E1={}));var L1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(L1||(L1={}));var Ji;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ji||(Ji={}));var I1=t=>Object.keys(Ji).includes(t);var A1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(A1||(A1={}));var O1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(O1||(O1={}));var R1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(R1||(R1={}));var Tr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Tr||(Tr={}));var T1=t=>Object.keys(Tr).includes(t);var w1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(w1||(w1={}));var _1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(_1||(_1={}));var N1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(N1||(N1={}));var le;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(le||(le={}));var $e;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})($e||($e={}));var M1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(M1||(M1={}));var k1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(k1||(k1={}));var z1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(z1||(z1={}));var P1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.OTHER="OTHER"})(P1||(P1={}));var D1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(D1||(D1={}));var U1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(U1||(U1={}));var F1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(F1||(F1={}));var $1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})($1||($1={}));var B1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(B1||(B1={}));var H1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(H1||(H1={}));var G1;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(G1||(G1={}));var W1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(W1||(W1={}));var yf={[le.PERSONAL_BOOK_SHARE_USER]:[le.PERSONAL_BOOK_USER],[le.HTML_EXPORT_USER]:[le.PERSONAL_BOOK_USER],[le.PDF_EXPORT_USER]:[le.PERSONAL_BOOK_USER],[le.KHUB_ADMIN]:[le.CONTENT_PUBLISHER],[le.ADMIN]:[le.KHUB_ADMIN,le.USERS_ADMIN,le.PORTAL_ADMIN,le.BEHAVIOR_DATA_USER],[le.GENERATIVE_AI_EXPORT_USER]:[le.GENERATIVE_AI_USER]};function j1(t,e){return t===e||(yf[t]??[]).some(r=>j1(r,e))}function V1(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>j1(o,e))}function bf(t){return`"${t}"`}function K1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function vf(t,e){return new kr(t).serialize(e)}var G;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(G||(G={}));var xf=new Set(Object.values(G));function Z1(t){return xf.has(t)}var kr=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,u,m,h,y,b;let x=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&x.append(G.LOCALE,e.contentLocale):x.append(G.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append(G.QUERY,e.query);let C=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(C.length>0){let S=C.map(A=>{var I,$;let te=(($=(I=A.valueFilter)===null||I===void 0?void 0:I.values)!==null&&$!==void 0?$:[]).map(W=>this.escapeFilters(W)).map(W=>bf(K1(W))).join("_");return`${A.key}~${te}`}).join("*");x.append(G.VALUE_FILTERS,S)}let R=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(R.length>0){let S=R.map(A=>{var I;return`${A.key}~${(I=A.dateFilter)===null||I===void 0?void 0:I.type.toLowerCase()}`}).join("*");x.append(G.DATE_FILTERS,S)}let w=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&u!==void 0?u:[];if(w.length>0){let S=w.map(A=>{var I,$;return`${A.key}~${(I=A.rangeFilter)===null||I===void 0?void 0:I.from}_${($=A.rangeFilter)===null||$===void 0?void 0:$.to}`}).join("*");x.append(G.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append(G.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append(G.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append(G.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&x.append(G.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append(G.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let N=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let S in N)x.append(S,N[S]);let E=new Array;return x.forEach((S,A)=>{E.push(this.encodeQueryString(A)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),u=d.get(G.LOCALE)==="all"?void 0:d.get(G.LOCALE),m=((r=d.get(G.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(G.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(G.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(G.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get(G.KEYWORD_MATCH),C=x?x.toUpperCase()===Ir.MANDATORY?Ir.MANDATORY:Ir.OPTIONAL:void 0,R={};for(let w of d.keys())Z1(w)||(R[w]=d.get(w));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(G.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:I1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Wt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:R}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(G.FILTERS)&&(d=this.parseValueFilters((r=e.get(G.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(G.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(G.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(G.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(G.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(G.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(K1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Tr[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(T1(e))return[{key:"ft:lastEdition",dateFilter:{type:Tr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[G.LOCALE,G.FILTERS,G.VALUE_FILTERS,G.DATE_FILTERS,G.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(G.LOCALE),r!==void 0&&o.searchParams.append(G.LOCALE,r),o.toString()}};var rs={};j(rs,{toFtFormComponent:()=>ts});var es=Symbol("elementInternals"),ts=he(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[es].form}constructor(...o){super(o),this[es]=this.attachInternals()}setFormValue(o){this[es].setFormValue(o)}}return e});var os={};j(os,{DateFormatter:()=>or});var or=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var as={};j(as,{ALL_KEYS_VALUE:()=>ns,SameWindowStorageEvent:()=>zr});var ns="__all__",zr=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==ns}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new zr(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new zr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new zr(ns))}});var ss={};j(ss,{FocusMainContentEvent:()=>is});var is=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var q1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Sf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function Cf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Sf);document.addEventListener("click",Cf);var Y1=T`
47
+ `;var Rl={};var Li={};j(Li,{ParametrizedLabelResolver:()=>Eo});var Eo=class t{constructor(e,r){this.defaultLabels=e,this.labels=r}resolve(e,...r){var o,a;e=this.resolvePluralKey(e,r);let i=(a=(o=this.labels[e])!==null&&o!==void 0?o:this.defaultLabels[e])!==null&&a!==void 0?a:"";return t.replaceParameters(i,...r)}static replaceParameters(e,...r){return r.forEach((o,a)=>e=e.replace(new RegExp(`\\{${a}([^}]*)\\}`,"g"),(i,s)=>t.formatValue(o,s))),e}resolvePluralKey(e,r){for(let o of r)if(typeof o=="number"){let a=`${String(e)}[\\=${o}]`;if(a in this.labels||a in this.defaultLabels)return a}return e}static formatValue(e,r){return e instanceof Date?t.formatDate(e,r):e??""}static formatDate(e,r){let o=a=>r?.includes("date")?e.toLocaleDateString(a):r?.includes("time")?e.toLocaleTimeString(a):e.toLocaleString(a);try{return o(document.documentElement.lang)}catch{return o()}}};var Zi={};j(Zi,{FtCommandQueue:()=>Lo,FtLitElementRedux:()=>Qt,FtReduxStore:()=>rr,FtStateManager:()=>_o,ReduxWatcher:()=>Sn,clearAllStores:()=>hf,isFtReduxStore:()=>Or,redux:()=>Ar,reduxEventListener:()=>Nu,reduxReactive:()=>_u,watch:()=>mf,withRedux:()=>wl});var _u=()=>(t,e)=>{var r;let o=t.constructor;o.reduxReactiveProperties=new Set(o.reduxReactiveProperties),(r=o.reduxReactiveProperties)===null||r===void 0||r.add(e)},Ar=t=>{let e=t??{};return(r,o)=>{var a;let i={hasChanged:ft,attribute:!1,...e};L(i)(r,o);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(o,{selector:(a=e.selector)!==null&&a!==void 0?a:(c=>c[o]),store:e.store})}},Nu=t=>(e,r)=>{let o=e.constructor;o.reduxEventListeners=new Map(o.reduxEventListeners),o.reduxEventListeners.set(r,t)};var Lo=class{constructor(){this.queue=[]}add(e,r=!1){r&&this.clear(e.type),this.queue.push(e)}consume(e){let r=this.queue.find(o=>o.type===e);return r&&(this.queue=this.queue.filter(o=>o!==r)),r}clear(e){typeof e=="string"?this.queue=this.queue.filter(r=>r.type!==e):this.queue=this.queue.filter(r=>!e.test(r.type))}};function Or(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Ao=Symbol("internalReduxEventsUnsubscribers"),Rt=Symbol("internalStoresUnsubscribers"),Jt=Symbol("internalStores"),wl=he(Symbol("withRedux"),function(t){var e,r,o;class a extends t{constructor(){super(...arguments),this[e]=new Map,this[r]=new Map,this[o]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(c=>s.has(c))&&this.updateFromStores()}getUnnamedStore(){if(this[Jt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Jt].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Jt].get(s)}addStore(s,c){var d;c=(d=c??s.name)!==null&&d!==void 0?d:"default-store",this.unsubscribeFromStore(c),this[Jt].set(c,s),this.subscribeToStore(c,s),this.updateFromStores()}removeStore(s){let c=typeof s=="string"?s:s.name;this.unsubscribeFromStore(c),this[Jt].delete(c)}setupStores(){this.unsubscribeFromStores(),this[Jt].forEach((s,c)=>this.subscribeToStore(c,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,c)=>{let d=this.constructor.getPropertyOptions(c);if(!d?.attribute||!this.hasAttribute(typeof d?.attribute=="string"?d.attribute:c)){let u=this.getStore(s.store);u&&(s.store?this[Rt].has(s.store):this[Rt].size>0)&&(this[c]=s.selector(u.getState(),this))}})}subscribeToStore(s,c){var d;this[Rt].set(s,c.subscribe(()=>this.updateFromStores())),this[Ao].set(s,[]),Or(c)&&c.eventBus&&((d=this.reduxConstructor.reduxEventListeners)===null||d===void 0||d.forEach((u,m)=>{if(typeof this[m]=="function"&&(!u.store||c.name===u.store)){let h=y=>this[m](y);c.addEventListener(u.eventName,h),this[Ao].get(s).push(()=>c.removeEventListener(u.eventName,h))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[Rt].forEach((s,c)=>this.unsubscribeFromStore(c))}unsubscribeFromStore(s){var c;this[Rt].has(s)&&this[Rt].get(s)(),this[Rt].delete(s),(c=this[Ao].get(s))===null||c===void 0||c.forEach(d=>d()),this[Ao].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=Rt,r=Jt,o=Ao,a.reduxProperties=new Map,a.reduxReactiveProperties=new Set,a.reduxEventListeners=new Map,a}),Qt=class extends wl(Z){};function Fe(t){for(var e=arguments.length,r=Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];if(0)var a,i;throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function gt(t){return!!t&&!!t[re]}function Ve(t){var e;return!!t&&((function(r){if(!r||typeof r!="object")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;var a=Object.hasOwnProperty.call(o,"constructor")&&o.constructor;return a===Object||typeof a=="function"&&Function.toString.call(a)===Uu})(t)||Array.isArray(t)||!!t[zl]||!!(!((e=t.constructor)===null||e===void 0)&&e[zl])||Ti(t)||ki(t))}function er(t,e,r){r===void 0&&(r=!1),_r(t)===0?(r?Object.keys:wr)(t).forEach((function(o){r&&typeof o=="symbol"||e(o,t[o],t)})):t.forEach((function(o,a){return e(a,o,t)}))}function _r(t){var e=t[re];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Ti(t)?2:ki(t)?3:0}function Rr(t,e){return _r(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Mu(t,e){return _r(t)===2?t.get(e):t[e]}function Pl(t,e,r){var o=_r(t);o===2?t.set(e,r):o===3?t.add(r):t[e]=r}function Dl(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Ti(t){return Pu&&t instanceof Map}function ki(t){return Du&&t instanceof Set}function wt(t){return t.o||t.t}function zi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=$l(t);delete e[re];for(var r=wr(e),o=0;o<r.length;o++){var a=r[o],i=e[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(e[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:t[a]})}return Object.create(Object.getPrototypeOf(t),e)}function Pi(t,e){return e===void 0&&(e=!1),Di(t)||gt(t)||!Ve(t)||(_r(t)>1&&(t.set=t.add=t.clear=t.delete=Iu),Object.freeze(t),e&&er(t,(function(r,o){return Pi(o,!0)}),!0)),t}function Iu(){Fe(2)}function Di(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function ct(t){var e=Ii[t];return e||Fe(18,t),e}function Tu(t,e){Ii[t]||(Ii[t]=e)}function _i(){return Ro}function Ai(t,e){e&&(ct("Patches"),t.u=[],t.s=[],t.v=e)}function gn(t){Ni(t),t.p.forEach(ku),t.p=null}function Ni(t){t===Ro&&(Ro=t.l)}function _l(t){return Ro={p:[],l:Ro,h:t,m:!0,_:0}}function ku(t){var e=t[re];e.i===0||e.i===1?e.j():e.g=!0}function Oi(t,e){e._=e.p.length;var r=e.p[0],o=t!==void 0&&t!==r;return e.h.O||ct("ES5").S(e,t,o),o?(r[re].P&&(gn(e),Fe(4)),Ve(t)&&(t=yn(e,t),e.l||bn(e,t)),e.u&&ct("Patches").M(r[re].t,t,e.u,e.s)):t=yn(e,r,[]),gn(e),e.u&&e.v(e.u,e.s),t!==Fl?t:void 0}function yn(t,e,r){if(Di(e))return e;var o=e[re];if(!o)return er(e,(function(c,d){return Nl(t,o,e,c,d,r)}),!0),e;if(o.A!==t)return e;if(!o.P)return bn(t,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var a=o.i===4||o.i===5?o.o=zi(o.k):o.o,i=a,s=!1;o.i===3&&(i=new Set(a),a.clear(),s=!0),er(i,(function(c,d){return Nl(t,o,a,c,d,r,s)})),bn(t,a,!1),r&&t.u&&ct("Patches").N(o,r,t.u,t.s)}return o.o}function Nl(t,e,r,o,a,i,s){if(gt(a)){var c=yn(t,a,i&&e&&e.i!==3&&!Rr(e.R,o)?i.concat(o):void 0);if(Pl(r,o,c),!gt(c))return;t.m=!1}else s&&r.add(a);if(Ve(a)&&!Di(a)){if(!t.h.D&&t._<1)return;yn(t,a),e&&e.A.l||bn(t,a)}}function bn(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&Pi(e,r)}function Ri(t,e){var r=t[re];return(r?wt(r):t)[e]}function Ml(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;r=Object.getPrototypeOf(r)}}function _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function wi(t){t.o||(t.o=zi(t.t))}function Mi(t,e,r){var o=Ti(e)?ct("MapSet").F(e,r):ki(e)?ct("MapSet").T(e,r):t.O?(function(a,i){var s=Array.isArray(a),c={i:s?1:0,A:i?i.A:_i(),P:!1,I:!1,R:{},l:i,t:a,k:null,o:null,j:null,C:!1},d=c,u=wo;s&&(d=[c],u=Oo);var m=Proxy.revocable(d,u),h=m.revoke,y=m.proxy;return c.k=y,c.j=h,y})(e,r):ct("ES5").J(e,r);return(r?r.A:_i()).p.push(o),o}function zu(t){return gt(t)||Fe(22,t),(function e(r){if(!Ve(r))return r;var o,a=r[re],i=_r(r);if(a){if(!a.P&&(a.i<4||!ct("ES5").K(a)))return a.t;a.I=!0,o=Il(r,i),a.I=!1}else o=Il(r,i);return er(o,(function(s,c){a&&Mu(a.t,s)===c||Pl(o,s,e(c))})),i===3?new Set(o):o})(t)}function Il(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return zi(t)}function Ul(){function t(s,c){var d=i[s];return d?d.enumerable=c:i[s]=d={configurable:!0,enumerable:c,get:function(){var u=this[re];return wo.get(u,s)},set:function(u){var m=this[re];wo.set(m,s,u)}},d}function e(s){for(var c=s.length-1;c>=0;c--){var d=s[c][re];if(!d.P)switch(d.i){case 5:o(d)&&_t(d);break;case 4:r(d)&&_t(d)}}}function r(s){for(var c=s.t,d=s.k,u=wr(d),m=u.length-1;m>=0;m--){var h=u[m];if(h!==re){var y=c[h];if(y===void 0&&!Rr(c,h))return!0;var b=d[h],x=b&&b[re];if(x?x.t!==y:!Dl(b,y))return!0}}var C=!!c[re];return u.length!==wr(c).length+(C?0:1)}function o(s){var c=s.k;if(c.length!==s.t.length)return!0;var d=Object.getOwnPropertyDescriptor(c,c.length-1);if(d&&!d.get)return!0;for(var u=0;u<c.length;u++)if(!c.hasOwnProperty(u))return!0;return!1}function a(s){s.g&&Fe(3,JSON.stringify(wt(s)))}var i={};Tu("ES5",{J:function(s,c){var d=Array.isArray(s),u=(function(h,y){if(h){for(var b=Array(y.length),x=0;x<y.length;x++)Object.defineProperty(b,""+x,t(x,!0));return b}var C=$l(y);delete C[re];for(var R=wr(C),w=0;w<R.length;w++){var N=R[w];C[N]=t(N,h||!!C[N].enumerable)}return Object.create(Object.getPrototypeOf(y),C)})(d,s),m={i:d?5:4,A:c?c.A:_i(),P:!1,I:!1,R:{},l:c,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,re,{value:m,writable:!0}),u},S:function(s,c,d){d?gt(c)&&c[re].A===s&&e(s.p):(s.u&&(function u(m){if(m&&typeof m=="object"){var h=m[re];if(h){var y=h.t,b=h.k,x=h.R,C=h.i;if(C===4)er(b,(function(S){S!==re&&(y[S]!==void 0||Rr(y,S)?x[S]||u(b[S]):(x[S]=!0,_t(h)))})),er(y,(function(S){b[S]!==void 0||Rr(b,S)||(x[S]=!1,_t(h))}));else if(C===5){if(o(h)&&(_t(h),x.length=!0),b.length<y.length)for(var R=b.length;R<y.length;R++)x[R]=!1;else for(var w=y.length;w<b.length;w++)x[w]=!0;for(var N=Math.min(b.length,y.length),E=0;E<N;E++)b.hasOwnProperty(E)||(x[E]=!0),x[E]===void 0&&u(b[E])}}}})(s.p[0]),e(s.p))},K:function(s){return s.i===4?r(s):o(s)}})}var Tl,Ro,Ui=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Pu=typeof Map<"u",Du=typeof Set<"u",kl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Fl=Ui?Symbol.for("immer-nothing"):((Tl={})["immer-nothing"]=!0,Tl),zl=Ui?Symbol.for("immer-draftable"):"__$immer_draftable",re=Ui?Symbol.for("immer-state"):"__$immer_state";var Uu=""+Object.prototype.constructor,wr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,$l=Object.getOwnPropertyDescriptors||function(t){var e={};return wr(t).forEach((function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)})),e},Ii={},wo={get:function(t,e){if(e===re)return t;var r=wt(t);if(!Rr(r,e))return(function(a,i,s){var c,d=Ml(i,s);return d?"value"in d?d.value:(c=d.get)===null||c===void 0?void 0:c.call(a.k):void 0})(t,r,e);var o=r[e];return t.I||!Ve(o)?o:o===Ri(t.t,e)?(wi(t),t.o[e]=Mi(t.A.h,o,t)):o},has:function(t,e){return e in wt(t)},ownKeys:function(t){return Reflect.ownKeys(wt(t))},set:function(t,e,r){var o=Ml(wt(t),e);if(o?.set)return o.set.call(t.k,r),!0;if(!t.P){var a=Ri(wt(t),e),i=a?.[re];if(i&&i.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(Dl(r,a)&&(r!==void 0||Rr(t.t,e)))return!0;wi(t),_t(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return Ri(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,wi(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=wt(t),o=Reflect.getOwnPropertyDescriptor(r,e);return o&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:o.enumerable,value:r[e]}},defineProperty:function(){Fe(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Fe(12)}},Oo={};er(wo,(function(t,e){Oo[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Oo.deleteProperty=function(t,e){return Oo.set.call(this,t,e,void 0)},Oo.set=function(t,e,r){return wo.set.call(this,t[0],e,r,t[0])};var Fu=(function(){function t(r){var o=this;this.O=kl,this.D=!0,this.produce=function(a,i,s){if(typeof a=="function"&&typeof i!="function"){var c=i;i=a;var d=o;return function(C){var R=this;C===void 0&&(C=c);for(var w=arguments.length,N=Array(w>1?w-1:0),E=1;E<w;E++)N[E-1]=arguments[E];return d.produce(C,(function(S){var A;return(A=i).call.apply(A,[R,S].concat(N))}))}}var u;if(typeof i!="function"&&Fe(6),s!==void 0&&typeof s!="function"&&Fe(7),Ve(a)){var m=_l(o),h=Mi(o,a,void 0),y=!0;try{u=i(h),y=!1}finally{y?gn(m):Ni(m)}return typeof Promise<"u"&&u instanceof Promise?u.then((function(C){return Ai(m,s),Oi(C,m)}),(function(C){throw gn(m),C})):(Ai(m,s),Oi(u,m))}if(!a||typeof a!="object"){if((u=i(a))===void 0&&(u=a),u===Fl&&(u=void 0),o.D&&Pi(u,!0),s){var b=[],x=[];ct("Patches").M(a,u,b,x),s(b,x)}return u}Fe(21,a)},this.produceWithPatches=function(a,i){if(typeof a=="function")return function(u){for(var m=arguments.length,h=Array(m>1?m-1:0),y=1;y<m;y++)h[y-1]=arguments[y];return o.produceWithPatches(u,(function(b){return a.apply(void 0,[b].concat(h))}))};var s,c,d=o.produce(a,i,(function(u,m){s=u,c=m}));return typeof Promise<"u"&&d instanceof Promise?d.then((function(u){return[u,s,c]})):[d,s,c]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Ve(r)||Fe(8),gt(r)&&(r=zu(r));var o=_l(this),a=Mi(this,r,void 0);return a[re].C=!0,Ni(o),a},e.finishDraft=function(r,o){var a=r&&r[re],i=a.A;return Ai(i,o),Oi(void 0,i)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!kl&&Fe(20),this.O=r},e.applyPatches=function(r,o){var a;for(a=o.length-1;a>=0;a--){var i=o[a];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}a>-1&&(o=o.slice(a+1));var s=ct("Patches").$;return gt(r)?s(r,o):this.produce(r,(function(c){return s(c,o)}))},t})(),Ie=new Fu,$u=Ie.produce,K7=Ie.produceWithPatches.bind(Ie),Z7=Ie.setAutoFreeze.bind(Ie),q7=Ie.setUseProxies.bind(Ie),Y7=Ie.applyPatches.bind(Ie),X7=Ie.createDraft.bind(Ie),J7=Ie.finishDraft.bind(Ie),vn=$u;function tr(t){"@babel/helpers - typeof";return tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tr(t)}function Bl(t,e){if(tr(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(tr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hl(t){var e=Bl(t,"string");return tr(e)=="symbol"?e:e+""}function Gl(t,e,r){return(e=Hl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Fi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wl(Object(r),!0).forEach(function(o){Gl(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wl(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function ye(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var jl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),$i=function(){return Math.random().toString(36).substring(7).split("").join(".")},xn={INIT:"@@redux/INIT"+$i(),REPLACE:"@@redux/REPLACE"+$i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+$i()}};function Bu(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Bi(t,e,r){var o;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ye(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ye(1));return r(Bi)(t,e)}if(typeof t!="function")throw new Error(ye(2));var a=t,i=e,s=[],c=s,d=!1;function u(){c===s&&(c=s.slice())}function m(){if(d)throw new Error(ye(3));return i}function h(C){if(typeof C!="function")throw new Error(ye(4));if(d)throw new Error(ye(5));var R=!0;return u(),c.push(C),function(){if(R){if(d)throw new Error(ye(6));R=!1,u();var N=c.indexOf(C);c.splice(N,1),s=null}}}function y(C){if(!Bu(C))throw new Error(ye(7));if(typeof C.type>"u")throw new Error(ye(8));if(d)throw new Error(ye(9));try{d=!0,i=a(i,C)}finally{d=!1}for(var R=s=c,w=0;w<R.length;w++){var N=R[w];N()}return C}function b(C){if(typeof C!="function")throw new Error(ye(10));a=C,y({type:xn.REPLACE})}function x(){var C,R=h;return C={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(ye(11));function E(){N.next&&N.next(m())}E();var S=R(E);return{unsubscribe:S}}},C[jl]=function(){return this},C}return y({type:xn.INIT}),o={dispatch:y,subscribe:h,getState:m,replaceReducer:b},o[jl]=x,o}function Hu(t){Object.keys(t).forEach(function(e){var r=t[e],o=r(void 0,{type:xn.INIT});if(typeof o>"u")throw new Error(ye(12));if(typeof r(void 0,{type:xn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ye(13))})}function Vl(t){for(var e=Object.keys(t),r={},o=0;o<e.length;o++){var a=e[o];typeof t[a]=="function"&&(r[a]=t[a])}var i=Object.keys(r),s,c;try{Hu(r)}catch(d){c=d}return function(u,m){if(u===void 0&&(u={}),c)throw c;if(0)var h;for(var y=!1,b={},x=0;x<i.length;x++){var C=i[x],R=r[C],w=u[C],N=R(w,m);if(typeof N>"u"){var E=m&&m.type;throw new Error(ye(14))}b[C]=N,y=y||N!==w}return y=y||i.length!==Object.keys(u).length,y?b:u}}function Nr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(o){return o}:e.length===1?e[0]:e.reduce(function(o,a){return function(){return o(a.apply(void 0,arguments))}})}function Kl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(o){return function(){var a=o.apply(void 0,arguments),i=function(){throw new Error(ye(15))},s={getState:a.getState,dispatch:function(){return i.apply(void 0,arguments)}},c=e.map(function(d){return d(s)});return i=Nr.apply(void 0,c)(a.dispatch),Fi(Fi({},a),{},{dispatch:i})}}}function Zl(t){var e=function(o){var a=o.dispatch,i=o.getState;return function(s){return function(c){return typeof c=="function"?c(a,i,t):s(c)}}};return e}var ql=Zl();ql.withExtraArgument=Zl;var Hi=ql;var e1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function o(){this.constructor=e}e.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),Gu=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(m){return d([u,m])}}function d(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(m){u=[6,m],a=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Mr=function(t,e){for(var r=0,o=e.length,a=t.length;r<o;r++,a++)t[a]=e[r];return t},Wu=Object.defineProperty,ju=Object.defineProperties,Vu=Object.getOwnPropertyDescriptors,Yl=Object.getOwnPropertySymbols,Ku=Object.prototype.hasOwnProperty,Zu=Object.prototype.propertyIsEnumerable,Xl=function(t,e,r){return e in t?Wu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Nt=function(t,e){for(var r in e||(e={}))Ku.call(e,r)&&Xl(t,r,e[r]);if(Yl)for(var o=0,a=Yl(e);o<a.length;o++){var r=a[o];Zu.call(e,r)&&Xl(t,r,e[r])}return t},Gi=function(t,e){return ju(t,Vu(e))},qu=function(t,e,r){return new Promise(function(o,a){var i=function(d){try{c(r.next(d))}catch(u){a(u)}},s=function(d){try{c(r.throw(d))}catch(u){a(u)}},c=function(d){return d.done?o(d.value):Promise.resolve(d.value).then(i,s)};c((r=r.apply(t,e)).next())})};var Yu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Nr:Nr.apply(null,arguments)},gy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function Xu(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return e===r}function Mt(t,e){function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return Nt(Nt({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(o){return o.type===t},r}var Ju=(function(t){e1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Mr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Mr([void 0],r.concat(this))))},e})(Array),Qu=(function(t){e1(e,t);function e(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=t.apply(this,r)||this;return Object.setPrototypeOf(a,e.prototype),a}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,Mr([void 0],r[0].concat(this)))):new(e.bind.apply(e,Mr([void 0],r.concat(this))))},e})(Array);function Vi(t){return Ve(t)?vn(t,function(){}):t}function ef(t){return typeof t=="boolean"}function tf(){return function(e){return rf(e)}}function rf(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e,o=t.immutableCheck,a=o===void 0?!0:o,i=t.serializableCheck,s=i===void 0?!0:i,c=t.actionCreatorCheck,d=c===void 0?!0:c,u=new Ju;if(r&&(ef(r)?u.push(Hi):u.push(Hi.withExtraArgument(r.extraArgument))),0){if(a)var m;if(s)var h;if(d)var y}return u}var Wi=!0;function t1(t){var e=tf(),r=t||{},o=r.reducer,a=o===void 0?void 0:o,i=r.middleware,s=i===void 0?e():i,c=r.devTools,d=c===void 0?!0:c,u=r.preloadedState,m=u===void 0?void 0:u,h=r.enhancers,y=h===void 0?void 0:h,b;if(typeof a=="function")b=a;else if(Xu(a))b=Vl(a);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var x=s;if(typeof x=="function"&&(x=x(e),!Wi&&!Array.isArray(x)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Wi&&x.some(function(S){return typeof S!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=Kl.apply(void 0,x),R=Nr;d&&(R=Yu(Nt({trace:!Wi},typeof d=="object"&&d)));var w=new Qu(C),N=w;Array.isArray(y)?N=Mr([C],y):typeof y=="function"&&(N=y(w));var E=R.apply(void 0,N);return Bi(b,m,E)}function r1(t){var e={},r=[],o,a={addCase:function(i,s){var c=typeof i=="string"?i:i.type;if(!c)throw new Error("`builder.addCase` cannot be called with an empty action type");if(c in e)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return e[c]=s,a},addMatcher:function(i,s){return r.push({matcher:i,reducer:s}),a},addDefaultCase:function(i){return o=i,a}};return t(a),[e,r,o]}function of(t){return typeof t=="function"}function nf(t,e,r,o){r===void 0&&(r=[]);var a=typeof e=="function"?r1(e):[e,r,o],i=a[0],s=a[1],c=a[2],d;if(of(t))d=function(){return Vi(t())};else{var u=Vi(t);d=function(){return u}}function m(h,y){h===void 0&&(h=d());var b=Mr([i[y.type]],s.filter(function(x){var C=x.matcher;return C(y)}).map(function(x){var C=x.reducer;return C}));return b.filter(function(x){return!!x}).length===0&&(b=[c]),b.reduce(function(x,C){if(C)if(gt(x)){var R=x,w=C(R,y);return w===void 0?x:w}else{if(Ve(x))return vn(x,function(N){return C(N,y)});var w=C(x,y);if(w===void 0){if(x===null)return x;throw Error("A case reducer on a non-draftable value must not return undefined")}return w}return x},h)}return m.getInitialState=d,m}function af(t,e){return t+"/"+e}function o1(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof t.initialState=="function"?t.initialState:Vi(t.initialState),o=t.reducers||{},a=Object.keys(o),i={},s={},c={};a.forEach(function(m){var h=o[m],y=af(e,m),b,x;"reducer"in h?(b=h.reducer,x=h.prepare):b=h,i[m]=b,s[y]=b,c[m]=x?Mt(y,x):Mt(y)});function d(){var m=typeof t.extraReducers=="function"?r1(t.extraReducers):[t.extraReducers],h=m[0],y=h===void 0?{}:h,b=m[1],x=b===void 0?[]:b,C=m[2],R=C===void 0?void 0:C,w=Nt(Nt({},y),s);return nf(r,function(N){for(var E in w)N.addCase(E,w[E]);for(var S=0,A=x;S<A.length;S++){var I=A[S];N.addMatcher(I.matcher,I.reducer)}R&&N.addDefaultCase(R)})}var u;return{name:e,reducer:function(m,h){return u||(u=d()),u(m,h)},actions:c,caseReducers:i,getInitialState:function(){return u||(u=d()),u.getInitialState()}}}var sf="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",cf=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=sf[Math.random()*64|0];return e},lf=["name","message","stack","code"],ji=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),Jl=(function(){function t(e,r){this.payload=e,this.meta=r}return t})(),df=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,o=lf;r<o.length;r++){var a=o[r];typeof t[a]=="string"&&(e[a]=t[a])}return e}return{message:String(t)}},xy=(function(){function t(e,r,o){var a=Mt(e+"/fulfilled",function(m,h,y,b){return{payload:m,meta:Gi(Nt({},b||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),i=Mt(e+"/pending",function(m,h,y){return{payload:void 0,meta:Gi(Nt({},y||{}),{arg:h,requestId:m,requestStatus:"pending"})}}),s=Mt(e+"/rejected",function(m,h,y,b,x){return{payload:b,error:(o&&o.serializeError||df)(m||"Rejected"),meta:Gi(Nt({},x||{}),{arg:y,requestId:h,rejectedWithValue:!!b,requestStatus:"rejected",aborted:m?.name==="AbortError",condition:m?.name==="ConditionError"})}}),c=!1,d=typeof AbortController<"u"?AbortController:(function(){function m(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return m.prototype.abort=function(){},m})();function u(m){return function(h,y,b){var x=o?.idGenerator?o.idGenerator(m):cf(),C=new d,R,w=!1;function N(S){R=S,C.abort()}var E=(function(){return qu(this,null,function(){var S,A,I,$,te,W,z;return Gu(this,function(U){switch(U.label){case 0:return U.trys.push([0,4,,5]),$=(S=o?.condition)==null?void 0:S.call(o,m,{getState:y,extra:b}),ff($)?[4,$]:[3,2];case 1:$=U.sent(),U.label=2;case 2:if($===!1||C.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return w=!0,te=new Promise(function(V,de){return C.signal.addEventListener("abort",function(){return de({name:"AbortError",message:R||"Aborted"})})}),h(i(x,m,(A=o?.getPendingMeta)==null?void 0:A.call(o,{requestId:x,arg:m},{getState:y,extra:b}))),[4,Promise.race([te,Promise.resolve(r(m,{dispatch:h,getState:y,extra:b,requestId:x,signal:C.signal,abort:N,rejectWithValue:function(V,de){return new ji(V,de)},fulfillWithValue:function(V,de){return new Jl(V,de)}})).then(function(V){if(V instanceof ji)throw V;return V instanceof Jl?a(V.payload,x,m,V.meta):a(V,x,m)})])];case 3:return I=U.sent(),[3,5];case 4:return W=U.sent(),I=W instanceof ji?s(null,x,m,W.payload,W.meta):s(W,x,m),[3,5];case 5:return z=o&&!o.dispatchConditionRejection&&s.match(I)&&I.meta.condition,z||h(I),[2,I]}})})})();return Object.assign(E,{abort:N,requestId:x,arg:m,unwrap:function(){return E.then(uf)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:a,typePrefix:e})}return t.withTypes=function(){return t},t})();function uf(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function ff(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var n1="listener",a1="completed",i1="cancelled",Sy="task-"+i1,Cy="task-"+a1,Ey=n1+"-"+i1,Ly=n1+"-"+a1;var Ki="listenerMiddleware";var Ay=Mt(Ki+"/add"),Oy=Mt(Ki+"/removeAll"),Ry=Mt(Ki+"/remove");var Ql,wy=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(Ql||(Ql=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},pf=function(t){return function(e){setTimeout(e,t)}},_y=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:pf(10);Ul();window.ftReduxStores||(window.ftReduxStores={});var rr=class t extends pt{static get(e){var r;let o=typeof e=="string"?e:e.name,a=typeof e=="string"?void 0:e,i=window.ftReduxStores[o];if(Or(i))return i;if(a==null)return;let s=o1({...a,reducers:(r=a.reducers)!==null&&r!==void 0?r:{}}),c=t1({reducer:(d,u)=>{if(u.type==="CLEAR_FT_REDUX_STORE"){let m=Ge(s.getInitialState());for(let h of u.keeping)m[h]=(d??m)[h];return m}else if(typeof u.type=="string"&&u.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...d,...u.overwrites};return s.reducer(d,u)}});return window.ftReduxStores[a.name]=new t(s,c,a.eventBus)}constructor(e,r,o){super(),this.reduxSlice=e,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Lo;let a=i=>i!=null?JSON.parse(JSON.stringify(i)):i;this.actions=new Proxy(this.reduxSlice.actions,{get:(i,s,c)=>{let d=s,u=i[d];return u?(...m)=>{let h=u(...m.map(a));return this.reduxStore.dispatch(h),h}:m=>{this.setState({[d]:a(m)})}}}),this.eventBus=o??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...e){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:e})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};function hf(){var t;for(let e of Object.values((t=window.ftReduxStores)!==null&&t!==void 0?t:{}))Or(e)&&e.clear()}var Sn=class{constructor(e,r,o){this.store=e,this.valueSelector=r,this.callback=o}watch(){return this.stop(),this.lastValue=this.valueSelector(this.store.getState()),this.unsubscribe=this.store.subscribe(()=>{let e=this.store.getState(),r=this.valueSelector(e);ft(this.lastValue,r)&&(this.callback(r,e),this.lastValue=r)}),this}stop(){return this.unsubscribe!=null&&(this.unsubscribe(),this.unsubscribe=void 0),this.lastValue=void 0,this}};function mf(t,e,r){return new Sn(t,e,r).watch()}var _o=class{constructor(){this.requestConsumers=new Map}getOrCreateRequestConsumers(e){var r;return(r=this.requestConsumers.get(e))!==null&&r!==void 0?r:this.requestConsumers.set(e,new Set).get(e)}registerComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).add(e).size==1&&this.onNewNeededRequest(o)}unregisterComponent(e,r){for(let o of r)this.getOrCreateRequestConsumers(o).delete(e)}isRequestNeeded(e){return this.getOrCreateRequestConsumers(e).size>0}};var Xi={};j(Xi,{scrollHelper:()=>gf});var qi,Cn=new Map,Yi=class{lock(e,r){if(r){let o=Cn.get(r);if(o==null||o===e)return Cn.set(r,e),r}}release(e,r){r&&Cn.get(r)===e&&Cn.delete(r)}findFirstScrollableParent(e){var r;let o,a;for(let i of Ea(e)){let s=i,c=this.elementCanScroll(s);if(c&&s.clientHeight&&s.clientHeight<s.scrollHeight){o=s;break}else c&&a==null&&(a=s)}return(r=o??a)!==null&&r!==void 0?r:document.body}elementCanScroll(e){try{return["auto","scroll"].includes(getComputedStyle(e).overflowY)&&!["contents"].includes(getComputedStyle(e).display)}catch{return!1}}getAbsoluteScrollOffset(e,r){var o,a;let i=0;for(;r&&r.offsetParent!==e.offsetParent;)i+=(o=r.offsetTop)!==null&&o!==void 0?o:0,r=r.offsetParent;return i+((a=r?.offsetTop)!==null&&a!==void 0?a:0)-e.offsetTop}computeTopOffsetRatio(e,r){if(typeof e=="number")return e;switch(e){case"end":return 1;case"center":return .5;case"nearest":return r;default:return 0}}scrollIntoViewIfPossible(e,r){let o=this.findFirstScrollableParent(e);if(e&&this.lock(this,o)){let a=this.getAbsoluteScrollOffset(o,e),i=a-o.clientHeight+e.clientHeight,s=a,c=Wt(0,(s-o.scrollTop)/(s-i),1),d=this.computeTopOffsetRatio(r?.position,c)*(i-s)+s;o.scrollTo({behavior:r?.behavior,top:d})}else console.warn("Could not scroll element into view because the scrollable parent is already locked",e,o);this.release(this,o)}};window.FluidTopicsScrollHelper=(qi=window.FluidTopicsScrollHelper)!==null&&qi!==void 0?qi:new Yi;var gf=window.FluidTopicsScrollHelper;var Qi={};j(Qi,{SearchPlaceConverter:()=>kr,SearchPlaceQueryParams:()=>G,isSearchPlaceQueryParams:()=>Z1,serializeRequest:()=>vf});var s1;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(s1||(s1={}));var c1;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(c1||(c1={}));var l1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(l1||(l1={}));var d1;(function(t){t.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",t.PERSONAL_BOOK="PERSONAL_BOOK",t.ATTACHMENT="ATTACHMENT",t.RESOURCE="RESOURCE",t.HTML_PACKAGE="HTML_PACKAGE"})(d1||(d1={}));var u1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(u1||(u1={}));var f1;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(f1||(f1={}));var p1;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(p1||(p1={}));var h1;(function(t){t.BOOKMARK__CREATE="BOOKMARK__CREATE",t.BOOKMARK__DELETE="BOOKMARK__DELETE",t.CASE_DEFLECTION__START="CASE_DEFLECTION__START",t.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",t.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",t.CHATBOT__RATE="CHATBOT__RATE",t.COLLECTION__CREATE="COLLECTION__CREATE",t.COLLECTION__UPDATE="COLLECTION__UPDATE",t.COLLECTION__DELETE="COLLECTION__DELETE",t.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",t.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",t.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",t.DOCUMENT__PRINT="DOCUMENT__PRINT",t.DOCUMENT__PROCESS="DOCUMENT__PROCESS",t.DOCUMENT__RATE="DOCUMENT__RATE",t.DOCUMENT__SEARCH="DOCUMENT__SEARCH",t.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",t.DOCUMENT__UNRATE="DOCUMENT__UNRATE",t.FEEDBACK__SEND="FEEDBACK__SEND",t.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",t.AI__RATE="AI__RATE",t.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",t.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",t.KHUB__PROCESS="KHUB__PROCESS",t.KHUB__SEARCH="KHUB__SEARCH",t.LABELS__DOWNLOAD="LABELS__DOWNLOAD",t.LINK__SHARE="LINK__SHARE",t.PAGE__DISPLAY="PAGE__DISPLAY",t.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",t.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",t.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",t.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",t.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",t.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",t.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",t.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",t.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",t.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",t.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",t.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",t.TOPIC__RATE="TOPIC__RATE",t.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",t.TOPIC__UNRATE="TOPIC__UNRATE",t.USER__LOGIN="USER__LOGIN",t.USER__LOGOUT="USER__LOGOUT",t.HEARTBEAT="HEARTBEAT"})(h1||(h1={}));var m1;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(m1||(m1={}));var g1;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(g1||(g1={}));var y1;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT",t.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",t.LINK_PREVIEW="LINK_PREVIEW",t.UD_VIEWER="UD_VIEWER",t.ASSET_VIEWER="ASSET_VIEWER"})(y1||(y1={}));var b1;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(b1||(b1={}));var v1;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(v1||(v1={}));var x1;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(x1||(x1={}));var S1;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(S1||(S1={}));var C1;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(C1||(C1={}));var Ir;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})(Ir||(Ir={}));var E1;(function(t){t.ASC="ASC",t.DESC="DESC"})(E1||(E1={}));var L1;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(L1||(L1={}));var Ji;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Ji||(Ji={}));var I1=t=>Object.keys(Ji).includes(t);var A1;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(A1||(A1={}));var O1;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(O1||(O1={}));var R1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(R1||(R1={}));var Tr;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Tr||(Tr={}));var T1=t=>Object.keys(Tr).includes(t);var w1;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(w1||(w1={}));var _1;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(_1||(_1={}));var N1;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(N1||(N1={}));var le;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",t.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN"})(le||(le={}));var $e;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})($e||($e={}));var M1;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(M1||(M1={}));var k1;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(k1||(k1={}));var z1;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(z1||(z1={}));var P1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SUMMARY="SUMMARY",t.SEMANTIC_SEARCH="SEMANTIC_SEARCH",t.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",t.DOCUMENTATION="DOCUMENTATION",t.OTHER="OTHER"})(P1||(P1={}));var D1;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(D1||(D1={}));var U1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(U1||(U1={}));var F1;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(F1||(F1={}));var $1;(function(t){t.TEXT="TEXT",t.HTML="HTML"})($1||($1={}));var B1;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(B1||(B1={}));var H1;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(H1||(H1={}));var G1;(function(t){t.SOURCES="SOURCES",t.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",t.VOCABULARIES="VOCABULARIES",t.METADATA="METADATA",t.PRETTY_URL="PRETTY_URL",t.ACCESS_RULE="ACCESS_RULE",t.DESIGNED_PAGES="DESIGNED_PAGES",t.THEME_STUDIO="THEME_STUDIO",t.PORTAL_GENERAL="PORTAL_GENERAL",t.ASSETS="ASSETS",t.CODE_LIBRARY="CODE_LIBRARY",t.THEME="THEME",t.CONTENT_STYLES="CONTENT_STYLES",t.HOMEPAGE="HOMEPAGE",t.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",t.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",t.PORTAL_METADATA="PORTAL_METADATA",t.LANGUAGES="LANGUAGES",t.PRINT_TEMPLATES="PRINT_TEMPLATES",t.OFFLINE="OFFLINE",t.CUSTOM_JS="CUSTOM_JS",t.CONFIDENTIALITY="CONFIDENTIALITY",t.NOTIFICATIONS="NOTIFICATIONS"})(G1||(G1={}));var W1;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(W1||(W1={}));var yf={[le.PERSONAL_BOOK_SHARE_USER]:[le.PERSONAL_BOOK_USER],[le.HTML_EXPORT_USER]:[le.PERSONAL_BOOK_USER],[le.PDF_EXPORT_USER]:[le.PERSONAL_BOOK_USER],[le.KHUB_ADMIN]:[le.CONTENT_PUBLISHER],[le.ADMIN]:[le.KHUB_ADMIN,le.USERS_ADMIN,le.PORTAL_ADMIN,le.BEHAVIOR_DATA_USER],[le.GENERATIVE_AI_EXPORT_USER]:[le.GENERATIVE_AI_USER]};function j1(t,e){return t===e||(yf[t]??[]).some(r=>j1(r,e))}function V1(t,e){return t==null?!1:(Array.isArray(t)?t:Array.isArray(t.roles)?t.roles:Array.isArray(t.profile?.roles)?t.profile.roles:[]).some(o=>j1(o,e))}function bf(t){return`"${t}"`}function K1(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function vf(t,e){return new kr(t).serialize(e)}var G;(function(t){t.LOCALE="content-lang",t.QUERY="query",t.SCOPE="scope",t.FILTERS="filters",t.VIRTUAL_FIELD="virtual-field",t.PERIOD="period",t.VALUE_FILTERS="value-filters",t.DATE_FILTERS="date-filters",t.RANGE_FILTERS="range-filters",t.SORT="sort",t.PER_PAGE="per-page",t.KEYWORD_MATCH="keyword-match"})(G||(G={}));var xf=new Set(Object.values(G));function Z1(t){return xf.has(t)}var kr=class{constructor(e,r=20,o=!1,a="en-US"){this.baseUrl=e,this.defaultPerPage=r,this.allLanguagesAllowed=o,this.defaultContentLocale=a,this.scopeMapping={documents:"DOCUMENTS",topics:"ALL_TOPICS"},this.filtersEscapeMapping=[["*","\\*","[ft-escaped-star-character]"],["~","\\\\~","[ft-escaped-tilde-character]"],["_","\\\\\\\\_","[ft-escaped-underscore-character]"]]}serialize(e,r){return this.serializeToCurrentPageIfPossible(e,r??"/search")}serializeToCurrentPageIfPossible(e,r){let o=r==null||r.trim().length===0,a=new URL(o?window.location.href:`${this.baseUrl.replace(/\/+$/,"")}${r}`);return a.search=this.toURLSearchParams(e),a.toString()}toURLSearchParams(e,r=!1){var o,a,i,s,c,d,u,m,h,y,b;let x=new URLSearchParams;e.contentLocale?(!r||e.contentLocale!==this.defaultContentLocale)&&x.append(G.LOCALE,e.contentLocale):x.append(G.LOCALE,this.allLanguagesAllowed?"all":this.defaultContentLocale),((o=e.query)===null||o===void 0?void 0:o.length)>0&&x.append(G.QUERY,e.query);let C=(i=(a=e.metadataFilters)===null||a===void 0?void 0:a.filter(S=>S.valueFilter&&!S.valueFilter.negative))!==null&&i!==void 0?i:[];if(C.length>0){let S=C.map(A=>{var I,$;let te=(($=(I=A.valueFilter)===null||I===void 0?void 0:I.values)!==null&&$!==void 0?$:[]).map(W=>this.escapeFilters(W)).map(W=>bf(K1(W))).join("_");return`${A.key}~${te}`}).join("*");x.append(G.VALUE_FILTERS,S)}let R=(c=(s=e.metadataFilters)===null||s===void 0?void 0:s.filter(S=>S.dateFilter))!==null&&c!==void 0?c:[];if(R.length>0){let S=R.map(A=>{var I;return`${A.key}~${(I=A.dateFilter)===null||I===void 0?void 0:I.type.toLowerCase()}`}).join("*");x.append(G.DATE_FILTERS,S)}let w=(u=(d=e.metadataFilters)===null||d===void 0?void 0:d.filter(S=>S.rangeFilter))!==null&&u!==void 0?u:[];if(w.length>0){let S=w.map(A=>{var I,$;return`${A.key}~${(I=A.rangeFilter)===null||I===void 0?void 0:I.from}_${($=A.rangeFilter)===null||$===void 0?void 0:$.to}`}).join("*");x.append(G.RANGE_FILTERS,S)}e.virtualField&&e.virtualField!=="EVERYWHERE"&&x.append(G.VIRTUAL_FIELD,e.virtualField.toLowerCase()),e.scope&&e.scope!=="DEFAULT"&&x.append(G.SCOPE,e.scope.toLowerCase()),e.sortId!=null&&x.append(G.SORT,e.sortId),!((m=e.paging)===null||m===void 0)&&m.perPage&&((y=(h=e.paging)===null||h===void 0?void 0:h.perPage)!==null&&y!==void 0?y:this.defaultPerPage)!=this.defaultPerPage&&x.append(G.PER_PAGE,String(e.paging.perPage)),e.keywordMatch!=null&&x.append(G.KEYWORD_MATCH,e.keywordMatch.toLowerCase());let N=(b=e.otherQueryParams)!==null&&b!==void 0?b:{};for(let S in N)x.append(S,N[S]);let E=new Array;return x.forEach((S,A)=>{E.push(this.encodeQueryString(A)+"="+this.encodeQueryString(S))}),encodeURI(E.join("&")).replace(/#/g,"%23")}encodeQueryString(e){return encodeURIComponent(e).replace(/%20/g,"+")}parse(e){var r;let o=e.split("?"),a=this.fromURLSearchParams(o.slice(1).join("?")),i=o[0].split("/search/")[1];return i==null?a:{...a,scope:(r=this.scopeMapping[i])!==null&&r!==void 0?r:a.scope}}fromURLSearchParams(e){var r,o,a,i,s,c;try{e=decodeURI(e).replace(/%23/g,"#")}catch(w){console.warn("Could not decode search request query params, fallback on raw value",w)}let d=new URLSearchParams(e),u=d.get(G.LOCALE)==="all"?void 0:d.get(G.LOCALE),m=((r=d.get(G.VIRTUAL_FIELD))!==null&&r!==void 0?r:"EVERYWHERE").toUpperCase(),h=(o=d.get(G.SORT))===null||o===void 0?void 0:o.toLowerCase(),y=(a=d.get(G.SCOPE))!==null&&a!==void 0?a:"default",b=+((i=d.get(G.PER_PAGE))!==null&&i!==void 0?i:this.defaultPerPage),x=d.get(G.KEYWORD_MATCH),C=x?x.toUpperCase()===Ir.MANDATORY?Ir.MANDATORY:Ir.OPTIONAL:void 0,R={};for(let w of d.keys())Z1(w)||(R[w]=d.get(w));return{contentLocale:u??(this.allLanguagesAllowed?void 0:this.defaultContentLocale),query:(s=d.get(G.QUERY))!==null&&s!==void 0?s:"",scope:(c=this.scopeMapping[y])!==null&&c!==void 0?c:"DEFAULT",virtualField:I1(m)?m:"EVERYWHERE",sortId:h,metadataFilters:this.parseCompatFilters(d),facets:[],paging:{page:1,perPage:Wt(1,isNaN(b)?this.defaultPerPage:b,1e3)},keywordMatch:C,otherQueryParams:R}}parseCompatFilters(e){var r,o,a,i,s,c;let d=[];return e.has(G.FILTERS)&&(d=this.parseValueFilters((r=e.get(G.FILTERS))!==null&&r!==void 0?r:"")),(o=e.has(G.PERIOD))!==null&&o!==void 0&&o&&(d=[...d,...this.parseLegacyPeriodFilter(((a=e.get(G.PERIOD))!==null&&a!==void 0?a:"").toUpperCase())]),[...d,...this.parseValueFilters((i=e.get(G.VALUE_FILTERS))!==null&&i!==void 0?i:""),...this.parseDateFilters((s=e.get(G.DATE_FILTERS))!==null&&s!==void 0?s:""),...this.parseRangeFilters((c=e.get(G.RANGE_FILTERS))!==null&&c!==void 0?c:"")]}splitUnknownFilter(e){return this.superEscapeFilters(e).split("*").map(r=>r.split("~"))}parseValueFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],valueFilter:{values:r[1].split("_").map(K1).map(o=>this.unescapeFilterValue(o)),negative:!1}}))}parseDateFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],dateFilter:{type:Tr[r[1].toUpperCase()]}}))}parseRangeFilters(e){return e.length===0?[]:this.splitUnknownFilter(e).map(r=>({key:r[0],rangeFilter:{from:r[1].split("_")[0],to:r[1].split("_")[1]}}))}escapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(r,o);return e}superEscapeFilters(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(o,a);return e}unescapeFilterValue(e){for(let[r,o,a]of this.filtersEscapeMapping)e=e.replaceAll(a,r);return e}parseLegacyPeriodFilter(e){if(T1(e))return[{key:"ft:lastEdition",dateFilter:{type:Tr[e]}}];if(e.startsWith("CUSTOM_")){let[r,o,a]=e.split("_");return[{key:"ft:lastEdition",rangeFilter:{from:o,to:a}}]}return[]}static clearSearchParamsInUrl(e){let r=new URL(e);return[G.LOCALE,G.FILTERS,G.VALUE_FILTERS,G.DATE_FILTERS,G.RANGE_FILTERS].forEach(a=>{r.searchParams.delete(a)}),r.toString()}static updateLocaleParamInUrl(e,r){let o=new URL(e);return o.searchParams.delete(G.LOCALE),r!==void 0&&o.searchParams.append(G.LOCALE,r),o.toString()}};var rs={};j(rs,{toFtFormComponent:()=>ts});var es=Symbol("elementInternals"),ts=he(Symbol("toFtFormComponent"),function(t){class e extends t{static get formAssociated(){return!0}get form(){return this[es].form}constructor(...o){super(o),this[es]=this.attachInternals()}setFormValue(o){this[es].setFormValue(o)}}return e});var os={};j(os,{DateFormatter:()=>or});var or=class{static format(e,r,o,a,i){return window.moment?window.moment(e).locale(r).format(this.getMomentDateFormat(o,a,!!i)):this.getIntlDateTime(e,r,o,a,!!i)}static getMomentDateFormat(e,r,o){return o?"LT":e?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(e,r,o,a,i){let s=typeof e=="string"?new Date(e):e,c=new Intl.DateTimeFormat(r,{dateStyle:o?"medium":"short"}).format(s),d=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return i?d:a?`${c} ${d}`:c}static getTimezoneAsString(){let e=o=>String(Math.floor(o)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${e(Math.abs(r)/60)}:${e(Math.abs(r)%60)}`}};var as={};j(as,{ALL_KEYS_VALUE:()=>ns,SameWindowStorageEvent:()=>zr});var ns="__all__",zr=class extends CustomEvent{constructor(e,r,o){super("same-window-storage",{detail:{key:e,oldValue:r,newValue:o}})}keyMatch(e){return this.detail.key.includes(e)||this.detail.key==ns}};Storage.prototype.setItem=new Proxy(Storage.prototype.setItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new zr(r[0],o,r[1]))}});Storage.prototype.removeItem=new Proxy(Storage.prototype.removeItem,{apply(t,e,r){let o=e.getItem(r[0]);Reflect.apply(t,e,r),window.dispatchEvent(new zr(r[0],o))}});Storage.prototype.clear=new Proxy(Storage.prototype.clear,{apply(t,e,r){Reflect.apply(t,e,r),window.dispatchEvent(new zr(ns))}});var ss={};j(ss,{FocusMainContentEvent:()=>is});var is=class extends Event{constructor(){super("ft-focus-main-content",{composed:!0,bubbles:!0})}};var q1={};window.FluidTopicsA11yHints={isKeyboardNavigation:!1,lastPressedKey:""};function Sf(t){(t.key==="Enter"||t.key===" "||t.key==="Tab")&&(window.FluidTopicsA11yHints.isKeyboardNavigation=!0),window.FluidTopicsA11yHints.lastPressedKey=t.key}function Cf(t){window.FluidTopicsA11yHints.isKeyboardNavigation=t.detail==0}document.addEventListener("keydown",Sf);document.addEventListener("click",Cf);var Y1=T`
48
48
  .sr-only {
49
49
  position:absolute;
50
50
  left:-10000px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ftds-base-input",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "The design system base input component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,16 +19,16 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-tooltip": "2.1.5",
23
- "@fluid-topics/ft-wc-utils": "2.1.5",
24
- "@fluid-topics/ftds-button": "2.1.5",
25
- "@fluid-topics/ftds-icon": "2.1.5",
26
- "@fluid-topics/ftds-input-helper-text": "2.1.5",
27
- "@fluid-topics/ftds-input-label": "2.1.5",
22
+ "@fluid-topics/ft-tooltip": "2.1.6",
23
+ "@fluid-topics/ft-wc-utils": "2.1.6",
24
+ "@fluid-topics/ftds-button": "2.1.6",
25
+ "@fluid-topics/ftds-icon": "2.1.6",
26
+ "@fluid-topics/ftds-input-helper-text": "2.1.6",
27
+ "@fluid-topics/ftds-input-label": "2.1.6",
28
28
  "lit": "3.1.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@fluid-topics/ft-wc-test-utils": "2.1.5"
31
+ "@fluid-topics/ft-wc-test-utils": "2.1.6"
32
32
  },
33
- "gitHead": "cea42544a196f1f784982f8a666a27c534578779"
33
+ "gitHead": "70ba8e6b58f0f1c74a92965f3b7dbf3db605698e"
34
34
  }