@fluid-topics/ft-viewer 2.2.10 → 2.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var lh=Object.create;var hl=Object.defineProperty;var ch=Object.getOwnPropertyDescriptor;var dh=Object.getOwnPropertyNames;var uh=Object.getPrototypeOf,ph=Object.prototype.hasOwnProperty;var or=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(i){throw e=0,i}};var fh=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of dh(e))!ph.call(t,n)&&n!==i&&hl(t,n,{get:()=>e[n],enumerable:!(r=ch(e,n))||r.enumerable});return t};var c=(t,e,i)=>(i=t!=null?lh(uh(t)):{},fh(e||!t||!t.__esModule?hl(i,"default",{value:t,enumerable:!0}):i,t));var h=or((sg,ml)=>{ml.exports=ftGlobals.wcUtils});var U=or((ag,gl)=>{gl.exports=ftGlobals.litDecorators});var S=or((Lg,bl)=>{bl.exports=ftGlobals.lit});var xr=or((xb,Cd)=>{Cd.exports=ftGlobals.litRepeat});var Ua=or((Jb,au)=>{au.exports=ftGlobals.litUnsafeHTML});var st=or((uE,Pu)=>{Pu.exports=ftGlobals.litClassMap});var oh=c(h());var vl=c(h()),xl=c(U());var Gt=class extends Event{constructor(e,i,r,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i,this.callback=r,this.subscribe=n??!1}};var sr=class{constructor(e,i,r,n){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,s)),this.unsubscribe=s},this.host=e,i.context!==void 0){let o=i;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=i,this.callback=r,this.subscribe=n??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Gt(this.context,this.host,this.t,this.subscribe))}};var In=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,i=!1){let r=i||!Object.is(e,this.o);this.o=e,r&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[i,{disposer:r}]of this.subscriptions)i(this.o,r)},e!==void 0&&(this.value=e)}addCallback(e,i,r){if(!r)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:i});let{disposer:n}=this.subscriptions.get(e);e(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};var Ws=class extends Event{constructor(e,i){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i}},ar=class extends In{constructor(e,i,r){super(i.context!==void 0?i.initialValue:r),this.onContextRequest=n=>{if(n.context!==this.context)return;let o=n.contextTarget??n.composedPath()[0];o!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,o,n.subscribe))},this.onProviderRequest=n=>{if(n.context!==this.context||(n.contextTarget??n.composedPath()[0])===this.host)return;let o=new Set;for(let[s,{consumerHost:a}]of this.subscriptions)o.has(s)||(o.add(s),a.dispatchEvent(new Gt(this.context,a,s,!0)));n.stopPropagation()},this.host=e,i.context!==void 0?this.context=i.context:this.context=i,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Ws(this.context,this.host))}};var Wr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let i=this.pendingContextRequests.get(e.context);if(i===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:r}=i;for(let{elementRef:n,callbackRef:o}of r){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Gt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let i=e.contextTarget??e.composedPath()[0],r=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(i);o===void 0&&n.callbacks.set(i,o=new WeakSet),o.has(r)||(o.add(r),n.requests.push({elementRef:new WeakRef(i),callbackRef:new WeakRef(r)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};function Kr({context:t}){return(e,i)=>{let r=new WeakMap;if(typeof i=="object")return{get(){return e.get.call(this)},set(n){return r.get(this).setValue(n),e.set.call(this,n)},init(n){return r.set(this,new ar(this,{context:t,initialValue:n})),n}};{e.constructor.addInitializer((s=>{r.set(s,new ar(s,{context:t}))}));let n=Object.getOwnPropertyDescriptor(e,i),o;if(n===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){r.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=n.set;o={...n,set(a){r.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(e,i,o)}}}function Gr({context:t,subscribe:e}){return(i,r)=>{typeof r=="object"?r.addInitializer((function(){new sr(this,{context:t,callback:n=>{i.set.call(this,n)},subscribe:e})})):i.constructor.addInitializer((n=>{new sr(n,{context:t,callback:o=>{n[r]=o},subscribe:e})}))}}var hh=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ks=Symbol("asset-viewer-state-manager"),Nt=(0,vl.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(t){class e extends t{willUpdate(r){super.willUpdate(r),r.has("viewerStateManager")&&(this.viewerStateManager?this.addStore(this.viewerStateManager.store,"viewer"):this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.viewerStateManager&&this.addStore(this.viewerStateManager.store,"viewer")}disconnectedCallback(){super.disconnectedCallback(),this.removeStore("viewer")}}return hh([Gr({context:Ks,subscribe:!0}),(0,xl.state)()],e.prototype,"viewerStateManager",void 0),e});var Sd=c(S()),vr=c(h());var Sl=c(h()),mh={setZoom:(t,e)=>{t.contentModifiers.zoom=e.payload},setRotation:(t,e)=>{t.contentModifiers.rotation=e.payload}},Pn=t=>Sl.FtReduxStore.get({name:"ft-viewer-"+t,initialState:{documentId:void 0,unstructuredDocument:void 0,document:void 0,assetId:void 0,origin:void 0,descriptor:void 0,contentModifiers:{zoom:void 0,rotation:0},watermark:void 0,configuration:void 0,documentRating:void 0,assetRating:void 0,relatives:void 0},reducers:mh});var wl=c(h()),lr=class extends wl.FtStateManager{constructor(e){super(),this.store=e}setZoom(e){this.store.actions.setZoom(e)}setRotation(e){this.store.actions.setRotation(e)}};var ha=c(U());var El=c(U(),1);var Gs=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function _l(t,e){return(0,El.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return qr(t);try{return JSON.parse(i)}catch{return qr(t)}},toAttribute:i=>JSON.stringify(i)},hasChanged:Yr,...e??{}})}function gh(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let i,r;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(r=i;r--!==0;)if(!cr(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!cr(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(i=o.length,i!==n(e).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;r--!==0;){let s=o[r];if(!cr(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function cr(t,e){try{return gh(t,e)}catch{return!1}}function Yr(t,e){return!cr(t,e)}function qr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Mn(t,e){let i=r=>r[t]===!0;return r=>{if(i(r))return r;let n=e(r);return n[t]=!0,n}}var Al=c(U(),1);var qs=t=>{let e=t??{};return(i,r)=>{var n;let o={hasChanged:Yr,attribute:!1,...e};(0,Al.property)(o)(i,r);let s=i.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(r,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[r]),store:e.store})}};var Nn=class{constructor(){this.queue=[]}add(e,i=!1){i&&this.clear(e.type),this.queue.push(e)}consume(e){let i=this.queue.find(r=>r.type===e);return i&&(this.queue=this.queue.filter(r=>r!==i)),i}clear(e){typeof e=="string"?this.queue=this.queue.filter(i=>i.type!==e):this.queue=this.queue.filter(i=>!e.test(i.type))}};var Ci=c(U(),1);var $n=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,i){return this.callbacks=[e],this.debounce(i)}queue(e,i){return this.callbacks.push(e),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((i,r)=>{this.resolvePromise=i,this.rejectPromise=r})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,i;let r=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(i=this.resolvePromise)!==null&&i!==void 0?i:(()=>null);this.clearPromise();for(let s of r)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Tl=c(S(),1);var Un=globalThis,yh=Un.ShadowRoot&&(Un.ShadyCSS===void 0||Un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Cl=(t,e)=>{if(yh)t.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let r=document.createElement("style"),n=Un.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=i.cssText,t.appendChild(r)}};var Fn=class extends Tl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let i={...e.shadowRootOptions,customElements:e.registry},r=this.renderOptions.creationScope=this.attachShadow(i);return Cl(r,e.elementStyles),r}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([i,r])=>this.defineScopedElement(i,r))}static defineScopedElement(e,i){Gs(e)(i),this.canDefineScopedElement(e)&&this.registry.define(e,i)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,i){this.scopedRegistryConstructor.defineScopedElement(e,i)}};function Rl(t,e,...i){var r;let n=t.querySelector(e);for(let o of i)n=(r=n?.shadowRoot)===null||r===void 0?void 0:r.querySelector(o);return n}var ur=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ll,Ol=Symbol("constructorPrototype"),kl=Symbol("constructorName"),Il=Symbol("exportpartsDebouncer"),Dl=Symbol("dynamicDependenciesLoaded"),dr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};dr.eventName="exportparts-updated";var $t=class extends Fn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ll]=new $n(5),this.scheduleExportpartsUpdate=()=>{var e,i,r;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(r=(i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)!==null&&r!==void 0&&r)&&this[Il].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[kl]=this.constructor.name,this[Ol]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[kl]&&Object.setPrototypeOf(this,this[Ol])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let i=this.constructor;i[Dl]||(i[Dl]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(dr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(dr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new dr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:i,selector:r,shadowPath:n}=this.elementToFocus;if(r!=null){let o=[...n??[],r];i=Rl(this.shadowRoot,...o)}i?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||i?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var i,r,n;if(((r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&r!==void 0?r:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var i,r,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,d=e.filter(l).map(f=>f.trim());if(d.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll("[part],[exportparts]"))!==null&&r!==void 0?r:[]){let y=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],w=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],T=[...y,...w].filter(l).map(b=>b.trim());for(let b of T)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>d.map(y=>`${f}:${y}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Ll=Il;ur([(0,Ci.property)()],$t.prototype,"exportpartsPrefix",void 0);ur([_l([])],$t.prototype,"exportpartsPrefixes",void 0);ur([(0,Ci.property)({reflect:!0})],$t.prototype,"exportparts",void 0);ur([(0,Ci.property)()],$t.prototype,"customStylesheet",void 0);ur([(0,Ci.property)()],$t.prototype,"elementToFocus",void 0);ur([(0,Ci.state)()],$t.prototype,"useAdoptedStyleSheets",void 0);function Vn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Zr=Symbol("internalReduxEventsUnsubscribers"),ci=Symbol("internalStoresUnsubscribers"),Ti=Symbol("internalStores"),vh=Mn(Symbol("withRedux"),function(t){var e,i,r;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=new Map,this[r]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Ti].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ti].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ti].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ti].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Ti].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ti].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let d=this.getStore(s.store);d&&(s.store?this[ci].has(s.store):this[ci].size>0)&&(this[a]=s.selector(d.getState(),this))}})}subscribeToStore(s,a){var l;this[ci].set(s,a.subscribe(()=>this.updateFromStores())),this[Zr].set(s,[]),Vn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((d,u)=>{if(typeof this[u]=="function"&&(!d.store||a.name===d.store)){let p=f=>this[u](f);a.addEventListener(d.eventName,p),this[Zr].get(s).push(()=>a.removeEventListener(d.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ci].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[ci].has(s)&&this[ci].get(s)(),this[ci].delete(s),(a=this[Zr].get(s))===null||a===void 0||a.forEach(l=>l()),this[Zr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ci,i=Ti,r=Zr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Pl=class extends vh($t){};function Te(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 xh=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ml=xh,Ys=()=>Math.random().toString(36).substring(7).split("").join("."),bh={INIT:`@@redux/INIT${Ys()}`,REPLACE:`@@redux/REPLACE${Ys()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ys()}`},Bn=bh;function Hn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Zs(t,e,i){if(typeof t!="function")throw new Error(Te(2));if(typeof e=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Te(0));if(typeof e=="function"&&typeof i>"u"&&(i=e,e=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Te(1));return i(Zs)(t,e)}let r=t,n=e,o=new Map,s=o,a=0,l=!1;function d(){s===o&&(s=new Map,o.forEach((b,R)=>{s.set(R,b)}))}function u(){if(l)throw new Error(Te(3));return n}function p(b){if(typeof b!="function")throw new Error(Te(4));if(l)throw new Error(Te(5));let R=!0;d();let B=a++;return s.set(B,b),function(){if(R){if(l)throw new Error(Te(6));R=!1,d(),s.delete(B),o=null}}}function f(b){if(!Hn(b))throw new Error(Te(7));if(typeof b.type>"u")throw new Error(Te(8));if(typeof b.type!="string")throw new Error(Te(17));if(l)throw new Error(Te(9));try{l=!0,n=r(n,b)}finally{l=!1}return(o=s).forEach(B=>{B()}),b}function y(b){if(typeof b!="function")throw new Error(Te(10));r=b,f({type:Bn.REPLACE})}function w(){let b=p;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(Te(11));function B(){let D=R;D.next&&D.next(u())}return B(),{unsubscribe:b(B)}},[Ml](){return this}}}return f({type:Bn.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:y,[Ml]:w}}function Sh(t){Object.keys(t).forEach(e=>{let i=t[e];if(typeof i(void 0,{type:Bn.INIT})>"u")throw new Error(Te(12));if(typeof i(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Te(13))})}function Nl(t){let e=Object.keys(t),i={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(i[a]=t[a])}let r=Object.keys(i),n,o;try{Sh(i)}catch(s){o=s}return function(a={},l){if(o)throw o;let d=!1,u={};for(let p=0;p<r.length;p++){let f=r[p],y=i[f],w=a[f],T=y(w,l);if(typeof T>"u"){let b=l&&l.type;throw new Error(Te(14))}u[f]=T,d=d||T!==w}return d=d||r.length!==Object.keys(a).length,d?u:a}}function Xr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,i)=>(...r)=>e(i(...r)))}function $l(...t){return e=>(i,r)=>{let n=e(i,r),o=()=>{throw new Error(Te(15))},s={getState:n.getState,dispatch:(l,...d)=>o(l,...d)},a=t.map(l=>l(s));return o=Xr(...a)(n.dispatch),{...n,dispatch:o}}}function Ul(t){return Hn(t)&&"type"in t&&typeof t.type=="string"}var Gl=Symbol.for("immer-nothing"),Fl=Symbol.for("immer-draftable"),Le=Symbol.for("immer-state");function St(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var tt=Object,fr=tt.getPrototypeOf,Kn="constructor",Jn="prototype",ea="configurable",Gn="enumerable",jn="writable",Jr="value",Ut=t=>!!t&&!!t[Le];function it(t){return t?ql(t)||eo(t)||!!t[Fl]||!!t[Kn]?.[Fl]||to(t)||io(t):!1}var wh=tt[Jn][Kn].toString(),Vl=new WeakMap;function ql(t){if(!t||!la(t))return!1;let e=fr(t);if(e===null||e===tt[Jn])return!0;let i=tt.hasOwnProperty.call(e,Kn)&&e[Kn];if(i===Object)return!0;if(!pr(i))return!1;let r=Vl.get(i);return r===void 0&&(r=Function.toString.call(i),Vl.set(i,r)),r===wh}function Qn(t,e,i=!0){tn(t)===0?(i?Reflect.ownKeys(t):tt.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((r,n)=>e(n,r,t))}function tn(t){let e=t[Le];return e?e.type_:eo(t)?1:to(t)?2:io(t)?3:0}var Xs=(t,e,i=tn(t))=>i===2?t.has(e):tt[Jn].hasOwnProperty.call(t,e),ta=(t,e,i=tn(t))=>i===2?t.get(e):t[e],qn=(t,e,i,r=tn(t))=>{r===2?t.set(e,i):r===3?t.add(i):t[e]=i};function Eh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var eo=Array.isArray,to=t=>t instanceof Map,io=t=>t instanceof Set,la=t=>typeof t=="object",pr=t=>typeof t=="function",Js=t=>typeof t=="boolean";function _h(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var qt=t=>t.copy_||t.base_;var ca=t=>t.modified_?t.copy_:t.base_;function ia(t,e){if(to(t))return new Map(t);if(io(t))return new Set(t);if(eo(t))return Array[Jn].slice.call(t);let i=ql(t);if(e===!0||e==="class_only"&&!i){let r=tt.getOwnPropertyDescriptors(t);delete r[Le];let n=Reflect.ownKeys(r);for(let o=0;o<n.length;o++){let s=n[o],a=r[s];a[jn]===!1&&(a[jn]=!0,a[ea]=!0),(a.get||a.set)&&(r[s]={[ea]:!0,[jn]:!0,[Gn]:a[Gn],[Jr]:t[s]})}return tt.create(fr(t),r)}else{let r=fr(t);if(r!==null&&i)return{...t};let n=tt.create(r);return tt.assign(n,t)}}function da(t,e=!1){return ro(t)||Ut(t)||!it(t)||(tn(t)>1&&tt.defineProperties(t,{set:zn,add:zn,clear:zn,delete:zn}),tt.freeze(t),e&&Qn(t,(i,r)=>{da(r,!0)},!1)),t}function Ah(){St(2)}var zn={[Jr]:Ah};function ro(t){return t===null||!la(t)?!0:tt.isFrozen(t)}var Yn="MapSet",ra="Patches",Bl="ArrayMethods",Yl={};function Ri(t){let e=Yl[t];return e||St(0,t),e}var Hl=t=>!!Yl[t];var Qr,Zl=()=>Qr,Ch=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hl(Yn)?Ri(Yn):void 0,arrayMethodsPlugin_:Hl(Bl)?Ri(Bl):void 0});function zl(t,e){e&&(t.patchPlugin_=Ri(ra),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function na(t){oa(t),t.drafts_.forEach(Th),t.drafts_=null}function oa(t){t===Qr&&(Qr=t.parent_)}var jl=t=>Qr=Ch(Qr,t);function Th(t){let e=t[Le];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Wl(t,e){e.unfinalizedDrafts_=e.drafts_.length;let i=e.drafts_[0];if(t!==void 0&&t!==i){i[Le].modified_&&(na(e),St(4)),it(t)&&(t=Kl(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(i[Le].base_,t,e)}else t=Kl(e,i);return Rh(e,t,!0),na(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Gl?t:void 0}function Kl(t,e){if(ro(e))return e;let i=e[Le];if(!i)return Zn(e,t.handledSet_,t);if(!no(i,t))return e;if(!i.modified_)return i.base_;if(!i.finalized_){let{callbacks_:r}=i;if(r)for(;r.length>0;)r.pop()(t);Ql(i,t)}return i.copy_}function Rh(t,e,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&da(e,i)}function Xl(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var no=(t,e)=>t.scope_===e,Oh=[];function Jl(t,e,i,r){let n=qt(t),o=t.type_;if(r!==void 0&&ta(n,r,o)===e){qn(n,r,i,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Qn(n,(l,d)=>{if(Ut(d)){let u=a.get(d)||[];u.push(l),a.set(d,u)}})}let s=t.draftLocations_.get(e)??Oh;for(let a of s)qn(n,a,i,o)}function kh(t,e,i){t.callbacks_.push(function(n){let o=e;if(!o||!no(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=ca(o);Jl(t,o.draft_??o,s,i),Ql(o,n)})}function Ql(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:r}=e;if(r){let n=r.getPath(t);n&&r.generatePatches_(t,n,e)}Xl(t)}}function Dh(t,e,i){let{scope_:r}=t;if(Ut(i)){let n=i[Le];no(n,r)&&n.callbacks_.push(function(){Wn(t);let s=ca(n);Jl(t,i,s,e)})}else it(i)&&t.callbacks_.push(function(){let o=qt(t);t.type_===3?o.has(i)&&Zn(i,r.handledSet_,r):ta(o,e,t.type_)===i&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Zn(ta(t.copy_,e,t.type_),r.handledSet_,r)})}function Zn(t,e,i){return!i.immer_.autoFreeze_&&i.unfinalizedDrafts_<1||Ut(t)||e.has(t)||!it(t)||ro(t)||(e.add(t),Qn(t,(r,n)=>{if(Ut(n)){let o=n[Le];if(no(o,i)){let s=ca(o);qn(t,r,s,t.type_),Xl(o)}}else it(n)&&Zn(n,e,i)})),t}function Lh(t,e){let i=eo(t),r={type_:i?1:0,scope_:e?e.scope_:Zl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=r,o=Xn;i&&(n=[r],o=en);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return r.draft_=a,r.revoke_=s,[a,r]}var Xn={get(t,e){if(e===Le)return t;let i=t.scope_.arrayMethodsPlugin_,r=t.type_===1&&typeof e=="string";if(r&&i?.isArrayOperationMethod(e))return i.createMethodInterceptor(t,e);let n=qt(t);if(!Xs(n,e,t.type_))return Ph(t,n,e);let o=n[e];if(t.finalized_||!it(o)||r&&t.operationMethod&&i?.isMutatingArrayMethod(t.operationMethod)&&_h(e))return o;if(o===Qs(t.base_,e)||Ih(t,e,o)){Wn(t);let s=t.type_===1?+e:e,a=aa(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in qt(t)},ownKeys(t){return Reflect.ownKeys(qt(t))},set(t,e,i){let r=ec(qt(t),e);if(r?.set)return r.set.call(t.draft_,i),!0;if(!t.modified_){let n=Qs(qt(t),e),o=n?.[Le];if(o&&o.base_===i)return t.copy_[e]=i,t.assigned_.set(e,!1),!0;if(Eh(i,n)&&(i!==void 0||Xs(t.base_,e,t.type_)))return!0;Wn(t),sa(t)}return t.copy_[e]===i&&(i!==void 0||Xs(t.copy_,e,t.type_))||Number.isNaN(i)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=i,t.assigned_.set(e,!0),Dh(t,e,i)),!0},deleteProperty(t,e){return Wn(t),Qs(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),sa(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let i=qt(t),r=Reflect.getOwnPropertyDescriptor(i,e);return r&&{[jn]:!0,[ea]:t.type_!==1||e!=="length",[Gn]:r[Gn],[Jr]:i[e]}},defineProperty(){St(11)},getPrototypeOf(t){return fr(t.base_)},setPrototypeOf(){St(12)}},en={};for(let t in Xn){let e=Xn[t];en[t]=function(){let i=arguments;return i[0]=i[0][0],e.apply(this,i)}}en.deleteProperty=function(t,e){return en.set.call(this,t,e,void 0)};en.set=function(t,e,i){return Xn.set.call(this,t[0],e,i,t[0])};function Qs(t,e){let i=t[Le];return(i?qt(i):t)[e]}function Ih(t,e,i){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!it(i)||i[Le]?!1:t.baseRefs_.has(i)}function Ph(t,e,i){let r=ec(e,i);return r?Jr in r?r[Jr]:r.get?.call(t.draft_):void 0}function ec(t,e){if(!(e in t))return;let i=fr(t);for(;i;){let r=Object.getOwnPropertyDescriptor(i,e);if(r)return r;i=fr(i)}}function sa(t){t.modified_||(t.modified_=!0,t.parent_&&sa(t.parent_))}function Wn(t){t.copy_||(t.assigned_=new Map,t.copy_=ia(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Mh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,i,r)=>{if(pr(e)&&!pr(i)){let o=i;i=e;let s=this;return function(l=o,...d){return s.produce(l,u=>i.call(this,u,...d))}}pr(i)||St(6),r!==void 0&&!pr(r)&&St(7);let n;if(it(e)){let o=jl(this),s=aa(o,e,void 0),a=!0;try{n=i(s),a=!1}finally{a?na(o):oa(o)}return zl(o,r),Wl(n,o)}else if(!e||!la(e)){if(n=i(e),n===void 0&&(n=e),n===Gl&&(n=void 0),this.autoFreeze_&&da(n,!0),r){let o=[],s=[];Ri(ra).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),r(o,s)}return n}else St(1,e)},this.produceWithPatches=(e,i)=>{if(pr(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,n;return[this.produce(e,i,(s,a)=>{r=s,n=a}),r,n]},Js(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Js(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Js(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){it(t)||St(8),Ut(t)&&(t=tc(t));let e=jl(this),i=aa(e,t,void 0);return i[Le].isManual_=!0,oa(e),i}finishDraft(t,e){let i=t&&t[Le];(!i||!i.isManual_)&&St(9);let{scope_:r}=i;return zl(r,e),Wl(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let i;for(i=e.length-1;i>=0;i--){let n=e[i];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}i>-1&&(e=e.slice(i+1));let r=Ri(ra).applyPatches_;return Ut(t)?r(t,e):this.produce(t,n=>r(n,e))}};function aa(t,e,i,r){let[n,o]=to(e)?Ri(Yn).proxyMap_(e,i):io(e)?Ri(Yn).proxySet_(e,i):Lh(e,i);return(i?.scope_??Zl()).drafts_.push(n),o.callbacks_=i?.callbacks_??[],o.key_=r,i&&r!==void 0?kh(i,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:d}=l;o.modified_&&d&&d.generatePatches_(o,[],l)}),n}function tc(t){return Ut(t)||St(10,t),ic(t)}function ic(t){if(!it(t)||ro(t))return t;let e=t[Le],i,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,i=ia(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else i=ia(t,!0);return Qn(i,(n,o)=>{qn(i,n,ic(o))},r),e&&(e.finalized_=!1),i}var Nh=globalThis.Iterator,sy=typeof Nh?.from=="function";var $h=new Mh,ua=$h.produce;function rc(t){return({dispatch:i,getState:r})=>n=>o=>typeof o=="function"?o(i,r,t):n(o)}var nc=rc(),oc=rc;var Uh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xr:Xr.apply(null,arguments)},fy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Fh=t=>t&&typeof t.match=="function";function di(t,e){function i(...r){if(e){let n=e(...r);if(!n)throw new Error(Yt(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:r[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=r=>Ul(r)&&r.type===t,i}var dc=class rn extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,rn.prototype)}static get[Symbol.species](){return rn}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new rn(...e[0].concat(this)):new rn(...e.concat(this))}};function sc(t){return it(t)?ua(t,()=>{}):t}function oo(t,e,i){return t.has(e)?t.get(e):t.set(e,i(e)).get(e)}function Vh(t){return typeof t=="boolean"}var Bh=()=>function(e){let{thunk:i=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new dc;return i&&(Vh(i)?s.push(nc):s.push(oc(i.extraArgument))),s},Hh="RTK_autoBatch";var ac=t=>e=>{setTimeout(e,t)},zh=(t,e)=>i=>{let r=!1,n=()=>{r||(r=!0,cancelAnimationFrame(o),clearTimeout(s),i())},o=t(n),s=setTimeout(n,e)},jh=(t={type:"raf"})=>e=>(...i)=>{let r=e(...i),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?zh(window.requestAnimationFrame,100):ac(10):t.type==="callback"?t.queueNotification:ac(t.timeout),d=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let p=()=>n&&u(),f=r.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[Hh],o=!n,o&&(s||(s=!0,l(d))),r.dispatch(u)}finally{n=!0}}})},Wh=t=>function(i){let{autoBatch:r=!0}=i??{},n=new dc(t);return r&&n.push(jh(typeof r=="object"?r:void 0)),n};function uc(t){let e=Bh(),{reducer:i=void 0,middleware:r,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof i=="function")l=i;else if(Hn(i))l=Nl(i);else throw new Error(Yt(1));let d;typeof r=="function"?d=r(e):d=e();let u=Xr;n&&(u=Uh({trace:!1,...typeof n=="object"&&n}));let p=$l(...d),f=Wh(p),y=typeof a=="function"?a(f):f(),w=u(...y);return Zs(l,s,w)}function pc(t){let e={},i=[],r,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Yt(28));if(a in e)throw new Error(Yt(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&i.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return i.push({matcher:o,reducer:s}),n},addDefaultCase(o){return r=o,n}};return t(n),[e,i,r]}function Kh(t){return typeof t=="function"}function Gh(t,e){let[i,r,n]=pc(e),o;if(Kh(t))o=()=>sc(t());else{let a=sc(t);o=()=>a}function s(a=o(),l){let d=[i[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[n]),d.reduce((u,p)=>{if(p)if(Ut(u)){let y=p(u,l);return y===void 0?u:y}else{if(it(u))return ua(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=o,s}var qh=(t,e)=>Fh(t)?t.match(e):t(e);function Yh(...t){return e=>t.some(i=>qh(i,e))}var Zh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xh=(t=21)=>{let e="",i=t;for(;i--;)e+=Zh[Math.random()*64|0];return e},Jh=["name","message","stack","code"],pa=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},lc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Qh=t=>{if(typeof t=="object"&&t!==null){let e={};for(let i of Jh)typeof t[i]=="string"&&(e[i]=t[i]);return e}return{message:String(t)}},cc="External signal was aborted",em=(()=>{function t(e,i,r){let n=di(e+"/fulfilled",(l,d,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:d,requestStatus:"fulfilled"}})),o=di(e+"/pending",(l,d,u)=>({payload:void 0,meta:{...u||{},arg:d,requestId:l,requestStatus:"pending"}})),s=di(e+"/rejected",(l,d,u,p,f)=>({payload:p,error:(r&&r.serializeError||Qh)(l||"Rejected"),meta:{...f||{},arg:u,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:d}={}){return(u,p,f)=>{let y=r?.idGenerator?r.idGenerator(l):Xh(),w=new AbortController,T,b;function R(E){b=E,w.abort()}d&&(d.aborted?R(cc):d.addEventListener("abort",()=>R(cc),{once:!0}));let B=(async function(){let E;try{let N=r?.condition?.(l,{getState:p,extra:f});if(im(N)&&(N=await N),N===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let ae=new Promise((q,le)=>{T=()=>{le({name:"AbortError",message:b||"Aborted"})},w.signal.addEventListener("abort",T,{once:!0})});u(o(y,l,r?.getPendingMeta?.({requestId:y,arg:l},{getState:p,extra:f}))),E=await Promise.race([ae,Promise.resolve(i(l,{dispatch:u,getState:p,extra:f,requestId:y,signal:w.signal,abort:R,rejectWithValue:((q,le)=>new pa(q,le)),fulfillWithValue:((q,le)=>new lc(q,le))})).then(q=>{if(q instanceof pa)throw q;return q instanceof lc?n(q.payload,y,l,q.meta):n(q,y,l)})])}catch(N){E=N instanceof pa?s(null,y,l,N.payload,N.meta):s(N,y,l)}finally{T&&w.signal.removeEventListener("abort",T)}return r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition||u(E),E})();return Object.assign(B,{abort:R,requestId:y,arg:l,unwrap(){return B.then(tm)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Yh(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function tm(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function im(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var fc=Symbol.for("rtk-slice-createasyncthunk"),my={[fc]:em};function rm(t,e){return`${t}/${e}`}function nm({creators:t}={}){let e=t?.asyncThunk?.[fc];return function(r){let{name:n,reducerPath:o=n}=r;if(!n)throw new Error(Yt(11));typeof process<"u";let s=(typeof r.reducers=="function"?r.reducers(sm()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(E,D){let N=typeof E=="string"?E:E.type;if(!N)throw new Error(Yt(12));if(N in l.sliceCaseReducersByType)throw new Error(Yt(13));return l.sliceCaseReducersByType[N]=D,d},addMatcher(E,D){return l.sliceMatchers.push({matcher:E,reducer:D}),d},exposeAction(E,D){return l.actionCreators[E]=D,d},exposeCaseReducer(E,D){return l.sliceCaseReducersByName[E]=D,d}};a.forEach(E=>{let D=s[E],N={reducerName:E,type:rm(n,E),createNotation:typeof r.reducers=="function"};lm(D)?dm(N,D,d,e):am(N,D,d)});function u(){let[E={},D=[],N=void 0]=typeof r.extraReducers=="function"?pc(r.extraReducers):[r.extraReducers],ae={...E,...l.sliceCaseReducersByType};return Gh(r.initialState,q=>{for(let le in ae)q.addCase(le,ae[le]);for(let le of l.sliceMatchers)q.addMatcher(le.matcher,le.reducer);for(let le of D)q.addMatcher(le.matcher,le.reducer);N&&q.addDefaultCase(N)})}let p=E=>E,f=new Map,y=new WeakMap,w;function T(E,D){return w||(w=u()),w(E,D)}function b(){return w||(w=u()),w.getInitialState()}function R(E,D=!1){function N(q){let le=q[E];return typeof le>"u"&&D&&(le=oo(y,N,b)),le}function ae(q=p){let le=oo(f,D,()=>new WeakMap);return oo(le,q,()=>{let jr={};for(let[dt,Ai]of Object.entries(r.selectors??{}))jr[dt]=om(Ai,q,()=>oo(y,q,b),D);return jr})}return{reducerPath:E,getSelectors:ae,get selectors(){return ae(N)},selectSlice:N}}let B={name:n,reducer:T,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,...R(o),injectInto(E,{reducerPath:D,...N}={}){let ae=D??o;return E.inject({reducerPath:ae,reducer:T},N),{...B,...R(ae,!0)}}};return B}}function om(t,e,i,r){function n(o,...s){let a=e(o);return typeof a>"u"&&r&&(a=i()),t(a,...s)}return n.unwrapped=t,n}var hc=nm();function sm(){function t(e,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...i}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...i){return e(...i)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:i}},asyncThunk:t}}function am({type:t,reducerName:e,createNotation:i},r,n){let o,s;if("reducer"in r){if(i&&!cm(r))throw new Error(Yt(17));o=r.reducer,s=r.prepare}else o=r;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?di(t,s):di(t))}function lm(t){return t._reducerDefinitionType==="asyncThunk"}function cm(t){return t._reducerDefinitionType==="reducerWithPrepare"}function dm({type:t,reducerName:e},i,r,n){if(!n)throw new Error(Yt(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:d,options:u}=i,p=n(t,o,u);r.exposeAction(e,p),s&&r.addCase(p.fulfilled,s),a&&r.addCase(p.pending,a),l&&r.addCase(p.rejected,l),d&&r.addMatcher(p.settled,d),r.exposeCaseReducer(e,{fulfilled:s||so,pending:a||so,rejected:l||so,settled:d||so})}function so(){}var mc="listener",gc="completed",yc="cancelled",gy=`task-${yc}`,yy=`task-${gc}`,vy=`${mc}-${yc}`,xy=`${mc}-${gc}`;var{assign:vc}=Object;var fa="listenerMiddleware";var um=vc(di(`${fa}/add`),{withTypes:()=>um}),by=di(`${fa}/removeAll`),pm=vc(di(`${fa}/remove`),{withTypes:()=>pm});function Yt(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var fm=Mn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(i,r,n){this.eventBus.addEventListener(i,r,n)}dispatchEvent(i){return this.eventBus.dispatchEvent(i)}removeEventListener(i,r,n){this.eventBus.removeEventListener(i,r,n)}}}),ao=class extends fm(Object){};window.ftReduxStores||(window.ftReduxStores={});var xc=class t extends ao{static get(e){var i;let r=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[r];if(Vn(o))return o;if(n==null)return;let s=hc({...n,reducers:(i=n.reducers)!==null&&i!==void 0?i:{}}),a=uc({reducer:(l,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let u=qr(s.getInitialState());for(let p of d.keeping)u[p]=(l??u)[p];return u}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...d.overwrites};return s.reducer(l,d)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,i,r){super(),this.reduxSlice=e,this.reduxStore=i,this.isFtReduxStore=!0,this.commands=new Nn,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,d=o[l];return d?(...u)=>{let p=d(...u.map(n));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];cr(f,u)||this.setState({[p]:n(u)})}}}),this.eventBus=r??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var lo=class{static format(e,i,r,n,o){return window.moment?window.moment(e).locale(i).format(this.getMomentDateFormat(r,n,!!o)):this.getIntlDateTime(e,i,r,n,!!o)}static getMomentDateFormat(e,i,r){return r?"LT":e?i?"lll":"ll":i?"L LT":"L"}static getIntlDateTime(e,i,r,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(i,{dateStyle:r?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(i,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=r=>String(Math.floor(r)).padStart(2,"0"),i=new Date().getTimezoneOffset();return`${i<0?"+":"-"}${e(Math.abs(i)/60)}:${e(Math.abs(i)%60)}`}};var co=c(h()),hm="ft-app-info",wt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};wt.eventName="authentication-change";var Oi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Oi.eventName="ui-locale-changed";var mm={session:(t,e)=>{(0,co.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>x.dispatchEvent(new wt(e.payload)),0))}},x=co.FtReduxStore.get({name:hm,reducers:mm,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var bc=c(h()),uo=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Sc=(0,bc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...r){super(r),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(x)}dateFormatOptionsChanged(r){return r.has("metadataDescriptors")||r.has("useLongDateFormat")||r.has("useDateTimeFormat")||r.has("uiLocale")}getDateFormatter(r){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===r))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>lo.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return uo([(0,ha.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),uo([(0,ha.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),uo([qs({store:x.name,selector:i=>{var r,n;return(n=(r=i.metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),uo([qs({store:x.name})],e.prototype,"uiLocale",void 0),e});var wc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(wc||(wc={}));var Ec;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ec||(Ec={}));var _c;(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"})(_c||(_c={}));var Ac;(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"})(Ac||(Ac={}));var Cc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cc||(Cc={}));var Tc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Tc||(Tc={}));var Rc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Rc||(Rc={}));var Oc;(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"})(Oc||(Oc={}));var kc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(kc||(kc={}));var Dc;(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"})(Dc||(Dc={}));var Lc;(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"})(Lc||(Lc={}));var Ic;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ic||(Ic={}));var Pc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Pc||(Pc={}));var Mc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Mc||(Mc={}));var _e;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(_e||(_e={}));var Nc;(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"})(Nc||(Nc={}));var $c;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})($c||($c={}));var Uc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Uc||(Uc={}));var Fc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fc||(Fc={}));var Vc;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Vc||(Vc={}));var Bc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Bc||(Bc={}));var po;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(po||(po={}));var Hc;(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"})(Hc||(Hc={}));var zc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(zc||(zc={}));var jc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(jc||(jc={}));var Wc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Wc||(Wc={}));var Kc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Kc||(Kc={}));var ie;(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"})(ie||(ie={}));var ut;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ut||(ut={}));var Gc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Gc||(Gc={}));var qc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(qc||(qc={}));var Yc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Yc||(Yc={}));var Zc;(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"})(Zc||(Zc={}));var Xc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Xc||(Xc={}));var Jc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Jc||(Jc={}));var Qc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qc||(Qc={}));var ed;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ed||(ed={}));var td;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(td||(td={}));var id;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(id||(id={}));var rd;(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"})(rd||(rd={}));var fo;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(fo||(fo={}));var gm={[ie.PERSONAL_BOOK_SHARE_USER]:[ie.PERSONAL_BOOK_USER],[ie.HTML_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.PDF_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.KHUB_ADMIN]:[ie.CONTENT_PUBLISHER],[ie.ADMIN]:[ie.KHUB_ADMIN,ie.USERS_ADMIN,ie.PORTAL_ADMIN,ie.BEHAVIOR_DATA_USER],[ie.GENERATIVE_AI_EXPORT_USER]:[ie.GENERATIVE_AI_USER]};function nd(t,e){return t===e||(gm[t]??[]).some(i=>nd(i,e))}function nn(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(r=>nd(r,e))}var vo=c(h());var ma=c(h());var Ft=class t{static get(e){let{baseUrl:i,apiIntegrationIdentifier:r}=x.getState(),n=e??r;if(i&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,n,!0)}static await(e){return new Promise(i=>{let r=t.get(e);if(r)i(r);else{let n=x.subscribe(()=>{r=t.get(e),r&&(n(),i(r))})}})}};var hr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ft.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ft.await()}};var Re=class extends hr{constructor(e=!0,i){var r;super(i),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(r=n.commonCache)!==null&&r!==void 0?r:new ma.CacheRegistry,this.cache=e?n.commonCache:new ma.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((i,r)=>0|31*i+r.charCodeAt(0),0))}};var ho=class extends Re{async listMySearches(){let{session:e}=x.getState();return nn(e,ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var mo=class extends Re{async listMyBookmarks(){let e=x.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var go=class extends Re{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}};var yo=class extends Re{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}};var ym="ft-user-assets",vm={setAssetCount:(t,e)=>{let{userAssetType:i,count:r}=e.payload.assetCount;t.assetCounts.allAsset[i]=r},clearAssetCount:t=>{Object.values(ut).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let i=e.payload.mapId;t.assetCounts.bookmarkByMap[i]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:i,mapId:r,asset:n}=e.payload;ya(t,i,[...ga(t,i),n]),od(t,i,1,r),sd(t,n)},editAsset:(t,e)=>{let{assetType:i,asset:r}=e.payload;ya(t,i,ga(t,i).map(n=>n.id===r.id?r:n)),sd(t,r)},removeAsset:(t,e)=>{let{assetType:i,mapId:r,assetId:n}=e.payload;ya(t,i,ga(t,i).filter(o=>o.id!==n)),od(t,i,-1,r)}},ad={[ut.SEARCHES]:"savedSearches",[ut.BOOKMARKS]:"bookmarks",[ut.BOOKS]:void 0,[ut.COLLECTIONS]:void 0},ga=(t,e)=>{var i;let r=ad[e];return r?(i=t[r])!==null&&i!==void 0?i:[]:[]},ya=(t,e,i)=>{let r=ad[e];r&&(t[r]=i)},od=(t,e,i,r)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+i),e===ut.BOOKMARKS&&r)){let o=t.assetCounts.bookmarkByMap[r];t.assetCounts.bookmarkByMap[r]=Math.max(0,o+i)}},sd=(t,e)=>{let i=t.assetLabels.map(n=>n.title),r=e.labels.filter(n=>!i.includes(n)).map(n=>({title:n}));t.assetLabels.push(...r)},Ue=vo.FtReduxStore.get({name:ym,reducers:vm,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ut).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),va=class{constructor(e=new go,i=new yo){this.assetCountsService=e,this.assetLabelsService=i,this.currentSession=x.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new mo,this.savedSearchesService=new ho,x.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:i}=x.getState();(0,vo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,i?.profile)||(this.currentSession=i,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 e=await this.savedSearchesService.listMySearches();Ue.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ue.actions.assetLabels(e)}async loadAssetCount(e){let i=await this.assetCountsService.getUserAssetCount(e);i&&Ue.getState().assetCounts.allAsset[e]!==i.count&&Ue.actions.setAssetCount({assetCount:i})}async loadBookmarkByMapId(e){let i=await this.assetCountsService.getUserBookmarkCountByMap(e);i&&Ue.getState().assetCounts.bookmarkByMap[e]!==i.count&&Ue.actions.setBookmarkCountByMap({count:i.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let i=Object.keys(Ue.getState().assetCounts.bookmarkByMap).length!==0;e===ut.BOOKMARKS&&i&&Ue.actions.clearBookmarkCountByMap(),Ue.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let i=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ue.actions.bookmarks(i)}}},xm=new va;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xm);var xa=class{addCommand(e,i=!1){x.commands.add(e,i)}consumeCommand(e){return x.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new xa;var pt=c(h());var ld,mr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},bm=Symbol("clearAfterUnitTest"),xo=class extends(0,pt.withEventBus)(Re){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ld]=()=>{this.defaultMessages={},this.cache=new pt.CacheRegistry,this.listeners={}},this.currentUiLocale=x.getState().uiLocale,x.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=x.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let i=e.name.toLowerCase();this.cache.setFinal(i,e),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,i){var r;if(e=e.toLowerCase(),i&&Object.keys(i).length>0){let n={...(r=this.defaultMessages[e])!==null&&r!==void 0?r:{},...i};(0,pt.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var i,r;return this.fetchContext(e),(r=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&r!==void 0?r:{}}resolveRawMessage(e,i){let r=e.toLowerCase();return this.resolveContext(r)[i]}resolveMessage(e,i,...r){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new pt.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(i,...r)}async fetchContext(e){let i=!this.cache.has(e),r;try{r=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),i&&await this.notify(e)}catch(n){!(n instanceof pt.CanceledPromiseError)&&i&&console.error(n)}return r}subscribe(e,i){var r;return e=e.toLowerCase(),this.listeners[e]=(r=this.listeners[e])!==null&&r!==void 0?r:new Set,this.listeners[e].add(i),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(i)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new mr({loadedContexts:e})),this.dispatchEvent(new mr({loadedContexts:e})),await Promise.all(e.map(i=>this.notify(i,!1)))}async notify(e,i=!0){i&&(document.body.dispatchEvent(new mr({loadedContexts:[e]})),this.dispatchEvent(new mr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,pt.delay)(0).then(()=>r()).catch(()=>null)))}};ld=bm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends xo{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends xo{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var gr=window.FluidTopicsI18nService,bo=window.FluidTopicsCustomI18nService;var cd=c(h()),ba=class{highlightHtml(e,i,r){(0,cd.highlightHtml)(e,i,r)}};window.FluidTopicsHighlightHtmlService=new ba;var dd=c(h());var Sa=class{isDate(e){var i,r,n,o;return(o=(n=((r=(i=x.getState().metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&r!==void 0?r:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,i){var r,n,o,s;if(e==null)return"";try{return dd.DateFormatter.format(e,(r=i?.locale)!==null&&r!==void 0?r:x.getState().uiLocale,(n=i?.longFormat)!==null&&n!==void 0?n:!1,(o=i?.withTime)!==null&&o!==void 0?o:!1,(s=i?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Sa;var ud=c(h());var on=class{static get(e,i){var r,n,o,s;let a=x.getState(),{lang:l,region:d}=(o=(n=(r=a.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new ud.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,i??`${l}-${d}`)}};var wa=class{urlToSearchRequest(e){return on.get().parse(e)}searchRequestToUrl(e){return on.get().serialize(e)}};window.FluidTopicsUrlService=new wa;var Zt=c(h());var ki=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};ki.eventName="before-location-change";var Di=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Di.eventName="change";var Ea=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let i=sessionStorage.getItem(this.itemName(e));return i?JSON.parse(i):void 0}set(e,i){sessionStorage.setItem(this.itemName(e),JSON.stringify(i))}},pd=new Ea;var So=class t extends Zt.WithEventBus{static build(){return new t(window.history,pd,()=>window.location,!1)}constructor(e,i,r,n){var o,s;super(),this.history=e,this.historyStorage=i,this.windowLocation=r,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,i=!1){let r=i&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,r&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Zt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Di(this.currentItem())),0)}installProxies(){let e=i=>(r,n,[o,s,a])=>{let l=new ki(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let d=i(),u={...d===this.currentIndex?this.currentState:void 0,...o,index:d,href:l.detail.nextLocation.href};r.apply(n,[u,s,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let i=this.history.length-1;i>=0;i--)e?this.states[i]=this.historyStorage.get(i):setTimeout(()=>this.states[i]=this.historyStorage.get(i),this.history.length-i)}updateCurrentState(e){var i;let r={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title};this.setCurrentState(r)}addBeforeLocationChangeListener(e){this.addEventListener(ki.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(ki.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Di.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Di.eventName,e)}currentItem(){return(0,Zt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Zt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let i=this.states.filter(r=>!!r).filter(r=>r.index<this.currentIndex).reverse();return(0,Zt.deepCopy)(i.find(r=>e(r)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Zt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var i;let r=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;if(!r)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,r);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,i;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(i=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&i!==void 0?i:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,i){var r;if(!this.hasState(e))return!1;let n=i??this.currentState.majorStateId,o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=So.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var wo=class{constructor(){this.storeListeners=[]}store(e,i){if(this.isAuthenticated())return;let r=JSON.stringify(i);window.localStorage.setItem(e,r),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:r,storageArea:window.localStorage}))}get(e){var i,r;if(!this.isAuthenticated())return(r=JSON.parse((i=window.localStorage.getItem(e))!==null&&i!==void 0?i:"null"))!==null&&r!==void 0?r:void 0}addStoreListener(e,i){let r=n=>{n.key===e()&&!this.isAuthenticated()&&i()};this.storeListeners.push(r),window.addEventListener("storage",r)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}};var fd=c(S());var hd=fd.css`
1
+ "use strict";(()=>{var lh=Object.create;var hl=Object.defineProperty;var ch=Object.getOwnPropertyDescriptor;var dh=Object.getOwnPropertyNames;var uh=Object.getPrototypeOf,ph=Object.prototype.hasOwnProperty;var or=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(i){throw e=0,i}};var fh=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of dh(e))!ph.call(t,n)&&n!==i&&hl(t,n,{get:()=>e[n],enumerable:!(r=ch(e,n))||r.enumerable});return t};var c=(t,e,i)=>(i=t!=null?lh(uh(t)):{},fh(e||!t||!t.__esModule?hl(i,"default",{value:t,enumerable:!0}):i,t));var h=or((sg,ml)=>{ml.exports=ftGlobals.wcUtils});var U=or((ag,gl)=>{gl.exports=ftGlobals.litDecorators});var S=or((Lg,bl)=>{bl.exports=ftGlobals.lit});var xr=or((xb,Cd)=>{Cd.exports=ftGlobals.litRepeat});var Ua=or((Jb,au)=>{au.exports=ftGlobals.litUnsafeHTML});var st=or((uE,Pu)=>{Pu.exports=ftGlobals.litClassMap});var oh=c(h());var vl=c(h()),xl=c(U());var Gt=class extends Event{constructor(e,i,r,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i,this.callback=r,this.subscribe=n??!1}};var sr=class{constructor(e,i,r,n){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,s)=>{this.unsubscribe&&(this.unsubscribe!==s&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,s)),this.unsubscribe=s},this.host=e,i.context!==void 0){let o=i;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=i,this.callback=r,this.subscribe=n??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Gt(this.context,this.host,this.t,this.subscribe))}};var In=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,i=!1){let r=i||!Object.is(e,this.o);this.o=e,r&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[i,{disposer:r}]of this.subscriptions)i(this.o,r)},e!==void 0&&(this.value=e)}addCallback(e,i,r){if(!r)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:i});let{disposer:n}=this.subscriptions.get(e);e(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};var Ws=class extends Event{constructor(e,i){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=i}},ar=class extends In{constructor(e,i,r){super(i.context!==void 0?i.initialValue:r),this.onContextRequest=n=>{if(n.context!==this.context)return;let o=n.contextTarget??n.composedPath()[0];o!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,o,n.subscribe))},this.onProviderRequest=n=>{if(n.context!==this.context||(n.contextTarget??n.composedPath()[0])===this.host)return;let o=new Set;for(let[s,{consumerHost:a}]of this.subscriptions)o.has(s)||(o.add(s),a.dispatchEvent(new Gt(this.context,a,s,!0)));n.stopPropagation()},this.host=e,i.context!==void 0?this.context=i.context:this.context=i,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Ws(this.context,this.host))}};var Wr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let i=this.pendingContextRequests.get(e.context);if(i===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:r}=i;for(let{elementRef:n,callbackRef:o}of r){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Gt(e.context,s,a,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let i=e.contextTarget??e.composedPath()[0],r=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(i);o===void 0&&n.callbacks.set(i,o=new WeakSet),o.has(r)||(o.add(r),n.requests.push({elementRef:new WeakRef(i),callbackRef:new WeakRef(r)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}};function Kr({context:t}){return(e,i)=>{let r=new WeakMap;if(typeof i=="object")return{get(){return e.get.call(this)},set(n){return r.get(this).setValue(n),e.set.call(this,n)},init(n){return r.set(this,new ar(this,{context:t,initialValue:n})),n}};{e.constructor.addInitializer((s=>{r.set(s,new ar(s,{context:t}))}));let n=Object.getOwnPropertyDescriptor(e,i),o;if(n===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){r.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=n.set;o={...n,set(a){r.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(e,i,o)}}}function Gr({context:t,subscribe:e}){return(i,r)=>{typeof r=="object"?r.addInitializer((function(){new sr(this,{context:t,callback:n=>{i.set.call(this,n)},subscribe:e})})):i.constructor.addInitializer((n=>{new sr(n,{context:t,callback:o=>{n[r]=o},subscribe:e})}))}}var hh=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ks=Symbol("asset-viewer-state-manager"),Nt=(0,vl.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(t){class e extends t{willUpdate(r){super.willUpdate(r),r.has("viewerStateManager")&&(this.viewerStateManager?this.addStore(this.viewerStateManager.store,"viewer"):this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.viewerStateManager&&this.addStore(this.viewerStateManager.store,"viewer")}disconnectedCallback(){super.disconnectedCallback(),this.removeStore("viewer")}}return hh([Gr({context:Ks,subscribe:!0}),(0,xl.state)()],e.prototype,"viewerStateManager",void 0),e});var Sd=c(S()),vr=c(h());var Sl=c(h()),mh={setZoom:(t,e)=>{t.contentModifiers.zoom=e.payload},setRotation:(t,e)=>{t.contentModifiers.rotation=e.payload}},Pn=t=>Sl.FtReduxStore.get({name:"ft-viewer-"+t,initialState:{documentId:void 0,unstructuredDocument:void 0,document:void 0,assetId:void 0,origin:void 0,descriptor:void 0,contentModifiers:{zoom:void 0,rotation:0},watermark:void 0,configuration:void 0,documentRating:void 0,assetRating:void 0,relatives:void 0},reducers:mh});var wl=c(h()),lr=class extends wl.FtStateManager{constructor(e){super(),this.store=e}setZoom(e){this.store.actions.setZoom(e)}setRotation(e){this.store.actions.setRotation(e)}};var ha=c(U());var El=c(U(),1);var Gs=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function _l(t,e){return(0,El.property)({type:Object,converter:{fromAttribute:i=>{if(i==null)return qr(t);try{return JSON.parse(i)}catch{return qr(t)}},toAttribute:i=>JSON.stringify(i)},hasChanged:Yr,...e??{}})}function gh(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let i,r;if(Array.isArray(t)){if(i=t.length,i!=e.length)return!1;for(r=i;r--!==0;)if(!cr(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!cr(r[1],e.get(r[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(t);if(i=o.length,i!==n(e).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;r--!==0;){let s=o[r];if(!cr(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function cr(t,e){try{return gh(t,e)}catch{return!1}}function Yr(t,e){return!cr(t,e)}function qr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Mn(t,e){let i=r=>r[t]===!0;return r=>{if(i(r))return r;let n=e(r);return n[t]=!0,n}}var Al=c(U(),1);var qs=t=>{let e=t??{};return(i,r)=>{var n;let o={hasChanged:Yr,attribute:!1,...e};(0,Al.property)(o)(i,r);let s=i.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(r,{selector:(n=e.selector)!==null&&n!==void 0?n:(a=>a[r]),store:e.store})}};var Nn=class{constructor(){this.queue=[]}add(e,i=!1){i&&this.clear(e.type),this.queue.push(e)}consume(e){let i=this.queue.find(r=>r.type===e);return i&&(this.queue=this.queue.filter(r=>r!==i)),i}clear(e){typeof e=="string"?this.queue=this.queue.filter(i=>i.type!==e):this.queue=this.queue.filter(i=>!e.test(i.type))}};var Ci=c(U(),1);var $n=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,i){return this.callbacks=[e],this.debounce(i)}queue(e,i){return this.callbacks.push(e),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((i,r)=>{this.resolvePromise=i,this.rejectPromise=r})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,i;let r=[...this.callbacks];this.callbacks=[];let n=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),o=(i=this.resolvePromise)!==null&&i!==void 0?i:(()=>null);this.clearPromise();for(let s of r)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Tl=c(S(),1);var Un=globalThis,yh=Un.ShadowRoot&&(Un.ShadyCSS===void 0||Un.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var Cl=(t,e)=>{if(yh)t.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let r=document.createElement("style"),n=Un.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=i.cssText,t.appendChild(r)}};var Fn=class extends Tl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let e=this.scopedRegistryConstructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,e.defineScopedElements(e.elementDefinitions));let i={...e.shadowRootOptions,customElements:e.registry},r=this.renderOptions.creationScope=this.attachShadow(i);return Cl(r,e.elementStyles),r}static canDefineScopedElement(e){return!!this.registry&&!this.registry.get(e)}static defineScopedElements(e){Object.entries(e).forEach(([i,r])=>this.defineScopedElement(i,r))}static defineScopedElement(e,i){Gs(e)(i),this.canDefineScopedElement(e)&&this.registry.define(e,i)}canDefineScopedElement(e){return this.scopedRegistryConstructor.canDefineScopedElement(e)}defineScopedElements(e){this.scopedRegistryConstructor.defineScopedElements(e)}defineScopedElement(e,i){this.scopedRegistryConstructor.defineScopedElement(e,i)}};function Rl(t,e,...i){var r;let n=t.querySelector(e);for(let o of i)n=(r=n?.shadowRoot)===null||r===void 0?void 0:r.querySelector(o);return n}var ur=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Ll,Ol=Symbol("constructorPrototype"),kl=Symbol("constructorName"),Il=Symbol("exportpartsDebouncer"),Dl=Symbol("dynamicDependenciesLoaded"),dr=class t extends CustomEvent{constructor(){super(t.eventName,{bubbles:!0})}};dr.eventName="exportparts-updated";var $t=class extends Fn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ll]=new $n(5),this.scheduleExportpartsUpdate=()=>{var e,i,r;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(r=(i=this.exportpartsPrefixes)===null||i===void 0?void 0:i.length)!==null&&r!==void 0&&r)&&this[Il].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[kl]=this.constructor.name,this[Ol]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[kl]&&Object.setPrototypeOf(this,this[Ol])}connectedCallback(){var e;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(r){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",r)}let i=this.constructor;i[Dl]||(i[Dl]=!0,this.importDynamicDependencies()),(e=this.shadowRoot)===null||e===void 0||e.addEventListener(dr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.shadowRoot)===null||e===void 0||e.removeEventListener(dr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.focusElementToFocus(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate(),e.has("exportparts")&&this.dispatchEvent(new dr)})}contentAvailableCallback(e){}focusElementToFocus(e){if(e.has("elementToFocus")&&this.elementToFocus!=null){let{element:i,selector:r,shadowPath:n}=this.elementToFocus;if(r!=null){let o=[...n??[],r];i=Rl(this.shadowRoot,...o)}i?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||i?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(e){var i,r,n;if(((r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&r!==void 0?r:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(e){var i,r,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,d=e.filter(l).map(f=>f.trim());if(d.length===0){this.exportparts=void 0;return}let u=new Set;for(let f of(r=(i=this.shadowRoot)===null||i===void 0?void 0:i.querySelectorAll("[part],[exportparts]"))!==null&&r!==void 0?r:[]){let y=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],w=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(b=>b.split(":")[1]))!==null&&a!==void 0?a:[],C=[...y,...w].filter(l).map(b=>b.trim());for(let b of C)u.add(b)}if(u.size===0){this.exportparts=void 0;return}let p=[...u.values()].flatMap(f=>d.map(y=>`${f}:${y}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Ll=Il;ur([(0,Ci.property)()],$t.prototype,"exportpartsPrefix",void 0);ur([_l([])],$t.prototype,"exportpartsPrefixes",void 0);ur([(0,Ci.property)({reflect:!0})],$t.prototype,"exportparts",void 0);ur([(0,Ci.property)()],$t.prototype,"customStylesheet",void 0);ur([(0,Ci.property)()],$t.prototype,"elementToFocus",void 0);ur([(0,Ci.state)()],$t.prototype,"useAdoptedStyleSheets",void 0);function Vn(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var Zr=Symbol("internalReduxEventsUnsubscribers"),ci=Symbol("internalStoresUnsubscribers"),Ti=Symbol("internalStores"),vh=Mn(Symbol("withRedux"),function(t){var e,i,r;class n extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=new Map,this[r]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Ti].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Ti].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Ti].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Ti].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Ti].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Ti].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let d=this.getStore(s.store);d&&(s.store?this[ci].has(s.store):this[ci].size>0)&&(this[a]=s.selector(d.getState(),this))}})}subscribeToStore(s,a){var l;this[ci].set(s,a.subscribe(()=>this.updateFromStores())),this[Zr].set(s,[]),Vn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((d,u)=>{if(typeof this[u]=="function"&&(!d.store||a.name===d.store)){let p=f=>this[u](f);a.addEventListener(d.eventName,p),this[Zr].get(s).push(()=>a.removeEventListener(d.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[ci].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[ci].has(s)&&this[ci].get(s)(),this[ci].delete(s),(a=this[Zr].get(s))===null||a===void 0||a.forEach(l=>l()),this[Zr].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return e=ci,i=Ti,r=Zr,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Pl=class extends vh($t){};function Te(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 xh=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ml=xh,Ys=()=>Math.random().toString(36).substring(7).split("").join("."),bh={INIT:`@@redux/INIT${Ys()}`,REPLACE:`@@redux/REPLACE${Ys()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ys()}`},Bn=bh;function Hn(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Zs(t,e,i){if(typeof t!="function")throw new Error(Te(2));if(typeof e=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Te(0));if(typeof e=="function"&&typeof i>"u"&&(i=e,e=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Te(1));return i(Zs)(t,e)}let r=t,n=e,o=new Map,s=o,a=0,l=!1;function d(){s===o&&(s=new Map,o.forEach((b,T)=>{s.set(T,b)}))}function u(){if(l)throw new Error(Te(3));return n}function p(b){if(typeof b!="function")throw new Error(Te(4));if(l)throw new Error(Te(5));let T=!0;d();let B=a++;return s.set(B,b),function(){if(T){if(l)throw new Error(Te(6));T=!1,d(),s.delete(B),o=null}}}function f(b){if(!Hn(b))throw new Error(Te(7));if(typeof b.type>"u")throw new Error(Te(8));if(typeof b.type!="string")throw new Error(Te(17));if(l)throw new Error(Te(9));try{l=!0,n=r(n,b)}finally{l=!1}return(o=s).forEach(B=>{B()}),b}function y(b){if(typeof b!="function")throw new Error(Te(10));r=b,f({type:Bn.REPLACE})}function w(){let b=p;return{subscribe(T){if(typeof T!="object"||T===null)throw new Error(Te(11));function B(){let k=T;k.next&&k.next(u())}return B(),{unsubscribe:b(B)}},[Ml](){return this}}}return f({type:Bn.INIT}),{dispatch:f,subscribe:p,getState:u,replaceReducer:y,[Ml]:w}}function Sh(t){Object.keys(t).forEach(e=>{let i=t[e];if(typeof i(void 0,{type:Bn.INIT})>"u")throw new Error(Te(12));if(typeof i(void 0,{type:Bn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Te(13))})}function Nl(t){let e=Object.keys(t),i={};for(let s=0;s<e.length;s++){let a=e[s];typeof t[a]=="function"&&(i[a]=t[a])}let r=Object.keys(i),n,o;try{Sh(i)}catch(s){o=s}return function(a={},l){if(o)throw o;let d=!1,u={};for(let p=0;p<r.length;p++){let f=r[p],y=i[f],w=a[f],C=y(w,l);if(typeof C>"u"){let b=l&&l.type;throw new Error(Te(14))}u[f]=C,d=d||C!==w}return d=d||r.length!==Object.keys(a).length,d?u:a}}function Xr(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,i)=>(...r)=>e(i(...r)))}function $l(...t){return e=>(i,r)=>{let n=e(i,r),o=()=>{throw new Error(Te(15))},s={getState:n.getState,dispatch:(l,...d)=>o(l,...d)},a=t.map(l=>l(s));return o=Xr(...a)(n.dispatch),{...n,dispatch:o}}}function Ul(t){return Hn(t)&&"type"in t&&typeof t.type=="string"}var Gl=Symbol.for("immer-nothing"),Fl=Symbol.for("immer-draftable"),Le=Symbol.for("immer-state");function St(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var tt=Object,fr=tt.getPrototypeOf,Kn="constructor",Jn="prototype",ea="configurable",Gn="enumerable",jn="writable",Jr="value",Ut=t=>!!t&&!!t[Le];function it(t){return t?ql(t)||eo(t)||!!t[Fl]||!!t[Kn]?.[Fl]||to(t)||io(t):!1}var wh=tt[Jn][Kn].toString(),Vl=new WeakMap;function ql(t){if(!t||!la(t))return!1;let e=fr(t);if(e===null||e===tt[Jn])return!0;let i=tt.hasOwnProperty.call(e,Kn)&&e[Kn];if(i===Object)return!0;if(!pr(i))return!1;let r=Vl.get(i);return r===void 0&&(r=Function.toString.call(i),Vl.set(i,r)),r===wh}function Qn(t,e,i=!0){tn(t)===0?(i?Reflect.ownKeys(t):tt.keys(t)).forEach(n=>{e(n,t[n],t)}):t.forEach((r,n)=>e(n,r,t))}function tn(t){let e=t[Le];return e?e.type_:eo(t)?1:to(t)?2:io(t)?3:0}var Xs=(t,e,i=tn(t))=>i===2?t.has(e):tt[Jn].hasOwnProperty.call(t,e),ta=(t,e,i=tn(t))=>i===2?t.get(e):t[e],qn=(t,e,i,r=tn(t))=>{r===2?t.set(e,i):r===3?t.add(i):t[e]=i};function Eh(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var eo=Array.isArray,to=t=>t instanceof Map,io=t=>t instanceof Set,la=t=>typeof t=="object",pr=t=>typeof t=="function",Js=t=>typeof t=="boolean";function _h(t){let e=+t;return Number.isInteger(e)&&String(e)===t}var qt=t=>t.copy_||t.base_;var ca=t=>t.modified_?t.copy_:t.base_;function ia(t,e){if(to(t))return new Map(t);if(io(t))return new Set(t);if(eo(t))return Array[Jn].slice.call(t);let i=ql(t);if(e===!0||e==="class_only"&&!i){let r=tt.getOwnPropertyDescriptors(t);delete r[Le];let n=Reflect.ownKeys(r);for(let o=0;o<n.length;o++){let s=n[o],a=r[s];a[jn]===!1&&(a[jn]=!0,a[ea]=!0),(a.get||a.set)&&(r[s]={[ea]:!0,[jn]:!0,[Gn]:a[Gn],[Jr]:t[s]})}return tt.create(fr(t),r)}else{let r=fr(t);if(r!==null&&i)return{...t};let n=tt.create(r);return tt.assign(n,t)}}function da(t,e=!1){return ro(t)||Ut(t)||!it(t)||(tn(t)>1&&tt.defineProperties(t,{set:zn,add:zn,clear:zn,delete:zn}),tt.freeze(t),e&&Qn(t,(i,r)=>{da(r,!0)},!1)),t}function Ah(){St(2)}var zn={[Jr]:Ah};function ro(t){return t===null||!la(t)?!0:tt.isFrozen(t)}var Yn="MapSet",ra="Patches",Bl="ArrayMethods",Yl={};function Ri(t){let e=Yl[t];return e||St(0,t),e}var Hl=t=>!!Yl[t];var Qr,Zl=()=>Qr,Ch=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hl(Yn)?Ri(Yn):void 0,arrayMethodsPlugin_:Hl(Bl)?Ri(Bl):void 0});function zl(t,e){e&&(t.patchPlugin_=Ri(ra),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function na(t){oa(t),t.drafts_.forEach(Th),t.drafts_=null}function oa(t){t===Qr&&(Qr=t.parent_)}var jl=t=>Qr=Ch(Qr,t);function Th(t){let e=t[Le];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Wl(t,e){e.unfinalizedDrafts_=e.drafts_.length;let i=e.drafts_[0];if(t!==void 0&&t!==i){i[Le].modified_&&(na(e),St(4)),it(t)&&(t=Kl(e,t));let{patchPlugin_:n}=e;n&&n.generateReplacementPatches_(i[Le].base_,t,e)}else t=Kl(e,i);return Rh(e,t,!0),na(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Gl?t:void 0}function Kl(t,e){if(ro(e))return e;let i=e[Le];if(!i)return Zn(e,t.handledSet_,t);if(!no(i,t))return e;if(!i.modified_)return i.base_;if(!i.finalized_){let{callbacks_:r}=i;if(r)for(;r.length>0;)r.pop()(t);Ql(i,t)}return i.copy_}function Rh(t,e,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&da(e,i)}function Xl(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var no=(t,e)=>t.scope_===e,Oh=[];function Jl(t,e,i,r){let n=qt(t),o=t.type_;if(r!==void 0&&ta(n,r,o)===e){qn(n,r,i,o);return}if(!t.draftLocations_){let a=t.draftLocations_=new Map;Qn(n,(l,d)=>{if(Ut(d)){let u=a.get(d)||[];u.push(l),a.set(d,u)}})}let s=t.draftLocations_.get(e)??Oh;for(let a of s)qn(n,a,i,o)}function kh(t,e,i){t.callbacks_.push(function(n){let o=e;if(!o||!no(o,n))return;n.mapSetPlugin_?.fixSetContents(o);let s=ca(o);Jl(t,o.draft_??o,s,i),Ql(o,n)})}function Ql(t,e){if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(t.assigned_?.size??0)>0)){let{patchPlugin_:r}=e;if(r){let n=r.getPath(t);n&&r.generatePatches_(t,n,e)}Xl(t)}}function Dh(t,e,i){let{scope_:r}=t;if(Ut(i)){let n=i[Le];no(n,r)&&n.callbacks_.push(function(){Wn(t);let s=ca(n);Jl(t,i,s,e)})}else it(i)&&t.callbacks_.push(function(){let o=qt(t);t.type_===3?o.has(i)&&Zn(i,r.handledSet_,r):ta(o,e,t.type_)===i&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&Zn(ta(t.copy_,e,t.type_),r.handledSet_,r)})}function Zn(t,e,i){return!i.immer_.autoFreeze_&&i.unfinalizedDrafts_<1||Ut(t)||e.has(t)||!it(t)||ro(t)||(e.add(t),Qn(t,(r,n)=>{if(Ut(n)){let o=n[Le];if(no(o,i)){let s=ca(o);qn(t,r,s,t.type_),Xl(o)}}else it(n)&&Zn(n,e,i)})),t}function Lh(t,e){let i=eo(t),r={type_:i?1:0,scope_:e?e.scope_:Zl(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=r,o=Xn;i&&(n=[r],o=en);let{revoke:s,proxy:a}=Proxy.revocable(n,o);return r.draft_=a,r.revoke_=s,[a,r]}var Xn={get(t,e){if(e===Le)return t;let i=t.scope_.arrayMethodsPlugin_,r=t.type_===1&&typeof e=="string";if(r&&i?.isArrayOperationMethod(e))return i.createMethodInterceptor(t,e);let n=qt(t);if(!Xs(n,e,t.type_))return Ph(t,n,e);let o=n[e];if(t.finalized_||!it(o)||r&&t.operationMethod&&i?.isMutatingArrayMethod(t.operationMethod)&&_h(e))return o;if(o===Qs(t.base_,e)||Ih(t,e,o)){Wn(t);let s=t.type_===1?+e:e,a=aa(t.scope_,o,t,s);return t.copy_[s]=a}return o},has(t,e){return e in qt(t)},ownKeys(t){return Reflect.ownKeys(qt(t))},set(t,e,i){let r=ec(qt(t),e);if(r?.set)return r.set.call(t.draft_,i),!0;if(!t.modified_){let n=Qs(qt(t),e),o=n?.[Le];if(o&&o.base_===i)return t.copy_[e]=i,t.assigned_.set(e,!1),!0;if(Eh(i,n)&&(i!==void 0||Xs(t.base_,e,t.type_)))return!0;Wn(t),sa(t)}return t.copy_[e]===i&&(i!==void 0||Xs(t.copy_,e,t.type_))||Number.isNaN(i)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=i,t.assigned_.set(e,!0),Dh(t,e,i)),!0},deleteProperty(t,e){return Wn(t),Qs(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),sa(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){let i=qt(t),r=Reflect.getOwnPropertyDescriptor(i,e);return r&&{[jn]:!0,[ea]:t.type_!==1||e!=="length",[Gn]:r[Gn],[Jr]:i[e]}},defineProperty(){St(11)},getPrototypeOf(t){return fr(t.base_)},setPrototypeOf(){St(12)}},en={};for(let t in Xn){let e=Xn[t];en[t]=function(){let i=arguments;return i[0]=i[0][0],e.apply(this,i)}}en.deleteProperty=function(t,e){return en.set.call(this,t,e,void 0)};en.set=function(t,e,i){return Xn.set.call(this,t[0],e,i,t[0])};function Qs(t,e){let i=t[Le];return(i?qt(i):t)[e]}function Ih(t,e,i){return t.type_!==1||!t.allIndicesReassigned_||t.assigned_?.get(e)||!it(i)||i[Le]?!1:t.baseRefs_.has(i)}function Ph(t,e,i){let r=ec(e,i);return r?Jr in r?r[Jr]:r.get?.call(t.draft_):void 0}function ec(t,e){if(!(e in t))return;let i=fr(t);for(;i;){let r=Object.getOwnPropertyDescriptor(i,e);if(r)return r;i=fr(i)}}function sa(t){t.modified_||(t.modified_=!0,t.parent_&&sa(t.parent_))}function Wn(t){t.copy_||(t.assigned_=new Map,t.copy_=ia(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Mh=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,i,r)=>{if(pr(e)&&!pr(i)){let o=i;i=e;let s=this;return function(l=o,...d){return s.produce(l,u=>i.call(this,u,...d))}}pr(i)||St(6),r!==void 0&&!pr(r)&&St(7);let n;if(it(e)){let o=jl(this),s=aa(o,e,void 0),a=!0;try{n=i(s),a=!1}finally{a?na(o):oa(o)}return zl(o,r),Wl(n,o)}else if(!e||!la(e)){if(n=i(e),n===void 0&&(n=e),n===Gl&&(n=void 0),this.autoFreeze_&&da(n,!0),r){let o=[],s=[];Ri(ra).generateReplacementPatches_(e,n,{patches_:o,inversePatches_:s}),r(o,s)}return n}else St(1,e)},this.produceWithPatches=(e,i)=>{if(pr(e))return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,n;return[this.produce(e,i,(s,a)=>{r=s,n=a}),r,n]},Js(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Js(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Js(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){it(t)||St(8),Ut(t)&&(t=tc(t));let e=jl(this),i=aa(e,t,void 0);return i[Le].isManual_=!0,oa(e),i}finishDraft(t,e){let i=t&&t[Le];(!i||!i.isManual_)&&St(9);let{scope_:r}=i;return zl(r,e),Wl(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let i;for(i=e.length-1;i>=0;i--){let n=e[i];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}i>-1&&(e=e.slice(i+1));let r=Ri(ra).applyPatches_;return Ut(t)?r(t,e):this.produce(t,n=>r(n,e))}};function aa(t,e,i,r){let[n,o]=to(e)?Ri(Yn).proxyMap_(e,i):io(e)?Ri(Yn).proxySet_(e,i):Lh(e,i);return(i?.scope_??Zl()).drafts_.push(n),o.callbacks_=i?.callbacks_??[],o.key_=r,i&&r!==void 0?kh(i,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:d}=l;o.modified_&&d&&d.generatePatches_(o,[],l)}),n}function tc(t){return Ut(t)||St(10,t),ic(t)}function ic(t){if(!it(t)||ro(t))return t;let e=t[Le],i,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,i=ia(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else i=ia(t,!0);return Qn(i,(n,o)=>{qn(i,n,ic(o))},r),e&&(e.finalized_=!1),i}var Nh=globalThis.Iterator,sy=typeof Nh?.from=="function";var $h=new Mh,ua=$h.produce;function rc(t){return({dispatch:i,getState:r})=>n=>o=>typeof o=="function"?o(i,r,t):n(o)}var nc=rc(),oc=rc;var Uh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xr:Xr.apply(null,arguments)},fy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}},Fh=t=>t&&typeof t.match=="function";function di(t,e){function i(...r){if(e){let n=e(...r);if(!n)throw new Error(Yt(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:r[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=r=>Ul(r)&&r.type===t,i}var dc=class rn extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,rn.prototype)}static get[Symbol.species](){return rn}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new rn(...e[0].concat(this)):new rn(...e.concat(this))}};function sc(t){return it(t)?ua(t,()=>{}):t}function oo(t,e,i){return t.has(e)?t.get(e):t.set(e,i(e)).get(e)}function Vh(t){return typeof t=="boolean"}var Bh=()=>function(e){let{thunk:i=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:o=!0}=e??{},s=new dc;return i&&(Vh(i)?s.push(nc):s.push(oc(i.extraArgument))),s},Hh="RTK_autoBatch";var ac=t=>e=>{setTimeout(e,t)},zh=(t,e)=>i=>{let r=!1,n=()=>{r||(r=!0,cancelAnimationFrame(o),clearTimeout(s),i())},o=t(n),s=setTimeout(n,e)},jh=(t={type:"raf"})=>e=>(...i)=>{let r=e(...i),n=!0,o=!1,s=!1,a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?zh(window.requestAnimationFrame,100):ac(10):t.type==="callback"?t.queueNotification:ac(t.timeout),d=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let p=()=>n&&u(),f=r.subscribe(p);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){try{return n=!u?.meta?.[Hh],o=!n,o&&(s||(s=!0,l(d))),r.dispatch(u)}finally{n=!0}}})},Wh=t=>function(i){let{autoBatch:r=!0}=i??{},n=new dc(t);return r&&n.push(jh(typeof r=="object"?r:void 0)),n};function uc(t){let e=Bh(),{reducer:i=void 0,middleware:r,devTools:n=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=t||{},l;if(typeof i=="function")l=i;else if(Hn(i))l=Nl(i);else throw new Error(Yt(1));let d;typeof r=="function"?d=r(e):d=e();let u=Xr;n&&(u=Uh({trace:!1,...typeof n=="object"&&n}));let p=$l(...d),f=Wh(p),y=typeof a=="function"?a(f):f(),w=u(...y);return Zs(l,s,w)}function pc(t){let e={},i=[],r,n={addCase(o,s){let a=typeof o=="string"?o:o.type;if(!a)throw new Error(Yt(28));if(a in e)throw new Error(Yt(29));return e[a]=s,n},addAsyncThunk(o,s){return s.pending&&(e[o.pending.type]=s.pending),s.rejected&&(e[o.rejected.type]=s.rejected),s.fulfilled&&(e[o.fulfilled.type]=s.fulfilled),s.settled&&i.push({matcher:o.settled,reducer:s.settled}),n},addMatcher(o,s){return i.push({matcher:o,reducer:s}),n},addDefaultCase(o){return r=o,n}};return t(n),[e,i,r]}function Kh(t){return typeof t=="function"}function Gh(t,e){let[i,r,n]=pc(e),o;if(Kh(t))o=()=>sc(t());else{let a=sc(t);o=()=>a}function s(a=o(),l){let d=[i[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return d.filter(u=>!!u).length===0&&(d=[n]),d.reduce((u,p)=>{if(p)if(Ut(u)){let y=p(u,l);return y===void 0?u:y}else{if(it(u))return ua(u,f=>p(f,l));{let f=p(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=o,s}var qh=(t,e)=>Fh(t)?t.match(e):t(e);function Yh(...t){return e=>t.some(i=>qh(i,e))}var Zh="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xh=(t=21)=>{let e="",i=t;for(;i--;)e+=Zh[Math.random()*64|0];return e},Jh=["name","message","stack","code"],pa=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},lc=class{constructor(t,e){this.payload=t,this.meta=e}payload;meta;_type},Qh=t=>{if(typeof t=="object"&&t!==null){let e={};for(let i of Jh)typeof t[i]=="string"&&(e[i]=t[i]);return e}return{message:String(t)}},cc="External signal was aborted",em=(()=>{function t(e,i,r){let n=di(e+"/fulfilled",(l,d,u,p)=>({payload:l,meta:{...p||{},arg:u,requestId:d,requestStatus:"fulfilled"}})),o=di(e+"/pending",(l,d,u)=>({payload:void 0,meta:{...u||{},arg:d,requestId:l,requestStatus:"pending"}})),s=di(e+"/rejected",(l,d,u,p,f)=>({payload:p,error:(r&&r.serializeError||Qh)(l||"Rejected"),meta:{...f||{},arg:u,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:d}={}){return(u,p,f)=>{let y=r?.idGenerator?r.idGenerator(l):Xh(),w=new AbortController,C,b;function T(E){b=E,w.abort()}d&&(d.aborted?T(cc):d.addEventListener("abort",()=>T(cc),{once:!0}));let B=(async function(){let E;try{let N=r?.condition?.(l,{getState:p,extra:f});if(im(N)&&(N=await N),N===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let ae=new Promise((q,le)=>{C=()=>{le({name:"AbortError",message:b||"Aborted"})},w.signal.addEventListener("abort",C,{once:!0})});u(o(y,l,r?.getPendingMeta?.({requestId:y,arg:l},{getState:p,extra:f}))),E=await Promise.race([ae,Promise.resolve(i(l,{dispatch:u,getState:p,extra:f,requestId:y,signal:w.signal,abort:T,rejectWithValue:((q,le)=>new pa(q,le)),fulfillWithValue:((q,le)=>new lc(q,le))})).then(q=>{if(q instanceof pa)throw q;return q instanceof lc?n(q.payload,y,l,q.meta):n(q,y,l)})])}catch(N){E=N instanceof pa?s(null,y,l,N.payload,N.meta):s(N,y,l)}finally{C&&w.signal.removeEventListener("abort",C)}return r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition||u(E),E})();return Object.assign(B,{abort:T,requestId:y,arg:l,unwrap(){return B.then(tm)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:n,settled:Yh(s,n),typePrefix:e})}return t.withTypes=()=>t,t})();function tm(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function im(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var fc=Symbol.for("rtk-slice-createasyncthunk"),my={[fc]:em};function rm(t,e){return`${t}/${e}`}function nm({creators:t}={}){let e=t?.asyncThunk?.[fc];return function(r){let{name:n,reducerPath:o=n}=r;if(!n)throw new Error(Yt(11));typeof process<"u";let s=(typeof r.reducers=="function"?r.reducers(sm()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(E,k){let N=typeof E=="string"?E:E.type;if(!N)throw new Error(Yt(12));if(N in l.sliceCaseReducersByType)throw new Error(Yt(13));return l.sliceCaseReducersByType[N]=k,d},addMatcher(E,k){return l.sliceMatchers.push({matcher:E,reducer:k}),d},exposeAction(E,k){return l.actionCreators[E]=k,d},exposeCaseReducer(E,k){return l.sliceCaseReducersByName[E]=k,d}};a.forEach(E=>{let k=s[E],N={reducerName:E,type:rm(n,E),createNotation:typeof r.reducers=="function"};lm(k)?dm(N,k,d,e):am(N,k,d)});function u(){let[E={},k=[],N=void 0]=typeof r.extraReducers=="function"?pc(r.extraReducers):[r.extraReducers],ae={...E,...l.sliceCaseReducersByType};return Gh(r.initialState,q=>{for(let le in ae)q.addCase(le,ae[le]);for(let le of l.sliceMatchers)q.addMatcher(le.matcher,le.reducer);for(let le of k)q.addMatcher(le.matcher,le.reducer);N&&q.addDefaultCase(N)})}let p=E=>E,f=new Map,y=new WeakMap,w;function C(E,k){return w||(w=u()),w(E,k)}function b(){return w||(w=u()),w.getInitialState()}function T(E,k=!1){function N(q){let le=q[E];return typeof le>"u"&&k&&(le=oo(y,N,b)),le}function ae(q=p){let le=oo(f,k,()=>new WeakMap);return oo(le,q,()=>{let jr={};for(let[dt,Ai]of Object.entries(r.selectors??{}))jr[dt]=om(Ai,q,()=>oo(y,q,b),k);return jr})}return{reducerPath:E,getSelectors:ae,get selectors(){return ae(N)},selectSlice:N}}let B={name:n,reducer:C,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,...T(o),injectInto(E,{reducerPath:k,...N}={}){let ae=k??o;return E.inject({reducerPath:ae,reducer:C},N),{...B,...T(ae,!0)}}};return B}}function om(t,e,i,r){function n(o,...s){let a=e(o);return typeof a>"u"&&r&&(a=i()),t(a,...s)}return n.unwrapped=t,n}var hc=nm();function sm(){function t(e,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...i}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...i){return e(...i)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:i}},asyncThunk:t}}function am({type:t,reducerName:e,createNotation:i},r,n){let o,s;if("reducer"in r){if(i&&!cm(r))throw new Error(Yt(17));o=r.reducer,s=r.prepare}else o=r;n.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,s?di(t,s):di(t))}function lm(t){return t._reducerDefinitionType==="asyncThunk"}function cm(t){return t._reducerDefinitionType==="reducerWithPrepare"}function dm({type:t,reducerName:e},i,r,n){if(!n)throw new Error(Yt(18));let{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:d,options:u}=i,p=n(t,o,u);r.exposeAction(e,p),s&&r.addCase(p.fulfilled,s),a&&r.addCase(p.pending,a),l&&r.addCase(p.rejected,l),d&&r.addMatcher(p.settled,d),r.exposeCaseReducer(e,{fulfilled:s||so,pending:a||so,rejected:l||so,settled:d||so})}function so(){}var mc="listener",gc="completed",yc="cancelled",gy=`task-${yc}`,yy=`task-${gc}`,vy=`${mc}-${yc}`,xy=`${mc}-${gc}`;var{assign:vc}=Object;var fa="listenerMiddleware";var um=vc(di(`${fa}/add`),{withTypes:()=>um}),by=di(`${fa}/removeAll`),pm=vc(di(`${fa}/remove`),{withTypes:()=>pm});function Yt(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var fm=Mn(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(i,r,n){this.eventBus.addEventListener(i,r,n)}dispatchEvent(i){return this.eventBus.dispatchEvent(i)}removeEventListener(i,r,n){this.eventBus.removeEventListener(i,r,n)}}}),ao=class extends fm(Object){};window.ftReduxStores||(window.ftReduxStores={});var xc=class t extends ao{static get(e){var i;let r=typeof e=="string"?e:e.name,n=typeof e=="string"?void 0:e,o=window.ftReduxStores[r];if(Vn(o))return o;if(n==null)return;let s=hc({...n,reducers:(i=n.reducers)!==null&&i!==void 0?i:{}}),a=uc({reducer:(l,d)=>{if(d.type==="CLEAR_FT_REDUX_STORE"){let u=qr(s.getInitialState());for(let p of d.keeping)u[p]=(l??u)[p];return u}else if(typeof d.type=="string"&&d.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...d.overwrites};return s.reducer(l,d)}});return window.ftReduxStores[n.name]=new t(s,a,n.eventBus)}constructor(e,i,r){super(),this.reduxSlice=e,this.reduxStore=i,this.isFtReduxStore=!0,this.commands=new Nn,this.injectInto=(o,s)=>this.reduxSlice.injectInto(o,s),this.selectSlice=o=>this.reduxSlice.selectSlice(o);let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,d=o[l];return d?(...u)=>{let p=d(...u.map(n));return this.reduxStore.dispatch(p),p}:u=>{let p=l,f=this.getState()[p];cr(f,u)||this.setState({[p]:n(u)})}}}),this.eventBus=r??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()}get selectors(){return this.reduxSlice.selectors}get reducerPath(){return this.reduxSlice.reducerPath}getSelectors(){return this.reduxSlice.getSelectors()}};var lo=class{static format(e,i,r,n,o){return window.moment?window.moment(e).locale(i).format(this.getMomentDateFormat(r,n,!!o)):this.getIntlDateTime(e,i,r,n,!!o)}static getMomentDateFormat(e,i,r){return r?"LT":e?i?"lll":"ll":i?"L LT":"L"}static getIntlDateTime(e,i,r,n,o){let s=typeof e=="string"?new Date(e):e,a=new Intl.DateTimeFormat(i,{dateStyle:r?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(i,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let e=r=>String(Math.floor(r)).padStart(2,"0"),i=new Date().getTimezoneOffset();return`${i<0?"+":"-"}${e(Math.abs(i)/60)}:${e(Math.abs(i)%60)}`}};var co=c(h()),hm="ft-app-info",wt=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};wt.eventName="authentication-change";var Oi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e})}};Oi.eventName="ui-locale-changed";var mm={session:(t,e)=>{(0,co.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>x.dispatchEvent(new wt(e.payload)),0))}},x=co.FtReduxStore.get({name:hm,reducers:mm,initialState:{baseUrl:void 0,tenantId:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,noCustomCode:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1,stickyFilters:void 0}});var bc=c(h()),uo=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Sc=(0,bc.applyMixinOnce)(Symbol("withDateFormat"),function(t){class e extends t{constructor(...r){super(r),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(x)}dateFormatOptionsChanged(r){return r.has("metadataDescriptors")||r.has("useLongDateFormat")||r.has("useDateTimeFormat")||r.has("uiLocale")}getDateFormatter(r){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===r))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>lo.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return uo([(0,ha.property)({type:Boolean})],e.prototype,"useLongDateFormat",void 0),uo([(0,ha.property)({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),uo([qs({store:x.name,selector:i=>{var r,n;return(n=(r=i.metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),uo([qs({store:x.name})],e.prototype,"uiLocale",void 0),e});var wc;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(wc||(wc={}));var Ec;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Ec||(Ec={}));var _c;(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"})(_c||(_c={}));var Ac;(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"})(Ac||(Ac={}));var Cc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(Cc||(Cc={}));var Tc;(function(t){t.VALUE="VALUE",t.DATE="DATE",t.RANGE="RANGE"})(Tc||(Tc={}));var Rc;(function(t){t.OFFICIAL="OFFICIAL",t.AI="AI"})(Rc||(Rc={}));var Oc;(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"})(Oc||(Oc={}));var kc;(function(t){t.STANDARD="STANDARD",t.STRUCTURAL="STRUCTURAL"})(kc||(kc={}));var Dc;(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"})(Dc||(Dc={}));var Lc;(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"})(Lc||(Lc={}));var Ic;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Ic||(Ic={}));var Pc;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Pc||(Pc={}));var Mc;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Mc||(Mc={}));var _e;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(_e||(_e={}));var Nc;(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"})(Nc||(Nc={}));var $c;(function(t){t.OPTIONAL="OPTIONAL",t.MANDATORY="MANDATORY"})($c||($c={}));var Uc;(function(t){t.ASC="ASC",t.DESC="DESC"})(Uc||(Uc={}));var Fc;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Fc||(Fc={}));var Vc;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(Vc||(Vc={}));var Bc;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK",t.HTML_PACKAGE="HTML_PACKAGE"})(Bc||(Bc={}));var po;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(po||(po={}));var Hc;(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"})(Hc||(Hc={}));var zc;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR"})(zc||(zc={}));var jc;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.HTML_PACKAGE="HTML_PACKAGE",t.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(jc||(jc={}));var Wc;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS",t.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Wc||(Wc={}));var Kc;(function(t){t.PLAIN_TEXT="PLAIN_TEXT",t.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",t.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Kc||(Kc={}));var ie;(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"})(ie||(ie={}));var ut;(function(t){t.SEARCHES="SEARCHES",t.BOOKMARKS="BOOKMARKS",t.BOOKS="BOOKS",t.COLLECTIONS="COLLECTIONS"})(ut||(ut={}));var Gc;(function(t){t.UNAUTHENTICATED="UNAUTHENTICATED",t.USER_INCOMPLETE="USER_INCOMPLETE",t.MFA_REQUIRED="MFA_REQUIRED",t.AUTHENTICATED="AUTHENTICATED"})(Gc||(Gc={}));var qc;(function(t){t.UNREACHABLE="UNREACHABLE",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.INCOMPATIBLE="INCOMPATIBLE",t.FAILED="FAILED",t.OK="OK"})(qc||(qc={}));var Yc;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Yc||(Yc={}));var Zc;(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"})(Zc||(Zc={}));var Xc;(function(t){t.INACCURATE="INACCURATE",t.INCOMPLETE="INCOMPLETE",t.OFF_TOPIC="OFF_TOPIC",t.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",t.SLOW="SLOW",t.OTHER="OTHER"})(Xc||(Xc={}));var Jc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Jc||(Jc={}));var Qc;(function(t){t.JSON="JSON",t.TEXT="TEXT"})(Qc||(Qc={}));var ed;(function(t){t.TEXT="TEXT",t.HTML="HTML"})(ed||(ed={}));var td;(function(t){t.IN_PROGRESS="IN_PROGRESS",t.ERROR="ERROR",t.DONE="DONE"})(td||(td={}));var id;(function(t){t.HTML="HTML",t.MARKDOWN="MARKDOWN"})(id||(id={}));var rd;(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"})(rd||(rd={}));var fo;(function(t){t.MAP="MAP",t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(fo||(fo={}));var gm={[ie.PERSONAL_BOOK_SHARE_USER]:[ie.PERSONAL_BOOK_USER],[ie.HTML_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.PDF_EXPORT_USER]:[ie.PERSONAL_BOOK_USER],[ie.KHUB_ADMIN]:[ie.CONTENT_PUBLISHER],[ie.ADMIN]:[ie.KHUB_ADMIN,ie.USERS_ADMIN,ie.PORTAL_ADMIN,ie.BEHAVIOR_DATA_USER],[ie.GENERATIVE_AI_EXPORT_USER]:[ie.GENERATIVE_AI_USER]};function nd(t,e){return t===e||(gm[t]??[]).some(i=>nd(i,e))}function nn(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(r=>nd(r,e))}var vo=c(h());var ma=c(h());var Ft=class t{static get(e){let{baseUrl:i,apiIntegrationIdentifier:r}=x.getState(),n=e??r;if(i&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,n,!0)}static await(e){return new Promise(i=>{let r=t.get(e);if(r)i(r);else{let n=x.subscribe(()=>{r=t.get(e),r&&(n(),i(r))})}})}};var hr=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Ft.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Ft.await()}};var Re=class extends hr{constructor(e=!0,i){var r;super(i),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(r=n.commonCache)!==null&&r!==void 0?r:new ma.CacheRegistry,this.cache=e?n.commonCache:new ma.CacheRegistry}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((i,r)=>0|31*i+r.charCodeAt(0),0))}};var ho=class extends Re{async listMySearches(){let{session:e}=x.getState();return nn(e,ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}};var mo=class extends Re{async listMyBookmarks(){let e=x.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}};var go=class extends Re{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}};var yo=class extends Re{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}};var ym="ft-user-assets",vm={setAssetCount:(t,e)=>{let{userAssetType:i,count:r}=e.payload.assetCount;t.assetCounts.allAsset[i]=r},clearAssetCount:t=>{Object.values(ut).forEach(e=>{t.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(t,e)=>{let i=e.payload.mapId;t.assetCounts.bookmarkByMap[i]=e.payload.count},clearBookmarkCountByMap:t=>{t.assetCounts.bookmarkByMap={}},addAsset:(t,e)=>{let{assetType:i,mapId:r,asset:n}=e.payload;ya(t,i,[...ga(t,i),n]),od(t,i,1,r),sd(t,n)},editAsset:(t,e)=>{let{assetType:i,asset:r}=e.payload;ya(t,i,ga(t,i).map(n=>n.id===r.id?r:n)),sd(t,r)},removeAsset:(t,e)=>{let{assetType:i,mapId:r,assetId:n}=e.payload;ya(t,i,ga(t,i).filter(o=>o.id!==n)),od(t,i,-1,r)}},ad={[ut.SEARCHES]:"savedSearches",[ut.BOOKMARKS]:"bookmarks",[ut.BOOKS]:void 0,[ut.COLLECTIONS]:void 0},ga=(t,e)=>{var i;let r=ad[e];return r?(i=t[r])!==null&&i!==void 0?i:[]:[]},ya=(t,e,i)=>{let r=ad[e];r&&(t[r]=i)},od=(t,e,i,r)=>{let n=t.assetCounts.allAsset[e];if(n!==void 0&&(t.assetCounts.allAsset[e]=Math.max(0,n+i),e===ut.BOOKMARKS&&r)){let o=t.assetCounts.bookmarkByMap[r];t.assetCounts.bookmarkByMap[r]=Math.max(0,o+i)}},sd=(t,e)=>{let i=t.assetLabels.map(n=>n.title),r=e.labels.filter(n=>!i.includes(n)).map(n=>({title:n}));t.assetLabels.push(...r)},Ue=vo.FtReduxStore.get({name:ym,reducers:vm,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(ut).map(t=>[t,void 0])),bookmarkByMap:{}},assetLabels:[]}}),va=class{constructor(e=new go,i=new yo){this.assetCountsService=e,this.assetLabelsService=i,this.currentSession=x.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new mo,this.savedSearchesService=new ho,x.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:i}=x.getState();(0,vo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,i?.profile)||(this.currentSession=i,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 e=await this.savedSearchesService.listMySearches();Ue.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();Ue.actions.assetLabels(e)}async loadAssetCount(e){let i=await this.assetCountsService.getUserAssetCount(e);i&&Ue.getState().assetCounts.allAsset[e]!==i.count&&Ue.actions.setAssetCount({assetCount:i})}async loadBookmarkByMapId(e){let i=await this.assetCountsService.getUserBookmarkCountByMap(e);i&&Ue.getState().assetCounts.bookmarkByMap[e]!==i.count&&Ue.actions.setBookmarkCountByMap({count:i.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let i=Object.keys(Ue.getState().assetCounts.bookmarkByMap).length!==0;e===ut.BOOKMARKS&&i&&Ue.actions.clearBookmarkCountByMap(),Ue.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let i=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ue.actions.bookmarks(i)}}},xm=new va;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=xm);var xa=class{addCommand(e,i=!1){x.commands.add(e,i)}consumeCommand(e){return x.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new xa;var pt=c(h());var ld,mr=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},bm=Symbol("clearAfterUnitTest"),xo=class extends(0,pt.withEventBus)(Re){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ld]=()=>{this.defaultMessages={},this.cache=new pt.CacheRegistry,this.listeners={}},this.currentUiLocale=x.getState().uiLocale,x.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=x.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let i=e.name.toLowerCase();this.cache.setFinal(i,e),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,i){var r;if(e=e.toLowerCase(),i&&Object.keys(i).length>0){let n={...(r=this.defaultMessages[e])!==null&&r!==void 0?r:{},...i};(0,pt.deepEqual)(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var i,r;return this.fetchContext(e),(r=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&r!==void 0?r:{}}resolveRawMessage(e,i){let r=e.toLowerCase();return this.resolveContext(r)[i]}resolveMessage(e,i,...r){var n;let o=e.toLowerCase(),s=this.resolveContext(o);return new pt.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(i,...r)}async fetchContext(e){let i=!this.cache.has(e),r;try{r=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),i&&await this.notify(e)}catch(n){!(n instanceof pt.CanceledPromiseError)&&i&&console.error(n)}return r}subscribe(e,i){var r;return e=e.toLowerCase(),this.listeners[e]=(r=this.listeners[e])!==null&&r!==void 0?r:new Set,this.listeners[e].add(i),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(i)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new mr({loadedContexts:e})),this.dispatchEvent(new mr({loadedContexts:e})),await Promise.all(e.map(i=>this.notify(i,!1)))}async notify(e,i=!0){i&&(document.body.dispatchEvent(new mr({loadedContexts:[e]})),this.dispatchEvent(new mr({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(r=>(0,pt.delay)(0).then(()=>r()).catch(()=>null)))}};ld=bm;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends xo{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends xo{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var gr=window.FluidTopicsI18nService,bo=window.FluidTopicsCustomI18nService;var cd=c(h()),ba=class{highlightHtml(e,i,r){(0,cd.highlightHtml)(e,i,r)}};window.FluidTopicsHighlightHtmlService=new ba;var dd=c(h());var Sa=class{isDate(e){var i,r,n,o;return(o=(n=((r=(i=x.getState().metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&r!==void 0?r:[]).find(a=>a.key===e))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(e,i){var r,n,o,s;if(e==null)return"";try{return dd.DateFormatter.format(e,(r=i?.locale)!==null&&r!==void 0?r:x.getState().uiLocale,(n=i?.longFormat)!==null&&n!==void 0?n:!1,(o=i?.withTime)!==null&&o!==void 0?o:!1,(s=i?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(e)} is not valid`,a),a}}};window.FluidTopicsDateService=new Sa;var ud=c(h());var on=class{static get(e,i){var r,n,o,s;let a=x.getState(),{lang:l,region:d}=(o=(n=(r=a.localesConfiguration)===null||r===void 0?void 0:r.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new ud.SearchPlaceConverter(a.baseUrl,e??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,i??`${l}-${d}`)}};var wa=class{urlToSearchRequest(e){return on.get().parse(e)}searchRequestToUrl(e){return on.get().serialize(e)}};window.FluidTopicsUrlService=new wa;var Zt=c(h());var ki=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{nextLocation:e}})}};ki.eventName="before-location-change";var Di=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:{currentItem:e}})}};Di.eventName="change";var Ea=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let i=sessionStorage.getItem(this.itemName(e));return i?JSON.parse(i):void 0}set(e,i){sessionStorage.setItem(this.itemName(e),JSON.stringify(i))}},pd=new Ea;var So=class t extends Zt.WithEventBus{static build(){return new t(window.history,pd,()=>window.location,!1)}constructor(e,i,r,n){var o,s;super(),this.history=e,this.historyStorage=i,this.windowLocation=r,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(o=e.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,i=!1){let r=i&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,r&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Zt.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,this.windowLocation().href]),setTimeout(()=>this.dispatchEvent(new Di(this.currentItem())),0)}installProxies(){let e=i=>(r,n,[o,s,a])=>{let l=new ki(new URL(typeof a=="string"?a:(a??this.windowLocation()).href,window.location.origin));this.dispatchEvent(l);let d=i(),u={...d===this.currentIndex?this.currentState:void 0,...o,index:d,href:l.detail.nextLocation.href};r.apply(n,[u,s,u.href]),this.setCurrentState(u,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let i=this.history.length-1;i>=0;i--)e?this.states[i]=this.historyStorage.get(i):setTimeout(()=>this.states[i]=this.historyStorage.get(i),this.history.length-i)}updateCurrentState(e){var i;let r={...this.buildCurrentState(),...e,index:this.currentIndex,title:(i=e?.title)!==null&&i!==void 0?i:this.currentState.title};this.setCurrentState(r)}addBeforeLocationChangeListener(e){this.addEventListener(ki.eventName,e)}removeBeforeLocationChangeListener(e){this.removeEventListener(ki.eventName,e)}addHistoryChangeListener(e){this.addEventListener(Di.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(Di.eventName,e)}currentItem(){return(0,Zt.deepCopy)(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Zt.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let i=this.states.filter(r=>!!r).filter(r=>r.index<this.currentIndex).reverse();return(0,Zt.deepCopy)(i.find(r=>e(r)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return(0,Zt.deepCopy)(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var i;let r=(i=this.states[e])===null||i===void 0?void 0:i.majorStateId;if(!r)return e;let n=e,o=e+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,r);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var e,i;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(i=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&i!==void 0?i:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,i){var r;if(!this.hasState(e))return!1;let n=i??this.currentState.majorStateId,o=(r=this.states[e])===null||r===void 0?void 0:r.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=So.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:t=>window.FluidTopicsInternalHistoryService.backwardItemMatching(t),addHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(t),removeHistoryChangeListener:t=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(t),addBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.addBeforeLocationChangeListener(t),removeBeforeLocationChangeListener:t=>window.FluidTopicsInternalHistoryService.removeBeforeLocationChangeListener(t)});var wo=class{constructor(){this.storeListeners=[]}store(e,i){if(this.isAuthenticated())return;let r=JSON.stringify(i);window.localStorage.setItem(e,r),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:r,storageArea:window.localStorage}))}get(e){var i,r;if(!this.isAuthenticated())return(r=JSON.parse((i=window.localStorage.getItem(e))!==null&&i!==void 0?i:"null"))!==null&&r!==void 0?r:void 0}addStoreListener(e,i){let r=n=>{n.key===e()&&!this.isAuthenticated()&&i()};this.storeListeners.push(r),window.addEventListener("storage",r)}clearStoreListeners(){this.storeListeners.forEach(e=>window.removeEventListener("storage",e)),this.storeListeners.length=0}isAuthenticated(){let e=x.getState().session;return!!e?.sessionAuthenticated}};var fd=c(S());var hd=fd.css`
2
2
  `;var gd=c(S()),Fe=c(U()),Ii=c(h());var Li=c(h());function md(t,e){let{authenticationRequired:i,session:r}=x.getState();return i&&!r?.sessionAuthenticated?Promise.resolve(e):t()}var Eo=class extends hr{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}};var _a=class t extends Li.FtStateManager{static build(e){return new t(x,e)}constructor(e,i){super(),this.store=e,this.cache=new Li.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new Eo,this.cleanSessionDebouncer=new Li.Debouncer,this.reloadConfiguration=()=>{var r;(r=this.cache)===null||r===void 0||r.clear("availableContentLocales"),this.updateAvailableContentLocales()},this.reloadDebouncer=new Li.Debouncer(500),this.apiProvider=i??(()=>Ft.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}addListeners(){this.store.addEventListener(wt.eventName,this.reloadConfiguration)}removeListeners(){this.store.removeEventListener(wt.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let i=await this.apiProvider().getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},i.idleTimeoutInMillis),i});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let i=await this.cache.get("availableContentLocales",()=>md(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=i.contentLocales)!==null&&e!==void 0?e:[])}setStickyFilters(e){this.store.actions.stickyFilters(e)}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setTenantId(e){this.store.actions.tenantId(e)}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e,i){this.userLocaleService.updateUiLocale({uiLocale:e,contentLocale:i}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new Oi(r)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setNoCustomCode(e){this.store.actions.noCustomCode(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},yr=_a.build();var Ae=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},X=class extends Ii.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.noCustomCode=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=yr,this.contextRoot=new Wr}render(){return gd.html`
3
3
  <slot></slot>
4
4
  `}connectedCallback(){super.connectedCallback(),this.stateManager.addListeners(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeListeners(),this.contextRoot.detach(document.body)}update(e){var i;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("noCustomCode")&&this.stateManager.setNoCustomCode(this.noCustomCode),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(r=>gr.addContext(r)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((i=this.stateManager)===null||i===void 0||i.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};X.elementDefinitions={};X.styles=hd;Ae([(0,Fe.property)()],X.prototype,"baseUrl",void 0);Ae([(0,Fe.property)()],X.prototype,"tenantId",void 0);Ae([(0,Fe.property)()],X.prototype,"apiIntegrationIdentifier",void 0);Ae([(0,Fe.property)()],X.prototype,"apiIntegrationAppVersion",void 0);Ae([(0,Fe.property)()],X.prototype,"uiLocale",void 0);Ae([(0,Ii.jsonProperty)(null)],X.prototype,"availableUiLocales",void 0);Ae([(0,Ii.jsonProperty)(null)],X.prototype,"metadataConfiguration",void 0);Ae([(0,Fe.property)({type:Boolean})],X.prototype,"editorMode",void 0);Ae([(0,Fe.property)({type:Boolean})],X.prototype,"noCustom",void 0);Ae([(0,Fe.property)({type:Boolean})],X.prototype,"openExternalDocumentInNewTab",void 0);Ae([(0,Fe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],X.prototype,"noCustomComponent",void 0);Ae([(0,Fe.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],X.prototype,"noCustomCode",void 0);Ae([(0,Fe.property)({type:Boolean})],X.prototype,"withManualResources",void 0);Ae([(0,Fe.property)({type:Boolean})],X.prototype,"navigatorOnline",void 0);Ae([(0,Fe.property)({type:Boolean})],X.prototype,"forcedOffline",void 0);Ae([(0,Fe.property)({type:Boolean})],X.prototype,"authenticationRequired",void 0);Ae([(0,Ii.jsonProperty)([])],X.prototype,"messageContexts",void 0);Ae([(0,Ii.jsonProperty)(void 0)],X.prototype,"session",void 0);var vd=c(h());var yd={"ft-app-context":X};(0,vd.customElements)(yd);var bd=c(h()),ui;(function(t){t.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",t.MAP_ATTACHMENT="MAP_ATTACHMENT",t.UD_ATTACHMENT="UD_ATTACHMENT",t.RESOURCE="RESOURCE"})(ui||(ui={}));var xd;(function(t){t.FIT_TO_CONTAINER="fit-to-container",t.ZOOM_REAL_SIZE="zoom-real-size",t.ZOOM_IN="zoom-in",t.ZOOM_OUT="zoom-out",t.ROTATE_LEFT="rotate-left",t.ROTATE_RIGHT="rotate-right"})(xd||(xd={}));var Pi=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:(0,bd.deepCopy)(e),composed:!0,bubbles:!0})}};Pi.eventName="ft-viewer-loaded";var _o=class t extends Event{constructor(){super(t.eventName,{composed:!0,bubbles:!0})}};_o.eventName="ft-viewer-not-found";var Ao=class t extends Event{constructor(){super(t.eventName,{composed:!0,bubbles:!0})}};Ao.eventName="ft-viewer-unauthorized";var Co=class t extends Event{constructor(){super(t.eventName,{composed:!0,bubbles:!0})}};Co.eventName="ft-viewer-forbidden";var To=class t extends CustomEvent{constructor(e){super(t.eventName,{detail:e,composed:!0,bubbles:!0})}};To.eventName="ft-viewer-load-error";function Ro(t,e){let i=e;i.status===401?t.dispatchEvent(new Ao):i.status===403?t.dispatchEvent(new Co):i.status===404?t.dispatchEvent(new _o):t.dispatchEvent(new To(e))}var Oo=class extends Re{getAsset(e,i,r){let n={[ui.MAP_ATTACHMENT]:()=>this.api.getMapAttachment(e,i),[ui.UD_ATTACHMENT]:()=>this.api.getUdAttachment(e,i),[ui.RESOURCE]:()=>this.api.getMapResource(e,i)};return this.cache.get(i,n[r])}};var ko=class t extends lr{static build(e){return new t(Pn(e),new Oo)}constructor(e,i){super(e),this.store=e,this.service=i}async load(){let{documentId:e,assetId:i,origin:r}=this.store.getState();if(e&&i&&r){let n=await this.service.getAsset(e,i,r);this.store.actions.document(n.holder),this.store.actions.descriptor({id:n.id,portalUrl:n.portalUrl,filename:n.filename,fingerprint:n.fingerprint,displayName:n.displayName,alt:n.displayName,mimeType:n.mimeType,size:n.size,viewableInCurrentBrowser:n.viewableInCurrentBrowser,contentUrl:n.contentUrl}),this.store.actions.watermark(n.watermark)}}clear(){this.store.clearKeeping("documentId","assetId","origin")}reload(){return this.clear(),this.load()}async init(e,i,r){return this.store.actions.documentId(e),this.store.actions.assetId(i),this.store.actions.origin(r),await this.reload(),this.store.getState()}};var Do=c(U());var sn=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},Xt=class extends vr.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=ko.build(this.id||(0,vr.randomId)(6))}render(){return Sd.html`
@@ -561,7 +561,7 @@
561
561
  position: relative;
562
562
  word-break: break-word;
563
563
  }
564
- `;var np=["top","right","bottom","left"],rp=["start","end"],Ya=np.reduce((t,e)=>t.concat(e,e+"-"+rp[0],e+"-"+rp[1]),[]),bn=Math.min,xi=Math.max,Sn=Math.round;var Vt=t=>({x:t,y:t}),Pm={left:"right",right:"left",bottom:"top",top:"bottom"};function op(t,e,i){return xi(t,bn(e,i))}function ps(t,e){return typeof t=="function"?t(e):t}function wn(t){return t.split("-")[0]}function bi(t){return t.split("-")[1]}function Za(t){return t==="x"?"y":"x"}function Xa(t){return t==="y"?"height":"width"}function fs(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ja(t){return Za(fs(t))}function sp(t,e,i){i===void 0&&(i=!1);let r=bi(t),n=Ja(t),o=Xa(n),s=n==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=qa(s)),[s,qa(s)]}function ap(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function qa(t){let e=wn(t);return Pm[e]+t.slice(e.length)}function Mm(t){var e,i,r,n;return{top:(e=t.top)!=null?e:0,right:(i=t.right)!=null?i:0,bottom:(r=t.bottom)!=null?r:0,left:(n=t.left)!=null?n:0}}function lp(t){return typeof t!="number"?Mm(t):{top:t,right:t,bottom:t,left:t}}function Zi(t){let{x:e,y:i,width:r,height:n}=t;return{width:r,height:n,top:i,left:e,right:e+r,bottom:i+n,x:e,y:i}}function cp(t,e,i){let{reference:r,floating:n}=t,o=fs(e),s=Ja(e),a=Xa(s),l=wn(e),d=o==="y",u=r.x+r.width/2-n.width/2,p=r.y+r.height/2-n.height/2,f=r[a]/2-n[a]/2,y;switch(l){case"top":y={x:u,y:r.y-n.height};break;case"bottom":y={x:u,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-n.width,y:p};break;default:y={x:r.x,y:r.y}}let w=bi(e);return w&&(y[s]+=f*(w==="end"?1:-1)*(i&&d?-1:1)),y}async function dp(t,e){var i;e===void 0&&(e={});let{x:r,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:y=0}=ps(e,t),w=lp(y),b=a[f?p==="floating"?"reference":"floating":p],R=Zi(await o.getClippingRect({element:(i=await(o.isElement==null?void 0:o.isElement(b)))==null||i?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),B=p==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),D=await(o.isElement==null?void 0:o.isElement(E))&&await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1},N=Zi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:B,offsetParent:E,strategy:l}):B);return{top:(R.top-N.top+w.top)/D.y,bottom:(N.bottom-R.bottom+w.bottom)/D.y,left:(R.left-N.left+w.left)/D.x,right:(N.right-R.right+w.right)/D.x}}var Nm=50,up=async(t,e,i)=>{let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:s}=i,a=s.detectOverflow?s:{...s,detectOverflow:dp},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:p}=cp(d,r,l),f=r,y=0,w={};for(let T=0;T<o.length;T++){let b=o[T];if(!b)continue;let{name:R,fn:B}=b,{x:E,y:D,data:N,reset:ae}=await B({x:u,y:p,initialPlacement:r,placement:f,strategy:n,middlewareData:w,rects:d,platform:a,elements:{reference:t,floating:e}});u=E??u,p=D??p,w[R]={...w[R],...N},ae&&y<Nm&&(y++,typeof ae=="object"&&(ae.placement&&(f=ae.placement),ae.rects&&(d=ae.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):ae.rects),{x:u,y:p}=cp(d,f,l)),T=-1)}return{x:u,y:p,placement:f,strategy:n,middlewareData:w}};function $m(t,e,i){return(t?[...i.filter(n=>bi(n)===t),...i.filter(n=>bi(n)!==t)]:i.filter(n=>wn(n)===n)).filter(n=>t?bi(n)===t||(e?ap(n)!==n:!1):!0)}var pp=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,r,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:d}=e,{crossAxis:u=!1,alignment:p,allowedPlacements:f=Ya,autoAlignment:y=!0,...w}=ps(t,e),T=p!==void 0||f===Ya?$m(p||null,y,f):f,b=((i=s.autoPlacement)==null?void 0:i.index)||0,R=T[b];if(R==null)return{};if(a!==R)return{reset:{placement:T[0]}};let B=await l.detectOverflow(e,w),E=sp(R,o,await(l.isRTL==null?void 0:l.isRTL(d.floating))),D=[B[wn(R)],B[E[0]],B[E[1]]],N=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:R,overflows:D}],ae=T[b+1];if(ae)return{data:{index:b+1,overflows:N},reset:{placement:ae}};let q=N.map(dt=>{let Ai=bi(dt.placement);return[dt.placement,Ai&&u?dt.overflows.slice(0,2).reduce((sh,ah)=>sh+ah,0):dt.overflows[0],dt.overflows]}).sort((dt,Ai)=>dt[1]-Ai[1]),jr=((n=q.filter(dt=>dt[2].slice(0,bi(dt[0])?2:3).every(Ai=>Ai<=0))[0])==null?void 0:n[0])||q[0][0];return jr!==a?{data:{index:b+1,overflows:N},reset:{placement:jr}}:{}}}};var fp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:i,y:r,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:B=>{let{x:E,y:D}=B;return{x:E,y:D}}},...d}=ps(t,e),u={x:i,y:r},p=await o.detectOverflow(e,d),f=fs(n),y=Za(f),w=u[y],T=u[f],b=(B,E)=>op(E+p[B==="y"?"top":"left"],E,E-p[B==="y"?"bottom":"right"]);s&&(w=b(y,w)),a&&(T=b(f,T));let R=l.fn({...e,[y]:w,[f]:T});return{...R,data:{x:R.x-i,y:R.y-r,enabled:{[y]:s,[f]:a}}}}}};function ms(){return typeof window<"u"}function Ji(t){return mp(t)?(t.nodeName||"").toLowerCase():"#document"}function Ze(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function oi(t){var e;return(e=(mp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function mp(t){return ms()?t instanceof Node||t instanceof Ze(t).Node:!1}function Rt(t){return ms()?t instanceof Element||t instanceof Ze(t).Element:!1}function si(t){return ms()?t instanceof HTMLElement||t instanceof Ze(t).HTMLElement:!1}function hp(t){return!ms()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ze(t).ShadowRoot}function En(t){let{overflow:e,overflowX:i,overflowY:r,display:n}=Ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+i)&&n!=="inline"&&n!=="contents"}function gp(t){return/^(table|td|th)$/.test(Ji(t))}function _n(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Um=/transform|translate|scale|rotate|perspective|filter/,Fm=/paint|layout|strict|content/,Xi=t=>!!t&&t!=="none",Qa;function Ir(t){let e=Rt(t)?Ot(t):t;return Xi(e.transform)||Xi(e.translate)||Xi(e.scale)||Xi(e.rotate)||Xi(e.perspective)||!gs()&&(Xi(e.backdropFilter)||Xi(e.filter))||Um.test(e.willChange||"")||Fm.test(e.contain||"")}function yp(t){let e=Si(t);for(;si(e)&&!Pr(e);){if(Ir(e))return e;if(_n(e))return null;e=Si(e)}return null}function gs(){return Qa==null&&(Qa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qa}function Pr(t){return/^(html|body|#document)$/.test(Ji(t))}function Ot(t){return Ze(t).getComputedStyle(t)}function An(t){return Rt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Si(t){if(Ji(t)==="html")return t;let e=t.assignedSlot||t.parentNode||hp(t)&&t.host||oi(t);return hp(e)?e.host:e}function vp(t){let e=Si(t);return Pr(e)?(t.ownerDocument||t).body:si(e)&&En(e)?e:vp(e)}function hs(t,e,i){var r;e===void 0&&(e=[]),i===void 0&&(i=!0);let n=vp(t),o=n===((r=t.ownerDocument)==null?void 0:r.body),s=Ze(n);if(o){let a=ys(s);return e.concat(s,s.visualViewport||[],En(n)?n:[],a&&i?hs(a):[])}else return e.concat(n,hs(n,[],i))}function ys(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Sp(t){let e=Ot(t),i=parseFloat(e.width)||0,r=parseFloat(e.height)||0,n=si(t),o=n?t.offsetWidth:i,s=n?t.offsetHeight:r,a=Sn(i)!==o||Sn(r)!==s;return a&&(i=o,r=s),{width:i,height:r,$:a}}function wp(t){return Rt(t)?t:t.contextElement}function Mr(t){let e=wp(t);if(!si(e))return Vt(1);let i=e.getBoundingClientRect(),{width:r,height:n,$:o}=Sp(e),s=(o?Sn(i.width):i.width)/r,a=(o?Sn(i.height):i.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Vm=Vt(0);function Ep(t){let e=Ze(t);return!gs()||!e.visualViewport?Vm:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Bm(t,e,i){return e===void 0&&(e=!1),!!i&&e&&i===Ze(t)}function Cn(t,e,i,r){e===void 0&&(e=!1),i===void 0&&(i=!1);let n=t.getBoundingClientRect(),o=wp(t),s=Vt(1);e&&(r?Rt(r)&&(s=Mr(r)):s=Mr(t));let a=Bm(o,i,r)?Ep(o):Vt(0),l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,u=n.width/s.x,p=n.height/s.y;if(o&&r){let f=Ze(o),y=Rt(r)?Ze(r):r,w=f,T=ys(w);for(;T&&y!==w;){let b=Mr(T),R=T.getBoundingClientRect(),B=Ot(T),E=R.left+(T.clientLeft+parseFloat(B.paddingLeft))*b.x,D=R.top+(T.clientTop+parseFloat(B.paddingTop))*b.y;l*=b.x,d*=b.y,u*=b.x,p*=b.y,l+=E,d+=D,w=Ze(T),T=ys(w)}}return Zi({width:u,height:p,x:l,y:d})}function vs(t,e){let i=An(t).scrollLeft;return e?e.left+i:Cn(oi(t)).left+i}function _p(t,e){let i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-vs(t,i),n=i.top+e.scrollTop;return{x:r,y:n}}function Hm(t){let{elements:e,rect:i,offsetParent:r,strategy:n}=t,o=n==="fixed",s=oi(r),a=e?_n(e.floating):!1;if(r===s||a&&o)return i;let l={scrollLeft:0,scrollTop:0},d=Vt(1),u=Vt(0),p=si(r);if((p||!o)&&((Ji(r)!=="body"||En(s))&&(l=An(r)),p)){let y=Cn(r);d=Mr(r),u.x=y.x+r.clientLeft,u.y=y.y+r.clientTop}let f=s&&!p&&!o?_p(s,l):Vt(0);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:i.y*d.y-l.scrollTop*d.y+u.y+f.y}}function zm(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function jm(t){let e=An(t),i=t.ownerDocument.body,r=xi(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),n=xi(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),o=-e.scrollLeft+vs(t),s=-e.scrollTop;return Ot(i).direction==="rtl"&&(o+=xi(t.clientWidth,i.clientWidth)-r),{width:r,height:n,x:o,y:s}}var Wm=25;function Km(t,e,i){i===void 0&&(i="viewport");let r=i==="layoutViewport",n=Ze(t),o=oi(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,d=0,u=0;if(s){let f=!gs()||e==="fixed";r?f||(d=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,f&&(d=s.offsetLeft,u=s.offsetTop))}if(vs(o)<=0){let f=o.ownerDocument,y=f.body,w=getComputedStyle(y),T=f.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,b=Math.abs(o.clientWidth-y.clientWidth-T),R=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;R<=Wm&&(a-=R)}return{width:a,height:l,x:d,y:u}}function Gm(t,e){let i=Cn(t,!0,e==="fixed"),r=i.top+t.clientTop,n=i.left+t.clientLeft,o=Mr(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,d=r*o.y;return{width:s,height:a,x:l,y:d}}function xp(t,e,i){let r;if(e==="viewport"||e==="layoutViewport")r=Km(t,i,e);else if(e==="document")r=jm(oi(t));else if(Rt(e))r=Gm(e,i);else{let n=Ep(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Zi(r)}function qm(t,e){let i=e.get(t);if(i)return i;let r=hs(t,[],!1).filter(a=>Rt(a)&&Ji(a)!=="body"),n=null,o=Ot(t).position==="fixed",s=o?Si(t):t;for(;Rt(s)&&!Pr(s);){let a=Ot(s),l=Ir(s),d=n?n.position:o?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?r=r.filter(p=>p!==s):n=a,s=Si(s)}return e.set(t,r),r}function Ym(t){let{element:e,boundary:i,rootBoundary:r,strategy:n}=t,s=[...i==="clippingAncestors"?_n(e)?[]:qm(e,this._c):[].concat(i),r],a=xp(e,s[0],n),l=a.top,d=a.right,u=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let y=xp(e,s[f],n);l=xi(y.top,l),d=bn(y.right,d),u=bn(y.bottom,u),p=xi(y.left,p)}return{width:d-p,height:u-l,x:p,y:l}}function Zm(t){let{width:e,height:i}=Sp(t);return{width:e,height:i}}function Xm(t,e,i){let r=si(e),n=oi(e),o=i==="fixed",s=Cn(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Vt(0);if((r||!o)&&((Ji(e)!=="body"||En(n))&&(a=An(e)),r)){let f=Cn(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}!r&&n&&(l.x=vs(n));let d=n&&!r&&!o?_p(n,a):Vt(0),u=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:u,y:p,width:s.width,height:s.height}}function el(t){return Ot(t).position==="static"}function bp(t,e){if(!si(t)||Ot(t).position==="fixed")return null;if(e)return e(t);let i=t.offsetParent;return oi(t)===i&&(i=i.ownerDocument.body),i}function Ap(t,e){let i=Ze(t);if(_n(t))return i;if(!si(t)){let n=Si(t);for(;n&&!Pr(n);){if(Rt(n)&&!el(n))return n;n=Si(n)}return i}let r=bp(t,e);for(;r&&gp(r)&&el(r);)r=bp(r,e);return r&&Pr(r)&&el(r)&&!Ir(r)?i:r||yp(t)||i}var Jm=async function(t){let e=this.getOffsetParent||Ap,i=this.getDimensions,r=await i(t.floating);return{reference:Xm(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qm(t){return Ot(t).direction==="rtl"}var xs={convertOffsetParentRelativeRectToViewportRelativeRect:Hm,getDocumentElement:oi,getClippingRect:Ym,getOffsetParent:Ap,getElementRects:Jm,getClientRects:zm,getDimensions:Zm,getScale:Mr,isElement:Rt,isRTL:Qm};var Cp=pp,Tp=fp;var Rp=(t,e,i)=>{let r=new Map,n=i??{},o={...xs,...n.platform,_c:r};return up(t,e,{...n,platform:o})};function Op(t){return eg(t)}function tl(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function eg(t){for(let e=t;e;e=tl(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=tl(t);e;e=tl(e)){if(!(e instanceof Element))continue;let i=getComputedStyle(e);if(i.display!=="contents"&&(i.position!=="static"||Ir(i)||e.tagName==="BODY"))return e}return null}async function bs(t,e,i){let r;return typeof i=="object"?r=i:r={placement:i},Rp(t,e,{strategy:r.strategy,platform:{...xs,getOffsetParent:n=>xs.getOffsetParent(n,Op)},middleware:[Tp({crossAxis:!0}),Cp({allowedPlacements:[r.placement]})]})}var kp=c(h());var il=class{fromAttribute(e){if(!e)return[];try{let i=JSON.parse(e);return Array.isArray(i)?i.map(r=>typeof r=="string"?Cr.fromAttribute(r):r):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},tg=new il;var Dp=(t,e)=>(i,r)=>{var n;i.constructor.createProperty(r,{type:Object,hasChanged:kp.hasChanged,converter:Cr,...e}),i[mn]=(n=i[mn])!==null&&n!==void 0?n:new Map,i[mn].set(r,t??{})};var kt=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},re=class extends Qo{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new yt.Debouncer,this.revealDebouncer=new yt.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",i=>{i.composedPath().includes(this.container)||this.onOut(i)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,i;return Lp.html`
564
+ `;var np=["top","right","bottom","left"],rp=["start","end"],Ya=np.reduce((t,e)=>t.concat(e,e+"-"+rp[0],e+"-"+rp[1]),[]),bn=Math.min,xi=Math.max,Sn=Math.round;var Vt=t=>({x:t,y:t}),Pm={left:"right",right:"left",bottom:"top",top:"bottom"};function op(t,e,i){return xi(t,bn(e,i))}function ps(t,e){return typeof t=="function"?t(e):t}function wn(t){return t.split("-")[0]}function bi(t){return t.split("-")[1]}function Za(t){return t==="x"?"y":"x"}function Xa(t){return t==="y"?"height":"width"}function fs(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function Ja(t){return Za(fs(t))}function sp(t,e,i){i===void 0&&(i=!1);let r=bi(t),n=Ja(t),o=Xa(n),s=n==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=qa(s)),[s,qa(s)]}function ap(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}function qa(t){let e=wn(t);return Pm[e]+t.slice(e.length)}function Mm(t){var e,i,r,n;return{top:(e=t.top)!=null?e:0,right:(i=t.right)!=null?i:0,bottom:(r=t.bottom)!=null?r:0,left:(n=t.left)!=null?n:0}}function lp(t){return typeof t!="number"?Mm(t):{top:t,right:t,bottom:t,left:t}}function Zi(t){let{x:e,y:i,width:r,height:n}=t;return{width:r,height:n,top:i,left:e,right:e+r,bottom:i+n,x:e,y:i}}function cp(t,e,i){let{reference:r,floating:n}=t,o=fs(e),s=Ja(e),a=Xa(s),l=wn(e),d=o==="y",u=r.x+r.width/2-n.width/2,p=r.y+r.height/2-n.height/2,f=r[a]/2-n[a]/2,y;switch(l){case"top":y={x:u,y:r.y-n.height};break;case"bottom":y={x:u,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-n.width,y:p};break;default:y={x:r.x,y:r.y}}let w=bi(e);return w&&(y[s]+=f*(w==="end"?1:-1)*(i&&d?-1:1)),y}async function dp(t,e){var i;e===void 0&&(e={});let{x:r,y:n,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:y=0}=ps(e,t),w=lp(y),b=a[f?p==="floating"?"reference":"floating":p],T=Zi(await o.getClippingRect({element:(i=await(o.isElement==null?void 0:o.isElement(b)))==null||i?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),B=p==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),k=await(o.isElement==null?void 0:o.isElement(E))&&await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1},N=Zi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:B,offsetParent:E,strategy:l}):B);return{top:(T.top-N.top+w.top)/k.y,bottom:(N.bottom-T.bottom+w.bottom)/k.y,left:(T.left-N.left+w.left)/k.x,right:(N.right-T.right+w.right)/k.x}}var Nm=50,up=async(t,e,i)=>{let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:s}=i,a=s.detectOverflow?s:{...s,detectOverflow:dp},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:t,floating:e,strategy:n}),{x:u,y:p}=cp(d,r,l),f=r,y=0,w={};for(let C=0;C<o.length;C++){let b=o[C];if(!b)continue;let{name:T,fn:B}=b,{x:E,y:k,data:N,reset:ae}=await B({x:u,y:p,initialPlacement:r,placement:f,strategy:n,middlewareData:w,rects:d,platform:a,elements:{reference:t,floating:e}});u=E??u,p=k??p,w[T]={...w[T],...N},ae&&y<Nm&&(y++,typeof ae=="object"&&(ae.placement&&(f=ae.placement),ae.rects&&(d=ae.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:n}):ae.rects),{x:u,y:p}=cp(d,f,l)),C=-1)}return{x:u,y:p,placement:f,strategy:n,middlewareData:w}};function $m(t,e,i){return(t?[...i.filter(n=>bi(n)===t),...i.filter(n=>bi(n)!==t)]:i.filter(n=>wn(n)===n)).filter(n=>t?bi(n)===t||(e?ap(n)!==n:!1):!0)}var pp=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,r,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:d}=e,{crossAxis:u=!1,alignment:p,allowedPlacements:f=Ya,autoAlignment:y=!0,...w}=ps(t,e),C=p!==void 0||f===Ya?$m(p||null,y,f):f,b=((i=s.autoPlacement)==null?void 0:i.index)||0,T=C[b];if(T==null)return{};if(a!==T)return{reset:{placement:C[0]}};let B=await l.detectOverflow(e,w),E=sp(T,o,await(l.isRTL==null?void 0:l.isRTL(d.floating))),k=[B[wn(T)],B[E[0]],B[E[1]]],N=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:T,overflows:k}],ae=C[b+1];if(ae)return{data:{index:b+1,overflows:N},reset:{placement:ae}};let q=N.map(dt=>{let Ai=bi(dt.placement);return[dt.placement,Ai&&u?dt.overflows.slice(0,2).reduce((sh,ah)=>sh+ah,0):dt.overflows[0],dt.overflows]}).sort((dt,Ai)=>dt[1]-Ai[1]),jr=((n=q.filter(dt=>dt[2].slice(0,bi(dt[0])?2:3).every(Ai=>Ai<=0))[0])==null?void 0:n[0])||q[0][0];return jr!==a?{data:{index:b+1,overflows:N},reset:{placement:jr}}:{}}}};var fp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:i,y:r,placement:n,platform:o}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:B=>{let{x:E,y:k}=B;return{x:E,y:k}}},...d}=ps(t,e),u={x:i,y:r},p=await o.detectOverflow(e,d),f=fs(n),y=Za(f),w=u[y],C=u[f],b=(B,E)=>op(E+p[B==="y"?"top":"left"],E,E-p[B==="y"?"bottom":"right"]);s&&(w=b(y,w)),a&&(C=b(f,C));let T=l.fn({...e,[y]:w,[f]:C});return{...T,data:{x:T.x-i,y:T.y-r,enabled:{[y]:s,[f]:a}}}}}};function ms(){return typeof window<"u"}function Ji(t){return mp(t)?(t.nodeName||"").toLowerCase():"#document"}function Ze(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function oi(t){var e;return(e=(mp(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function mp(t){return ms()?t instanceof Node||t instanceof Ze(t).Node:!1}function Rt(t){return ms()?t instanceof Element||t instanceof Ze(t).Element:!1}function si(t){return ms()?t instanceof HTMLElement||t instanceof Ze(t).HTMLElement:!1}function hp(t){return!ms()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ze(t).ShadowRoot}function En(t){let{overflow:e,overflowX:i,overflowY:r,display:n}=Ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+i)&&n!=="inline"&&n!=="contents"}function gp(t){return/^(table|td|th)$/.test(Ji(t))}function _n(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Um=/transform|translate|scale|rotate|perspective|filter/,Fm=/paint|layout|strict|content/,Xi=t=>!!t&&t!=="none",Qa;function Ir(t){let e=Rt(t)?Ot(t):t;return Xi(e.transform)||Xi(e.translate)||Xi(e.scale)||Xi(e.rotate)||Xi(e.perspective)||!gs()&&(Xi(e.backdropFilter)||Xi(e.filter))||Um.test(e.willChange||"")||Fm.test(e.contain||"")}function yp(t){let e=Si(t);for(;si(e)&&!Pr(e);){if(Ir(e))return e;if(_n(e))return null;e=Si(e)}return null}function gs(){return Qa==null&&(Qa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qa}function Pr(t){return/^(html|body|#document)$/.test(Ji(t))}function Ot(t){return Ze(t).getComputedStyle(t)}function An(t){return Rt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Si(t){if(Ji(t)==="html")return t;let e=t.assignedSlot||t.parentNode||hp(t)&&t.host||oi(t);return hp(e)?e.host:e}function vp(t){let e=Si(t);return Pr(e)?(t.ownerDocument||t).body:si(e)&&En(e)?e:vp(e)}function hs(t,e,i){var r;e===void 0&&(e=[]),i===void 0&&(i=!0);let n=vp(t),o=n===((r=t.ownerDocument)==null?void 0:r.body),s=Ze(n);if(o){let a=ys(s);return e.concat(s,s.visualViewport||[],En(n)?n:[],a&&i?hs(a):[])}else return e.concat(n,hs(n,[],i))}function ys(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Sp(t){let e=Ot(t),i=parseFloat(e.width)||0,r=parseFloat(e.height)||0,n=si(t),o=n?t.offsetWidth:i,s=n?t.offsetHeight:r,a=Sn(i)!==o||Sn(r)!==s;return a&&(i=o,r=s),{width:i,height:r,$:a}}function wp(t){return Rt(t)?t:t.contextElement}function Mr(t){let e=wp(t);if(!si(e))return Vt(1);let i=e.getBoundingClientRect(),{width:r,height:n,$:o}=Sp(e),s=(o?Sn(i.width):i.width)/r,a=(o?Sn(i.height):i.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Vm=Vt(0);function Ep(t){let e=Ze(t);return!gs()||!e.visualViewport?Vm:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Bm(t,e,i){return e===void 0&&(e=!1),!!i&&e&&i===Ze(t)}function Cn(t,e,i,r){e===void 0&&(e=!1),i===void 0&&(i=!1);let n=t.getBoundingClientRect(),o=wp(t),s=Vt(1);e&&(r?Rt(r)&&(s=Mr(r)):s=Mr(t));let a=Bm(o,i,r)?Ep(o):Vt(0),l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,u=n.width/s.x,p=n.height/s.y;if(o&&r){let f=Ze(o),y=Rt(r)?Ze(r):r,w=f,C=ys(w);for(;C&&y!==w;){let b=Mr(C),T=C.getBoundingClientRect(),B=Ot(C),E=T.left+(C.clientLeft+parseFloat(B.paddingLeft))*b.x,k=T.top+(C.clientTop+parseFloat(B.paddingTop))*b.y;l*=b.x,d*=b.y,u*=b.x,p*=b.y,l+=E,d+=k,w=Ze(C),C=ys(w)}}return Zi({width:u,height:p,x:l,y:d})}function vs(t,e){let i=An(t).scrollLeft;return e?e.left+i:Cn(oi(t)).left+i}function _p(t,e){let i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-vs(t,i),n=i.top+e.scrollTop;return{x:r,y:n}}function Hm(t){let{elements:e,rect:i,offsetParent:r,strategy:n}=t,o=n==="fixed",s=oi(r),a=e?_n(e.floating):!1;if(r===s||a&&o)return i;let l={scrollLeft:0,scrollTop:0},d=Vt(1),u=Vt(0),p=si(r);if((p||!o)&&((Ji(r)!=="body"||En(s))&&(l=An(r)),p)){let y=Cn(r);d=Mr(r),u.x=y.x+r.clientLeft,u.y=y.y+r.clientTop}let f=s&&!p&&!o?_p(s,l):Vt(0);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-l.scrollLeft*d.x+u.x+f.x,y:i.y*d.y-l.scrollTop*d.y+u.y+f.y}}function zm(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function jm(t){let e=An(t),i=t.ownerDocument.body,r=xi(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),n=xi(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),o=-e.scrollLeft+vs(t),s=-e.scrollTop;return Ot(i).direction==="rtl"&&(o+=xi(t.clientWidth,i.clientWidth)-r),{width:r,height:n,x:o,y:s}}var Wm=25;function Km(t,e,i){i===void 0&&(i="viewport");let r=i==="layoutViewport",n=Ze(t),o=oi(t),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,d=0,u=0;if(s){let f=!gs()||e==="fixed";r?f||(d=-s.offsetLeft,u=-s.offsetTop):(a=s.width,l=s.height,f&&(d=s.offsetLeft,u=s.offsetTop))}if(vs(o)<=0){let f=o.ownerDocument,y=f.body,w=getComputedStyle(y),C=f.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,b=Math.abs(o.clientWidth-y.clientWidth-C),T=getComputedStyle(o).scrollbarGutter==="stable both-edges"?b/2:b;T<=Wm&&(a-=T)}return{width:a,height:l,x:d,y:u}}function Gm(t,e){let i=Cn(t,!0,e==="fixed"),r=i.top+t.clientTop,n=i.left+t.clientLeft,o=Mr(t),s=t.clientWidth*o.x,a=t.clientHeight*o.y,l=n*o.x,d=r*o.y;return{width:s,height:a,x:l,y:d}}function xp(t,e,i){let r;if(e==="viewport"||e==="layoutViewport")r=Km(t,i,e);else if(e==="document")r=jm(oi(t));else if(Rt(e))r=Gm(e,i);else{let n=Ep(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return Zi(r)}function qm(t,e){let i=e.get(t);if(i)return i;let r=hs(t,[],!1).filter(a=>Rt(a)&&Ji(a)!=="body"),n=null,o=Ot(t).position==="fixed",s=o?Si(t):t;for(;Rt(s)&&!Pr(s);){let a=Ot(s),l=Ir(s),d=n?n.position:o?"fixed":"";!l&&(d==="fixed"||d==="absolute"&&a.position==="static")?r=r.filter(p=>p!==s):n=a,s=Si(s)}return e.set(t,r),r}function Ym(t){let{element:e,boundary:i,rootBoundary:r,strategy:n}=t,s=[...i==="clippingAncestors"?_n(e)?[]:qm(e,this._c):[].concat(i),r],a=xp(e,s[0],n),l=a.top,d=a.right,u=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let y=xp(e,s[f],n);l=xi(y.top,l),d=bn(y.right,d),u=bn(y.bottom,u),p=xi(y.left,p)}return{width:d-p,height:u-l,x:p,y:l}}function Zm(t){let{width:e,height:i}=Sp(t);return{width:e,height:i}}function Xm(t,e,i){let r=si(e),n=oi(e),o=i==="fixed",s=Cn(t,!0,o,e),a={scrollLeft:0,scrollTop:0},l=Vt(0);if((r||!o)&&((Ji(e)!=="body"||En(n))&&(a=An(e)),r)){let f=Cn(e,!0,o,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}!r&&n&&(l.x=vs(n));let d=n&&!r&&!o?_p(n,a):Vt(0),u=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:u,y:p,width:s.width,height:s.height}}function el(t){return Ot(t).position==="static"}function bp(t,e){if(!si(t)||Ot(t).position==="fixed")return null;if(e)return e(t);let i=t.offsetParent;return oi(t)===i&&(i=i.ownerDocument.body),i}function Ap(t,e){let i=Ze(t);if(_n(t))return i;if(!si(t)){let n=Si(t);for(;n&&!Pr(n);){if(Rt(n)&&!el(n))return n;n=Si(n)}return i}let r=bp(t,e);for(;r&&gp(r)&&el(r);)r=bp(r,e);return r&&Pr(r)&&el(r)&&!Ir(r)?i:r||yp(t)||i}var Jm=async function(t){let e=this.getOffsetParent||Ap,i=this.getDimensions,r=await i(t.floating);return{reference:Xm(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qm(t){return Ot(t).direction==="rtl"}var xs={convertOffsetParentRelativeRectToViewportRelativeRect:Hm,getDocumentElement:oi,getClippingRect:Ym,getOffsetParent:Ap,getElementRects:Jm,getClientRects:zm,getDimensions:Zm,getScale:Mr,isElement:Rt,isRTL:Qm};var Cp=pp,Tp=fp;var Rp=(t,e,i)=>{let r=new Map,n=i??{},o={...xs,...n.platform,_c:r};return up(t,e,{...n,platform:o})};function Op(t){return eg(t)}function tl(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function eg(t){for(let e=t;e;e=tl(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=tl(t);e;e=tl(e)){if(!(e instanceof Element))continue;let i=getComputedStyle(e);if(i.display!=="contents"&&(i.position!=="static"||Ir(i)||e.tagName==="BODY"))return e}return null}async function bs(t,e,i){let r;return typeof i=="object"?r=i:r={placement:i},Rp(t,e,{strategy:r.strategy,platform:{...xs,getOffsetParent:n=>xs.getOffsetParent(n,Op)},middleware:[Tp({crossAxis:!0}),Cp({allowedPlacements:[r.placement]})]})}var kp=c(h());var il=class{fromAttribute(e){if(!e)return[];try{let i=JSON.parse(e);return Array.isArray(i)?i.map(r=>typeof r=="string"?Cr.fromAttribute(r):r):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},tg=new il;var Dp=(t,e)=>(i,r)=>{var n;i.constructor.createProperty(r,{type:Object,hasChanged:kp.hasChanged,converter:Cr,...e}),i[mn]=(n=i[mn])!==null&&n!==void 0?n:new Map,i[mn].set(r,t??{})};var kt=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},re=class extends Qo{constructor(){super(...arguments),this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.ignoreMatchingElements=[],this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new yt.Debouncer,this.revealDebouncer=new yt.Debouncer,this.onTouch=e=>{this.isIgnored(e)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",i=>{i.composedPath().includes(this.container)||this.onOut(i)},{once:!0}),100))},this.onHover=e=>{this.isIgnored(e)?this.matchesIgnored(e)&&this.hide():this.show()},this.onFocusIn=e=>{!this.isIgnored(e)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=e=>{this.isIgnored(e)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var e,i;return Lp.html`
565
565
  <div part="container"
566
566
  class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
567
567
  <slot part="slot"></slot>
@@ -652,7 +652,7 @@
652
652
  <div></div>
653
653
  <div></div>
654
654
  </div>
655
- `}};er.styles=Np;var Vp=c(h());var Fp={"ft-loader":er};(0,Vp.customElements)(Fp);var wi=c(S()),Ss=c(st()),W=c(U());var Dt=t=>t??he;var zp=c(S()),k=c(h());var Bp=k.FtCssVariableFactory.extend("--ft-button-color","",k.designSystemVariables.colorPrimary),H={backgroundColor:k.FtCssVariableFactory.extend("--ft-button-background-color","",k.designSystemVariables.colorSurface),borderRadius:k.FtCssVariableFactory.extend("--ft-button-border-radius","",k.designSystemVariables.borderRadiusL),color:Bp,fontSize:k.FtCssVariableFactory.extend("--ft-button-font-size","",Ie.fontSize),iconSize:k.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:k.FtCssVariableFactory.extend("--ft-button-ripple-color","",Bp),verticalPadding:k.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:k.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:k.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:k.FtCssVariableFactory.external(k.designSystemVariables.colorOpacityDisabled,"Design system")},Hp=k.FtCssVariableFactory.extend("--ft-button-primary-color","",k.FtCssVariableFactory.extend("--ft-button-color","",k.designSystemVariables.colorOnPrimary)),rl={backgroundColor:k.FtCssVariableFactory.extend("--ft-button-primary-background-color","",k.FtCssVariableFactory.extend("--ft-button-background-color","",k.designSystemVariables.colorPrimary)),color:Hp,rippleColor:k.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Hp)},Bt={borderRadius:k.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",k.FtCssVariableFactory.extend("--ft-button-border-radius","",k.designSystemVariables.borderRadiusM)),verticalPadding:k.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:k.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:k.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},jp=zp.css`
655
+ `}};er.styles=Np;var Vp=c(h());var Fp={"ft-loader":er};(0,Vp.customElements)(Fp);var wi=c(S()),Ss=c(st()),W=c(U());var Dt=t=>t??he;var zp=c(S()),O=c(h());var Bp=O.FtCssVariableFactory.extend("--ft-button-color","",O.designSystemVariables.colorPrimary),H={backgroundColor:O.FtCssVariableFactory.extend("--ft-button-background-color","",O.designSystemVariables.colorSurface),borderRadius:O.FtCssVariableFactory.extend("--ft-button-border-radius","",O.designSystemVariables.borderRadiusL),color:Bp,fontSize:O.FtCssVariableFactory.extend("--ft-button-font-size","",Ie.fontSize),iconSize:O.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:O.FtCssVariableFactory.extend("--ft-button-ripple-color","",Bp),verticalPadding:O.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:O.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:O.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:O.FtCssVariableFactory.external(O.designSystemVariables.colorOpacityDisabled,"Design system")},Hp=O.FtCssVariableFactory.extend("--ft-button-primary-color","",O.FtCssVariableFactory.extend("--ft-button-color","",O.designSystemVariables.colorOnPrimary)),rl={backgroundColor:O.FtCssVariableFactory.extend("--ft-button-primary-background-color","",O.FtCssVariableFactory.extend("--ft-button-background-color","",O.designSystemVariables.colorPrimary)),color:Hp,rippleColor:O.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Hp)},Bt={borderRadius:O.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",O.FtCssVariableFactory.extend("--ft-button-border-radius","",O.designSystemVariables.borderRadiusM)),verticalPadding:O.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:O.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:O.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},jp=zp.css`
656
656
  :host {
657
657
  display: inline-block;
658
658
  max-width: 100%;
@@ -683,7 +683,7 @@
683
683
  }
684
684
 
685
685
  .ft-button:focus-visible {
686
- outline: 2px solid ${k.designSystemVariables.colorPrimary};
686
+ outline: 2px solid ${O.designSystemVariables.colorPrimary};
687
687
  outline-offset: 2px;
688
688
  }
689
689
 
@@ -699,9 +699,9 @@
699
699
 
700
700
  --button-internal-line-height: max(calc(${H.fontSize} + 2px), ${H.iconSize});
701
701
  --button-internal-color: ${H.color};
702
- ${(0,k.setVariable)(me.size,H.iconSize)};
703
- ${(0,k.setVariable)(G.color,H.rippleColor)};
704
- ${(0,k.setVariable)(G.borderRadius,H.borderRadius)};
702
+ ${(0,O.setVariable)(me.size,H.iconSize)};
703
+ ${(0,O.setVariable)(G.color,H.rippleColor)};
704
+ ${(0,O.setVariable)(G.borderRadius,H.borderRadius)};
705
705
 
706
706
  border-radius: ${H.borderRadius};
707
707
  padding: ${H.verticalPadding} ${H.horizontalPadding};
@@ -717,7 +717,7 @@
717
717
  .ft-button.ft-button--dense {
718
718
  padding: ${Bt.verticalPadding} ${Bt.horizontalPadding};
719
719
  border-radius: ${Bt.borderRadius};
720
- ${(0,k.setVariable)(G.borderRadius,Bt.borderRadius)};
720
+ ${(0,O.setVariable)(G.borderRadius,Bt.borderRadius)};
721
721
  }
722
722
 
723
723
  .ft-button.ft-button--dense.ft-button--outlined {
@@ -744,7 +744,7 @@
744
744
  .ft-button.ft-button--primary {
745
745
  background-color: ${rl.backgroundColor};
746
746
  --button-internal-color: ${rl.color};
747
- ${(0,k.setVariable)(G.color,rl.rippleColor)};
747
+ ${(0,O.setVariable)(G.color,rl.rippleColor)};
748
748
  }
749
749
 
750
750
  .ft-button--label {
@@ -754,8 +754,8 @@
754
754
  text-overflow: ellipsis;
755
755
  display: block;
756
756
  margin: 0 ${H.iconPadding};
757
- ${(0,k.setVariable)(Ie.fontSize,"1em")};
758
- ${(0,k.setVariable)(Ie.lineHeight,"var(--button-internal-line-height)")};
757
+ ${(0,O.setVariable)(Ie.fontSize,"1em")};
758
+ ${(0,O.setVariable)(Ie.lineHeight,"var(--button-internal-line-height)")};
759
759
  }
760
760
 
761
761
  .ft-button--dense .ft-button--label {
@@ -786,10 +786,10 @@
786
786
  }
787
787
 
788
788
  ft-loader {
789
- ${(0,k.setVariable)(Qi.size,H.iconSize)};
790
- ${(0,k.setVariable)(Qi.color,"var(--button-internal-color)")};
789
+ ${(0,O.setVariable)(Qi.size,H.iconSize)};
790
+ ${(0,O.setVariable)(Qi.color,"var(--button-internal-color)")};
791
791
  }
792
- `;var Y=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},O=class t extends(0,Ht.toFtFormComponent)(Ht.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.hasTextContent=!1,this.addEventListener("click",e=>{var i;this.isDisabled()?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.type=="submit"&&((i=this.form)===null||i===void 0||i.requestSubmit())})}render(){var e,i,r;let n={"ft-button--label":!0,"ft-safari-ellipsis-fix":Ht.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=wi.html`
792
+ `;var Y=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},R=class t extends(0,Ht.toFtFormComponent)(Ht.FtLitElement){get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0}}constructor(){super(),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1,this.disabled=!1,this.icon=void 0,this.trailingIcon=!1,this.type="button",this.href=void 0,this.target=void 0,this.loading=!1,this.ariaLabel=null,this.ariaHasPopup=null,this.ariaPressed=null,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.activated=!1,this.hasTextContent=!1,this.addEventListener("click",e=>{var i;this.isDisabled()?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()):this.type=="submit"&&((i=this.form)===null||i===void 0||i.requestSubmit())})}render(){var e,i,r;let n={"ft-button--label":!0,"ft-safari-ellipsis-fix":Ht.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=wi.html`
793
793
  <ft-ripple part="ripple"
794
794
  ?disabled=${this.isDisabled()}
795
795
  ?activated=${this.activated}
@@ -830,7 +830,7 @@
830
830
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
831
831
  `:wi.html`
832
832
  <slot part="icon" name="icon"></slot>
833
- `}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,i){var r;return(r=this.tooltip)===null||r===void 0?void 0:r.showTemporaryText(e,i)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};O.elementDefinitions={"ft-ripple":P,"ft-tooltip":re,"ft-icon":z,"ft-loader":er,"ft-typography":F};O.styles=[Ht.safariEllipsisFix,jp,Ht.noTextSelect];O.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let i=e.target.getRootNode();i.host?i.host.hasTextContent=e.boundingClientRect.width>0:O.labelsObserver.unobserve(e.target)}});Y([(0,W.property)({type:Boolean})],O.prototype,"primary",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"outlined",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"dense",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"round",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"disabled",void 0);Y([(0,W.property)()],O.prototype,"icon",void 0);Y([(0,W.property)()],O.prototype,"iconVariant",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"trailingIcon",void 0);Y([(0,W.property)()],O.prototype,"label",void 0);Y([(0,W.property)()],O.prototype,"type",void 0);Y([(0,W.property)()],O.prototype,"href",void 0);Y([(0,W.property)()],O.prototype,"target",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"loading",void 0);Y([(0,W.property)({attribute:"aria-label"})],O.prototype,"ariaLabel",void 0);Y([(0,W.property)()],O.prototype,"ariaHasPopup",void 0);Y([(0,W.property)({attribute:"aria-pressed"})],O.prototype,"ariaPressed",void 0);Y([(0,W.property)()],O.prototype,"tooltipPosition",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"hideTooltip",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"forceTooltip",void 0);Y([(0,W.property)({type:Boolean})],O.prototype,"activated",void 0);Y([(0,W.query)(".ft-button")],O.prototype,"button",void 0);Y([(0,W.query)(".ft-button--label")],O.prototype,"labelContainer",void 0);Y([(0,W.state)()],O.prototype,"hasTextContent",void 0);Y([(0,W.query)(".ft-button--label slot")],O.prototype,"slottedContent",void 0);Y([(0,W.query)("[part=tooltip]")],O.prototype,"tooltip",void 0);var Kp=c(h());var Wp={"ft-button":O};(0,Kp.customElements)(Wp);var ws=c(S()),zt=c(U()),Zp=c(st()),ai=c(h());var Nr=c(S()),Xe=c(U()),$r=c(h());var Yp=c(st());var Gp=c(S()),Ve=c(h());var oe=c(h());var se={textColor:oe.FtCssVariableFactory.extend("--ft-switch-text-color","",oe.designSystemVariables.colorOnSurfaceHigh),backgroundColor:oe.FtCssVariableFactory.extend("--ft-switch-background-color","",oe.designSystemVariables.colorSurface),selectedTextColor:oe.FtCssVariableFactory.extend("--ft-switch-selected-text-color","",oe.designSystemVariables.colorPrimary),selectedBackgroundColor:oe.FtCssVariableFactory.extend("--ft-switch-selected-background-color","",oe.designSystemVariables.colorPrimary),borderColor:oe.FtCssVariableFactory.extend("--ft-switch-border-color","",oe.designSystemVariables.colorOutline),borderRadius:oe.FtCssVariableFactory.extend("--ft-switch-border-radius","",oe.designSystemVariables.borderRadiusL),fontSize:oe.FtCssVariableFactory.extend("--ft-switch-font-size","",Ie.fontSize),iconSize:oe.FtCssVariableFactory.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:oe.FtCssVariableFactory.extend("--ft-switch-text-color","",oe.designSystemVariables.colorOnSurfaceMedium),rippleColor:oe.FtCssVariableFactory.extend("--ft-switch-ripple-color","",oe.designSystemVariables.colorPrimary),outlineColor:oe.FtCssVariableFactory.extend("--ft-switch-outline-color","",oe.designSystemVariables.colorPrimary)};var Se={borderRadiusLeft:Ve.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",Ve.designSystemVariables.borderRadiusL),borderRadiusRight:Ve.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",Ve.designSystemVariables.borderRadiusL),borderWidthLeft:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},qp=Gp.css`
833
+ `}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}showTooltip(){var e;(e=this.tooltip)===null||e===void 0||e.show()}showTemporaryTooltip(e,i){var r;return(r=this.tooltip)===null||r===void 0?void 0:r.showTemporaryText(e,i)}setTooltipManual(e){this.tooltip&&(this.tooltip.manual=e)}click(){var e;(e=this.button)===null||e===void 0||e.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(e){super.contentAvailableCallback(e),this.labelContainer&&t.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&t.labelsObserver.unobserve(this.labelContainer)}};R.elementDefinitions={"ft-ripple":P,"ft-tooltip":re,"ft-icon":z,"ft-loader":er,"ft-typography":F};R.styles=[Ht.safariEllipsisFix,jp,Ht.noTextSelect];R.labelsObserver=new IntersectionObserver(t=>{for(let e of t){let i=e.target.getRootNode();i.host?i.host.hasTextContent=e.boundingClientRect.width>0:R.labelsObserver.unobserve(e.target)}});Y([(0,W.property)({type:Boolean})],R.prototype,"primary",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"outlined",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"dense",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"round",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"disabled",void 0);Y([(0,W.property)()],R.prototype,"icon",void 0);Y([(0,W.property)()],R.prototype,"iconVariant",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"trailingIcon",void 0);Y([(0,W.property)()],R.prototype,"label",void 0);Y([(0,W.property)()],R.prototype,"type",void 0);Y([(0,W.property)()],R.prototype,"href",void 0);Y([(0,W.property)()],R.prototype,"target",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"loading",void 0);Y([(0,W.property)({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0);Y([(0,W.property)()],R.prototype,"ariaHasPopup",void 0);Y([(0,W.property)({attribute:"aria-pressed"})],R.prototype,"ariaPressed",void 0);Y([(0,W.property)()],R.prototype,"tooltipPosition",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"hideTooltip",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"forceTooltip",void 0);Y([(0,W.property)({type:Boolean})],R.prototype,"activated",void 0);Y([(0,W.query)(".ft-button")],R.prototype,"button",void 0);Y([(0,W.query)(".ft-button--label")],R.prototype,"labelContainer",void 0);Y([(0,W.state)()],R.prototype,"hasTextContent",void 0);Y([(0,W.query)(".ft-button--label slot")],R.prototype,"slottedContent",void 0);Y([(0,W.query)("[part=tooltip]")],R.prototype,"tooltip",void 0);var Kp=c(h());var Wp={"ft-button":R};(0,Kp.customElements)(Wp);var ws=c(S()),zt=c(U()),Zp=c(st()),ai=c(h());var Nr=c(S()),Xe=c(U()),$r=c(h());var Yp=c(st());var Gp=c(S()),Ve=c(h());var oe=c(h());var se={textColor:oe.FtCssVariableFactory.extend("--ft-switch-text-color","",oe.designSystemVariables.colorOnSurfaceHigh),backgroundColor:oe.FtCssVariableFactory.extend("--ft-switch-background-color","",oe.designSystemVariables.colorSurface),selectedTextColor:oe.FtCssVariableFactory.extend("--ft-switch-selected-text-color","",oe.designSystemVariables.colorPrimary),selectedBackgroundColor:oe.FtCssVariableFactory.extend("--ft-switch-selected-background-color","",oe.designSystemVariables.colorPrimary),borderColor:oe.FtCssVariableFactory.extend("--ft-switch-border-color","",oe.designSystemVariables.colorOutline),borderRadius:oe.FtCssVariableFactory.extend("--ft-switch-border-radius","",oe.designSystemVariables.borderRadiusL),fontSize:oe.FtCssVariableFactory.extend("--ft-switch-font-size","",Ie.fontSize),iconSize:oe.FtCssVariableFactory.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:oe.FtCssVariableFactory.extend("--ft-switch-text-color","",oe.designSystemVariables.colorOnSurfaceMedium),rippleColor:oe.FtCssVariableFactory.extend("--ft-switch-ripple-color","",oe.designSystemVariables.colorPrimary),outlineColor:oe.FtCssVariableFactory.extend("--ft-switch-outline-color","",oe.designSystemVariables.colorPrimary)};var Se={borderRadiusLeft:Ve.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",Ve.designSystemVariables.borderRadiusL),borderRadiusRight:Ve.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",Ve.designSystemVariables.borderRadiusL),borderWidthLeft:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:Ve.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},qp=Gp.css`
834
834
  .ft-switch-option {
835
835
  position: relative;
836
836
  display: inline-block;
@@ -1042,38 +1042,36 @@
1042
1042
  [part="buttons-container"] {
1043
1043
  align-self: flex-end;
1044
1044
  }
1045
- `}var ke=c(h());var _s={feedbackInputMinWidth:ke.FtCssVariableFactory.create("--ft-viewer-feedback-input-min-width","","SIZE","300px"),ratedDateColor:ke.FtCssVariableFactory.external(ke.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-color","",ke.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-background-color","",ke.designSystemVariables.colorPrimary),filledRatingColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-filled-rating-color","",ke.designSystemVariables.colorPrimary),emptyRatingColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-empty-rating-color","",ke.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:ke.FtCssVariableFactory.external(Jt.fontSize,"Typography"),sectionTitleFontSize:ke.FtCssVariableFactory.external(Qt.fontSize,"Typography"),starsBackgroundColor:ke.FtCssVariableFactory.create("--ft-viewer-feedback-stars-background-color","","COLOR",ke.designSystemVariables.colorSurface)};var ue=c(S()),pe=c(U()),Fr=c(h());var rf=c(S()),j=c(h());var ef=c(S()),Z=c(h());var A={fontSize:Z.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:Z.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:Z.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:Z.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:Z.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:Z.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:Z.FtCssVariableFactory.extend("--ft-input-label-border-color","",Z.designSystemVariables.colorOutline),textColor:Z.FtCssVariableFactory.extend("--ft-input-label-text-color","",Z.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:Z.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",Z.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:Z.FtCssVariableFactory.extend("--ft-input-label-background-color","",Z.designSystemVariables.colorSurface),borderRadius:Z.FtCssVariableFactory.extend("--ft-input-label-border-radius","",Z.designSystemVariables.borderRadiusS),colorError:Z.FtCssVariableFactory.external(Z.designSystemVariables.colorError,"Design system")},tf=ef.css`
1045
+ `}var ke=c(h());var _s={feedbackInputMinWidth:ke.FtCssVariableFactory.create("--ft-viewer-feedback-input-min-width","","SIZE","300px"),ratedDateColor:ke.FtCssVariableFactory.external(ke.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-color","",ke.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-background-color","",ke.designSystemVariables.colorPrimary),filledRatingColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-filled-rating-color","",ke.designSystemVariables.colorPrimary),emptyRatingColor:ke.FtCssVariableFactory.extend("--ft-viewer-feedback-empty-rating-color","",ke.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:ke.FtCssVariableFactory.external(Jt.fontSize,"Typography"),sectionTitleFontSize:ke.FtCssVariableFactory.external(Qt.fontSize,"Typography"),starsBackgroundColor:ke.FtCssVariableFactory.create("--ft-viewer-feedback-stars-background-color","","COLOR",ke.designSystemVariables.colorSurface)};var ue=c(S()),pe=c(U()),Fr=c(h());var rf=c(S()),j=c(h());var ef=c(S()),Z=c(h());var D={fontSize:Z.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:Z.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:Z.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:Z.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:Z.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:Z.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:Z.FtCssVariableFactory.extend("--ft-input-label-border-color","",Z.designSystemVariables.colorOutline),textColor:Z.FtCssVariableFactory.extend("--ft-input-label-text-color","",Z.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:Z.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",Z.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:Z.FtCssVariableFactory.extend("--ft-input-label-background-color","",Z.designSystemVariables.colorSurface),borderRadius:Z.FtCssVariableFactory.extend("--ft-input-label-border-radius","",Z.designSystemVariables.borderRadiusS),colorError:Z.FtCssVariableFactory.external(Z.designSystemVariables.colorError,"Design system")},tf=ef.css`
1046
1046
  .ft-input-label {
1047
1047
  position: absolute;
1048
1048
  inset: 0;
1049
1049
  display: flex;
1050
- background-color: ${A.backgroundColor};
1051
- border-radius: ${A.borderRadius} ${A.borderRadius} 0 0;
1050
+ background-color: ${D.backgroundColor};
1051
+ border-radius: ${D.borderRadius} ${D.borderRadius} 0 0;
1052
+ border-color: ${D.borderColor};
1053
+ border-bottom-width: 1px;
1054
+ border-bottom-style: solid;
1052
1055
  }
1053
1056
 
1054
1057
  .ft-input-label--outlined {
1055
- border-radius: ${A.borderRadius};
1056
- }
1057
-
1058
- .ft-input-label {
1059
- border-color: ${A.borderColor};
1058
+ border-radius: ${D.borderRadius};
1059
+ border-width: 1px;
1060
+ border-style: solid;
1060
1061
  }
1061
1062
 
1062
1063
  .ft-input-label.ft-input-label--in-error {
1063
- border-color: ${A.colorError}
1064
+ border-color: ${D.colorError}
1064
1065
  }
1065
1066
 
1066
1067
  .ft-input-label:before,
1067
1068
  .ft-input-label:after {
1068
1069
  content: "";
1069
1070
  display: flex;
1070
- border-bottom-width: 1px;
1071
- border-bottom-style: solid;
1072
- border-color: inherit;
1073
1071
  }
1074
1072
 
1075
1073
  .ft-input-label:before {
1076
- width: calc(${A.horizontalSpacing} - 4px);
1074
+ width: calc(${D.horizontalSpacing} - 4px);
1077
1075
  flex-shrink: 0;
1078
1076
  }
1079
1077
 
@@ -1086,23 +1084,20 @@
1086
1084
  display: flex;
1087
1085
  flex-shrink: 1;
1088
1086
  position: relative;
1089
- border-bottom-width: 1px;
1090
- border-bottom-style: solid;
1091
- border-color: inherit;
1092
- color: ${A.textColor};
1087
+ color: ${D.textColor};
1093
1088
  transition: font-size 250ms, line-height 250ms, color 250ms;
1094
- max-width: calc(${A.labelMaxWidth} - 2 * (${A.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
1089
+ max-width: calc(${D.labelMaxWidth} - 2 * (${D.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
1095
1090
  text-overflow: ellipsis;
1096
- ${(0,Z.setVariable)(Ge.fontSize,A.fontSize)};
1097
- ${(0,Z.setVariable)(Ge.lineHeight,A.fontSize)};
1091
+ ${(0,Z.setVariable)(Ge.fontSize,D.fontSize)};
1092
+ ${(0,Z.setVariable)(Ge.lineHeight,D.fontSize)};
1098
1093
  }
1099
1094
 
1100
1095
  .ft-input-label--in-error .ft-input-label--text {
1101
- color: ${A.colorError}
1096
+ color: ${D.colorError}
1102
1097
  }
1103
1098
 
1104
1099
  .ft-input-label--disabled .ft-input-label--text {
1105
- color: ${A.disabledTextColor};
1100
+ color: ${D.disabledTextColor};
1106
1101
  }
1107
1102
 
1108
1103
  .ft-input-label--hidden-text {
@@ -1119,51 +1114,28 @@
1119
1114
  overflow: hidden;
1120
1115
  white-space: nowrap;
1121
1116
  text-overflow: ellipsis;
1122
- padding: ${A.verticalSpacing} 4px;
1123
- margin: calc(${A.verticalSpacing} * -1) 0;
1117
+ padding: ${D.verticalSpacing} 4px;
1118
+ margin: calc(${D.verticalSpacing} * -1) 0;
1124
1119
  max-width: 100%;
1125
1120
  box-sizing: border-box;
1126
1121
  }
1127
1122
 
1128
1123
  .ft-input-label--raised .ft-input-label--text {
1129
- ${(0,Z.setVariable)(Ge.fontSize,A.raisedFontSize)};
1130
- ${(0,Z.setVariable)(Ge.lineHeight,A.raisedFontSize)};
1124
+ ${(0,Z.setVariable)(Ge.fontSize,D.raisedFontSize)};
1125
+ ${(0,Z.setVariable)(Ge.lineHeight,D.raisedFontSize)};
1131
1126
  }
1132
1127
 
1133
1128
  .ft-input-label--raised .ft-input-label--floating-text {
1134
- top: ${A.verticalSpacing};
1135
- }
1136
-
1137
- .ft-input-label--outlined .ft-input-label--text,
1138
- .ft-input-label--outlined:before,
1139
- .ft-input-label--outlined:after {
1140
- border-top-width: 1px;
1141
- border-top-style: solid;
1142
- }
1143
-
1144
- .ft-input-label--outlined:before {
1145
- border-left-width: 1px;
1146
- border-left-style: solid;
1147
- border-radius: ${A.borderRadius} 0 0 ${A.borderRadius};
1148
- }
1149
-
1150
- .ft-input-label--outlined:after {
1151
- border-right-width: 1px;
1152
- border-right-style: solid;
1153
- border-radius: 0 ${A.borderRadius} ${A.borderRadius} 0;
1129
+ top: ${D.verticalSpacing};
1154
1130
  }
1155
1131
 
1156
1132
  .ft-input-label--outlined.ft-input-label--raised .ft-input-label--floating-text {
1157
1133
  padding: 2px 4px;
1158
- z-index: ${A.raisedZIndex};
1159
- background-color: ${A.backgroundColor};
1160
- border-radius: ${A.borderRadius};
1134
+ z-index: ${D.raisedZIndex};
1135
+ background-color: ${D.backgroundColor};
1136
+ border-radius: ${D.borderRadius};
1161
1137
  top: calc((${Ge.lineHeight} / -2) + 2px);
1162
1138
  }
1163
-
1164
- .ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
1165
- border-top: none;
1166
- }
1167
1139
  `;var K={fontSize:j.FtCssVariableFactory.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:j.FtCssVariableFactory.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:j.FtCssVariableFactory.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:j.FtCssVariableFactory.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:j.FtCssVariableFactory.extend("--ft-text-area-helper-color","",j.designSystemVariables.colorOnSurfaceMedium),colorPrimary:j.FtCssVariableFactory.external(j.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:j.FtCssVariableFactory.external(j.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:j.FtCssVariableFactory.external(j.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:j.FtCssVariableFactory.external(j.designSystemVariables.borderRadiusS,"Design system"),colorError:j.FtCssVariableFactory.external(j.designSystemVariables.colorError,"Design system")},nf=rf.css`
1168
1140
  *:focus {
1169
1141
  outline: none;
@@ -1176,10 +1148,10 @@
1176
1148
  }
1177
1149
 
1178
1150
  ft-input-label {
1179
- ${(0,j.setVariable)(A.fontSize,K.fontSize)};
1180
- ${(0,j.setVariable)(A.raisedFontSize,K.labelSize)};
1181
- ${(0,j.setVariable)(A.verticalSpacing,K.verticalSpacing)};
1182
- ${(0,j.setVariable)(A.horizontalSpacing,K.horizontalSpacing)};
1151
+ ${(0,j.setVariable)(D.fontSize,K.fontSize)};
1152
+ ${(0,j.setVariable)(D.raisedFontSize,K.labelSize)};
1153
+ ${(0,j.setVariable)(D.verticalSpacing,K.verticalSpacing)};
1154
+ ${(0,j.setVariable)(D.horizontalSpacing,K.horizontalSpacing)};
1183
1155
  }
1184
1156
 
1185
1157
  .ft-text-area--main-panel {
@@ -1232,8 +1204,8 @@
1232
1204
  }
1233
1205
 
1234
1206
  .ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
1235
- ${(0,j.setVariable)(A.borderColor,K.colorPrimary)};
1236
- ${(0,j.setVariable)(A.textColor,K.colorPrimary)};
1207
+ ${(0,j.setVariable)(D.borderColor,K.colorPrimary)};
1208
+ ${(0,j.setVariable)(D.textColor,K.colorPrimary)};
1237
1209
  }
1238
1210
 
1239
1211
  .ft-text-area--filled .ft-text-area--input-panel {
@@ -1352,7 +1324,7 @@
1352
1324
  ${this.helper}
1353
1325
  </ft-typography>`:void 0}
1354
1326
  </div>
1355
- `}setValue(e,i=!1){this.value=e,this.setFormValue(e),i&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(e){(e.key==="Enter"||e.key===" ")&&e.stopPropagation()}updateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(e){e.detail.height>=50&&(!this.maxHeight||this.maxHeight>0&&e.detail.height<this.maxHeight)&&(this.height=e.detail.height)}};ye.elementDefinitions={"ft-input-label":lt,"ft-resizer":Ce,"ft-ripple":P,"ft-typography":F};ye.styles=[fi,nf];xt([(0,It.property)({type:String})],ye.prototype,"label",void 0);xt([(0,It.property)({reflect:!0})],ye.prototype,"value",void 0);xt([(0,It.property)({type:String})],ye.prototype,"helper",void 0);xt([(0,It.property)({type:Boolean})],ye.prototype,"outlined",void 0);xt([(0,It.property)({type:Boolean})],ye.prototype,"disabled",void 0);xt([(0,It.property)({type:Boolean})],ye.prototype,"error",void 0);xt([(0,Wt.numberProperty)({reflect:!0})],ye.prototype,"height",void 0);xt([(0,Wt.numberProperty)()],ye.prototype,"maxHeight",void 0);xt([(0,It.query)("textarea")],ye.prototype,"textarea",void 0);xt([(0,It.state)()],ye.prototype,"focused",void 0);xt([(0,Wt.ignoreComposingEvents)()],ye.prototype,"onKeyDown",null);xt([(0,Wt.ignoreComposingEvents)()],ye.prototype,"liveUpdateValueFromInputField",null);var vf=c(h());var yf={"ft-text-area":ye};(0,vf.customElements)(yf);var kf=c(xr());var J=ht.build("integratedFeedbackComponent"),xf={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review",viewerFeedbackMainTitle:"Send feedback",viewerRatingSectionTitle:"Rate this content",viewerDichotomousRatingSectionTitle:"Did this content solve your problem?",viewerFeedbackSectionTitle:"Write your review"};var ks=class extends CustomEvent{constructor(e){super("live-change",{detail:e})}},Ds=class extends CustomEvent{constructor(e){super("change",{detail:e})}},Ls=class extends CustomEvent{constructor(e){super("invalid",{detail:e})}};var bf=c(S()),C=c(h());var L={fontSize:C.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:C.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:C.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:C.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:C.FtCssVariableFactory.extend("--ft-text-field-helper-color","",C.designSystemVariables.colorOnSurfaceMedium),colorPrimary:C.FtCssVariableFactory.external(C.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:C.FtCssVariableFactory.external(C.designSystemVariables.borderRadiusS,"Design system"),colorError:C.FtCssVariableFactory.external(C.designSystemVariables.colorError,"Design system"),prefixColor:C.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",C.designSystemVariables.colorOnSurfaceMedium),iconColor:C.FtCssVariableFactory.extend("--ft-text-field-icon-color","",C.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:C.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:C.FtCssVariableFactory.extend("--ft-text-field-background-color","",C.designSystemVariables.colorSurface),colorOutline:C.FtCssVariableFactory.external(C.designSystemVariables.colorOutline,"Design system"),elevation02:C.FtCssVariableFactory.external(C.designSystemVariables.elevation02,"Design system"),suggestSize:C.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},Sf=bf.css`
1327
+ `}setValue(e,i=!1){this.value=e,this.setFormValue(e),i&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(e){(e.key==="Enter"||e.key===" ")&&e.stopPropagation()}updateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var e;this.value=((e=this.textarea)===null||e===void 0?void 0:e.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(e){e.detail.height>=50&&(!this.maxHeight||this.maxHeight>0&&e.detail.height<this.maxHeight)&&(this.height=e.detail.height)}};ye.elementDefinitions={"ft-input-label":lt,"ft-resizer":Ce,"ft-ripple":P,"ft-typography":F};ye.styles=[fi,nf];xt([(0,It.property)({type:String})],ye.prototype,"label",void 0);xt([(0,It.property)({reflect:!0})],ye.prototype,"value",void 0);xt([(0,It.property)({type:String})],ye.prototype,"helper",void 0);xt([(0,It.property)({type:Boolean})],ye.prototype,"outlined",void 0);xt([(0,It.property)({type:Boolean})],ye.prototype,"disabled",void 0);xt([(0,It.property)({type:Boolean})],ye.prototype,"error",void 0);xt([(0,Wt.numberProperty)({reflect:!0})],ye.prototype,"height",void 0);xt([(0,Wt.numberProperty)()],ye.prototype,"maxHeight",void 0);xt([(0,It.query)("textarea")],ye.prototype,"textarea",void 0);xt([(0,It.state)()],ye.prototype,"focused",void 0);xt([(0,Wt.ignoreComposingEvents)()],ye.prototype,"onKeyDown",null);xt([(0,Wt.ignoreComposingEvents)()],ye.prototype,"liveUpdateValueFromInputField",null);var vf=c(h());var yf={"ft-text-area":ye};(0,vf.customElements)(yf);var kf=c(xr());var J=ht.build("integratedFeedbackComponent"),xf={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review",viewerFeedbackMainTitle:"Send feedback",viewerRatingSectionTitle:"Rate this content",viewerDichotomousRatingSectionTitle:"Did this content solve your problem?",viewerFeedbackSectionTitle:"Write your review"};var ks=class extends CustomEvent{constructor(e){super("live-change",{detail:e})}},Ds=class extends CustomEvent{constructor(e){super("change",{detail:e})}},Ls=class extends CustomEvent{constructor(e){super("invalid",{detail:e})}};var bf=c(S()),A=c(h());var L={fontSize:A.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:A.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:A.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:A.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:A.FtCssVariableFactory.extend("--ft-text-field-helper-color","",A.designSystemVariables.colorOnSurfaceMedium),colorPrimary:A.FtCssVariableFactory.external(A.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:A.FtCssVariableFactory.external(A.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:A.FtCssVariableFactory.external(A.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:A.FtCssVariableFactory.external(A.designSystemVariables.borderRadiusS,"Design system"),colorError:A.FtCssVariableFactory.external(A.designSystemVariables.colorError,"Design system"),prefixColor:A.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",A.designSystemVariables.colorOnSurfaceMedium),iconColor:A.FtCssVariableFactory.extend("--ft-text-field-icon-color","",A.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:A.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:A.FtCssVariableFactory.extend("--ft-text-field-background-color","",A.designSystemVariables.colorSurface),colorOutline:A.FtCssVariableFactory.external(A.designSystemVariables.colorOutline,"Design system"),elevation02:A.FtCssVariableFactory.external(A.designSystemVariables.elevation02,"Design system"),suggestSize:A.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},Sf=bf.css`
1356
1328
  *:focus {
1357
1329
  outline: none;
1358
1330
  }
@@ -1366,11 +1338,11 @@
1366
1338
  }
1367
1339
 
1368
1340
  ft-input-label {
1369
- ${(0,C.setVariable)(A.fontSize,L.fontSize)};
1370
- ${(0,C.setVariable)(A.raisedFontSize,L.labelSize)};
1371
- ${(0,C.setVariable)(A.verticalSpacing,L.verticalSpacing)};
1372
- ${(0,C.setVariable)(A.horizontalSpacing,L.horizontalSpacing)};
1373
- ${(0,C.setVariable)(A.backgroundColor,L.backgroundColor)};
1341
+ ${(0,A.setVariable)(D.fontSize,L.fontSize)};
1342
+ ${(0,A.setVariable)(D.raisedFontSize,L.labelSize)};
1343
+ ${(0,A.setVariable)(D.verticalSpacing,L.verticalSpacing)};
1344
+ ${(0,A.setVariable)(D.horizontalSpacing,L.horizontalSpacing)};
1345
+ ${(0,A.setVariable)(D.backgroundColor,L.backgroundColor)};
1374
1346
  }
1375
1347
 
1376
1348
  .ft-text-field--main-panel {
@@ -1387,13 +1359,13 @@
1387
1359
  overflow: hidden;
1388
1360
  padding: 0 ${L.horizontalSpacing};
1389
1361
 
1390
- ${(0,C.setVariable)(rt.fontSize,L.fontSize)};
1391
- ${(0,C.setVariable)(rt.lineHeight,L.fontSize)};
1362
+ ${(0,A.setVariable)(rt.fontSize,L.fontSize)};
1363
+ ${(0,A.setVariable)(rt.lineHeight,L.fontSize)};
1392
1364
  }
1393
1365
 
1394
1366
  .ft-text-field--input-panel ft-ripple {
1395
- ${(0,C.setVariable)(G.opacityContentOnSurfaceHover,"0.08")};
1396
- ${(0,C.setVariable)(G.opacityContentOnSurfacePressed,"0.04")};
1367
+ ${(0,A.setVariable)(G.opacityContentOnSurfaceHover,"0.08")};
1368
+ ${(0,A.setVariable)(G.opacityContentOnSurfacePressed,"0.04")};
1397
1369
  }
1398
1370
 
1399
1371
  .ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
@@ -1449,8 +1421,8 @@
1449
1421
  }
1450
1422
 
1451
1423
  .ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
1452
- ${(0,C.setVariable)(A.borderColor,L.colorPrimary)};
1453
- ${(0,C.setVariable)(A.textColor,L.colorPrimary)};
1424
+ ${(0,A.setVariable)(D.borderColor,L.colorPrimary)};
1425
+ ${(0,A.setVariable)(D.textColor,L.colorPrimary)};
1454
1426
  }
1455
1427
 
1456
1428
  .ft-text-field--filled .ft-text-field--input-panel {
@@ -1505,7 +1477,7 @@
1505
1477
  }
1506
1478
 
1507
1479
  .ft-text-field--with-icon {
1508
- ${(0,C.setVariable)(A.labelMaxWidth,`calc(100% - ${me.size} - ${A.horizontalSpacing})`)};
1480
+ ${(0,A.setVariable)(D.labelMaxWidth,`calc(100% - ${me.size} - ${D.horizontalSpacing})`)};
1509
1481
  }
1510
1482
 
1511
1483
  .ft-text-field--with-password ft-icon:hover {
@@ -1585,7 +1557,7 @@
1585
1557
  </ft-button>
1586
1558
  `:rr.nothing}
1587
1559
  </div>
1588
- `}focus(e,i){var r,n;i&&this.removable?(r=this.removeButton)===null||r===void 0||r.focus():(n=this.suggestion)===null||n===void 0||n.focus(e)}click(e){var i;(i=e?this.removeButton:this.suggestion)===null||i===void 0||i.click()}isRemoveButtonFocused(){var e,i;return(i=(e=this.removeButton)===null||e===void 0?void 0:e.matches(":focus-within"))!==null&&i!==void 0?i:!1}selectSuggestion(){this.dispatchEvent(new dl(this.getValue()))}removeSuggestion(){this.dispatchEvent(new ul(this.getValue()))}getValue(){return this.value||this.getTextContent()}getTextContent(){return this.assignedNodes.map(e=>e.textContent).join("").trim()}suggestionKeyDown(e){var i;switch(e.key){case"Enter":case" ":e.preventDefault(),e.stopPropagation(),this.selectSuggestion();break;case"ArrowRight":this.removable&&(e.preventDefault(),e.stopPropagation(),(i=this.removeButton)===null||i===void 0||i.focus());break}}removeButtonKeyDown(e){var i;switch(e.key){case"Enter":case" ":e.preventDefault(),e.stopPropagation(),this.removeSuggestion();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),(i=this.suggestion)===null||i===void 0||i.focus();break}}};He.elementDefinitions={"ft-ripple":P,"ft-typography":F,"ft-icon":z,"ft-button":O};He.styles=Ef;nr([(0,Kt.property)()],He.prototype,"value",void 0);nr([(0,Kt.property)()],He.prototype,"helper",void 0);nr([(0,Kt.property)({type:Boolean})],He.prototype,"removable",void 0);nr([(0,Kt.property)()],He.prototype,"removeButtonLabel",void 0);nr([(0,Kt.query)(".ft-text-field-suggestion--suggestion")],He.prototype,"suggestion",void 0);nr([(0,Kt.query)(".ft-text-field-suggestion--remove")],He.prototype,"removeButton",void 0);nr([(0,Kt.queryAssignedNodes)()],He.prototype,"assignedNodes",void 0);var $=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},_=class extends(0,ze.toFtFormComponent)(ze.FtLitElement){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.prefix=null,this.passwordHiddenIcon=ii.EYE_SLASH,this.passwordRevealedIcon=ii.EYE,this.filterSuggestions=!1,this.password=!1,this.hideCurrentValueSuggestion=!1,this.focused=!1,this.inputValid=!0,this.hidePassword=!0,this.hideSuggestions=!1,this.visibleSuggestions=[],this.providedSuggestions=[]}get value(){return this._value||""}set value(e){this.setInternalValue(e||""),this.dispatchedValue=e||""}setInternalValue(e){let i=this._value;this._value=e||"",this.setFormValue(this._value),this.requestUpdate("value",i)}focus(){var e;(e=this.input)===null||e===void 0||e.focus()}blur(){var e;(e=this.input)===null||e===void 0||e.blur()}render(){var e;let i={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":!this.inputValid||this.error,"ft-text-field--fixed":this.fixedMenuPosition,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":!this.suggestionsShouldBeDisplayed(),"ft-text-field--raised-label":this.focused||this.value!="","ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.isPasswordField()},r=this.suggestionsProvider&&this.value&&this.value!=""&&!this.providedSuggestions.map(a=>a.label).includes(this.value),o=!this.suggestionsProvider&&this.filterSuggestions&&this.value&&this.value!=""||r,s=this.inputValid?this.helper:(e=this.input)===null||e===void 0?void 0:e.validationMessage;return ve.html`
1560
+ `}focus(e,i){var r,n;i&&this.removable?(r=this.removeButton)===null||r===void 0||r.focus():(n=this.suggestion)===null||n===void 0||n.focus(e)}click(e){var i;(i=e?this.removeButton:this.suggestion)===null||i===void 0||i.click()}isRemoveButtonFocused(){var e,i;return(i=(e=this.removeButton)===null||e===void 0?void 0:e.matches(":focus-within"))!==null&&i!==void 0?i:!1}selectSuggestion(){this.dispatchEvent(new dl(this.getValue()))}removeSuggestion(){this.dispatchEvent(new ul(this.getValue()))}getValue(){return this.value||this.getTextContent()}getTextContent(){return this.assignedNodes.map(e=>e.textContent).join("").trim()}suggestionKeyDown(e){var i;switch(e.key){case"Enter":case" ":e.preventDefault(),e.stopPropagation(),this.selectSuggestion();break;case"ArrowRight":this.removable&&(e.preventDefault(),e.stopPropagation(),(i=this.removeButton)===null||i===void 0||i.focus());break}}removeButtonKeyDown(e){var i;switch(e.key){case"Enter":case" ":e.preventDefault(),e.stopPropagation(),this.removeSuggestion();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),(i=this.suggestion)===null||i===void 0||i.focus();break}}};He.elementDefinitions={"ft-ripple":P,"ft-typography":F,"ft-icon":z,"ft-button":R};He.styles=Ef;nr([(0,Kt.property)()],He.prototype,"value",void 0);nr([(0,Kt.property)()],He.prototype,"helper",void 0);nr([(0,Kt.property)({type:Boolean})],He.prototype,"removable",void 0);nr([(0,Kt.property)()],He.prototype,"removeButtonLabel",void 0);nr([(0,Kt.query)(".ft-text-field-suggestion--suggestion")],He.prototype,"suggestion",void 0);nr([(0,Kt.query)(".ft-text-field-suggestion--remove")],He.prototype,"removeButton",void 0);nr([(0,Kt.queryAssignedNodes)()],He.prototype,"assignedNodes",void 0);var $=function(t,e,i,r){var n=arguments.length,o=n<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,i):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,i,o):s(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o},_=class extends(0,ze.toFtFormComponent)(ze.FtLitElement){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.prefix=null,this.passwordHiddenIcon=ii.EYE_SLASH,this.passwordRevealedIcon=ii.EYE,this.filterSuggestions=!1,this.password=!1,this.hideCurrentValueSuggestion=!1,this.focused=!1,this.inputValid=!0,this.hidePassword=!0,this.hideSuggestions=!1,this.visibleSuggestions=[],this.providedSuggestions=[]}get value(){return this._value||""}set value(e){this.setInternalValue(e||""),this.dispatchedValue=e||""}setInternalValue(e){let i=this._value;this._value=e||"",this.setFormValue(this._value),this.requestUpdate("value",i)}focus(){var e;(e=this.input)===null||e===void 0||e.focus()}blur(){var e;(e=this.input)===null||e===void 0||e.blur()}render(){var e;let i={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":!this.inputValid||this.error,"ft-text-field--fixed":this.fixedMenuPosition,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":!this.suggestionsShouldBeDisplayed(),"ft-text-field--raised-label":this.focused||this.value!="","ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.isPasswordField()},r=this.suggestionsProvider&&this.value&&this.value!=""&&!this.providedSuggestions.map(a=>a.label).includes(this.value),o=!this.suggestionsProvider&&this.filterSuggestions&&this.value&&this.value!=""||r,s=this.inputValid?this.helper:(e=this.input)===null||e===void 0?void 0:e.validationMessage;return ve.html`
1589
1561
  <div class="${(0,Tf.classMap)(i)}">
1590
1562
  <div class="ft-text-field--main-panel"
1591
1563
  @keydown=${this.handleKeyboardNavigation}
@@ -1776,7 +1748,7 @@
1776
1748
  ${a}
1777
1749
  </div>
1778
1750
  </form>
1779
- `}return ue.nothing}onFormSubmitEvent(e,i){e.preventDefault(),i?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var e,i,r;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((i=(e=this.session)===null||e===void 0?void 0:e.profile)===null||i===void 0?void 0:i.userId)==null&&(!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var e;this.dispatchEvent(new Is({message:this.feedbackInput.value,...((e=this.configuration)===null||e===void 0?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.setValue("",!0),0)}};Q.elementDefinitions={"ft-button":O,"ft-typography":F,"ft-switch":Be,"ft-switch-option":de,"ft-text-area":ye,"ft-text-field":_};we([(0,pe.property)({type:Boolean})],Q.prototype,"hideTitle",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"withMoreOptionsButton",void 0);we([(0,pe.property)()],Q.prototype,"iconVariant",void 0);we([(0,pe.property)()],Q.prototype,"emptyStarIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledStarIcon",void 0);we([(0,pe.property)()],Q.prototype,"emptyLikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledLikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"emptyDislikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledDislikeIcon",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"canAccessFeedback",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"canRateThisContent",void 0);we([(0,pe.property)({attribute:!1})],Q.prototype,"i18nProperties",void 0);we([(0,pe.property)({attribute:!1})],Q.prototype,"ratingSummary",void 0);we([(0,pe.property)()],Q.prototype,"configuration",void 0);we([(0,pe.property)()],Q.prototype,"feedbackMailLinkBuilder",void 0);we([(0,Fr.redux)({store:x.name})],Q.prototype,"session",void 0);we([(0,pe.query)("[part='feedback-input']")],Q.prototype,"feedbackInput",void 0);we([(0,pe.state)()],Q.prototype,"from",void 0);we([(0,pe.state)()],Q.prototype,"feedbackMessage",void 0);var Rn=class extends Q{};Rn.styles=Es(_s);var pl=ht.build("inDesignerFeedbackComponent"),Df={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var Ps=ht.fromGwt("server");var Ms=class{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(e,i,r,n,o){var s;this.subject=e,this.url=i,this.configuration=n,this.isAuthenticated=o,this.subjectMetadata=this.filterMetadata(r,n.subjectMetadataIds).map(a=>"["+a.values[a.values.length-1]+"]").join(""),this.bodyMetadata=this.filterMetadata(r,(s=n.bodyMetadataIds)!==null&&s!==void 0?s:[]).map(a=>"["+a.values.join(", ")+"]").join(" ")}filterMetadata(e,i){return i.map(r=>e.find(n=>n.key===r)).filter(r=>r!=null&&r.values.length>0)}shouldUseMailer(){var e,i;let r=this.isAuthenticated&&!(!((e=this.configuration)===null||e===void 0)&&e.mailsSentByFluidTopics),n=!this.isAuthenticated&&!(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers);return r||n}build(e){var i;if(e!=null&&e.length===0||!this.shouldUseMailer())return;let r=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`
1751
+ `}return ue.nothing}onFormSubmitEvent(e,i){e.preventDefault(),i?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var e,i,r;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((i=(e=this.session)===null||e===void 0?void 0:e.profile)===null||i===void 0?void 0:i.userId)==null&&(!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var e;this.dispatchEvent(new Is({message:this.feedbackInput.value,...((e=this.configuration)===null||e===void 0?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.setValue("",!0),0)}};Q.elementDefinitions={"ft-button":R,"ft-typography":F,"ft-switch":Be,"ft-switch-option":de,"ft-text-area":ye,"ft-text-field":_};we([(0,pe.property)({type:Boolean})],Q.prototype,"hideTitle",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"withMoreOptionsButton",void 0);we([(0,pe.property)()],Q.prototype,"iconVariant",void 0);we([(0,pe.property)()],Q.prototype,"emptyStarIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledStarIcon",void 0);we([(0,pe.property)()],Q.prototype,"emptyLikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledLikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"emptyDislikeIcon",void 0);we([(0,pe.property)()],Q.prototype,"filledDislikeIcon",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"canAccessFeedback",void 0);we([(0,pe.property)({type:Boolean})],Q.prototype,"canRateThisContent",void 0);we([(0,pe.property)({attribute:!1})],Q.prototype,"i18nProperties",void 0);we([(0,pe.property)({attribute:!1})],Q.prototype,"ratingSummary",void 0);we([(0,pe.property)()],Q.prototype,"configuration",void 0);we([(0,pe.property)()],Q.prototype,"feedbackMailLinkBuilder",void 0);we([(0,Fr.redux)({store:x.name})],Q.prototype,"session",void 0);we([(0,pe.query)("[part='feedback-input']")],Q.prototype,"feedbackInput",void 0);we([(0,pe.state)()],Q.prototype,"from",void 0);we([(0,pe.state)()],Q.prototype,"feedbackMessage",void 0);var Rn=class extends Q{};Rn.styles=Es(_s);var pl=ht.build("inDesignerFeedbackComponent"),Df={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var Ps=ht.fromGwt("server");var Ms=class{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(e,i,r,n,o){var s;this.subject=e,this.url=i,this.configuration=n,this.isAuthenticated=o,this.subjectMetadata=this.filterMetadata(r,n.subjectMetadataIds).map(a=>"["+a.values[a.values.length-1]+"]").join(""),this.bodyMetadata=this.filterMetadata(r,(s=n.bodyMetadataIds)!==null&&s!==void 0?s:[]).map(a=>"["+a.values.join(", ")+"]").join(" ")}filterMetadata(e,i){return i.map(r=>e.find(n=>n.key===r)).filter(r=>r!=null&&r.values.length>0)}shouldUseMailer(){var e,i;let r=this.isAuthenticated&&!(!((e=this.configuration)===null||e===void 0)&&e.mailsSentByFluidTopics),n=!this.isAuthenticated&&!(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers);return r||n}build(e){var i;if(e!=null&&e.length===0||!this.shouldUseMailer())return;let r=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`
1780
1752
  ${this.bodyMetadata}
1781
1753
  ${this.url}
1782
1754
  _________________________________________________________________
@@ -1992,7 +1964,7 @@ ${Ps.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
1992
1964
  <div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
1993
1965
  <ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
1994
1966
  </div>
1995
- `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new Us))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new Us))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,Vr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};ne.elementDefinitions={"ft-ripple":P,"ft-typography":F,"ft-icon":z,"ft-button":O};ne.styles=Ff;je([(0,De.property)({type:Boolean})],ne.prototype,"highlighted",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"removable",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"disabled",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"clickable",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"iconClickable",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"dense",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"multiLine",void 0);je([(0,De.property)()],ne.prototype,"label",void 0);je([(0,De.property)()],ne.prototype,"iconLabel",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"hideIconTooltip",void 0);je([(0,De.property)()],ne.prototype,"icon",void 0);je([(0,De.property)()],ne.prototype,"iconVariant",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"trailingIcon",void 0);je([(0,De.property)()],ne.prototype,"typographyVariant",void 0);je([(0,De.query)("ft-typography slot")],ne.prototype,"slottedContent",void 0);var Hf=c(h());var Bf={"ft-chip":ne};(0,Hf.customElements)(Bf);var qf=c(S()),Ee=c(U()),zr=c(h());var Yf=c(st());var kn=c(S()),Hr=c(U()),Bs=c(h());var zf=c(S()),Fs=c(h()),ig={iconColor:Fs.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",Fs.designSystemVariables.colorOnSurfaceMedium)},jf=zf.css`
1967
+ `}onKeyUp(e){this.interactionsOnChip&&["Enter"," "].includes(e.key)&&e.target.click()}onIconKeyUp(e){this.interactionsOnIcon&&["Enter"," "].includes(e.key)&&(e.stopPropagation(),this.dispatchEvent(new Us))}onIconClick(e){this.interactionsOnIcon&&(e.stopPropagation(),this.dispatchEvent(new Us))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,Vr.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};ne.elementDefinitions={"ft-ripple":P,"ft-typography":F,"ft-icon":z,"ft-button":R};ne.styles=Ff;je([(0,De.property)({type:Boolean})],ne.prototype,"highlighted",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"removable",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"disabled",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"clickable",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"iconClickable",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"dense",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"multiLine",void 0);je([(0,De.property)()],ne.prototype,"label",void 0);je([(0,De.property)()],ne.prototype,"iconLabel",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"hideIconTooltip",void 0);je([(0,De.property)()],ne.prototype,"icon",void 0);je([(0,De.property)()],ne.prototype,"iconVariant",void 0);je([(0,De.property)({type:Boolean})],ne.prototype,"trailingIcon",void 0);je([(0,De.property)()],ne.prototype,"typographyVariant",void 0);je([(0,De.query)("ft-typography slot")],ne.prototype,"slottedContent",void 0);var Hf=c(h());var Bf={"ft-chip":ne};(0,Hf.customElements)(Bf);var qf=c(S()),Ee=c(U()),zr=c(h());var Yf=c(st());var kn=c(S()),Hr=c(U()),Bs=c(h());var zf=c(S()),Fs=c(h()),ig={iconColor:Fs.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",Fs.designSystemVariables.colorOnSurfaceMedium)},jf=zf.css`
1996
1968
  .ft-floating-menu-item {
1997
1969
  cursor: pointer;
1998
1970
  display: flex;
@@ -2105,7 +2077,7 @@ ${Ps.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(i=this.configura
2105
2077
  </div>
2106
2078
  </div>
2107
2079
  </div>
2108
- `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new zs(e.detail)),this.closeMenu()}onContentClick(e){(0,zr.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:i,y:r}=await bs(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${i}px`,this.menuWrapper.style.top=`${r}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};te.elementDefinitions={"ft-floating-menu-item":Ne,"ft-button":O};te.styles=Gf;$e([(0,Ee.property)()],te.prototype,"horizontalAlignment",void 0);$e([(0,Ee.property)()],te.prototype,"verticalAlignment",void 0);$e([(0,zr.jsonProperty)([])],te.prototype,"closeMenuMatchers",void 0);$e([(0,Ee.property)({type:Boolean})],te.prototype,"primary",void 0);$e([(0,Ee.property)()],te.prototype,"label",void 0);$e([(0,Ee.property)()],te.prototype,"tooltipPosition",void 0);$e([(0,Ee.property)()],te.prototype,"icon",void 0);$e([(0,Ee.property)()],te.prototype,"iconVariant",void 0);$e([(0,Ee.property)()],te.prototype,"text",void 0);$e([(0,Ee.property)({type:Boolean})],te.prototype,"disabled",void 0);$e([(0,Ee.state)()],te.prototype,"menuOpen",void 0);$e([(0,Ee.state)()],te.prototype,"forceMenuOpen",void 0);$e([(0,Ee.query)(".ft-floating-menu")],te.prototype,"container",void 0);$e([(0,Ee.query)(".ft-floating-menu--wrapper")],te.prototype,"menuWrapper",void 0);$e([(0,Ee.query)("#actions-button")],te.prototype,"actionButton",void 0);$e([(0,Ee.queryAssignedElements)({slot:"toggle"})],te.prototype,"customToggle",void 0);var Zf=c(S()),js=c(h()),rg={color:js.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",js.designSystemVariables.colorOnSurfaceMedium)},Xf=Zf.css`
2080
+ `}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(e){e.stopPropagation(),this.closeMenu()}onItemSelect(e){e.stopPropagation(),this.dispatchEvent(new zs(e.detail)),this.closeMenu()}onContentClick(e){(0,zr.eventPathContainsMatchingElement)(e,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("menuOpen")&&(this.menuOpen?(this.menuWrapper.classList.remove("ft-floating-menu--wrapper-positioned"),this.positionMenuWrapper(),document.addEventListener("click",this.hideOptionsOnClickOutside)):document.removeEventListener("click",this.hideOptionsOnClickOutside))}async positionMenuWrapper(){this.menuWrapper.style.left="",this.menuWrapper.style.top="";let e=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:i,y:r}=await bs(e,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${i}px`,this.menuWrapper.style.top=`${r}px`,this.menuWrapper.classList.add("ft-floating-menu--wrapper-positioned")}convertPlacement(){switch(this.horizontalAlignment){case"left":return this.verticalAlignment+"-start";case"right":return this.verticalAlignment+"-end";case"center":return this.verticalAlignment}}onKeyDown(e){e.key=="Escape"&&(this.closeMenu(),e.stopPropagation())}};te.elementDefinitions={"ft-floating-menu-item":Ne,"ft-button":R};te.styles=Gf;$e([(0,Ee.property)()],te.prototype,"horizontalAlignment",void 0);$e([(0,Ee.property)()],te.prototype,"verticalAlignment",void 0);$e([(0,zr.jsonProperty)([])],te.prototype,"closeMenuMatchers",void 0);$e([(0,Ee.property)({type:Boolean})],te.prototype,"primary",void 0);$e([(0,Ee.property)()],te.prototype,"label",void 0);$e([(0,Ee.property)()],te.prototype,"tooltipPosition",void 0);$e([(0,Ee.property)()],te.prototype,"icon",void 0);$e([(0,Ee.property)()],te.prototype,"iconVariant",void 0);$e([(0,Ee.property)()],te.prototype,"text",void 0);$e([(0,Ee.property)({type:Boolean})],te.prototype,"disabled",void 0);$e([(0,Ee.state)()],te.prototype,"menuOpen",void 0);$e([(0,Ee.state)()],te.prototype,"forceMenuOpen",void 0);$e([(0,Ee.query)(".ft-floating-menu")],te.prototype,"container",void 0);$e([(0,Ee.query)(".ft-floating-menu--wrapper")],te.prototype,"menuWrapper",void 0);$e([(0,Ee.query)("#actions-button")],te.prototype,"actionButton",void 0);$e([(0,Ee.queryAssignedElements)({slot:"toggle"})],te.prototype,"customToggle",void 0);var Zf=c(S()),js=c(h()),rg={color:js.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",js.designSystemVariables.colorOnSurfaceMedium)},Xf=Zf.css`
2109
2081
  .ft-floating-menu-label {
2110
2082
  padding: 4px 8px;
2111
2083
  }