@fluid-topics/ft-viewer 2.1.23 → 2.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset/index.d.ts +0 -1
- package/build/asset/index.js +0 -1
- package/build/definitions.d.ts +2 -4
- package/build/definitions.js +2 -4
- package/build/ft-viewer.light.js +436 -478
- package/build/ft-viewer.min.js +423 -465
- package/build/ud/index.d.ts +0 -1
- package/build/ud/index.js +0 -1
- package/package.json +9 -9
- package/build/asset/components/ft-asset-viewer-content-control.d.ts +0 -5
- package/build/asset/components/ft-asset-viewer-content-control.js +0 -4
- package/build/common/ft-viewer-content-control.d.ts +0 -35
- package/build/common/ft-viewer-content-control.js +0 -164
- package/build/common/ft-viewer.messages.d.ts +0 -11
- package/build/common/ft-viewer.messages.js +0 -10
- package/build/ud/components/ft-ud-viewer-content-control.d.ts +0 -5
- package/build/ud/components/ft-ud-viewer-content-control.js +0 -4
package/build/ft-viewer.light.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(()=>{var Yf=Object.create;var ul=Object.defineProperty;var Xf=Object.getOwnPropertyDescriptor;var Jf=Object.getOwnPropertyNames;var Qf=Object.getPrototypeOf,th=Object.prototype.hasOwnProperty;var ci=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var eh=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Jf(t))!th.call(e,n)&&n!==r&&ul(e,n,{get:()=>t[n],enumerable:!(i=Xf(t,n))||i.enumerable});return e};var u=(e,t,r)=>(r=e!=null?Yf(Qf(e)):{},eh(t||!e||!e.__esModule?ul(r,"default",{value:e,enumerable:!0}):r,e));var g=ci(($m,dl)=>{dl.exports=ftGlobals.wcUtils});var $=ci((Nm,pl)=>{pl.exports=ftGlobals.litDecorators});var A=ci((lg,gl)=>{gl.exports=ftGlobals.lit});var Ci=ci((hx,mu)=>{mu.exports=ftGlobals.litRepeat});var Da=ci((Gx,Yu)=>{Yu.exports=ftGlobals.litUnsafeHTML});var oe=ci((mA,np)=>{np.exports=ftGlobals.litClassMap});var Zf=u(g());var hl=u(g()),ml=u($());var Ze=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var ui=class{constructor(t,r,i,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=t,r.context!==void 0){let o=r;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=r,this.callback=i,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 Ze(this.context,this.host,this.t,this.subscribe))}};var Vn=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,r=!1){let i=r||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[r,{disposer:i}]of this.subscriptions)r(this.o,i)},t!==void 0&&(this.value=t)}addCallback(t,r,i){if(!i)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:r});let{disposer:n}=this.subscriptions.get(t);t(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};var Ns=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}},di=class extends Vn{constructor(t,r,i){super(r.context!==void 0?r.initialValue:i),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 Ze(this.context,a,s,!0)));n.stopPropagation()},this.host=t,r.context!==void 0?this.context=r.context:this.context=r,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 Ns(this.context,this.host))}};var Qi=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Ze(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function tn({context:e}){return(t,r)=>{let i=new WeakMap;if(typeof r=="object")return{get(){return t.get.call(this)},set(n){return i.get(this).setValue(n),t.set.call(this,n)},init(n){return i.set(this,new di(this,{context:e,initialValue:n})),n}};{t.constructor.addInitializer((s=>{i.set(s,new di(s,{context:e}))}));let n=Object.getOwnPropertyDescriptor(t,r),o;if(n===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){i.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=n.set;o={...n,set(a){i.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(t,r,o)}}}function en({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new ui(this,{context:e,callback:n=>{r.set.call(this,n)},subscribe:t})})):r.constructor.addInitializer((n=>{new ui(n,{context:e,callback:o=>{n[i]=o},subscribe:t})}))}}var rh=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Us=Symbol("asset-viewer-state-manager"),de=(0,hl.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(e){class t extends e{willUpdate(i){super.willUpdate(i),i.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 rh([en({context:Us,subscribe:!0}),(0,ml.state)()],t.prototype,"viewerStateManager",void 0),t});var uu=u(A()),Ei=u(g());var vl=u(g()),ih={setZoom:(e,t)=>{e.contentModifiers.zoom=t.payload},setRotation:(e,t)=>{e.contentModifiers.rotation=t.payload}},Bn=e=>vl.FtReduxStore.get({name:"ft-viewer-"+e,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:ih});var yl=u(g()),pi=class extends yl.FtStateManager{constructor(t){super(),this.store=t}setZoom(t){this.store.actions.setZoom(t)}setRotation(t){this.store.actions.setRotation(t)}};var ua=u($());var bl=u($(),1);var Fs=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function xl(e,t){return(0,bl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return rn(e);try{return JSON.parse(r)}catch{return rn(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:nn,...t??{}})}function nh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Hn(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Hn(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Hn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Hn(e,t){try{return nh(e,t)}catch{return!1}}function nn(e,t){return!Hn(e,t)}function rn(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function jn(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var Sl=u($(),1);var Vs=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:nn,attribute:!1,...t};(0,Sl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var zn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Mr=u($(),1);var Wn=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Al=u(A(),1);var Kn=globalThis,oh=Kn.ShadowRoot&&(Kn.ShadyCSS===void 0||Kn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var wl=(e,t)=>{if(oh)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Kn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Gn=class extends Al.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return wl(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Fs(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function El(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var hi=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ol,Cl=Symbol("constructorPrototype"),_l=Symbol("constructorName"),Rl=Symbol("exportpartsDebouncer"),Tl=Symbol("dynamicDependenciesLoaded"),fi=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};fi.eventName="exportparts-updated";var Fe=class extends Gn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Ol]=new Wn(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[Rl].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[_l]=this.constructor.name,this[Cl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[_l]&&Object.setPrototypeOf(this,this[Cl])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Tl]||(r[Tl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(fi.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(fi.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new fi)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=El(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.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(t){var r,i,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,c=t.filter(l).map(f=>f.trim());if(c.length===0){this.exportparts=void 0;return}let d=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)d.add(x)}if(d.size===0){this.exportparts=void 0;return}let p=[...d.values()].flatMap(f=>c.map(h=>`${f}:${h}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};Ol=Rl;hi([(0,Mr.property)()],Fe.prototype,"exportpartsPrefix",void 0);hi([xl([])],Fe.prototype,"exportpartsPrefixes",void 0);hi([(0,Mr.property)({reflect:!0})],Fe.prototype,"exportparts",void 0);hi([(0,Mr.property)()],Fe.prototype,"customStylesheet",void 0);hi([(0,Mr.property)()],Fe.prototype,"elementToFocus",void 0);hi([(0,Mr.state)()],Fe.prototype,"useAdoptedStyleSheets",void 0);function qn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var on=Symbol("internalReduxEventsUnsubscribers"),dr=Symbol("internalStoresUnsubscribers"),$r=Symbol("internalStores"),sh=jn(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[$r].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[$r].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[$r].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[$r].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[$r].delete(a)}setupStores(){this.unsubscribeFromStores(),this[$r].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[dr].has(s.store):this[dr].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[dr].set(s,a.subscribe(()=>this.updateFromStores())),this[on].set(s,[]),qn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,d)=>{if(typeof this[d]=="function"&&(!c.store||a.name===c.store)){let p=f=>this[d](f);a.addEventListener(c.eventName,p),this[on].get(s).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[dr].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[dr].has(s)&&this[dr].get(s)(),this[dr].delete(s),(a=this[on].get(s))===null||a===void 0||a.forEach(l=>l()),this[on].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=dr,r=$r,i=on,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Ll=class extends sh(Fe){};function pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ye(e){return!!e&&!!e[Z]}function Ee(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===hh})(e)||Array.isArray(e)||!!e[Nl]||!!(!((t=e.constructor)===null||t===void 0)&&t[Nl])||Zs(e)||Ys(e))}function Nr(e,t,r){r===void 0&&(r=!1),vi(e)===0?(r?Object.keys:gi)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function vi(e){var t=e[Z];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Zs(e)?2:Ys(e)?3:0}function mi(e,t){return vi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ah(e,t){return vi(e)===2?e.get(t):e[t]}function Ul(e,t,r){var i=vi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function Fl(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Zs(e){return ph&&e instanceof Map}function Ys(e){return fh&&e instanceof Set}function pr(e){return e.o||e.t}function Xs(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Hl(e);delete t[Z];for(var r=gi(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Js(e,t){return t===void 0&&(t=!1),Qs(e)||Ye(e)||!Ee(e)||(vi(e)>1&&(e.set=e.add=e.clear=e.delete=lh),Object.freeze(e),t&&Nr(e,(function(r,i){return Js(i,!0)}),!0)),e}function lh(){pe(2)}function Qs(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ve(e){var t=qs[e];return t||pe(18,e),t}function ch(e,t){qs[e]||(qs[e]=t)}function Ws(){return an}function Bs(e,t){t&&(Ve("Patches"),e.u=[],e.s=[],e.v=t)}function Zn(e){Ks(e),e.p.forEach(uh),e.p=null}function Ks(e){e===an&&(an=e.l)}function Pl(e){return an={p:[],l:an,h:e,m:!0,_:0}}function uh(e){var t=e[Z];t.i===0||t.i===1?t.j():t.g=!0}function Hs(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Ve("ES5").S(t,e,i),i?(r[Z].P&&(Zn(t),pe(4)),Ee(e)&&(e=Yn(t,e),t.l||Xn(t,e)),t.u&&Ve("Patches").M(r[Z].t,e,t.u,t.s)):e=Yn(t,r,[]),Zn(t),t.u&&t.v(t.u,t.s),e!==Bl?e:void 0}function Yn(e,t,r){if(Qs(t))return t;var i=t[Z];if(!i)return Nr(t,(function(a,l){return Il(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Xn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Xs(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),Nr(o,(function(a,l){return Il(e,i,n,a,l,r,s)})),Xn(e,n,!1),r&&e.u&&Ve("Patches").N(i,r,e.u,e.s)}return i.o}function Il(e,t,r,i,n,o,s){if(Ye(n)){var a=Yn(e,n,o&&t&&t.i!==3&&!mi(t.R,i)?o.concat(i):void 0);if(Ul(r,i,a),!Ye(a))return;e.m=!1}else s&&r.add(n);if(Ee(n)&&!Qs(n)){if(!e.h.D&&e._<1)return;Yn(e,n),t&&t.A.l||Xn(e,n)}}function Xn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Js(t,r)}function js(e,t){var r=e[Z];return(r?pr(r):e)[t]}function kl(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function fr(e){e.P||(e.P=!0,e.l&&fr(e.l))}function zs(e){e.o||(e.o=Xs(e.t))}function Gs(e,t,r){var i=Zs(t)?Ve("MapSet").F(t,r):Ys(t)?Ve("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Ws(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=ln;s&&(l=[a],c=sn);var d=Proxy.revocable(l,c),p=d.revoke,f=d.proxy;return a.k=f,a.j=p,f})(t,r):Ve("ES5").J(t,r);return(r?r.A:Ws()).p.push(i),i}function dh(e){return Ye(e)||pe(22,e),(function t(r){if(!Ee(r))return r;var i,n=r[Z],o=vi(r);if(n){if(!n.P&&(n.i<4||!Ve("ES5").K(n)))return n.t;n.I=!0,i=Dl(r,o),n.I=!1}else i=Dl(r,o);return Nr(i,(function(s,a){n&&ah(n.t,s)===a||Ul(i,s,t(a))})),o===3?new Set(i):i})(e)}function Dl(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Xs(e)}function Vl(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[Z];return ln.get(c,s)},set:function(c){var d=this[Z];ln.set(d,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][Z];if(!l.P)switch(l.i){case 5:i(l)&&fr(l);break;case 4:r(l)&&fr(l)}}}function r(s){for(var a=s.t,l=s.k,c=gi(l),d=c.length-1;d>=0;d--){var p=c[d];if(p!==Z){var f=a[p];if(f===void 0&&!mi(a,p))return!0;var h=l[p],m=h&&h[Z];if(m?m.t!==f:!Fl(h,f))return!0}}var v=!!a[Z];return c.length!==gi(a).length+(v?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&pe(3,JSON.stringify(pr(s)))}var o={};ch("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(p,f){if(p){for(var h=Array(f.length),m=0;m<f.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var v=Hl(f);delete v[Z];for(var x=gi(v),S=0;S<x.length;S++){var E=x[S];v[E]=e(E,p||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(f),v)})(l,s),d={i:l?5:4,A:a?a.A:Ws(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,Z,{value:d,writable:!0}),c},S:function(s,a,l){l?Ye(a)&&a[Z].A===s&&t(s.p):(s.u&&(function c(d){if(d&&typeof d=="object"){var p=d[Z];if(p){var f=p.t,h=p.k,m=p.R,v=p.i;if(v===4)Nr(h,(function(P){P!==Z&&(f[P]!==void 0||mi(f,P)?m[P]||c(h[P]):(m[P]=!0,fr(p)))})),Nr(f,(function(P){h[P]!==void 0||mi(h,P)||(m[P]=!1,fr(p))}));else if(v===5){if(i(p)&&(fr(p),m.length=!0),h.length<f.length)for(var x=h.length;x<f.length;x++)m[x]=!1;else for(var S=f.length;S<h.length;S++)m[S]=!0;for(var E=Math.min(h.length,f.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var Ml,an,ta=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ph=typeof Map<"u",fh=typeof Set<"u",$l=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Bl=ta?Symbol.for("immer-nothing"):((Ml={})["immer-nothing"]=!0,Ml),Nl=ta?Symbol.for("immer-draftable"):"__$immer_draftable",Z=ta?Symbol.for("immer-state"):"__$immer_state";var hh=""+Object.prototype.constructor,gi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Hl=Object.getOwnPropertyDescriptors||function(e){var t={};return gi(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},qs={},ln={get:function(e,t){if(t===Z)return e;var r=pr(e);if(!mi(r,t))return(function(n,o,s){var a,l=kl(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!Ee(i)?i:i===js(e.t,t)?(zs(e),e.o[t]=Gs(e.A.h,i,e)):i},has:function(e,t){return t in pr(e)},ownKeys:function(e){return Reflect.ownKeys(pr(e))},set:function(e,t,r){var i=kl(pr(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=js(pr(e),t),o=n?.[Z];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Fl(r,n)&&(r!==void 0||mi(e.t,t)))return!0;zs(e),fr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return js(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,zs(e),fr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=pr(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){pe(12)}},sn={};Nr(ln,(function(e,t){sn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),sn.deleteProperty=function(e,t){return sn.set.call(this,e,t,void 0)},sn.set=function(e,t,r){return ln.set.call(this,e[0],t,r,e[0])};var mh=(function(){function e(r){var i=this;this.O=$l,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(v){var x=this;v===void 0&&(v=a);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return l.produce(v,(function(P){var gt;return(gt=o).call.apply(gt,[x,P].concat(E))}))}}var c;if(typeof o!="function"&&pe(6),s!==void 0&&typeof s!="function"&&pe(7),Ee(n)){var d=Pl(i),p=Gs(i,n,void 0),f=!0;try{c=o(p),f=!1}finally{f?Zn(d):Ks(d)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return Bs(d,s),Hs(v,d)}),(function(v){throw Zn(d),v})):(Bs(d,s),Hs(c,d))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===Bl&&(c=void 0),i.D&&Js(c,!0),s){var h=[],m=[];Ve("Patches").M(n,c,h,m),s(h,m)}return c}pe(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var d=arguments.length,p=Array(d>1?d-1:0),f=1;f<d;f++)p[f-1]=arguments[f];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(p))}))};var s,a,l=i.produce(n,o,(function(c,d){s=c,a=d}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Ee(r)||pe(8),Ye(r)&&(r=dh(r));var i=Pl(this),n=Gs(this,r,void 0);return n[Z].C=!0,Ks(i),n},t.finishDraft=function(r,i){var n=r&&r[Z],o=n.A;return Bs(o,i),Hs(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!$l&&pe(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=Ve("Patches").$;return Ye(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),re=new mh,gh=re.produce,Mg=re.produceWithPatches.bind(re),$g=re.setAutoFreeze.bind(re),Ng=re.setUseProxies.bind(re),Ug=re.applyPatches.bind(re),Fg=re.createDraft.bind(re),Vg=re.finishDraft.bind(re),Jn=gh;function Ur(e){"@babel/helpers - typeof";return Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(e)}function jl(e,t){if(Ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Ur(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zl(e){var t=jl(e,"string");return Ur(t)=="symbol"?t:t+""}function Wl(e,t,r){return(t=zl(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kl(Object(r),!0).forEach(function(i){Wl(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Pt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Gl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),ra=function(){return Math.random().toString(36).substring(7).split("").join(".")},Qn={INIT:"@@redux/INIT"+ra(),REPLACE:"@@redux/REPLACE"+ra(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ra()}};function vh(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ia(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pt(1));return r(ia)(e,t)}if(typeof e!="function")throw new Error(Pt(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function d(){if(l)throw new Error(Pt(3));return o}function p(v){if(typeof v!="function")throw new Error(Pt(4));if(l)throw new Error(Pt(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(Pt(6));x=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function f(v){if(!vh(v))throw new Error(Pt(7));if(typeof v.type>"u")throw new Error(Pt(8));if(l)throw new Error(Pt(9));try{l=!0,o=n(o,v)}finally{l=!1}for(var x=s=a,S=0;S<x.length;S++){var E=x[S];E()}return v}function h(v){if(typeof v!="function")throw new Error(Pt(10));n=v,f({type:Qn.REPLACE})}function m(){var v,x=p;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(Pt(11));function R(){E.next&&E.next(d())}R();var P=x(R);return{unsubscribe:P}}},v[Gl]=function(){return this},v}return f({type:Qn.INIT}),i={dispatch:f,subscribe:p,getState:d,replaceReducer:h},i[Gl]=m,i}function yh(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:Qn.INIT});if(typeof i>"u")throw new Error(Pt(12));if(typeof r(void 0,{type:Qn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pt(13))})}function ql(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{yh(r)}catch(l){a=l}return function(c,d){if(c===void 0&&(c={}),a)throw a;if(0)var p;for(var f=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],S=c[v],E=x(S,d);if(typeof E>"u"){var R=d&&d.type;throw new Error(Pt(14))}h[v]=E,f=f||E!==S}return f=f||o.length!==Object.keys(c).length,f?h:c}}function yi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Zl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(Pt(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=yi.apply(void 0,a)(n.dispatch),ea(ea({},n),{},{dispatch:o})}}}function Yl(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Xl=Yl();Xl.withExtraArgument=Yl;var na=Xl;var rc=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),bh=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},bi=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},xh=Object.defineProperty,Sh=Object.defineProperties,wh=Object.getOwnPropertyDescriptors,Jl=Object.getOwnPropertySymbols,Ah=Object.prototype.hasOwnProperty,Eh=Object.prototype.propertyIsEnumerable,Ql=function(e,t,r){return t in e?xh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},hr=function(e,t){for(var r in t||(t={}))Ah.call(t,r)&&Ql(e,r,t[r]);if(Jl)for(var i=0,n=Jl(t);i<n.length;i++){var r=n[i];Eh.call(t,r)&&Ql(e,r,t[r])}return e},oa=function(e,t){return Sh(e,wh(t))},Ch=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var _h=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yi:yi.apply(null,arguments)},nv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Th(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function mr(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return hr(hr({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var Oh=(function(e){rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,bi([void 0],r[0].concat(this)))):new(t.bind.apply(t,bi([void 0],r.concat(this))))},t})(Array),Rh=(function(e){rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,bi([void 0],r[0].concat(this)))):new(t.bind.apply(t,bi([void 0],r.concat(this))))},t})(Array);function la(e){return Ee(e)?Jn(e,function(){}):e}function Lh(e){return typeof e=="boolean"}function Ph(){return function(t){return Ih(t)}}function Ih(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new Oh;if(r&&(Lh(r)?c.push(na):c.push(na.withExtraArgument(r.extraArgument))),0){if(n)var d;if(s)var p;if(l)var f}return c}var sa=!0;function ic(e){var t=Ph(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,d=c===void 0?void 0:c,p=r.enhancers,f=p===void 0?void 0:p,h;if(typeof n=="function")h=n;else if(Th(n))h=ql(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!sa&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!sa&&m.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Zl.apply(void 0,m),x=yi;l&&(x=_h(hr({trace:!sa},typeof l=="object"&&l)));var S=new Rh(v),E=S;Array.isArray(f)?E=bi([v],f):typeof f=="function"&&(E=f(S));var R=x.apply(void 0,E);return ia(h,d,R)}function nc(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function kh(e){return typeof e=="function"}function Dh(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?nc(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(kh(e))l=function(){return la(e())};else{var c=la(e);l=function(){return c}}function d(p,f){p===void 0&&(p=l());var h=bi([o[f.type]],s.filter(function(m){var v=m.matcher;return v(f)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(Ye(m)){var x=m,S=v(x,f);return S===void 0?m:S}else{if(Ee(m))return Jn(m,function(E){return v(E,f)});var S=v(m,f);if(S===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return m},p)}return d.getInitialState=l,d}function Mh(e,t){return e+"/"+t}function oc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:la(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(d){var p=i[d],f=Mh(t,d),h,m;"reducer"in p?(h=p.reducer,m=p.prepare):h=p,o[d]=h,s[f]=h,a[d]=m?mr(f,m):mr(f)});function l(){var d=typeof e.extraReducers=="function"?nc(e.extraReducers):[e.extraReducers],p=d[0],f=p===void 0?{}:p,h=d[1],m=h===void 0?[]:h,v=d[2],x=v===void 0?void 0:v,S=hr(hr({},f),s);return Dh(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var P=0,gt=m;P<gt.length;P++){var dt=gt[P];E.addMatcher(dt.matcher,dt.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:t,reducer:function(d,p){return c||(c=l()),c(d,p)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var $h="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Nh=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=$h[Math.random()*64|0];return t},Uh=["name","message","stack","code"],aa=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),tc=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Fh=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Uh;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},lv=(function(){function e(t,r,i){var n=mr(t+"/fulfilled",function(d,p,f,h){return{payload:d,meta:oa(hr({},h||{}),{arg:f,requestId:p,requestStatus:"fulfilled"})}}),o=mr(t+"/pending",function(d,p,f){return{payload:void 0,meta:oa(hr({},f||{}),{arg:p,requestId:d,requestStatus:"pending"})}}),s=mr(t+"/rejected",function(d,p,f,h,m){return{payload:h,error:(i&&i.serializeError||Fh)(d||"Rejected"),meta:oa(hr({},m||{}),{arg:f,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d})();function c(d){return function(p,f,h){var m=i?.idGenerator?i.idGenerator(d):Nh(),v=new l,x,S=!1;function E(P){x=P,v.abort()}var R=(function(){return Ch(this,null,function(){var P,gt,dt,cr,$s,ur,te;return bh(this,function(ue){switch(ue.label){case 0:return ue.trys.push([0,4,,5]),cr=(P=i?.condition)==null?void 0:P.call(i,d,{getState:f,extra:h}),Bh(cr)?[4,cr]:[3,2];case 1:cr=ue.sent(),ue.label=2;case 2:if(cr===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,$s=new Promise(function(ee,Dr){return v.signal.addEventListener("abort",function(){return Dr({name:"AbortError",message:x||"Aborted"})})}),p(o(m,d,(gt=i?.getPendingMeta)==null?void 0:gt.call(i,{requestId:m,arg:d},{getState:f,extra:h}))),[4,Promise.race([$s,Promise.resolve(r(d,{dispatch:p,getState:f,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(ee,Dr){return new aa(ee,Dr)},fulfillWithValue:function(ee,Dr){return new tc(ee,Dr)}})).then(function(ee){if(ee instanceof aa)throw ee;return ee instanceof tc?n(ee.payload,m,d,ee.meta):n(ee,m,d)})])];case 3:return dt=ue.sent(),[3,5];case 4:return ur=ue.sent(),dt=ur instanceof aa?s(null,m,d,ur.payload,ur.meta):s(ur,m,d),[3,5];case 5:return te=i&&!i.dispatchConditionRejection&&s.match(dt)&&dt.meta.condition,te||p(dt),[2,dt]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:d,unwrap:function(){return R.then(Vh)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Vh(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Bh(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sc="listener",ac="completed",lc="cancelled",cv="task-"+lc,uv="task-"+ac,dv=sc+"-"+lc,pv=sc+"-"+ac;var ca="listenerMiddleware";var fv=mr(ca+"/add"),hv=mr(ca+"/removeAll"),mv=mr(ca+"/remove");var ec,gv=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(ec||(ec=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Hh=function(e){return function(t){setTimeout(t,e)}},vv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Hh(10);Vl();var jh=jn(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),to=class extends jh(Object){};window.ftReduxStores||(window.ftReduxStores={});var cc=class e extends to{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(qn(o))return o;if(n==null)return;let s=oc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=ic({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let d=rn(s.getInitialState());for(let p of c.keeping)d[p]=(l??d)[p];return d}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new zn;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...d)=>{let p=c(...d.map(n));return this.reduxStore.dispatch(p),p}:d=>{this.setState({[l]:n(d)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var eo=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var ro=u(g()),zh="ft-app-info",Be=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Be.eventName="authentication-change";var Fr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Fr.eventName="ui-locale-changed";var Wh={session:(e,t)=>{(0,ro.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new Be(t.payload)),0))}},w=ro.FtReduxStore.get({name:zh,reducers:Wh,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,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var uc=u(g()),io=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},dc=(0,uc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>eo.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return io([(0,ua.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),io([(0,ua.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),io([Vs({store:w.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),io([Vs({store:w.name})],t.prototype,"uiLocale",void 0),t});var pc;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(pc||(pc={}));var fc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(fc||(fc={}));var hc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(hc||(hc={}));var mc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(mc||(mc={}));var gc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(gc||(gc={}));var vc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(vc||(vc={}));var yc;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(yc||(yc={}));var bc;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(bc||(bc={}));var xc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(xc||(xc={}));var Sc;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(Sc||(Sc={}));var wc;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(wc||(wc={}));var Ac;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(Ac||(Ac={}));var Ec;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(Ec||(Ec={}));var Cc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(Cc||(Cc={}));var At;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(At||(At={}));var _c;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(_c||(_c={}));var Tc;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(Tc||(Tc={}));var Oc;(function(e){e.ASC="ASC",e.DESC="DESC"})(Oc||(Oc={}));var Rc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(Rc||(Rc={}));var Lc;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Lc||(Lc={}));var Pc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Pc||(Pc={}));var no;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(no||(no={}));var Ic;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ic||(Ic={}));var kc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(kc||(kc={}));var Dc;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Dc||(Dc={}));var Mc;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(Mc||(Mc={}));var $c;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})($c||($c={}));var tt;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(tt||(tt={}));var fe;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(fe||(fe={}));var Nc;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Nc||(Nc={}));var Uc;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Uc||(Uc={}));var Fc;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Fc||(Fc={}));var Vc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Vc||(Vc={}));var Bc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(Bc||(Bc={}));var Hc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Hc||(Hc={}));var jc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(jc||(jc={}));var zc;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(zc||(zc={}));var Wc;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})(Wc||(Wc={}));var Kc;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Kc||(Kc={}));var Gc;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Gc||(Gc={}));var oo;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(oo||(oo={}));var Kh={[tt.PERSONAL_BOOK_SHARE_USER]:[tt.PERSONAL_BOOK_USER],[tt.HTML_EXPORT_USER]:[tt.PERSONAL_BOOK_USER],[tt.PDF_EXPORT_USER]:[tt.PERSONAL_BOOK_USER],[tt.KHUB_ADMIN]:[tt.CONTENT_PUBLISHER],[tt.ADMIN]:[tt.KHUB_ADMIN,tt.USERS_ADMIN,tt.PORTAL_ADMIN,tt.BEHAVIOR_DATA_USER],[tt.GENERATIVE_AI_EXPORT_USER]:[tt.GENERATIVE_AI_USER]};function qc(e,t){return e===t||(Kh[e]??[]).some(r=>qc(r,t))}function cn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>qc(i,t))}var uo=u(g());var da=u(g());var He=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=w.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var xi=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:He.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):He.await()}};var Ct=class extends xi{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new da.CacheRegistry,this.cache=t?n.commonCache:new da.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var so=class extends Ct{async listMySearches(){let{session:t}=w.getState();return cn(t,tt.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var ao=class extends Ct{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var lo=class extends Ct{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var co=class extends Ct{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var Gh="ft-user-assets",qh={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(fe).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;fa(e,r,[...pa(e,r),n]),Zc(e,r,1,i),Yc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;fa(e,r,pa(e,r).map(n=>n.id===i.id?i:n)),Yc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;fa(e,r,pa(e,r).filter(o=>o.id!==n)),Zc(e,r,-1,i)}},Xc={[fe.SEARCHES]:"savedSearches",[fe.BOOKMARKS]:"bookmarks",[fe.BOOKS]:void 0,[fe.COLLECTIONS]:void 0},pa=(e,t)=>{var r;let i=Xc[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},fa=(e,t,r)=>{let i=Xc[t];i&&(e[i]=r)},Zc=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===fe.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Yc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Ut=uo.FtReduxStore.get({name:Gh,reducers:qh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(fe).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),ha=class{constructor(t=new lo,r=new co){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ao,this.savedSearchesService=new so,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,uo.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ut.actions.clearAssetCount(),Ut.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ut.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ut.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ut.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ut.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ut.getState().assetCounts.allAsset[t]!==r.count&&Ut.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ut.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ut.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ut.getState().assetCounts.bookmarkByMap).length!==0;t===fe.BOOKMARKS&&r&&Ut.actions.clearBookmarkCountByMap(),Ut.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ut.actions.bookmarks(r)}}},Zh=new ha;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Zh);var ma=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new ma;var he=u(g());var Jc,Si=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Yh=Symbol("clearAfterUnitTest"),po=class extends(0,he.withEventBus)(Ct){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Jc]=()=>{this.defaultMessages={},this.cache=new he.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,he.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new he.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof he.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new Si({loadedContexts:t})),this.dispatchEvent(new Si({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new Si({loadedContexts:[t]})),this.dispatchEvent(new Si({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,he.delay)(0).then(()=>i()).catch(()=>null)))}};Jc=Yh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends po{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends po{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var wi=window.FluidTopicsI18nService,fo=window.FluidTopicsCustomI18nService;var Qc=u(g()),ga=class{highlightHtml(t,r,i){(0,Qc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new ga;var tu=u(g());var va=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return tu.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new va;var eu=u(g());var un=class{static get(t,r){var i,n,o,s;let a=w.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new eu.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var ya=class{urlToSearchRequest(t){return un.get().parse(t)}searchRequestToUrl(t){return un.get().serialize(t)}};window.FluidTopicsUrlService=new ya;var Xe=u(g());var Vr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Vr.eventName="change";var ba=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},ru=new ba;var ho=class e extends Xe.WithEventBus{static build(){return new e(window.history,ru,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Xe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Vr(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(Vr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Vr.eventName,t)}currentItem(){return(0,Xe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Xe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Xe.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Xe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=ho.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var mo=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var iu=u(A());var nu=iu.css`
|
|
2
|
-
`;var
|
|
1
|
+
"use strict";(()=>{var Bf=Object.create;var el=Object.defineProperty;var Hf=Object.getOwnPropertyDescriptor;var jf=Object.getOwnPropertyNames;var zf=Object.getPrototypeOf,Wf=Object.prototype.hasOwnProperty;var ii=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Kf=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of jf(t))!Wf.call(e,n)&&n!==r&&el(e,n,{get:()=>t[n],enumerable:!(i=Hf(t,n))||i.enumerable});return e};var u=(e,t,r)=>(r=e!=null?Bf(zf(e)):{},Kf(t||!e||!e.__esModule?el(r,"default",{value:e,enumerable:!0}):r,e));var g=ii((Tm,rl)=>{rl.exports=ftGlobals.wcUtils});var N=ii((Om,il)=>{il.exports=ftGlobals.litDecorators});var A=ii((Qm,al)=>{al.exports=ftGlobals.lit});var xi=ii((ox,au)=>{au.exports=ftGlobals.litRepeat});var _a=ii((Ux,Hu)=>{Hu.exports=ftGlobals.litUnsafeHTML});var ee=ii((Xw,md)=>{md.exports=ftGlobals.litClassMap});var Vf=u(g());var ol=u(g()),sl=u(N());var Ke=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var ni=class{constructor(t,r,i,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=t,r.context!==void 0){let o=r;this.context=o.context,this.callback=o.callback,this.subscribe=o.subscribe??!1}else this.context=r,this.callback=i,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 Ke(this.context,this.host,this.t,this.subscribe))}};var Dn=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,r=!1){let i=r||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[r,{disposer:i}]of this.subscriptions)r(this.o,i)},t!==void 0&&(this.value=t)}addCallback(t,r,i){if(!i)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:r});let{disposer:n}=this.subscriptions.get(t);t(this.value,n)}clearCallbacks(){this.subscriptions.clear()}};var Rs=class extends Event{constructor(t,r){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r}},oi=class extends Dn{constructor(t,r,i){super(r.context!==void 0?r.initialValue:i),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 Ke(this.context,a,s,!0)));n.stopPropagation()},this.host=t,r.context!==void 0?this.context=r.context:this.context=r,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 Rs(this.context,this.host))}};var Gi=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new Ke(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function qi({context:e}){return(t,r)=>{let i=new WeakMap;if(typeof r=="object")return{get(){return t.get.call(this)},set(n){return i.get(this).setValue(n),t.set.call(this,n)},init(n){return i.set(this,new oi(this,{context:e,initialValue:n})),n}};{t.constructor.addInitializer((s=>{i.set(s,new oi(s,{context:e}))}));let n=Object.getOwnPropertyDescriptor(t,r),o;if(n===void 0){let s=new WeakMap;o={get(){return s.get(this)},set(a){i.get(this).setValue(a),s.set(this,a)},configurable:!0,enumerable:!0}}else{let s=n.set;o={...n,set(a){i.get(this).setValue(a),s?.call(this,a)}}}return void Object.defineProperty(t,r,o)}}}function Yi({context:e,subscribe:t}){return(r,i)=>{typeof i=="object"?i.addInitializer((function(){new ni(this,{context:e,callback:n=>{r.set.call(this,n)},subscribe:t})})):r.constructor.addInitializer((n=>{new ni(n,{context:e,callback:o=>{n[i]=o},subscribe:t})}))}}var Gf=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ls=Symbol("asset-viewer-state-manager"),Me=(0,ol.applyMixinOnce)(Symbol("toFtAssetViewerComponent"),function(e){class t extends e{willUpdate(i){super.willUpdate(i),i.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 Gf([Yi({context:Ls,subscribe:!0}),(0,sl.state)()],t.prototype,"viewerStateManager",void 0),t});var ru=u(A()),bi=u(g());var ll=u(g()),qf={setZoom:(e,t)=>{e.contentModifiers.zoom=t.payload},setRotation:(e,t)=>{e.contentModifiers.rotation=t.payload}},Mn=e=>ll.FtReduxStore.get({name:"ft-viewer-"+e,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:qf});var cl=u(g()),si=class extends cl.FtStateManager{constructor(t){super(),this.store=t}setZoom(t){this.store.actions.setZoom(t)}setRotation(t){this.store.actions.setRotation(t)}};var ra=u(N());var ul=u(N(),1);var Ps=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function dl(e,t){return(0,ul.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return Zi(e);try{return JSON.parse(r)}catch{return Zi(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:Xi,...t??{}})}function Yf(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!ai(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!ai(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!ai(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function ai(e,t){try{return Yf(e,t)}catch{return!1}}function Xi(e,t){return!ai(e,t)}function Zi(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function $n(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var pl=u(N(),1);var ks=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:Xi,attribute:!1,...t};(0,pl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Nn=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var Or=u(N(),1);var Un=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var hl=u(A(),1);var Fn=globalThis,Zf=Fn.ShadowRoot&&(Fn.ShadyCSS===void 0||Fn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var fl=(e,t)=>{if(Zf)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Fn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Vn=class extends hl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return fl(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Ps(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function ml(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var ci=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},bl,gl=Symbol("constructorPrototype"),vl=Symbol("constructorName"),xl=Symbol("exportpartsDebouncer"),yl=Symbol("dynamicDependenciesLoaded"),li=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};li.eventName="exportparts-updated";var $e=class extends Vn{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[bl]=new Un(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[xl].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[vl]=this.constructor.name,this[gl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[vl]&&Object.setPrototypeOf(this,this[gl])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[yl]||(r[yl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(li.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(li.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new li)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=ml(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.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(t){var r,i,n,o,s,a;let l=f=>f!=null&&f.trim().length>0,c=t.filter(l).map(f=>f.trim());if(c.length===0){this.exportparts=void 0;return}let d=new Set;for(let f of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=f.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=f.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],v=[...h,...m].filter(l).map(x=>x.trim());for(let x of v)d.add(x)}if(d.size===0){this.exportparts=void 0;return}let p=[...d.values()].flatMap(f=>c.map(h=>`${f}:${h}--${f}`));this.exportparts=[...this.part,...p].join(", ")}};bl=xl;ci([(0,Or.property)()],$e.prototype,"exportpartsPrefix",void 0);ci([dl([])],$e.prototype,"exportpartsPrefixes",void 0);ci([(0,Or.property)({reflect:!0})],$e.prototype,"exportparts",void 0);ci([(0,Or.property)()],$e.prototype,"customStylesheet",void 0);ci([(0,Or.property)()],$e.prototype,"elementToFocus",void 0);ci([(0,Or.state)()],$e.prototype,"useAdoptedStyleSheets",void 0);function Bn(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var Ji=Symbol("internalReduxEventsUnsubscribers"),sr=Symbol("internalStoresUnsubscribers"),Rr=Symbol("internalStores"),Xf=$n(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[Rr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Rr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[Rr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[Rr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[Rr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[Rr].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[sr].has(s.store):this[sr].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[sr].set(s,a.subscribe(()=>this.updateFromStores())),this[Ji].set(s,[]),Bn(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,d)=>{if(typeof this[d]=="function"&&(!c.store||a.name===c.store)){let p=f=>this[d](f);a.addEventListener(c.eventName,p),this[Ji].get(s).push(()=>a.removeEventListener(c.eventName,p))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[sr].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[sr].has(s)&&this[sr].get(s)(),this[sr].delete(s),(a=this[Ji].get(s))===null||a===void 0||a.forEach(l=>l()),this[Ji].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=sr,r=Rr,i=Ji,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),Sl=class extends Xf($e){};function ae(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ge(e){return!!e&&!!e[Y]}function xe(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===oh})(e)||Array.isArray(e)||!!e[Ol]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ol])||Bs(e)||Hs(e))}function Lr(e,t,r){r===void 0&&(r=!1),pi(e)===0?(r?Object.keys:di)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function pi(e){var t=e[Y];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Bs(e)?2:Hs(e)?3:0}function ui(e,t){return pi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jf(e,t){return pi(e)===2?e.get(t):e[t]}function Rl(e,t,r){var i=pi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function Ll(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Bs(e){return ih&&e instanceof Map}function Hs(e){return nh&&e instanceof Set}function ar(e){return e.o||e.t}function js(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Il(e);delete t[Y];for(var r=di(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function zs(e,t){return t===void 0&&(t=!1),Ws(e)||Ge(e)||!xe(e)||(pi(e)>1&&(e.set=e.add=e.clear=e.delete=Qf),Object.freeze(e),t&&Lr(e,(function(r,i){return zs(i,!0)}),!0)),e}function Qf(){ae(2)}function Ws(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ne(e){var t=Vs[e];return t||ae(18,e),t}function th(e,t){Vs[e]||(Vs[e]=t)}function Ns(){return tn}function Is(e,t){t&&(Ne("Patches"),e.u=[],e.s=[],e.v=t)}function Hn(e){Us(e),e.p.forEach(eh),e.p=null}function Us(e){e===tn&&(tn=e.l)}function wl(e){return tn={p:[],l:tn,h:e,m:!0,_:0}}function eh(e){var t=e[Y];t.i===0||t.i===1?t.j():t.g=!0}function Ds(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Ne("ES5").S(t,e,i),i?(r[Y].P&&(Hn(t),ae(4)),xe(e)&&(e=jn(t,e),t.l||zn(t,e)),t.u&&Ne("Patches").M(r[Y].t,e,t.u,t.s)):e=jn(t,r,[]),Hn(t),t.u&&t.v(t.u,t.s),e!==kl?e:void 0}function jn(e,t,r){if(Ws(t))return t;var i=t[Y];if(!i)return Lr(t,(function(a,l){return Al(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return zn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=js(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),Lr(o,(function(a,l){return Al(e,i,n,a,l,r,s)})),zn(e,n,!1),r&&e.u&&Ne("Patches").N(i,r,e.u,e.s)}return i.o}function Al(e,t,r,i,n,o,s){if(Ge(n)){var a=jn(e,n,o&&t&&t.i!==3&&!ui(t.R,i)?o.concat(i):void 0);if(Rl(r,i,a),!Ge(a))return;e.m=!1}else s&&r.add(n);if(xe(n)&&!Ws(n)){if(!e.h.D&&e._<1)return;jn(e,n),t&&t.A.l||zn(e,n)}}function zn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&zs(t,r)}function Ms(e,t){var r=e[Y];return(r?ar(r):e)[t]}function El(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function lr(e){e.P||(e.P=!0,e.l&&lr(e.l))}function $s(e){e.o||(e.o=js(e.t))}function Fs(e,t,r){var i=Bs(t)?Ne("MapSet").F(t,r):Hs(t)?Ne("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Ns(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=en;s&&(l=[a],c=Qi);var d=Proxy.revocable(l,c),p=d.revoke,f=d.proxy;return a.k=f,a.j=p,f})(t,r):Ne("ES5").J(t,r);return(r?r.A:Ns()).p.push(i),i}function rh(e){return Ge(e)||ae(22,e),(function t(r){if(!xe(r))return r;var i,n=r[Y],o=pi(r);if(n){if(!n.P&&(n.i<4||!Ne("ES5").K(n)))return n.t;n.I=!0,i=Cl(r,o),n.I=!1}else i=Cl(r,o);return Lr(i,(function(s,a){n&&Jf(n.t,s)===a||Rl(i,s,t(a))})),o===3?new Set(i):i})(e)}function Cl(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return js(e)}function Pl(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[Y];return en.get(c,s)},set:function(c){var d=this[Y];en.set(d,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][Y];if(!l.P)switch(l.i){case 5:i(l)&&lr(l);break;case 4:r(l)&&lr(l)}}}function r(s){for(var a=s.t,l=s.k,c=di(l),d=c.length-1;d>=0;d--){var p=c[d];if(p!==Y){var f=a[p];if(f===void 0&&!ui(a,p))return!0;var h=l[p],m=h&&h[Y];if(m?m.t!==f:!Ll(h,f))return!0}}var v=!!a[Y];return c.length!==di(a).length+(v?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&ae(3,JSON.stringify(ar(s)))}var o={};th("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(p,f){if(p){for(var h=Array(f.length),m=0;m<f.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var v=Il(f);delete v[Y];for(var x=di(v),S=0;S<x.length;S++){var E=x[S];v[E]=e(E,p||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(f),v)})(l,s),d={i:l?5:4,A:a?a.A:Ns(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,Y,{value:d,writable:!0}),c},S:function(s,a,l){l?Ge(a)&&a[Y].A===s&&t(s.p):(s.u&&(function c(d){if(d&&typeof d=="object"){var p=d[Y];if(p){var f=p.t,h=p.k,m=p.R,v=p.i;if(v===4)Lr(h,(function(P){P!==Y&&(f[P]!==void 0||ui(f,P)?m[P]||c(h[P]):(m[P]=!0,lr(p)))})),Lr(f,(function(P){h[P]!==void 0||ui(h,P)||(m[P]=!1,lr(p))}));else if(v===5){if(i(p)&&(lr(p),m.length=!0),h.length<f.length)for(var x=h.length;x<f.length;x++)m[x]=!1;else for(var S=f.length;S<h.length;S++)m[S]=!0;for(var E=Math.min(h.length,f.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var _l,tn,Ks=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ih=typeof Map<"u",nh=typeof Set<"u",Tl=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",kl=Ks?Symbol.for("immer-nothing"):((_l={})["immer-nothing"]=!0,_l),Ol=Ks?Symbol.for("immer-draftable"):"__$immer_draftable",Y=Ks?Symbol.for("immer-state"):"__$immer_state";var oh=""+Object.prototype.constructor,di=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Il=Object.getOwnPropertyDescriptors||function(e){var t={};return di(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Vs={},en={get:function(e,t){if(t===Y)return e;var r=ar(e);if(!ui(r,t))return(function(n,o,s){var a,l=El(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!xe(i)?i:i===Ms(e.t,t)?($s(e),e.o[t]=Fs(e.A.h,i,e)):i},has:function(e,t){return t in ar(e)},ownKeys:function(e){return Reflect.ownKeys(ar(e))},set:function(e,t,r){var i=El(ar(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=Ms(ar(e),t),o=n?.[Y];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Ll(r,n)&&(r!==void 0||ui(e.t,t)))return!0;$s(e),lr(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ms(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,$s(e),lr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=ar(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){ae(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ae(12)}},Qi={};Lr(en,(function(e,t){Qi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Qi.deleteProperty=function(e,t){return Qi.set.call(this,e,t,void 0)},Qi.set=function(e,t,r){return en.set.call(this,e[0],t,r,e[0])};var sh=(function(){function e(r){var i=this;this.O=Tl,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(v){var x=this;v===void 0&&(v=a);for(var S=arguments.length,E=Array(S>1?S-1:0),R=1;R<S;R++)E[R-1]=arguments[R];return l.produce(v,(function(P){var gt;return(gt=o).call.apply(gt,[x,P].concat(E))}))}}var c;if(typeof o!="function"&&ae(6),s!==void 0&&typeof s!="function"&&ae(7),xe(n)){var d=wl(i),p=Fs(i,n,void 0),f=!0;try{c=o(p),f=!1}finally{f?Hn(d):Us(d)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(v){return Is(d,s),Ds(v,d)}),(function(v){throw Hn(d),v})):(Is(d,s),Ds(c,d))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===kl&&(c=void 0),i.D&&zs(c,!0),s){var h=[],m=[];Ne("Patches").M(n,c,h,m),s(h,m)}return c}ae(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var d=arguments.length,p=Array(d>1?d-1:0),f=1;f<d;f++)p[f-1]=arguments[f];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(p))}))};var s,a,l=i.produce(n,o,(function(c,d){s=c,a=d}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){xe(r)||ae(8),Ge(r)&&(r=rh(r));var i=wl(this),n=Fs(this,r,void 0);return n[Y].C=!0,Us(i),n},t.finishDraft=function(r,i){var n=r&&r[Y],o=n.A;return Is(o,i),Ds(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Tl&&ae(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=Ne("Patches").$;return Ge(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),Jt=new sh,ah=Jt.produce,_g=Jt.produceWithPatches.bind(Jt),Tg=Jt.setAutoFreeze.bind(Jt),Og=Jt.setUseProxies.bind(Jt),Rg=Jt.applyPatches.bind(Jt),Lg=Jt.createDraft.bind(Jt),Pg=Jt.finishDraft.bind(Jt),Wn=ah;function Pr(e){"@babel/helpers - typeof";return Pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(e)}function Dl(e,t){if(Pr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Pr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ml(e){var t=Dl(e,"string");return Pr(t)=="symbol"?t:t+""}function $l(e,t,r){return(t=Ml(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Gs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nl(Object(r),!0).forEach(function(i){$l(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Lt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Ul=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),qs=function(){return Math.random().toString(36).substring(7).split("").join(".")},Kn={INIT:"@@redux/INIT"+qs(),REPLACE:"@@redux/REPLACE"+qs(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+qs()}};function lh(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ys(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Lt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Lt(1));return r(Ys)(e,t)}if(typeof e!="function")throw new Error(Lt(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function d(){if(l)throw new Error(Lt(3));return o}function p(v){if(typeof v!="function")throw new Error(Lt(4));if(l)throw new Error(Lt(5));var x=!0;return c(),a.push(v),function(){if(x){if(l)throw new Error(Lt(6));x=!1,c();var E=a.indexOf(v);a.splice(E,1),s=null}}}function f(v){if(!lh(v))throw new Error(Lt(7));if(typeof v.type>"u")throw new Error(Lt(8));if(l)throw new Error(Lt(9));try{l=!0,o=n(o,v)}finally{l=!1}for(var x=s=a,S=0;S<x.length;S++){var E=x[S];E()}return v}function h(v){if(typeof v!="function")throw new Error(Lt(10));n=v,f({type:Kn.REPLACE})}function m(){var v,x=p;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(Lt(11));function R(){E.next&&E.next(d())}R();var P=x(R);return{unsubscribe:P}}},v[Ul]=function(){return this},v}return f({type:Kn.INIT}),i={dispatch:f,subscribe:p,getState:d,replaceReducer:h},i[Ul]=m,i}function ch(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:Kn.INIT});if(typeof i>"u")throw new Error(Lt(12));if(typeof r(void 0,{type:Kn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Lt(13))})}function Fl(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{ch(r)}catch(l){a=l}return function(c,d){if(c===void 0&&(c={}),a)throw a;if(0)var p;for(var f=!1,h={},m=0;m<o.length;m++){var v=o[m],x=r[v],S=c[v],E=x(S,d);if(typeof E>"u"){var R=d&&d.type;throw new Error(Lt(14))}h[v]=E,f=f||E!==S}return f=f||o.length!==Object.keys(c).length,f?h:c}}function fi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Vl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(Lt(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=fi.apply(void 0,a)(n.dispatch),Gs(Gs({},n),{},{dispatch:o})}}}function Bl(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Hl=Bl();Hl.withExtraArgument=Bl;var Zs=Hl;var Gl=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),uh=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},hi=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},dh=Object.defineProperty,ph=Object.defineProperties,fh=Object.getOwnPropertyDescriptors,jl=Object.getOwnPropertySymbols,hh=Object.prototype.hasOwnProperty,mh=Object.prototype.propertyIsEnumerable,zl=function(e,t,r){return t in e?dh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},cr=function(e,t){for(var r in t||(t={}))hh.call(t,r)&&zl(e,r,t[r]);if(jl)for(var i=0,n=jl(t);i<n.length;i++){var r=n[i];mh.call(t,r)&&zl(e,r,t[r])}return e},Xs=function(e,t){return ph(e,fh(t))},gh=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var vh=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fi:fi.apply(null,arguments)},Yg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function yh(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function ur(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return cr(cr({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var bh=(function(e){Gl(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,hi([void 0],r[0].concat(this)))):new(t.bind.apply(t,hi([void 0],r.concat(this))))},t})(Array),xh=(function(e){Gl(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,hi([void 0],r[0].concat(this)))):new(t.bind.apply(t,hi([void 0],r.concat(this))))},t})(Array);function ta(e){return xe(e)?Wn(e,function(){}):e}function Sh(e){return typeof e=="boolean"}function wh(){return function(t){return Ah(t)}}function Ah(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new bh;if(r&&(Sh(r)?c.push(Zs):c.push(Zs.withExtraArgument(r.extraArgument))),0){if(n)var d;if(s)var p;if(l)var f}return c}var Js=!0;function ql(e){var t=wh(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,d=c===void 0?void 0:c,p=r.enhancers,f=p===void 0?void 0:p,h;if(typeof n=="function")h=n;else if(yh(n))h=Fl(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!Js&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Js&&m.some(function(P){return typeof P!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Vl.apply(void 0,m),x=fi;l&&(x=vh(cr({trace:!Js},typeof l=="object"&&l)));var S=new xh(v),E=S;Array.isArray(f)?E=hi([v],f):typeof f=="function"&&(E=f(S));var R=x.apply(void 0,E);return Ys(h,d,R)}function Yl(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function Eh(e){return typeof e=="function"}function Ch(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?Yl(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(Eh(e))l=function(){return ta(e())};else{var c=ta(e);l=function(){return c}}function d(p,f){p===void 0&&(p=l());var h=hi([o[f.type]],s.filter(function(m){var v=m.matcher;return v(f)}).map(function(m){var v=m.reducer;return v}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,v){if(v)if(Ge(m)){var x=m,S=v(x,f);return S===void 0?m:S}else{if(xe(m))return Wn(m,function(E){return v(E,f)});var S=v(m,f);if(S===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}return m},p)}return d.getInitialState=l,d}function _h(e,t){return e+"/"+t}function Zl(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:ta(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(d){var p=i[d],f=_h(t,d),h,m;"reducer"in p?(h=p.reducer,m=p.prepare):h=p,o[d]=h,s[f]=h,a[d]=m?ur(f,m):ur(f)});function l(){var d=typeof e.extraReducers=="function"?Yl(e.extraReducers):[e.extraReducers],p=d[0],f=p===void 0?{}:p,h=d[1],m=h===void 0?[]:h,v=d[2],x=v===void 0?void 0:v,S=cr(cr({},f),s);return Ch(r,function(E){for(var R in S)E.addCase(R,S[R]);for(var P=0,gt=m;P<gt.length;P++){var dt=gt[P];E.addMatcher(dt.matcher,dt.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:t,reducer:function(d,p){return c||(c=l()),c(d,p)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Th="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Oh=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Th[Math.random()*64|0];return t},Rh=["name","message","stack","code"],Qs=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Wl=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Lh=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Rh;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},Qg=(function(){function e(t,r,i){var n=ur(t+"/fulfilled",function(d,p,f,h){return{payload:d,meta:Xs(cr({},h||{}),{arg:f,requestId:p,requestStatus:"fulfilled"})}}),o=ur(t+"/pending",function(d,p,f){return{payload:void 0,meta:Xs(cr({},f||{}),{arg:p,requestId:d,requestStatus:"pending"})}}),s=ur(t+"/rejected",function(d,p,f,h,m){return{payload:h,error:(i&&i.serializeError||Lh)(d||"Rejected"),meta:Xs(cr({},m||{}),{arg:f,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:d?.name==="AbortError",condition:d?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function d(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return d.prototype.abort=function(){},d})();function c(d){return function(p,f,h){var m=i?.idGenerator?i.idGenerator(d):Oh(),v=new l,x,S=!1;function E(P){x=P,v.abort()}var R=(function(){return gh(this,null,function(){var P,gt,dt,nr,Os,or,Zt;return uh(this,function(se){switch(se.label){case 0:return se.trys.push([0,4,,5]),nr=(P=i?.condition)==null?void 0:P.call(i,d,{getState:f,extra:h}),kh(nr)?[4,nr]:[3,2];case 1:nr=se.sent(),se.label=2;case 2:if(nr===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return S=!0,Os=new Promise(function(Xt,Tr){return v.signal.addEventListener("abort",function(){return Tr({name:"AbortError",message:x||"Aborted"})})}),p(o(m,d,(gt=i?.getPendingMeta)==null?void 0:gt.call(i,{requestId:m,arg:d},{getState:f,extra:h}))),[4,Promise.race([Os,Promise.resolve(r(d,{dispatch:p,getState:f,extra:h,requestId:m,signal:v.signal,abort:E,rejectWithValue:function(Xt,Tr){return new Qs(Xt,Tr)},fulfillWithValue:function(Xt,Tr){return new Wl(Xt,Tr)}})).then(function(Xt){if(Xt instanceof Qs)throw Xt;return Xt instanceof Wl?n(Xt.payload,m,d,Xt.meta):n(Xt,m,d)})])];case 3:return dt=se.sent(),[3,5];case 4:return or=se.sent(),dt=or instanceof Qs?s(null,m,d,or.payload,or.meta):s(or,m,d),[3,5];case 5:return Zt=i&&!i.dispatchConditionRejection&&s.match(dt)&&dt.meta.condition,Zt||p(dt),[2,dt]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:d,unwrap:function(){return R.then(Ph)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Ph(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kh(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Xl="listener",Jl="completed",Ql="cancelled",tv="task-"+Ql,ev="task-"+Jl,rv=Xl+"-"+Ql,iv=Xl+"-"+Jl;var ea="listenerMiddleware";var nv=ur(ea+"/add"),ov=ur(ea+"/removeAll"),sv=ur(ea+"/remove");var Kl,av=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Kl||(Kl=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Ih=function(e){return function(t){setTimeout(t,e)}},lv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ih(10);Pl();var Dh=$n(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),Gn=class extends Dh(Object){};window.ftReduxStores||(window.ftReduxStores={});var tc=class e extends Gn{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(Bn(o))return o;if(n==null)return;let s=Zl({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=ql({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let d=Zi(s.getInitialState());for(let p of c.keeping)d[p]=(l??d)[p];return d}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Nn;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...d)=>{let p=c(...d.map(n));return this.reduxStore.dispatch(p),p}:d=>{let p=l,f=this.getState()[p];ai(f,d)||this.setState({[p]:n(d)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var qn=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var Yn=u(g()),Mh="ft-app-info",Ue=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ue.eventName="authentication-change";var kr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};kr.eventName="ui-locale-changed";var $h={session:(e,t)=>{(0,Yn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>w.dispatchEvent(new Ue(t.payload)),0))}},w=Yn.FtReduxStore.get({name:Mh,reducers:$h,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,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var ec=u(g()),Zn=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},rc=(0,ec.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(w)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>qn.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Zn([(0,ra.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),Zn([(0,ra.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),Zn([ks({store:w.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),Zn([ks({store:w.name})],t.prototype,"uiLocale",void 0),t});var ic;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(ic||(ic={}));var nc;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(nc||(nc={}));var oc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(oc||(oc={}));var sc;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(sc||(sc={}));var ac;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(ac||(ac={}));var lc;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(lc||(lc={}));var cc;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(cc||(cc={}));var uc;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(uc||(uc={}));var dc;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(dc||(dc={}));var pc;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(pc||(pc={}));var fc;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(fc||(fc={}));var hc;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(hc||(hc={}));var mc;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(mc||(mc={}));var gc;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(gc||(gc={}));var At;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(At||(At={}));var vc;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(vc||(vc={}));var yc;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(yc||(yc={}));var bc;(function(e){e.ASC="ASC",e.DESC="DESC"})(bc||(bc={}));var xc;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(xc||(xc={}));var Sc;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Sc||(Sc={}));var wc;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(wc||(wc={}));var Xn;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Xn||(Xn={}));var Ac;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ac||(Ac={}));var Ec;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(Ec||(Ec={}));var Cc;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Cc||(Cc={}));var _c;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(_c||(_c={}));var Tc;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Tc||(Tc={}));var tt;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(tt||(tt={}));var le;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(le||(le={}));var Oc;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Oc||(Oc={}));var Rc;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Rc||(Rc={}));var Lc;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Lc||(Lc={}));var Pc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(Pc||(Pc={}));var kc;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(kc||(kc={}));var Ic;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ic||(Ic={}));var Dc;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Dc||(Dc={}));var Mc;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Mc||(Mc={}));var $c;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})($c||($c={}));var Nc;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Nc||(Nc={}));var Uc;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Uc||(Uc={}));var Jn;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Jn||(Jn={}));var Nh={[tt.PERSONAL_BOOK_SHARE_USER]:[tt.PERSONAL_BOOK_USER],[tt.HTML_EXPORT_USER]:[tt.PERSONAL_BOOK_USER],[tt.PDF_EXPORT_USER]:[tt.PERSONAL_BOOK_USER],[tt.KHUB_ADMIN]:[tt.CONTENT_PUBLISHER],[tt.ADMIN]:[tt.KHUB_ADMIN,tt.USERS_ADMIN,tt.PORTAL_ADMIN,tt.BEHAVIOR_DATA_USER],[tt.GENERATIVE_AI_EXPORT_USER]:[tt.GENERATIVE_AI_USER]};function Fc(e,t){return e===t||(Nh[e]??[]).some(r=>Fc(r,t))}function rn(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>Fc(i,t))}var io=u(g());var ia=u(g());var Fe=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=w.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=w.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var mi=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:Fe.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Fe.await()}};var Ct=class extends mi{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new ia.CacheRegistry,this.cache=t?n.commonCache:new ia.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var Qn=class extends Ct{async listMySearches(){let{session:t}=w.getState();return rn(t,tt.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var to=class extends Ct{async listMyBookmarks(){let t=w.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var eo=class extends Ct{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var ro=class extends Ct{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var Uh="ft-user-assets",Fh={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(le).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;oa(e,r,[...na(e,r),n]),Vc(e,r,1,i),Bc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;oa(e,r,na(e,r).map(n=>n.id===i.id?i:n)),Bc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;oa(e,r,na(e,r).filter(o=>o.id!==n)),Vc(e,r,-1,i)}},Hc={[le.SEARCHES]:"savedSearches",[le.BOOKMARKS]:"bookmarks",[le.BOOKS]:void 0,[le.COLLECTIONS]:void 0},na=(e,t)=>{var r;let i=Hc[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},oa=(e,t,r)=>{let i=Hc[t];i&&(e[i]=r)},Vc=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===le.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Bc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Mt=io.FtReduxStore.get({name:Uh,reducers:Fh,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(le).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),sa=class{constructor(t=new eo,r=new ro){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=w.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new to,this.savedSearchesService=new Qn,w.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=w.getState();(0,io.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Mt.actions.clearAssetCount(),Mt.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Mt.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Mt.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Mt.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Mt.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Mt.getState().assetCounts.allAsset[t]!==r.count&&Mt.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Mt.getState().assetCounts.bookmarkByMap[t]!==r.count&&Mt.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Mt.getState().assetCounts.bookmarkByMap).length!==0;t===le.BOOKMARKS&&r&&Mt.actions.clearBookmarkCountByMap(),Mt.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Mt.actions.bookmarks(r)}}},Vh=new sa;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Vh);var aa=class{addCommand(t,r=!1){w.commands.add(t,r)}consumeCommand(t){return w.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new aa;var ce=u(g());var jc,gi=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Bh=Symbol("clearAfterUnitTest"),no=class extends(0,ce.withEventBus)(Ct){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[jc]=()=>{this.defaultMessages={},this.cache=new ce.CacheRegistry,this.listeners={}},this.currentUiLocale=w.getState().uiLocale,w.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=w.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,ce.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new ce.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof ce.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new gi({loadedContexts:t})),this.dispatchEvent(new gi({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new gi({loadedContexts:[t]})),this.dispatchEvent(new gi({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,ce.delay)(0).then(()=>i()).catch(()=>null)))}};jc=Bh;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends no{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends no{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var vi=window.FluidTopicsI18nService,oo=window.FluidTopicsCustomI18nService;var zc=u(g()),la=class{highlightHtml(t,r,i){(0,zc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new la;var Wc=u(g());var ca=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=w.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return Wc.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:w.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new ca;var Kc=u(g());var nn=class{static get(t,r){var i,n,o,s;let a=w.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Kc.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var ua=class{urlToSearchRequest(t){return nn.get().parse(t)}searchRequestToUrl(t){return nn.get().serialize(t)}};window.FluidTopicsUrlService=new ua;var qe=u(g());var Ir=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};Ir.eventName="change";var da=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},Gc=new da;var so=class e extends qe.WithEventBus{static build(){return new e(window.history,Gc,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,qe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new Ir(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(Ir.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(Ir.eventName,t)}currentItem(){return(0,qe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,qe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,qe.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,qe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.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:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var ao=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=w.getState().session;return!!t?.sessionAuthenticated}};var qc=u(A());var Yc=qc.css`
|
|
2
|
+
`;var Xc=u(A()),Bt=u(N()),Mr=u(g());var Dr=u(g());function Zc(e,t){let{authenticationRequired:r,session:i}=w.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var lo=class extends mi{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var pa=class e extends Dr.FtStateManager{static build(t){return new e(w,t)}constructor(t,r){super(),this.store=t,this.cache=new Dr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new lo,this.cleanSessionDebouncer=new Dr.Debouncer,this.reloadDebouncer=new Dr.Debouncer(500),this.apiProvider=r??(()=>Fe.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Ue.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Zc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setTenantId(t){this.store.actions.tenantId(t)}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t,r){this.userLocaleService.updateUiLocale({uiLocale:t,contentLocale:r}).then(i=>{i.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new kr(i)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},yi=pa.build();var _t=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},et=class extends Mr.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=yi,this.contextRoot=new Gi}render(){return Xc.html`
|
|
3
3
|
<slot></slot>
|
|
4
|
-
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>
|
|
4
|
+
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("tenantId")&&this.stateManager.setTenantId(this.tenantId),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>vi.addContext(i)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};et.elementDefinitions={};et.styles=Yc;_t([(0,Bt.property)()],et.prototype,"baseUrl",void 0);_t([(0,Bt.property)()],et.prototype,"tenantId",void 0);_t([(0,Bt.property)()],et.prototype,"apiIntegrationIdentifier",void 0);_t([(0,Bt.property)()],et.prototype,"apiIntegrationAppVersion",void 0);_t([(0,Bt.property)()],et.prototype,"uiLocale",void 0);_t([(0,Mr.jsonProperty)(null)],et.prototype,"availableUiLocales",void 0);_t([(0,Mr.jsonProperty)(null)],et.prototype,"metadataConfiguration",void 0);_t([(0,Bt.property)({type:Boolean})],et.prototype,"editorMode",void 0);_t([(0,Bt.property)({type:Boolean})],et.prototype,"noCustom",void 0);_t([(0,Bt.property)({type:Boolean})],et.prototype,"openExternalDocumentInNewTab",void 0);_t([(0,Bt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],et.prototype,"noCustomComponent",void 0);_t([(0,Bt.property)({type:Boolean})],et.prototype,"withManualResources",void 0);_t([(0,Bt.property)({type:Boolean})],et.prototype,"navigatorOnline",void 0);_t([(0,Bt.property)({type:Boolean})],et.prototype,"forcedOffline",void 0);_t([(0,Bt.property)({type:Boolean})],et.prototype,"authenticationRequired",void 0);_t([(0,Mr.jsonProperty)([])],et.prototype,"messageContexts",void 0);_t([(0,Mr.jsonProperty)(void 0)],et.prototype,"session",void 0);var Qc=u(g());var Jc={"ft-app-context":et};(0,Qc.customElements)(Jc);var eu=u(g()),dr;(function(e){e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.MAP_ATTACHMENT="MAP_ATTACHMENT",e.UD_ATTACHMENT="UD_ATTACHMENT",e.RESOURCE="RESOURCE"})(dr||(dr={}));var tu;(function(e){e.FIT_TO_CONTAINER="fit-to-container",e.ZOOM_REAL_SIZE="zoom-real-size",e.ZOOM_IN="zoom-in",e.ZOOM_OUT="zoom-out",e.ROTATE_LEFT="rotate-left",e.ROTATE_RIGHT="rotate-right"})(tu||(tu={}));var $r=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:(0,eu.deepCopy)(t),composed:!0,bubbles:!0})}};$r.eventName="ft-viewer-loaded";var co=class extends Ct{getAsset(t,r,i){let n={[dr.MAP_ATTACHMENT]:()=>this.api.getMapAttachment(t,r),[dr.UD_ATTACHMENT]:()=>this.api.getUdAttachment(t,r),[dr.RESOURCE]:()=>this.api.getMapResource(t,r)};return this.cache.get(r,n[i])}};var uo=class e extends si{static build(t){return new e(Mn(t),new co)}constructor(t,r){super(t),this.store=t,this.service=r}async load(){let{documentId:t,assetId:r,origin:i}=this.store.getState();if(t&&r&&i){let n=await this.service.getAsset(t,r,i);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(t,r,i){return this.store.actions.documentId(t),this.store.actions.assetId(r),this.store.actions.origin(i),await this.reload(),this.store.getState()}};var po=u(N());var on=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ye=class extends bi.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=uo.build(this.id||(0,bi.randomId)(6))}render(){return ru.html`
|
|
5
5
|
<slot></slot>
|
|
6
|
-
`}willUpdate(t){super.willUpdate(t),(t.has("documentId")||t.has("assetId")||t.has("origin"))&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.init(this.documentId,this.assetId,this.origin);this.documentId&&this.assetId&&this.origin&&this.dispatchEvent(new
|
|
6
|
+
`}willUpdate(t){super.willUpdate(t),(t.has("documentId")||t.has("assetId")||t.has("origin"))&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.init(this.documentId,this.assetId,this.origin);this.documentId&&this.assetId&&this.origin&&this.dispatchEvent(new $r(t))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}};on([(0,po.property)()],Ye.prototype,"documentId",void 0);on([(0,po.property)()],Ye.prototype,"assetId",void 0);on([(0,po.property)()],Ye.prototype,"origin",void 0);on([qi({context:Ls})],Ye.prototype,"viewerStateManager",void 0);on([(0,bi.reduxEventListener)({eventName:Ue.eventName})],Ye.prototype,"onAuthenticationChange",null);var iu=u(g()),Ht=class extends iu.FtLitElementRedux{};var we=u(A()),Br=u(g()),Ae=u(N());var nu=u(A()),ou=u(g()),Hh={position:ou.FtCssVariableFactory.create("--ft-content-watermark-position","Position property of the watermark container","POSITION","sticky")},su=nu.css`
|
|
7
7
|
:host {
|
|
8
8
|
position: absolute;
|
|
9
9
|
top: 0;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.ft-watermark-container {
|
|
17
|
-
position: ${
|
|
17
|
+
position: ${Hh.position};
|
|
18
18
|
top: 0;
|
|
19
19
|
text-align: center;
|
|
20
20
|
}
|
|
@@ -22,112 +22,112 @@
|
|
|
22
22
|
.ft-watermark {
|
|
23
23
|
z-index: 79;
|
|
24
24
|
}
|
|
25
|
-
`;var
|
|
26
|
-
\f\r]`,
|
|
27
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),xu=/'/g,Su=/"/g,Cu=/^(?:script|style|textarea|title)$/i,Ra=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),_u=Ra(1),Tu=Ra(2),Ou=Ra(3),hn=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),wu=new WeakMap,Wr=Kr.createTreeWalker(Kr,129);function Ru(e,t){if(!Oa(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return vu!==void 0?vu.createHTML(t):t}var tm=(e,t)=>{let r=e.length-1,i=[],n,o=t===2?"<svg>":t===3?"<math>":"",s=pn;for(let a=0;a<r;a++){let l=e[a],c,d,p=-1,f=0;for(;f<l.length&&(s.lastIndex=f,d=s.exec(l),d!==null);)f=s.lastIndex,s===pn?d[1]==="!--"?s=yu:d[1]!==void 0?s=bu:d[2]!==void 0?(Cu.test(d[2])&&(n=RegExp("</"+d[2],"g")),s=zr):d[3]!==void 0&&(s=zr):s===zr?d[0]===">"?(s=n??pn,p=-1):d[1]===void 0?p=-2:(p=s.lastIndex-d[2].length,c=d[1],s=d[3]===void 0?zr:d[3]==='"'?Su:xu):s===Su||s===xu?s=zr:s===yu||s===bu?s=pn:(s=zr,n=void 0);let h=s===zr&&e[a+1].startsWith("/>")?" ":"";o+=s===pn?l+Jh:p>=0?(i.push(c),l.slice(0,p)+Au+l.slice(p)+vr+h):l+vr+(p===-2?a:h)}return[Ru(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},mn=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,d]=tm(t,r);if(this.el=e.createElement(c,i),Wr.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=Wr.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let p of n.getAttributeNames())if(p.endsWith(Au)){let f=d[s++],h=n.getAttribute(p).split(vr),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?Aa:m[1]==="?"?Ea:m[1]==="@"?Ca:Ti}),n.removeAttribute(p)}else p.startsWith(vr)&&(l.push({type:6,index:o}),n.removeAttribute(p));if(Cu.test(n.tagName)){let p=n.textContent.split(vr),f=p.length-1;if(f>0){n.textContent=xo?xo.emptyScript:"";for(let h=0;h<f;h++)n.append(p[h],So()),Wr.nextNode(),l.push({type:2,index:++o});n.append(p[f],So())}}}else if(n.nodeType===8)if(n.data===Eu)l.push({type:2,index:o});else{let p=-1;for(;(p=n.data.indexOf(vr,p+1))!==-1;)l.push({type:7,index:o}),p+=vr.length-1}o++}}static createElement(t,r){let i=Kr.createElement("template");return i.innerHTML=t,i}};function _i(e,t,r=e,i){if(t===hn)return t;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=fn(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(e),n._$AT(e,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(t=_i(e,n._$AS(e,t.values),n,i)),t}var wa=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:i}=this._$AD,n=(t?.creationScope??Kr).importNode(r,!0);Wr.currentNode=n;let o=Wr.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new wo(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new _a(o,this,t)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=Wr.nextNode(),s++)}return Wr.currentNode=Kr,n}p(t){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},wo=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,i,n){this.type=2,this._$AH=pt,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=_i(this,t,r),fn(t)?t===pt||t==null||t===""?(this._$AH!==pt&&this._$AR(),this._$AH=pt):t!==this._$AH&&t!==hn&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qh(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==pt&&fn(this._$AH)?this._$AA.nextSibling.data=t:this.T(Kr.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=mn.createElement(Ru(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new wa(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(t){let r=wu.get(t.strings);return r===void 0&&wu.set(t.strings,r=new mn(t)),r}k(t){Oa(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of t)n===r.length?r.push(i=new e(this.O(So()),this.O(So()),this,this.options)):i=r[n],i._$AI(o),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let i=gu(t).nextSibling;gu(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ti=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,n,o){this.type=1,this._$AH=pt,this._$AN=void 0,this.element=t,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=pt}_$AI(t,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)t=_i(this,t,r,0),s=!fn(t)||t!==this._$AH&&t!==hn,s&&(this._$AH=t);else{let a=t,l,c;for(t=o[0],l=0;l<o.length-1;l++)c=_i(this,a[i+l],r,l),c===hn&&(c=this._$AH[l]),s||=!fn(c)||c!==this._$AH[l],c===pt?t=pt:t!==pt&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(t)}j(t){t===pt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Aa=class extends Ti{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===pt?void 0:t}},Ea=class extends Ti{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==pt)}},Ca=class extends Ti{constructor(t,r,i,n,o){super(t,r,i,n,o),this.type=5}_$AI(t,r=this){if((t=_i(this,t,r,0)??pt)===hn)return;let i=this._$AH,n=t===pt&&i!==pt||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==pt&&(i===pt||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},_a=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){_i(this,t)}};var em=Ta.litHtmlPolyfillSupport;em?.(mn,wo),(Ta.litHtmlVersions??=[]).push("3.3.3");var Pu=Symbol.for(""),rm=e=>{if(e?.r===Pu)return e?._$litStatic$},La=e=>({_$litStatic$:e,r:Pu});var Lu=new Map,Pa=e=>(t,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,d=!1;for(;c<i;){for(l=t[c];c<i&&(o=r[c],(n=rm(o))!==void 0);)l+=n+t[++c],d=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(t[i]),d){let p=s.join("$$lit$$");(t=Lu.get(p))===void 0&&(s.raw=s,Lu.set(p,t=s)),r=a}return e(t,...r)},Ia=Pa(_u),vx=Pa(Tu),yx=Pa(Ou);var ka=u($()),ju=u(g());var H;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(H||(H={}));var ve=u(A()),b=u(g()),Iu=b.FtCssVariableFactory.extend("--ft-typography-font-family","",b.designSystemVariables.titleFont),Qe=b.FtCssVariableFactory.extend("--ft-typography-font-family","",b.designSystemVariables.contentFont),C={fontFamily:Qe,fontSize:b.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:b.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:b.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:b.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:b.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},yr={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Iu),fontSize:b.FtCssVariableFactory.extend("--ft-typography-title-font-size","",C.fontSize,"20px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",C.letterSpacing,"0.15px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-title-line-height","",C.lineHeight,"1.2"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",C.textTransform,"inherit")},br={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Iu),fontSize:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",C.letterSpacing,"0.105px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",C.lineHeight,"1.7"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",C.textTransform,"inherit")},Oi={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",C.fontSize,"16px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",C.fontWeight,"600"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",C.letterSpacing,"0.144px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",C.lineHeight,"1.5"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",C.textTransform,"inherit")},Ri={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",C.letterSpacing,"0.098px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",C.lineHeight,"1.7"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",C.textTransform,"inherit")},me={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",C.fontSize,"16px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",C.letterSpacing,"0.496px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",C.lineHeight,"1.5"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",C.textTransform,"inherit")},ge={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",C.letterSpacing,"0.252px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",C.lineHeight,"1.4"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",C.textTransform,"inherit")},ie={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",C.fontSize,"12px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",C.letterSpacing,"0.396px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",C.lineHeight,"1.33"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",C.textTransform,"inherit")},Li={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",C.fontSize,"10px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",C.letterSpacing,"0.33px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",C.lineHeight,"1.6"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",C.textTransform,"inherit")},Pi={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",C.fontSize,"10px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",C.letterSpacing,"1.5px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",C.lineHeight,"1.6"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",C.textTransform,"uppercase")},Ft={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Qe),fontSize:b.FtCssVariableFactory.extend("--ft-typography-button-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",C.fontWeight,"600"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",C.letterSpacing,"1.246px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-button-line-height","",C.lineHeight,"1.15"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",C.textTransform,"uppercase")},ku=ve.css`
|
|
25
|
+
`;var Ti=u(A()),Vr=u(N());var Uu=u(xi()),Fu=u(g());var ba=globalThis,lu=e=>e,fo=ba.trustedTypes,cu=fo?fo.createPolicy("lit-html",{createHTML:e=>e}):void 0,mu="$lit$",pr=`lit$${Math.random().toFixed(9).slice(2)}$`,gu="?"+pr,jh=`<${gu}>`,Fr=document,ho=()=>Fr.createComment(""),an=e=>e===null||typeof e!="object"&&typeof e!="function",xa=Array.isArray,zh=e=>xa(e)||typeof e?.[Symbol.iterator]=="function",fa=`[
|
|
26
|
+
\f\r]`,sn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,uu=/-->/g,du=/>/g,Nr=RegExp(`>|${fa}(?:([^\\s"'>=/]+)(${fa}*=${fa}*(?:[^
|
|
27
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pu=/'/g,fu=/"/g,vu=/^(?:script|style|textarea|title)$/i,Sa=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),yu=Sa(1),bu=Sa(2),xu=Sa(3),ln=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),hu=new WeakMap,Ur=Fr.createTreeWalker(Fr,129);function Su(e,t){if(!xa(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return cu!==void 0?cu.createHTML(t):t}var Wh=(e,t)=>{let r=e.length-1,i=[],n,o=t===2?"<svg>":t===3?"<math>":"",s=sn;for(let a=0;a<r;a++){let l=e[a],c,d,p=-1,f=0;for(;f<l.length&&(s.lastIndex=f,d=s.exec(l),d!==null);)f=s.lastIndex,s===sn?d[1]==="!--"?s=uu:d[1]!==void 0?s=du:d[2]!==void 0?(vu.test(d[2])&&(n=RegExp("</"+d[2],"g")),s=Nr):d[3]!==void 0&&(s=Nr):s===Nr?d[0]===">"?(s=n??sn,p=-1):d[1]===void 0?p=-2:(p=s.lastIndex-d[2].length,c=d[1],s=d[3]===void 0?Nr:d[3]==='"'?fu:pu):s===fu||s===pu?s=Nr:s===uu||s===du?s=sn:(s=Nr,n=void 0);let h=s===Nr&&e[a+1].startsWith("/>")?" ":"";o+=s===sn?l+jh:p>=0?(i.push(c),l.slice(0,p)+mu+l.slice(p)+pr+h):l+pr+(p===-2?a:h)}return[Su(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},cn=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,d]=Wh(t,r);if(this.el=e.createElement(c,i),Ur.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=Ur.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let p of n.getAttributeNames())if(p.endsWith(mu)){let f=d[s++],h=n.getAttribute(p).split(pr),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?ma:m[1]==="?"?ga:m[1]==="@"?va:wi}),n.removeAttribute(p)}else p.startsWith(pr)&&(l.push({type:6,index:o}),n.removeAttribute(p));if(vu.test(n.tagName)){let p=n.textContent.split(pr),f=p.length-1;if(f>0){n.textContent=fo?fo.emptyScript:"";for(let h=0;h<f;h++)n.append(p[h],ho()),Ur.nextNode(),l.push({type:2,index:++o});n.append(p[f],ho())}}}else if(n.nodeType===8)if(n.data===gu)l.push({type:2,index:o});else{let p=-1;for(;(p=n.data.indexOf(pr,p+1))!==-1;)l.push({type:7,index:o}),p+=pr.length-1}o++}}static createElement(t,r){let i=Fr.createElement("template");return i.innerHTML=t,i}};function Si(e,t,r=e,i){if(t===ln)return t;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=an(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(e),n._$AT(e,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(t=Si(e,n._$AS(e,t.values),n,i)),t}var ha=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:i}=this._$AD,n=(t?.creationScope??Fr).importNode(r,!0);Ur.currentNode=n;let o=Ur.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new mo(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new ya(o,this,t)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=Ur.nextNode(),s++)}return Ur.currentNode=Fr,n}p(t){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},mo=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,i,n){this.type=2,this._$AH=pt,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Si(this,t,r),an(t)?t===pt||t==null||t===""?(this._$AH!==pt&&this._$AR(),this._$AH=pt):t!==this._$AH&&t!==ln&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):zh(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==pt&&an(this._$AH)?this._$AA.nextSibling.data=t:this.T(Fr.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=cn.createElement(Su(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new ha(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(t){let r=hu.get(t.strings);return r===void 0&&hu.set(t.strings,r=new cn(t)),r}k(t){xa(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of t)n===r.length?r.push(i=new e(this.O(ho()),this.O(ho()),this,this.options)):i=r[n],i._$AI(o),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let i=lu(t).nextSibling;lu(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},wi=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,n,o){this.type=1,this._$AH=pt,this._$AN=void 0,this.element=t,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=pt}_$AI(t,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)t=Si(this,t,r,0),s=!an(t)||t!==this._$AH&&t!==ln,s&&(this._$AH=t);else{let a=t,l,c;for(t=o[0],l=0;l<o.length-1;l++)c=Si(this,a[i+l],r,l),c===ln&&(c=this._$AH[l]),s||=!an(c)||c!==this._$AH[l],c===pt?t=pt:t!==pt&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(t)}j(t){t===pt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ma=class extends wi{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===pt?void 0:t}},ga=class extends wi{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==pt)}},va=class extends wi{constructor(t,r,i,n,o){super(t,r,i,n,o),this.type=5}_$AI(t,r=this){if((t=Si(this,t,r,0)??pt)===ln)return;let i=this._$AH,n=t===pt&&i!==pt||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==pt&&(i===pt||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ya=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Si(this,t)}};var Kh=ba.litHtmlPolyfillSupport;Kh?.(cn,mo),(ba.litHtmlVersions??=[]).push("3.3.3");var Au=Symbol.for(""),Gh=e=>{if(e?.r===Au)return e?._$litStatic$},wa=e=>({_$litStatic$:e,r:Au});var wu=new Map,Aa=e=>(t,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,d=!1;for(;c<i;){for(l=t[c];c<i&&(o=r[c],(n=Gh(o))!==void 0);)l+=n+t[++c],d=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(t[i]),d){let p=s.join("$$lit$$");(t=wu.get(p))===void 0&&(s.raw=s,wu.set(p,t=s)),r=a}return e(t,...r)},Ea=Aa(yu),lx=Aa(bu),cx=Aa(xu);var Ca=u(N()),Mu=u(g());var B;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(B||(B={}));var pe=u(A()),b=u(g()),Eu=b.FtCssVariableFactory.extend("--ft-typography-font-family","",b.designSystemVariables.titleFont),Ze=b.FtCssVariableFactory.extend("--ft-typography-font-family","",b.designSystemVariables.contentFont),C={fontFamily:Ze,fontSize:b.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:b.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:b.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:b.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:b.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},fr={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-title-font-family","",Eu),fontSize:b.FtCssVariableFactory.extend("--ft-typography-title-font-size","",C.fontSize,"20px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",C.letterSpacing,"0.15px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-title-line-height","",C.lineHeight,"1.2"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",C.textTransform,"inherit")},hr={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",Eu),fontSize:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",C.letterSpacing,"0.105px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",C.lineHeight,"1.7"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",C.textTransform,"inherit")},Ai={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",C.fontSize,"16px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",C.fontWeight,"600"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",C.letterSpacing,"0.144px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",C.lineHeight,"1.5"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",C.textTransform,"inherit")},Ei={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",C.letterSpacing,"0.098px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",C.lineHeight,"1.7"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",C.textTransform,"inherit")},ue={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",C.fontSize,"16px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",C.letterSpacing,"0.496px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",C.lineHeight,"1.5"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",C.textTransform,"inherit")},de={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",C.letterSpacing,"0.252px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",C.lineHeight,"1.4"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",C.textTransform,"inherit")},Qt={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",C.fontSize,"12px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",C.letterSpacing,"0.396px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",C.lineHeight,"1.33"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",C.textTransform,"inherit")},Ci={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",C.fontSize,"10px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",C.letterSpacing,"0.33px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",C.lineHeight,"1.6"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",C.textTransform,"inherit")},_i={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",C.fontSize,"10px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",C.fontWeight,"normal"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",C.letterSpacing,"1.5px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",C.lineHeight,"1.6"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",C.textTransform,"uppercase")},$t={fontFamily:b.FtCssVariableFactory.extend("--ft-typography-button-font-family","",Ze),fontSize:b.FtCssVariableFactory.extend("--ft-typography-button-font-size","",C.fontSize,"14px"),fontWeight:b.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",C.fontWeight,"600"),letterSpacing:b.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",C.letterSpacing,"1.246px"),lineHeight:b.FtCssVariableFactory.extend("--ft-typography-button-line-height","",C.lineHeight,"1.15"),textTransform:b.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",C.textTransform,"uppercase")},Cu=pe.css`
|
|
28
28
|
.ft-typography--title {
|
|
29
|
-
font-family: ${
|
|
30
|
-
font-size: ${
|
|
31
|
-
font-weight: ${
|
|
32
|
-
letter-spacing: ${
|
|
33
|
-
line-height: ${
|
|
34
|
-
text-transform: ${
|
|
35
|
-
}
|
|
36
|
-
`,
|
|
29
|
+
font-family: ${fr.fontFamily};
|
|
30
|
+
font-size: ${fr.fontSize};
|
|
31
|
+
font-weight: ${fr.fontWeight};
|
|
32
|
+
letter-spacing: ${fr.letterSpacing};
|
|
33
|
+
line-height: ${fr.lineHeight};
|
|
34
|
+
text-transform: ${fr.textTransform};
|
|
35
|
+
}
|
|
36
|
+
`,_u=pe.css`
|
|
37
37
|
.ft-typography--title-dense {
|
|
38
|
-
font-family: ${
|
|
39
|
-
font-size: ${
|
|
40
|
-
font-weight: ${
|
|
41
|
-
letter-spacing: ${
|
|
42
|
-
line-height: ${
|
|
43
|
-
text-transform: ${
|
|
44
|
-
}
|
|
45
|
-
`,
|
|
38
|
+
font-family: ${hr.fontFamily};
|
|
39
|
+
font-size: ${hr.fontSize};
|
|
40
|
+
font-weight: ${hr.fontWeight};
|
|
41
|
+
letter-spacing: ${hr.letterSpacing};
|
|
42
|
+
line-height: ${hr.lineHeight};
|
|
43
|
+
text-transform: ${hr.textTransform};
|
|
44
|
+
}
|
|
45
|
+
`,Tu=pe.css`
|
|
46
46
|
.ft-typography--subtitle1 {
|
|
47
|
-
font-family: ${
|
|
48
|
-
font-size: ${
|
|
49
|
-
font-weight: ${
|
|
50
|
-
letter-spacing: ${
|
|
51
|
-
line-height: ${
|
|
52
|
-
text-transform: ${
|
|
53
|
-
}
|
|
54
|
-
|
|
47
|
+
font-family: ${Ai.fontFamily};
|
|
48
|
+
font-size: ${Ai.fontSize};
|
|
49
|
+
font-weight: ${Ai.fontWeight};
|
|
50
|
+
letter-spacing: ${Ai.letterSpacing};
|
|
51
|
+
line-height: ${Ai.lineHeight};
|
|
52
|
+
text-transform: ${Ai.textTransform};
|
|
53
|
+
}
|
|
54
|
+
`,Ou=pe.css`
|
|
55
55
|
.ft-typography--subtitle2 {
|
|
56
|
-
font-family: ${
|
|
57
|
-
font-size: ${
|
|
58
|
-
font-weight: ${
|
|
59
|
-
letter-spacing: ${
|
|
60
|
-
line-height: ${
|
|
61
|
-
text-transform: ${
|
|
56
|
+
font-family: ${Ei.fontFamily};
|
|
57
|
+
font-size: ${Ei.fontSize};
|
|
58
|
+
font-weight: ${Ei.fontWeight};
|
|
59
|
+
letter-spacing: ${Ei.letterSpacing};
|
|
60
|
+
line-height: ${Ei.lineHeight};
|
|
61
|
+
text-transform: ${Ei.textTransform};
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
`,
|
|
64
|
+
`,mr=pe.css`
|
|
65
65
|
.ft-typography--body1 {
|
|
66
|
-
font-family: ${
|
|
67
|
-
font-size: ${
|
|
68
|
-
font-weight: ${
|
|
69
|
-
letter-spacing: ${
|
|
70
|
-
line-height: ${
|
|
71
|
-
text-transform: ${
|
|
72
|
-
}
|
|
73
|
-
`,
|
|
66
|
+
font-family: ${ue.fontFamily};
|
|
67
|
+
font-size: ${ue.fontSize};
|
|
68
|
+
font-weight: ${ue.fontWeight};
|
|
69
|
+
letter-spacing: ${ue.letterSpacing};
|
|
70
|
+
line-height: ${ue.lineHeight};
|
|
71
|
+
text-transform: ${ue.textTransform};
|
|
72
|
+
}
|
|
73
|
+
`,Ru=pe.css`
|
|
74
74
|
.ft-typography--body2 {
|
|
75
|
-
font-family: ${
|
|
76
|
-
font-size: ${
|
|
77
|
-
font-weight: ${
|
|
78
|
-
letter-spacing: ${
|
|
79
|
-
line-height: ${
|
|
80
|
-
text-transform: ${
|
|
81
|
-
}
|
|
82
|
-
`,
|
|
75
|
+
font-family: ${de.fontFamily};
|
|
76
|
+
font-size: ${de.fontSize};
|
|
77
|
+
font-weight: ${de.fontWeight};
|
|
78
|
+
letter-spacing: ${de.letterSpacing};
|
|
79
|
+
line-height: ${de.lineHeight};
|
|
80
|
+
text-transform: ${de.textTransform};
|
|
81
|
+
}
|
|
82
|
+
`,go=pe.css`
|
|
83
83
|
.ft-typography--caption {
|
|
84
|
-
font-family: ${
|
|
85
|
-
font-size: ${
|
|
86
|
-
font-weight: ${
|
|
87
|
-
letter-spacing: ${
|
|
88
|
-
line-height: ${
|
|
89
|
-
text-transform: ${
|
|
90
|
-
}
|
|
91
|
-
`,
|
|
84
|
+
font-family: ${Qt.fontFamily};
|
|
85
|
+
font-size: ${Qt.fontSize};
|
|
86
|
+
font-weight: ${Qt.fontWeight};
|
|
87
|
+
letter-spacing: ${Qt.letterSpacing};
|
|
88
|
+
line-height: ${Qt.lineHeight};
|
|
89
|
+
text-transform: ${Qt.textTransform};
|
|
90
|
+
}
|
|
91
|
+
`,Lu=pe.css`
|
|
92
92
|
.ft-typography--breadcrumb {
|
|
93
|
-
font-family: ${
|
|
94
|
-
font-size: ${
|
|
95
|
-
font-weight: ${
|
|
96
|
-
letter-spacing: ${
|
|
97
|
-
line-height: ${
|
|
98
|
-
text-transform: ${
|
|
99
|
-
}
|
|
100
|
-
`,
|
|
93
|
+
font-family: ${Ci.fontFamily};
|
|
94
|
+
font-size: ${Ci.fontSize};
|
|
95
|
+
font-weight: ${Ci.fontWeight};
|
|
96
|
+
letter-spacing: ${Ci.letterSpacing};
|
|
97
|
+
line-height: ${Ci.lineHeight};
|
|
98
|
+
text-transform: ${Ci.textTransform};
|
|
99
|
+
}
|
|
100
|
+
`,Pu=pe.css`
|
|
101
101
|
.ft-typography--overline {
|
|
102
|
-
font-family: ${
|
|
103
|
-
font-size: ${
|
|
104
|
-
font-weight: ${
|
|
105
|
-
letter-spacing: ${
|
|
106
|
-
line-height: ${
|
|
107
|
-
text-transform: ${
|
|
108
|
-
}
|
|
109
|
-
`,
|
|
102
|
+
font-family: ${_i.fontFamily};
|
|
103
|
+
font-size: ${_i.fontSize};
|
|
104
|
+
font-weight: ${_i.fontWeight};
|
|
105
|
+
letter-spacing: ${_i.letterSpacing};
|
|
106
|
+
line-height: ${_i.lineHeight};
|
|
107
|
+
text-transform: ${_i.textTransform};
|
|
108
|
+
}
|
|
109
|
+
`,ku=pe.css`
|
|
110
110
|
.ft-typography--button {
|
|
111
|
-
font-family: ${
|
|
112
|
-
font-size: ${
|
|
113
|
-
font-weight: ${
|
|
114
|
-
letter-spacing: ${
|
|
115
|
-
line-height: ${
|
|
116
|
-
text-transform: ${
|
|
117
|
-
}
|
|
118
|
-
`,
|
|
111
|
+
font-family: ${$t.fontFamily};
|
|
112
|
+
font-size: ${$t.fontSize};
|
|
113
|
+
font-weight: ${$t.fontWeight};
|
|
114
|
+
letter-spacing: ${$t.letterSpacing};
|
|
115
|
+
line-height: ${$t.lineHeight};
|
|
116
|
+
text-transform: ${$t.textTransform};
|
|
117
|
+
}
|
|
118
|
+
`,Iu=pe.css`
|
|
119
119
|
.ft-typography {
|
|
120
120
|
vertical-align: inherit;
|
|
121
121
|
}
|
|
122
|
-
`;var
|
|
123
|
-
<${
|
|
122
|
+
`;var Du=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},U=class extends Mu.FtLitElement{constructor(){super(...arguments),this.variant=B.body1}render(){return this.element?Ea`
|
|
123
|
+
<${wa(this.element)}
|
|
124
124
|
part="text"
|
|
125
125
|
class="ft-typography ft-typography--${this.variant}">
|
|
126
126
|
<slot></slot>
|
|
127
|
-
</${
|
|
128
|
-
`:
|
|
127
|
+
</${wa(this.element)}>
|
|
128
|
+
`:Ea`
|
|
129
129
|
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
|
|
130
|
-
`}};
|
|
130
|
+
`}};U.styles=[Cu,_u,Tu,Ou,mr,Ru,go,Lu,Pu,ku,Iu];Du([(0,Ca.property)()],U.prototype,"element",void 0);Du([(0,Ca.property)()],U.prototype,"variant",void 0);var Nu=u(g());var $u={"ft-typography":U};(0,Nu.customElements)($u);var vo=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Se=class extends Fu.FtLitElement{constructor(){super(...arguments),this.height=0,this.resizeObserver=new ResizeObserver(([t])=>{this.height=Math.min(t.contentRect.height,t.contentRect.width)})}render(){var t,r,i;return this.watermark?Ti.html`
|
|
131
131
|
<style>
|
|
132
132
|
.ft-watermark {
|
|
133
133
|
height: ${this.height}px;
|
|
@@ -142,38 +142,38 @@
|
|
|
142
142
|
transform="rotate(-45)"
|
|
143
143
|
fill="${(t=this.watermark)===null||t===void 0?void 0:t.color}"
|
|
144
144
|
fill-opacity="${(r=this.watermark)===null||r===void 0?void 0:r.opacity}%">
|
|
145
|
-
${(0,
|
|
145
|
+
${(0,Uu.repeat)(((i=this.watermark)===null||i===void 0?void 0:i.text)||[],n=>Ti.svg`<tspan x="0" dy="1.2em">${n}</tspan>`)}
|
|
146
146
|
</text>
|
|
147
147
|
</svg>
|
|
148
148
|
</div>
|
|
149
|
-
`:
|
|
149
|
+
`:Ti.nothing}updated(t){if(super.updated(t),t.has("watermark")&&this.watermark){let r=this.svg.getBBox({stroke:!0});this.svg.setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height)}t.has("heightReference")&&this.heightReference&&(this.resizeObserver.disconnect(),this.resizeObserver.observe(this.heightReference))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}};Se.styles=[su,mr];vo([(0,Vr.query)(".ft-watermark")],Se.prototype,"svg",void 0);vo([(0,Vr.property)({attribute:!1})],Se.prototype,"watermark",void 0);vo([(0,Vr.property)({attribute:!1})],Se.prototype,"heightReference",void 0);vo([(0,Vr.state)()],Se.prototype,"height",void 0);var Bu=u(g());var Vu={"ft-content-watermark":Se};(0,Bu.customElements)(Vu);var ju=u(_a()),te=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},st=class extends(0,Br.withConditionalVisibility)(Ht){constructor(){super(...arguments),this.viewerType="none",this.inlineSvgAllowed=!1}render(){return we.html`
|
|
150
150
|
${this.renderContent()}
|
|
151
151
|
<ft-content-watermark part="watermark"
|
|
152
152
|
.watermark=${this.watermark}
|
|
153
153
|
.exportpartsPrefixes=${["watermark"]}
|
|
154
154
|
.heightReference=${this}></ft-content-watermark>
|
|
155
|
-
`}renderContent(){var t;switch(this.viewerType){case"image":return this.renderImageViewer();case"inline-svg":return this.renderImageViewer();case"video":return this.renderVideoViewer();case"pdf":return this.renderPdfViewer();case"iframe":return this.renderIframeViewer((t=this.descriptor)===null||t===void 0?void 0:t.contentUrl);default:return
|
|
155
|
+
`}renderContent(){var t;switch(this.viewerType){case"image":return this.renderImageViewer();case"inline-svg":return this.renderImageViewer();case"video":return this.renderVideoViewer();case"pdf":return this.renderPdfViewer();case"iframe":return this.renderIframeViewer((t=this.descriptor)===null||t===void 0?void 0:t.contentUrl);default:return we.nothing}}renderImageViewer(){var t,r;return we.html`
|
|
156
156
|
<div class="image-viewer">
|
|
157
157
|
<div class="image-viewer-content">
|
|
158
158
|
<div class="image-container">
|
|
159
|
-
${this.viewerType==="image"?
|
|
159
|
+
${this.viewerType==="image"?we.html`
|
|
160
160
|
<img src="${(t=this.descriptor)===null||t===void 0?void 0:t.contentUrl}"
|
|
161
161
|
alt="${(r=this.descriptor)===null||r===void 0?void 0:r.alt}"
|
|
162
162
|
@load=${this.onImageLoad}>
|
|
163
|
-
`:
|
|
164
|
-
${(0,
|
|
163
|
+
`:we.html`
|
|
164
|
+
${(0,ju.unsafeHTML)(this.svgContent)}
|
|
165
165
|
`}
|
|
166
166
|
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
169
169
|
</div>
|
|
170
|
-
`}onImageLoad(){var t;this.initialImageHeight=this.image.naturalHeight===0?this.image.clientHeight:this.image.naturalHeight,this.initialImageWidth=this.image.naturalWidth===0?this.image.clientWidth:this.image.naturalWidth,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}onSvgLoad(){var t;(this.svg.clientWidth===0||this.svg.clientHeight===0)&&(this.svg.style.width="90vw",this.svg.style.height="90vh"),this.initialImageHeight=this.svg.viewBox.baseVal.height===0?this.svg.clientHeight:this.svg.viewBox.baseVal.height,this.initialImageWidth=this.svg.viewBox.baseVal.width===0?this.svg.clientWidth:this.svg.viewBox.baseVal.width,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}getImageToViewerRatio(){if(this.initialImageHeight!=null&&this.initialImageWidth!=null){let t=this.initialImageHeight/this.initialImageWidth,r=this.clientHeight/this.clientWidth;return t>r?this.clientHeight/this.initialImageHeight:this.clientWidth/this.initialImageWidth}}renderVideoViewer(){var t;return
|
|
170
|
+
`}onImageLoad(){var t;this.initialImageHeight=this.image.naturalHeight===0?this.image.clientHeight:this.image.naturalHeight,this.initialImageWidth=this.image.naturalWidth===0?this.image.clientWidth:this.image.naturalWidth,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}onSvgLoad(){var t;(this.svg.clientWidth===0||this.svg.clientHeight===0)&&(this.svg.style.width="90vw",this.svg.style.height="90vh"),this.initialImageHeight=this.svg.viewBox.baseVal.height===0?this.svg.clientHeight:this.svg.viewBox.baseVal.height,this.initialImageWidth=this.svg.viewBox.baseVal.width===0?this.svg.clientWidth:this.svg.viewBox.baseVal.width,(t=this.viewerStateManager)===null||t===void 0||t.setZoom(Math.min(1,this.getImageToViewerRatio()))}getImageToViewerRatio(){if(this.initialImageHeight!=null&&this.initialImageWidth!=null){let t=this.initialImageHeight/this.initialImageWidth,r=this.clientHeight/this.clientWidth;return t>r?this.clientHeight/this.initialImageHeight:this.clientWidth/this.initialImageWidth}}renderVideoViewer(){var t;return we.html`
|
|
171
171
|
<video src="${(t=this.descriptor)===null||t===void 0?void 0:t.contentUrl}" controls></video>
|
|
172
|
-
`}renderPdfViewer(){var t;let r=new URLSearchParams({file:this.descriptor.contentUrl});return this.renderIframeViewer(`${(t=
|
|
172
|
+
`}renderPdfViewer(){var t;let r=new URLSearchParams({file:this.descriptor.contentUrl});return this.renderIframeViewer(`${(t=Fe.get())===null||t===void 0?void 0:t.makeAbsolute("/pdf-viewer")}?${r}`)}renderIframeViewer(t){var r;return we.html`
|
|
173
173
|
<iframe src="${t}"
|
|
174
174
|
title="${(r=this.descriptor)===null||r===void 0?void 0:r.alt}"
|
|
175
175
|
></iframe>
|
|
176
|
-
`}willUpdate(t){var r,i,n;super.willUpdate(t),t.has("descriptor")&&(this.isVisible=!!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser),this.initialImageHeight=void 0,this.initialImageWidth=void 0,this.imageHeight=void 0,this.imageWidth=void 0,(i=this.viewerStateManager)===null||i===void 0||i.setZoom(void 0),(n=this.viewerStateManager)===null||n===void 0||n.setRotation(0),this.svgContent=void 0),t.has("zoom")&&(this.imageHeight=this.zoom&&this.initialImageHeight?this.initialImageHeight*this.zoom:void 0,this.imageWidth=this.zoom&&this.initialImageWidth?this.initialImageWidth*this.zoom:void 0)}updated(t){var r,i,n,o,s,a;super.updated(t),!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser)||!(!((i=this.descriptor)===null||i===void 0)&&i.contentUrl)?this.viewerType="none":this.inlineSvgAllowed&&(!((n=this.descriptor)===null||n===void 0)&&n.mimeType.startsWith("image/svg"))?this.viewerType="inline-svg":!((o=this.descriptor)===null||o===void 0)&&o.mimeType.startsWith("image/")?this.viewerType="image":!((s=this.descriptor)===null||s===void 0)&&s.mimeType.startsWith("video/")?this.viewerType="video":((a=this.descriptor)===null||a===void 0?void 0:a.mimeType)==="application/pdf"?this.viewerType="pdf":this.viewerType="iframe"}contentAvailableCallback(t){var r,i,n,o;if(super.contentAvailableCallback(t),(this.viewerType==="image"||this.viewerType==="inline-svg")&&(t.has("zoom")&&this.zoom==null&&((r=this.viewerStateManager)===null||r===void 0||r.setZoom(this.getImageToViewerRatio())),t.has("zoom")||t.has("rotation"))){let s=this.image||this.svg;if(s&&(s.style.transform=`scaleX(${this.zoom}) scaleY(${this.zoom}) rotate(${this.rotation}deg)`),this.imageViewer&&this.imageContainer&&s){let a=(this.imageViewer.scrollTop+this.imageViewer.clientHeight/2)/this.imageViewer.scrollHeight,l=(this.imageViewer.scrollLeft+this.imageViewer.clientWidth/2)/this.imageViewer.scrollWidth,{height:c,width:d}=s.getClientRects()[0];this.imageContainer.style.height=`${c}px`,this.imageContainer.style.width=`${d}px`,this.imageViewer.scrollTop=a*this.imageViewer.scrollHeight-this.imageViewer.clientHeight/2,this.imageViewer.scrollLeft=l*this.imageViewer.scrollWidth-this.imageViewer.clientWidth/2}}this.viewerType==="inline-svg"&&(t.has("descriptor")&&(!((i=this.descriptor)===null||i===void 0)&&i.contentUrl)&&((n=
|
|
176
|
+
`}willUpdate(t){var r,i,n;super.willUpdate(t),t.has("descriptor")&&(this.isVisible=!!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser),this.initialImageHeight=void 0,this.initialImageWidth=void 0,this.imageHeight=void 0,this.imageWidth=void 0,(i=this.viewerStateManager)===null||i===void 0||i.setZoom(void 0),(n=this.viewerStateManager)===null||n===void 0||n.setRotation(0),this.svgContent=void 0),t.has("zoom")&&(this.imageHeight=this.zoom&&this.initialImageHeight?this.initialImageHeight*this.zoom:void 0,this.imageWidth=this.zoom&&this.initialImageWidth?this.initialImageWidth*this.zoom:void 0)}updated(t){var r,i,n,o,s,a;super.updated(t),!(!((r=this.descriptor)===null||r===void 0)&&r.viewableInCurrentBrowser)||!(!((i=this.descriptor)===null||i===void 0)&&i.contentUrl)?this.viewerType="none":this.inlineSvgAllowed&&(!((n=this.descriptor)===null||n===void 0)&&n.mimeType.startsWith("image/svg"))?this.viewerType="inline-svg":!((o=this.descriptor)===null||o===void 0)&&o.mimeType.startsWith("image/")?this.viewerType="image":!((s=this.descriptor)===null||s===void 0)&&s.mimeType.startsWith("video/")?this.viewerType="video":((a=this.descriptor)===null||a===void 0?void 0:a.mimeType)==="application/pdf"?this.viewerType="pdf":this.viewerType="iframe"}contentAvailableCallback(t){var r,i,n,o;if(super.contentAvailableCallback(t),(this.viewerType==="image"||this.viewerType==="inline-svg")&&(t.has("zoom")&&this.zoom==null&&((r=this.viewerStateManager)===null||r===void 0||r.setZoom(this.getImageToViewerRatio())),t.has("zoom")||t.has("rotation"))){let s=this.image||this.svg;if(s&&(s.style.transform=`scaleX(${this.zoom}) scaleY(${this.zoom}) rotate(${this.rotation}deg)`),this.imageViewer&&this.imageContainer&&s){let a=(this.imageViewer.scrollTop+this.imageViewer.clientHeight/2)/this.imageViewer.scrollHeight,l=(this.imageViewer.scrollLeft+this.imageViewer.clientWidth/2)/this.imageViewer.scrollWidth,{height:c,width:d}=s.getClientRects()[0];this.imageContainer.style.height=`${c}px`,this.imageContainer.style.width=`${d}px`,this.imageViewer.scrollTop=a*this.imageViewer.scrollHeight-this.imageViewer.clientHeight/2,this.imageViewer.scrollLeft=l*this.imageViewer.scrollWidth-this.imageViewer.clientWidth/2}}this.viewerType==="inline-svg"&&(t.has("descriptor")&&(!((i=this.descriptor)===null||i===void 0)&&i.contentUrl)&&((n=Fe.get())===null||n===void 0||n.fetch((o=this.descriptor)===null||o===void 0?void 0:o.contentUrl).then(s=>s.text()).then(s=>this.svgContent=s)),t.has("svgContent")&&this.svgContent&&this.onSvgLoad())}};st.elementDefinitions={"ft-content-watermark":Se};st.styles=we.css`
|
|
177
177
|
:host {
|
|
178
178
|
display: block;
|
|
179
179
|
min-height: 100px;
|
|
@@ -215,12 +215,23 @@
|
|
|
215
215
|
max-height: 100%;
|
|
216
216
|
border: none;
|
|
217
217
|
}
|
|
218
|
-
`;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
218
|
+
`;te([(0,Br.redux)({store:"viewer"})],st.prototype,"descriptor",void 0);te([(0,Ae.state)()],st.prototype,"viewerType",void 0);te([(0,Ae.state)()],st.prototype,"inlineSvgAllowed",void 0);te([(0,Br.redux)({store:"viewer",selector:({contentModifiers:e})=>e.zoom})],st.prototype,"zoom",void 0);te([(0,Br.redux)({store:"viewer",selector:({contentModifiers:e})=>e.rotation})],st.prototype,"rotation",void 0);te([(0,Br.redux)({store:"viewer"})],st.prototype,"watermark",void 0);te([(0,Ae.query)("img")],st.prototype,"image",void 0);te([(0,Ae.query)("svg")],st.prototype,"svg",void 0);te([(0,Ae.query)(".image-viewer")],st.prototype,"imageViewer",void 0);te([(0,Ae.query)(".image-container")],st.prototype,"imageContainer",void 0);te([(0,Ae.state)()],st.prototype,"imageHeight",void 0);te([(0,Ae.state)()],st.prototype,"imageWidth",void 0);te([(0,Ae.state)()],st.prototype,"svgContent",void 0);var yo=class extends Me(st){};var zu=u(g()),Oi=u(A());var qh=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Xe=class extends Ht{render(){return this.filename?Oi.html`
|
|
219
|
+
<ft-typography variant="${B.body1}" part="filename">
|
|
220
|
+
${this.filename}
|
|
221
|
+
</ft-typography>
|
|
222
|
+
`:Oi.nothing}};Xe.elementDefinitions={"ft-typography":U};Xe.styles=Oi.css`
|
|
223
|
+
[part="filename"]::part(text) {
|
|
224
|
+
margin: unset;
|
|
225
|
+
}
|
|
226
|
+
`;qh([(0,zu.redux)({store:"viewer",selector:({descriptor:e})=>e?.filename})],Xe.prototype,"filename",void 0);var bo=class extends Me(Xe){};var Wu=u(g()),Ri=u(A());var Yh=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Hr=class extends Ht{render(){return this.displayName?Ri.html`
|
|
227
|
+
<ft-typography variant="${B.title}" part="display-name" element="h2">
|
|
228
|
+
${this.displayName}
|
|
229
|
+
</ft-typography>
|
|
230
|
+
`:Ri.nothing}};Hr.elementDefinitions={"ft-typography":U};Hr.styles=Ri.css`
|
|
231
|
+
[part="display-name"]::part(text) {
|
|
232
|
+
margin: unset;
|
|
233
|
+
}
|
|
234
|
+
`;Yh([(0,Wu.redux)({store:"viewer",selector:({descriptor:e})=>e?.displayName})],Hr.prototype,"displayName",void 0);var xo=class extends Me(Hr){};var pn=u(g()),wo=u(A());var Ku=u(A()),Ee=u(g()),ft={size:Ee.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:Ee.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",Ee.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:Ee.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",Ee.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:Ee.FtCssVariableFactory.extend("--ft-icon-material-font-family","",Ee.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:Ee.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Gu=[Ku.css`
|
|
224
235
|
:host, i.ft-icon {
|
|
225
236
|
display: inline-flex;
|
|
226
237
|
align-items: center;
|
|
@@ -268,128 +279,31 @@
|
|
|
268
279
|
.ft-icon--material {
|
|
269
280
|
font-family: ${ft.materialFontFamily}, "Material Icons", sans-serif;
|
|
270
281
|
}
|
|
271
|
-
`,Re.noTextSelect];var kt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(kt||(kt={}));var xn=u(A()),Sr=u($()),sd=u(g()),ad=u(Da());var Gt;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE="",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",e.PAPER_PLANE_SLASH="",e.COMPRESS="",e.EXPAND="",e.ARROW_ROTATE_LEFT="",e.MOBILE_SMALL="",e.SPARKLES="",e.HAND_SOLID="",e.CLOCK_SOLID="",e.CONTEXT_MENU_CURSOR="",e.LANGUAGE_SLASH="",e.MAGNIFYING_GLASS_FLOPPY_DISK="",e.CABINET_FILING_FLOPPY_DISK="",e.BOOKMARK_SLASH="",e.CIRCLE_PAUSE="",e.CIRCLE_PLAY="",e.CIRCLE_STOP_PLAIN="",e.CIRCLE_ARROW_DOWN="",e.SHARE_NODES="",e.BELL="",e.BELL_SLASH="",e.FILE="",e.HAND="",e.SQUARE_INFO_SOLID="",e.FILE_CODE="",e.BOX_CODE="",e.TOPICS_SOLID="",e.PHOTO_FILM="",e.HYPHEN_SOLID="",e.CROSSHAIRS="",e.PERSON_CHALKBOARD="",e.CIRCLE_ARROW_DOWN_SLASH="",e.BOOK_OPEN_COVER="",e.LIGHTBULB="",e.MESSAGE_BOT_AGENTIC_SOLID="",e.CHART_LINE_USER="",e.SERVER_CIRCLE_ARROW_DOWN="",e.EYE="",e.SHARE="󨃱"})(Gt||(Gt={}));var y;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(y||(y={}));var $a=new Map([...["abw"].map(e=>[e,y.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,y.AUDIO]),...["avi"].map(e=>[e,y.AVI]),...["chm","xhs"].map(e=>[e,y.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,y.CODE]),...["csv"].map(e=>[e,y.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,y.DITA]),...["epub"].map(e=>[e,y.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,y.EXCEL]),...["flac"].map(e=>[e,y.FLAC]),...["gif"].map(e=>[e,y.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,y.GZIP]),...["html","htm","xhtml"].map(e=>[e,y.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,y.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,y.JPEG]),...["json"].map(e=>[e,y.JSON]),...["m4a","m4p"].map(e=>[e,y.M4A]),...["mov","qt"].map(e=>[e,y.MOV]),...["mp3"].map(e=>[e,y.MP3]),...["mp4","m4v"].map(e=>[e,y.MP4]),...["ogg","oga"].map(e=>[e,y.OGG]),...["pdf","ps"].map(e=>[e,y.PDF]),...["png"].map(e=>[e,y.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,y.POWERPOINT]),...["rar"].map(e=>[e,y.RAR]),...["stp"].map(e=>[e,y.STP]),...["txt","rtf","md","mdown"].map(e=>[e,y.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,y.VIDEO]),...["wav"].map(e=>[e,y.WAV]),...["wma"].map(e=>[e,y.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,y.WORD]),...["xml","xsl","rdf"].map(e=>[e,y.XML]),...["yaml","yml","x-yaml"].map(e=>[e,y.YAML]),...["zip"].map(e=>[e,y.ZIP])]),nm=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);function ko(e,t){var r,i,n,o;e=(e??"").toLowerCase(),t=(t??"").toLowerCase();let[s,a]=(((r=nm.get(e))!==null&&r!==void 0?r:e)+"/").split("/");return(o=(n=(i=$a.get(a))!==null&&i!==void 0?i:$a.get(t))!==null&&n!==void 0?n:$a.get(s))!==null&&o!==void 0?o:y.UNKNOWN}var Na={[y.ABW]:"#91ABC6",[y.AUDIO]:"#1795E3",[y.AVI]:"#E63324",[y.CHM]:"#71C3EB",[y.CODE]:"#71C3EB",[y.CSV]:"#1F7345",[y.DITA]:"#71C3EB",[y.EPUB]:"#85B926",[y.EXCEL]:"#1F7345",[y.FLAC]:"#1795E3",[y.GIF]:"#59B031",[y.GZIP]:"#F8AB36",[y.HTML]:"#71C3EB",[y.IMAGE]:"#59B031",[y.JPEG]:"#59B031",[y.JSON]:"#71C3EB",[y.M4A]:"#1795E3",[y.MOV]:"#E63324",[y.MP3]:"#1795E3",[y.MP4]:"#E63324",[y.OGG]:"#1795E3",[y.PDF]:"#E44948",[y.PNG]:"#59B031",[y.POWERPOINT]:"#B54A2B",[y.RAR]:"#F8AB36",[y.STP]:"#3764B1",[y.TEXT]:"#3162AB",[y.UNKNOWN]:"#999999",[y.VIDEO]:"#E63324",[y.WAV]:"#1795E3",[y.WMA]:"#1795E3",[y.WORD]:"#3162AB",[y.XML]:"#71C3EB",[y.YAML]:"#71C3EB",[y.ZIP]:"#F8AB36"};var Sn=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},V=class extends sd.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=xn.nothing}render(){let t=this.variant&&Object.values(kt).includes(this.variant)?this.variant:kt.fluid_topics,r=t!==kt.material||!!this.value;return xn.html`
|
|
282
|
+
`,Ee.noTextSelect];var Pt;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(Pt||(Pt={}));var un=u(A()),gr=u(N()),qu=u(g()),Yu=u(_a());var jr;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE="",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",e.PAPER_PLANE_SLASH="",e.COMPRESS="",e.EXPAND="",e.ARROW_ROTATE_LEFT="",e.MOBILE_SMALL="",e.SPARKLES="",e.HAND_SOLID="",e.CLOCK_SOLID="",e.CONTEXT_MENU_CURSOR="",e.LANGUAGE_SLASH="",e.MAGNIFYING_GLASS_FLOPPY_DISK="",e.CABINET_FILING_FLOPPY_DISK="",e.BOOKMARK_SLASH="",e.CIRCLE_PAUSE="",e.CIRCLE_PLAY="",e.CIRCLE_STOP_PLAIN="",e.CIRCLE_ARROW_DOWN="",e.SHARE_NODES="",e.BELL="",e.BELL_SLASH="",e.FILE="",e.HAND="",e.SQUARE_INFO_SOLID="",e.FILE_CODE="",e.BOX_CODE="",e.TOPICS_SOLID="",e.PHOTO_FILM="",e.HYPHEN_SOLID="",e.CROSSHAIRS="",e.PERSON_CHALKBOARD="",e.CIRCLE_ARROW_DOWN_SLASH="",e.BOOK_OPEN_COVER="",e.LIGHTBULB="",e.MESSAGE_BOT_AGENTIC_SOLID="",e.CHART_LINE_USER="",e.SERVER_CIRCLE_ARROW_DOWN="",e.EYE="",e.SHARE="󨃱"})(jr||(jr={}));var y;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(y||(y={}));var Ta=new Map([...["abw"].map(e=>[e,y.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,y.AUDIO]),...["avi"].map(e=>[e,y.AVI]),...["chm","xhs"].map(e=>[e,y.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,y.CODE]),...["csv"].map(e=>[e,y.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,y.DITA]),...["epub"].map(e=>[e,y.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,y.EXCEL]),...["flac"].map(e=>[e,y.FLAC]),...["gif"].map(e=>[e,y.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,y.GZIP]),...["html","htm","xhtml"].map(e=>[e,y.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,y.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,y.JPEG]),...["json"].map(e=>[e,y.JSON]),...["m4a","m4p"].map(e=>[e,y.M4A]),...["mov","qt"].map(e=>[e,y.MOV]),...["mp3"].map(e=>[e,y.MP3]),...["mp4","m4v"].map(e=>[e,y.MP4]),...["ogg","oga"].map(e=>[e,y.OGG]),...["pdf","ps"].map(e=>[e,y.PDF]),...["png"].map(e=>[e,y.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,y.POWERPOINT]),...["rar"].map(e=>[e,y.RAR]),...["stp"].map(e=>[e,y.STP]),...["txt","rtf","md","mdown"].map(e=>[e,y.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,y.VIDEO]),...["wav"].map(e=>[e,y.WAV]),...["wma"].map(e=>[e,y.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,y.WORD]),...["xml","xsl","rdf"].map(e=>[e,y.XML]),...["yaml","yml","x-yaml"].map(e=>[e,y.YAML]),...["zip"].map(e=>[e,y.ZIP])]),Zh=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);function So(e,t){var r,i,n,o;e=(e??"").toLowerCase(),t=(t??"").toLowerCase();let[s,a]=(((r=Zh.get(e))!==null&&r!==void 0?r:e)+"/").split("/");return(o=(n=(i=Ta.get(a))!==null&&i!==void 0?i:Ta.get(t))!==null&&n!==void 0?n:Ta.get(s))!==null&&o!==void 0?o:y.UNKNOWN}var Oa={[y.ABW]:"#91ABC6",[y.AUDIO]:"#1795E3",[y.AVI]:"#E63324",[y.CHM]:"#71C3EB",[y.CODE]:"#71C3EB",[y.CSV]:"#1F7345",[y.DITA]:"#71C3EB",[y.EPUB]:"#85B926",[y.EXCEL]:"#1F7345",[y.FLAC]:"#1795E3",[y.GIF]:"#59B031",[y.GZIP]:"#F8AB36",[y.HTML]:"#71C3EB",[y.IMAGE]:"#59B031",[y.JPEG]:"#59B031",[y.JSON]:"#71C3EB",[y.M4A]:"#1795E3",[y.MOV]:"#E63324",[y.MP3]:"#1795E3",[y.MP4]:"#E63324",[y.OGG]:"#1795E3",[y.PDF]:"#E44948",[y.PNG]:"#59B031",[y.POWERPOINT]:"#B54A2B",[y.RAR]:"#F8AB36",[y.STP]:"#3764B1",[y.TEXT]:"#3162AB",[y.UNKNOWN]:"#999999",[y.VIDEO]:"#E63324",[y.WAV]:"#1795E3",[y.WMA]:"#1795E3",[y.WORD]:"#3162AB",[y.XML]:"#71C3EB",[y.YAML]:"#71C3EB",[y.ZIP]:"#F8AB36"};var dn=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},H=class extends qu.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=un.nothing}render(){let t=this.variant&&Object.values(Pt).includes(this.variant)?this.variant:Pt.fluid_topics,r=t!==Pt.material||!!this.value;return un.html`
|
|
272
283
|
<i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
|
|
273
|
-
${(0,
|
|
284
|
+
${(0,Yu.unsafeHTML)(this.resolvedIcon)}
|
|
274
285
|
<slot ?hidden=${r}></slot>
|
|
275
286
|
</i>
|
|
276
|
-
`}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let i=this.value||this.getTextContent();switch(this.variant){case
|
|
277
|
-
.ft-tooltip--container {
|
|
278
|
-
display: block;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.ft-tooltip--inline {
|
|
282
|
-
display: inline-block;
|
|
283
|
-
max-width: 100%;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.ft-tooltip {
|
|
287
|
-
inset: 0;
|
|
288
|
-
margin: 0;
|
|
289
|
-
border: none;
|
|
290
|
-
background: transparent;
|
|
291
|
-
box-sizing: border-box;
|
|
292
|
-
overflow: hidden;
|
|
293
|
-
width: max-content;
|
|
294
|
-
max-width: ${wn.maxWidth};
|
|
295
|
-
text-align: center;
|
|
296
|
-
padding: ${wn.distance};
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.ft-tooltip--content {
|
|
300
|
-
padding: 4px 8px;
|
|
301
|
-
border-radius: ${wn.borderRadiusS};
|
|
302
|
-
background-color: ${wn.backgroundColor};
|
|
303
|
-
color: ${wn.color};
|
|
304
|
-
position: relative;
|
|
305
|
-
word-break: break-word;
|
|
306
|
-
}
|
|
307
|
-
`;var fd=["top","right","bottom","left"],pd=["start","end"],Fa=fd.reduce((e,t)=>e.concat(t,t+"-"+pd[0],t+"-"+pd[1]),[]),An=Math.min,Ar=Math.max,En=Math.round;var ze=e=>({x:e,y:e}),om={left:"right",right:"left",bottom:"top",top:"bottom"};function hd(e,t,r){return Ar(e,An(t,r))}function Do(e,t){return typeof e=="function"?e(t):e}function Cn(e){return e.split("-")[0]}function Er(e){return e.split("-")[1]}function Va(e){return e==="x"?"y":"x"}function Ba(e){return e==="y"?"height":"width"}function Mo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Ha(e){return Va(Mo(e))}function md(e,t,r){r===void 0&&(r=!1);let i=Er(e),n=Ha(e),o=Ba(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Ua(s)),[s,Ua(s)]}function gd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function Ua(e){let t=Cn(e);return om[t]+e.slice(t.length)}function sm(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function vd(e){return typeof e!="number"?sm(e):{top:e,right:e,bottom:e,left:e}}function Zr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function yd(e,t,r){let{reference:i,floating:n}=e,o=Mo(t),s=Ha(t),a=Ba(s),l=Cn(t),c=o==="y",d=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,f=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:d,y:i.y-n.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}let m=Er(t);return m&&(h[s]+=f*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function bd(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=Do(t,e),m=vd(h),x=a[f?p==="floating"?"reference":"floating":p],S=Zr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),E=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},gt=Zr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(S.top-gt.top+m.top)/P.y,bottom:(gt.bottom-S.bottom+m.bottom)/P.y,left:(S.left-gt.left+m.left)/P.x,right:(gt.right-S.right+m.right)/P.x}}var am=50,xd=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:bd},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:p}=yd(c,i,l),f=i,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:S,fn:E}=x,{x:R,y:P,data:gt,reset:dt}=await E({x:d,y:p,initialPlacement:i,placement:f,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});d=R??d,p=P??p,m[S]={...m[S],...gt},dt&&h<am&&(h++,typeof dt=="object"&&(dt.placement&&(f=dt.placement),dt.rects&&(c=dt.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):dt.rects),{x:d,y:p}=yd(c,f,l)),v=-1)}return{x:d,y:p,placement:f,strategy:n,middlewareData:m}};function lm(e,t,r){return(e?[...r.filter(n=>Er(n)===e),...r.filter(n=>Er(n)!==e)]:r.filter(n=>Cn(n)===n)).filter(n=>e?Er(n)===e||(t?gd(n)!==n:!1):!0)}var Sd=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:d=!1,alignment:p,allowedPlacements:f=Fa,autoAlignment:h=!0,...m}=Do(e,t),v=p!==void 0||f===Fa?lm(p||null,h,f):f,x=((r=s.autoPlacement)==null?void 0:r.index)||0,S=v[x];if(S==null)return{};if(a!==S)return{reset:{placement:v[0]}};let E=await l.detectOverflow(t,m),R=md(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),P=[E[Cn(S)],E[R[0]],E[R[1]]],gt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:S,overflows:P}],dt=v[x+1];if(dt)return{data:{index:x+1,overflows:gt},reset:{placement:dt}};let cr=gt.map(te=>{let ue=Er(te.placement);return[te.placement,ue&&d?te.overflows.slice(0,2).reduce((ee,Dr)=>ee+Dr,0):te.overflows[0],te.overflows]}).sort((te,ue)=>te[1]-ue[1]),ur=((n=cr.filter(te=>te[2].slice(0,Er(te[0])?2:3).every(ue=>ue<=0))[0])==null?void 0:n[0])||cr[0][0];return ur!==a?{data:{index:x+1,overflows:gt},reset:{placement:ur}}:{}}}};var wd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:P}=E;return{x:R,y:P}}},...c}=Do(e,t),d={x:r,y:i},p=await o.detectOverflow(t,c),f=Mo(n),h=Va(f),m=d[h],v=d[f],x=(E,R)=>hd(R+p[E==="y"?"top":"left"],R,R-p[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(f,v));let S=l.fn({...t,[h]:m,[f]:v});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[f]:a}}}}}};function No(){return typeof window<"u"}function Xr(e){return Ed(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tr(e){var t;return(t=(Ed(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ed(e){return No()?e instanceof Node||e instanceof qt(e).Node:!1}function Le(e){return No()?e instanceof Element||e instanceof qt(e).Element:!1}function er(e){return No()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Ad(e){return!No()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}function _n(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=Pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Cd(e){return/^(table|td|th)$/.test(Xr(e))}function Tn(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var cm=/transform|translate|scale|rotate|perspective|filter/,um=/paint|layout|strict|content/,Yr=e=>!!e&&e!=="none",ja;function Mi(e){let t=Le(e)?Pe(e):e;return Yr(t.transform)||Yr(t.translate)||Yr(t.scale)||Yr(t.rotate)||Yr(t.perspective)||!Uo()&&(Yr(t.backdropFilter)||Yr(t.filter))||cm.test(t.willChange||"")||um.test(t.contain||"")}function _d(e){let t=Cr(e);for(;er(t)&&!$i(t);){if(Mi(t))return t;if(Tn(t))return null;t=Cr(t)}return null}function Uo(){return ja==null&&(ja=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ja}function $i(e){return/^(html|body|#document)$/.test(Xr(e))}function Pe(e){return qt(e).getComputedStyle(e)}function On(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cr(e){if(Xr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Ad(e)&&e.host||tr(e);return Ad(t)?t.host:t}function Td(e){let t=Cr(e);return $i(t)?(e.ownerDocument||e).body:er(t)&&_n(t)?t:Td(t)}function $o(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Td(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=qt(n);if(o){let a=Fo(s);return t.concat(s,s.visualViewport||[],_n(n)?n:[],a&&r?$o(a):[])}else return t.concat(n,$o(n,[],r))}function Fo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ld(e){let t=Pe(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=er(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=En(r)!==o||En(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Pd(e){return Le(e)?e:e.contextElement}function Ni(e){let t=Pd(e);if(!er(t))return ze(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=Ld(t),s=(o?En(r.width):r.width)/i,a=(o?En(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var dm=ze(0);function Id(e){let t=qt(e);return!Uo()||!t.visualViewport?dm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pm(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===qt(e)}function Rn(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=Pd(e),s=ze(1);t&&(i?Le(i)&&(s=Ni(i)):s=Ni(e));let a=pm(o,r,i)?Id(o):ze(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,d=n.width/s.x,p=n.height/s.y;if(o&&i){let f=qt(o),h=Le(i)?qt(i):i,m=f,v=Fo(m);for(;v&&h!==m;){let x=Ni(v),S=v.getBoundingClientRect(),E=Pe(v),R=S.left+(v.clientLeft+parseFloat(E.paddingLeft))*x.x,P=S.top+(v.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,p*=x.y,l+=R,c+=P,m=qt(v),v=Fo(m)}}return Zr({width:d,height:p,x:l,y:c})}function Vo(e,t){let r=On(e).scrollLeft;return t?t.left+r:Rn(tr(e)).left+r}function kd(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Vo(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function fm(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=tr(i),a=t?Tn(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=ze(1),d=ze(0),p=er(i);if((p||!o)&&((Xr(i)!=="body"||_n(s))&&(l=On(i)),p)){let h=Rn(i);c=Ni(i),d.x=h.x+i.clientLeft,d.y=h.y+i.clientTop}let f=s&&!p&&!o?kd(s,l):ze(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function hm(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function mm(e){let t=On(e),r=e.ownerDocument.body,i=Ar(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Ar(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+Vo(e),s=-t.scrollTop;return Pe(r).direction==="rtl"&&(o+=Ar(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var gm=25;function vm(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=qt(e),o=tr(e),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(s){let f=!Uo()||t==="fixed";i?f||(c=-s.offsetLeft,d=-s.offsetTop):(a=s.width,l=s.height,f&&(c=s.offsetLeft,d=s.offsetTop))}if(Vo(o)<=0){let f=o.ownerDocument,h=f.body,m=getComputedStyle(h),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(o.clientWidth-h.clientWidth-v),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;S<=gm&&(a-=S)}return{width:a,height:l,x:c,y:d}}function ym(e,t){let r=Rn(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=Ni(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Od(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=vm(e,r,t);else if(t==="document")i=mm(tr(e));else if(Le(t))i=ym(t,r);else{let n=Id(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Zr(i)}function bm(e,t){let r=t.get(e);if(r)return r;let i=$o(e,[],!1).filter(a=>Le(a)&&Xr(a)!=="body"),n=null,o=Pe(e).position==="fixed",s=o?Cr(e):e;for(;Le(s)&&!$i(s);){let a=Pe(s),l=Mi(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):n=a,s=Cr(s)}return t.set(e,i),i}function xm(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?Tn(t)?[]:bm(t,this._c):[].concat(r),i],a=Od(t,s[0],n),l=a.top,c=a.right,d=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let h=Od(t,s[f],n);l=Ar(h.top,l),c=An(h.right,c),d=An(h.bottom,d),p=Ar(h.left,p)}return{width:c-p,height:d-l,x:p,y:l}}function Sm(e){let{width:t,height:r}=Ld(e);return{width:t,height:r}}function wm(e,t,r){let i=er(t),n=tr(t),o=r==="fixed",s=Rn(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=ze(0);if((i||!o)&&((Xr(t)!=="body"||_n(n))&&(a=On(t)),i)){let f=Rn(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!i&&n&&(l.x=Vo(n));let c=n&&!i&&!o?kd(n,a):ze(0),d=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return{x:d,y:p,width:s.width,height:s.height}}function za(e){return Pe(e).position==="static"}function Rd(e,t){if(!er(e)||Pe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return tr(e)===r&&(r=r.ownerDocument.body),r}function Dd(e,t){let r=qt(e);if(Tn(e))return r;if(!er(e)){let n=Cr(e);for(;n&&!$i(n);){if(Le(n)&&!za(n))return n;n=Cr(n)}return r}let i=Rd(e,t);for(;i&&Cd(i)&&za(i);)i=Rd(i,t);return i&&$i(i)&&za(i)&&!Mi(i)?r:i||_d(e)||r}var Am=async function(e){let t=this.getOffsetParent||Dd,r=this.getDimensions,i=await r(e.floating);return{reference:wm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Em(e){return Pe(e).direction==="rtl"}var Bo={convertOffsetParentRelativeRectToViewportRelativeRect:fm,getDocumentElement:tr,getClippingRect:xm,getOffsetParent:Dd,getElementRects:Am,getClientRects:hm,getDimensions:Sm,getScale:Ni,isElement:Le,isRTL:Em};var Md=Sd,$d=wd;var Nd=(e,t,r)=>{let i=new Map,n=r??{},o={...Bo,...n.platform,_c:i};return xd(e,t,{...n,platform:o})};function Ud(e){return Cm(e)}function Wa(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Cm(e){for(let t=e;t;t=Wa(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Wa(e);t;t=Wa(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Mi(r)||t.tagName==="BODY"))return t}return null}async function Ho(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},Nd(e,t,{strategy:i.strategy,platform:{...Bo,getOffsetParent:n=>Bo.getOffsetParent(n,Ud)},middleware:[$d({crossAxis:!0}),Md({allowedPlacements:[i.placement]})]})}var Fd=u(g());var Ka=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?ki.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},_m=new Ka;var Vd=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:Fd.hasChanged,converter:ki,...t}),r[vn]=(n=r[vn])!==null&&n!==void 0?n:new Map,r[vn].set(i,e??{})};var Ie=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},K=class extends To{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 ye.Debouncer,this.revealDebouncer=new ye.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)?this.matchesIgnored(t)&&this.hide():this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return Bd.html`
|
|
308
|
-
<div part="container"
|
|
309
|
-
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
|
|
310
|
-
<slot part="slot"></slot>
|
|
311
|
-
<div part="tooltip" role="tooltip" inert
|
|
312
|
-
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
313
|
-
popover="manual">
|
|
314
|
-
<div part="tooltip-content" class="ft-tooltip--content">
|
|
315
|
-
<slot name="text"></slot>
|
|
316
|
-
<ft-typography variant="${H.caption}" ?hidden=${!(!((t=this.text)===null||t===void 0)&&t.message)}>
|
|
317
|
-
${(r=this.text)===null||r===void 0?void 0:r.message}
|
|
318
|
-
</ft-typography>
|
|
319
|
-
</div>
|
|
320
|
-
</div>
|
|
321
|
-
</div>
|
|
322
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,i;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:t},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Ho(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${ye.designSystemVariables.transitionDuration}, left ${ye.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,ye.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};K.elementDefinitions={"ft-typography":N};K.styles=dd;Ie([Vd()],K.prototype,"text",void 0);Ie([(0,be.property)({type:Boolean})],K.prototype,"manual",void 0);Ie([(0,be.property)({type:Boolean})],K.prototype,"inline",void 0);Ie([(0,ye.numberProperty)()],K.prototype,"delay",void 0);Ie([(0,be.property)()],K.prototype,"position",void 0);Ie([(0,ye.jsonProperty)([])],K.prototype,"ignoreMatchingElements",void 0);Ie([(0,be.queryAssignedNodes)()],K.prototype,"slotNodes",void 0);Ie([(0,be.query)(".ft-tooltip--container")],K.prototype,"container",void 0);Ie([(0,be.query)(".ft-tooltip")],K.prototype,"tooltip",void 0);Ie([(0,be.query)(".ft-tooltip--content")],K.prototype,"tooltipContent",void 0);Ie([(0,be.state)()],K.prototype,"visible",void 0);var jd=u(g());var Hd={"ft-tooltip":K};(0,jd.customElements)(Hd);var _r=Wt.build("designedViewer"),zd={fitToContainerAriaLabel:"Fill available space",zoomRealSizeAriaLabel:"Display content at original size",zoomInAriaLabel:"Zoom in",zoomOutAriaLabel:"Zoom out",rotateLeftAriaLabel:"Rotate left",rotateRightAriaLabel:"Rotate right"};var rr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Tt=class extends(0,We.withConditionalVisibility)(Kt(It)){constructor(){super(...arguments),this.disabled=!1,this.tabindex=0,this.role="button",this.ariaLabel="",this.control=je.FIT_TO_CONTAINER,this.controlDefinitions={[je.FIT_TO_CONTAINER]:{ariaLabel:()=>_r.messages.fitToContainerAriaLabel(),icon:Gt.ZOOM_FULLSCREEN,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(void 0)}},[je.ZOOM_REAL_SIZE]:{ariaLabel:()=>_r.messages.zoomRealSizeAriaLabel(),icon:Gt.ZOOM_REALSIZE,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(1)}},[je.ZOOM_IN]:{ariaLabel:()=>_r.messages.zoomInAriaLabel(),icon:Gt.ZOOM_IN,disabled:()=>{var t;return((t=this.zoom)!==null&&t!==void 0?t:1)>20},run:()=>{var t,r;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)*1.2)}},[je.ZOOM_OUT]:{ariaLabel:()=>_r.messages.zoomOutAriaLabel(),icon:Gt.ZOOM_OUT,disabled:()=>{var t;return((t=this.zoom)!==null&&t!==void 0?t:1)<.05},run:()=>{var t,r;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setZoom(((r=this.zoom)!==null&&r!==void 0?r:1)/1.2)}},[je.ROTATE_LEFT]:{ariaLabel:()=>_r.messages.rotateLeftAriaLabel(),icon:Gt.ARROW_ROTATE_LEFT,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setRotation(this.rotation-90)}},[je.ROTATE_RIGHT]:{ariaLabel:()=>_r.messages.rotateRightAriaLabel(),icon:Gt.ARROW_ROTATE_RIGHT,run:()=>{var t;return(t=this.viewerStateManager)===null||t===void 0?void 0:t.setRotation(this.rotation+90)}}},this.modifyContent=()=>{var t;(t=this.controlDefinitions[this.control])===null||t===void 0||t.run()}}render(){var t;return this.isVisible?Ui.html`
|
|
323
|
-
<slot>
|
|
324
|
-
<ft-tooltip text="${this.ariaLabel}">
|
|
325
|
-
<ft-icon value="${(t=this.controlDefinitions[this.control])===null||t===void 0?void 0:t.icon}"></ft-icon>
|
|
326
|
-
</ft-tooltip>
|
|
327
|
-
</slot>
|
|
328
|
-
`:Ui.nothing}willUpdate(t){var r,i,n,o;super.willUpdate(t),this.updateAriaLabel(),this.disabled=(n=(i=(r=this.controlDefinitions[this.control])===null||r===void 0?void 0:r.disabled)===null||i===void 0?void 0:i.call(r))!==null&&n!==void 0?n:!1,this.isVisible=!!(!((o=this.descriptor)===null||o===void 0)&&o.viewableInCurrentBrowser)&&this.descriptor.mimeType.startsWith("image/")}onI18nUpdate(t){super.onI18nUpdate(t),this.updateAriaLabel()}updateAriaLabel(){var t;this.ariaLabel=(t=this.controlDefinitions[this.control])===null||t===void 0?void 0:t.ariaLabel()}connectedCallback(){super.connectedCallback(),this.addI18nContext(_r,zd),this.updateComplete.then(()=>{var t;return(t=this.tooltip)===null||t===void 0?void 0:t.setupFor(this)}),this.addEventListener("click",this.modifyContent)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.modifyContent)}};Tt.elementDefinitions={"ft-icon":V,"ft-tooltip":K};Tt.styles=Ui.css`
|
|
329
|
-
:host {
|
|
330
|
-
display: inline-block;
|
|
331
|
-
opacity: 1;
|
|
332
|
-
filter: grayscale(0);
|
|
333
|
-
transition: opacity 0.2s ease-in-out, filter 0.2s ease-in-out;
|
|
334
|
-
cursor: pointer;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
:host([disabled]) {
|
|
338
|
-
opacity: 0.8;
|
|
339
|
-
filter: grayscale(1);
|
|
340
|
-
pointer-events: none;
|
|
341
|
-
cursor: inherit;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
ft-icon {
|
|
345
|
-
display: inline-flex;
|
|
346
|
-
align-items: center;
|
|
347
|
-
justify-content: center;
|
|
348
|
-
width: 40px;
|
|
349
|
-
height: 40px;
|
|
350
|
-
border-radius: 50%;
|
|
351
|
-
background-color: ${We.designSystemVariables.colorPrimary};
|
|
352
|
-
color: ${We.designSystemVariables.colorOnPrimary};
|
|
353
|
-
cursor: pointer;
|
|
354
|
-
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
:host:hover, :host:focus-within {
|
|
358
|
-
ft-icon {
|
|
359
|
-
background-color: hsl(from ${We.designSystemVariables.colorPrimary} h s calc(l + 30));
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
`;rr([(0,Tr.property)({type:Boolean,reflect:!0})],Tt.prototype,"disabled",void 0);rr([(0,Tr.property)({reflect:!0})],Tt.prototype,"tabindex",void 0);rr([(0,Tr.property)({reflect:!0})],Tt.prototype,"role",void 0);rr([(0,Tr.property)({reflect:!0,attribute:"aria-label"})],Tt.prototype,"ariaLabel",void 0);rr([(0,Tr.property)()],Tt.prototype,"control",void 0);rr([(0,We.redux)({store:"viewer"})],Tt.prototype,"descriptor",void 0);rr([(0,We.redux)({store:"viewer",selector:({contentModifiers:e})=>e.zoom})],Tt.prototype,"zoom",void 0);rr([(0,We.redux)({store:"viewer",selector:({contentModifiers:e})=>e.rotation})],Tt.prototype,"rotation",void 0);rr([(0,Tr.query)("ft-tooltip")],Tt.prototype,"tooltip",void 0);var jo=class extends de(Tt){};var Wd=u(g()),Fi=u(A());var Tm=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ir=class extends It{render(){return this.filename?Fi.html`
|
|
363
|
-
<ft-typography variant="${H.body1}" part="filename">
|
|
364
|
-
${this.filename}
|
|
365
|
-
</ft-typography>
|
|
366
|
-
`:Fi.nothing}};ir.elementDefinitions={"ft-typography":N};ir.styles=Fi.css`
|
|
367
|
-
[part="filename"]::part(text) {
|
|
368
|
-
margin: unset;
|
|
369
|
-
}
|
|
370
|
-
`;Tm([(0,Wd.redux)({store:"viewer",selector:({descriptor:e})=>e?.filename})],ir.prototype,"filename",void 0);var zo=class extends de(ir){};var Kd=u(g()),Vi=u(A());var Om=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Jr=class extends It{render(){return this.displayName?Vi.html`
|
|
371
|
-
<ft-typography variant="${H.title}" part="display-name" element="h2">
|
|
372
|
-
${this.displayName}
|
|
373
|
-
</ft-typography>
|
|
374
|
-
`:Vi.nothing}};Jr.elementDefinitions={"ft-typography":N};Jr.styles=Vi.css`
|
|
375
|
-
[part="display-name"]::part(text) {
|
|
376
|
-
margin: unset;
|
|
377
|
-
}
|
|
378
|
-
`;Om([(0,Kd.redux)({store:"viewer",selector:({descriptor:e})=>e?.displayName})],Jr.prototype,"displayName",void 0);var Wo=class extends de(Jr){};var Ln=u(g()),Ko=u(A());var Gd=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},nr=class extends It{render(){var t,r;return this.mimeType?Ko.html`
|
|
287
|
+
`}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}update(t){super.update(t),["value","variant"].some(r=>t.has(r))&&this.resolveIcon()}resolveIcon(){var t,r;let i=this.value||this.getTextContent();switch(this.variant){case Pt.file_format:this.resolvedIcon=(t=y[i.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:i;break;case Pt.material:this.resolvedIcon=this.value||un.nothing;break;default:this.resolvedIcon=(r=jr[i.replace("-","_").toUpperCase()])!==null&&r!==void 0?r:i;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};H.elementDefinitions={};H.styles=Gu;dn([(0,gr.property)()],H.prototype,"variant",void 0);dn([(0,gr.property)()],H.prototype,"value",void 0);dn([(0,gr.property)({reflect:!0,attribute:"aria-hidden"})],H.prototype,"ariaHidden",void 0);dn([(0,gr.state)()],H.prototype,"resolvedIcon",void 0);dn([(0,gr.query)("slot")],H.prototype,"slottedContent",void 0);var Xu=u(g());var Zu={"ft-icon":H};(0,Xu.customElements)(Zu);var Ju=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Je=class extends Ht{render(){var t,r;return this.mimeType?wo.html`
|
|
379
288
|
<ft-icon part="icon"
|
|
380
|
-
variant="${
|
|
381
|
-
value="${
|
|
382
|
-
`:
|
|
383
|
-
<ft-typography variant="${
|
|
289
|
+
variant="${Pt.file_format}"
|
|
290
|
+
value="${So(this.mimeType,(0,pn.last)((r=(t=this.filename)===null||t===void 0?void 0:t.split("."))!==null&&r!==void 0?r:[]))}"></ft-icon>
|
|
291
|
+
`:wo.nothing}};Je.elementDefinitions={"ft-icon":H};Ju([(0,pn.redux)({store:"viewer",selector:({descriptor:e})=>e?.mimeType})],Je.prototype,"mimeType",void 0);Ju([(0,pn.redux)({store:"viewer",selector:({descriptor:e})=>e?.filename})],Je.prototype,"filename",void 0);var Ao=class extends Me(Je){};var Qu=u(g()),Li=u(A());var Xh=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Qe=class extends Ht{render(){return this.documentTitle?Li.html`
|
|
292
|
+
<ft-typography variant="${B.title}" part="title" element="h1">
|
|
384
293
|
${this.documentTitle}
|
|
385
294
|
</ft-typography>
|
|
386
|
-
`:
|
|
295
|
+
`:Li.nothing}};Qe.elementDefinitions={"ft-typography":U};Qe.styles=Li.css`
|
|
387
296
|
[part="title"]::part(text) {
|
|
388
297
|
margin: unset;
|
|
389
298
|
}
|
|
390
|
-
`;
|
|
299
|
+
`;Xh([(0,Qu.redux)({store:"viewer",selector:({document:e})=>e?.title})],Qe.prototype,"documentTitle",void 0);var Eo=class extends Me(Qe){};var rd=u(A()),id=u(N());var Wr=u(g());var td;(function(e){e.RATING="RATING"})(td||(td={}));var vr;(function(e){e.udAttachmentsUpdate="ud-attachments-update",e.udRatingUpdate="ud-rating-update",e.clusteringHelperCreated="clustering-helper-created"})(vr||(vr={}));var yr;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING"})(yr||(yr={}));var Co=class extends Ct{getDocument(t){return this.cache.get(t,()=>this.api.getUnstructuredDocument(t))}getAttachments(t){return this.cache.get(`${t}-attachments`,()=>this.api.getUdAttachments(t))}getAttachmentDownloadLink(t,r){return this.makeAbsolute(`${this.api.endpoints.khub.documents.documentId(t).attachments.attachmentId(r).content}?download=true&locationValue=viewer`)}makeAbsolute(t){return this.api.makeAbsolute(t)}async awaitMakeAbsolute(t){return(await this.awaitApi).makeAbsolute(t)}async getDocumentRating(t){return(await this.api.getDocumentRating(t)).publication}async rateDocument(t,r,i){return this.api.rateDocument(t,r,i)}async unrateDocument(t){return this.api.unrateDocument(t)}async sendDocumentFeedback(t,r,i){return this.api.sendDocumentFeedback(t,r,i)}isFeatureAccessible(t,{session:r}){switch(t){case yr.FEEDBACK:return rn(r??[],tt.FEEDBACK_USER);case yr.RATING:return rn(r??[],tt.RATING_USER);default:return!1}}getConfiguration(){return this.cache.get("configuration",()=>this.api.getViewerConfiguration())}clearConfiguration(){this.cache.clear("configuration")}fetchRelativesForDocument(t,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}getRelativesForDocument(t,r){return this.cache.get("document-relatives-"+t+"-"+r.join("-"),()=>this.fetchRelativesForDocument(t,r))}};var zr=u(g());var _o=class e extends si{static build(t){return new e(Mn(t),new Co)}constructor(t,r,i){super(t),this.store=t,this.service=r,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,t.actions.origin(dr.UNSTRUCTURED_DOCUMENT)}async load(){var t,r;let{documentId:i}=this.store.getState();if(i){let[n]=await Promise.all([this.service.getDocument(i),this.loadConfiguration()]);this.store.actions.unstructuredDocument(n),this.store.actions.document({type:Jn.UNSTRUCTURED_DOCUMENT,id:n.id,lang:(t=n.lang)!==null&&t!==void 0?t:"en-US",title:n.title,metadata:n.metadata,portalUrl:n.viewerUrl});let o=await this.service.awaitMakeAbsolute(n.contentApiEndpoint);this.store.actions.descriptor({id:n.id,portalUrl:n.viewerUrl,filename:n.filename,fingerprint:n.lastEdition,displayName:n.title,alt:(r=n.description)!==null&&r!==void 0?r:n.title,mimeType:n.mimeType,size:0,viewableInCurrentBrowser:n.viewableInCurrentBrowser,contentUrl:o}),this.store.actions.watermark(n.watermark),this.fetchMapRating(),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives()}return this.store.getState()}async fetchMapRating(){var t;let{documentId:r}=this.store.getState();r&&this.store.actions.documentRating(await((t=this.service)===null||t===void 0?void 0:t.getDocumentRating(r)))}clear(){this.store.clearKeeping("documentId","origin")}reload(){var t;return this.clear(),(t=this.service)===null||t===void 0||t.clearConfiguration(),this.load()}setDocumentId(t){return this.store.actions.documentId(t),this.reload()}async loadConfiguration(){var t;return(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(r=>this.store.actions.configuration(r))}async fetchRelatives(){var t,r;let i=(t=this.store.getState().document)===null||t===void 0?void 0:t.metadata.filter(n=>{var o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(vr.clusteringHelperCreated))}createClusteringHelper(){var t,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>(0,zr.accessResultId)(s)==this.store.getState().documentId),o=(r=(t=w.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&r!==void 0?r:[];return new zr.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}async getRelativeDocumentUrlForLocale(t){var r;this.store.getState().relatives==null&&await this.fetchRelatives();let i=zr.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",t);return(0,zr.accessResultUrl)(i)}};var To=u(g()),Ra=u(N());var ed=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},La=Symbol("ud-viewer-state-manager"),jt=(0,To.applyMixinOnce)(Symbol("toFtUdViewerComponent"),function(e){class t extends e{constructor(){super(...arguments),this.neededUdvRequests=[]}get service(){var i;return(i=this.viewerStateManager)===null||i===void 0?void 0:i.service}willUpdate(i){var n,o,s;super.willUpdate(i),i.has("viewerStateManager")&&(this.unregisterFromUdvStateManager(i.get("viewerStateManager")),this.registerToUdvStateManager(this.viewerStateManager)),i.has("neededUdvRequests")&&((n=this.viewerStateManager)===null||n===void 0||n.unregisterComponent(this,(o=i.get("neededUdvRequests"))!==null&&o!==void 0?o:[]),(s=this.viewerStateManager)===null||s===void 0||s.registerComponent(this,this.neededUdvRequests))}setUdvStateManager(i){this.clearStateManager(),this.viewerStateManager=i,this.addStore(i.store,"viewer")}clearStateManager(){this.viewerStateManager&&(this.removeStore("viewer"),this.viewerStateManager=void 0)}registerToUdvStateManager(i){i&&(i.registerComponent(this,this.neededUdvRequests),this.addStore(i.store,"viewer"))}unregisterFromUdvStateManager(i){i&&(i.unregisterComponent(this,this.neededUdvRequests),this.removeStore("viewer"))}connectedCallback(){super.connectedCallback(),this.registerToUdvStateManager(this.viewerStateManager)}disconnectedCallback(){super.disconnectedCallback(),this.unregisterFromUdvStateManager(this.viewerStateManager)}}return ed([Yi({context:La,subscribe:!0}),(0,Ra.state)()],t.prototype,"viewerStateManager",void 0),ed([(0,Ra.state)({hasChanged:To.hasChanged})],t.prototype,"neededUdvRequests",void 0),t});var Oo=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},br=class extends Wr.FtLitElementRedux{constructor(){super(...arguments),this.viewerStateManager=_o.build(this.id||(0,Wr.randomId)(6))}render(){return rd.html`
|
|
391
300
|
<slot></slot>
|
|
392
|
-
`}willUpdate(t){super.willUpdate(t),t.has("documentId")&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.setDocumentId(this.documentId);this.documentId&&this.dispatchEvent(new
|
|
301
|
+
`}willUpdate(t){super.willUpdate(t),t.has("documentId")&&this.initStateManager()}async initStateManager(){let t=await this.viewerStateManager.setDocumentId(this.documentId);this.documentId&&this.dispatchEvent(new $r(t))}connectedCallback(){super.connectedCallback(),this.addStore(w)}onAuthenticationChange(){this.viewerStateManager.reload()}async reactToUiLocaleChanged(t){var r;if(!((r=w.getState().localesConfiguration)===null||r===void 0)&&r.uiLanguageSetsReaderLanguage){yi===null||yi===void 0||yi.stopReloadDebouncer();let i=await this.viewerStateManager.getRelativeDocumentUrlForLocale(t.detail.uiLocale);i?window.location.assign(i):window.location.reload()}}};Oo([(0,id.property)()],br.prototype,"documentId",void 0);Oo([qi({context:La})],br.prototype,"viewerStateManager",void 0);Oo([(0,Wr.reduxEventListener)({eventName:Ue.eventName})],br.prototype,"onAuthenticationChange",null);Oo([(0,Wr.reduxEventListener)({store:w.name,eventName:kr.eventName})],br.prototype,"reactToUiLocaleChanged",null);var Ro=class extends jt(st){};var Lo=class extends jt(Xe){};var Po=class extends jt(Qe){};var ko=class extends jt(Je){};var Wo=u(g());var fe=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?oo:vi}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var ki=u(g());var nd=u(N());var Pa=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Pi=new Pa;var Jh=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},hn=Symbol("i18nAttributes"),od=Symbol("i18nListAttributes"),mn=Symbol("i18nProperties"),Io=Symbol("i18nContexts"),fn=Symbol("i18nUnsubs"),he=(0,ki.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?oo:vi}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:d,argsProvider:p}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let f=d??(p?p(this):[]);return this.getI18nService(c).resolveMessage(s,a,...f)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Pi.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(d,p,f)=>f?.context&&f.key&&o(d,p,f)?{...f,message:this.i18n({context:f.context,key:f.key,custom:f.custom,...d})}:f;(s=this[hn])===null||s===void 0||s.forEach((d,p)=>l[p]=c(d,p,l[p])),(a=this[od])===null||a===void 0||a.forEach((d,p)=>{var f;return l[p]=(f=l[p])===null||f===void 0?void 0:f.map(h=>c(d,p,h))})}updateI18nProperties(o){var s;(s=this[mn])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[Io].set(l,{isCustomContext:a}),this[fn].has(l)||this[fn].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[Io].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[Io].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[fn].forEach(o=>o()),this[fn].clear()}}return t=Io,r=fn,Jh([(0,nd.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),Do=class extends he(ki.FtLitElement){},Mo=class extends he(ki.FtLitElementRedux){};var $o=(e,t)=>(r,i)=>{var n,o;r.constructor.createProperty(i,t??{attribute:!1,type:String});let s={...e,key:(n=e.key)!==null&&n!==void 0?n:i};r[mn]=(o=r[mn])!==null&&o!==void 0?o:new Map,r[mn].set(i,s)};var sd=u(A());var ad=sd.css`
|
|
302
|
+
`;var No=u(A()),Uo=u(N()),Fo=u(g());var gn=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ce=class extends Mo{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":No.nothing:No.html`
|
|
303
|
+
<span class="ft-i18n">
|
|
304
|
+
${this.i18n({context:this.context,key:this.key,args:Array.isArray(this.args)?this.args:[]})}
|
|
305
|
+
</span>
|
|
306
|
+
`}update(t){var r;super.update(t),["context","key","defaultMessage"].some(i=>t.has(i))&&this.context&&this.key&&this.addI18nContext(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};Ce.elementDefinitions={};Ce.styles=ad;gn([(0,Fo.redux)()],Ce.prototype,"editorMode",void 0);gn([(0,Uo.property)()],Ce.prototype,"context",void 0);gn([(0,Uo.property)()],Ce.prototype,"key",void 0);gn([(0,Fo.jsonProperty)([])],Ce.prototype,"args",void 0);gn([(0,Uo.property)()],Ce.prototype,"defaultMessage",void 0);var cd=u(g());var ld={"ft-i18n":Ce};(0,cd.customElements)(ld);var vt=u(g()),ud={itemsGap:vt.FtCssVariableFactory.create("--ft-reader-attachments-items-gap","","SIZE","8px"),itemPadding:vt.FtCssVariableFactory.create("--ft-reader-attachments-item-padding","","SIZE","8px"),itemBorderWidth:vt.FtCssVariableFactory.create("--ft-reader-attachments-item-border-width","","SIZE","1px"),itemBorderColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-color","",vt.designSystemVariables.colorOutline),itemBorderRadius:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-border-radius","",vt.designSystemVariables.borderRadiusS),itemBackgroundColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-background-color","",vt.designSystemVariables.colorSurface),itemTextColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-text-color","",vt.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-background-color","",vt.designSystemVariables.colorPrimary),itemHoverTextColor:vt.FtCssVariableFactory.extend("--ft-reader-attachments-item-hover-text-color","",vt.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:vt.FtCssVariableFactory.create("--ft-reader-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:vt.FtCssVariableFactory.create("--ft-reader-attachments-down-icon-size","","SIZE","20px")};var zo=u(g());var Bo=u(g()),fd=u(N());var Vo;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found"})(Vo||(Vo={}));var dd;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(dd||(dd={}));var Qh=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ia=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},ka=Symbol("registerInterval"),Da=(0,Bo.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[ka]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[ka]):this.dispatchEvent(new Ia)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=ka,Qh([(0,fd.state)()],r.prototype,"stateManager",void 0),r}),pd=class extends Da(Bo.FtLitElementRedux){};var Ma=fe.build("designedReaderAttachments"),hd={download:"Download \u201C{0}\u201D"};var Kr=u(A()),Ii=u(N()),Di=u(g()),Td=u(xi());var Od=u(ee());var Ad=u(A()),Tt=u(N()),Ed=u(ee()),vn=u(g());var Sd=u(A()),ht=u(g()),gd=ht.FtCssVariableFactory.extend("--ft-ripple-color","",ht.designSystemVariables.colorContent),K={color:gd,backgroundColor:ht.FtCssVariableFactory.extend("--ft-ripple-background-color","",gd),opacityContentOnSurfacePressed:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ht.FtCssVariableFactory.external(ht.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ht.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},vd=ht.FtCssVariableFactory.extend("--ft-ripple-color","",ht.designSystemVariables.colorPrimary),yd={color:vd,backgroundColor:ht.FtCssVariableFactory.extend("--ft-ripple-background-color","",vd)},bd=ht.FtCssVariableFactory.extend("--ft-ripple-color","",ht.designSystemVariables.colorSecondary),xd={color:bd,backgroundColor:ht.FtCssVariableFactory.extend("--ft-ripple-background-color","",bd)},wd=Sd.css`
|
|
393
307
|
:host {
|
|
394
308
|
display: contents;
|
|
395
309
|
}
|
|
@@ -402,7 +316,7 @@
|
|
|
402
316
|
|
|
403
317
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
404
318
|
overflow: hidden;
|
|
405
|
-
border-radius: ${
|
|
319
|
+
border-radius: ${K.borderRadius};
|
|
406
320
|
}
|
|
407
321
|
|
|
408
322
|
.ft-ripple .ft-ripple--background,
|
|
@@ -436,27 +350,27 @@
|
|
|
436
350
|
}
|
|
437
351
|
|
|
438
352
|
.ft-ripple .ft-ripple--background {
|
|
439
|
-
background-color: ${
|
|
353
|
+
background-color: ${K.backgroundColor};
|
|
440
354
|
}
|
|
441
355
|
|
|
442
356
|
.ft-ripple .ft-ripple--effect {
|
|
443
|
-
background-color: ${
|
|
357
|
+
background-color: ${K.color};
|
|
444
358
|
}
|
|
445
359
|
|
|
446
360
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
447
|
-
background-color: ${
|
|
361
|
+
background-color: ${xd.backgroundColor};
|
|
448
362
|
}
|
|
449
363
|
|
|
450
364
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
451
|
-
background-color: ${
|
|
365
|
+
background-color: ${xd.color};
|
|
452
366
|
}
|
|
453
367
|
|
|
454
368
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
455
|
-
background-color: ${
|
|
369
|
+
background-color: ${yd.backgroundColor};
|
|
456
370
|
}
|
|
457
371
|
|
|
458
372
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
459
|
-
background-color: ${
|
|
373
|
+
background-color: ${yd.color};
|
|
460
374
|
}
|
|
461
375
|
|
|
462
376
|
.ft-ripple .ft-ripple--background {
|
|
@@ -486,35 +400,35 @@
|
|
|
486
400
|
}
|
|
487
401
|
|
|
488
402
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
489
|
-
opacity: ${
|
|
403
|
+
opacity: ${K.opacityContentOnSurfaceHover};
|
|
490
404
|
}
|
|
491
405
|
|
|
492
406
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
493
|
-
opacity: ${
|
|
407
|
+
opacity: ${K.opacityContentOnSurfaceSelected};
|
|
494
408
|
}
|
|
495
409
|
|
|
496
410
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
497
|
-
opacity: ${
|
|
411
|
+
opacity: ${K.opacityContentOnSurfaceFocused};
|
|
498
412
|
}
|
|
499
413
|
|
|
500
414
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
501
|
-
opacity: ${
|
|
415
|
+
opacity: ${K.opacityContentOnSurfacePressed};
|
|
502
416
|
transform: translate(-50%, -50%) scale(1);
|
|
503
417
|
}
|
|
504
|
-
`;var
|
|
418
|
+
`;var zt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},M=class extends vn.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new vn.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new vn.Debouncer(10),this.moveRipple=t=>{var r,i;let{x:n,y:o}=this.getCoordinates(t),s=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return Ad.html`
|
|
505
419
|
<style>
|
|
506
420
|
.ft-ripple .ft-ripple--effect {
|
|
507
421
|
left: ${this.originX}px;
|
|
508
422
|
top: ${this.originY}px;
|
|
509
423
|
}
|
|
510
424
|
</style>
|
|
511
|
-
<div class="${(0,
|
|
425
|
+
<div class="${(0,Ed.classMap)(t)}">
|
|
512
426
|
<div class="ft-ripple--background"></div>
|
|
513
427
|
<div class="ft-ripple--effect"></div>
|
|
514
428
|
</div>
|
|
515
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let i=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",i,s),t.addEventListener("touchstart",n,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",i,s),t.removeEventListener("touchstart",n,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,i=t,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};
|
|
516
|
-
<div part="container" class="${(0,
|
|
517
|
-
${(0,
|
|
429
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let i=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",i,s),t.addEventListener("touchstart",n,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",i,s),t.removeEventListener("touchstart",n,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,i=t,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};M.elementDefinitions={};M.styles=wd;zt([(0,Tt.property)({type:Boolean})],M.prototype,"primary",void 0);zt([(0,Tt.property)({type:Boolean})],M.prototype,"secondary",void 0);zt([(0,Tt.property)({type:Boolean})],M.prototype,"unbounded",void 0);zt([(0,Tt.property)({type:Boolean})],M.prototype,"activated",void 0);zt([(0,Tt.property)({type:Boolean})],M.prototype,"selected",void 0);zt([(0,Tt.property)({type:Boolean})],M.prototype,"disabled",void 0);zt([(0,Tt.state)()],M.prototype,"hovered",void 0);zt([(0,Tt.state)()],M.prototype,"focused",void 0);zt([(0,Tt.state)()],M.prototype,"pressed",void 0);zt([(0,Tt.state)()],M.prototype,"rippling",void 0);zt([(0,Tt.state)()],M.prototype,"originX",void 0);zt([(0,Tt.state)()],M.prototype,"originY",void 0);zt([(0,Tt.query)(".ft-ripple")],M.prototype,"ripple",void 0);zt([(0,Tt.query)(".ft-ripple--effect")],M.prototype,"rippleEffect",void 0);var _d=u(g());var Cd={"ft-ripple":M};(0,_d.customElements)(Cd);var Ho=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},tm={"attachment-viewed":{label:"Opening attachment",defaultEventName:"attachment-open",defaultComponentId:"ft-reader-attachments"},"attachment-downloaded":{label:"Downloading attachment",defaultEventName:"attachment-download",defaultComponentId:"ft-reader-attachments"}},_e=class extends(0,Di.withAnalytics)(Di.FtLitElementRedux,tm){constructor(){super(...arguments),this.hideFileFormatIcon=!1,this.hideFilename=!1,this.hideDownloadIcon=!1}render(){if(this.canRender()){let t={"hide-file-format-icon":this.hideFileFormatIcon,"hide-filename":this.hideFilename,"hide-download-icon":this.hideDownloadIcon};return Kr.html`
|
|
430
|
+
<div part="container" class="${(0,Od.classMap)(t)}">
|
|
431
|
+
${(0,Td.repeat)(this.attachments,r=>r.id,r=>{var i;let n=So(r.mimeType,(0,Di.last)(r.file.split(".")));return Kr.html`
|
|
518
432
|
<div part="attachment">
|
|
519
433
|
<a part="viewer-link" href="${this.getAttachmentViewerLink(r)}"
|
|
520
434
|
aria-label="${this.getAttachmentAriaLabel(r)}"
|
|
@@ -523,10 +437,10 @@
|
|
|
523
437
|
<ft-icon part="file-format-icon"
|
|
524
438
|
variant="file-format"
|
|
525
439
|
value="${n}"
|
|
526
|
-
style="color: ${(i=
|
|
527
|
-
<ft-typography part="name" variant="${
|
|
440
|
+
style="color: ${(i=Oa[n])!==null&&i!==void 0?i:Oa[y.UNKNOWN]}"></ft-icon>
|
|
441
|
+
<ft-typography part="name" variant="${B.body2}">${r.name}</ft-typography>
|
|
528
442
|
</a>
|
|
529
|
-
${r.externalLink?
|
|
443
|
+
${r.externalLink?Kr.nothing:Kr.html`
|
|
530
444
|
<a part="download-link"
|
|
531
445
|
target="_blank"
|
|
532
446
|
href="${this.getAttachmentDownloadLink(r)}"
|
|
@@ -539,7 +453,7 @@
|
|
|
539
453
|
</div>
|
|
540
454
|
`})}
|
|
541
455
|
</div>
|
|
542
|
-
`}return
|
|
456
|
+
`}return Kr.nothing}getAttachmentAriaLabel(t){var r;let i=t.name,n=t.file;if(i===n)return n;let o=(r=n.includes(".")?n.split(".").pop():t.mimeType)!==null&&r!==void 0?r:"";return i+" "+o}canRender(){var t,r;return((r=(t=this.attachments)===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)>0}getAttachmentDownloadLink(t){throw new Error("Not implemented")}getAttachmentDownloadLinkAriaLabel(t){throw new Error("Not implemented")}getAttachmentViewerLink(t){throw new Error("Not implemented")}};_e.elementDefinitions={"ft-icon":H,"ft-ripple":M,"ft-typography":U};Ho([(0,Ii.property)({type:Boolean})],_e.prototype,"hideFileFormatIcon",void 0);Ho([(0,Ii.property)({type:Boolean})],_e.prototype,"hideFilename",void 0);Ho([(0,Ii.property)({type:Boolean})],_e.prototype,"hideDownloadIcon",void 0);Ho([(0,Ii.state)()],_e.prototype,"attachments",void 0);var Rd=u(A()),yn=u(g());function jo(e){return Rd.css`
|
|
543
457
|
[part="container"] {
|
|
544
458
|
display: flex;
|
|
545
459
|
flex-direction: column;
|
|
@@ -583,16 +497,16 @@
|
|
|
583
497
|
}
|
|
584
498
|
|
|
585
499
|
[part~="ripple"] {
|
|
586
|
-
${(0,
|
|
587
|
-
${(0,
|
|
500
|
+
${(0,yn.setVariable)(K.color,e.itemHoverBackgroundColor)};
|
|
501
|
+
${(0,yn.setVariable)(K.borderRadius,e.itemBorderRadius)};
|
|
588
502
|
}
|
|
589
503
|
|
|
590
504
|
[part="file-format-icon"] {
|
|
591
|
-
${(0,
|
|
505
|
+
${(0,yn.setVariable)(ft.size,e.fileFormatIconSize)};
|
|
592
506
|
}
|
|
593
507
|
|
|
594
508
|
[part="download-icon"] {
|
|
595
|
-
${(0,
|
|
509
|
+
${(0,yn.setVariable)(ft.size,e.downloadIconSize)};
|
|
596
510
|
}
|
|
597
511
|
|
|
598
512
|
.hide-file-format-icon [part="file-format-icon"] {
|
|
@@ -606,7 +520,53 @@
|
|
|
606
520
|
.hide-download-icon [part="download-link"] {
|
|
607
521
|
display: none;
|
|
608
522
|
}
|
|
609
|
-
`}var
|
|
523
|
+
`}var Ld=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Gr=class extends Da(he(_e)){constructor(){super(),this.addI18nContext(Ma,hd)}update(t){super.update(t),t.has("map")&&this.updateAttachments()}updateAttachments(){var t;this.map?(t=this.service)===null||t===void 0||t.getAttachments().then(r=>this.attachments=r):this.attachments=void 0}getAttachmentDownloadLink(t){var r,i;return(i=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(t.id))!==null&&i!==void 0?i:""}getAttachmentDownloadLinkAriaLabel(t){return Ma.messages.download(this.getAttachmentAriaLabel(t))}getAttachmentViewerLink(t){var r,i;return t.externalLink?t.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((i=t.viewerUrl)!==null&&i!==void 0?i:"")}};Gr.styles=jo(ud);Ld([(0,zo.redux)({store:"reader"})],Gr.prototype,"map",void 0);Ld([(0,zo.reduxEventListener)({eventName:Vo.mapAttachmentsUpdate})],Gr.prototype,"updateAttachments",null);var kd=u(g());var Pd={"ft-reader-attachments":Gr};(0,kd.customElements)(Pd);var yt=u(g()),Id={itemsGap:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-items-gap","","SIZE","8px"),itemPadding:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-padding","","SIZE","8px"),itemBorderWidth:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-item-border-width","","SIZE","1px"),itemBorderColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-color","",yt.designSystemVariables.colorOutline),itemBorderRadius:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-border-radius","",yt.designSystemVariables.borderRadiusS),itemBackgroundColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-background-color","",yt.designSystemVariables.colorSurface),itemTextColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-text-color","",yt.designSystemVariables.colorOnSurfaceMedium),itemHoverBackgroundColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-background-color","",yt.designSystemVariables.colorPrimary),itemHoverTextColor:yt.FtCssVariableFactory.extend("--ft-ud-viewer-attachments-item-hover-text-color","",yt.designSystemVariables.colorOnSurfaceHigh),fileFormatIconSize:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-file-format-icon-size","","SIZE","30px"),downloadIconSize:yt.FtCssVariableFactory.create("--ft-ud-viewer-attachments-down-icon-size","","SIZE","20px")};var Mi=fe.build("designedUdViewer"),Dd={download:"Download {0}",itemWithNoValueForSwitchToRelatives:"No value"};var Md=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},qr=class extends jt(he(_e)){constructor(){super(),this.addI18nContext(Mi,Dd)}update(t){super.update(t),t.has("document")&&this.updateAttachments()}updateAttachments(){var t;this.document?(t=this.service)===null||t===void 0||t.getAttachments(this.document.id).then(r=>this.attachments=r):this.attachments=void 0}canRender(){return!!this.document&&super.canRender()}getAttachmentDownloadLink(t){var r,i;return(i=(r=this.service)===null||r===void 0?void 0:r.getAttachmentDownloadLink(this.document.id,t.id))!==null&&i!==void 0?i:""}getAttachmentDownloadLinkAriaLabel(t){return Mi.messages.download(this.getAttachmentAriaLabel(t))}getAttachmentViewerLink(t){var r,i;return t.externalLink?t.viewerUrl:(r=this.service)===null||r===void 0?void 0:r.makeAbsolute((i=t.viewerUrl)!==null&&i!==void 0?i:"")}};qr.styles=jo(Id);Md([(0,Wo.redux)({store:"viewer"})],qr.prototype,"document",void 0);Md([(0,Wo.reduxEventListener)({eventName:vr.udAttachmentsUpdate})],qr.prototype,"updateAttachments",null);var ff=u(A()),Ie=u(N()),Gt=u(g());var Ko=class extends CustomEvent{constructor(t){super("ft-ud-viewer-feedback",{composed:!0,bubbles:!0,detail:t})}},Go=class extends CustomEvent{constructor(){super("ft-viewer-mailer-ud-feedback",{composed:!0,bubbles:!0})}};var He=u(g());var fp=u(A()),ge=u(N()),me=u(g());var $d=u(A()),xr=u(g()),bn={distance:xr.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:xr.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:xr.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:xr.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",xr.designSystemVariables.borderRadiusS),maxWidth:xr.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Nd=$d.css`
|
|
524
|
+
.ft-tooltip--container {
|
|
525
|
+
display: block;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.ft-tooltip--inline {
|
|
529
|
+
display: inline-block;
|
|
530
|
+
max-width: 100%;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.ft-tooltip {
|
|
534
|
+
inset: 0;
|
|
535
|
+
margin: 0;
|
|
536
|
+
border: none;
|
|
537
|
+
background: transparent;
|
|
538
|
+
box-sizing: border-box;
|
|
539
|
+
overflow: hidden;
|
|
540
|
+
width: max-content;
|
|
541
|
+
max-width: ${bn.maxWidth};
|
|
542
|
+
text-align: center;
|
|
543
|
+
padding: ${bn.distance};
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.ft-tooltip--content {
|
|
547
|
+
padding: 4px 8px;
|
|
548
|
+
border-radius: ${bn.borderRadiusS};
|
|
549
|
+
background-color: ${bn.backgroundColor};
|
|
550
|
+
color: ${bn.color};
|
|
551
|
+
position: relative;
|
|
552
|
+
word-break: break-word;
|
|
553
|
+
}
|
|
554
|
+
`;var Fd=["top","right","bottom","left"],Ud=["start","end"],Na=Fd.reduce((e,t)=>e.concat(t,t+"-"+Ud[0],t+"-"+Ud[1]),[]),xn=Math.min,Sr=Math.max,Sn=Math.round;var Ve=e=>({x:e,y:e}),em={left:"right",right:"left",bottom:"top",top:"bottom"};function Vd(e,t,r){return Sr(e,xn(t,r))}function qo(e,t){return typeof e=="function"?e(t):e}function wn(e){return e.split("-")[0]}function wr(e){return e.split("-")[1]}function Ua(e){return e==="x"?"y":"x"}function Fa(e){return e==="y"?"height":"width"}function Yo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Va(e){return Ua(Yo(e))}function Bd(e,t,r){r===void 0&&(r=!1);let i=wr(e),n=Va(e),o=Fa(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=$a(s)),[s,$a(s)]}function Hd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function $a(e){let t=wn(e);return em[t]+e.slice(t.length)}function rm(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function jd(e){return typeof e!="number"?rm(e):{top:e,right:e,bottom:e,left:e}}function Yr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function zd(e,t,r){let{reference:i,floating:n}=e,o=Yo(t),s=Va(t),a=Fa(s),l=wn(t),c=o==="y",d=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,f=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:d,y:i.y-n.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}let m=wr(t);return m&&(h[s]+=f*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Wd(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=qo(t,e),m=jd(h),x=a[f?p==="floating"?"reference":"floating":p],S=Yr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),E=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),P=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},gt=Yr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(S.top-gt.top+m.top)/P.y,bottom:(gt.bottom-S.bottom+m.bottom)/P.y,left:(S.left-gt.left+m.left)/P.x,right:(gt.right-S.right+m.right)/P.x}}var im=50,Kd=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Wd},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:p}=zd(c,i,l),f=i,h=0,m={};for(let v=0;v<o.length;v++){let x=o[v];if(!x)continue;let{name:S,fn:E}=x,{x:R,y:P,data:gt,reset:dt}=await E({x:d,y:p,initialPlacement:i,placement:f,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});d=R??d,p=P??p,m[S]={...m[S],...gt},dt&&h<im&&(h++,typeof dt=="object"&&(dt.placement&&(f=dt.placement),dt.rects&&(c=dt.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):dt.rects),{x:d,y:p}=zd(c,f,l)),v=-1)}return{x:d,y:p,placement:f,strategy:n,middlewareData:m}};function nm(e,t,r){return(e?[...r.filter(n=>wr(n)===e),...r.filter(n=>wr(n)!==e)]:r.filter(n=>wn(n)===n)).filter(n=>e?wr(n)===e||(t?Hd(n)!==n:!1):!0)}var Gd=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:d=!1,alignment:p,allowedPlacements:f=Na,autoAlignment:h=!0,...m}=qo(e,t),v=p!==void 0||f===Na?nm(p||null,h,f):f,x=((r=s.autoPlacement)==null?void 0:r.index)||0,S=v[x];if(S==null)return{};if(a!==S)return{reset:{placement:v[0]}};let E=await l.detectOverflow(t,m),R=Bd(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),P=[E[wn(S)],E[R[0]],E[R[1]]],gt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:S,overflows:P}],dt=v[x+1];if(dt)return{data:{index:x+1,overflows:gt},reset:{placement:dt}};let nr=gt.map(Zt=>{let se=wr(Zt.placement);return[Zt.placement,se&&d?Zt.overflows.slice(0,2).reduce((Xt,Tr)=>Xt+Tr,0):Zt.overflows[0],Zt.overflows]}).sort((Zt,se)=>Zt[1]-se[1]),or=((n=nr.filter(Zt=>Zt[2].slice(0,wr(Zt[0])?2:3).every(se=>se<=0))[0])==null?void 0:n[0])||nr[0][0];return or!==a?{data:{index:x+1,overflows:gt},reset:{placement:or}}:{}}}};var qd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:P}=E;return{x:R,y:P}}},...c}=qo(e,t),d={x:r,y:i},p=await o.detectOverflow(t,c),f=Yo(n),h=Ua(f),m=d[h],v=d[f],x=(E,R)=>Vd(R+p[E==="y"?"top":"left"],R,R-p[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(v=x(f,v));let S=l.fn({...t,[h]:m,[f]:v});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[h]:s,[f]:a}}}}}};function Xo(){return typeof window<"u"}function Xr(e){return Zd(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tr(e){var t;return(t=(Zd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zd(e){return Xo()?e instanceof Node||e instanceof Wt(e).Node:!1}function Te(e){return Xo()?e instanceof Element||e instanceof Wt(e).Element:!1}function er(e){return Xo()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Yd(e){return!Xo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}function An(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=Oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Xd(e){return/^(table|td|th)$/.test(Xr(e))}function En(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var om=/transform|translate|scale|rotate|perspective|filter/,sm=/paint|layout|strict|content/,Zr=e=>!!e&&e!=="none",Ba;function $i(e){let t=Te(e)?Oe(e):e;return Zr(t.transform)||Zr(t.translate)||Zr(t.scale)||Zr(t.rotate)||Zr(t.perspective)||!Jo()&&(Zr(t.backdropFilter)||Zr(t.filter))||om.test(t.willChange||"")||sm.test(t.contain||"")}function Jd(e){let t=Ar(e);for(;er(t)&&!Ni(t);){if($i(t))return t;if(En(t))return null;t=Ar(t)}return null}function Jo(){return Ba==null&&(Ba=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ba}function Ni(e){return/^(html|body|#document)$/.test(Xr(e))}function Oe(e){return Wt(e).getComputedStyle(e)}function Cn(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ar(e){if(Xr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Yd(e)&&e.host||tr(e);return Yd(t)?t.host:t}function Qd(e){let t=Ar(e);return Ni(t)?(e.ownerDocument||e).body:er(t)&&An(t)?t:Qd(t)}function Zo(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Qd(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=Wt(n);if(o){let a=Qo(s);return t.concat(s,s.visualViewport||[],An(n)?n:[],a&&r?Zo(a):[])}else return t.concat(n,Zo(n,[],r))}function Qo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rp(e){let t=Oe(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=er(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=Sn(r)!==o||Sn(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function ip(e){return Te(e)?e:e.contextElement}function Ui(e){let t=ip(e);if(!er(t))return Ve(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=rp(t),s=(o?Sn(r.width):r.width)/i,a=(o?Sn(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var am=Ve(0);function np(e){let t=Wt(e);return!Jo()||!t.visualViewport?am:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lm(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===Wt(e)}function _n(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=ip(e),s=Ve(1);t&&(i?Te(i)&&(s=Ui(i)):s=Ui(e));let a=lm(o,r,i)?np(o):Ve(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,d=n.width/s.x,p=n.height/s.y;if(o&&i){let f=Wt(o),h=Te(i)?Wt(i):i,m=f,v=Qo(m);for(;v&&h!==m;){let x=Ui(v),S=v.getBoundingClientRect(),E=Oe(v),R=S.left+(v.clientLeft+parseFloat(E.paddingLeft))*x.x,P=S.top+(v.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,p*=x.y,l+=R,c+=P,m=Wt(v),v=Qo(m)}}return Yr({width:d,height:p,x:l,y:c})}function ts(e,t){let r=Cn(e).scrollLeft;return t?t.left+r:_n(tr(e)).left+r}function op(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-ts(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function cm(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=tr(i),a=t?En(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=Ve(1),d=Ve(0),p=er(i);if((p||!o)&&((Xr(i)!=="body"||An(s))&&(l=Cn(i)),p)){let h=_n(i);c=Ui(i),d.x=h.x+i.clientLeft,d.y=h.y+i.clientTop}let f=s&&!p&&!o?op(s,l):Ve(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function um(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function dm(e){let t=Cn(e),r=e.ownerDocument.body,i=Sr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=Sr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),o=-t.scrollLeft+ts(e),s=-t.scrollTop;return Oe(r).direction==="rtl"&&(o+=Sr(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:o,y:s}}var pm=25;function fm(e,t,r){r===void 0&&(r="viewport");let i=r==="layoutViewport",n=Wt(e),o=tr(e),s=n.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(s){let f=!Jo()||t==="fixed";i?f||(c=-s.offsetLeft,d=-s.offsetTop):(a=s.width,l=s.height,f&&(c=s.offsetLeft,d=s.offsetTop))}if(ts(o)<=0){let f=o.ownerDocument,h=f.body,m=getComputedStyle(h),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(o.clientWidth-h.clientWidth-v),S=getComputedStyle(o).scrollbarGutter==="stable both-edges"?x/2:x;S<=pm&&(a-=S)}return{width:a,height:l,x:c,y:d}}function hm(e,t){let r=_n(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=Ui(e),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function tp(e,t,r){let i;if(t==="viewport"||t==="layoutViewport")i=fm(e,r,t);else if(t==="document")i=dm(tr(e));else if(Te(t))i=hm(t,r);else{let n=np(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Yr(i)}function mm(e,t){let r=t.get(e);if(r)return r;let i=Zo(e,[],!1).filter(a=>Te(a)&&Xr(a)!=="body"),n=null,o=Oe(e).position==="fixed",s=o?Ar(e):e;for(;Te(s)&&!Ni(s);){let a=Oe(s),l=$i(s),c=n?n.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(p=>p!==s):n=a,s=Ar(s)}return t.set(e,i),i}function gm(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?En(t)?[]:mm(t,this._c):[].concat(r),i],a=tp(t,s[0],n),l=a.top,c=a.right,d=a.bottom,p=a.left;for(let f=1;f<s.length;f++){let h=tp(t,s[f],n);l=Sr(h.top,l),c=xn(h.right,c),d=xn(h.bottom,d),p=Sr(h.left,p)}return{width:c-p,height:d-l,x:p,y:l}}function vm(e){let{width:t,height:r}=rp(e);return{width:t,height:r}}function ym(e,t,r){let i=er(t),n=tr(t),o=r==="fixed",s=_n(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=Ve(0);if((i||!o)&&((Xr(t)!=="body"||An(n))&&(a=Cn(t)),i)){let f=_n(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!i&&n&&(l.x=ts(n));let c=n&&!i&&!o?op(n,a):Ve(0),d=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return{x:d,y:p,width:s.width,height:s.height}}function Ha(e){return Oe(e).position==="static"}function ep(e,t){if(!er(e)||Oe(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return tr(e)===r&&(r=r.ownerDocument.body),r}function sp(e,t){let r=Wt(e);if(En(e))return r;if(!er(e)){let n=Ar(e);for(;n&&!Ni(n);){if(Te(n)&&!Ha(n))return n;n=Ar(n)}return r}let i=ep(e,t);for(;i&&Xd(i)&&Ha(i);)i=ep(i,t);return i&&Ni(i)&&Ha(i)&&!$i(i)?r:i||Jd(e)||r}var bm=async function(e){let t=this.getOffsetParent||sp,r=this.getDimensions,i=await r(e.floating);return{reference:ym(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function xm(e){return Oe(e).direction==="rtl"}var es={convertOffsetParentRelativeRectToViewportRelativeRect:cm,getDocumentElement:tr,getClippingRect:gm,getOffsetParent:sp,getElementRects:bm,getClientRects:um,getDimensions:vm,getScale:Ui,isElement:Te,isRTL:xm};var ap=Gd,lp=qd;var cp=(e,t,r)=>{let i=new Map,n=r??{},o={...es,...n.platform,_c:i};return Kd(e,t,{...n,platform:o})};function up(e){return Sm(e)}function ja(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Sm(e){for(let t=e;t;t=ja(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=ja(e);t;t=ja(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||$i(r)||t.tagName==="BODY"))return t}return null}async function rs(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},cp(e,t,{strategy:i.strategy,platform:{...es,getOffsetParent:n=>es.getOffsetParent(n,up)},middleware:[lp({crossAxis:!0}),ap({allowedPlacements:[i.placement]})]})}var dp=u(g());var za=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?Pi.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},wm=new za;var pp=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:dp.hasChanged,converter:Pi,...t}),r[hn]=(n=r[hn])!==null&&n!==void 0?n:new Map,r[hn].set(i,e??{})};var Re=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},rt=class extends Do{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 me.Debouncer,this.revealDebouncer=new me.Debouncer,this.onTouch=t=>{this.isIgnored(t)||(this.show(),setTimeout(()=>window.addEventListener("touchstart",r=>{r.composedPath().includes(this.container)||this.onOut(r)},{once:!0}),100))},this.onHover=t=>{this.isIgnored(t)?this.matchesIgnored(t)&&this.hide():this.show()},this.onFocusIn=t=>{!this.isIgnored(t)&&window.FluidTopicsA11yHints.isKeyboardNavigation&&window.FluidTopicsA11yHints.lastPressedKey==="Tab"&&this.show()},this.onOut=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())},this.onClick=t=>{this.isIgnored(t)||(this.revealDebouncer.cancel(),this.hide())}}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){var t,r;return fp.html`
|
|
555
|
+
<div part="container"
|
|
556
|
+
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}">
|
|
557
|
+
<slot part="slot"></slot>
|
|
558
|
+
<div part="tooltip" role="tooltip" inert
|
|
559
|
+
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
560
|
+
popover="manual">
|
|
561
|
+
<div part="tooltip-content" class="ft-tooltip--content">
|
|
562
|
+
<slot name="text"></slot>
|
|
563
|
+
<ft-typography variant="${B.caption}" ?hidden=${!(!((t=this.text)===null||t===void 0)&&t.message)}>
|
|
564
|
+
${(r=this.text)===null||r===void 0?void 0:r.message}
|
|
565
|
+
</ft-typography>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
</div>
|
|
569
|
+
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,i;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(i=this.tooltip)===null||i===void 0||i.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let i=this.manual;this.manual=!0;let n=this.text;this.text={message:t},await this.show(r),this.text=n,this.manual=i}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&rs(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${me.designSystemVariables.transitionDuration}, left ${me.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}matchesIgnored(t){return(0,me.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}isIgnored(t){return this.manual||this.matchesIgnored(t)}};rt.elementDefinitions={"ft-typography":U};rt.styles=Nd;Re([pp()],rt.prototype,"text",void 0);Re([(0,ge.property)({type:Boolean})],rt.prototype,"manual",void 0);Re([(0,ge.property)({type:Boolean})],rt.prototype,"inline",void 0);Re([(0,me.numberProperty)()],rt.prototype,"delay",void 0);Re([(0,ge.property)()],rt.prototype,"position",void 0);Re([(0,me.jsonProperty)([])],rt.prototype,"ignoreMatchingElements",void 0);Re([(0,ge.queryAssignedNodes)()],rt.prototype,"slotNodes",void 0);Re([(0,ge.query)(".ft-tooltip--container")],rt.prototype,"container",void 0);Re([(0,ge.query)(".ft-tooltip")],rt.prototype,"tooltip",void 0);Re([(0,ge.query)(".ft-tooltip--content")],rt.prototype,"tooltipContent",void 0);Re([(0,ge.state)()],rt.prototype,"visible",void 0);var mp=u(g());var hp={"ft-tooltip":rt};(0,mp.customElements)(hp);var gp=u(A()),Tn=u(g()),Jr={color:Tn.FtCssVariableFactory.extend("--ft-loader-color","",Tn.designSystemVariables.colorPrimary),size:Tn.FtCssVariableFactory.create("--ft-loader-size","","SIZE","80px")},vp=gp.css`
|
|
610
570
|
:host {
|
|
611
571
|
line-height: 0;
|
|
612
572
|
}
|
|
@@ -615,8 +575,8 @@
|
|
|
615
575
|
display: inline-block;
|
|
616
576
|
position: relative;
|
|
617
577
|
|
|
618
|
-
width: ${
|
|
619
|
-
height: ${
|
|
578
|
+
width: ${Jr.size};
|
|
579
|
+
height: ${Jr.size};
|
|
620
580
|
}
|
|
621
581
|
|
|
622
582
|
.ft-loader div {
|
|
@@ -625,7 +585,7 @@
|
|
|
625
585
|
width: 25%;
|
|
626
586
|
height: 25%;
|
|
627
587
|
border-radius: 50%;
|
|
628
|
-
background: ${
|
|
588
|
+
background: ${Jr.color};
|
|
629
589
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
630
590
|
}
|
|
631
591
|
|
|
@@ -672,17 +632,17 @@
|
|
|
672
632
|
transform: translate(0, 0);
|
|
673
633
|
}
|
|
674
634
|
100% {
|
|
675
|
-
transform: translate(calc(0.35 * ${
|
|
635
|
+
transform: translate(calc(0.35 * ${Jr.size}), 0);
|
|
676
636
|
}
|
|
677
637
|
}
|
|
678
|
-
`;var
|
|
638
|
+
`;var yp=u(A()),bp=u(g());var Qr=class extends bp.FtLitElement{render(){return yp.html`
|
|
679
639
|
<div class="ft-loader">
|
|
680
640
|
<div></div>
|
|
681
641
|
<div></div>
|
|
682
642
|
<div></div>
|
|
683
643
|
<div></div>
|
|
684
644
|
</div>
|
|
685
|
-
`}};
|
|
645
|
+
`}};Qr.styles=vp;var Sp=u(g());var xp={"ft-loader":Qr};(0,Sp.customElements)(xp);var Er=u(A()),is=u(ee()),z=u(N());var Le=e=>e??pt;var Ep=u(A()),L=u(g());var wp=L.FtCssVariableFactory.extend("--ft-button-color","",L.designSystemVariables.colorPrimary),V={backgroundColor:L.FtCssVariableFactory.extend("--ft-button-background-color","",L.designSystemVariables.colorSurface),borderRadius:L.FtCssVariableFactory.extend("--ft-button-border-radius","",L.designSystemVariables.borderRadiusL),color:wp,fontSize:L.FtCssVariableFactory.extend("--ft-button-font-size","",$t.fontSize),iconSize:L.FtCssVariableFactory.create("--ft-button-icon-size","","SIZE","24px"),rippleColor:L.FtCssVariableFactory.extend("--ft-button-ripple-color","",wp),verticalPadding:L.FtCssVariableFactory.create("--ft-button-vertical-padding","","SIZE","6px"),horizontalPadding:L.FtCssVariableFactory.create("--ft-button-horizontal-padding","","SIZE","8px"),iconPadding:L.FtCssVariableFactory.create("--ft-button-icon-padding","","SIZE","8px"),opacityDisabled:L.FtCssVariableFactory.external(L.designSystemVariables.colorOpacityDisabled,"Design system")},Ap=L.FtCssVariableFactory.extend("--ft-button-primary-color","",L.FtCssVariableFactory.extend("--ft-button-color","",L.designSystemVariables.colorOnPrimary)),Wa={backgroundColor:L.FtCssVariableFactory.extend("--ft-button-primary-background-color","",L.FtCssVariableFactory.extend("--ft-button-background-color","",L.designSystemVariables.colorPrimary)),color:Ap,rippleColor:L.FtCssVariableFactory.extend("--ft-button-primary-ripple-color","",Ap)},Be={borderRadius:L.FtCssVariableFactory.extend("--ft-button-dense-border-radius","",L.FtCssVariableFactory.extend("--ft-button-border-radius","",L.designSystemVariables.borderRadiusM)),verticalPadding:L.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","","SIZE","2px"),horizontalPadding:L.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","","SIZE","4px"),iconPadding:L.FtCssVariableFactory.create("--ft-button-dense-icon-padding","","SIZE","4px")},Cp=Ep.css`
|
|
686
646
|
:host {
|
|
687
647
|
display: inline-block;
|
|
688
648
|
max-width: 100%;
|
|
@@ -693,7 +653,7 @@
|
|
|
693
653
|
box-shadow: 0px 0px 0px transparent;
|
|
694
654
|
border: 0px solid transparent;
|
|
695
655
|
text-shadow: 0px 0px 0px transparent;
|
|
696
|
-
font-size: ${
|
|
656
|
+
font-size: ${V.fontSize};
|
|
697
657
|
text-decoration: none;
|
|
698
658
|
}
|
|
699
659
|
|
|
@@ -727,32 +687,31 @@
|
|
|
727
687
|
border: none;
|
|
728
688
|
pointer-events: auto;
|
|
729
689
|
|
|
730
|
-
--button-internal-line-height: max(calc(${
|
|
731
|
-
--button-internal-color: ${
|
|
732
|
-
${(0,L.setVariable)(ft.size,
|
|
733
|
-
${(0,L.setVariable)(
|
|
734
|
-
${(0,L.setVariable)(
|
|
690
|
+
--button-internal-line-height: max(calc(${V.fontSize} + 2px), ${V.iconSize});
|
|
691
|
+
--button-internal-color: ${V.color};
|
|
692
|
+
${(0,L.setVariable)(ft.size,V.iconSize)};
|
|
693
|
+
${(0,L.setVariable)(K.color,V.rippleColor)};
|
|
694
|
+
${(0,L.setVariable)(K.borderRadius,V.borderRadius)};
|
|
735
695
|
|
|
736
|
-
border-radius: ${
|
|
737
|
-
padding: ${
|
|
738
|
-
background-color: ${
|
|
696
|
+
border-radius: ${V.borderRadius};
|
|
697
|
+
padding: ${V.verticalPadding} ${V.horizontalPadding};
|
|
698
|
+
background-color: ${V.backgroundColor};
|
|
739
699
|
color: var(--button-internal-color);
|
|
740
700
|
}
|
|
741
701
|
|
|
742
702
|
.ft-button.ft-button--outlined {
|
|
743
703
|
border: 1px solid var(--button-internal-color);
|
|
744
|
-
padding: calc(${
|
|
704
|
+
padding: calc(${V.verticalPadding} - 1px) calc(${V.horizontalPadding} - 1px);
|
|
745
705
|
}
|
|
746
706
|
|
|
747
707
|
.ft-button.ft-button--dense {
|
|
748
|
-
padding: ${
|
|
749
|
-
border-radius: ${
|
|
750
|
-
|
|
751
|
-
${(0,L.setVariable)(W.borderRadius,De.borderRadius)};
|
|
708
|
+
padding: ${Be.verticalPadding} ${Be.horizontalPadding};
|
|
709
|
+
border-radius: ${Be.borderRadius};
|
|
710
|
+
${(0,L.setVariable)(K.borderRadius,Be.borderRadius)};
|
|
752
711
|
}
|
|
753
712
|
|
|
754
713
|
.ft-button.ft-button--dense.ft-button--outlined {
|
|
755
|
-
padding: calc(${
|
|
714
|
+
padding: calc(${Be.verticalPadding} - 1px) calc(${Be.horizontalPadding} - 1px);
|
|
756
715
|
}
|
|
757
716
|
|
|
758
717
|
.ft-button:not([disabled]):hover {
|
|
@@ -760,22 +719,22 @@
|
|
|
760
719
|
}
|
|
761
720
|
|
|
762
721
|
.ft-button--round {
|
|
763
|
-
border-radius: calc(var(--button-internal-line-height) / 2 + ${
|
|
722
|
+
border-radius: calc(var(--button-internal-line-height) / 2 + ${V.verticalPadding});
|
|
764
723
|
}
|
|
765
724
|
|
|
766
725
|
.ft-button--round.ft-button--dense {
|
|
767
|
-
border-radius: calc(var(--button-internal-line-height) / 2 + ${
|
|
726
|
+
border-radius: calc(var(--button-internal-line-height) / 2 + ${Be.verticalPadding});
|
|
768
727
|
}
|
|
769
728
|
|
|
770
729
|
.ft-button[disabled] {
|
|
771
730
|
filter: grayscale(1);
|
|
772
|
-
opacity: ${
|
|
731
|
+
opacity: ${V.opacityDisabled};
|
|
773
732
|
}
|
|
774
733
|
|
|
775
734
|
.ft-button.ft-button--primary {
|
|
776
|
-
background-color: ${
|
|
777
|
-
--button-internal-color: ${
|
|
778
|
-
${(0,L.setVariable)(
|
|
735
|
+
background-color: ${Wa.backgroundColor};
|
|
736
|
+
--button-internal-color: ${Wa.color};
|
|
737
|
+
${(0,L.setVariable)(K.color,Wa.rippleColor)};
|
|
779
738
|
}
|
|
780
739
|
|
|
781
740
|
.ft-button--label {
|
|
@@ -784,17 +743,17 @@
|
|
|
784
743
|
white-space: nowrap;
|
|
785
744
|
text-overflow: ellipsis;
|
|
786
745
|
display: block;
|
|
787
|
-
margin: 0 ${
|
|
788
|
-
${(0,L.setVariable)(
|
|
789
|
-
${(0,L.setVariable)(
|
|
746
|
+
margin: 0 ${V.iconPadding};
|
|
747
|
+
${(0,L.setVariable)($t.fontSize,"1em")};
|
|
748
|
+
${(0,L.setVariable)($t.lineHeight,"var(--button-internal-line-height)")};
|
|
790
749
|
}
|
|
791
750
|
|
|
792
751
|
.ft-button--dense .ft-button--label {
|
|
793
|
-
margin: 0 ${
|
|
752
|
+
margin: 0 ${Be.iconPadding};
|
|
794
753
|
}
|
|
795
754
|
|
|
796
|
-
.ft-button--label
|
|
797
|
-
|
|
755
|
+
.ft-button--label.ft-button--label-no-text {
|
|
756
|
+
margin: 0;
|
|
798
757
|
}
|
|
799
758
|
|
|
800
759
|
[part="icon"] {
|
|
@@ -803,13 +762,13 @@
|
|
|
803
762
|
}
|
|
804
763
|
|
|
805
764
|
.ft-button--label[hidden] + [part="icon"] {
|
|
806
|
-
margin: 0 calc(${
|
|
807
|
-
padding: 0 ${
|
|
765
|
+
margin: 0 calc(${V.horizontalPadding} * -1);
|
|
766
|
+
padding: 0 ${V.verticalPadding};
|
|
808
767
|
}
|
|
809
768
|
|
|
810
769
|
.ft-button--dense .ft-button--label[hidden] + [part="icon"] {
|
|
811
|
-
margin: 0 calc(${
|
|
812
|
-
padding: 0 ${
|
|
770
|
+
margin: 0 calc(${Be.horizontalPadding} * -1);
|
|
771
|
+
padding: 0 ${Be.verticalPadding};
|
|
813
772
|
}
|
|
814
773
|
|
|
815
774
|
.ft-button:not(.ft-button--trailing-icon) [part="label"] {
|
|
@@ -817,52 +776,51 @@
|
|
|
817
776
|
}
|
|
818
777
|
|
|
819
778
|
ft-loader {
|
|
820
|
-
${(0,L.setVariable)(
|
|
821
|
-
${(0,L.setVariable)(
|
|
779
|
+
${(0,L.setVariable)(Jr.size,V.iconSize)};
|
|
780
|
+
${(0,L.setVariable)(Jr.color,"var(--button-internal-color)")};
|
|
822
781
|
}
|
|
823
|
-
`;var
|
|
782
|
+
`;var G=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},k=class e extends(0,He.toFtFormComponent)(He.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",t=>{var r;this.isDisabled()?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.type=="submit"&&((r=this.form)===null||r===void 0||r.requestSubmit())})}render(){var t,r,i;let n={"ft-button--label":!0,"ft-safari-ellipsis-fix":He.isSafari,"ft-button--label-no-text":!this.hasTextContent},o=Er.html`
|
|
824
783
|
<ft-ripple part="ripple"
|
|
825
784
|
?disabled=${this.isDisabled()}
|
|
826
785
|
?activated=${this.activated}
|
|
827
786
|
></ft-ripple>
|
|
828
787
|
<ft-typography part="label"
|
|
829
|
-
variant="${
|
|
788
|
+
variant="${B.button}"
|
|
830
789
|
element="span"
|
|
831
|
-
class="
|
|
832
|
-
|
|
833
|
-
<slot @slotchange=${this.onSlotchange}></slot>
|
|
790
|
+
class="${(0,is.classMap)(n)}">
|
|
791
|
+
<slot></slot>
|
|
834
792
|
</ft-typography>
|
|
835
793
|
${this.resolveIcon()}
|
|
836
|
-
`,
|
|
837
|
-
<a href="${
|
|
794
|
+
`,s=this.href!=null&&this.href.trim().length>0?this.href:void 0;return this.addTooltipIfNeeded(s?Er.html`
|
|
795
|
+
<a href="${s}"
|
|
838
796
|
target="${(t=this.target)!==null&&t!==void 0?t:"_self"}"
|
|
839
797
|
part="button"
|
|
840
|
-
class="${(0,
|
|
841
|
-
aria-label="${(r=this.ariaLabel)!==null&&r!==void 0?r:this.
|
|
798
|
+
class="${(0,is.classMap)(this.buttonClasses)}"
|
|
799
|
+
aria-label="${Le((r=this.ariaLabel)!==null&&r!==void 0?r:this.label)}"
|
|
842
800
|
?disabled=${this.isDisabled()}>
|
|
843
|
-
${
|
|
801
|
+
${o}
|
|
844
802
|
</a>
|
|
845
|
-
`:
|
|
803
|
+
`:Er.html`
|
|
846
804
|
<button part="button"
|
|
847
|
-
class="${(0,
|
|
848
|
-
aria-label="${(i=this.ariaLabel)!==null&&i!==void 0?i:this.
|
|
849
|
-
aria-haspopup="${
|
|
850
|
-
aria-pressed="${
|
|
805
|
+
class="${(0,is.classMap)(this.buttonClasses)}"
|
|
806
|
+
aria-label="${Le((i=this.ariaLabel)!==null&&i!==void 0?i:this.label)}"
|
|
807
|
+
aria-haspopup="${Le(this.ariaHasPopup)}"
|
|
808
|
+
aria-pressed="${Le(this.ariaPressed)}"
|
|
851
809
|
?disabled=${this.isDisabled()}>
|
|
852
|
-
${
|
|
810
|
+
${o}
|
|
853
811
|
</button>
|
|
854
|
-
`)}addTooltipIfNeeded(t){return this.
|
|
812
|
+
`)}addTooltipIfNeeded(t){return this.label&&this.label.trim().length>0&&(this.forceTooltip||!this.hasTextContent&&!this.hideTooltip)?Er.html`
|
|
855
813
|
<ft-tooltip part="tooltip"
|
|
856
|
-
text="${this.
|
|
814
|
+
text="${this.label}"
|
|
857
815
|
position="${this.tooltipPosition}">
|
|
858
816
|
${t}
|
|
859
817
|
</ft-tooltip>
|
|
860
|
-
`:t}resolveIcon(){return this.loading?
|
|
861
|
-
<ft-loader part="loader icon"></ft-loader> `:this.icon?
|
|
818
|
+
`:t}resolveIcon(){return this.loading?Er.html`
|
|
819
|
+
<ft-loader part="loader icon"></ft-loader> `:this.icon?Er.html`
|
|
862
820
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
863
|
-
`:
|
|
821
|
+
`:Er.html`
|
|
864
822
|
<slot part="icon" name="icon"></slot>
|
|
865
|
-
`}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}
|
|
823
|
+
`}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}isDisabled(){return this.disabled||this.loading}contentAvailableCallback(t){super.contentAvailableCallback(t),this.labelContainer&&e.labelsObserver.observe(this.labelContainer)}disconnectedCallback(){super.disconnectedCallback(),this.labelContainer&&e.labelsObserver.unobserve(this.labelContainer)}};k.elementDefinitions={"ft-ripple":M,"ft-tooltip":rt,"ft-icon":H,"ft-loader":Qr,"ft-typography":U};k.styles=[He.safariEllipsisFix,Cp,He.noTextSelect];k.labelsObserver=new IntersectionObserver(e=>{for(let t of e){let r=t.target.getRootNode();r.host?r.host.hasTextContent=t.boundingClientRect.width>0:k.labelsObserver.unobserve(t.target)}});G([(0,z.property)({type:Boolean})],k.prototype,"primary",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"outlined",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"dense",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"round",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"disabled",void 0);G([(0,z.property)()],k.prototype,"icon",void 0);G([(0,z.property)()],k.prototype,"iconVariant",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"trailingIcon",void 0);G([(0,z.property)()],k.prototype,"label",void 0);G([(0,z.property)()],k.prototype,"type",void 0);G([(0,z.property)()],k.prototype,"href",void 0);G([(0,z.property)()],k.prototype,"target",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"loading",void 0);G([(0,z.property)({attribute:"aria-label"})],k.prototype,"ariaLabel",void 0);G([(0,z.property)()],k.prototype,"ariaHasPopup",void 0);G([(0,z.property)({attribute:"aria-pressed"})],k.prototype,"ariaPressed",void 0);G([(0,z.property)()],k.prototype,"tooltipPosition",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"hideTooltip",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"forceTooltip",void 0);G([(0,z.property)({type:Boolean})],k.prototype,"activated",void 0);G([(0,z.query)(".ft-button")],k.prototype,"button",void 0);G([(0,z.query)(".ft-button--label")],k.prototype,"labelContainer",void 0);G([(0,z.state)()],k.prototype,"hasTextContent",void 0);G([(0,z.query)(".ft-button--label slot")],k.prototype,"slottedContent",void 0);G([(0,z.query)("[part=tooltip]")],k.prototype,"tooltip",void 0);var Tp=u(g());var _p={"ft-button":k};(0,Tp.customElements)(_p);var ns=u(A()),je=u(N()),Pp=u(ee()),rr=u(g());var Fi=u(A()),Kt=u(N()),Vi=u(g());var Lp=u(ee());var Op=u(A()),Nt=u(g());var nt=u(g());var ot={textColor:nt.FtCssVariableFactory.extend("--ft-switch-text-color","",nt.designSystemVariables.colorOnSurfaceHigh),backgroundColor:nt.FtCssVariableFactory.extend("--ft-switch-background-color","",nt.designSystemVariables.colorSurface),selectedTextColor:nt.FtCssVariableFactory.extend("--ft-switch-selected-text-color","",nt.designSystemVariables.colorPrimary),selectedBackgroundColor:nt.FtCssVariableFactory.extend("--ft-switch-selected-background-color","",nt.designSystemVariables.colorPrimary),borderColor:nt.FtCssVariableFactory.extend("--ft-switch-border-color","",nt.designSystemVariables.colorOutline),borderRadius:nt.FtCssVariableFactory.extend("--ft-switch-border-radius","",nt.designSystemVariables.borderRadiusL),fontSize:nt.FtCssVariableFactory.extend("--ft-switch-font-size","",$t.fontSize),iconSize:nt.FtCssVariableFactory.create("--ft-switch-icon-size","","SIZE","24px"),iconColor:nt.FtCssVariableFactory.extend("--ft-switch-text-color","",nt.designSystemVariables.colorOnSurfaceMedium),rippleColor:nt.FtCssVariableFactory.extend("--ft-switch-ripple-color","",nt.designSystemVariables.colorPrimary),outlineColor:nt.FtCssVariableFactory.extend("--ft-switch-outline-color","",nt.designSystemVariables.colorPrimary)};var bt={borderRadiusLeft:Nt.FtCssVariableFactory.extend("--ft-switch-option-border-radius-left","",Nt.designSystemVariables.borderRadiusL),borderRadiusRight:Nt.FtCssVariableFactory.extend("--ft-switch-option-border-radius-right","",Nt.designSystemVariables.borderRadiusL),borderWidthLeft:Nt.FtCssVariableFactory.create("--ft-switch-option-border-width-left","","SIZE","1px"),borderWidthRight:Nt.FtCssVariableFactory.create("--ft-switch-option-border-width-right","","SIZE","1px"),borderWidthVertical:Nt.FtCssVariableFactory.create("--ft-switch-option-border-width-vertical","","SIZE","1px")},Rp=Op.css`
|
|
866
824
|
.ft-switch-option {
|
|
867
825
|
position: relative;
|
|
868
826
|
display: inline-block;
|
|
@@ -887,7 +845,7 @@
|
|
|
887
845
|
align-items: center;
|
|
888
846
|
justify-content: center;
|
|
889
847
|
overflow: hidden;
|
|
890
|
-
${(0,
|
|
848
|
+
${(0,Nt.setVariable)(ft.size,ot.iconSize)};
|
|
891
849
|
padding: var(--switch-internal-vertical-padding, 6px) var(--switch-internal-horizontal-padding, 8px);
|
|
892
850
|
background-color: ${ot.backgroundColor};
|
|
893
851
|
-webkit-mask-image: radial-gradient(white, black);
|
|
@@ -904,7 +862,7 @@
|
|
|
904
862
|
inset: 0;
|
|
905
863
|
content: "";
|
|
906
864
|
z-index: 1;
|
|
907
|
-
opacity: ${
|
|
865
|
+
opacity: ${Nt.designSystemVariables.opacityPrimaryOnSurfaceSelected};
|
|
908
866
|
}
|
|
909
867
|
|
|
910
868
|
.ft-switch-option--label {
|
|
@@ -914,8 +872,8 @@
|
|
|
914
872
|
text-overflow: ellipsis;
|
|
915
873
|
display: block;
|
|
916
874
|
margin: 0 8px;
|
|
917
|
-
${(0,
|
|
918
|
-
${(0,
|
|
875
|
+
${(0,Nt.setVariable)($t.fontSize,ot.fontSize)};
|
|
876
|
+
${(0,Nt.setVariable)($t.lineHeight,"var(--switch-option-internal-content-height)")}
|
|
919
877
|
}
|
|
920
878
|
|
|
921
879
|
.ft-switch-option--selected .ft-switch-option--label {
|
|
@@ -931,7 +889,7 @@
|
|
|
931
889
|
}
|
|
932
890
|
|
|
933
891
|
.ft-switch-option--ripple {
|
|
934
|
-
${(0,
|
|
892
|
+
${(0,Nt.setVariable)(K.color,ot.rippleColor)};
|
|
935
893
|
}
|
|
936
894
|
|
|
937
895
|
ft-icon, ft-ripple, ft-typography {
|
|
@@ -950,14 +908,14 @@
|
|
|
950
908
|
.ft-switch-option--selected ft-icon {
|
|
951
909
|
color: ${ot.selectedTextColor};
|
|
952
910
|
}
|
|
953
|
-
`;var
|
|
954
|
-
<label part="label" for="input" class="${(0,
|
|
911
|
+
`;var Pe=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ka=class extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}},Ga=class extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}},at=class extends Vi.FtLitElement{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1,this.isFocused=!1}focus(){this.input.focus()}update(t){super.update(t),t.has("selected")&&this.dispatchEvent(new Ga(this.selected))}render(){let t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected,"ft-switch-option--focused":this.isFocused};return this.addTooltip(Fi.html`
|
|
912
|
+
<label part="label" for="input" class="${(0,Lp.classMap)(t)}"
|
|
955
913
|
@click=${this.onChange}>
|
|
956
914
|
<div class="ft-switch-option--content">
|
|
957
915
|
<ft-ripple part="ripple" class="ft-switch-option--ripple"></ft-ripple>
|
|
958
916
|
<ft-typography part="text"
|
|
959
917
|
variant="button"
|
|
960
|
-
class="ft-switch-option--label ${
|
|
918
|
+
class="ft-switch-option--label ${Vi.isSafari?"ft-safari-ellipsis-fix":""}"
|
|
961
919
|
?hidden=${!this.hasTextContent()}>
|
|
962
920
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
963
921
|
</ft-typography>
|
|
@@ -966,22 +924,22 @@
|
|
|
966
924
|
</label>
|
|
967
925
|
<input id="input" type="radio" class="ft-switch-option--input"
|
|
968
926
|
.checked=${this.selected}>
|
|
969
|
-
`)}addTooltip(t){return this.getLabel().trim().length===0?t:
|
|
927
|
+
`)}addTooltip(t){return this.getLabel().trim().length===0?t:Fi.html`
|
|
970
928
|
<ft-tooltip part="tooltip"
|
|
971
929
|
text="${this.getLabel()}"
|
|
972
930
|
position="${this.tooltipPosition}">
|
|
973
931
|
${t}
|
|
974
932
|
</ft-tooltip>
|
|
975
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.onFocusout)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this.onFocusout)}onFocusout(){this.isFocused=!1}onChange(){this.selected=this.unselectable?!this.selected:!0,this.dispatchEvent(new
|
|
933
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.onFocusout)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this.onFocusout)}onFocusout(){this.isFocused=!1}onChange(){this.selected=this.unselectable?!this.selected:!0,this.dispatchEvent(new Ka(this.selected))}getLabel(){return this.label||this.getTextContent()}resolveIcon(){return this.icon?Fi.html`
|
|
976
934
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
977
|
-
`:
|
|
978
|
-
<div @keydown=${this.onKeyDown} tabindex="-1" class="${(0,
|
|
935
|
+
`:Fi.nothing}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};at.elementDefinitions={"ft-ripple":M,"ft-typography":U,"ft-tooltip":rt,"ft-icon":H};at.styles=[Vi.safariEllipsisFix,Rp];Pe([(0,Kt.property)()],at.prototype,"value",void 0);Pe([(0,Kt.property)()],at.prototype,"icon",void 0);Pe([(0,Kt.property)()],at.prototype,"iconVariant",void 0);Pe([(0,Kt.property)()],at.prototype,"label",void 0);Pe([(0,Kt.property)()],at.prototype,"tooltipPosition",void 0);Pe([(0,Kt.property)({type:Boolean,reflect:!0})],at.prototype,"selected",void 0);Pe([(0,Kt.property)({type:Boolean})],at.prototype,"trailingIcon",void 0);Pe([(0,Kt.property)({type:Boolean})],at.prototype,"unselectable",void 0);Pe([(0,Kt.query)(".ft-switch-option--content slot")],at.prototype,"slottedContent",void 0);Pe([(0,Kt.query)(".ft-switch-option--input")],at.prototype,"input",void 0);Pe([(0,Kt.state)()],at.prototype,"isFocused",void 0);var ti=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},qa=class extends CustomEvent{constructor(t){super("change",{detail:t})}},Ut=class extends rr.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.displayFocusWhenUsingKeyboard=!1,this.options=[]}get value(){var t;return(t=this.selectedOption)===null||t===void 0?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach(r=>r.unselectable=this.unselectable)}render(){let t={"ft-switch":!0,"ft-switch--dense":this.dense};return ns.html`
|
|
936
|
+
<div @keydown=${this.onKeyDown} tabindex="-1" class="${(0,Pp.classMap)(t)}" role="radiogroup" aria-label="${this.label}">
|
|
979
937
|
<slot @slotchange=${this.onSlotchange}
|
|
980
938
|
@option-change=${this.onOptionChangeByScript}
|
|
981
939
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
982
940
|
></slot>
|
|
983
941
|
</div>
|
|
984
|
-
`}onKeyDown(t){let r;(t.key=="ArrowDown"||t.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(t.key=="ArrowUp"||t.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),t.key==" "&&(r=this.options.indexOf(t.target)),r!=null&&(t.preventDefault(),this.options[this.fixIndex(r)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(r)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],(t=this.slottedContent)===null||t===void 0||t.assignedElements().forEach(r=>{r instanceof at&&this.registerOption(r)}),this.selectedOption=this.options.find(r=>r.selected)}registerOption(t){var r;(r=t.shadowRoot)===null||r===void 0||r.querySelectorAll("input").forEach(i=>{i.setAttribute("tabindex","-1")}),t.setAttribute("tabindex","0"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let r=t.target;this.onOptionChange(r)}onOptionChangeByUser(t){var r;t.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(t.target),this.dispatchEvent(new
|
|
942
|
+
`}onKeyDown(t){let r;(t.key=="ArrowDown"||t.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(t.key=="ArrowUp"||t.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),t.key==" "&&(r=this.options.indexOf(t.target)),r!=null&&(t.preventDefault(),this.options[this.fixIndex(r)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(r)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],(t=this.slottedContent)===null||t===void 0||t.assignedElements().forEach(r=>{r instanceof at&&this.registerOption(r)}),this.selectedOption=this.options.find(r=>r.selected)}registerOption(t){var r;(r=t.shadowRoot)===null||r===void 0||r.querySelectorAll("input").forEach(i=>{i.setAttribute("tabindex","-1")}),t.setAttribute("tabindex","0"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let r=t.target;this.onOptionChange(r)}onOptionChangeByUser(t){var r;t.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(t.target),this.dispatchEvent(new qa((r=this.selectedOption)===null||r===void 0?void 0:r.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(t=>{t.selected=t===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(t.isFocused=t===this.selectedOption)})}};Ut.elementDefinitions={};Ut.styles=ns.css`
|
|
985
943
|
:host {
|
|
986
944
|
display: inline-block;
|
|
987
945
|
}
|
|
@@ -997,25 +955,25 @@
|
|
|
997
955
|
}
|
|
998
956
|
|
|
999
957
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
1000
|
-
${(0,
|
|
1001
|
-
${(0,
|
|
1002
|
-
${(0,
|
|
958
|
+
${(0,rr.setVariable)(bt.borderRadiusLeft,"0")};
|
|
959
|
+
${(0,rr.setVariable)(bt.borderRadiusRight,"0")};
|
|
960
|
+
${(0,rr.setVariable)(bt.borderWidthLeft,"0")};
|
|
1003
961
|
}
|
|
1004
962
|
|
|
1005
963
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
1006
|
-
${(0,
|
|
1007
|
-
${(0,
|
|
964
|
+
${(0,rr.setVariable)(bt.borderRadiusLeft,ot.borderRadius)};
|
|
965
|
+
${(0,rr.setVariable)(bt.borderWidthLeft,"1px")};
|
|
1008
966
|
}
|
|
1009
967
|
|
|
1010
968
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
1011
|
-
${(0,
|
|
969
|
+
${(0,rr.setVariable)(bt.borderRadiusRight,ot.borderRadius)};
|
|
1012
970
|
}
|
|
1013
971
|
|
|
1014
972
|
.ft-switch--dense slot::slotted(ft-switch-option) {
|
|
1015
973
|
--switch-internal-vertical-padding: 2px;
|
|
1016
974
|
--switch-internal-horizontal-padding: 4px;
|
|
1017
975
|
}
|
|
1018
|
-
`;
|
|
976
|
+
`;ti([(0,je.property)({type:Boolean})],Ut.prototype,"dense",void 0);ti([(0,je.property)({type:Boolean})],Ut.prototype,"unselectable",void 0);ti([(0,je.property)()],Ut.prototype,"label",void 0);ti([(0,je.query)(".ft-switch slot")],Ut.prototype,"slottedContent",void 0);ti([(0,je.state)()],Ut.prototype,"selectedOption",void 0);ti([(0,je.state)()],Ut.prototype,"displayFocusWhenUsingKeyboard",void 0);ti([(0,je.query)(".ft-switch")],Ut.prototype,"ftSwitchDiv",void 0);var Ip=u(g());var kp={"ft-switch":Ut,"ft-switch-option":at};(0,Ip.customElements)(kp);var ir=u(g()),Dp=u(A());function os(e){return Dp.css`
|
|
1019
977
|
[part="container"] {
|
|
1020
978
|
box-sizing: border-box;
|
|
1021
979
|
display: flex;
|
|
@@ -1028,7 +986,7 @@
|
|
|
1028
986
|
flex-direction: row;
|
|
1029
987
|
align-items: center;
|
|
1030
988
|
margin-left: -6px;
|
|
1031
|
-
${(0,
|
|
989
|
+
${(0,ir.setVariable)(V.backgroundColor,e.starsBackgroundColor)}
|
|
1032
990
|
}
|
|
1033
991
|
|
|
1034
992
|
[part="rating-container"],
|
|
@@ -1042,14 +1000,14 @@
|
|
|
1042
1000
|
}
|
|
1043
1001
|
|
|
1044
1002
|
[part="rating-container"] {
|
|
1045
|
-
${(0,
|
|
1046
|
-
${(0,
|
|
1047
|
-
${(0,
|
|
1048
|
-
${(0,
|
|
1003
|
+
${(0,ir.setVariable)(V.color,e.emptyRatingColor)};
|
|
1004
|
+
${(0,ir.setVariable)(V.rippleColor,e.filledRatingColor)};
|
|
1005
|
+
${(0,ir.setVariable)(ot.textColor,e.emptyRatingColor)};
|
|
1006
|
+
${(0,ir.setVariable)(ot.selectedTextColor,e.filledRatingColor)};
|
|
1049
1007
|
}
|
|
1050
1008
|
|
|
1051
1009
|
[part="rating-container"] .rating-stars--active {
|
|
1052
|
-
${(0,
|
|
1010
|
+
${(0,ir.setVariable)(V.color,e.filledRatingColor)};
|
|
1053
1011
|
}
|
|
1054
1012
|
|
|
1055
1013
|
[part="feedback-container"] {
|
|
@@ -1067,14 +1025,14 @@
|
|
|
1067
1025
|
|
|
1068
1026
|
[part="send-feedback"],
|
|
1069
1027
|
[part="send-feedback-link"] {
|
|
1070
|
-
${(0,
|
|
1071
|
-
${(0,
|
|
1028
|
+
${(0,ir.setVariable)(V.color,e.sendFeedbackColor)};
|
|
1029
|
+
${(0,ir.setVariable)(V.backgroundColor,e.sendFeedbackBackgroundColor)};
|
|
1072
1030
|
}
|
|
1073
1031
|
|
|
1074
1032
|
[part="buttons-container"] {
|
|
1075
1033
|
align-self: flex-end;
|
|
1076
1034
|
}
|
|
1077
|
-
`}var
|
|
1035
|
+
`}var Ot=u(g());var ss={feedbackInputMinWidth:Ot.FtCssVariableFactory.create("--ft-viewer-feedback-input-min-width","","SIZE","300px"),ratedDateColor:Ot.FtCssVariableFactory.external(Ot.designSystemVariables.colorOnSurfaceMedium,"Design system"),sendFeedbackColor:Ot.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-color","",Ot.designSystemVariables.colorOnPrimary),sendFeedbackBackgroundColor:Ot.FtCssVariableFactory.extend("--ft-viewer-feedback-send-feedback-background-color","",Ot.designSystemVariables.colorPrimary),filledRatingColor:Ot.FtCssVariableFactory.extend("--ft-viewer-feedback-filled-rating-color","",Ot.designSystemVariables.colorPrimary),emptyRatingColor:Ot.FtCssVariableFactory.extend("--ft-viewer-feedback-empty-rating-color","",Ot.designSystemVariables.colorOnSurfaceMedium),mainTitleFontSize:Ot.FtCssVariableFactory.external(fr.fontSize,"Typography"),sectionTitleFontSize:Ot.FtCssVariableFactory.external(hr.fontSize,"Typography"),starsBackgroundColor:Ot.FtCssVariableFactory.create("--ft-viewer-feedback-stars-background-color","","COLOR",Ot.designSystemVariables.colorSurface)};var lt=u(A()),ct=u(N()),Hi=u(g());var Np=u(A()),j=u(g());var Mp=u(A()),q=u(g());var _={fontSize:q.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:q.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:q.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:q.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:q.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:q.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:q.FtCssVariableFactory.extend("--ft-input-label-border-color","",q.designSystemVariables.colorOutline),textColor:q.FtCssVariableFactory.extend("--ft-input-label-text-color","",q.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:q.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",q.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:q.FtCssVariableFactory.extend("--ft-input-label-background-color","",q.designSystemVariables.colorSurface),borderRadius:q.FtCssVariableFactory.extend("--ft-input-label-border-radius","",q.designSystemVariables.borderRadiusS),colorError:q.FtCssVariableFactory.external(q.designSystemVariables.colorError,"Design system")},$p=Mp.css`
|
|
1078
1036
|
.ft-input-label {
|
|
1079
1037
|
position: absolute;
|
|
1080
1038
|
inset: 0;
|
|
@@ -1125,8 +1083,8 @@
|
|
|
1125
1083
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
1126
1084
|
max-width: calc(${_.labelMaxWidth} - 2 * (${_.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
1127
1085
|
text-overflow: ellipsis;
|
|
1128
|
-
${(0,q.setVariable)(
|
|
1129
|
-
${(0,q.setVariable)(
|
|
1086
|
+
${(0,q.setVariable)(Qt.fontSize,_.fontSize)};
|
|
1087
|
+
${(0,q.setVariable)(Qt.lineHeight,_.fontSize)};
|
|
1130
1088
|
}
|
|
1131
1089
|
|
|
1132
1090
|
.ft-input-label--in-error .ft-input-label--text {
|
|
@@ -1146,7 +1104,7 @@
|
|
|
1146
1104
|
|
|
1147
1105
|
.ft-input-label--floating-text {
|
|
1148
1106
|
position: absolute;
|
|
1149
|
-
top: calc(50% - ${
|
|
1107
|
+
top: calc(50% - ${Qt.lineHeight} / 2);
|
|
1150
1108
|
transition: top 250ms;
|
|
1151
1109
|
overflow: hidden;
|
|
1152
1110
|
white-space: nowrap;
|
|
@@ -1158,8 +1116,8 @@
|
|
|
1158
1116
|
}
|
|
1159
1117
|
|
|
1160
1118
|
.ft-input-label--raised .ft-input-label--text {
|
|
1161
|
-
${(0,q.setVariable)(
|
|
1162
|
-
${(0,q.setVariable)(
|
|
1119
|
+
${(0,q.setVariable)(Qt.fontSize,_.raisedFontSize)};
|
|
1120
|
+
${(0,q.setVariable)(Qt.lineHeight,_.raisedFontSize)};
|
|
1163
1121
|
}
|
|
1164
1122
|
|
|
1165
1123
|
.ft-input-label--raised .ft-input-label--floating-text {
|
|
@@ -1190,13 +1148,13 @@
|
|
|
1190
1148
|
z-index: ${_.raisedZIndex};
|
|
1191
1149
|
background-color: ${_.backgroundColor};
|
|
1192
1150
|
border-radius: ${_.borderRadius};
|
|
1193
|
-
top: calc((${
|
|
1151
|
+
top: calc((${Qt.lineHeight} / -2) + 2px);
|
|
1194
1152
|
}
|
|
1195
1153
|
|
|
1196
1154
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
1197
1155
|
border-top: none;
|
|
1198
1156
|
}
|
|
1199
|
-
`;var
|
|
1157
|
+
`;var W={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")},Up=Np.css`
|
|
1200
1158
|
*:focus {
|
|
1201
1159
|
outline: none;
|
|
1202
1160
|
}
|
|
@@ -1208,10 +1166,10 @@
|
|
|
1208
1166
|
}
|
|
1209
1167
|
|
|
1210
1168
|
ft-input-label {
|
|
1211
|
-
${(0,j.setVariable)(_.fontSize,
|
|
1212
|
-
${(0,j.setVariable)(_.raisedFontSize,
|
|
1213
|
-
${(0,j.setVariable)(_.verticalSpacing,
|
|
1214
|
-
${(0,j.setVariable)(_.horizontalSpacing,
|
|
1169
|
+
${(0,j.setVariable)(_.fontSize,W.fontSize)};
|
|
1170
|
+
${(0,j.setVariable)(_.raisedFontSize,W.labelSize)};
|
|
1171
|
+
${(0,j.setVariable)(_.verticalSpacing,W.verticalSpacing)};
|
|
1172
|
+
${(0,j.setVariable)(_.horizontalSpacing,W.horizontalSpacing)};
|
|
1215
1173
|
}
|
|
1216
1174
|
|
|
1217
1175
|
.ft-text-area--main-panel {
|
|
@@ -1229,8 +1187,8 @@
|
|
|
1229
1187
|
}
|
|
1230
1188
|
|
|
1231
1189
|
.ft-text-area--input-panel ft-ripple {
|
|
1232
|
-
${(0,j.setVariable)(
|
|
1233
|
-
${(0,j.setVariable)(
|
|
1190
|
+
${(0,j.setVariable)(K.opacityContentOnSurfaceHover,"0.08")};
|
|
1191
|
+
${(0,j.setVariable)(K.opacityContentOnSurfacePressed,"0.04")};
|
|
1234
1192
|
}
|
|
1235
1193
|
|
|
1236
1194
|
.ft-text-area--input {
|
|
@@ -1242,12 +1200,12 @@
|
|
|
1242
1200
|
align-self: stretch;
|
|
1243
1201
|
resize: none;
|
|
1244
1202
|
|
|
1245
|
-
${(0,j.setVariable)(
|
|
1246
|
-
${(0,j.setVariable)(
|
|
1247
|
-
color: ${
|
|
1203
|
+
${(0,j.setVariable)(ue.fontSize,W.fontSize)};
|
|
1204
|
+
${(0,j.setVariable)(ue.lineHeight,W.fontSize)};
|
|
1205
|
+
color: ${W.colorOnSurface};
|
|
1248
1206
|
|
|
1249
|
-
padding: 0 ${
|
|
1250
|
-
margin: calc(${
|
|
1207
|
+
padding: 0 ${W.horizontalSpacing};
|
|
1208
|
+
margin: calc(${W.verticalSpacing} + ${W.labelSize} / 2) 0 ${W.verticalSpacing} 0;
|
|
1251
1209
|
|
|
1252
1210
|
border: none;
|
|
1253
1211
|
background: none;
|
|
@@ -1256,7 +1214,7 @@
|
|
|
1256
1214
|
}
|
|
1257
1215
|
|
|
1258
1216
|
.ft-text-area--disabled .ft-text-area--input {
|
|
1259
|
-
color: ${
|
|
1217
|
+
color: ${W.colorOnSurfaceDisabled};
|
|
1260
1218
|
}
|
|
1261
1219
|
|
|
1262
1220
|
.ft-text-area:not(.ft-text-area--disabled) .ft-text-area--input-panel {
|
|
@@ -1264,39 +1222,39 @@
|
|
|
1264
1222
|
}
|
|
1265
1223
|
|
|
1266
1224
|
.ft-text-area:not(.ft-text-area--disabled):focus-within ft-input-label {
|
|
1267
|
-
${(0,j.setVariable)(_.borderColor,
|
|
1268
|
-
${(0,j.setVariable)(_.textColor,
|
|
1225
|
+
${(0,j.setVariable)(_.borderColor,W.colorPrimary)};
|
|
1226
|
+
${(0,j.setVariable)(_.textColor,W.colorPrimary)};
|
|
1269
1227
|
}
|
|
1270
1228
|
|
|
1271
1229
|
.ft-text-area--filled .ft-text-area--input-panel {
|
|
1272
|
-
border-radius: ${
|
|
1230
|
+
border-radius: ${W.borderRadiusS} ${W.borderRadiusS} 0 0;
|
|
1273
1231
|
}
|
|
1274
1232
|
|
|
1275
1233
|
.ft-text-area--filled:not(.ft-text-area--no-label) .ft-text-area--input {
|
|
1276
1234
|
align-self: stretch;
|
|
1277
|
-
margin-bottom: ${
|
|
1278
|
-
margin-top: calc(${
|
|
1235
|
+
margin-bottom: ${W.verticalSpacing};
|
|
1236
|
+
margin-top: calc(${W.labelSize} + 2 * ${W.verticalSpacing});
|
|
1279
1237
|
}
|
|
1280
1238
|
|
|
1281
1239
|
.ft-text-area--outlined .ft-text-area--input-panel {
|
|
1282
|
-
border-radius: ${
|
|
1240
|
+
border-radius: ${W.borderRadiusS};
|
|
1283
1241
|
}
|
|
1284
1242
|
|
|
1285
1243
|
.ft-text-area--helper-text {
|
|
1286
|
-
padding: 0 12px 0 ${
|
|
1287
|
-
color: ${
|
|
1244
|
+
padding: 0 12px 0 ${W.horizontalSpacing};
|
|
1245
|
+
color: ${W.helperColor};
|
|
1288
1246
|
}
|
|
1289
1247
|
|
|
1290
1248
|
.ft-text-area--in-error .ft-text-area--input,
|
|
1291
1249
|
.ft-text-area--in-error .ft-text-area--helper-text {
|
|
1292
|
-
color: ${
|
|
1250
|
+
color: ${W.colorError};
|
|
1293
1251
|
}
|
|
1294
1252
|
|
|
1295
1253
|
ft-resizer {
|
|
1296
1254
|
position: absolute;
|
|
1297
1255
|
bottom: 0;
|
|
1298
1256
|
}
|
|
1299
|
-
`;var
|
|
1257
|
+
`;var ds=u(A()),ke=u(N()),Zp=u(ee()),We=u(g());var ls=u(A()),re=u(N()),cs=u(g());var Vp=u(A()),Bi=u(g()),Fp={colorOutline:Bi.FtCssVariableFactory.external(Bi.designSystemVariables.colorOutline,"Design system"),colorOnSurfaceMedium:Bi.FtCssVariableFactory.external(Bi.designSystemVariables.colorOnSurfaceMedium,"Design system")},Bp=Vp.css`
|
|
1300
1258
|
:host {
|
|
1301
1259
|
display: block;
|
|
1302
1260
|
}
|
|
@@ -1307,18 +1265,18 @@
|
|
|
1307
1265
|
|
|
1308
1266
|
ft-icon {
|
|
1309
1267
|
transform: rotate(-45deg);
|
|
1310
|
-
color: ${
|
|
1268
|
+
color: ${Fp.colorOutline};
|
|
1311
1269
|
}
|
|
1312
1270
|
|
|
1313
1271
|
.ft-resizer--dragging ft-icon,
|
|
1314
1272
|
.ft-resizer:hover ft-icon,
|
|
1315
1273
|
[role="button"][aria-pressed="true"] ft-icon{
|
|
1316
|
-
color: ${
|
|
1274
|
+
color: ${Fp.colorOnSurfaceMedium};
|
|
1317
1275
|
}
|
|
1318
|
-
`;var
|
|
1276
|
+
`;var ze=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},as=class extends CustomEvent{constructor(t,r){super("resize",{detail:{width:t,height:r}})}},Et=class extends cs.FtLitElement{constructor(){super(...arguments),this.initialWidth=0,this.initialHeight=0,this.icon="drag_handle",this.iconVariant=Pt.material,this.cursor="nwse-resize",this.ariaLabel="",this.dragging=!1,this.isAriaPressed=!1,this.fixedWidth=0,this.fixedHeight=0,this.startX=0,this.startY=0,this.doDragFromMouse=t=>this.doDrag(t.clientX,t.clientY),this.doDragFromTouch=t=>this.doDrag(t.touches[0].clientX,t.touches[0].clientY),this.stopDrag=()=>{this.dragging=!1,document.removeEventListener("mousemove",this.doDragFromMouse,!1),document.removeEventListener("mouseup",this.stopDrag,!1),document.removeEventListener("touchmove",this.doDragFromTouch,!1),document.removeEventListener("touchend",this.stopDrag,!1),document.removeEventListener("touchcancel",this.stopDrag,!1)}}render(){return ls.html`
|
|
1319
1277
|
<style>
|
|
1320
1278
|
.ft-resizer {
|
|
1321
|
-
cursor: ${(0,
|
|
1279
|
+
cursor: ${(0,ls.unsafeCSS)(this.cursor)}
|
|
1322
1280
|
}
|
|
1323
1281
|
</style>
|
|
1324
1282
|
<div class="ft-resizer ft-no-text-select ${this.dragging?"ft-resizer--dragging":""}"
|
|
@@ -1330,26 +1288,26 @@
|
|
|
1330
1288
|
@keydown=${this.initKeydownPress}>
|
|
1331
1289
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon} focusable="false" aria-hidden="true"></ft-icon>
|
|
1332
1290
|
</div>
|
|
1333
|
-
`}initDragFromMouse(t){t.detail>0&&this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let r=t.key;["Enter"," ","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&(t.preventDefault(),t.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=t.currentTarget;r==="Enter"||r===" "?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):r==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(r==="ArrowLeft"?this.fixedWidth-=10:r==="ArrowRight"?this.fixedWidth+=10:r==="ArrowUp"?this.fixedHeight-=10:r==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&this.dispatchEvent(new
|
|
1334
|
-
<div class="${(0,
|
|
1335
|
-
${
|
|
1291
|
+
`}initDragFromMouse(t){t.detail>0&&this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let r=t.key;["Enter"," ","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&(t.preventDefault(),t.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=t.currentTarget;r==="Enter"||r===" "?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):r==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(r==="ArrowLeft"?this.fixedWidth-=10:r==="ArrowRight"?this.fixedWidth+=10:r==="ArrowUp"?this.fixedHeight-=10:r==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&this.dispatchEvent(new as(this.fixedWidth,this.fixedHeight)))}initDrag(t,r){this.dragging=!0,this.startX=t,this.startY=r,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,r){let i=this.fixedWidth+t-this.startX,n=this.fixedHeight+r-this.startY;this.dispatchEvent(new as(i,n))}};Et.elementDefinitions={"ft-icon":H};Et.styles=[cs.noTextSelect,Bp];ze([(0,re.property)({type:Number})],Et.prototype,"initialWidth",void 0);ze([(0,re.property)({type:Number})],Et.prototype,"initialHeight",void 0);ze([(0,re.property)()],Et.prototype,"icon",void 0);ze([(0,re.property)()],Et.prototype,"iconVariant",void 0);ze([(0,re.property)()],Et.prototype,"cursor",void 0);ze([(0,re.property)()],Et.prototype,"ariaLabel",void 0);ze([(0,re.state)()],Et.prototype,"dragging",void 0);ze([(0,re.state)()],Et.prototype,"isAriaPressed",void 0);ze([(0,re.eventOptions)({passive:!0})],Et.prototype,"initDragFromMouse",null);ze([(0,re.eventOptions)({passive:!0})],Et.prototype,"initDragFromTouch",null);var jp=u(g());var Hp={"ft-resizer":Et};(0,jp.customElements)(Hp);var us=u(N());var Ya=u(A()),Za=u(N());function zp(e,t,r){return e?t(e):r?.(e)}var Kp=u(ee()),Gp=u(g()),Wp=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ei=class extends Gp.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return Ya.html`
|
|
1292
|
+
<div class="${(0,Kp.classMap)(this.inputLabelClasses)}">
|
|
1293
|
+
${zp(this.text,()=>Ya.html`
|
|
1336
1294
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1337
1295
|
<label class="ft-input-label--floating-text">${this.text}</label>
|
|
1338
1296
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
1339
1297
|
</div>
|
|
1340
1298
|
`)}
|
|
1341
1299
|
</div>
|
|
1342
|
-
`}};
|
|
1300
|
+
`}};ei.elementDefinitions={};Wp([(0,Za.property)({type:String})],ei.prototype,"text",void 0);Wp([(0,Za.property)({type:Boolean})],ei.prototype,"raised",void 0);var Xa=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ie=class extends ei{constructor(){super(...arguments),this.outlined=!1,this.error=!1,this.disabled=!1}get inputLabelClasses(){return{"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error}}};ie.elementDefinitions={};ie.styles=[go,$p];Xa([(0,us.property)({type:Boolean})],ie.prototype,"outlined",void 0);Xa([(0,us.property)({type:Boolean})],ie.prototype,"error",void 0);Xa([(0,us.property)({type:Boolean})],ie.prototype,"disabled",void 0);var Yp=u(g());var qp={"ft-input-label":ie};(0,Yp.customElements)(qp);var ve=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},mt=class extends(0,We.toFtFormComponent)(We.FtLitElement){constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){let t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return ds.html`
|
|
1343
1301
|
<style>
|
|
1344
1302
|
.ft-text-area--main-panel {
|
|
1345
|
-
height: calc(4 * ${
|
|
1303
|
+
height: calc(4 * ${W.verticalSpacing} + ${W.labelSize} + ${W.fontSize} + ${this.height}px);
|
|
1346
1304
|
}
|
|
1347
1305
|
|
|
1348
1306
|
ft-resizer {
|
|
1349
1307
|
right: ${this.textarea!=null?this.textarea.offsetWidth-this.textarea.clientWidth:0}px;
|
|
1350
1308
|
}
|
|
1351
1309
|
</style>
|
|
1352
|
-
<div class="${(0,
|
|
1310
|
+
<div class="${(0,Zp.classMap)(t)}">
|
|
1353
1311
|
<div class="ft-text-area--main-panel">
|
|
1354
1312
|
<ft-input-label text="${this.label}"
|
|
1355
1313
|
?disabled=${this.disabled}
|
|
@@ -1359,7 +1317,7 @@
|
|
|
1359
1317
|
aria-hidden="true"
|
|
1360
1318
|
></ft-input-label>
|
|
1361
1319
|
<div class="ft-text-area--input-panel">
|
|
1362
|
-
${this.outlined?null:
|
|
1320
|
+
${this.outlined?null:ds.html`
|
|
1363
1321
|
<ft-ripple ?disabled=${this.disabled} activated></ft-ripple>
|
|
1364
1322
|
`}
|
|
1365
1323
|
<textarea
|
|
@@ -1379,12 +1337,12 @@
|
|
|
1379
1337
|
cursor="ns-resize"
|
|
1380
1338
|
ariaLabel="Resize text area"></ft-resizer>
|
|
1381
1339
|
</div>
|
|
1382
|
-
${this.helper?
|
|
1383
|
-
<ft-typography class="ft-text-area--helper-text" variant="${
|
|
1340
|
+
${this.helper?ds.html`
|
|
1341
|
+
<ft-typography class="ft-text-area--helper-text" variant="${B.caption}">
|
|
1384
1342
|
${this.helper}
|
|
1385
1343
|
</ft-typography>`:void 0}
|
|
1386
1344
|
</div>
|
|
1387
|
-
`}setValue(t,r=!1){this.value=t,this.setFormValue(t),r&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){(t.key==="Enter"||t.key===" ")&&t.stopPropagation()}updateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(!this.maxHeight||this.maxHeight>0&&t.detail.height<this.maxHeight)&&(this.height=t.detail.height)}};mt.elementDefinitions={"ft-input-label":
|
|
1345
|
+
`}setValue(t,r=!1){this.value=t,this.setFormValue(t),r&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}onKeyDown(t){(t.key==="Enter"||t.key===" ")&&t.stopPropagation()}updateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=((t=this.textarea)===null||t===void 0?void 0:t.value)||"",this.setFormValue(this.value),this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(!this.maxHeight||this.maxHeight>0&&t.detail.height<this.maxHeight)&&(this.height=t.detail.height)}};mt.elementDefinitions={"ft-input-label":ie,"ft-resizer":Et,"ft-ripple":M,"ft-typography":U};mt.styles=[mr,Up];ve([(0,ke.property)({type:String})],mt.prototype,"label",void 0);ve([(0,ke.property)({reflect:!0})],mt.prototype,"value",void 0);ve([(0,ke.property)({type:String})],mt.prototype,"helper",void 0);ve([(0,ke.property)({type:Boolean})],mt.prototype,"outlined",void 0);ve([(0,ke.property)({type:Boolean})],mt.prototype,"disabled",void 0);ve([(0,ke.property)({type:Boolean})],mt.prototype,"error",void 0);ve([(0,We.numberProperty)({reflect:!0})],mt.prototype,"height",void 0);ve([(0,We.numberProperty)()],mt.prototype,"maxHeight",void 0);ve([(0,ke.query)("textarea")],mt.prototype,"textarea",void 0);ve([(0,ke.state)()],mt.prototype,"focused",void 0);ve([(0,We.ignoreComposingEvents)()],mt.prototype,"onKeyDown",null);ve([(0,We.ignoreComposingEvents)()],mt.prototype,"liveUpdateValueFromInputField",null);var Jp=u(g());var Xp={"ft-text-area":mt};(0,Jp.customElements)(Xp);var df=u(xi());var Z=fe.build("integratedFeedbackComponent"),Qp={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 ps=class extends CustomEvent{constructor(t){super("live-change",{detail:t})}},fs=class extends CustomEvent{constructor(t){super("change",{detail:t})}},hs=class extends CustomEvent{constructor(t){super("invalid",{detail:t})}};var tf=u(A()),T=u(g());var I={fontSize:T.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:T.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:T.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:T.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:T.FtCssVariableFactory.extend("--ft-text-field-helper-color","",T.designSystemVariables.colorOnSurfaceMedium),colorPrimary:T.FtCssVariableFactory.external(T.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:T.FtCssVariableFactory.external(T.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:T.FtCssVariableFactory.external(T.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:T.FtCssVariableFactory.external(T.designSystemVariables.borderRadiusS,"Design system"),colorError:T.FtCssVariableFactory.external(T.designSystemVariables.colorError,"Design system"),prefixColor:T.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",T.designSystemVariables.colorOnSurfaceMedium),iconColor:T.FtCssVariableFactory.extend("--ft-text-field-icon-color","",T.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:T.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:T.FtCssVariableFactory.extend("--ft-text-field-background-color","",T.designSystemVariables.colorSurface),colorOutline:T.FtCssVariableFactory.external(T.designSystemVariables.colorOutline,"Design system"),elevation02:T.FtCssVariableFactory.external(T.designSystemVariables.elevation02,"Design system"),suggestSize:T.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},ef=tf.css`
|
|
1388
1346
|
*:focus {
|
|
1389
1347
|
outline: none;
|
|
1390
1348
|
}
|
|
@@ -1419,13 +1377,13 @@
|
|
|
1419
1377
|
overflow: hidden;
|
|
1420
1378
|
padding: 0 ${I.horizontalSpacing};
|
|
1421
1379
|
|
|
1422
|
-
${(0,T.setVariable)(
|
|
1423
|
-
${(0,T.setVariable)(
|
|
1380
|
+
${(0,T.setVariable)(ue.fontSize,I.fontSize)};
|
|
1381
|
+
${(0,T.setVariable)(ue.lineHeight,I.fontSize)};
|
|
1424
1382
|
}
|
|
1425
1383
|
|
|
1426
1384
|
.ft-text-field--input-panel ft-ripple {
|
|
1427
|
-
${(0,T.setVariable)(
|
|
1428
|
-
${(0,T.setVariable)(
|
|
1385
|
+
${(0,T.setVariable)(K.opacityContentOnSurfaceHover,"0.08")};
|
|
1386
|
+
${(0,T.setVariable)(K.opacityContentOnSurfacePressed,"0.04")};
|
|
1429
1387
|
}
|
|
1430
1388
|
|
|
1431
1389
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
@@ -1543,7 +1501,7 @@
|
|
|
1543
1501
|
.ft-text-field--with-password ft-icon:hover {
|
|
1544
1502
|
cursor: pointer;
|
|
1545
1503
|
}
|
|
1546
|
-
`;var xt=u(A())
|
|
1504
|
+
`;var xt=u(A()),$=u(N()),af=u(xi()),lf=u(ee());var ne=u(g());var of=u(g()),On=u(A()),ri=u(N());var rf=u(A());var nf=rf.css`
|
|
1547
1505
|
.ft-text-field-suggestion {
|
|
1548
1506
|
position: relative;
|
|
1549
1507
|
padding: 8px 16px;
|
|
@@ -1579,24 +1537,24 @@
|
|
|
1579
1537
|
slot {
|
|
1580
1538
|
pointer-events: none;
|
|
1581
1539
|
}
|
|
1582
|
-
`;var
|
|
1583
|
-
<div class="${(0,
|
|
1540
|
+
`;var sf=u(ee()),ms=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ja=class extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}},ye=class extends of.FtLitElement{render(){let t={"ft-text-field-suggestion":!0,"ft-text-field-suggestion--with-helper":!!this.helper};return On.html`
|
|
1541
|
+
<div class="${(0,sf.classMap)(t)}"
|
|
1584
1542
|
tabindex="-1"
|
|
1585
1543
|
@keydown=${this.onKeyDown}
|
|
1586
1544
|
@click=${this.confirmSuggestion}>
|
|
1587
1545
|
<ft-ripple></ft-ripple>
|
|
1588
|
-
${this.helper?
|
|
1546
|
+
${this.helper?On.html`
|
|
1589
1547
|
<ft-typography class="ft-text-field-suggestion--helper-text" variant="caption">
|
|
1590
1548
|
${this.helper}
|
|
1591
|
-
</ft-typography>`:
|
|
1549
|
+
</ft-typography>`:On.nothing}
|
|
1592
1550
|
<ft-typography part="label"
|
|
1593
1551
|
variant="body1"
|
|
1594
1552
|
class="ft-text-field-suggestion--label">
|
|
1595
1553
|
<slot></slot>
|
|
1596
1554
|
</ft-typography>
|
|
1597
1555
|
</div>
|
|
1598
|
-
`}focus(t){var r;(r=this.container)===null||r===void 0||r.focus(t)}click(){var t;(t=this.container)===null||t===void 0||t.click()}confirmSuggestion(){this.dispatchEvent(new
|
|
1599
|
-
<div class="${(0,
|
|
1556
|
+
`}focus(t){var r;(r=this.container)===null||r===void 0||r.focus(t)}click(){var t;(t=this.container)===null||t===void 0||t.click()}confirmSuggestion(){this.dispatchEvent(new Ja(this.getValue()))}getValue(){return this.value||this.getTextContent()}getTextContent(){return this.assignedNodes.map(t=>t.textContent).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}};ye.elementDefinitions={"ft-ripple":M,"ft-typography":U,"ft-icon":H};ye.styles=nf;ms([(0,ri.property)()],ye.prototype,"value",void 0);ms([(0,ri.property)()],ye.prototype,"helper",void 0);ms([(0,ri.query)(".ft-text-field-suggestion")],ye.prototype,"container",void 0);ms([(0,ri.queryAssignedNodes)()],ye.prototype,"assignedNodes",void 0);var F=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},O=class extends(0,ne.toFtFormComponent)(ne.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=jr.EYE_SLASH,this.passwordRevealedIcon=jr.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.inputValid=!0,this.hidePassword=!0,this.hideSuggestions=!1,this.visibleSuggestions=[],this.providedSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){let r=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",r)}focus(){var t;(t=this.input)===null||t===void 0||t.focus()}blur(){var t;(t=this.input)===null||t===void 0||t.blur()}render(){var t;let r={"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()},i=this.suggestionsProvider&&this.value&&this.value!=""&&!this.providedSuggestions.map(a=>a.label).includes(this.value),o=!this.suggestionsProvider&&this.filterSuggestions&&this.value&&this.value!=""||i,s=this.inputValid?this.helper:(t=this.input)===null||t===void 0?void 0:t.validationMessage;return xt.html`
|
|
1557
|
+
<div class="${(0,lf.classMap)(r)}">
|
|
1600
1558
|
<div class="ft-text-field--main-panel"
|
|
1601
1559
|
@keydown=${this.handleKeyboardNavigation}
|
|
1602
1560
|
@focusout=${this.onMainPanelBlur}>
|
|
@@ -1615,12 +1573,12 @@
|
|
|
1615
1573
|
</ft-typography>
|
|
1616
1574
|
`:xt.nothing}
|
|
1617
1575
|
<input type="${this.resolveInputType()}"
|
|
1618
|
-
name="${
|
|
1619
|
-
maxlength="${
|
|
1576
|
+
name="${Le(this.name)}"
|
|
1577
|
+
maxlength="${Le(this.maxLength||void 0)}"
|
|
1620
1578
|
aria-label="${this.label}"
|
|
1621
|
-
aria-describedby="${
|
|
1579
|
+
aria-describedby="${Le(this.helper?"helper":void 0)}"
|
|
1622
1580
|
aria-invalid="${this.error}"
|
|
1623
|
-
autocomplete="${
|
|
1581
|
+
autocomplete="${Le(this.autocomplete)}"
|
|
1624
1582
|
class="ft-typography--body1 ft-text-field--input"
|
|
1625
1583
|
part="input"
|
|
1626
1584
|
?disabled=${this.disabled}
|
|
@@ -1643,13 +1601,13 @@
|
|
|
1643
1601
|
</div>
|
|
1644
1602
|
</div>
|
|
1645
1603
|
${s?xt.html`
|
|
1646
|
-
<ft-typography class="ft-text-field--helper-text" variant="${
|
|
1604
|
+
<ft-typography class="ft-text-field--helper-text" variant="${B.caption}" id="helper" role="alert">
|
|
1647
1605
|
${s}
|
|
1648
1606
|
</ft-typography>
|
|
1649
1607
|
`:xt.nothing}
|
|
1650
1608
|
</div>
|
|
1651
1609
|
`}resolveInputType(){var t;return this.isPasswordField()?this.hidePassword?"password":"text":(t=this.type)!==null&&t!==void 0?t:"text"}renderSuggestions(){return this.suggestionsProvider?xt.html`
|
|
1652
|
-
${(0,
|
|
1610
|
+
${(0,af.repeat)(this.providedSuggestions,t=>xt.html`
|
|
1653
1611
|
<ft-text-field-suggestion value="${t.value}" @click=${r=>this.onSuggestionClick(r,t.clickHandler)}>
|
|
1654
1612
|
${t.icon?xt.html`
|
|
1655
1613
|
<ft-icon .value=${t.icon}></ft-icon>
|
|
@@ -1669,10 +1627,10 @@
|
|
|
1669
1627
|
.variant=${this.iconVariant}
|
|
1670
1628
|
.value=${this.icon}
|
|
1671
1629
|
@click=${()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()}}></ft-icon>
|
|
1672
|
-
`:xt.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var r,i,n;!((r=this.input)===null||r===void 0)&&r.matches(":autofill")&&this.dispatchedValue!==((i=this.input)===null||i===void 0?void 0:i.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,r=!1){var i,n;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new
|
|
1630
|
+
`:xt.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var r,i,n;!((r=this.input)===null||r===void 0)&&r.matches(":autofill")&&this.dispatchedValue!==((i=this.input)===null||i===void 0?void 0:i.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,r=!1){var i,n;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new ps(t))),r&&this.dispatchedValue!==t&&(this.inputValid=(n=(i=this.input)===null||i===void 0?void 0:i.checkValidity())!==null&&n!==void 0?n:!0,this.inputValid?(this.dispatchedValue=t,this.dispatchEvent(new fs(t))):this.dispatchEvent(new hs(this.input.validationMessage)))}handleInput(t){var r;let i=((r=this.input)===null||r===void 0?void 0:r.value)||"";this.setValue(i,t.key=="Escape"||t.key=="Enter")}catchComposingEvents(t){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var r;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let i=this.visibleSuggestions.findIndex(o=>o.matches(":focus-within")),n;t.key==="ArrowDown"?n=i<this.visibleSuggestions.length-1?i+1:0:n=i>0?i-1:this.visibleSuggestions.length-1,(r=this.visibleSuggestions[n])===null||r===void 0||r.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var r;this.setValue(t.detail,!0),(r=this.input)===null||r===void 0||r.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,r;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((r=this.input)===null||r===void 0?void 0:r.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let t=["bottom","top"];(0,ne.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",t,"fixed","--text-field-internal-suggest-size",0).then(({x:r,y:i})=>{this.suggestionsContainer.style.left=`${r}px`,this.suggestionsContainer.style.top=`${i}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};O.elementDefinitions={"ft-input-label":ie,"ft-ripple":M,"ft-typography":U,"ft-icon":H,"ft-text-field-suggestion":ye};O.styles=[mr,ne.noTextInputDefaultClearButton,ef];F([(0,$.property)()],O.prototype,"label",void 0);F([(0,$.property)({noAccessor:!0})],O.prototype,"value",null);F([(0,$.state)()],O.prototype,"dispatchedValue",void 0);F([(0,$.property)()],O.prototype,"helper",void 0);F([(0,$.property)()],O.prototype,"suggestionsHelper",void 0);F([(0,$.property)({type:Boolean})],O.prototype,"outlined",void 0);F([(0,$.property)({type:Boolean})],O.prototype,"disabled",void 0);F([(0,$.property)({type:Boolean})],O.prototype,"error",void 0);F([(0,$.property)({type:Boolean})],O.prototype,"fixedMenuPosition",void 0);F([(0,$.property)()],O.prototype,"prefix",void 0);F([(0,$.property)()],O.prototype,"icon",void 0);F([(0,$.property)()],O.prototype,"name",void 0);F([(0,$.property)()],O.prototype,"type",void 0);F([(0,$.property)()],O.prototype,"passwordHiddenIcon",void 0);F([(0,$.property)()],O.prototype,"passwordRevealedIcon",void 0);F([(0,$.property)()],O.prototype,"iconVariant",void 0);F([(0,$.property)({type:Boolean})],O.prototype,"filterSuggestions",void 0);F([(0,ne.numberProperty)()],O.prototype,"maxLength",void 0);F([(0,$.property)({type:Boolean})],O.prototype,"password",void 0);F([(0,$.property)({type:String})],O.prototype,"autocomplete",void 0);F([(0,$.property)({attribute:!1})],O.prototype,"suggestionsProvider",void 0);F([(0,$.state)()],O.prototype,"focused",void 0);F([(0,$.state)()],O.prototype,"inputValid",void 0);F([(0,$.state)()],O.prototype,"hidePassword",void 0);F([(0,$.state)()],O.prototype,"hideSuggestions",void 0);F([(0,$.state)()],O.prototype,"visibleSuggestions",void 0);F([(0,$.state)()],O.prototype,"providedSuggestions",void 0);F([(0,$.query)(".ft-text-field--main-panel")],O.prototype,"mainPanel",void 0);F([(0,$.query)(".ft-text-field--input")],O.prototype,"input",void 0);F([(0,$.query)(".ft-text-field-suggestion--new-value")],O.prototype,"newValueSuggestion",void 0);F([(0,$.query)(".ft-text-field--suggestions")],O.prototype,"suggestionsContainer",void 0);F([(0,$.queryAll)("ft-text-field-suggestion")],O.prototype,"providedSuggestionsInDom",void 0);F([(0,$.queryAssignedElements)({selector:"ft-text-field-suggestion"})],O.prototype,"slottedSuggestions",void 0);F([(0,ne.ignoreComposingEvents)()],O.prototype,"handleInput",null);F([(0,ne.ignoreComposingEvents)()],O.prototype,"catchComposingEvents",null);var uf=u(g());var cf={"ft-text-field":O,"ft-text-field-suggestion":ye};(0,uf.customElements)(cf);var gs=class extends CustomEvent{constructor(t){super("send-feedback",{detail:t})}};var St=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},X=class extends he(Hi.FtLitElementRedux){constructor(){super(),this.hideTitle=!1,this.withMoreOptionsButton=!1,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.canAccessFeedback=!1,this.canRateThisContent=!1,this.from="",this.feedbackMessage="",this.addI18nContext(Z,Qp),this.addStore(w)}get configuredRatingType(){var t,r;return(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.type)!==null&&r!==void 0?r:At.NO_RATING}get ratingTypeOfDoneRatingOfThisContent(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.type)!==null&&i!==void 0?i:At.NO_RATING}get ratingValue(){var t,r,i;return(i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.value)!==null&&i!==void 0?i:-1}get ratingDate(){var t,r;let i=(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.rating)===null||r===void 0?void 0:r.date;return typeof i=="string"?(0,Hi.parseDate)(i):i}render(){return!this.canAccessFeedback&&!this.canRateThisContent?lt.nothing:lt.html`
|
|
1673
1631
|
<div part="container">
|
|
1674
1632
|
${this.hideTitle?lt.nothing:lt.html`
|
|
1675
|
-
<ft-typography variant="${
|
|
1633
|
+
<ft-typography variant="${B.title}" part="main-title">
|
|
1676
1634
|
${this.i18n(this.i18nProperties.feedbackMainTitle)}
|
|
1677
1635
|
</ft-typography>
|
|
1678
1636
|
`}
|
|
@@ -1681,19 +1639,19 @@
|
|
|
1681
1639
|
</div>
|
|
1682
1640
|
`}renderRatingSection(){var t;return this.canRateThisContent?lt.html`
|
|
1683
1641
|
<div part="rating-container">
|
|
1684
|
-
<ft-typography variant="${
|
|
1642
|
+
<ft-typography variant="${B.title_dense}" part="section-title">
|
|
1685
1643
|
${this.i18n(((t=this.ratingSummary)===null||t===void 0?void 0:t.type)===At.DICHOTOMOUS?this.i18nProperties.dichotomousRatingSectionTitle:this.i18nProperties.ratingSectionTitle)}
|
|
1686
1644
|
</ft-typography>
|
|
1687
1645
|
${this.renderRating()}
|
|
1688
|
-
<ft-typography variant="${
|
|
1646
|
+
<ft-typography variant="${B.caption}" part="rating-date">
|
|
1689
1647
|
${this.renderRatingDate()}
|
|
1690
1648
|
</ft-typography>
|
|
1691
1649
|
</div>
|
|
1692
|
-
`:lt.nothing}renderRatingDate(){let t=this.ratingDate;if(t==null)return
|
|
1650
|
+
`:lt.nothing}renderRatingDate(){let t=this.ratingDate;if(t==null)return Z.messages.notRated();if(t.getTime()>new Date().getTime()-6e4)return Z.messages.ratedNow();let r=new Date().toLocaleDateString(),i=t.toLocaleDateString();return r===i?Z.messages.ratedToday():Z.messages.ratedOn(t)}renderRating(){switch(this.configuredRatingType){case At.STARS:return lt.html`
|
|
1693
1651
|
<div part="rating rating-stars">
|
|
1694
|
-
${(0,
|
|
1652
|
+
${(0,df.repeat)(new Array(5),(t,r)=>r,(t,r)=>{let i=this.ratingTypeOfDoneRatingOfThisContent===At.STARS&&this.ratingValue>r,n=r+1;return lt.html`
|
|
1695
1653
|
<ft-button round part="rating-stars-${n}"
|
|
1696
|
-
label="${
|
|
1654
|
+
label="${Z.messages.starsRating(n)}"
|
|
1697
1655
|
tooltipPosition="top"
|
|
1698
1656
|
.iconVariant=${this.iconVariant}
|
|
1699
1657
|
icon="${i?this.filledStarIcon:this.emptyStarIcon}"
|
|
@@ -1712,14 +1670,14 @@
|
|
|
1712
1670
|
.iconVariant=${this.iconVariant}
|
|
1713
1671
|
icon="${r?this.filledLikeIcon:this.emptyLikeIcon}"
|
|
1714
1672
|
role="radio">
|
|
1715
|
-
${
|
|
1673
|
+
${Z.messages.like()}
|
|
1716
1674
|
</ft-switch-option>
|
|
1717
1675
|
<ft-switch-option .value=${0}
|
|
1718
1676
|
?selected=${t}
|
|
1719
1677
|
.iconVariant=${this.iconVariant}
|
|
1720
1678
|
icon="${t?this.filledDislikeIcon:this.emptyDislikeIcon}"
|
|
1721
1679
|
role="radio">
|
|
1722
|
-
${
|
|
1680
|
+
${Z.messages.dislike()}
|
|
1723
1681
|
</ft-switch-option>
|
|
1724
1682
|
</ft-switch>
|
|
1725
1683
|
`}case At.DICHOTOMOUS:{let t=this.ratingTypeOfDoneRatingOfThisContent===At.DICHOTOMOUS&&this.ratingValue===0,r=this.ratingTypeOfDoneRatingOfThisContent===At.DICHOTOMOUS&&this.ratingValue===1;return lt.html`
|
|
@@ -1728,11 +1686,11 @@
|
|
|
1728
1686
|
part="rating rating-dichotomous">
|
|
1729
1687
|
<ft-switch-option .value=${1}
|
|
1730
1688
|
?selected=${r}>
|
|
1731
|
-
${
|
|
1689
|
+
${Z.messages.dichotomousYes()}
|
|
1732
1690
|
</ft-switch-option>
|
|
1733
1691
|
<ft-switch-option .value=${0}
|
|
1734
1692
|
?selected=${t}>
|
|
1735
|
-
${
|
|
1693
|
+
${Z.messages.dichotomousNo()}
|
|
1736
1694
|
</ft-switch-option>
|
|
1737
1695
|
</ft-switch>
|
|
1738
1696
|
`}}return lt.nothing}rate(t){(t??-1)!==this.ratingValue&&this.dispatchEvent(new CustomEvent("rate",{detail:t}))}renderFeedbackSection(){var t,r,i,n,o;if(this.canAccessFeedback){let s=this.feedbackMailLinkBuilder(this.feedbackMessage),a=lt.html`
|
|
@@ -1740,7 +1698,7 @@
|
|
|
1740
1698
|
type="submit" name="submit"
|
|
1741
1699
|
?disabled=${!this.feedbackMessage||!this.validFromEmail()}
|
|
1742
1700
|
part="send-feedback">
|
|
1743
|
-
${
|
|
1701
|
+
${Z.messages.okButton()}
|
|
1744
1702
|
</ft-button>
|
|
1745
1703
|
`;s&&(a=lt.html`
|
|
1746
1704
|
<a part="send-feedback-link" href="${s}">
|
|
@@ -1751,26 +1709,26 @@
|
|
|
1751
1709
|
type="button" name="more-options"
|
|
1752
1710
|
@click=${this.onOpenMoreDetails}
|
|
1753
1711
|
part="more-options">
|
|
1754
|
-
${
|
|
1712
|
+
${Z.messages.moreOptionsButton()}
|
|
1755
1713
|
</ft-button>
|
|
1756
1714
|
`:lt.nothing;return lt.html`
|
|
1757
1715
|
<form part="feedback-container" autocomplete="on"
|
|
1758
1716
|
@submit=${c=>this.onFormSubmitEvent(c,!!s)}>
|
|
1759
|
-
<ft-typography variant="${
|
|
1717
|
+
<ft-typography variant="${B.title_dense}" part="section-title">
|
|
1760
1718
|
${this.i18n(this.i18nProperties.feedbackSectionTitle)}
|
|
1761
1719
|
</ft-typography>
|
|
1762
1720
|
${((n=(i=this.session)===null||i===void 0?void 0:i.profile)===null||n===void 0?void 0:n.userId)==null&&(!((o=this.configuration)===null||o===void 0)&&o.mailsSentByFluidTopicsForUnauthenticatedUsers)?lt.html`
|
|
1763
1721
|
<ft-text-field outlined name="email" type="email" autocomplete="email"
|
|
1764
1722
|
part="feedback-from-input"
|
|
1765
|
-
label="${
|
|
1723
|
+
label="${Z.messages.feedbackfromEmail()}"
|
|
1766
1724
|
@change=${c=>this.from=c.detail.trim()}
|
|
1767
1725
|
?error=${this.from&&!this.validFromEmail()}
|
|
1768
|
-
helper="${this.from&&!this.validFromEmail()?
|
|
1726
|
+
helper="${this.from&&!this.validFromEmail()?Z.messages.feedbackfromEmailInvalid():""}"
|
|
1769
1727
|
></ft-text-field>
|
|
1770
1728
|
`:lt.nothing}
|
|
1771
1729
|
<ft-text-area outlined
|
|
1772
1730
|
part="feedback-input"
|
|
1773
|
-
label="${
|
|
1731
|
+
label="${Z.messages.feedbackInputLabel()}"
|
|
1774
1732
|
@live-change=${c=>this.feedbackMessage=c.detail.trim()}
|
|
1775
1733
|
></ft-text-area>
|
|
1776
1734
|
<div part="buttons-container">
|
|
@@ -1778,7 +1736,7 @@
|
|
|
1778
1736
|
${a}
|
|
1779
1737
|
</div>
|
|
1780
1738
|
</form>
|
|
1781
|
-
`}return lt.nothing}onFormSubmitEvent(t,r){t.preventDefault(),r?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,r,i;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((r=(t=this.session)===null||t===void 0?void 0:t.profile)===null||r===void 0?void 0:r.userId)==null&&(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new
|
|
1739
|
+
`}return lt.nothing}onFormSubmitEvent(t,r){t.preventDefault(),r?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,r,i;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((r=(t=this.session)===null||t===void 0?void 0:t.profile)===null||r===void 0?void 0:r.userId)==null&&(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new gs({message:this.feedbackInput.value,...((t=this.configuration)===null||t===void 0?void 0:t.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)}};X.elementDefinitions={"ft-button":k,"ft-typography":U,"ft-switch":Ut,"ft-switch-option":at,"ft-text-area":mt,"ft-text-field":O};St([(0,ct.property)({type:Boolean})],X.prototype,"hideTitle",void 0);St([(0,ct.property)({type:Boolean})],X.prototype,"withMoreOptionsButton",void 0);St([(0,ct.property)()],X.prototype,"iconVariant",void 0);St([(0,ct.property)()],X.prototype,"emptyStarIcon",void 0);St([(0,ct.property)()],X.prototype,"filledStarIcon",void 0);St([(0,ct.property)()],X.prototype,"emptyLikeIcon",void 0);St([(0,ct.property)()],X.prototype,"filledLikeIcon",void 0);St([(0,ct.property)()],X.prototype,"emptyDislikeIcon",void 0);St([(0,ct.property)()],X.prototype,"filledDislikeIcon",void 0);St([(0,ct.property)({type:Boolean})],X.prototype,"canAccessFeedback",void 0);St([(0,ct.property)({type:Boolean})],X.prototype,"canRateThisContent",void 0);St([(0,ct.property)({attribute:!1})],X.prototype,"i18nProperties",void 0);St([(0,ct.property)({attribute:!1})],X.prototype,"ratingSummary",void 0);St([(0,ct.property)()],X.prototype,"configuration",void 0);St([(0,ct.property)()],X.prototype,"feedbackMailLinkBuilder",void 0);St([(0,Hi.redux)({store:w.name})],X.prototype,"session",void 0);St([(0,ct.query)("[part='feedback-input']")],X.prototype,"feedbackInput",void 0);St([(0,ct.state)()],X.prototype,"from",void 0);St([(0,ct.state)()],X.prototype,"feedbackMessage",void 0);var Rn=class extends X{};Rn.styles=os(ss);var Qa=fe.build("inDesignerFeedbackComponent"),pf={feedbackAndRatingDisabledInEditor:"Feedback and ratings performed here are not taken into account."};var vs=fe.fromGwt("server");var ys=class{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,r,i,n,o){var s;this.subject=t,this.url=r,this.configuration=n,this.isAuthenticated=o,this.subjectMetadata=this.filterMetadata(i,n.subjectMetadataIds).map(a=>"["+a.values[a.values.length-1]+"]").join(""),this.bodyMetadata=this.filterMetadata(i,(s=n.bodyMetadataIds)!==null&&s!==void 0?s:[]).map(a=>"["+a.values.join(", ")+"]").join(" ")}filterMetadata(t,r){return r.map(i=>t.find(n=>n.key===i)).filter(i=>i!=null&&i.values.length>0)}shouldUseMailer(){var t,r;let i=this.isAuthenticated&&!(!((t=this.configuration)===null||t===void 0)&&t.mailsSentByFluidTopics),n=!this.isAuthenticated&&!(!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers);return i||n}build(t){var r;if(t!=null&&t.length===0||!this.shouldUseMailer())return;let i=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`
|
|
1782
1740
|
${this.bodyMetadata}
|
|
1783
1741
|
${this.url}
|
|
1784
1742
|
_________________________________________________________________
|
|
@@ -1786,7 +1744,7 @@ _________________________________________________________________
|
|
|
1786
1744
|
${t??""}
|
|
1787
1745
|
|
|
1788
1746
|
_________________________________________________________________
|
|
1789
|
-
${
|
|
1747
|
+
${vs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configuration)===null||r===void 0?void 0:r.recipients.join(",")}?subject=${i}&body=${n}`}};var kt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},J=class extends jt(he(Ht)){get canAccessFeedback(){var t;return(t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(yr.FEEDBACK,{session:this.session})}get canRateThisContent(){var t;return((t=this.service)===null||t===void 0?void 0:t.isFeatureAccessible(yr.RATING,{session:this.session}))&&this.configuredRatingType!=At.NO_RATING}get configuredRatingType(){var t,r;return(r=(t=this.ratingSummary)===null||t===void 0?void 0:t.type)!==null&&r!==void 0?r:At.NO_RATING}constructor(t=new ao){super(),this.guestStorage=t,this.editorMode=!1,this.hideTitle=!1,this.iconVariant=Pt.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new ys,this.i18nProperties={feedbackMainTitle:Z.properties.viewerFeedbackMainTitle(),ratingSectionTitle:Z.properties.viewerRatingSectionTitle(),dichotomousRatingSectionTitle:Z.properties.viewerDichotomousRatingSectionTitle(),feedbackSectionTitle:Z.properties.viewerFeedbackSectionTitle()},this.loadGuestRating=()=>{let r=this.guestStorage.get(this.guestRatingKey());r&&(this.ratingSummary=r)},this.guestRatingKey=()=>{var r;return"ft-viewer-document-feedback-guest-rating-"+((r=this.document)===null||r===void 0?void 0:r.id)},this.sendRatingDebouncer=new Gt.Debouncer(500),this.addStore(w)}render(){return ff.html`
|
|
1790
1748
|
<ft-viewer-feedback
|
|
1791
1749
|
?hideTitle=${this.hideTitle}
|
|
1792
1750
|
iconVariant="${this.iconVariant}"
|
|
@@ -1807,7 +1765,7 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1807
1765
|
@mailer-feedback=${this.onMailerFeedbackSent}
|
|
1808
1766
|
@open-more-options=${this.openMoreOptions}
|
|
1809
1767
|
></ft-viewer-feedback>
|
|
1810
|
-
`}willUpdate(t){var r,i,n;super.willUpdate(t),t.has("editorMode")&&this.editorMode&&this.addI18nContext(
|
|
1768
|
+
`}willUpdate(t){var r,i,n;super.willUpdate(t),t.has("editorMode")&&this.editorMode&&this.addI18nContext(Qa,pf),["document","configuration","user","mailSubject"].some(o=>t.has(o))&&this.document&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,(r=this.document.prettyUrl)!==null&&r!==void 0?r:"",this.document.metadata,this.configuration,((n=(i=this.session)===null||i===void 0?void 0:i.profile)===null||n===void 0?void 0:n.userId)!=null),["session","document"].some(o=>t.has(o))&&this.session&&this.document&&this.loadGuestRating()}connectedCallback(){super.connectedCallback(),this.guestStorage.addStoreListener(this.guestRatingKey,this.loadGuestRating)}disconnectedCallback(){super.disconnectedCallback(),this.guestStorage.clearStoreListeners()}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:t.detail==null?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.guestStorage.store(this.guestRatingKey(),this.ratingSummary),this.sendRatingDebouncer.run(()=>this.sendRating(t.detail)))}async sendRating(t){var r,i,n;if(!this.editorMode&&this.ratingSummary)try{t==null?await((r=this.service)===null||r===void 0?void 0:r.unrateDocument(this.document.id)):await((i=this.service)===null||i===void 0?void 0:i.rateDocument(this.document.id,(n=this.ratingSummary)===null||n===void 0?void 0:n.type,t))}catch{this.dispatchEvent(new Gt.FtNotificationEvent({type:"error",message:Z.messages.ratingFailure()}))}}async sendFeedback(t){var r;try{this.editorMode?this.dispatchEvent(new Gt.FtNotificationEvent({type:"info",message:Qa.messages.feedbackAndRatingDisabledInEditor()})):(await((r=this.service)===null||r===void 0?void 0:r.sendDocumentFeedback(this.document.id,t.detail.message,t.detail.from)),this.dispatchEvent(new Gt.FtNotificationEvent({type:"info",message:Z.messages.feedbackSuccess()}))),this.viewerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new Gt.FtNotificationEvent({type:"error",message:Z.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new Go)}openMoreOptions(){var t,r;this.dispatchEvent(new Ko({documentId:this.document.id,documentTitle:this.displayName||"",ratingType:((t=this.ratingSummary)===null||t===void 0?void 0:t.type)||At.NO_RATING,ratingValue:(r=this.ratingSummary)===null||r===void 0?void 0:r.rating}))}};J.styles=os(ss);J.elementDefinitions={"ft-viewer-feedback":Rn};J.storedRatingIfAuthenticated=(e,t)=>{var r,i;return!((r=t.session)===null||r===void 0)&&r.sessionAuthenticated?e.documentRating:(i=t.ratingSummary)!==null&&i!==void 0?i:e.documentRating};kt([(0,Gt.redux)({store:w.name})],J.prototype,"session",void 0);kt([(0,Gt.redux)({store:"viewer"})],J.prototype,"document",void 0);kt([(0,Gt.redux)({store:w.name})],J.prototype,"editorMode",void 0);kt([(0,Gt.redux)({store:"viewer",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],J.prototype,"configuration",void 0);kt([(0,Gt.redux)({store:"viewer",selector:J.storedRatingIfAuthenticated})],J.prototype,"ratingSummary",void 0);kt([(0,Ie.property)({type:Boolean})],J.prototype,"hideTitle",void 0);kt([(0,Ie.property)()],J.prototype,"iconVariant",void 0);kt([(0,Ie.property)()],J.prototype,"emptyStarIcon",void 0);kt([(0,Ie.property)()],J.prototype,"filledStarIcon",void 0);kt([(0,Ie.property)()],J.prototype,"emptyLikeIcon",void 0);kt([(0,Ie.property)()],J.prototype,"filledLikeIcon",void 0);kt([(0,Ie.property)()],J.prototype,"emptyDislikeIcon",void 0);kt([(0,Ie.property)()],J.prototype,"filledDislikeIcon",void 0);kt([(0,Ie.query)("ft-viewer-feedback")],J.prototype,"viewerFeedback",void 0);kt([$o(vs.properties["mail.file_feedback.subject"](e=>{var t,r;return[((t=e.document)===null||t===void 0?void 0:t.title)||"Document",((r=e.document)===null||r===void 0?void 0:r.filename)||"Filename"]}))],J.prototype,"mailSubject",void 0);kt([(0,Gt.redux)({store:"viewer",selector:({descriptor:e})=>e?.displayName})],J.prototype,"displayName",void 0);var hf=u(g());var bs=class extends jt(hf.FtLitElementRedux){};var be=u(g()),De=u(N());var mf=u(A());var gf=mf.css`
|
|
1811
1769
|
:host {
|
|
1812
1770
|
display: inline-block;
|
|
1813
1771
|
}
|
|
@@ -1827,7 +1785,7 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1827
1785
|
all: unset;
|
|
1828
1786
|
position: relative;
|
|
1829
1787
|
}
|
|
1830
|
-
`;var
|
|
1788
|
+
`;var xs=u(A()),Rt=u(N()),Sf=u(ee()),ji=u(g());var Ln=u(A()),D=u(g());var vf=D.FtCssVariableFactory.extend("--ft-chip-color","",D.designSystemVariables.colorOnSurface),qt={backgroundColor:D.FtCssVariableFactory.extend("--ft-chip-background-color","",D.designSystemVariables.colorSurface),color:vf,fontSize:D.FtCssVariableFactory.extend("--ft-chip-font-size","",de.fontSize),fontWeight:D.FtCssVariableFactory.extend("--ft-chip-font-weight","",de.fontWeight),iconSize:D.FtCssVariableFactory.create("--ft-chip-icon-size","","SIZE","18px"),borderRadius:D.FtCssVariableFactory.create("--ft-chip-border-radius","","SIZE",""),rippleColor:D.FtCssVariableFactory.extend("--ft-chip-ripple-color","",vf),horizontalPadding:D.FtCssVariableFactory.create("--ft-chip-horizontal-padding","","SIZE","6px"),verticalPadding:D.FtCssVariableFactory.create("--ft-chip-vertical-padding","","SIZE","6px"),borderColor:D.FtCssVariableFactory.extend("--ft-chip-border-color","",D.designSystemVariables.colorOutline),opacityDisabled:D.FtCssVariableFactory.external(D.designSystemVariables.colorOpacityDisabled,"Design system")},yf=D.FtCssVariableFactory.extend("--ft-chip-highlighted-color","",D.FtCssVariableFactory.extend("--ft-chip-color","",D.designSystemVariables.colorOnPrimary)),tl={backgroundColor:D.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color","",D.FtCssVariableFactory.extend("--ft-chip-background-color","",D.designSystemVariables.colorPrimary)),color:yf,rippleColor:D.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color","",yf)},bf={horizontalPadding:D.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","","SIZE","4px"),verticalPadding:D.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","","SIZE","4px")},xf=[D.noTextSelect,Ln.css`
|
|
1831
1789
|
:host {
|
|
1832
1790
|
display: inline-block;
|
|
1833
1791
|
max-width: 100%;
|
|
@@ -1843,21 +1801,21 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1843
1801
|
box-sizing: border-box;
|
|
1844
1802
|
pointer-events: auto;
|
|
1845
1803
|
|
|
1846
|
-
--chip-internal-font-size: ${
|
|
1847
|
-
--chip-internal-font-weight: ${
|
|
1804
|
+
--chip-internal-font-size: ${qt.fontSize};
|
|
1805
|
+
--chip-internal-font-weight: ${qt.fontWeight};
|
|
1848
1806
|
--chip-internal-line-height: max(20px, calc(var(--chip-internal-font-size) + 2px));
|
|
1849
|
-
${(0,
|
|
1850
|
-
--chip-internal-vertical-padding: ${
|
|
1851
|
-
--chip-internal-horizontal-padding: ${
|
|
1807
|
+
${(0,D.setVariable)(ft.size,qt.iconSize)};
|
|
1808
|
+
--chip-internal-vertical-padding: ${qt.verticalPadding};
|
|
1809
|
+
--chip-internal-horizontal-padding: ${qt.horizontalPadding};
|
|
1852
1810
|
--chip-internal-icon-padding: 3px;
|
|
1853
|
-
--chip-internal-content-height: max(var(--chip-internal-line-height), ${
|
|
1811
|
+
--chip-internal-content-height: max(var(--chip-internal-line-height), ${qt.iconSize});
|
|
1854
1812
|
|
|
1855
|
-
border: 1px solid ${
|
|
1856
|
-
color: ${
|
|
1857
|
-
${(0,
|
|
1858
|
-
border-radius: var(${(0
|
|
1813
|
+
border: 1px solid ${qt.borderColor};
|
|
1814
|
+
color: ${qt.color};
|
|
1815
|
+
${(0,D.setVariable)(K.color,qt.rippleColor)};
|
|
1816
|
+
border-radius: var(${(0,Ln.unsafeCSS)(qt.borderRadius.name)}, calc(var(--chip-internal-content-height) / 2 + var(--chip-internal-vertical-padding)));
|
|
1859
1817
|
padding: calc(var(--chip-internal-vertical-padding) - 1px) calc(var(--chip-internal-horizontal-padding) - 1px);
|
|
1860
|
-
background-color: ${
|
|
1818
|
+
background-color: ${qt.backgroundColor};
|
|
1861
1819
|
line-height: var(--chip-internal-content-height);
|
|
1862
1820
|
}
|
|
1863
1821
|
|
|
@@ -1867,28 +1825,28 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1867
1825
|
|
|
1868
1826
|
.ft-chip--dense {
|
|
1869
1827
|
--chip-internal-icon-padding: 3px;
|
|
1870
|
-
--chip-internal-vertical-padding: ${
|
|
1871
|
-
--chip-internal-horizontal-padding: ${
|
|
1828
|
+
--chip-internal-vertical-padding: ${bf.verticalPadding};
|
|
1829
|
+
--chip-internal-horizontal-padding: ${bf.horizontalPadding};
|
|
1872
1830
|
--chip-internal-line-height: max(16px, calc(var(--chip-internal-font-size) + 2px));
|
|
1873
1831
|
}
|
|
1874
1832
|
|
|
1875
1833
|
.ft-chip--no-content {
|
|
1876
|
-
--chip-internal-horizontal-padding: ${
|
|
1834
|
+
--chip-internal-horizontal-padding: ${qt.horizontalPadding.get(Ln.css`var(--chip-internal-vertical-padding)`)};
|
|
1877
1835
|
}
|
|
1878
1836
|
|
|
1879
1837
|
.ft-chip--disabled {
|
|
1880
1838
|
cursor: default;
|
|
1881
1839
|
pointer-events: none;
|
|
1882
1840
|
filter: grayscale(1);
|
|
1883
|
-
opacity: ${
|
|
1841
|
+
opacity: ${qt.opacityDisabled};
|
|
1884
1842
|
}
|
|
1885
1843
|
|
|
1886
1844
|
.ft-chip--highlighted {
|
|
1887
1845
|
border: none;
|
|
1888
1846
|
padding: var(--chip-internal-vertical-padding) var(--chip-internal-horizontal-padding);
|
|
1889
|
-
background-color: ${
|
|
1890
|
-
${(0,
|
|
1891
|
-
color: ${
|
|
1847
|
+
background-color: ${tl.backgroundColor};
|
|
1848
|
+
${(0,D.setVariable)(K.color,tl.rippleColor)};
|
|
1849
|
+
color: ${tl.color};
|
|
1892
1850
|
}
|
|
1893
1851
|
|
|
1894
1852
|
.ft-chip--clickable {
|
|
@@ -1897,7 +1855,7 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1897
1855
|
}
|
|
1898
1856
|
|
|
1899
1857
|
.ft-chip:focus {
|
|
1900
|
-
outline: 2px solid ${
|
|
1858
|
+
outline: 2px solid ${D.designSystemVariables.colorPrimary};
|
|
1901
1859
|
outline-offset: 2px;
|
|
1902
1860
|
}
|
|
1903
1861
|
|
|
@@ -1919,9 +1877,9 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1919
1877
|
}
|
|
1920
1878
|
|
|
1921
1879
|
.ft-chip--icon-button {
|
|
1922
|
-
${(0,
|
|
1923
|
-
${(0,
|
|
1924
|
-
${(0,
|
|
1880
|
+
${(0,D.setVariable)(V.iconSize,qt.iconSize)};
|
|
1881
|
+
${(0,D.setVariable)(V.horizontalPadding,"var(--chip-internal-icon-padding)")};
|
|
1882
|
+
${(0,D.setVariable)(V.verticalPadding,"var(--chip-internal-icon-padding)")};
|
|
1925
1883
|
margin: calc((-1) * var(--chip-internal-icon-padding));
|
|
1926
1884
|
}
|
|
1927
1885
|
|
|
@@ -1929,9 +1887,9 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1929
1887
|
vertical-align: bottom;
|
|
1930
1888
|
display: block;
|
|
1931
1889
|
margin: 0 var(--chip-internal-horizontal-padding);
|
|
1932
|
-
${(0,
|
|
1933
|
-
${(0,
|
|
1934
|
-
${(0,
|
|
1890
|
+
${(0,D.setVariable)(de.fontSize,"var(--chip-internal-font-size)")};
|
|
1891
|
+
${(0,D.setVariable)(de.fontWeight,"var(--chip-internal-font-weight)")};
|
|
1892
|
+
${(0,D.setVariable)(de.lineHeight,"var(--chip-internal-content-height)")};
|
|
1935
1893
|
}
|
|
1936
1894
|
|
|
1937
1895
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -1967,8 +1925,8 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1967
1925
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-button {
|
|
1968
1926
|
order: -1;
|
|
1969
1927
|
}
|
|
1970
|
-
`];var
|
|
1971
|
-
<div class="${(0,
|
|
1928
|
+
`];var Ft=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ss=class extends CustomEvent{constructor(){super("icon-click")}},it=class extends ji.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.iconLabel="",this.hideIconTooltip=!1,this.icon=void 0,this.trailingIcon=!1}render(){var t;let r={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":ji.isSafari};return xs.html`
|
|
1929
|
+
<div class="${(0,Sf.classMap)(r)}"
|
|
1972
1930
|
aria-label="${this.getLabel()}"
|
|
1973
1931
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
1974
1932
|
@keyup=${this.onKeyUp}
|
|
@@ -1979,7 +1937,7 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1979
1937
|
</ft-typography>
|
|
1980
1938
|
${this.internalIcon?this.renderIcon():null}
|
|
1981
1939
|
</div>
|
|
1982
|
-
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?
|
|
1940
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return this.interactionsOnIcon?xs.html`
|
|
1983
1941
|
<ft-button round
|
|
1984
1942
|
class="ft-chip--icon-button"
|
|
1985
1943
|
@click=${this.onIconClick}
|
|
@@ -1990,11 +1948,11 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
1990
1948
|
part="icon-button"
|
|
1991
1949
|
?hideTooltip=${this.hideIconTooltip}
|
|
1992
1950
|
></ft-button>
|
|
1993
|
-
`:
|
|
1951
|
+
`:xs.html`
|
|
1994
1952
|
<div class="ft-chip--icon-container ft-no-text-select" part="icon-container">
|
|
1995
1953
|
<ft-icon .variant=${this.iconVariant} .value=${this.internalIcon} part="icon"></ft-icon>
|
|
1996
1954
|
</div>
|
|
1997
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
1955
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Ss))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Ss))}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,ji.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"close":void 0)}};it.elementDefinitions={"ft-ripple":M,"ft-typography":U,"ft-icon":H,"ft-button":k};it.styles=xf;Ft([(0,Rt.property)({type:Boolean})],it.prototype,"highlighted",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"removable",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"disabled",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"clickable",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"iconClickable",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"dense",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"multiLine",void 0);Ft([(0,Rt.property)()],it.prototype,"label",void 0);Ft([(0,Rt.property)()],it.prototype,"iconLabel",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"hideIconTooltip",void 0);Ft([(0,Rt.property)()],it.prototype,"icon",void 0);Ft([(0,Rt.property)()],it.prototype,"iconVariant",void 0);Ft([(0,Rt.property)({type:Boolean})],it.prototype,"trailingIcon",void 0);Ft([(0,Rt.property)()],it.prototype,"typographyVariant",void 0);Ft([(0,Rt.query)("ft-typography slot")],it.prototype,"slottedContent",void 0);var Af=u(g());var wf={"ft-chip":it};(0,Af.customElements)(wf);var Rf=u(A()),wt=u(N()),Ki=u(g());var Lf=u(ee());var Pn=u(A()),Wi=u(N()),Es=u(g());var Ef=u(A()),ws=u(g()),Am={iconColor:ws.FtCssVariableFactory.extend("--ft-floating-menu-icon-color","",ws.designSystemVariables.colorOnSurfaceMedium)},Cf=Ef.css`
|
|
1998
1956
|
.ft-floating-menu-item {
|
|
1999
1957
|
cursor: pointer;
|
|
2000
1958
|
display: flex;
|
|
@@ -2014,7 +1972,7 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
2014
1972
|
}
|
|
2015
1973
|
|
|
2016
1974
|
.ft-floating-menu-item ft-icon {
|
|
2017
|
-
color: ${
|
|
1975
|
+
color: ${Am.iconColor};
|
|
2018
1976
|
margin-left: 0;
|
|
2019
1977
|
flex-shrink: 0;
|
|
2020
1978
|
flex-grow: 0;
|
|
@@ -2029,8 +1987,8 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
2029
1987
|
word-break: break-word;
|
|
2030
1988
|
hyphens: auto;
|
|
2031
1989
|
}
|
|
2032
|
-
`;var
|
|
2033
|
-
<div class="${(0,
|
|
1990
|
+
`;var _f=u(ee()),zi=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},As=class extends CustomEvent{constructor(t){super("ft-floating-menu-item-select",{detail:t,bubbles:!0,composed:!0})}},It=class extends Es.FtLitElement{constructor(){super(...arguments),this.value="",this.notFocusable=!1,this.disabled=!1}get floatingClasses(){return{"ft-floating-menu-item":!0,"ft-floating-menu-item--disabled":this.disabled}}render(){return Pn.html`
|
|
1991
|
+
<div class="${(0,_f.classMap)(this.floatingClasses)}"
|
|
2034
1992
|
tabindex="${this.notFocusable||this.disabled?"-1":"0"}"
|
|
2035
1993
|
aria-disabled="${this.disabled}"
|
|
2036
1994
|
@keydown=${t=>this.onKeyDown(t)}
|
|
@@ -2038,16 +1996,16 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
2038
1996
|
<ft-ripple
|
|
2039
1997
|
?disabled=${this.disabled}
|
|
2040
1998
|
></ft-ripple>
|
|
2041
|
-
${this.icon?
|
|
1999
|
+
${this.icon?Pn.html`
|
|
2042
2000
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
2043
|
-
`:
|
|
2044
|
-
<ft-typography variant="${
|
|
2001
|
+
`:Pn.nothing}
|
|
2002
|
+
<ft-typography variant="${B.body2}">
|
|
2045
2003
|
<slot></slot>
|
|
2046
2004
|
</ft-typography>
|
|
2047
2005
|
</div>
|
|
2048
|
-
`}onClick(t){this.disabled?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.dispatchEvent(new
|
|
2006
|
+
`}onClick(t){this.disabled?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()):this.dispatchEvent(new As(this.value))}onKeyDown(t){(t.key=="Enter"||t.key==" ")&&(t.preventDefault(),this.dispatchEvent(new As(this.value)))}};It.elementDefinitions={"ft-icon":H,"ft-ripple":M,"ft-typography":U};It.styles=Cf;zi([(0,Wi.property)()],It.prototype,"iconVariant",void 0);zi([(0,Wi.property)()],It.prototype,"icon",void 0);zi([(0,Wi.property)()],It.prototype,"value",void 0);zi([(0,Wi.property)({type:Boolean})],It.prototype,"notFocusable",void 0);zi([(0,Wi.property)({type:Boolean})],It.prototype,"disabled",void 0);zi([(0,Es.ignoreComposingEvents)()],It.prototype,"onKeyDown",null);var Tf=u(A()),oe=u(g()),Cr={zIndex:oe.FtCssVariableFactory.create("--ft-floating-menu-z-index","","NUMBER","8"),maxWidth:oe.FtCssVariableFactory.create("--ft-floating-menu-max-width","","SIZE","300px"),maxHeight:oe.FtCssVariableFactory.create("--ft-floating-menu-max-height","","SIZE","500px"),textColor:oe.FtCssVariableFactory.extend("--ft-floating-menu-text-color","",oe.designSystemVariables.colorOnSurfaceHigh),colorSurface:oe.FtCssVariableFactory.external(oe.designSystemVariables.colorSurface,"Design system"),menuElevation:oe.FtCssVariableFactory.external(oe.designSystemVariables.elevation02,"Design system"),borderRadiusS:oe.FtCssVariableFactory.external(oe.designSystemVariables.borderRadiusS,"Design system")},Of=Tf.css`
|
|
2049
2007
|
.ft-floating-menu {
|
|
2050
|
-
color: ${
|
|
2008
|
+
color: ${Cr.textColor};
|
|
2051
2009
|
display: contents;
|
|
2052
2010
|
}
|
|
2053
2011
|
|
|
@@ -2064,20 +2022,20 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
2064
2022
|
display: none;
|
|
2065
2023
|
position: relative;
|
|
2066
2024
|
overflow: auto;
|
|
2067
|
-
max-width: ${
|
|
2068
|
-
max-height: ${
|
|
2069
|
-
box-shadow: ${
|
|
2070
|
-
background-color: ${
|
|
2071
|
-
border-radius: ${
|
|
2072
|
-
color: ${
|
|
2073
|
-
z-index: ${
|
|
2025
|
+
max-width: ${Cr.maxWidth};
|
|
2026
|
+
max-height: ${Cr.maxHeight};
|
|
2027
|
+
box-shadow: ${Cr.menuElevation};
|
|
2028
|
+
background-color: ${Cr.colorSurface};
|
|
2029
|
+
border-radius: ${Cr.borderRadiusS};
|
|
2030
|
+
color: ${Cr.textColor};
|
|
2031
|
+
z-index: ${Cr.zIndex};
|
|
2074
2032
|
}
|
|
2075
2033
|
|
|
2076
2034
|
.ft-floating-menu--open .ft-floating-menu--options {
|
|
2077
2035
|
display: block;
|
|
2078
2036
|
}
|
|
2079
|
-
`;var
|
|
2080
|
-
<div part="container" class="${(0,
|
|
2037
|
+
`;var Dt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Cs=class extends CustomEvent{constructor(t){super("change",{detail:{open:t}})}};var _s=class extends CustomEvent{constructor(t){super("select",{detail:t})}},Q=class extends Ki.FtLitElement{constructor(){super(...arguments),this.horizontalAlignment="left",this.verticalAlignment="bottom",this.closeMenuMatchers=[],this.primary=!1,this.icon="SHORTCUT_MENU",this.iconVariant=Pt.fluid_topics,this.disabled=!1,this.menuOpen=!1,this.forceMenuOpen=!1,this.hideOptionsOnClickOutside=t=>{this.menuOpen=this.menuOpen&&t.composedPath().includes(this.container)}}updated(t){super.updated(t),t.has("menuOpen")&&this.dispatchEvent(new Cs(this.menuOpen))}render(){let t={"ft-floating-menu":!0,"ft-floating-menu--open":this.forceMenuOpen||this.menuOpen,["ft-floating-menu--"+this.horizontalAlignment.toLowerCase()]:!0,["ft-floating-menu--"+this.verticalAlignment.toLowerCase()]:!0};return Rf.html`
|
|
2038
|
+
<div part="container" class="${(0,Lf.classMap)(t)}" @keydown=${this.onKeyDown}>
|
|
2081
2039
|
<slot name="toggle"
|
|
2082
2040
|
part="toggle"
|
|
2083
2041
|
@click=${this.toggleMenu}
|
|
@@ -2107,7 +2065,7 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
2107
2065
|
</div>
|
|
2108
2066
|
</div>
|
|
2109
2067
|
</div>
|
|
2110
|
-
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onItemSelect(t){t.stopPropagation(),this.dispatchEvent(new
|
|
2068
|
+
`}toggleMenu(){this.menuOpen=!this.menuOpen}openMenu(){this.menuOpen=!0}closeMenu(){this.menuOpen=!1}onCloseEvent(t){t.stopPropagation(),this.closeMenu()}onItemSelect(t){t.stopPropagation(),this.dispatchEvent(new _s(t.detail)),this.closeMenu()}onContentClick(t){(0,Ki.eventPathContainsMatchingElement)(t,this.closeMenuMatchers,this)&&this.closeMenu()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptionsOnClickOutside)}contentAvailableCallback(t){super.contentAvailableCallback(t),t.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 t=this.customToggle.length>0?this.customToggle[0]:this.actionButton,{x:r,y:i}=await rs(t,this.menuWrapper,this.convertPlacement());this.menuWrapper.style.left=`${r}px`,this.menuWrapper.style.top=`${i}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(t){t.key=="Escape"&&(this.closeMenu(),t.stopPropagation())}};Q.elementDefinitions={"ft-floating-menu-item":It,"ft-button":k};Q.styles=Of;Dt([(0,wt.property)()],Q.prototype,"horizontalAlignment",void 0);Dt([(0,wt.property)()],Q.prototype,"verticalAlignment",void 0);Dt([(0,Ki.jsonProperty)([])],Q.prototype,"closeMenuMatchers",void 0);Dt([(0,wt.property)({type:Boolean})],Q.prototype,"primary",void 0);Dt([(0,wt.property)()],Q.prototype,"label",void 0);Dt([(0,wt.property)()],Q.prototype,"tooltipPosition",void 0);Dt([(0,wt.property)()],Q.prototype,"icon",void 0);Dt([(0,wt.property)()],Q.prototype,"iconVariant",void 0);Dt([(0,wt.property)()],Q.prototype,"text",void 0);Dt([(0,wt.property)({type:Boolean})],Q.prototype,"disabled",void 0);Dt([(0,wt.state)()],Q.prototype,"menuOpen",void 0);Dt([(0,wt.state)()],Q.prototype,"forceMenuOpen",void 0);Dt([(0,wt.query)(".ft-floating-menu")],Q.prototype,"container",void 0);Dt([(0,wt.query)(".ft-floating-menu--wrapper")],Q.prototype,"menuWrapper",void 0);Dt([(0,wt.query)("#actions-button")],Q.prototype,"actionButton",void 0);Dt([(0,wt.queryAssignedElements)({slot:"toggle"})],Q.prototype,"customToggle",void 0);var Pf=u(A()),Ts=u(g()),Em={color:Ts.FtCssVariableFactory.extend("--ft-floating-menu-label-color","",Ts.designSystemVariables.colorOnSurfaceMedium)},kf=Pf.css`
|
|
2111
2069
|
.ft-floating-menu-label {
|
|
2112
2070
|
padding: 4px 8px;
|
|
2113
2071
|
}
|
|
@@ -2118,44 +2076,44 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
2118
2076
|
width: max-content;
|
|
2119
2077
|
text-overflow: ellipsis;
|
|
2120
2078
|
overflow: hidden;
|
|
2121
|
-
color: ${
|
|
2079
|
+
color: ${Em.color}
|
|
2122
2080
|
}
|
|
2123
|
-
`;var
|
|
2081
|
+
`;var If=u(A()),Df=u(g());var _r=class extends Df.FtLitElement{render(){return If.html`
|
|
2124
2082
|
<div class="ft-floating-menu-label">
|
|
2125
|
-
<ft-typography variant="${
|
|
2083
|
+
<ft-typography variant="${B.caption}">
|
|
2126
2084
|
<slot></slot>
|
|
2127
2085
|
</ft-typography>
|
|
2128
2086
|
</div>
|
|
2129
|
-
`}};
|
|
2087
|
+
`}};_r.elementDefinitions={"ft-typography":U};_r.styles=kf;var $f=u(g());var Mf={"ft-floating-menu":Q,"ft-floating-menu-item":It,"ft-floating-menu-label":_r};(0,$f.customElements)(Mf);var Yt=u(A()),Uf=u(xi());var kn=u(g());function Cm(e){var t;return((t=(0,kn.accessResult)(e))===null||t===void 0?void 0:t.openMode)===Xn.EXTERNAL}function Nf(e){return Cm(e)?(0,kn.accessResult)(e).originUrl:(0,kn.accessResultUrl)(e)}var In=class{constructor(t){this.contentLocales=t}localize(t){var r,i;return t?.key!=="ft:locale"?t:{...t,displayValue:(r=this.findLocaleValue(t))!==null&&r!==void 0?r:t.displayValue,displayTooltipValue:(i=this.findLocaleValue(t))!==null&&i!==void 0?i:t.displayTooltipValue}}findLocaleValue(t){var r;return(r=this.contentLocales.find(i=>i.lang===t.value))===null||r===void 0?void 0:r.label}};var Vt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ut=class extends rc(he(bs)){get metadataValue(){return this.flatMetadata?this.flatMetadata.displayValue:this.editorMode?this.key?`no value for ${this.key}`:"no metadata selected":this.noValueMessage}get metadataLabel(){var t,r,i,n,o,s;return this.metadata?this.metadata.label:(s=(n=(i=(r=(t=this.viewerStateManager)===null||t===void 0?void 0:t.clusteringHelper)===null||r===void 0?void 0:r.getMetadataDescriptor(this.key))===null||i===void 0?void 0:i.label)!==null&&n!==void 0?n:(o=this.relatives.find(a=>a.metadata.value))===null||o===void 0?void 0:o.metadata.label)!==null&&s!==void 0?s:this.key}setUdvStateManager(t){super.setUdvStateManager(t),this.key&&this.useForSwitchingToRelatives&&t.registerMetadataForSwitchToRelatives(this.key)}constructor(){super(),this.multiLine=!1,this.useForSwitchingToRelatives=!1,this.displayLabel=!1,this.hierarchicalValueTruncatingLevel=3,this.forceTooltip=!1,this.editorMode=!1,this.translateValues=!1,this.relatives=[],this.noValueMessage="No value",this.addI18nContext(Mi)}willUpdate(t){var r,i,n,o,s;super.willUpdate(t),t.has("key")&&this.useForSwitchingToRelatives&&(t.get("key")&&((r=this.viewerStateManager)===null||r===void 0||r.unregisterMetadataForSwitchToRelatives(t.get("key"))),this.key&&((i=this.viewerStateManager)===null||i===void 0||i.registerMetadataForSwitchToRelatives(this.key))),t.has("useForSwitchingToRelatives")&&this.key&&(this.useForSwitchingToRelatives?(n=this.viewerStateManager)===null||n===void 0||n.registerMetadataForSwitchToRelatives(this.key):(o=this.viewerStateManager)===null||o===void 0||o.unregisterMetadataForSwitchToRelatives(this.key)),(t.has("translateValues")||t.has("metadata")||t.has("hierarchicalValueTruncatingLevel")||t.has("availableContentLocales")||this.dateFormatOptionsChanged(t))&&(this.flatMetadata=this.metadata?be.ClusteringHelper.flattenMetadata(this.metadata,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.metadata.key)):void 0,this.translateValues&&(this.flatMetadata=new In((s=this.availableContentLocales)!==null&&s!==void 0?s:[]).localize(this.flatMetadata)))}updateRelatives(){var t,r,i,n;this.useForSwitchingToRelatives&&this.key?this.relatives=(n=(r=(t=this.viewerStateManager)===null||t===void 0?void 0:t.clusteringHelper)===null||r===void 0?void 0:r.computeClustersItemsForMetadata(this.key,((i=this.document)===null||i===void 0?void 0:i.lang)||"en",this.noValueMessage,this.hierarchicalValueTruncatingLevel,this.getDateFormatter(this.key)))!==null&&n!==void 0?n:[]:this.relatives=[]}render(){return Yt.html`
|
|
2130
2088
|
${this.useForSwitchingToRelatives&&this.relatives.length>0?this.renderSwitchToRelatives():this.renderChip()}
|
|
2131
2089
|
${this.hideIfEmpty()}
|
|
2132
|
-
`}hideIfEmpty(){let t=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&t?
|
|
2090
|
+
`}hideIfEmpty(){let t=this.flatMetadata==null&&(this.useForSwitchingToRelatives?this.relatives.length===0:!0);return!this.editorMode&&t?Yt.html`
|
|
2133
2091
|
<style>
|
|
2134
2092
|
:host {
|
|
2135
2093
|
display: none !important;
|
|
2136
2094
|
}
|
|
2137
2095
|
</style>
|
|
2138
|
-
`:
|
|
2096
|
+
`:Yt.nothing}renderSwitchToRelatives(){return Yt.html`
|
|
2139
2097
|
<div part="floating-menu-container" class="ft-ud-viewer-metadata--container">
|
|
2140
2098
|
<ft-floating-menu part="floating-menu" text="Toggle collapsible" trailingIcon>
|
|
2141
2099
|
${this.renderChip(!0)}
|
|
2142
2100
|
<ft-floating-menu-label>${this.metadataLabel}</ft-floating-menu-label>
|
|
2143
|
-
${(0,
|
|
2101
|
+
${(0,Uf.repeat)(this.relatives,t=>t.metadata.value,t=>this.renderRelativeItem(t.result,t.metadata))}
|
|
2144
2102
|
</ft-floating-menu>
|
|
2145
2103
|
</div>
|
|
2146
|
-
`}renderRelativeItem(t,r){var i,n;let o=this.translateValues&&(n=new
|
|
2104
|
+
`}renderRelativeItem(t,r){var i,n;let o=this.translateValues&&(n=new In((i=this.availableContentLocales)!==null&&i!==void 0?i:[]).localize(r))!==null&&n!==void 0?n:r,s=Nf(t);return Yt.html`
|
|
2147
2105
|
<a part="relative-item-link"
|
|
2148
2106
|
href="${s}" >
|
|
2149
2107
|
<ft-ripple part="relative-item-ripple"></ft-ripple>
|
|
2150
2108
|
<ft-floating-menu-item part="relative-item" value="${o.value}" notFocusable>
|
|
2151
|
-
${o.value==null||o.value===o.displayValue?o.displayValue:
|
|
2109
|
+
${o.value==null||o.value===o.displayValue?o.displayValue:Yt.html`
|
|
2152
2110
|
<ft-tooltip part="relative-item-tooltip" text="${o.value}">
|
|
2153
2111
|
${o.displayValue}
|
|
2154
2112
|
</ft-tooltip>
|
|
2155
2113
|
`}
|
|
2156
2114
|
</ft-floating-menu-item>
|
|
2157
2115
|
</a>
|
|
2158
|
-
`}renderChip(t=!1){var r,i,n,o,s,a;let l=!this.forceTooltip&&this.displayLabel&&((r=this.flatMetadata)===null||r===void 0?void 0:r.displayTooltipValue)==((i=this.flatMetadata)===null||i===void 0?void 0:i.displayValue),c=`${this.metadataLabel}: ${(o=(n=this.flatMetadata)===null||n===void 0?void 0:n.displayTooltipValue)!==null&&o!==void 0?o:this.noValueMessage}`,d=
|
|
2116
|
+
`}renderChip(t=!1){var r,i,n,o,s,a;let l=!this.forceTooltip&&this.displayLabel&&((r=this.flatMetadata)===null||r===void 0?void 0:r.displayTooltipValue)==((i=this.flatMetadata)===null||i===void 0?void 0:i.displayValue),c=`${this.metadataLabel}: ${(o=(n=this.flatMetadata)===null||n===void 0?void 0:n.displayTooltipValue)!==null&&o!==void 0?o:this.noValueMessage}`,d=Yt.html`
|
|
2159
2117
|
<ft-chip part="chip"
|
|
2160
2118
|
exportpartsPrefix="chip"
|
|
2161
2119
|
label="${c}"
|
|
@@ -2163,20 +2121,20 @@ ${Cs.messages["mail.feedback.disclaimer"]()}`);return`mailto:${(r=this.configura
|
|
|
2163
2121
|
trailingIcon icon="${t?"thin_arrow":""}"
|
|
2164
2122
|
?clickable=${t}
|
|
2165
2123
|
?multiLine=${this.multiLine}>
|
|
2166
|
-
${this.displayLabel?
|
|
2124
|
+
${this.displayLabel?Yt.html`
|
|
2167
2125
|
<span part="label">${(a=(s=this.metadata)===null||s===void 0?void 0:s.label)!==null&&a!==void 0?a:this.key}: </span>
|
|
2168
|
-
`:
|
|
2169
|
-
${this.metadataValue.length===0?
|
|
2126
|
+
`:Yt.nothing}
|
|
2127
|
+
${this.metadataValue.length===0?Yt.nothing:Yt.html`
|
|
2170
2128
|
<span part="values">${this.metadataValue}</span>
|
|
2171
2129
|
`}
|
|
2172
|
-
</ft-chip>`;return l?d:
|
|
2130
|
+
</ft-chip>`;return l?d:Yt.html`
|
|
2173
2131
|
<ft-tooltip part="tooltip"
|
|
2174
2132
|
slot="${t?"toggle":""}"
|
|
2175
2133
|
class="${this.multiLine?"ft-ud-viewer-metadata-multi-line":""}"
|
|
2176
2134
|
text="${c}">
|
|
2177
2135
|
${d}
|
|
2178
2136
|
</ft-tooltip>
|
|
2179
|
-
`}};ut.elementDefinitions={"ft-chip":it,"ft-floating-menu":Q,"ft-floating-menu-item"
|
|
2137
|
+
`}};ut.elementDefinitions={"ft-chip":it,"ft-floating-menu":Q,"ft-floating-menu-item":It,"ft-floating-menu-label":_r,"ft-ripple":M,"ft-tooltip":rt};ut.styles=gf;Vt([(0,De.property)(),(0,be.reduxReactive)()],ut.prototype,"key",void 0);Vt([(0,De.property)({type:Boolean})],ut.prototype,"multiLine",void 0);Vt([(0,De.property)({type:Boolean})],ut.prototype,"useForSwitchingToRelatives",void 0);Vt([(0,De.property)({type:Boolean})],ut.prototype,"displayLabel",void 0);Vt([(0,be.numberProperty)()],ut.prototype,"hierarchicalValueTruncatingLevel",void 0);Vt([(0,De.property)({type:Boolean})],ut.prototype,"forceTooltip",void 0);Vt([(0,De.property)({attribute:!1})],ut.prototype,"editorMode",void 0);Vt([(0,De.property)({type:Boolean})],ut.prototype,"translateValues",void 0);Vt([(0,be.redux)({store:"viewer",selector:(e,t)=>{var r,i;return(i=(r=e.document)===null||r===void 0?void 0:r.metadata)===null||i===void 0?void 0:i.find(n=>n.key===t.key)}})],ut.prototype,"metadata",void 0);Vt([(0,De.state)()],ut.prototype,"flatMetadata",void 0);Vt([(0,be.redux)({store:"viewer"})],ut.prototype,"document",void 0);Vt([(0,De.state)()],ut.prototype,"relatives",void 0);Vt([(0,be.redux)({store:w.name})],ut.prototype,"availableContentLocales",void 0);Vt([$o(Mi.properties.itemWithNoValueForSwitchToRelatives())],ut.prototype,"noValueMessage",void 0);Vt([(0,be.reduxEventListener)({eventName:vr.clusteringHelperCreated})],ut.prototype,"updateRelatives",null);var Ff={"ft-asset-viewer-content":yo,"ft-asset-viewer-context":Ye,"ft-asset-viewer-document-title":Eo,"ft-asset-viewer-filename":bo,"ft-asset-viewer-mime-type-icon":Ao,"ft-asset-viewer-title":xo,"ft-ud-viewer-attachments":qr,"ft-ud-viewer-content":Ro,"ft-ud-viewer-context":br,"ft-ud-viewer-filename":Lo,"ft-ud-viewer-metadata":ut,"ft-ud-viewer-mime-type-icon":ko,"ft-ud-viewer-title":Po,"ft-ud-viewer-feedback":J};(0,Vf.customElements)(Ff);})();
|
|
2180
2138
|
/*! Bundled license information:
|
|
2181
2139
|
|
|
2182
2140
|
@lit/context/lib/context-request-event.js:
|