@fluid-topics/ft-search-selected-facets 1.1.94 → 1.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Cd=Object.create;var Hi=Object.defineProperty;var Ed=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var Ad=Object.getPrototypeOf,Rd=Object.prototype.hasOwnProperty;var qt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Nd=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wd(e))!Rd.call(t,i)&&i!==o&&Hi(t,i,{get:()=>e[i],enumerable:!(n=Ed(e,i))||n.enumerable});return t};var h=(t,e,o)=>(o=t!=null?Cd(Ad(t)):{},Nd(e||!t||!t.__esModule?Hi(o,"default",{value:t,enumerable:!0}):o,t));var w=qt((Yp,Vi)=>{Vi.exports=ftGlobals.wcUtils});var I=qt((Xp,ji)=>{ji.exports=ftGlobals.lit});var wn=qt((Qp,Gi)=>{Gi.exports=ftGlobals.litRepeat});var H=qt((ef,Yi)=>{Yi.exports=ftGlobals.litDecorators});var ea=qt(Ji=>{(function(t){var e=function(o){var n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(m){return m&&DataView.prototype.isPrototypeOf(m)}if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(m){return m&&a.indexOf(Object.prototype.toString.call(m))>-1};function l(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}function p(m){return typeof m!="string"&&(m=String(m)),m}function f(m){var v={next:function(){var L=m.shift();return{done:L===void 0,value:L}}};return n.iterable&&(v[Symbol.iterator]=function(){return v}),v}function u(m){this.map={},m instanceof u?m.forEach(function(v,L){this.append(L,v)},this):Array.isArray(m)?m.forEach(function(v){this.append(v[0],v[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(v){this.append(v,m[v])},this)}u.prototype.append=function(m,v){m=l(m),v=p(v);var L=this.map[m];this.map[m]=L?L+", "+v:v},u.prototype.delete=function(m){delete this.map[l(m)]},u.prototype.get=function(m){return m=l(m),this.has(m)?this.map[m]:null},u.prototype.has=function(m){return this.map.hasOwnProperty(l(m))},u.prototype.set=function(m,v){this.map[l(m)]=p(v)},u.prototype.forEach=function(m,v){for(var L in this.map)this.map.hasOwnProperty(L)&&m.call(v,this.map[L],L,this)},u.prototype.keys=function(){var m=[];return this.forEach(function(v,L){m.push(L)}),f(m)},u.prototype.values=function(){var m=[];return this.forEach(function(v){m.push(v)}),f(m)},u.prototype.entries=function(){var m=[];return this.forEach(function(v,L){m.push([L,v])}),f(m)},n.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);function y(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function g(m){return new Promise(function(v,L){m.onload=function(){v(m.result)},m.onerror=function(){L(m.error)}})}function x(m){var v=new FileReader,L=g(v);return v.readAsArrayBuffer(m),L}function b(m){var v=new FileReader,L=g(v);return v.readAsText(m),L}function S(m){for(var v=new Uint8Array(m),L=new Array(v.length),
|
|
1
|
+
"use strict";(()=>{var Cd=Object.create;var Hi=Object.defineProperty;var Ed=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var Ad=Object.getPrototypeOf,Rd=Object.prototype.hasOwnProperty;var qt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Nd=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wd(e))!Rd.call(t,i)&&i!==o&&Hi(t,i,{get:()=>e[i],enumerable:!(n=Ed(e,i))||n.enumerable});return t};var h=(t,e,o)=>(o=t!=null?Cd(Ad(t)):{},Nd(e||!t||!t.__esModule?Hi(o,"default",{value:t,enumerable:!0}):o,t));var w=qt((Yp,Vi)=>{Vi.exports=ftGlobals.wcUtils});var I=qt((Xp,ji)=>{ji.exports=ftGlobals.lit});var wn=qt((Qp,Gi)=>{Gi.exports=ftGlobals.litRepeat});var H=qt((ef,Yi)=>{Yi.exports=ftGlobals.litDecorators});var ea=qt(Ji=>{(function(t){var e=function(o){var n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(m){return m&&DataView.prototype.isPrototypeOf(m)}if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(m){return m&&a.indexOf(Object.prototype.toString.call(m))>-1};function l(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}function p(m){return typeof m!="string"&&(m=String(m)),m}function f(m){var v={next:function(){var L=m.shift();return{done:L===void 0,value:L}}};return n.iterable&&(v[Symbol.iterator]=function(){return v}),v}function u(m){this.map={},m instanceof u?m.forEach(function(v,L){this.append(L,v)},this):Array.isArray(m)?m.forEach(function(v){this.append(v[0],v[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(v){this.append(v,m[v])},this)}u.prototype.append=function(m,v){m=l(m),v=p(v);var L=this.map[m];this.map[m]=L?L+", "+v:v},u.prototype.delete=function(m){delete this.map[l(m)]},u.prototype.get=function(m){return m=l(m),this.has(m)?this.map[m]:null},u.prototype.has=function(m){return this.map.hasOwnProperty(l(m))},u.prototype.set=function(m,v){this.map[l(m)]=p(v)},u.prototype.forEach=function(m,v){for(var L in this.map)this.map.hasOwnProperty(L)&&m.call(v,this.map[L],L,this)},u.prototype.keys=function(){var m=[];return this.forEach(function(v,L){m.push(L)}),f(m)},u.prototype.values=function(){var m=[];return this.forEach(function(v){m.push(v)}),f(m)},u.prototype.entries=function(){var m=[];return this.forEach(function(v,L){m.push([L,v])}),f(m)},n.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);function y(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function g(m){return new Promise(function(v,L){m.onload=function(){v(m.result)},m.onerror=function(){L(m.error)}})}function x(m){var v=new FileReader,L=g(v);return v.readAsArrayBuffer(m),L}function b(m){var v=new FileReader,L=g(v);return v.readAsText(m),L}function S(m){for(var v=new Uint8Array(m),L=new Array(v.length),q=0;q<v.length;q++)L[q]=String.fromCharCode(v[q]);return L.join("")}function T(m){if(m.slice)return m.slice(0);var v=new Uint8Array(m.byteLength);return v.set(new Uint8Array(m)),v.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:n.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:n.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():n.arrayBuffer&&n.blob&&i(m)?(this._bodyArrayBuffer=T(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||s(m))?this._bodyArrayBuffer=T(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var m=y(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(x)}),this.text=function(){var m=y(this);if(m)return m;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(V)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(m){var v=m.toUpperCase();return N.indexOf(v)>-1?v:m}function k(m,v){v=v||{};var L=v.body;if(m instanceof k){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,v.headers||(this.headers=new u(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!L&&m._bodyInit!=null&&(L=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new u(v.headers)),this.method=_(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&L)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(L)}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function V(m){var v=new FormData;return m.trim().split("&").forEach(function(L){if(L){var q=L.split("="),me=q.shift().replace(/\+/g," "),j=q.join("=").replace(/\+/g," ");v.append(decodeURIComponent(me),decodeURIComponent(j))}}),v}function Re(m){var v=new u,L=m.replace(/\r?\n[\t ]+/g," ");return L.split(/\r?\n/).forEach(function(q){var me=q.split(":"),j=me.shift().trim();if(j){var vo=me.join(":").trim();v.append(j,vo)}}),v}R.call(k.prototype);function se(m,v){v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in v?v.statusText:"OK",this.headers=new u(v.headers),this.url=v.url||"",this._initBody(m)}R.call(se.prototype),se.prototype.clone=function(){return new se(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},se.error=function(){var m=new se(null,{status:0,statusText:""});return m.type="error",m};var jr=[301,302,303,307,308];se.redirect=function(m,v){if(jr.indexOf(v)===-1)throw new RangeError("Invalid status code");return new se(null,{status:v,headers:{location:m}})},o.DOMException=t.DOMException;try{new o.DOMException}catch{o.DOMException=function(v,L){this.message=v,this.name=L;var q=Error(v);this.stack=q.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Ve(m,v){return new Promise(function(L,q){var me=new k(m,v);if(me.signal&&me.signal.aborted)return q(new o.DOMException("Aborted","AbortError"));var j=new XMLHttpRequest;function vo(){j.abort()}j.onload=function(){var Gr={status:j.status,statusText:j.statusText,headers:Re(j.getAllResponseHeaders()||"")};Gr.url="responseURL"in j?j.responseURL:Gr.headers.get("X-Request-URL");var En="response"in j?j.response:j.responseText;L(new se(En,Gr))},j.onerror=function(){q(new TypeError("Network request failed"))},j.ontimeout=function(){q(new TypeError("Network request failed"))},j.onabort=function(){q(new o.DOMException("Aborted","AbortError"))},j.open(me.method,me.url,!0),me.credentials==="include"?j.withCredentials=!0:me.credentials==="omit"&&(j.withCredentials=!1),"responseType"in j&&n.blob&&(j.responseType="blob"),me.headers.forEach(function(Gr,En){j.setRequestHeader(En,Gr)}),me.signal&&(me.signal.addEventListener("abort",vo),j.onreadystatechange=function(){j.readyState===4&&me.signal.removeEventListener("abort",vo)}),j.send(typeof me._bodyInit>"u"?null:me._bodyInit)})}return Ve.polyfill=!0,t.fetch||(t.fetch=Ve,t.Headers=u,t.Request=k,t.Response=se),o.Headers=u,o.Request=k,o.Response=se,o.fetch=Ve,Object.defineProperty(o,"__esModule",{value:!0}),o}({})})(typeof self<"u"?self:Ji)});var Ut=qt((Vh,ms)=>{ms.exports=ftGlobals.litClassMap});var Il=qt((Vb,Ll)=>{Ll.exports=ftGlobals.litUnsafeHTML});var Od=h(w());var Nt=h(I()),zi=h(wn()),Vr=h(w());var Ki=h(I()),Zi=h(w()),Td={spacing:Zi.FtCssVariableFactory.create("--ft-search-selected-facets-spacing","","SIZE","8px")},qi=Ki.css`
|
|
2
2
|
.ft-search-selected-facets--container {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-wrap: wrap;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
`;var us=h(w()),hs=h(H());var pt=h(w());var Xi=h(w()),Ld={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload},setRequestPeriodFilter:(t,e)=>{t.request.periodFilter=e.payload}},Qi=t=>Xi.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:Ld});var ff=h(ea(),1);var ta;(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(ta||(ta={}));var ra;(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(ra||(ra={}));var oa;(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(oa||(oa={}));var na;(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(na||(na={}));var ia;(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(ia||(ia={}));var aa;(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(aa||(aa={}));var sa;(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(sa||(sa={}));var la;(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(la||(la={}));var So;(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(So||(So={}));var ca;(function(t){t.ASC="ASC",t.DESC="DESC"})(ca||(ca={}));var da;(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(da||(da={}));var hr;(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(hr||(hr={}));var pa;(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(pa||(pa={}));var fa;(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(fa||(fa={}));var ua;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(ua||(ua={}));var ha;(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(ha||(ha={}));var mr;(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(mr||(mr={}));var de;(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(de||(de={}));var ma;(function(t){t.VALID="VALID",t.INVALID="INVALID"})(ma||(ma={}));var lf={[de.PERSONAL_BOOK_SHARE_USER]:[de.PERSONAL_BOOK_USER],[de.HTML_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.PDF_EXPORT_USER]:[de.PERSONAL_BOOK_USER],[de.KHUB_ADMIN]:[de.CONTENT_PUBLISHER],[de.ADMIN]:[de.KHUB_ADMIN,de.USERS_ADMIN,de.PORTAL_ADMIN],[de.DEVELOPER]:[de.BETA_USER,de.DEBUG_USER]};var fs=h(w());var va=h(I()),je=h(H()),Qe=h(w());var ya=h(I());var ga=ya.css`
|
|
12
12
|
`;var Oo=h(w()),Id="ft-app-info",An=class extends CustomEvent{constructor(e){super("authentication-change",{detail:e})}},Pd={session:(t,e)=>{(0,Oo.deepEqual)(t.session,e.payload)||(t.session=e.payload,setTimeout(()=>P.eventBus.dispatchEvent(new An(e.payload)),0))}},P=Oo.FtReduxStore.get({name:Id,reducers:Pd,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1}});var Lt=h(w());var Rn=h(w());var Yt=class t{static get(e){let{baseUrl:o,apiIntegrationIdentifier:n}=P.getState(),i=e??n;if(o&&i&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(o,i,!0)}static await(e){return new Promise(o=>{let n=t.get(e);if(n)o(n);else{let i=P.subscribe(()=>{n=t.get(e),n&&(i(),o(n))})}})}};var ct=class{constructor(e=!0,o){var n;this.overrideApi=o;let i=this.constructor;i.commonCache=(n=i.commonCache)!==null&&n!==void 0?n:new Rn.CacheRegistry,this.cache=e?i.commonCache:new Rn.CacheRegistry}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:Yt.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):Yt.await()}clearCache(){this.cache.clearAll()}};var ba,kd=Symbol("clearAfterUnitTest"),Co=class extends ct{constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[ba]=()=>{this.defaultMessages={},this.cache=new Lt.CacheRegistry,this.listeners={}},this.currentUiLocale=P.getState().uiLocale,P.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=P.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let o=e.name.toLowerCase();this.cache.setFinal(o,e),this.notify(o)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,o){var n;if(e=e.toLowerCase(),Object.keys(o).length>0){let i={...(n=this.defaultMessages[e])!==null&&n!==void 0?n:{},...o};(0,Lt.deepEqual)(this.defaultMessages[e],i)||(this.defaultMessages[e]=i,await this.notify(e))}await this.fetchContext(e)}resolveMessage(e,o,...n){var i,a,s;e=e.toLowerCase(),this.fetchContext(e);let l=(a=(i=this.cache.getNow(e))===null||i===void 0?void 0:i.messages)!==null&&a!==void 0?a:{};return new Lt.ParametrizedLabelResolver((s=this.defaultMessages[e])!==null&&s!==void 0?s:{},l).resolve(o,...n)}async fetchContext(e){if(!this.cache.has(e))try{await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),await this.notify(e)}catch(o){console.error(o)}}subscribe(e,o){var n;return e=e.toLowerCase(),this.listeners[e]=(n=this.listeners[e])!==null&&n!==void 0?n:new Set,this.listeners[e].add(o),()=>{var i;return(i=this.listeners[e])===null||i===void 0?void 0:i.delete(o)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map(e=>this.notify(e)))}async notify(e){this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>(0,Lt.delay)(0).then(()=>o()).catch(()=>null)))}};ba=kd;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Co{constructor(){super(async(t,e)=>(await this.awaitApi).getFluidTopicsMessageContext(t,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Co{constructor(){super(async(t,e)=>(await this.awaitApi).getCustomMessageContext(t,e))}});var yr=window.FluidTopicsI18nService,xa=window.FluidTopicsCustomI18nService;var Se=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},te=class extends Qe.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",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.apiProvider=()=>Yt.get(),this.messageContexts=[],this.cache=new Qe.CacheRegistry,this.cleanSessionDebouncer=new Qe.Debouncer}render(){return va.html`
|
|
13
13
|
<slot></slot>
|
|
14
|
-
`}update(e){super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("availableUiLocales")&&P.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>yr.addContext(o)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};te.elementDefinitions={};te.styles=ga;Se([(0,je.property)()],te.prototype,"baseUrl",void 0);Se([(0,je.property)()],te.prototype,"apiIntegrationIdentifier",void 0);Se([(0,je.property)()],te.prototype,"uiLocale",void 0);Se([(0,Qe.jsonProperty)(null)],te.prototype,"availableUiLocales",void 0);Se([(0,Qe.jsonProperty)(null)],te.prototype,"metadataConfiguration",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"editorMode",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"noCustom",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"openExternalDocumentInNewTab",void 0);Se([(0,je.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],te.prototype,"noCustomComponent",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"withManualResources",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"navigatorOnline",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"forcedOffline",void 0);Se([(0,je.property)({type:Object})],te.prototype,"apiProvider",void 0);Se([(0,Qe.jsonProperty)([])],te.prototype,"messageContexts",void 0);Se([(0,Qe.jsonProperty)(void 0)],te.prototype,"session",void 0);var xp=h(H());function _d(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Eo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Eo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Eo(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Eo(t,e){try{return _d(t,e)}catch{return!1}}function Nn(t,e){return!Eo(t,e)}var Dd=h(H(),1);var wo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Kr=h(H(),1);var Sa=h(H(),1);function Oa(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Sa.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Nn,...e??{}})}var Ao=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){i(l);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ea=h(I(),1);var Ro=window,$d=Ro.ShadowRoot&&(Ro.ShadyCSS===void 0||Ro.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wf=Symbol();var Ca=(t,e)=>{$d?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Ro.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var No=class extends Ea.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ca(n,e.elementStyles),n}};var To=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Na,wa=Symbol("constructorPrototype"),Aa=Symbol("constructorName"),Ta=Symbol("exportpartsDebouncer"),Ra=Symbol("dynamicDependenciesLoaded"),It=class extends No{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Na]=new Ao(5),this[Aa]=this.constructor.name,this[wa]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Aa]&&Object.setPrototypeOf(this,this[wa])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[Ra]||(e[Ra]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Ta].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,l;let p=g=>g!=null&&g.trim().length>0,f=e.filter(p).map(g=>g.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(l=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>u.add(S))}if(u.size===0){this.removeAttribute("exportparts");return}let y=[...u.values()].flatMap(g=>f.map(x=>`${g}:${x}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Na=Ta;To([(0,Kr.property)()],It.prototype,"exportpartsPrefix",void 0);To([Oa([])],It.prototype,"exportpartsPrefixes",void 0);To([(0,Kr.property)()],It.prototype,"customStylesheet",void 0);To([(0,Kr.state)()],It.prototype,"useAdoptedStyleSheets",void 0);function Zr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var La,Ia,Pa,Lo=Symbol("internalReduxEventsUnsubscribers"),Pt=Symbol("internalStoresUnsubscribers"),Xt=Symbol("internalStores"),qr=class extends It{constructor(){super(...arguments),this[La]=new Map,this[Ia]=new Map,this[Pa]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Xt].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Xt].get(e)}addStore(e,o){var n;o=(n=o??(Zr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,e)}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Xt].delete(o)}setupStore(e,o){this[Xt].set(e,o),this.subscribeToStore(e,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Xt].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Pt].has(e.store):this[Pt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Pt].set(e,o.subscribe(()=>this.updateFromStores())),Zr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=l=>this[a](l);o.eventBus.addEventListener(i.eventName,s),this[Lo].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Pt].forEach((e,o)=>this.unsubscribeFromStore(o)),this[Lo].forEach(e=>e()),this[Lo]=[]}unsubscribeFromStore(e){this[Pt].has(e)&&this[Pt].get(e)(),this[Pt].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};La=Pt,Ia=Xt,Pa=Lo;qr.reduxProperties=new Map;qr.reduxReactiveProperties=new Set;qr.reduxEventListeners=new Map;function Ge(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function gt(t){return!!t&&!!t[q]}function Je(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Vd}(t)||Array.isArray(t)||!!t[Ua]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ua])||Bn(t)||Mn(t))}function Qt(t,e,o){o===void 0&&(o=!1),xr(t)===0?(o?Object.keys:br)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function xr(t){var e=t[q];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Bn(t)?2:Mn(t)?3:0}function gr(t,e){return xr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Bd(t,e){return xr(t)===2?t.get(e):t[e]}function Fa(t,e,o){var n=xr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function za(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Bn(t){return Wd&&t instanceof Map}function Mn(t){return Hd&&t instanceof Set}function kt(t){return t.o||t.t}function Un(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Va(t);delete e[q];for(var o=br(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Fn(t,e){return e===void 0&&(e=!1),zn(t)||gt(t)||!Je(t)||(xr(t)>1&&(t.set=t.add=t.clear=t.delete=Md),Object.freeze(t),e&&Qt(t,function(o,n){return Fn(n,!0)},!0)),t}function Md(){Ge(2)}function zn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function dt(t){var e=$n[t];return e||Ge(18,t),e}function Ud(t,e){$n[t]||($n[t]=e)}function kn(){return Xr}function Tn(t,e){e&&(dt("Patches"),t.u=[],t.s=[],t.v=e)}function Io(t){_n(t),t.p.forEach(Fd),t.p=null}function _n(t){t===Xr&&(Xr=t.l)}function ka(t){return Xr={p:[],l:Xr,h:t,m:!0,_:0}}function Fd(t){var e=t[q];e.i===0||e.i===1?e.j():e.g=!0}function Ln(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||dt("ES5").S(e,t,n),n?(o[q].P&&(Io(e),Ge(4)),Je(t)&&(t=Po(e,t),e.l||ko(e,t)),e.u&&dt("Patches").M(o[q].t,t,e.u,e.s)):t=Po(e,o,[]),Io(e),e.u&&e.v(e.u,e.s),t!==Ha?t:void 0}function Po(t,e,o){if(zn(e))return e;var n=e[q];if(!n)return Qt(e,function(l,p){return _a(t,n,e,l,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return ko(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Un(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Qt(a,function(l,p){return _a(t,n,i,l,p,o,s)}),ko(t,i,!1),o&&t.u&&dt("Patches").N(n,o,t.u,t.s)}return n.o}function _a(t,e,o,n,i,a,s){if(gt(i)){var l=Po(t,i,a&&e&&e.i!==3&&!gr(e.R,n)?a.concat(n):void 0);if(Fa(o,n,l),!gt(l))return;t.m=!1}else s&&o.add(i);if(Je(i)&&!zn(i)){if(!t.h.D&&t._<1)return;Po(t,i),e&&e.A.l||ko(t,i)}}function ko(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Fn(e,o)}function In(t,e){var o=t[q];return(o?kt(o):t)[e]}function Da(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function Pn(t){t.o||(t.o=Un(t.t))}function Dn(t,e,o){var n=Bn(e)?dt("MapSet").F(e,o):Mn(e)?dt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:kn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=l,f=Qr;s&&(p=[l],f=Yr);var u=Proxy.revocable(p,f),y=u.revoke,g=u.proxy;return l.k=g,l.j=y,g}(e,o):dt("ES5").J(e,o);return(o?o.A:kn()).p.push(n),n}function zd(t){return gt(t)||Ge(22,t),function e(o){if(!Je(o))return o;var n,i=o[q],a=xr(o);if(i){if(!i.P&&(i.i<4||!dt("ES5").K(i)))return i.t;i.I=!0,n=$a(o,a),i.I=!1}else n=$a(o,a);return Qt(n,function(s,l){i&&Bd(i.t,s)===l||Fa(n,s,e(l))}),a===3?new Set(n):n}(t)}function $a(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Un(t)}function Wa(){function t(s,l){var p=a[s];return p?p.enumerable=l:a[s]=p={configurable:!0,enumerable:l,get:function(){var f=this[q];return Qr.get(f,s)},set:function(f){var u=this[q];Qr.set(u,s,f)}},p}function e(s){for(var l=s.length-1;l>=0;l--){var p=s[l][q];if(!p.P)switch(p.i){case 5:n(p)&&_t(p);break;case 4:o(p)&&_t(p)}}}function o(s){for(var l=s.t,p=s.k,f=br(p),u=f.length-1;u>=0;u--){var y=f[u];if(y!==q){var g=l[y];if(g===void 0&&!gr(l,y))return!0;var x=p[y],b=x&&x[q];if(b?b.t!==g:!za(x,g))return!0}}var S=!!l[q];return f.length!==br(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(l,l.length-1);if(p&&!p.get)return!0;for(var f=0;f<l.length;f++)if(!l.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Ge(3,JSON.stringify(kt(s)))}var a={};Ud("ES5",{J:function(s,l){var p=Array.isArray(s),f=function(y,g){if(y){for(var x=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(x,""+b,t(b,!0));return x}var S=Va(g);delete S[q];for(var T=br(S),R=0;R<T.length;R++){var N=T[R];S[N]=t(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(p,s),u={i:p?5:4,A:l?l.A:kn(),P:!1,I:!1,R:{},l,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,q,{value:u,writable:!0}),f},S:function(s,l,p){p?gt(l)&&l[q].A===s&&e(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var y=u[q];if(y){var g=y.t,x=y.k,b=y.R,S=y.i;if(S===4)Qt(x,function(k){k!==q&&(g[k]!==void 0||gr(g,k)?b[k]||f(x[k]):(b[k]=!0,_t(y)))}),Qt(g,function(k){x[k]!==void 0||gr(x,k)||(b[k]=!1,_t(y))});else if(S===5){if(n(y)&&(_t(y),b.length=!0),x.length<g.length)for(var T=x.length;T<g.length;T++)b[T]=!1;else for(var R=g.length;R<x.length;R++)b[R]=!0;for(var N=Math.min(x.length,g.length),_=0;_<N;_++)x.hasOwnProperty(_)||(b[_]=!0),b[_]===void 0&&f(x[_])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Ba,Xr,Wn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Wd=typeof Map<"u",Hd=typeof Set<"u",Ma=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ha=Wn?Symbol.for("immer-nothing"):((Ba={})["immer-nothing"]=!0,Ba),Ua=Wn?Symbol.for("immer-draftable"):"__$immer_draftable",q=Wn?Symbol.for("immer-state"):"__$immer_state";var Vd=""+Object.prototype.constructor,br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Va=Object.getOwnPropertyDescriptors||function(t){var e={};return br(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},$n={},Qr={get:function(t,e){if(e===q)return t;var o=kt(t);if(!gr(o,e))return function(i,a,s){var l,p=Da(a,s);return p?"value"in p?p.value:(l=p.get)===null||l===void 0?void 0:l.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Je(n)?n:n===In(t.t,e)?(Pn(t),t.o[e]=Dn(t.A.h,n,t)):n},has:function(t,e){return e in kt(t)},ownKeys:function(t){return Reflect.ownKeys(kt(t))},set:function(t,e,o){var n=Da(kt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=In(kt(t),e),a=i?.[q];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(za(o,i)&&(o!==void 0||gr(t.t,e)))return!0;Pn(t),_t(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return In(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Pn(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=kt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ge(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ge(12)}},Yr={};Qt(Qr,function(t,e){Yr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Yr.deleteProperty=function(t,e){return Yr.set.call(this,t,e,void 0)},Yr.set=function(t,e,o){return Qr.set.call(this,t[0],e,o,t[0])};var jd=function(){function t(o){var n=this;this.O=Ma,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var p=n;return function(S){var T=this;S===void 0&&(S=l);for(var R=arguments.length,N=Array(R>1?R-1:0),_=1;_<R;_++)N[_-1]=arguments[_];return p.produce(S,function(k){var V;return(V=a).call.apply(V,[T,k].concat(N))})}}var f;if(typeof a!="function"&&Ge(6),s!==void 0&&typeof s!="function"&&Ge(7),Je(i)){var u=ka(n),y=Dn(n,i,void 0),g=!0;try{f=a(y),g=!1}finally{g?Io(u):_n(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(S){return Tn(u,s),Ln(S,u)},function(S){throw Io(u),S}):(Tn(u,s),Ln(f,u))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Ha&&(f=void 0),n.D&&Fn(f,!0),s){var x=[],b=[];dt("Patches").M(i,f,x,b),s(x,b)}return f}Ge(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var u=arguments.length,y=Array(u>1?u-1:0),g=1;g<u;g++)y[g-1]=arguments[g];return n.produceWithPatches(f,function(x){return i.apply(void 0,[x].concat(y))})};var s,l,p=n.produce(i,a,function(f,u){s=f,l=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,l]}):[p,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Je(o)||Ge(8),gt(o)&&(o=zd(o));var n=ka(this),i=Dn(this,o,void 0);return i[q].C=!0,_n(n),i},e.finishDraft=function(o,n){var i=o&&o[q],a=i.A;return Tn(a,n),Ln(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ma&&Ge(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=dt("Patches").$;return gt(o)?s(o,n):this.produce(o,function(l){return s(l,n)})},t}(),De=new jd,Gd=De.produce,eu=De.produceWithPatches.bind(De),tu=De.setAutoFreeze.bind(De),ru=De.setUseProxies.bind(De),ou=De.applyPatches.bind(De),nu=De.createDraft.bind(De),iu=De.finishDraft.bind(De),_o=Gd;function Dt(t){"@babel/helpers - typeof";return Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(t)}function Hn(t,e){if(Dt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Dt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vn(t){var e=Hn(t,"string");return Dt(e)==="symbol"?e:String(e)}function jn(t,e,o){return e=Vn(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ja(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Do(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?ja(Object(o),!0).forEach(function(n){jn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ja(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function xe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ga=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},$o={INIT:"@@redux/INIT"+Gn(),REPLACE:"@@redux/REPLACE"+Gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Gn()}};function Kd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Kn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(xe(1));return o(Kn)(t,e)}if(typeof t!="function")throw new Error(xe(2));var i=t,a=e,s=[],l=s,p=!1;function f(){l===s&&(l=s.slice())}function u(){if(p)throw new Error(xe(3));return a}function y(S){if(typeof S!="function")throw new Error(xe(4));if(p)throw new Error(xe(5));var T=!0;return f(),l.push(S),function(){if(T){if(p)throw new Error(xe(6));T=!1,f();var N=l.indexOf(S);l.splice(N,1),s=null}}}function g(S){if(!Kd(S))throw new Error(xe(7));if(typeof S.type>"u")throw new Error(xe(8));if(p)throw new Error(xe(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var T=s=l,R=0;R<T.length;R++){var N=T[R];N()}return S}function x(S){if(typeof S!="function")throw new Error(xe(10));i=S,g({type:$o.REPLACE})}function b(){var S,T=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(xe(11));function _(){N.next&&N.next(u())}_();var k=T(_);return{unsubscribe:k}}},S[Ga]=function(){return this},S}return g({type:$o.INIT}),n={dispatch:g,subscribe:y,getState:u,replaceReducer:x},n[Ga]=b,n}function Zd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:$o.INIT});if(typeof n>"u")throw new Error(xe(12));if(typeof o(void 0,{type:$o.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function Ka(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,l;try{Zd(o)}catch(p){l=p}return function(f,u){if(f===void 0&&(f={}),l)throw l;if(0)var y;for(var g=!1,x={},b=0;b<a.length;b++){var S=a[b],T=o[S],R=f[S],N=T(R,u);if(typeof N>"u"){var _=u&&u.type;throw new Error(xe(14))}x[S]=N,g=g||N!==R}return g=g||a.length!==Object.keys(f).length,g?x:f}}function vr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Za(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(xe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(p){return p(s)});return a=vr.apply(void 0,l)(i.dispatch),Do(Do({},i),{},{dispatch:a})}}}function qa(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,t):s(l)}}};return e}var Ya=qa();Ya.withExtraArgument=qa;var Zn=Ya;var ts=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),qd=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(u){f=[6,u],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Sr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},Yd=Object.defineProperty,Xd=Object.defineProperties,Qd=Object.getOwnPropertyDescriptors,Xa=Object.getOwnPropertySymbols,Jd=Object.prototype.hasOwnProperty,ep=Object.prototype.propertyIsEnumerable,Qa=function(t,e,o){return e in t?Yd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},$t=function(t,e){for(var o in e||(e={}))Jd.call(e,o)&&Qa(t,o,e[o]);if(Xa)for(var n=0,i=Xa(e);n<i.length;n++){var o=i[n];ep.call(e,o)&&Qa(t,o,e[o])}return t},qn=function(t,e){return Xd(t,Qd(e))},tp=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{l(o.next(p))}catch(f){i(f)}},s=function(p){try{l(o.throw(p))}catch(f){i(f)}},l=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};l((o=o.apply(t,e)).next())})};var rp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vr:vr.apply(null,arguments)},Cu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function op(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var np=function(t){ts(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Sr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],o.concat(this))))},e}(Array),ip=function(t){ts(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Sr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],o.concat(this))))},e}(Array);function Qn(t){return Je(t)?_o(t,function(){}):t}function ap(t){return typeof t=="boolean"}function sp(){return function(e){return lp(e)}}function lp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,l=new np;if(o&&(ap(o)?l.push(Zn):l.push(Zn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return l}var Yn=!0;function rs(t){var e=sp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,l=o.devTools,p=l===void 0?!0:l,f=o.preloadedState,u=f===void 0?void 0:f,y=o.enhancers,g=y===void 0?void 0:y,x;if(typeof i=="function")x=i;else if(op(i))x=Ka(i);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 b=s;if(typeof b=="function"&&(b=b(e),!Yn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yn&&b.some(function(k){return typeof k!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Za.apply(void 0,b),T=vr;p&&(T=rp($t({trace:!Yn},typeof p=="object"&&p)));var R=new ip(S),N=R;Array.isArray(g)?N=Sr([S],g):typeof g=="function"&&(N=g(R));var _=T.apply(void 0,N);return Kn(x,u,_)}function Bt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return $t($t({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function os(t){var e={},o=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function cp(t){return typeof t=="function"}function dp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?os(e):[e,o,n],a=i[0],s=i[1],l=i[2],p;if(cp(t))p=function(){return Qn(t())};else{var f=Qn(t);p=function(){return f}}function u(y,g){y===void 0&&(y=p());var x=Sr([a[g.type]],s.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[l]),x.reduce(function(b,S){if(S)if(gt(b)){var T=b,R=S(T,g);return R===void 0?b:R}else{if(Je(b))return _o(b,function(N){return S(N,g)});var R=S(b,g);if(R===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return b},y)}return u.getInitialState=p,u}function pp(t,e){return t+"/"+e}function ns(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Qn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(u){var y=n[u],g=pp(e,u),x,b;"reducer"in y?(x=y.reducer,b=y.prepare):x=y,a[u]=x,s[g]=x,l[u]=b?Bt(g,b):Bt(g)});function p(){var u=typeof t.extraReducers=="function"?os(t.extraReducers):[t.extraReducers],y=u[0],g=y===void 0?{}:y,x=u[1],b=x===void 0?[]:x,S=u[2],T=S===void 0?void 0:S,R=$t($t({},g),s);return dp(o,function(N){for(var _ in R)N.addCase(_,R[_]);for(var k=0,V=b;k<V.length;k++){var Re=V[k];N.addMatcher(Re.matcher,Re.reducer)}T&&N.addDefaultCase(T)})}var f;return{name:e,reducer:function(u,y){return f||(f=p()),f(u,y)},actions:l,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var fp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",up=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=fp[Math.random()*64|0];return e},hp=["name","message","stack","code"],Xn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ja=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),mp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=hp;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Ru=function(){function t(e,o,n){var i=Bt(e+"/fulfilled",function(u,y,g,x){return{payload:u,meta:qn($t({},x||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),a=Bt(e+"/pending",function(u,y,g){return{payload:void 0,meta:qn($t({},g||{}),{arg:y,requestId:u,requestStatus:"pending"})}}),s=Bt(e+"/rejected",function(u,y,g,x,b){return{payload:x,error:(n&&n.serializeError||mp)(u||"Rejected"),meta:qn($t({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),l=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(y,g,x){var b=n?.idGenerator?n.idGenerator(u):up(),S=new p,T,R=!1;function N(k){T=k,S.abort()}var _=function(){return tp(this,null,function(){var k,V,Re,se,jr,Ve,m;return qd(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),se=(k=n?.condition)==null?void 0:k.call(n,u,{getState:g,extra:x}),gp(se)?[4,se]:[3,2];case 1:se=v.sent(),v.label=2;case 2:if(se===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,jr=new Promise(function(L,Z){return S.signal.addEventListener("abort",function(){return Z({name:"AbortError",message:T||"Aborted"})})}),y(a(b,u,(V=n?.getPendingMeta)==null?void 0:V.call(n,{requestId:b,arg:u},{getState:g,extra:x}))),[4,Promise.race([jr,Promise.resolve(o(u,{dispatch:y,getState:g,extra:x,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(L,Z){return new Xn(L,Z)},fulfillWithValue:function(L,Z){return new Ja(L,Z)}})).then(function(L){if(L instanceof Xn)throw L;return L instanceof Ja?i(L.payload,b,u,L.meta):i(L,b,u)})])];case 3:return Re=v.sent(),[3,5];case 4:return Ve=v.sent(),Re=Ve instanceof Xn?s(null,b,u,Ve.payload,Ve.meta):s(Ve,b,u),[3,5];case 5:return m=n&&!n.dispatchConditionRejection&&s.match(Re)&&Re.meta.condition,m||y(Re),[2,Re]}})})}();return Object.assign(_,{abort:N,requestId:b,arg:u,unwrap:function(){return _.then(yp)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function yp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function gp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var is="listener",as="completed",ss="cancelled",Nu="task-"+ss,Tu="task-"+as,Lu=is+"-"+ss,Iu=is+"-"+as;var Jn="listenerMiddleware";var Pu=Bt(Jn+"/add"),ku=Bt(Jn+"/removeAll"),_u=Bt(Jn+"/remove");var es,Du=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(es||(es=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},bp=function(t){return function(e){setTimeout(e,t)}},$u=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:bp(10);Wa();window.ftReduxStores||(window.ftReduxStores={});var ls=class t{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Zr(a))return a;if(i==null)return;let s=ns({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),l=rs({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});return window.ftReduxStores[i.name]=new t(s,l)}constructor(e,o){this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new wo,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,l=n[s];return l?(...p)=>{let f=l(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Fo=h(w());var Bo=class extends ct{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Mo=class extends ct{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var vp="ft-user-assets",Uo=Fo.FtReduxStore.get({name:vp,initialState:{savedSearches:void 0,bookmarks:void 0}}),ei=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Mo,this.savedSearchesService=new Bo,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,Fo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Uo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Uo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Uo.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Uo.actions.bookmarks(o)}}},cs=new ei;var ti=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ti;var ds=h(w()),ri=class{highlightHtml(e,o){(0,ds.highlightHtml)(e,o)}};window.FluidTopicsHighlightHtmlService=new ri;var ps=h(w());var oi=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return ps.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new oi;(0,fs.customElement)("ft-app-context")(te);var zo=class extends ct{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}};var eo=t=>t.request.virtualField===hr.TITLE_ONLY&&t.request.scope===mr.DOCUMENTS,Wo=class t extends Event{constructor(){super(t.eventName)}};Wo.eventName="search-context-clear-all-filters";var Jr=class t{static build(e,o){return new t(Qi(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new pt.Debouncer(10),this.searchDebouncer=new pt.Debouncer(100),this.suggestDebouncer=new pt.Debouncer(300),this.service=o??new zo}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let o=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(o){let i=a=>o.some(s=>s.lang==a);i(e)||(e=i(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>n.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(hr.TITLE_ONLY),this.store.actions.setRequestScope(mr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(hr.EVERYWHERE),this.store.actions.setRequestScope(mr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return eo(this.store.getState())}get periodFilter(){return this.store.getState().request.periodFilter}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Wo)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){let n=this.store.getState().request.filters,i={key:e,values:o,negative:!1},a=[...n.filter(s=>s.key!==e),i];this.setFilters(a)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setPeriodFilter(e){this.store.actions.setRequestPeriodFilter(e),this.store.actions.setPageNumber(1),this.launchSearch()}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,pt.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof pt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,filters:n.filters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,pt.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(o){!(o instanceof pt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}};var Sp=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ii=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},ni=Symbol("registerInterval");function Op(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[ni]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[ni]):this.dispatchEvent(new ii)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=ni,Sp([(0,hs.state)()],o.prototype,"stateManager",void 0),o}var Mt=class extends Op(us.FtLitElementRedux){};var Ii=h(w());var ln=h(I()),we=h(H()),Rc=h(Ut()),dn=h(w());var ws=h(w());var Cs=h(I()),ye=h(H()),Es=h(Ut()),to=h(w());var Ss=h(I()),ne=h(w()),ys=ne.FtCssVariableFactory.extend("--ft-ripple-color","",ne.designSystemVariables.colorContent),M={color:ys,backgroundColor:ne.FtCssVariableFactory.extend("--ft-ripple-background-color","",ys),opacityContentOnSurfacePressed:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ne.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},gs=ne.FtCssVariableFactory.extend("--ft-ripple-color","",ne.designSystemVariables.colorPrimary),bs={color:gs,backgroundColor:ne.FtCssVariableFactory.extend("--ft-ripple-background-color","",gs)},xs=ne.FtCssVariableFactory.extend("--ft-ripple-color","",ne.designSystemVariables.colorSecondary),vs={color:xs,backgroundColor:ne.FtCssVariableFactory.extend("--ft-ripple-background-color","",xs)},Os=Ss.css`
|
|
14
|
+
`}update(e){super.update(e),e.has("baseUrl")&&(P.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),e.has("apiIntegrationIdentifier")&&P.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("uiLocale")&&P.actions.uiLocale(this.uiLocale),e.has("metadataConfiguration")&&P.actions.metadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&P.actions.noCustom(this.noCustom),e.has("editorMode")&&P.actions.editorMode(this.editorMode),e.has("noCustomComponent")&&P.actions.noCustomComponent(this.noCustomComponent),e.has("session")&&P.actions.session(this.session),e.has("availableUiLocales")&&P.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>yr.addContext(o)),e.has("openExternalDocumentInNewTab")&&P.actions.openExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&P.actions.navigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&P.actions.forcedOffline(this.forcedOffline),setTimeout(()=>this.updateIfNeeded())}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(this.session==null&&this.updateSession(),this.availableUiLocales==null&&this.updateUiLocales(),this.metadataConfiguration==null&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",async()=>{let e=await this.apiProvider().getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.session=void 0},e.idleTimeoutInMillis),e})}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",()=>this.apiProvider().getAvailableUiLocales())}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration())}};te.elementDefinitions={};te.styles=ga;Se([(0,je.property)()],te.prototype,"baseUrl",void 0);Se([(0,je.property)()],te.prototype,"apiIntegrationIdentifier",void 0);Se([(0,je.property)()],te.prototype,"uiLocale",void 0);Se([(0,Qe.jsonProperty)(null)],te.prototype,"availableUiLocales",void 0);Se([(0,Qe.jsonProperty)(null)],te.prototype,"metadataConfiguration",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"editorMode",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"noCustom",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"openExternalDocumentInNewTab",void 0);Se([(0,je.property)({converter:{fromAttribute(t){return t==="false"?!1:t==="true"||(t??!1)}}})],te.prototype,"noCustomComponent",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"withManualResources",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"navigatorOnline",void 0);Se([(0,je.property)({type:Boolean})],te.prototype,"forcedOffline",void 0);Se([(0,je.property)({type:Object})],te.prototype,"apiProvider",void 0);Se([(0,Qe.jsonProperty)([])],te.prototype,"messageContexts",void 0);Se([(0,Qe.jsonProperty)(void 0)],te.prototype,"session",void 0);var xp=h(H());function _d(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Eo(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!Eo(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!Eo(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function Eo(t,e){try{return _d(t,e)}catch{return!1}}function Nn(t,e){return!Eo(t,e)}var Dd=h(H(),1);var wo=class{constructor(){this.queue=[]}add(e,o=!1){o&&(this.queue=this.queue.filter(n=>n.type!==e.type)),this.queue.push(e)}consume(e){let o=this.queue.find(n=>n.type===e);return o&&(this.queue=this.queue.filter(n=>n!==o)),o}};var Kr=h(H(),1);var Sa=h(H(),1);function Oa(t,e){let o=()=>JSON.parse(JSON.stringify(t));return(0,Sa.property)({type:Object,converter:{fromAttribute:n=>{if(n==null)return o();try{return JSON.parse(n)}catch{return o()}},toAttribute:n=>JSON.stringify(n)},hasChanged:Nn,...e??{}})}var Ao=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,o){return this.callbacks=[e],this.debounce(o)}queue(e,o){return this.callbacks.push(e),this.debounce(o)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((o,n)=>{this.resolvePromise=o,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,o;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:()=>null,a=(o=this.resolvePromise)!==null&&o!==void 0?o:()=>null;this.clearPromise();for(let s of n)try{await s()}catch(l){i(l);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ea=h(I(),1);var Ro=window,$d=Ro.ShadowRoot&&(Ro.ShadyCSS===void 0||Ro.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wf=Symbol();var Ca=(t,e)=>{$d?t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet):e.forEach(o=>{let n=document.createElement("style"),i=Ro.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=o.cssText,t.appendChild(n)})};var No=class extends Ea.LitElement{createRenderRoot(){let e=this.constructor;e.elementDefinitions&&!e.registry&&(e.registry=new CustomElementRegistry,Object.entries(e.elementDefinitions).forEach(([i,a])=>e.registry.define(i,a)));let o={...e.shadowRootOptions,customElements:e.registry},n=this.renderOptions.creationScope=this.attachShadow(o);return Ca(n,e.elementStyles),n}};var To=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Na,wa=Symbol("constructorPrototype"),Aa=Symbol("constructorName"),Ta=Symbol("exportpartsDebouncer"),Ra=Symbol("dynamicDependenciesLoaded"),It=class extends No{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[Na]=new Ao(5),this[Aa]=this.constructor.name,this[wa]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Aa]&&Object.setPrototypeOf(this,this[wa])}connectedCallback(){super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(o){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",o)}let e=this.constructor;e[Ra]||(e[Ra]=!0,this.importDynamicDependencies())}importDynamicDependencies(){}updated(e){super.updated(e),this.updateComplete.then(()=>{this.contentAvailableCallback(e),this.applyCustomStylesheet(e),this.scheduleExportpartsUpdate()})}contentAvailableCallback(e){}applyCustomStylesheet(e){var o,n,i;if(((n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&n!==void 0?n:[]).forEach(a=>a.remove()),this.useAdoptedStyleSheets){if(e.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((i=this.customStylesheet)!==null&&i!==void 0?i:"")}catch(a){console.error(a,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let a=document.createElement("style");a.classList.add("ft-lit-element--custom-stylesheet"),a.innerHTML=this.customStylesheet,this.shadowRoot.append(a)}}scheduleExportpartsUpdate(){var e,o,n;(!((e=this.exportpartsPrefix)===null||e===void 0)&&e.trim()||(n=(o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)!==null&&n!==void 0&&n)&&this[Ta].run(()=>{var i,a;!((i=this.exportpartsPrefix)===null||i===void 0)&&i.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((a=this.exportpartsPrefixes)===null||a===void 0?void 0:a.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})}setExportpartsAttribute(e){var o,n,i,a,s,l;let p=g=>g!=null&&g.trim().length>0,f=e.filter(p).map(g=>g.trim());if(f.length===0){this.removeAttribute("exportparts");return}let u=new Set;for(let g of(n=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelectorAll("[part],[exportparts]"))!==null&&n!==void 0?n:[]){let x=(a=(i=g.getAttribute("part"))===null||i===void 0?void 0:i.split(" "))!==null&&a!==void 0?a:[],b=(l=(s=g.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(S=>S.split(":")[1]))!==null&&l!==void 0?l:[];new Array(...x,...b).filter(p).map(S=>S.trim()).forEach(S=>u.add(S))}if(u.size===0){this.removeAttribute("exportparts");return}let y=[...u.values()].flatMap(g=>f.map(x=>`${g}:${x}--${g}`));this.setAttribute("exportparts",[...this.part,...y].join(", "))}};Na=Ta;To([(0,Kr.property)()],It.prototype,"exportpartsPrefix",void 0);To([Oa([])],It.prototype,"exportpartsPrefixes",void 0);To([(0,Kr.property)()],It.prototype,"customStylesheet",void 0);To([(0,Kr.state)()],It.prototype,"useAdoptedStyleSheets",void 0);function Zr(t){var e;return(e=t?.isFtReduxStore)!==null&&e!==void 0?e:!1}var La,Ia,Pa,Lo=Symbol("internalReduxEventsUnsubscribers"),Pt=Symbol("internalStoresUnsubscribers"),Xt=Symbol("internalStores"),qr=class extends It{constructor(){super(...arguments),this[La]=new Map,this[Ia]=new Map,this[Pa]=[]}get reduxConstructor(){return this.constructor}update(e){super.update(e),[...this.reduxConstructor.reduxReactiveProperties].some(o=>e.has(o))&&this.updateFromStores()}getUnnamedStore(){if(this[Xt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Xt].values()][0]}getStore(e){return e==null?this.getUnnamedStore():this[Xt].get(e)}addStore(e,o){var n;o=(n=o??(Zr(e)?e.name:void 0))!==null&&n!==void 0?n:"default-store",this.unsubscribeFromStore(o),this.setupStore(o,e)}removeStore(e){let o=typeof e=="string"?e:e.name;this.unsubscribeFromStore(o),this[Xt].delete(o)}setupStore(e,o){this[Xt].set(e,o),this.subscribeToStore(e,o),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Xt].forEach((e,o)=>this.subscribeToStore(o,e)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((e,o)=>{let n=this.constructor.getPropertyOptions(o);if(!n?.attribute||!this.hasAttribute(typeof n?.attribute=="string"?n.attribute:o)){let i=this.getStore(e.store);i&&(e.store?this[Pt].has(e.store):this[Pt].size>0)&&(this[o]=e.selector(i.getState(),this))}})}subscribeToStore(e,o){var n;this[Pt].set(e,o.subscribe(()=>this.updateFromStores())),Zr(o)&&o.eventBus&&((n=this.reduxConstructor.reduxEventListeners)===null||n===void 0||n.forEach((i,a)=>{if(typeof this[a]=="function"&&(!i.store||o.name===i.store)){let s=l=>this[a](l);o.eventBus.addEventListener(i.eventName,s),this[Lo].push(()=>o.eventBus.removeEventListener(i.eventName,s))}})),this.onStoreAvailable(e)}unsubscribeFromStores(){this[Pt].forEach((e,o)=>this.unsubscribeFromStore(o)),this[Lo].forEach(e=>e()),this[Lo]=[]}unsubscribeFromStore(e){this[Pt].has(e)&&this[Pt].get(e)(),this[Pt].delete(e)}onStoreAvailable(e){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}};La=Pt,Ia=Xt,Pa=Lo;qr.reduxProperties=new Map;qr.reduxReactiveProperties=new Set;qr.reduxEventListeners=new Map;function Ge(t){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n<e;n++)o[n-1]=arguments[n];if(0)var i,a;throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function gt(t){return!!t&&!!t[Y]}function Je(t){var e;return!!t&&(function(o){if(!o||typeof o!="object")return!1;var n=Object.getPrototypeOf(o);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Vd}(t)||Array.isArray(t)||!!t[Ua]||!!(!((e=t.constructor)===null||e===void 0)&&e[Ua])||Bn(t)||Mn(t))}function Qt(t,e,o){o===void 0&&(o=!1),xr(t)===0?(o?Object.keys:br)(t).forEach(function(n){o&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function xr(t){var e=t[Y];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Bn(t)?2:Mn(t)?3:0}function gr(t,e){return xr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Bd(t,e){return xr(t)===2?t.get(e):t[e]}function Fa(t,e,o){var n=xr(t);n===2?t.set(e,o):n===3?t.add(o):t[e]=o}function za(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function Bn(t){return Wd&&t instanceof Map}function Mn(t){return Hd&&t instanceof Set}function kt(t){return t.o||t.t}function Un(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Va(t);delete e[Y];for(var o=br(e),n=0;n<o.length;n++){var i=o[n],a=e[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(e[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Fn(t,e){return e===void 0&&(e=!1),zn(t)||gt(t)||!Je(t)||(xr(t)>1&&(t.set=t.add=t.clear=t.delete=Md),Object.freeze(t),e&&Qt(t,function(o,n){return Fn(n,!0)},!0)),t}function Md(){Ge(2)}function zn(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function dt(t){var e=$n[t];return e||Ge(18,t),e}function Ud(t,e){$n[t]||($n[t]=e)}function kn(){return Xr}function Tn(t,e){e&&(dt("Patches"),t.u=[],t.s=[],t.v=e)}function Io(t){_n(t),t.p.forEach(Fd),t.p=null}function _n(t){t===Xr&&(Xr=t.l)}function ka(t){return Xr={p:[],l:Xr,h:t,m:!0,_:0}}function Fd(t){var e=t[Y];e.i===0||e.i===1?e.j():e.g=!0}function Ln(t,e){e._=e.p.length;var o=e.p[0],n=t!==void 0&&t!==o;return e.h.O||dt("ES5").S(e,t,n),n?(o[Y].P&&(Io(e),Ge(4)),Je(t)&&(t=Po(e,t),e.l||ko(e,t)),e.u&&dt("Patches").M(o[Y].t,t,e.u,e.s)):t=Po(e,o,[]),Io(e),e.u&&e.v(e.u,e.s),t!==Ha?t:void 0}function Po(t,e,o){if(zn(e))return e;var n=e[Y];if(!n)return Qt(e,function(l,p){return _a(t,n,e,l,p,o)},!0),e;if(n.A!==t)return e;if(!n.P)return ko(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Un(n.k):n.o,a=i,s=!1;n.i===3&&(a=new Set(i),i.clear(),s=!0),Qt(a,function(l,p){return _a(t,n,i,l,p,o,s)}),ko(t,i,!1),o&&t.u&&dt("Patches").N(n,o,t.u,t.s)}return n.o}function _a(t,e,o,n,i,a,s){if(gt(i)){var l=Po(t,i,a&&e&&e.i!==3&&!gr(e.R,n)?a.concat(n):void 0);if(Fa(o,n,l),!gt(l))return;t.m=!1}else s&&o.add(i);if(Je(i)&&!zn(i)){if(!t.h.D&&t._<1)return;Po(t,i),e&&e.A.l||ko(t,i)}}function ko(t,e,o){o===void 0&&(o=!1),!t.l&&t.h.D&&t.m&&Fn(e,o)}function In(t,e){var o=t[Y];return(o?kt(o):t)[e]}function Da(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;o=Object.getPrototypeOf(o)}}function _t(t){t.P||(t.P=!0,t.l&&_t(t.l))}function Pn(t){t.o||(t.o=Un(t.t))}function Dn(t,e,o){var n=Bn(e)?dt("MapSet").F(e,o):Mn(e)?dt("MapSet").T(e,o):t.O?function(i,a){var s=Array.isArray(i),l={i:s?1:0,A:a?a.A:kn(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},p=l,f=Qr;s&&(p=[l],f=Yr);var u=Proxy.revocable(p,f),y=u.revoke,g=u.proxy;return l.k=g,l.j=y,g}(e,o):dt("ES5").J(e,o);return(o?o.A:kn()).p.push(n),n}function zd(t){return gt(t)||Ge(22,t),function e(o){if(!Je(o))return o;var n,i=o[Y],a=xr(o);if(i){if(!i.P&&(i.i<4||!dt("ES5").K(i)))return i.t;i.I=!0,n=$a(o,a),i.I=!1}else n=$a(o,a);return Qt(n,function(s,l){i&&Bd(i.t,s)===l||Fa(n,s,e(l))}),a===3?new Set(n):n}(t)}function $a(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Un(t)}function Wa(){function t(s,l){var p=a[s];return p?p.enumerable=l:a[s]=p={configurable:!0,enumerable:l,get:function(){var f=this[Y];return Qr.get(f,s)},set:function(f){var u=this[Y];Qr.set(u,s,f)}},p}function e(s){for(var l=s.length-1;l>=0;l--){var p=s[l][Y];if(!p.P)switch(p.i){case 5:n(p)&&_t(p);break;case 4:o(p)&&_t(p)}}}function o(s){for(var l=s.t,p=s.k,f=br(p),u=f.length-1;u>=0;u--){var y=f[u];if(y!==Y){var g=l[y];if(g===void 0&&!gr(l,y))return!0;var x=p[y],b=x&&x[Y];if(b?b.t!==g:!za(x,g))return!0}}var S=!!l[Y];return f.length!==br(l).length+(S?0:1)}function n(s){var l=s.k;if(l.length!==s.t.length)return!0;var p=Object.getOwnPropertyDescriptor(l,l.length-1);if(p&&!p.get)return!0;for(var f=0;f<l.length;f++)if(!l.hasOwnProperty(f))return!0;return!1}function i(s){s.g&&Ge(3,JSON.stringify(kt(s)))}var a={};Ud("ES5",{J:function(s,l){var p=Array.isArray(s),f=function(y,g){if(y){for(var x=Array(g.length),b=0;b<g.length;b++)Object.defineProperty(x,""+b,t(b,!0));return x}var S=Va(g);delete S[Y];for(var T=br(S),R=0;R<T.length;R++){var N=T[R];S[N]=t(N,y||!!S[N].enumerable)}return Object.create(Object.getPrototypeOf(g),S)}(p,s),u={i:p?5:4,A:l?l.A:kn(),P:!1,I:!1,R:{},l,t:s,k:f,o:null,g:!1,C:!1};return Object.defineProperty(f,Y,{value:u,writable:!0}),f},S:function(s,l,p){p?gt(l)&&l[Y].A===s&&e(s.p):(s.u&&function f(u){if(u&&typeof u=="object"){var y=u[Y];if(y){var g=y.t,x=y.k,b=y.R,S=y.i;if(S===4)Qt(x,function(k){k!==Y&&(g[k]!==void 0||gr(g,k)?b[k]||f(x[k]):(b[k]=!0,_t(y)))}),Qt(g,function(k){x[k]!==void 0||gr(x,k)||(b[k]=!1,_t(y))});else if(S===5){if(n(y)&&(_t(y),b.length=!0),x.length<g.length)for(var T=x.length;T<g.length;T++)b[T]=!1;else for(var R=g.length;R<x.length;R++)b[R]=!0;for(var N=Math.min(x.length,g.length),_=0;_<N;_++)x.hasOwnProperty(_)||(b[_]=!0),b[_]===void 0&&f(x[_])}}}}(s.p[0]),e(s.p))},K:function(s){return s.i===4?o(s):n(s)}})}var Ba,Xr,Wn=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Wd=typeof Map<"u",Hd=typeof Set<"u",Ma=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Ha=Wn?Symbol.for("immer-nothing"):((Ba={})["immer-nothing"]=!0,Ba),Ua=Wn?Symbol.for("immer-draftable"):"__$immer_draftable",Y=Wn?Symbol.for("immer-state"):"__$immer_state";var Vd=""+Object.prototype.constructor,br=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Va=Object.getOwnPropertyDescriptors||function(t){var e={};return br(t).forEach(function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)}),e},$n={},Qr={get:function(t,e){if(e===Y)return t;var o=kt(t);if(!gr(o,e))return function(i,a,s){var l,p=Da(a,s);return p?"value"in p?p.value:(l=p.get)===null||l===void 0?void 0:l.call(i.k):void 0}(t,o,e);var n=o[e];return t.I||!Je(n)?n:n===In(t.t,e)?(Pn(t),t.o[e]=Dn(t.A.h,n,t)):n},has:function(t,e){return e in kt(t)},ownKeys:function(t){return Reflect.ownKeys(kt(t))},set:function(t,e,o){var n=Da(kt(t),e);if(n?.set)return n.set.call(t.k,o),!0;if(!t.P){var i=In(kt(t),e),a=i?.[Y];if(a&&a.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(za(o,i)&&(o!==void 0||gr(t.t,e)))return!0;Pn(t),_t(t)}return t.o[e]===o&&(o!==void 0||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return In(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,Pn(t),_t(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=kt(t),n=Reflect.getOwnPropertyDescriptor(o,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:o[e]}},defineProperty:function(){Ge(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ge(12)}},Yr={};Qt(Qr,function(t,e){Yr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Yr.deleteProperty=function(t,e){return Yr.set.call(this,t,e,void 0)},Yr.set=function(t,e,o){return Qr.set.call(this,t[0],e,o,t[0])};var jd=function(){function t(o){var n=this;this.O=Ma,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var l=a;a=i;var p=n;return function(S){var T=this;S===void 0&&(S=l);for(var R=arguments.length,N=Array(R>1?R-1:0),_=1;_<R;_++)N[_-1]=arguments[_];return p.produce(S,function(k){var V;return(V=a).call.apply(V,[T,k].concat(N))})}}var f;if(typeof a!="function"&&Ge(6),s!==void 0&&typeof s!="function"&&Ge(7),Je(i)){var u=ka(n),y=Dn(n,i,void 0),g=!0;try{f=a(y),g=!1}finally{g?Io(u):_n(u)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(S){return Tn(u,s),Ln(S,u)},function(S){throw Io(u),S}):(Tn(u,s),Ln(f,u))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===Ha&&(f=void 0),n.D&&Fn(f,!0),s){var x=[],b=[];dt("Patches").M(i,f,x,b),s(x,b)}return f}Ge(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var u=arguments.length,y=Array(u>1?u-1:0),g=1;g<u;g++)y[g-1]=arguments[g];return n.produceWithPatches(f,function(x){return i.apply(void 0,[x].concat(y))})};var s,l,p=n.produce(i,a,function(f,u){s=f,l=u});return typeof Promise<"u"&&p instanceof Promise?p.then(function(f){return[f,s,l]}):[p,s,l]},typeof o?.useProxies=="boolean"&&this.setUseProxies(o.useProxies),typeof o?.autoFreeze=="boolean"&&this.setAutoFreeze(o.autoFreeze)}var e=t.prototype;return e.createDraft=function(o){Je(o)||Ge(8),gt(o)&&(o=zd(o));var n=ka(this),i=Dn(this,o,void 0);return i[Y].C=!0,_n(n),i},e.finishDraft=function(o,n){var i=o&&o[Y],a=i.A;return Tn(a,n),Ln(void 0,a)},e.setAutoFreeze=function(o){this.D=o},e.setUseProxies=function(o){o&&!Ma&&Ge(20),this.O=o},e.applyPatches=function(o,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){o=a.value;break}}i>-1&&(n=n.slice(i+1));var s=dt("Patches").$;return gt(o)?s(o,n):this.produce(o,function(l){return s(l,n)})},t}(),De=new jd,Gd=De.produce,eu=De.produceWithPatches.bind(De),tu=De.setAutoFreeze.bind(De),ru=De.setUseProxies.bind(De),ou=De.applyPatches.bind(De),nu=De.createDraft.bind(De),iu=De.finishDraft.bind(De),_o=Gd;function Dt(t){"@babel/helpers - typeof";return Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(t)}function Hn(t,e){if(Dt(t)!=="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(Dt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vn(t){var e=Hn(t,"string");return Dt(e)==="symbol"?e:String(e)}function jn(t,e,o){return e=Vn(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ja(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),o.push.apply(o,n)}return o}function Do(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?ja(Object(o),!0).forEach(function(n){jn(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ja(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function xe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ga=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Gn=function(){return Math.random().toString(36).substring(7).split("").join(".")},$o={INIT:"@@redux/INIT"+Gn(),REPLACE:"@@redux/REPLACE"+Gn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Gn()}};function Kd(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Kn(t,e,o){var n;if(typeof e=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof e=="function"&&typeof o>"u"&&(o=e,e=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(xe(1));return o(Kn)(t,e)}if(typeof t!="function")throw new Error(xe(2));var i=t,a=e,s=[],l=s,p=!1;function f(){l===s&&(l=s.slice())}function u(){if(p)throw new Error(xe(3));return a}function y(S){if(typeof S!="function")throw new Error(xe(4));if(p)throw new Error(xe(5));var T=!0;return f(),l.push(S),function(){if(T){if(p)throw new Error(xe(6));T=!1,f();var N=l.indexOf(S);l.splice(N,1),s=null}}}function g(S){if(!Kd(S))throw new Error(xe(7));if(typeof S.type>"u")throw new Error(xe(8));if(p)throw new Error(xe(9));try{p=!0,a=i(a,S)}finally{p=!1}for(var T=s=l,R=0;R<T.length;R++){var N=T[R];N()}return S}function x(S){if(typeof S!="function")throw new Error(xe(10));i=S,g({type:$o.REPLACE})}function b(){var S,T=y;return S={subscribe:function(N){if(typeof N!="object"||N===null)throw new Error(xe(11));function _(){N.next&&N.next(u())}_();var k=T(_);return{unsubscribe:k}}},S[Ga]=function(){return this},S}return g({type:$o.INIT}),n={dispatch:g,subscribe:y,getState:u,replaceReducer:x},n[Ga]=b,n}function Zd(t){Object.keys(t).forEach(function(e){var o=t[e],n=o(void 0,{type:$o.INIT});if(typeof n>"u")throw new Error(xe(12));if(typeof o(void 0,{type:$o.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function Ka(t){for(var e=Object.keys(t),o={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(o[i]=t[i])}var a=Object.keys(o),s,l;try{Zd(o)}catch(p){l=p}return function(f,u){if(f===void 0&&(f={}),l)throw l;if(0)var y;for(var g=!1,x={},b=0;b<a.length;b++){var S=a[b],T=o[S],R=f[S],N=T(R,u);if(typeof N>"u"){var _=u&&u.type;throw new Error(xe(14))}x[S]=N,g=g||N!==R}return g=g||a.length!==Object.keys(f).length,g?x:f}}function vr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function Za(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(n){return function(){var i=n.apply(void 0,arguments),a=function(){throw new Error(xe(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},l=e.map(function(p){return p(s)});return a=vr.apply(void 0,l)(i.dispatch),Do(Do({},i),{},{dispatch:a})}}}function qa(t){var e=function(n){var i=n.dispatch,a=n.getState;return function(s){return function(l){return typeof l=="function"?l(i,a,t):s(l)}}};return e}var Ya=qa();Ya.withExtraArgument=qa;var Zn=Ya;var ts=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function n(){this.constructor=e}e.prototype=o===null?Object.create(o):(n.prototype=o.prototype,new n)}}(),qd=function(t,e){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(f){return function(u){return p([f,u])}}function p(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,i=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(f[0]===6&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(t,o)}catch(u){f=[6,u],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Sr=function(t,e){for(var o=0,n=e.length,i=t.length;o<n;o++,i++)t[i]=e[o];return t},Yd=Object.defineProperty,Xd=Object.defineProperties,Qd=Object.getOwnPropertyDescriptors,Xa=Object.getOwnPropertySymbols,Jd=Object.prototype.hasOwnProperty,ep=Object.prototype.propertyIsEnumerable,Qa=function(t,e,o){return e in t?Yd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},$t=function(t,e){for(var o in e||(e={}))Jd.call(e,o)&&Qa(t,o,e[o]);if(Xa)for(var n=0,i=Xa(e);n<i.length;n++){var o=i[n];ep.call(e,o)&&Qa(t,o,e[o])}return t},qn=function(t,e){return Xd(t,Qd(e))},tp=function(t,e,o){return new Promise(function(n,i){var a=function(p){try{l(o.next(p))}catch(f){i(f)}},s=function(p){try{l(o.throw(p))}catch(f){i(f)}},l=function(p){return p.done?n(p.value):Promise.resolve(p.value).then(a,s)};l((o=o.apply(t,e)).next())})};var rp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vr:vr.apply(null,arguments)},Cu=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function op(t){if(typeof t!="object"||t===null)return!1;var e=Object.getPrototypeOf(t);if(e===null)return!0;for(var o=e;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return e===o}var np=function(t){ts(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Sr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],o.concat(this))))},e}(Array),ip=function(t){ts(e,t);function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return t.prototype.concat.apply(this,o)},e.prototype.prepend=function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.length===1&&Array.isArray(o[0])?new(e.bind.apply(e,Sr([void 0],o[0].concat(this)))):new(e.bind.apply(e,Sr([void 0],o.concat(this))))},e}(Array);function Qn(t){return Je(t)?_o(t,function(){}):t}function ap(t){return typeof t=="boolean"}function sp(){return function(e){return lp(e)}}function lp(t){t===void 0&&(t={});var e=t.thunk,o=e===void 0?!0:e,n=t.immutableCheck,i=n===void 0?!0:n,a=t.serializableCheck,s=a===void 0?!0:a,l=new np;if(o&&(ap(o)?l.push(Zn):l.push(Zn.withExtraArgument(o.extraArgument))),0){if(i)var p;if(s)var f}return l}var Yn=!0;function rs(t){var e=sp(),o=t||{},n=o.reducer,i=n===void 0?void 0:n,a=o.middleware,s=a===void 0?e():a,l=o.devTools,p=l===void 0?!0:l,f=o.preloadedState,u=f===void 0?void 0:f,y=o.enhancers,g=y===void 0?void 0:y,x;if(typeof i=="function")x=i;else if(op(i))x=Ka(i);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 b=s;if(typeof b=="function"&&(b=b(e),!Yn&&!Array.isArray(b)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yn&&b.some(function(k){return typeof k!="function"}))throw new Error("each middleware provided to configureStore must be a function");var S=Za.apply(void 0,b),T=vr;p&&(T=rp($t({trace:!Yn},typeof p=="object"&&p)));var R=new ip(S),N=R;Array.isArray(g)?N=Sr([S],g):typeof g=="function"&&(N=g(R));var _=T.apply(void 0,N);return Kn(x,u,_)}function Bt(t,e){function o(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var a=e.apply(void 0,n);if(!a)throw new Error("prepareAction did not return an object");return $t($t({type:t,payload:a.payload},"meta"in a&&{meta:a.meta}),"error"in a&&{error:a.error})}return{type:t,payload:n[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(n){return n.type===t},o}function os(t){var e={},o=[],n,i={addCase:function(a,s){var l=typeof a=="string"?a:a.type;if(l in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[l]=s,i},addMatcher:function(a,s){return o.push({matcher:a,reducer:s}),i},addDefaultCase:function(a){return n=a,i}};return t(i),[e,o,n]}function cp(t){return typeof t=="function"}function dp(t,e,o,n){o===void 0&&(o=[]);var i=typeof e=="function"?os(e):[e,o,n],a=i[0],s=i[1],l=i[2],p;if(cp(t))p=function(){return Qn(t())};else{var f=Qn(t);p=function(){return f}}function u(y,g){y===void 0&&(y=p());var x=Sr([a[g.type]],s.filter(function(b){var S=b.matcher;return S(g)}).map(function(b){var S=b.reducer;return S}));return x.filter(function(b){return!!b}).length===0&&(x=[l]),x.reduce(function(b,S){if(S)if(gt(b)){var T=b,R=S(T,g);return R===void 0?b:R}else{if(Je(b))return _o(b,function(N){return S(N,g)});var R=S(b,g);if(R===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return R}return b},y)}return u.getInitialState=p,u}function pp(t,e){return t+"/"+e}function ns(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");typeof process<"u";var o=typeof t.initialState=="function"?t.initialState:Qn(t.initialState),n=t.reducers||{},i=Object.keys(n),a={},s={},l={};i.forEach(function(u){var y=n[u],g=pp(e,u),x,b;"reducer"in y?(x=y.reducer,b=y.prepare):x=y,a[u]=x,s[g]=x,l[u]=b?Bt(g,b):Bt(g)});function p(){var u=typeof t.extraReducers=="function"?os(t.extraReducers):[t.extraReducers],y=u[0],g=y===void 0?{}:y,x=u[1],b=x===void 0?[]:x,S=u[2],T=S===void 0?void 0:S,R=$t($t({},g),s);return dp(o,function(N){for(var _ in R)N.addCase(_,R[_]);for(var k=0,V=b;k<V.length;k++){var Re=V[k];N.addMatcher(Re.matcher,Re.reducer)}T&&N.addDefaultCase(T)})}var f;return{name:e,reducer:function(u,y){return f||(f=p()),f(u,y)},actions:l,caseReducers:a,getInitialState:function(){return f||(f=p()),f.getInitialState()}}}var fp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",up=function(t){t===void 0&&(t=21);for(var e="",o=t;o--;)e+=fp[Math.random()*64|0];return e},hp=["name","message","stack","code"],Xn=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),Ja=function(){function t(e,o){this.payload=e,this.meta=o}return t}(),mp=function(t){if(typeof t=="object"&&t!==null){for(var e={},o=0,n=hp;o<n.length;o++){var i=n[o];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}},Ru=function(){function t(e,o,n){var i=Bt(e+"/fulfilled",function(u,y,g,x){return{payload:u,meta:qn($t({},x||{}),{arg:g,requestId:y,requestStatus:"fulfilled"})}}),a=Bt(e+"/pending",function(u,y,g){return{payload:void 0,meta:qn($t({},g||{}),{arg:y,requestId:u,requestStatus:"pending"})}}),s=Bt(e+"/rejected",function(u,y,g,x,b){return{payload:x,error:(n&&n.serializeError||mp)(u||"Rejected"),meta:qn($t({},b||{}),{arg:g,requestId:y,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),l=!1,p=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function f(u){return function(y,g,x){var b=n?.idGenerator?n.idGenerator(u):up(),S=new p,T,R=!1;function N(k){T=k,S.abort()}var _=function(){return tp(this,null,function(){var k,V,Re,se,jr,Ve,m;return qd(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),se=(k=n?.condition)==null?void 0:k.call(n,u,{getState:g,extra:x}),gp(se)?[4,se]:[3,2];case 1:se=v.sent(),v.label=2;case 2:if(se===!1||S.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return R=!0,jr=new Promise(function(L,q){return S.signal.addEventListener("abort",function(){return q({name:"AbortError",message:T||"Aborted"})})}),y(a(b,u,(V=n?.getPendingMeta)==null?void 0:V.call(n,{requestId:b,arg:u},{getState:g,extra:x}))),[4,Promise.race([jr,Promise.resolve(o(u,{dispatch:y,getState:g,extra:x,requestId:b,signal:S.signal,abort:N,rejectWithValue:function(L,q){return new Xn(L,q)},fulfillWithValue:function(L,q){return new Ja(L,q)}})).then(function(L){if(L instanceof Xn)throw L;return L instanceof Ja?i(L.payload,b,u,L.meta):i(L,b,u)})])];case 3:return Re=v.sent(),[3,5];case 4:return Ve=v.sent(),Re=Ve instanceof Xn?s(null,b,u,Ve.payload,Ve.meta):s(Ve,b,u),[3,5];case 5:return m=n&&!n.dispatchConditionRejection&&s.match(Re)&&Re.meta.condition,m||y(Re),[2,Re]}})})}();return Object.assign(_,{abort:N,requestId:b,arg:u,unwrap:function(){return _.then(yp)}})}}return Object.assign(f,{pending:a,rejected:s,fulfilled:i,typePrefix:e})}return t.withTypes=function(){return t},t}();function yp(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function gp(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var is="listener",as="completed",ss="cancelled",Nu="task-"+ss,Tu="task-"+as,Lu=is+"-"+ss,Iu=is+"-"+as;var Jn="listenerMiddleware";var Pu=Bt(Jn+"/add"),ku=Bt(Jn+"/removeAll"),_u=Bt(Jn+"/remove");var es,Du=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(t){return(es||(es=Promise.resolve())).then(t).catch(function(e){return setTimeout(function(){throw e},0)})},bp=function(t){return function(e){setTimeout(e,t)}},$u=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:bp(10);Wa();window.ftReduxStores||(window.ftReduxStores={});var ls=class t{static get(e){var o;let n=typeof e=="string"?e:e.name,i=typeof e=="string"?void 0:e,a=window.ftReduxStores[n];if(Zr(a))return a;if(i==null)return;let s=ns({...i,reducers:(o=i.reducers)!==null&&o!==void 0?o:{}}),l=rs({reducer:(p,f)=>f.type==="CLEAR_FT_REDUX_STORE"?s.getInitialState():typeof f.type=="string"&&f.type.startsWith("DEFAULT_VALUE_SETTER__")?{...p,...f.overwrites}:s.reducer(p,f)});return window.ftReduxStores[i.name]=new t(s,l)}constructor(e,o){this.reduxSlice=e,this.reduxStore=o,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new wo,this.actions=new Proxy(this.reduxSlice.actions,{get:(n,i,a)=>{let s=i,l=n[s];return l?(...p)=>{let f=l(...p);return this.reduxStore.dispatch(f),f}:p=>{this.setState({[s]:p})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(e){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(e).join("_"),overwrites:e})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(e){throw new Error("Not implemented yet.")}subscribe(e){return this.reduxStore.subscribe(e)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var Fo=h(w());var Bo=class extends ct{async listMySearches(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),5*60*1e3):[]}};var Mo=class extends ct{async listMyBookmarks(){let e=P.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),5*60*1e3):[]}};var vp="ft-user-assets",Uo=Fo.FtReduxStore.get({name:vp,initialState:{savedSearches:void 0,bookmarks:void 0}}),ei=class{constructor(){this.currentSession=P.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Mo,this.savedSearchesService=new Bo,P.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:o}=P.getState();(0,Fo.deepEqual)((e=this.currentSession)===null||e===void 0?void 0:e.profile,o?.profile)||(this.currentSession=o,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Uo.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Uo.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();Uo.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let o=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Uo.actions.bookmarks(o)}}},cs=new ei;var ti=class{addCommand(e,o=!1){P.commands.add(e,o)}consumeCommand(e){return P.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new ti;var ds=h(w()),ri=class{highlightHtml(e,o){(0,ds.highlightHtml)(e,o)}};window.FluidTopicsHighlightHtmlService=new ri;var ps=h(w());var oi=class{isDate(e){var o,n,i,a;return(a=(i=((n=(o=P.getState().metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]).find(l=>l.key===e))===null||i===void 0?void 0:i.date)!==null&&a!==void 0?a:!1}format(e,o){var n,i,a;return ps.DateFormatter.format(e,(n=o?.locale)!==null&&n!==void 0?n:P.getState().uiLocale,(i=o?.longFormat)!==null&&i!==void 0?i:!1,(a=o?.withTime)!==null&&a!==void 0?a:!1)}};window.FluidTopicsDateService=new oi;(0,fs.customElement)("ft-app-context")(te);var zo=class extends ct{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}};var eo=t=>t.request.virtualField===hr.TITLE_ONLY&&t.request.scope===mr.DOCUMENTS,Wo=class t extends Event{constructor(){super(t.eventName)}};Wo.eventName="search-context-clear-all-filters";var Jr=class t{static build(e,o){return new t(Qi(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new pt.Debouncer(10),this.searchDebouncer=new pt.Debouncer(100),this.suggestDebouncer=new pt.Debouncer(300),this.service=o??new zo}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let o=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(o){let i=a=>o.some(s=>s.lang==a);i(e)||(e=i(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>n.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(hr.TITLE_ONLY),this.store.actions.setRequestScope(mr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(hr.EVERYWHERE),this.store.actions.setRequestScope(mr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return eo(this.store.getState())}get periodFilter(){return this.store.getState().request.periodFilter}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Wo)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){let n=this.store.getState().request.filters,i={key:e,values:o,negative:!1},a=[...n.filter(s=>s.key!==e),i];this.setFilters(a)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setPeriodFilter(e){this.store.actions.setRequestPeriodFilter(e),this.store.actions.setPageNumber(1),this.launchSearch()}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,pt.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof pt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,filters:n.filters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,pt.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(o){!(o instanceof pt.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}};var Sp=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},ii=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},ni=Symbol("registerInterval");function Op(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[ni]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[ni]):this.dispatchEvent(new ii)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=ni,Sp([(0,hs.state)()],o.prototype,"stateManager",void 0),o}var Mt=class extends Op(us.FtLitElementRedux){};var Ii=h(w());var ln=h(I()),we=h(H()),Rc=h(Ut()),dn=h(w());var ws=h(w());var Cs=h(I()),ye=h(H()),Es=h(Ut()),to=h(w());var Ss=h(I()),ne=h(w()),ys=ne.FtCssVariableFactory.extend("--ft-ripple-color","",ne.designSystemVariables.colorContent),M={color:ys,backgroundColor:ne.FtCssVariableFactory.extend("--ft-ripple-background-color","",ys),opacityContentOnSurfacePressed:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ne.FtCssVariableFactory.external(ne.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ne.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},gs=ne.FtCssVariableFactory.extend("--ft-ripple-color","",ne.designSystemVariables.colorPrimary),bs={color:gs,backgroundColor:ne.FtCssVariableFactory.extend("--ft-ripple-background-color","",gs)},xs=ne.FtCssVariableFactory.extend("--ft-ripple-color","",ne.designSystemVariables.colorSecondary),vs={color:xs,backgroundColor:ne.FtCssVariableFactory.extend("--ft-ripple-background-color","",xs)},Os=Ss.css`
|
|
15
15
|
:host {
|
|
16
16
|
display: contents;
|
|
17
17
|
}
|
|
@@ -536,7 +536,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
536
536
|
position: relative;
|
|
537
537
|
word-break: break-word;
|
|
538
538
|
}
|
|
539
|
-
`;var Gl=["top","right","bottom","left"],jl=["start","end"],bi=Gl.reduce((t,e)=>t.concat(e,e+"-"+jl[0],e+"-"+jl[1]),[]),lo=Math.min,Wt=Math.max,co=Math.round;var Ot=t=>({x:t,y:t}),Tp={left:"right",right:"left",bottom:"top",top:"bottom"},Lp={start:"end",end:"start"};function xi(t,e,o){return Wt(t,lo(e,o))}function Xo(t,e){return typeof t=="function"?t(e):t}function _r(t){return t.split("-")[0]}function Ht(t){return t.split("-")[1]}function vi(t){return t==="x"?"y":"x"}function Si(t){return t==="y"?"height":"width"}function Qo(t){return["top","bottom"].includes(_r(t))?"y":"x"}function Oi(t){return vi(Qo(t))}function Kl(t,e,o){o===void 0&&(o=!1);let n=Ht(t),i=Oi(t),a=Si(i),s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=gi(s)),[s,gi(s)]}function Zl(t){return t.replace(/start|end/g,e=>Lp[e])}function gi(t){return t.replace(/left|right|bottom|top/g,e=>Tp[e])}function Ip(t){return{top:0,right:0,bottom:0,left:0,...t}}function ql(t){return typeof t!="number"?Ip(t):{top:t,right:t,bottom:t,left:t}}function or(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Yl(t,e,o){let{reference:n,floating:i}=t,a=Qo(e),s=Oi(e),l=Si(s),p=_r(e),f=a==="y",u=n.x+n.width/2-i.width/2,y=n.y+n.height/2-i.height/2,g=n[l]/2-i[l]/2,x;switch(p){case"top":x={x:u,y:n.y-i.height};break;case"bottom":x={x:u,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y};break;case"left":x={x:n.x-i.width,y};break;default:x={x:n.x,y:n.y}}switch(Ht(e)){case"start":x[s]-=g*(o&&f?-1:1);break;case"end":x[s]+=g*(o&&f?-1:1);break}return x}var Xl=async(t,e,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=o,l=a.filter(Boolean),p=await(s.isRTL==null?void 0:s.isRTL(e)),f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y}=Yl(f,n,p),g=n,x={},b=0;for(let S=0;S<l.length;S++){let{name:T,fn:R}=l[S],{x:N,y:_,data:k,reset:V}=await R({x:u,y,initialPlacement:n,placement:g,strategy:i,middlewareData:x,rects:f,platform:s,elements:{reference:t,floating:e}});if(u=N??u,y=_??y,x={...x,[T]:{...x[T],...k}},V&&b<=50){b++,typeof V=="object"&&(V.placement&&(g=V.placement),V.rects&&(f=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):V.rects),{x:u,y}=Yl(f,g,p)),S=-1;continue}}return{x:u,y,placement:g,strategy:i,middlewareData:x}};async function Ci(t,e){var o;e===void 0&&(e={});let{x:n,y:i,platform:a,rects:s,elements:l,strategy:p}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:y="floating",altBoundary:g=!1,padding:x=0}=Xo(e,t),b=ql(x),T=l[g?y==="floating"?"reference":"floating":y],R=or(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(T)))==null||o?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:p})),N=y==="floating"?{...s.floating,x:n,y:i}:s.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),k=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},V=or(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:N,offsetParent:_,strategy:p}):N);return{top:(R.top-V.top+b.top)/k.y,bottom:(V.bottom-R.bottom+b.bottom)/k.y,left:(R.left-V.left+b.left)/k.x,right:(V.right-R.right+b.right)/k.x}}function Pp(t,e,o){return(t?[...o.filter(i=>Ht(i)===t),...o.filter(i=>Ht(i)!==t)]:o.filter(i=>_r(i)===i)).filter(i=>t?Ht(i)===t||(e?Zl(i)!==i:!1):!0)}var Ei=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,i;let{rects:a,middlewareData:s,placement:l,platform:p,elements:f}=e,{crossAxis:u=!1,alignment:y,allowedPlacements:g=bi,autoAlignment:x=!0,...b}=Xo(t,e),S=y!==void 0||g===bi?Pp(y||null,x,g):g,T=await Ci(e,b),R=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[R];if(N==null)return{};let _=Kl(N,a,await(p.isRTL==null?void 0:p.isRTL(f.floating)));if(l!==N)return{reset:{placement:S[0]}};let k=[T[_r(N)],T[_[0]],T[_[1]]],V=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:k}],Re=S[R+1];if(Re)return{data:{index:R+1,overflows:V},reset:{placement:Re}};let se=V.map(m=>{let v=Ht(m.placement);return[m.placement,v&&u?m.overflows.slice(0,2).reduce((L,Z)=>L+Z,0):m.overflows[0],m.overflows]}).sort((m,v)=>m[1]-v[1]),Ve=((i=se.filter(m=>m[2].slice(0,Ht(m[0])?2:3).every(v=>v<=0))[0])==null?void 0:i[0])||se[0][0];return Ve!==l?{data:{index:R+1,overflows:V},reset:{placement:Ve}}:{}}}};var wi=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:T=>{let{x:R,y:N}=T;return{x:R,y:N}}},...p}=Xo(t,e),f={x:o,y:n},u=await Ci(e,p),y=Qo(_r(i)),g=vi(y),x=f[g],b=f[y];if(a){let T=g==="y"?"top":"left",R=g==="y"?"bottom":"right",N=x+u[T],_=x-u[R];x=xi(N,x,_)}if(s){let T=y==="y"?"top":"left",R=y==="y"?"bottom":"right",N=b+u[T],_=b-u[R];b=xi(N,b,_)}let S=l.fn({...e,[g]:x,[y]:b});return{...S,data:{x:S.x-o,y:S.y-n}}}}};function Ct(t){return Jl(t)?(t.nodeName||"").toLowerCase():"#document"}function Te(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Et(t){var e;return(e=(Jl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Jl(t){return t instanceof Node||t instanceof Te(t).Node}function ht(t){return t instanceof Element||t instanceof Te(t).Element}function et(t){return t instanceof HTMLElement||t instanceof Te(t).HTMLElement}function Ql(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Te(t).ShadowRoot}function Dr(t){let{overflow:e,overflowX:o,overflowY:n,display:i}=$e(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function ec(t){return["table","td","th"].includes(Ct(t))}function en(t){let e=tn(),o=$e(t);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function tc(t){let e=nr(t);for(;et(e)&&!po(e);){if(en(e))return e;e=nr(e)}return null}function tn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function po(t){return["html","body","#document"].includes(Ct(t))}function $e(t){return Te(t).getComputedStyle(t)}function fo(t){return ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nr(t){if(Ct(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ql(t)&&t.host||Et(t);return Ql(e)?e.host:e}function rc(t){let e=nr(t);return po(e)?t.ownerDocument?t.ownerDocument.body:t.body:et(e)&&Dr(e)?e:rc(e)}function Jo(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);let i=rc(t),a=i===((n=t.ownerDocument)==null?void 0:n.body),s=Te(i);return a?e.concat(s,s.visualViewport||[],Dr(i)?i:[],s.frameElement&&o?Jo(s.frameElement):[]):e.concat(i,Jo(i,[],o))}function ic(t){let e=$e(t),o=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=et(t),a=i?t.offsetWidth:o,s=i?t.offsetHeight:n,l=co(o)!==a||co(n)!==s;return l&&(o=a,n=s),{width:o,height:n,$:l}}function ac(t){return ht(t)?t:t.contextElement}function $r(t){let e=ac(t);if(!et(e))return Ot(1);let o=e.getBoundingClientRect(),{width:n,height:i,$:a}=ic(e),s=(a?co(o.width):o.width)/n,l=(a?co(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var kp=Ot(0);function sc(t){let e=Te(t);return!tn()||!e.visualViewport?kp:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _p(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==Te(t)?!1:e}function uo(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);let i=t.getBoundingClientRect(),a=ac(t),s=Ot(1);e&&(n?ht(n)&&(s=$r(n)):s=$r(t));let l=_p(a,o,n)?sc(a):Ot(0),p=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,y=i.height/s.y;if(a){let g=Te(a),x=n&&ht(n)?Te(n):n,b=g.frameElement;for(;b&&n&&x!==g;){let S=$r(b),T=b.getBoundingClientRect(),R=$e(b),N=T.left+(b.clientLeft+parseFloat(R.paddingLeft))*S.x,_=T.top+(b.clientTop+parseFloat(R.paddingTop))*S.y;p*=S.x,f*=S.y,u*=S.x,y*=S.y,p+=N,f+=_,b=Te(b).frameElement}}return or({width:u,height:y,x:p,y:f})}function Dp(t){let{rect:e,offsetParent:o,strategy:n}=t,i=et(o),a=Et(o);if(o===a)return e;let s={scrollLeft:0,scrollTop:0},l=Ot(1),p=Ot(0);if((i||!i&&n!=="fixed")&&((Ct(o)!=="body"||Dr(a))&&(s=fo(o)),et(o))){let f=uo(o);l=$r(o),p.x=f.x+o.clientLeft,p.y=f.y+o.clientTop}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-s.scrollLeft*l.x+p.x,y:e.y*l.y-s.scrollTop*l.y+p.y}}function $p(t){return Array.from(t.getClientRects())}function lc(t){return uo(Et(t)).left+fo(t).scrollLeft}function Bp(t){let e=Et(t),o=fo(t),n=t.ownerDocument.body,i=Wt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Wt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+lc(t),l=-o.scrollTop;return $e(n).direction==="rtl"&&(s+=Wt(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:l}}function Mp(t,e){let o=Te(t),n=Et(t),i=o.visualViewport,a=n.clientWidth,s=n.clientHeight,l=0,p=0;if(i){a=i.width,s=i.height;let f=tn();(!f||f&&e==="fixed")&&(l=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:l,y:p}}function Up(t,e){let o=uo(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,a=et(t)?$r(t):Ot(1),s=t.clientWidth*a.x,l=t.clientHeight*a.y,p=i*a.x,f=n*a.y;return{width:s,height:l,x:p,y:f}}function oc(t,e,o){let n;if(e==="viewport")n=Mp(t,o);else if(e==="document")n=Bp(Et(t));else if(ht(e))n=Up(e,o);else{let i=sc(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return or(n)}function cc(t,e){let o=nr(t);return o===e||!ht(o)||po(o)?!1:$e(o).position==="fixed"||cc(o,e)}function Fp(t,e){let o=e.get(t);if(o)return o;let n=Jo(t,[],!1).filter(l=>ht(l)&&Ct(l)!=="body"),i=null,a=$e(t).position==="fixed",s=a?nr(t):t;for(;ht(s)&&!po(s);){let l=$e(s),p=en(s);!p&&l.position==="fixed"&&(i=null),(a?!p&&!i:!p&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Dr(s)&&!p&&cc(t,s))?n=n.filter(u=>u!==s):i=l,s=nr(s)}return e.set(t,n),n}function zp(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t,s=[...o==="clippingAncestors"?Fp(e,this._c):[].concat(o),n],l=s[0],p=s.reduce((f,u)=>{let y=oc(e,u,i);return f.top=Wt(y.top,f.top),f.right=lo(y.right,f.right),f.bottom=lo(y.bottom,f.bottom),f.left=Wt(y.left,f.left),f},oc(e,l,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Wp(t){return ic(t)}function Hp(t,e,o){let n=et(e),i=Et(e),a=o==="fixed",s=uo(t,!0,a,e),l={scrollLeft:0,scrollTop:0},p=Ot(0);if(n||!n&&!a)if((Ct(e)!=="body"||Dr(i))&&(l=fo(e)),n){let f=uo(e,!0,a,e);p.x=f.x+e.clientLeft,p.y=f.y+e.clientTop}else i&&(p.x=lc(i));return{x:s.left+l.scrollLeft-p.x,y:s.top+l.scrollTop-p.y,width:s.width,height:s.height}}function nc(t,e){return!et(t)||$e(t).position==="fixed"?null:e?e(t):t.offsetParent}function dc(t,e){let o=Te(t);if(!et(t))return o;let n=nc(t,e);for(;n&&ec(n)&&$e(n).position==="static";)n=nc(n,e);return n&&(Ct(n)==="html"||Ct(n)==="body"&&$e(n).position==="static"&&!en(n))?o:n||tc(t)||o}var Vp=async function(t){let{reference:e,floating:o,strategy:n}=t,i=this.getOffsetParent||dc,a=this.getDimensions;return{reference:Hp(e,await i(o),n),floating:{x:0,y:0,...await a(o)}}};function jp(t){return $e(t).direction==="rtl"}var rn={convertOffsetParentRelativeRectToViewportRelativeRect:Dp,getDocumentElement:Et,getClippingRect:zp,getOffsetParent:dc,getElementRects:Vp,getClientRects:$p,getDimensions:Wp,getScale:$r,isElement:ht,isRTL:jp};var pc=(t,e,o)=>{let n=new Map,i={platform:rn,...o},a={...i.platform,_c:n};return Xl(t,e,{...i,platform:a})};function fc(t){return Gp(t)}function Ai(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Gp(t){for(let e=t;e;e=Ai(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Ai(t);e;e=Ai(e)){if(!(e instanceof Element))continue;let o=getComputedStyle(e);if(o.display!=="contents"&&(o.position!=="static"||o.filter!=="none"||e.tagName==="BODY"))return e}return null}async function uc(t,e,o){return pc(t,e,{platform:{...rn,getOffsetParent:n=>rn.getOffsetParent(n,fc)},middleware:[wi({crossAxis:!0}),Ei({allowedPlacements:[o]})]})}var Le=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Y=class extends ho.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new ho.Debouncer,this.revealDebouncer=new ho.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return hc.html`
|
|
539
|
+
`;var Gl=["top","right","bottom","left"],jl=["start","end"],bi=Gl.reduce((t,e)=>t.concat(e,e+"-"+jl[0],e+"-"+jl[1]),[]),lo=Math.min,Wt=Math.max,co=Math.round;var Ot=t=>({x:t,y:t}),Tp={left:"right",right:"left",bottom:"top",top:"bottom"},Lp={start:"end",end:"start"};function xi(t,e,o){return Wt(t,lo(e,o))}function Xo(t,e){return typeof t=="function"?t(e):t}function _r(t){return t.split("-")[0]}function Ht(t){return t.split("-")[1]}function vi(t){return t==="x"?"y":"x"}function Si(t){return t==="y"?"height":"width"}function Qo(t){return["top","bottom"].includes(_r(t))?"y":"x"}function Oi(t){return vi(Qo(t))}function Kl(t,e,o){o===void 0&&(o=!1);let n=Ht(t),i=Oi(t),a=Si(i),s=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(s=gi(s)),[s,gi(s)]}function Zl(t){return t.replace(/start|end/g,e=>Lp[e])}function gi(t){return t.replace(/left|right|bottom|top/g,e=>Tp[e])}function Ip(t){return{top:0,right:0,bottom:0,left:0,...t}}function ql(t){return typeof t!="number"?Ip(t):{top:t,right:t,bottom:t,left:t}}function or(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Yl(t,e,o){let{reference:n,floating:i}=t,a=Qo(e),s=Oi(e),l=Si(s),p=_r(e),f=a==="y",u=n.x+n.width/2-i.width/2,y=n.y+n.height/2-i.height/2,g=n[l]/2-i[l]/2,x;switch(p){case"top":x={x:u,y:n.y-i.height};break;case"bottom":x={x:u,y:n.y+n.height};break;case"right":x={x:n.x+n.width,y};break;case"left":x={x:n.x-i.width,y};break;default:x={x:n.x,y:n.y}}switch(Ht(e)){case"start":x[s]-=g*(o&&f?-1:1);break;case"end":x[s]+=g*(o&&f?-1:1);break}return x}var Xl=async(t,e,o)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=o,l=a.filter(Boolean),p=await(s.isRTL==null?void 0:s.isRTL(e)),f=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y}=Yl(f,n,p),g=n,x={},b=0;for(let S=0;S<l.length;S++){let{name:T,fn:R}=l[S],{x:N,y:_,data:k,reset:V}=await R({x:u,y,initialPlacement:n,placement:g,strategy:i,middlewareData:x,rects:f,platform:s,elements:{reference:t,floating:e}});if(u=N??u,y=_??y,x={...x,[T]:{...x[T],...k}},V&&b<=50){b++,typeof V=="object"&&(V.placement&&(g=V.placement),V.rects&&(f=V.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):V.rects),{x:u,y}=Yl(f,g,p)),S=-1;continue}}return{x:u,y,placement:g,strategy:i,middlewareData:x}};async function Ci(t,e){var o;e===void 0&&(e={});let{x:n,y:i,platform:a,rects:s,elements:l,strategy:p}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:y="floating",altBoundary:g=!1,padding:x=0}=Xo(e,t),b=ql(x),T=l[g?y==="floating"?"reference":"floating":y],R=or(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(T)))==null||o?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:p})),N=y==="floating"?{...s.floating,x:n,y:i}:s.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),k=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},V=or(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:N,offsetParent:_,strategy:p}):N);return{top:(R.top-V.top+b.top)/k.y,bottom:(V.bottom-R.bottom+b.bottom)/k.y,left:(R.left-V.left+b.left)/k.x,right:(V.right-R.right+b.right)/k.x}}function Pp(t,e,o){return(t?[...o.filter(i=>Ht(i)===t),...o.filter(i=>Ht(i)!==t)]:o.filter(i=>_r(i)===i)).filter(i=>t?Ht(i)===t||(e?Zl(i)!==i:!1):!0)}var Ei=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,i;let{rects:a,middlewareData:s,placement:l,platform:p,elements:f}=e,{crossAxis:u=!1,alignment:y,allowedPlacements:g=bi,autoAlignment:x=!0,...b}=Xo(t,e),S=y!==void 0||g===bi?Pp(y||null,x,g):g,T=await Ci(e,b),R=((o=s.autoPlacement)==null?void 0:o.index)||0,N=S[R];if(N==null)return{};let _=Kl(N,a,await(p.isRTL==null?void 0:p.isRTL(f.floating)));if(l!==N)return{reset:{placement:S[0]}};let k=[T[_r(N)],T[_[0]],T[_[1]]],V=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:N,overflows:k}],Re=S[R+1];if(Re)return{data:{index:R+1,overflows:V},reset:{placement:Re}};let se=V.map(m=>{let v=Ht(m.placement);return[m.placement,v&&u?m.overflows.slice(0,2).reduce((L,q)=>L+q,0):m.overflows[0],m.overflows]}).sort((m,v)=>m[1]-v[1]),Ve=((i=se.filter(m=>m[2].slice(0,Ht(m[0])?2:3).every(v=>v<=0))[0])==null?void 0:i[0])||se[0][0];return Ve!==l?{data:{index:R+1,overflows:V},reset:{placement:Ve}}:{}}}};var wi=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:o,y:n,placement:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:T=>{let{x:R,y:N}=T;return{x:R,y:N}}},...p}=Xo(t,e),f={x:o,y:n},u=await Ci(e,p),y=Qo(_r(i)),g=vi(y),x=f[g],b=f[y];if(a){let T=g==="y"?"top":"left",R=g==="y"?"bottom":"right",N=x+u[T],_=x-u[R];x=xi(N,x,_)}if(s){let T=y==="y"?"top":"left",R=y==="y"?"bottom":"right",N=b+u[T],_=b-u[R];b=xi(N,b,_)}let S=l.fn({...e,[g]:x,[y]:b});return{...S,data:{x:S.x-o,y:S.y-n}}}}};function Ct(t){return Jl(t)?(t.nodeName||"").toLowerCase():"#document"}function Te(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Et(t){var e;return(e=(Jl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Jl(t){return t instanceof Node||t instanceof Te(t).Node}function ht(t){return t instanceof Element||t instanceof Te(t).Element}function et(t){return t instanceof HTMLElement||t instanceof Te(t).HTMLElement}function Ql(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Te(t).ShadowRoot}function Dr(t){let{overflow:e,overflowX:o,overflowY:n,display:i}=$e(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!["inline","contents"].includes(i)}function ec(t){return["table","td","th"].includes(Ct(t))}function en(t){let e=tn(),o=$e(t);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function tc(t){let e=nr(t);for(;et(e)&&!po(e);){if(en(e))return e;e=nr(e)}return null}function tn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function po(t){return["html","body","#document"].includes(Ct(t))}function $e(t){return Te(t).getComputedStyle(t)}function fo(t){return ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nr(t){if(Ct(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ql(t)&&t.host||Et(t);return Ql(e)?e.host:e}function rc(t){let e=nr(t);return po(e)?t.ownerDocument?t.ownerDocument.body:t.body:et(e)&&Dr(e)?e:rc(e)}function Jo(t,e,o){var n;e===void 0&&(e=[]),o===void 0&&(o=!0);let i=rc(t),a=i===((n=t.ownerDocument)==null?void 0:n.body),s=Te(i);return a?e.concat(s,s.visualViewport||[],Dr(i)?i:[],s.frameElement&&o?Jo(s.frameElement):[]):e.concat(i,Jo(i,[],o))}function ic(t){let e=$e(t),o=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=et(t),a=i?t.offsetWidth:o,s=i?t.offsetHeight:n,l=co(o)!==a||co(n)!==s;return l&&(o=a,n=s),{width:o,height:n,$:l}}function ac(t){return ht(t)?t:t.contextElement}function $r(t){let e=ac(t);if(!et(e))return Ot(1);let o=e.getBoundingClientRect(),{width:n,height:i,$:a}=ic(e),s=(a?co(o.width):o.width)/n,l=(a?co(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var kp=Ot(0);function sc(t){let e=Te(t);return!tn()||!e.visualViewport?kp:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _p(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==Te(t)?!1:e}function uo(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);let i=t.getBoundingClientRect(),a=ac(t),s=Ot(1);e&&(n?ht(n)&&(s=$r(n)):s=$r(t));let l=_p(a,o,n)?sc(a):Ot(0),p=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,y=i.height/s.y;if(a){let g=Te(a),x=n&&ht(n)?Te(n):n,b=g.frameElement;for(;b&&n&&x!==g;){let S=$r(b),T=b.getBoundingClientRect(),R=$e(b),N=T.left+(b.clientLeft+parseFloat(R.paddingLeft))*S.x,_=T.top+(b.clientTop+parseFloat(R.paddingTop))*S.y;p*=S.x,f*=S.y,u*=S.x,y*=S.y,p+=N,f+=_,b=Te(b).frameElement}}return or({width:u,height:y,x:p,y:f})}function Dp(t){let{rect:e,offsetParent:o,strategy:n}=t,i=et(o),a=Et(o);if(o===a)return e;let s={scrollLeft:0,scrollTop:0},l=Ot(1),p=Ot(0);if((i||!i&&n!=="fixed")&&((Ct(o)!=="body"||Dr(a))&&(s=fo(o)),et(o))){let f=uo(o);l=$r(o),p.x=f.x+o.clientLeft,p.y=f.y+o.clientTop}return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-s.scrollLeft*l.x+p.x,y:e.y*l.y-s.scrollTop*l.y+p.y}}function $p(t){return Array.from(t.getClientRects())}function lc(t){return uo(Et(t)).left+fo(t).scrollLeft}function Bp(t){let e=Et(t),o=fo(t),n=t.ownerDocument.body,i=Wt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Wt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-o.scrollLeft+lc(t),l=-o.scrollTop;return $e(n).direction==="rtl"&&(s+=Wt(e.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:l}}function Mp(t,e){let o=Te(t),n=Et(t),i=o.visualViewport,a=n.clientWidth,s=n.clientHeight,l=0,p=0;if(i){a=i.width,s=i.height;let f=tn();(!f||f&&e==="fixed")&&(l=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:l,y:p}}function Up(t,e){let o=uo(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,a=et(t)?$r(t):Ot(1),s=t.clientWidth*a.x,l=t.clientHeight*a.y,p=i*a.x,f=n*a.y;return{width:s,height:l,x:p,y:f}}function oc(t,e,o){let n;if(e==="viewport")n=Mp(t,o);else if(e==="document")n=Bp(Et(t));else if(ht(e))n=Up(e,o);else{let i=sc(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return or(n)}function cc(t,e){let o=nr(t);return o===e||!ht(o)||po(o)?!1:$e(o).position==="fixed"||cc(o,e)}function Fp(t,e){let o=e.get(t);if(o)return o;let n=Jo(t,[],!1).filter(l=>ht(l)&&Ct(l)!=="body"),i=null,a=$e(t).position==="fixed",s=a?nr(t):t;for(;ht(s)&&!po(s);){let l=$e(s),p=en(s);!p&&l.position==="fixed"&&(i=null),(a?!p&&!i:!p&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Dr(s)&&!p&&cc(t,s))?n=n.filter(u=>u!==s):i=l,s=nr(s)}return e.set(t,n),n}function zp(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t,s=[...o==="clippingAncestors"?Fp(e,this._c):[].concat(o),n],l=s[0],p=s.reduce((f,u)=>{let y=oc(e,u,i);return f.top=Wt(y.top,f.top),f.right=lo(y.right,f.right),f.bottom=lo(y.bottom,f.bottom),f.left=Wt(y.left,f.left),f},oc(e,l,i));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Wp(t){return ic(t)}function Hp(t,e,o){let n=et(e),i=Et(e),a=o==="fixed",s=uo(t,!0,a,e),l={scrollLeft:0,scrollTop:0},p=Ot(0);if(n||!n&&!a)if((Ct(e)!=="body"||Dr(i))&&(l=fo(e)),n){let f=uo(e,!0,a,e);p.x=f.x+e.clientLeft,p.y=f.y+e.clientTop}else i&&(p.x=lc(i));return{x:s.left+l.scrollLeft-p.x,y:s.top+l.scrollTop-p.y,width:s.width,height:s.height}}function nc(t,e){return!et(t)||$e(t).position==="fixed"?null:e?e(t):t.offsetParent}function dc(t,e){let o=Te(t);if(!et(t))return o;let n=nc(t,e);for(;n&&ec(n)&&$e(n).position==="static";)n=nc(n,e);return n&&(Ct(n)==="html"||Ct(n)==="body"&&$e(n).position==="static"&&!en(n))?o:n||tc(t)||o}var Vp=async function(t){let{reference:e,floating:o,strategy:n}=t,i=this.getOffsetParent||dc,a=this.getDimensions;return{reference:Hp(e,await i(o),n),floating:{x:0,y:0,...await a(o)}}};function jp(t){return $e(t).direction==="rtl"}var rn={convertOffsetParentRelativeRectToViewportRelativeRect:Dp,getDocumentElement:Et,getClippingRect:zp,getOffsetParent:dc,getElementRects:Vp,getClientRects:$p,getDimensions:Wp,getScale:$r,isElement:ht,isRTL:jp};var pc=(t,e,o)=>{let n=new Map,i={platform:rn,...o},a={...i.platform,_c:n};return Xl(t,e,{...i,platform:a})};function fc(t){return Gp(t)}function Ai(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Gp(t){for(let e=t;e;e=Ai(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Ai(t);e;e=Ai(e)){if(!(e instanceof Element))continue;let o=getComputedStyle(e);if(o.display!=="contents"&&(o.position!=="static"||o.filter!=="none"||e.tagName==="BODY"))return e}return null}async function uc(t,e,o){return pc(t,e,{platform:{...rn,getOffsetParent:n=>rn.getOffsetParent(n,fc)},middleware:[wi({crossAxis:!0}),Ei({allowedPlacements:[o]})]})}var Le=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},X=class extends ho.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new ho.Debouncer,this.revealDebouncer=new ho.Debouncer}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return hc.html`
|
|
540
540
|
<div part="container"
|
|
541
541
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
542
542
|
@mouseenter=${this.onHover}
|
|
@@ -554,7 +554,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
554
554
|
</div>
|
|
555
555
|
</div>
|
|
556
556
|
</div>
|
|
557
|
-
`}updated(e){e.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(o=>e.has(o))&&this.visible&&this.positionTooltip()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",uc(this.slottedElement,this.tooltip,this.position).then(({x:e,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${e}px`,this.tooltip.style.top=`${o}px`)})),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout(()=>window.addEventListener("touchstart",e=>{e.composedPath().includes(this.container)||this.onOut()},{once:!0}),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(e,o){return Math.max(e,Math.min(0,-o))}};
|
|
557
|
+
`}updated(e){e.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(o=>e.has(o))&&this.visible&&this.positionTooltip()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",uc(this.slottedElement,this.tooltip,this.position).then(({x:e,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${e}px`,this.tooltip.style.top=`${o}px`)})),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout(()=>window.addEventListener("touchstart",e=>{e.composedPath().includes(this.container)||this.onOut()},{once:!0}),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(e,o){return Math.max(e,Math.min(0,-o))}};X.elementDefinitions={"ft-typography":K};X.styles=Vl;Le([(0,le.property)()],X.prototype,"text",void 0);Le([(0,le.property)({type:Boolean})],X.prototype,"manual",void 0);Le([(0,le.property)({type:Boolean})],X.prototype,"inline",void 0);Le([(0,le.property)({type:Number})],X.prototype,"delay",void 0);Le([(0,le.property)()],X.prototype,"position",void 0);Le([(0,le.queryAssignedNodes)()],X.prototype,"slotNodes",void 0);Le([(0,le.query)(".ft-tooltip--container")],X.prototype,"container",void 0);Le([(0,le.query)(".ft-tooltip")],X.prototype,"tooltip",void 0);Le([(0,le.query)(".ft-tooltip--content")],X.prototype,"tooltipContent",void 0);Le([(0,le.state)()],X.prototype,"visible",void 0);Le([(0,le.eventOptions)({passive:!0})],X.prototype,"onTouch",null);Le([(0,le.eventOptions)({passive:!0})],X.prototype,"onHover",null);Le([(0,le.eventOptions)({passive:!0})],X.prototype,"onOut",null);Le([(0,le.eventOptions)({passive:!0})],X.prototype,"onClick",null);(0,mc.customElement)("ft-tooltip")(X);var bc=h(w());var yc=h(I()),gc=h(w());var ir=class extends gc.FtLitElement{render(){return yc.html`
|
|
558
558
|
<div class="ft-loader">
|
|
559
559
|
<div></div>
|
|
560
560
|
<div></div>
|
|
@@ -587,7 +587,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
587
587
|
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon>
|
|
588
588
|
`:Br.html`
|
|
589
589
|
<slot part="icon" name="icon"></slot>
|
|
590
|
-
`}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(e){return e instanceof HTMLSlotElement?e.assignedNodes().map(o=>this.unslotText(o)).join(""):e?.textContent||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};ae.elementDefinitions={"ft-ripple":z,"ft-tooltip":
|
|
590
|
+
`}focus(){var e;(e=this.button)===null||e===void 0||e.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(e){return e instanceof HTMLSlotElement?e.assignedNodes().map(o=>this.unslotText(o)).join(""):e?.textContent||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};ae.elementDefinitions={"ft-ripple":z,"ft-tooltip":X,"ft-typography":K,"ft-icon":fe,"ft-loader":ir};Be([(0,Ee.property)({type:String,reflect:!0})],ae.prototype,"role",void 0);Be([(0,Ee.property)()],ae.prototype,"type",void 0);Be([(0,Ee.property)({type:Boolean})],ae.prototype,"disabled",void 0);Be([(0,Ee.property)()],ae.prototype,"label",void 0);Be([(0,Ee.property)()],ae.prototype,"icon",void 0);Be([(0,Ee.property)()],ae.prototype,"iconVariant",void 0);Be([(0,Ee.property)({type:Boolean})],ae.prototype,"trailingIcon",void 0);Be([(0,Ee.property)({type:Boolean})],ae.prototype,"loading",void 0);Be([(0,Ee.property)()],ae.prototype,"tooltipPosition",void 0);Be([(0,Ee.property)({type:Boolean})],ae.prototype,"hideTooltip",void 0);Be([(0,Ee.property)({type:Boolean})],ae.prototype,"forceTooltip",void 0);Be([(0,Ee.query)(".ft-button")],ae.prototype,"button",void 0);Be([(0,Ee.query)(".ft-button--label slot")],ae.prototype,"slottedContent",void 0);var on=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},be=class extends ae{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.dense=!1,this.round=!1}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}}get typographyVariant(){return"button"}};be.styles=[vc.safariEllipsisFix,Wl];on([(0,mo.property)({type:Boolean})],be.prototype,"primary",void 0);on([(0,mo.property)({type:Boolean})],be.prototype,"outlined",void 0);on([(0,mo.property)({type:Boolean})],be.prototype,"dense",void 0);on([(0,mo.property)({type:Boolean})],be.prototype,"round",void 0);var yo=h(H());var an=h(w());var Sc=h(I()),U=h(w());var Oc=[Sc.css`
|
|
591
591
|
:host {
|
|
592
592
|
display: inline-block;
|
|
593
593
|
max-width: 100%;
|
|
@@ -1363,7 +1363,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1363
1363
|
@change=${this.onChange}
|
|
1364
1364
|
@keydown=${this.onKeyDown}
|
|
1365
1365
|
></slot>
|
|
1366
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.onFocus),this.addEventListener("focusout",this.onFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.onFocus),this.removeEventListener("focusout",this.onFocusOut)}onSlotChange(){this.radioButtons.forEach(e=>e.name=this.name)}contentAvailableCallback(e){super.contentAvailableCallback(e),this.radioButtons.forEach(o=>o.setInputTabIndex(-1)),this.resolveCurrentSelectedIndex()}onChange(e){e.stopPropagation(),this.radioButtons.forEach(o=>o.checked=e.detail.value===o.value),this.dispatchEvent(new CustomEvent("change",{detail:e.detail.value})),this.resolveCurrentSelectedIndex()}onKeyDown(e){let o=!1;switch(e.key){case"ArrowUp":case"ArrowLeft":{o=!0;let n=this.currentSelectedIndex-1;this.radioButtons[n<0?this.radioButtons.length-1:n].select(),this.radioButtons[n<0?this.radioButtons.length-1:n].focus();break}case"ArrowDown":case"ArrowRight":{o=!0;let n=this.currentSelectedIndex+1;this.radioButtons[n>this.radioButtons.length-1?0:n].select(),this.radioButtons[n>this.radioButtons.length-1?0:n].focus();break}case"Enter":this.radioButtons[this.currentSelectedIndex].select()}o&&(e.stopPropagation(),e.preventDefault())}resolveCurrentSelectedIndex(){let e=this.radioButtons.findIndex(o=>o.checked);e==-1?(this.currentSelectedIndex=0,this.radioButtons[0].select()):this.currentSelectedIndex=e}focusCurrentChecked(){this.radioButtons[this.currentSelectedIndex].focus()}};Pe.elementDefinitions={};Pe.styles=ed;zr([(0,Rt.property)()],Pe.prototype,"name",void 0);zr([(0,Rt.property)({reflect:!0,attribute:"role"})],Pe.prototype,"role",void 0);zr([(0,Rt.property)({reflect:!0})],Pe.prototype,"tabIndex",void 0);zr([(0,Rt.property)({reflect:!0,attribute:"aria-labelledby"})],Pe.prototype,"ariaLabelledBy",void 0);zr([(0,Rt.queryAssignedElements)()],Pe.prototype,"radioButtons",void 0);zr([(0,Rt.state)()],Pe.prototype,"currentSelectedIndex",void 0);(0,$i.customElement)("ft-radio")(ce);(0,$i.customElement)("ft-radio-group")(Pe);var od=h(I()),
|
|
1366
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.onFocus),this.addEventListener("focusout",this.onFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.onFocus),this.removeEventListener("focusout",this.onFocusOut)}onSlotChange(){this.radioButtons.forEach(e=>e.name=this.name)}contentAvailableCallback(e){super.contentAvailableCallback(e),this.radioButtons.forEach(o=>o.setInputTabIndex(-1)),this.resolveCurrentSelectedIndex()}onChange(e){e.stopPropagation(),this.radioButtons.forEach(o=>o.checked=e.detail.value===o.value),this.dispatchEvent(new CustomEvent("change",{detail:e.detail.value})),this.resolveCurrentSelectedIndex()}onKeyDown(e){let o=!1;switch(e.key){case"ArrowUp":case"ArrowLeft":{o=!0;let n=this.currentSelectedIndex-1;this.radioButtons[n<0?this.radioButtons.length-1:n].select(),this.radioButtons[n<0?this.radioButtons.length-1:n].focus();break}case"ArrowDown":case"ArrowRight":{o=!0;let n=this.currentSelectedIndex+1;this.radioButtons[n>this.radioButtons.length-1?0:n].select(),this.radioButtons[n>this.radioButtons.length-1?0:n].focus();break}case"Enter":this.radioButtons[this.currentSelectedIndex].select()}o&&(e.stopPropagation(),e.preventDefault())}resolveCurrentSelectedIndex(){let e=this.radioButtons.findIndex(o=>o.checked);e==-1?(this.currentSelectedIndex=0,this.radioButtons[0].select()):this.currentSelectedIndex=e}focusCurrentChecked(){this.radioButtons[this.currentSelectedIndex].focus()}};Pe.elementDefinitions={};Pe.styles=ed;zr([(0,Rt.property)()],Pe.prototype,"name",void 0);zr([(0,Rt.property)({reflect:!0,attribute:"role"})],Pe.prototype,"role",void 0);zr([(0,Rt.property)({reflect:!0})],Pe.prototype,"tabIndex",void 0);zr([(0,Rt.property)({reflect:!0,attribute:"aria-labelledby"})],Pe.prototype,"ariaLabelledBy",void 0);zr([(0,Rt.queryAssignedElements)()],Pe.prototype,"radioButtons",void 0);zr([(0,Rt.state)()],Pe.prototype,"currentSelectedIndex",void 0);(0,$i.customElement)("ft-radio")(ce);(0,$i.customElement)("ft-radio-group")(Pe);var od=h(I()),Q=h(w());var xn={borderRadiusM:Q.FtCssVariableFactory.external(Q.designSystemVariables.borderRadiusM,"Design system"),colorOutline:Q.FtCssVariableFactory.external(Q.designSystemVariables.colorOutline,"Design system"),colorOnSurface:Q.FtCssVariableFactory.external(Q.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:Q.FtCssVariableFactory.external(Q.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:Q.FtCssVariableFactory.external(Q.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:Q.FtCssVariableFactory.external(Q.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:Q.FtCssVariableFactory.external(Q.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:Q.FtCssVariableFactory.external(ge.fontFamily,"Body2 typography"),fontSize:Q.FtCssVariableFactory.external(ge.fontSize,"Body2 typography"),fontWeight:Q.FtCssVariableFactory.external(ge.fontWeight,"Body2 typography"),letterSpacing:Q.FtCssVariableFactory.external(ge.letterSpacing,"Body2 typography"),lineHeight:Q.FtCssVariableFactory.external(ge.lineHeight,"Body2 typography"),textTransform:Q.FtCssVariableFactory.external(ge.textTransform,"Body2 typography")},nd=od.css`
|
|
1367
1367
|
.ft-filter-level--container {
|
|
1368
1368
|
display: flex;
|
|
1369
1369
|
flex-direction: column;
|
|
@@ -1413,7 +1413,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1413
1413
|
}
|
|
1414
1414
|
|
|
1415
1415
|
ft-button {
|
|
1416
|
-
${(0,
|
|
1416
|
+
${(0,Q.setVariable)(W.color,xn.colorOnSurface)};
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
1419
|
ft-radio, ft-checkbox {
|
|
@@ -1644,7 +1644,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1644
1644
|
@click=${this.next}
|
|
1645
1645
|
></ft-button>
|
|
1646
1646
|
</div>
|
|
1647
|
-
`}update(e){super.update(e),e.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),e.has("currentElement")&&this.dispatchEvent(new Bi(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(e){var o;super.contentAvailableCallback(e),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,(o=this.listenedContainer)===null||o===void 0||o.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run(()=>this.snap()),this.scheduleUpdateScroll()}snap(){let e=this.closestElementFromStart();if(e!=null){let o=this.getDistanceFromStart(e);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<o&&(e=this.lastElement),this.scrollToElement(e)}}scrollToElement(e){var o,n;e&&(this.horizontal?(o=this.contentSlot)===null||o===void 0||o.scrollTo({left:this.getOffset(e)-this.controlsSize,behavior:"smooth"}):(n=this.contentSlot)===null||n===void 0||n.scrollTo({top:this.getOffset(e)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(e))}onSlotChange(){var e,o;this.elements=(o=(e=this.contentSlot)===null||e===void 0?void 0:e.assignedElements().map(n=>n))!==null&&o!==void 0?o:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let e=-1;for(let o=0;o<this.elements.length;o++)(e<0||this.getDistanceFromStart(this.elements[o])<this.getDistanceFromStart(this.elements[e]))&&(e=o);return e}scheduleUpdateScroll(){this.updateScrollDebouncer.run(()=>this.updateScroll())}updateScroll(){this.contentSlot!=null?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=this.contentSlot[this.scrollAttribute]===0,this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let e=this.elements[0];return e?e[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(e){return e[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(e){let o=e===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(e)-this.contentSlot[this.scrollAttribute]-o)}};he.elementDefinitions={"ft-button":be};he.styles=sd;yt([(0,We.property)({type:Boolean})],he.prototype,"horizontal",void 0);yt([(0,We.property)({type:Boolean})],he.prototype,"hideScrollbar",void 0);yt([(0,We.property)({type:Boolean})],he.prototype,"controls",void 0);yt([(0,We.property)({type:Boolean})],he.prototype,"limitSize",void 0);yt([(0,We.state)()],he.prototype,"elements",void 0);yt([(0,We.state)()],he.prototype,"currentElement",void 0);yt([(0,We.state)()],he.prototype,"withScroll",void 0);yt([(0,We.state)()],he.prototype,"startReached",void 0);yt([(0,We.state)()],he.prototype,"endReached",void 0);yt([(0,We.query)(".ft-snap-scroll--content")],he.prototype,"contentSlot",void 0);(0,dd.customElement)("ft-snap-scroll")(he);var pd=h(I()),
|
|
1647
|
+
`}update(e){super.update(e),e.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),e.has("currentElement")&&this.dispatchEvent(new Bi(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(e){var o;super.contentAvailableCallback(e),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,(o=this.listenedContainer)===null||o===void 0||o.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run(()=>this.snap()),this.scheduleUpdateScroll()}snap(){let e=this.closestElementFromStart();if(e!=null){let o=this.getDistanceFromStart(e);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<o&&(e=this.lastElement),this.scrollToElement(e)}}scrollToElement(e){var o,n;e&&(this.horizontal?(o=this.contentSlot)===null||o===void 0||o.scrollTo({left:this.getOffset(e)-this.controlsSize,behavior:"smooth"}):(n=this.contentSlot)===null||n===void 0||n.scrollTo({top:this.getOffset(e)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(e))}onSlotChange(){var e,o;this.elements=(o=(e=this.contentSlot)===null||e===void 0?void 0:e.assignedElements().map(n=>n))!==null&&o!==void 0?o:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let e=-1;for(let o=0;o<this.elements.length;o++)(e<0||this.getDistanceFromStart(this.elements[o])<this.getDistanceFromStart(this.elements[e]))&&(e=o);return e}scheduleUpdateScroll(){this.updateScrollDebouncer.run(()=>this.updateScroll())}updateScroll(){this.contentSlot!=null?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=this.contentSlot[this.scrollAttribute]===0,this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let e=this.elements[0];return e?e[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(e){return e[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(e){let o=e===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(e)-this.contentSlot[this.scrollAttribute]-o)}};he.elementDefinitions={"ft-button":be};he.styles=sd;yt([(0,We.property)({type:Boolean})],he.prototype,"horizontal",void 0);yt([(0,We.property)({type:Boolean})],he.prototype,"hideScrollbar",void 0);yt([(0,We.property)({type:Boolean})],he.prototype,"controls",void 0);yt([(0,We.property)({type:Boolean})],he.prototype,"limitSize",void 0);yt([(0,We.state)()],he.prototype,"elements",void 0);yt([(0,We.state)()],he.prototype,"currentElement",void 0);yt([(0,We.state)()],he.prototype,"withScroll",void 0);yt([(0,We.state)()],he.prototype,"startReached",void 0);yt([(0,We.state)()],he.prototype,"endReached",void 0);yt([(0,We.query)(".ft-snap-scroll--content")],he.prototype,"contentSlot",void 0);(0,dd.customElement)("ft-snap-scroll")(he);var pd=h(I()),Z=h(w());var ke={colorOutline:Z.FtCssVariableFactory.external(Z.designSystemVariables.colorOutline,"Design system"),colorOnSurface:Z.FtCssVariableFactory.external(Z.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:Z.FtCssVariableFactory.external(Z.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:Z.FtCssVariableFactory.external(Z.designSystemVariables.colorPrimary,"Design system"),colorSurface:Z.FtCssVariableFactory.external(Z.designSystemVariables.colorSurface,"Design system"),transitionDuration:Z.FtCssVariableFactory.external(Z.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:Z.FtCssVariableFactory.external(Z.designSystemVariables.transitionTimingFunction,"Design system"),labelColor:Z.FtCssVariableFactory.extend("--ft-filter-label-color","",Z.designSystemVariables.colorOnSurface),labelFontSize:Z.FtCssVariableFactory.extend("--ft-filter-label-font-size","",A.fontSize,"16px")},fd=[qo,Z.noTextInputDefaultClearButton,pd.css`
|
|
1648
1648
|
:host {
|
|
1649
1649
|
display: flex;
|
|
1650
1650
|
max-height: 100%;
|
|
@@ -1671,7 +1671,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1671
1671
|
.ft-filter--header ft-button {
|
|
1672
1672
|
flex-shrink: 0;
|
|
1673
1673
|
margin-left: auto;
|
|
1674
|
-
${(0,
|
|
1674
|
+
${(0,Z.setVariable)(W.iconSize,"18px")};
|
|
1675
1675
|
}
|
|
1676
1676
|
.filter-label {
|
|
1677
1677
|
display: contents;
|
|
@@ -1684,8 +1684,8 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1684
1684
|
word-break: break-word;
|
|
1685
1685
|
color: ${ke.labelColor};
|
|
1686
1686
|
font-size: ${ke.labelFontSize};
|
|
1687
|
-
${(0,
|
|
1688
|
-
${(0,
|
|
1687
|
+
${(0,Z.setVariable)(A.lineHeight,"22px")};
|
|
1688
|
+
${(0,Z.setVariable)(A.fontWeight,"bold")};
|
|
1689
1689
|
}
|
|
1690
1690
|
|
|
1691
1691
|
.ft-filter--filter {
|
|
@@ -1759,7 +1759,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1759
1759
|
slot:not([name]) {
|
|
1760
1760
|
display: none;
|
|
1761
1761
|
}
|
|
1762
|
-
`];var
|
|
1762
|
+
`];var J=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Mi=class extends CustomEvent{constructor(e){super("change",{detail:e})}},F=class extends Xe.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayCount=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver(()=>this.updateScroll()),this.levelsScrollDebouncer=new Xe.Debouncer(300),this.changeDebouncer=new Xe.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return(0,Xe.flatDeep)(this.options,e=>{var o;return(o=e.subOptions)!==null&&o!==void 0?o:[]})}get childrenFilteredFlatOptions(){return(0,Xe.flatDeep)(this.options,e=>{var o;return e.selected?[]:(o=e.subOptions)!==null&&o!==void 0?o:[]})}get selectedValues(){return this.childrenFilteredFlatOptions.filter(e=>e.selected).map(e=>e.value)}render(){let e=this.flatOptions.some(i=>i.selected),o=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,n=this.filterPlaceHolder.replace("{0}",this.label);return dr.html`
|
|
1763
1763
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1764
1764
|
part="container">
|
|
1765
1765
|
${!this.label&&!e?null:dr.html`
|
|
@@ -1836,7 +1836,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1836
1836
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1837
1837
|
noValuesLabel="${this.noValuesLabel}"
|
|
1838
1838
|
></ft-filter-level>
|
|
1839
|
-
`}goBack(e){this.slideOut=e.detail.value}onDisplayLevel(e){this.displayedLevels.push(e.detail.value),this.slideIn=e.detail.value}clear(){if(this.flatOptions.forEach(e=>e.selected=!1),this.displayedLevels.length>0){let e=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[e],this.slideOut=e}this.optionsChanged()}onChange(e){var o;e.stopPropagation();let n=this.flatOptions.find(a=>a.value===e.detail.value);n.selected=!n.selected;let i=a=>{var s;a!==n&&(a.selected=!1),(s=a.subOptions)===null||s===void 0||s.forEach(i)};this.multivalued?(o=n.subOptions)===null||o===void 0||o.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run(()=>{var e;this.sendEventIfValuesChanged(),this.requestUpdate(),(e=this.levels)===null||e===void 0||e.forEach(o=>o.requestUpdate())})}sendEventIfValuesChanged(){let e=this.selectedValues;(0,Xe.deepEqual)(this.lastDispatchedValues,e)||(this.dispatchEvent(new Mi(e)),this.lastDispatchedValues=e)}updateOptionsFromSlot(e){e.stopPropagation(),this.options=this.slotElement.assignedElements().map(o=>o),this.optionsChanged()}onFilterChange(){var e,o;this.filter=(o=(e=this.filterInput)===null||e===void 0?void 0:e.value)!==null&&o!==void 0?o:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}};F.elementDefinitions={"ft-button":be,"ft-filter-level":oe,"ft-snap-scroll":he,"ft-typography":K};F.styles=fd;
|
|
1839
|
+
`}goBack(e){this.slideOut=e.detail.value}onDisplayLevel(e){this.displayedLevels.push(e.detail.value),this.slideIn=e.detail.value}clear(){if(this.flatOptions.forEach(e=>e.selected=!1),this.displayedLevels.length>0){let e=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[e],this.slideOut=e}this.optionsChanged()}onChange(e){var o;e.stopPropagation();let n=this.flatOptions.find(a=>a.value===e.detail.value);n.selected=!n.selected;let i=a=>{var s;a!==n&&(a.selected=!1),(s=a.subOptions)===null||s===void 0||s.forEach(i)};this.multivalued?(o=n.subOptions)===null||o===void 0||o.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run(()=>{var e;this.sendEventIfValuesChanged(),this.requestUpdate(),(e=this.levels)===null||e===void 0||e.forEach(o=>o.requestUpdate())})}sendEventIfValuesChanged(){let e=this.selectedValues;(0,Xe.deepEqual)(this.lastDispatchedValues,e)||(this.dispatchEvent(new Mi(e)),this.lastDispatchedValues=e)}updateOptionsFromSlot(e){e.stopPropagation(),this.options=this.slotElement.assignedElements().map(o=>o),this.optionsChanged()}onFilterChange(){var e,o;this.filter=(o=(e=this.filterInput)===null||e===void 0?void 0:e.value)!==null&&o!==void 0?o:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}};F.elementDefinitions={"ft-button":be,"ft-filter-level":oe,"ft-snap-scroll":he,"ft-typography":K};F.styles=fd;J([(0,G.property)({type:String})],F.prototype,"id",void 0);J([(0,G.property)({type:String})],F.prototype,"label",void 0);J([(0,G.property)({type:String})],F.prototype,"filterPlaceHolder",void 0);J([(0,G.property)({type:String})],F.prototype,"clearButtonLabel",void 0);J([(0,G.property)({type:String})],F.prototype,"moreValuesButtonLabel",void 0);J([(0,G.property)({type:String})],F.prototype,"noValuesLabel",void 0);J([(0,Xe.jsonProperty)([])],F.prototype,"options",void 0);J([(0,G.property)({type:Boolean})],F.prototype,"multivalued",void 0);J([(0,G.property)({type:Boolean})],F.prototype,"disabled",void 0);J([(0,G.property)({type:Boolean})],F.prototype,"raiseSelectedOptions",void 0);J([(0,G.property)({type:Boolean})],F.prototype,"displayCount",void 0);J([(0,G.property)({type:Number})],F.prototype,"displayedValuesLimit",void 0);J([(0,G.property)({type:Boolean})],F.prototype,"hideClearButton",void 0);J([(0,G.query)(".ft-filter--slot")],F.prototype,"slotElement",void 0);J([(0,G.query)(".ft-filter--container")],F.prototype,"container",void 0);J([(0,G.query)(".ft-filter--values")],F.prototype,"valuesContainer",void 0);J([(0,G.query)(".ft-filter--levels")],F.prototype,"levelsContainer",void 0);J([(0,G.state)()],F.prototype,"lastLevelHasHiddenvalues",void 0);J([(0,G.query)(".ft-filter--filter input")],F.prototype,"filterInput",void 0);J([(0,G.queryAll)(".ft-filter--levels ft-filter-level")],F.prototype,"levels",void 0);J([(0,G.state)()],F.prototype,"withScroll",void 0);J([(0,G.state)()],F.prototype,"filter",void 0);J([(0,G.state)()],F.prototype,"slideIn",void 0);J([(0,G.state)()],F.prototype,"slideOut",void 0);var Sn=h(w()),pr=h(H()),ud=h(I()),Wr=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},st=class extends Sn.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return ud.html`
|
|
1840
1840
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1841
1841
|
`}updateSubOptionsFromSlot(e){e.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map(o=>o)}update(e){super.update(e),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}};st.elementDefinitions={};Wr([(0,pr.property)({type:String})],st.prototype,"label",void 0);Wr([(0,pr.property)({type:Object,converter:t=>t})],st.prototype,"value",void 0);Wr([(0,pr.property)({type:Boolean,reflect:!0})],st.prototype,"selected",void 0);Wr([(0,pr.property)({type:Object})],st.prototype,"subOptions",void 0);Wr([(0,Sn.jsonProperty)({})],st.prototype,"renderOption",void 0);Wr([(0,pr.query)(".ft-filter-option--slot")],st.prototype,"slotElement",void 0);(0,Ui.customElement)("ft-filter")(F);(0,Ui.customElement)("ft-filter-option")(st);var Kt=Ur.build("designedSearchType"),On={label:"Search scope",documentTitlesOnly:"Search in document titles only"};var gd=h(H());var hd=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Zt=class extends Vt(Mt){constructor(){super(),this.addI18nContext(Kt,On)}render(){return md.html`
|
|
1842
1842
|
<ft-filter
|
|
@@ -1936,7 +1936,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
|
|
|
1936
1936
|
${_e.messages[this.periodFilter.periodType]()}
|
|
1937
1937
|
</ft-chip>
|
|
1938
1938
|
</ft-tooltip>
|
|
1939
|
-
`:Nt.nothing}};Tt.elementDefinitions={"ft-chip":re,"ft-tooltip":
|
|
1939
|
+
`:Nt.nothing}};Tt.elementDefinitions={"ft-chip":re,"ft-tooltip":X};Tt.styles=qi;Wi([(0,Vr.redux)({store:"search"})],Tt.prototype,"facets",void 0);Wi([(0,Vr.redux)({store:"search",selector:eo})],Tt.prototype,"searchInDocumentTitlesOnly",void 0);Wi([(0,Vr.redux)({store:"search",selector:t=>t.request.periodFilter})],Tt.prototype,"periodFilter",void 0);(0,Od.customElement)("ft-search-selected-facets")(Tt);})();
|
|
1940
1940
|
/*! Bundled license information:
|
|
1941
1941
|
|
|
1942
1942
|
@lit/reactive-element/css-tag.js:
|