@fluid-topics/ft-search-result-metadata 0.3.63 → 0.3.64
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,11 +1,11 @@
|
|
|
1
1
|
!function(t,i,e,o,s,n){const r=e.css`
|
|
2
|
-
|
|
3
|
-
`,
|
|
2
|
+
`,l=e.css`
|
|
3
|
+
`,a=i.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,i)=>{t.baseUrl=i.payload},setApiIntegrationIdentifier:(t,i)=>{t.apiIntegrationIdentifier=i.payload},setUiLocale:(t,i)=>{t.uiLocale=i.payload},setAvailableUiLocales:(t,i)=>{t.availableUiLocales=i.payload},setEditorMode:(t,i)=>{t.editorMode=i.payload},setNoCustom:(t,i)=>{t.noCustom=i.payload},setNoCustomComponent:(t,i)=>{t.noCustomComponent=i.payload},setSession:(t,i)=>{t.session=i.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class h{static build(t){const{baseUrl:i,apiIntegrationIdentifier:e}=a.getState(),o=null!=t?t:e;if(i&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,o,!0)}static get(t){var i;return null!=t?h.build(t):null!==(i=h.API)&&void 0!==i?i:h.API=h.build()}static await(t){return new Promise((i=>{let e=h.get(t);if(e)i(e);else{const o=a.subscribe((()=>{e=h.get(t),e&&(o(),i(e))}))}}))}}var p;const c=Symbol("clearAfterUnitTest");class f{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={},this.currentUiLocale="",this[p]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},this.currentUiLocale=a.getState().uiLocale,a.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=a.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const s={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};i.deepEqual(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var s,n,r;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(n=null===(s=this.cache.getNow(t))||void 0===s?void 0:s.messages)&&void 0!==n?n:{};return new i.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},l).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var i;return await(null===(i=this.apiProvider())||void 0===i?void 0:i.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,i){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(i),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>i.delay(0).then((()=>t())).catch((()=>null)))))}}p=c,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new f(h.get));const d=window.FluidTopicsI18nService;var u=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class g extends i.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>h.get(),this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return e.html`
|
|
4
4
|
<slot></slot>
|
|
5
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
6
|
-
`,C=Symbol("i18nProperties"),S=Symbol("i18nUnsubs");function O(t){var i;return i=S,class extends t{constructor(){super(...arguments),this[i]=new Map}i18n(t,i,...e){var o;if("string"==typeof t)return
|
|
5
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&a.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&a.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&a.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&a.actions.setNoCustom(this.noCustom),t.has("editorMode")&&a.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&a.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&a.actions.setSession(this.session),t.has("availableUiLocales")&&a.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>d.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const i=await t.getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),i.idleTimeoutInMillis),i}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}g.elementDefinitions={},g.styles=l,u([o.property()],g.prototype,"baseUrl",void 0),u([o.property()],g.prototype,"apiIntegrationIdentifier",void 0),u([o.property()],g.prototype,"uiLocale",void 0),u([i.jsonProperty([])],g.prototype,"availableUiLocales",void 0),u([o.property({type:Boolean})],g.prototype,"editorMode",void 0),u([o.property({type:Boolean})],g.prototype,"noCustom",void 0),u([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],g.prototype,"noCustomComponent",void 0),u([o.property({type:Boolean})],g.prototype,"withManualResources",void 0),u([i.jsonProperty([])],g.prototype,"messageContexts",void 0),u([i.jsonProperty(void 0)],g.prototype,"session",void 0),u([o.property({type:Object})],g.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(g);var v=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class y extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const x=Symbol("registerInterval");class m extends(function(t){var i;class e extends t{constructor(){super(...arguments),this[i]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[x]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[x]):this.dispatchEvent(new y)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i=x,v([o.state()],e.prototype,"stateManager",void 0),e}(i.FtLitElementRedux)){}var b=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class $ extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}}const w=Symbol("registerInterval");class k extends(function(t){var i;class e extends t{constructor(){super(...arguments),this[i]=0}connectedCallback(){super.connectedCallback(),this[w]=window.setInterval((()=>this.tryToRegisterToResultContext()),50)}tryToRegisterToResultContext(){null!=this.result?window.clearInterval(this[w]):this.dispatchEvent(new $)}disconnectedCallback(){super.disconnectedCallback(),this.result=void 0}}return i=w,b([o.property({attribute:!1})],e.prototype,"result",void 0),e}(m)){}const z=e.css`
|
|
6
|
+
`,C=Symbol("i18nProperties"),S=Symbol("i18nUnsubs");function O(t){var i;return i=S,class extends t{constructor(){super(...arguments),this[i]=new Map}i18n(t,i,...e){var o;if("string"==typeof t)return d.resolveMessage(t,i,...e);const s=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return d.resolveMessage(t.context,t.key,...s)}onI18nUpdate(t){var i;null===(i=this[C])||void 0===i||i.forEach(((i,e)=>{i.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(i))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var i;super.updated(t),null===(i=this[C])||void 0===i||i.forEach(((t,i)=>{null!=t.argsProvider&&(this[i]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[C]&&new Set([...this[C].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,i){t=t.toLowerCase(),this[S].has(t)||this[S].set(t,d.subscribe(t,(()=>this.onI18nUpdate(t)))),d.prepareContext(t,null!=i?i:{})}addI18nContext(t,i){this.addI18nMessages(t.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[S].forEach((t=>t())),this[S].clear()}}}class j extends(O(i.FtLitElement)){}class I extends(O(i.FtLitElementRedux)){}var N=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class U extends j{render(){return this.key&&this.context?e.html`
|
|
7
7
|
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
8
|
-
`:e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}U.elementDefinitions={},U.styles=z,N([o.property()],U.prototype,"context",void 0),N([o.property()],U.prototype,"key",void 0),N([i.jsonProperty([])],U.prototype,"args",void 0),N([o.property()],U.prototype,"defaultMessage",void 0);class M{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,i)=>{const e=i;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,i)=>(...t)
|
|
8
|
+
`:e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}U.elementDefinitions={},U.styles=z,N([o.property()],U.prototype,"context",void 0),N([o.property()],U.prototype,"key",void 0),N([i.jsonProperty([])],U.prototype,"args",void 0),N([o.property()],U.prototype,"defaultMessage",void 0);class M{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,i)=>{const e=i;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,i)=>(...t)=>d.resolveMessage(this.name,i,...t)})}static build(t){return new M(t)}static fromGwt(t){return new M(t)}}i.customElement("ft-i18n")(U);const A=M.build("designedSearchResultMetadata");
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
@@ -475,7 +475,7 @@ const gt=Symbol.for(""),vt=t=>{if((null==t?void 0:t.r)===gt)return null==t?void
|
|
|
475
475
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
476
476
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
477
477
|
</div>
|
|
478
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new me))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new me))}getLabel(){return this.label||this.textContent}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}be.elementDefinitions={"ft-ripple":ne,"ft-typography":_i,"ft-icon":pe},be.styles=ye,xe([o.property({type:Boolean})],be.prototype,"highlighted",void 0),xe([o.property({type:Boolean})],be.prototype,"removable",void 0),xe([o.property({type:Boolean})],be.prototype,"disabled",void 0),xe([o.property({type:Boolean})],be.prototype,"clickable",void 0),xe([o.property({type:Boolean})],be.prototype,"iconClickable",void 0),xe([o.property({type:Boolean})],be.prototype,"dense",void 0),xe([o.property({type:Boolean})],be.prototype,"multiLine",void 0),xe([o.property({type:String})],be.prototype,"label",void 0),xe([o.property({type:String})],be.prototype,"icon",void 0),xe([o.property({type:Boolean})],be.prototype,"trailingIcon",void 0),xe([o.query("ft-typography slot")],be.prototype,"slottedContent",void 0),i.customElement("ft-chip")(be);var $e=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class we extends(O(
|
|
478
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new me))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new me))}getLabel(){return this.label||this.textContent}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}be.elementDefinitions={"ft-ripple":ne,"ft-typography":_i,"ft-icon":pe},be.styles=ye,xe([o.property({type:Boolean})],be.prototype,"highlighted",void 0),xe([o.property({type:Boolean})],be.prototype,"removable",void 0),xe([o.property({type:Boolean})],be.prototype,"disabled",void 0),xe([o.property({type:Boolean})],be.prototype,"clickable",void 0),xe([o.property({type:Boolean})],be.prototype,"iconClickable",void 0),xe([o.property({type:Boolean})],be.prototype,"dense",void 0),xe([o.property({type:Boolean})],be.prototype,"multiLine",void 0),xe([o.property({type:String})],be.prototype,"label",void 0),xe([o.property({type:String})],be.prototype,"icon",void 0),xe([o.property({type:Boolean})],be.prototype,"trailingIcon",void 0),xe([o.query("ft-typography slot")],be.prototype,"slottedContent",void 0),i.customElement("ft-chip")(be);var $e=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class we extends(O(k)){constructor(){super(),this.useChip=!1,this.editorMode=!1,this.addStore(a),this.addI18nContext(A)}render(){return this.useChip?e.html`
|
|
479
479
|
<ft-tooltip text="${this.tooltipText}">
|
|
480
480
|
<ft-chip>${this.renderContent()}</ft-chip>
|
|
481
481
|
</ft-tooltip>
|
|
@@ -485,4 +485,4 @@ const gt=Symbol.for(""),vt=t=>{if((null==t?void 0:t.r)===gt)return null==t?void
|
|
|
485
485
|
display: none !important;
|
|
486
486
|
}
|
|
487
487
|
</style>
|
|
488
|
-
`}getEllipsis(t){let i=this.maxLength?t.substring(0,this.maxLength):t;return i+(i.length<t.length?"...":"")}updated(t){super.updated(t),t.has("result")&&this.result&&(this.metadata=this.selectMetadata(this.result))}selectMetadata(t){switch(t.type){case"MAP":return t.map.metadata.find((t=>t.key==this.key));case"DOCUMENT":return t.document.metadata.find((t=>t.key==this.key));case"TOPIC":return t.topic.metadata.find((t=>t.key==this.key))}}get valueText(){var t,i;return null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==i?i:""}get tooltipText(){var t,i;return this.metadata?`${null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.label)&&void 0!==i?i:this.metadata.key}: ${this.valueText}`:""}}we.elementDefinitions={"ft-tooltip":Gi,"ft-chip":be},we.styles=r,$e([o.property()],we.prototype,"key",void 0),$e([o.property({type:Boolean})],we.prototype,"useChip",void 0),$e([o.property({type:Number,attribute:"max-length"})],we.prototype,"maxLength",void 0),$e([i.redux({store:
|
|
488
|
+
`}getEllipsis(t){let i=this.maxLength?t.substring(0,this.maxLength):t;return i+(i.length<t.length?"...":"")}updated(t){super.updated(t),t.has("result")&&this.result&&(this.metadata=this.selectMetadata(this.result))}selectMetadata(t){switch(t.type){case"MAP":return t.map.metadata.find((t=>t.key==this.key));case"DOCUMENT":return t.document.metadata.find((t=>t.key==this.key));case"TOPIC":return t.topic.metadata.find((t=>t.key==this.key))}}get valueText(){var t,i;return null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==i?i:""}get tooltipText(){var t,i;return this.metadata?`${null!==(i=null===(t=this.metadata)||void 0===t?void 0:t.label)&&void 0!==i?i:this.metadata.key}: ${this.valueText}`:""}}we.elementDefinitions={"ft-tooltip":Gi,"ft-chip":be},we.styles=r,$e([o.property()],we.prototype,"key",void 0),$e([o.property({type:Boolean})],we.prototype,"useChip",void 0),$e([o.property({type:Number,attribute:"max-length"})],we.prototype,"maxLength",void 0),$e([i.redux({store:a.name})],we.prototype,"editorMode",void 0),$e([o.state()],we.prototype,"metadata",void 0),i.customElement("ft-search-result-metadata")(we),t.FtSearchResultMetadata=we,t.FtSearchResultMetadataCssVariables={},t.styles=r,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
|
@@ -104,13 +104,13 @@ var ft,pt;class dt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
104
104
|
width: 0;
|
|
105
105
|
}
|
|
106
106
|
`;class Ot{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let r=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>r=r.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),r}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${t}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function $t(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function St(t){return!!t&&!!t[he]}function jt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===ue}(t)||Array.isArray(t)||!!t[ce]||!!t.constructor[ce]||Rt(t)||Ut(t))}function Ct(t,e,i){void 0===i&&(i=!1),0===kt(t)?(i?Object.keys:fe)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function kt(t){var e=t[he];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Rt(t)?2:Ut(t)?3:0}function Et(t,e){return 2===kt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Nt(t,e,i){var n=kt(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function Mt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Rt(t){return oe&&t instanceof Map}function Ut(t){return se&&t instanceof Set}function At(t){return t.o||t.t}function Pt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=pe(t);delete e[he];for(var i=fe(e),n=0;n<i.length;n++){var r=i[n],o=e[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[r]})}return Object.create(Object.getPrototypeOf(t),e)}function Ft(t,e){return void 0===e&&(e=!1),It(t)||St(t)||!jt(t)||(kt(t)>1&&(t.set=t.add=t.clear=t.delete=zt),Object.freeze(t),e&&Ct(t,(function(t,e){return Ft(e,!0)}),!0)),t}function zt(){$t(2)}function It(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Lt(t){var e=de[t];return e||$t(18,t),e}function Tt(){return ne}function Bt(t,e){e&&(Lt("Patches"),t.u=[],t.s=[],t.v=e)}function _t(t){Dt(t),t.p.forEach(Kt),t.p=null}function Dt(t){t===ne&&(ne=t.l)}function Wt(t){return ne={p:[],l:ne,h:t,m:!0,_:0}}function Kt(t){var e=t[he];0===e.i||1===e.i?e.j():e.O=!0}function Ht(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||Lt("ES5").S(e,t,n),n?(i[he].P&&(_t(e),$t(4)),jt(t)&&(t=Zt(e,t),e.l||Jt(e,t)),e.u&&Lt("Patches").M(i[he].t,t,e.u,e.s)):t=Zt(e,i,[]),_t(e),e.u&&e.v(e.u,e.s),t!==le?t:void 0}function Zt(t,e,i){if(It(e))return e;var n=e[he];if(!n)return Ct(e,(function(r,o){return Vt(t,n,e,r,o,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Jt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var r=4===n.i||5===n.i?n.o=Pt(n.k):n.o;Ct(3===n.i?new Set(r):r,(function(e,o){return Vt(t,n,r,e,o,i)})),Jt(t,r,!1),i&&t.u&&Lt("Patches").R(n,i,t.u,t.s)}return n.o}function Vt(t,e,i,n,r,o){if(St(r)){var s=Zt(t,r,o&&e&&3!==e.i&&!Et(e.D,n)?o.concat(n):void 0);if(Nt(i,n,s),!St(s))return;t.m=!1}if(jt(r)&&!It(r)){if(!t.h.F&&t._<1)return;Zt(t,r),e&&e.A.l||Jt(t,r)}}function Jt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&Ft(e,i)}function qt(t,e){var i=t[he];return(i?At(i):t)[e]}function Xt(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function Gt(t){t.P||(t.P=!0,t.l&&Gt(t.l))}function Yt(t){t.o||(t.o=Pt(t.t))}function Qt(t,e,i){var n=Rt(e)?Lt("MapSet").N(e,i):Ut(e)?Lt("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Tt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},r=n,o=ve;i&&(r=[n],o=ye);var s=Proxy.revocable(r,o),a=s.revoke,l=s.proxy;return n.k=l,n.j=a,l}(e,i):Lt("ES5").J(e,i);return(i?i.A:Tt()).p.push(n),n}function te(t){return St(t)||$t(22,t),function t(e){if(!jt(e))return e;var i,n=e[he],r=kt(e);if(n){if(!n.P&&(n.i<4||!Lt("ES5").K(n)))return n.t;n.I=!0,i=ee(e,r),n.I=!1}else i=ee(e,r);return Ct(i,(function(e,r){n&&function(t,e){return 2===kt(t)?t.get(e):t[e]}(n.t,e)===r||Nt(i,e,t(r))})),3===r?new Set(i):i}(t)}function ee(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Pt(t)}var ie,ne,re="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),oe="undefined"!=typeof Map,se="undefined"!=typeof Set,ae="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,le=re?Symbol.for("immer-nothing"):((ie={})["immer-nothing"]=!0,ie),ce=re?Symbol.for("immer-draftable"):"__$immer_draftable",he=re?Symbol.for("immer-state"):"__$immer_state",ue=""+Object.prototype.constructor,fe="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,pe=Object.getOwnPropertyDescriptors||function(t){var e={};return fe(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},de={},ve={get:function(t,e){if(e===he)return t;var i=At(t);if(!Et(i,e))return function(t,e,i){var n,r=Xt(e,i);return r?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!jt(n)?n:n===qt(t.t,e)?(Yt(t),t.o[e]=Qt(t.A.h,n,t)):n},has:function(t,e){return e in At(t)},ownKeys:function(t){return Reflect.ownKeys(At(t))},set:function(t,e,i){var n=Xt(At(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var r=qt(At(t),e),o=null==r?void 0:r[he];if(o&&o.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(Mt(i,r)&&(void 0!==i||Et(t.t,e)))return!0;Yt(t),Gt(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==qt(t.t,e)||e in t.t?(t.D[e]=!1,Yt(t),Gt(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=At(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){$t(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){$t(12)}},ye={};Ct(ve,(function(t,e){ye[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),ye.deleteProperty=function(t,e){return ye.set.call(this,t,e,void 0)},ye.set=function(t,e,i){return ve.set.call(this,t[0],e,i,t[0])};var be=function(){function t(t){var e=this;this.g=ae,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var r=i;i=t;var o=e;return function(t){var e=this;void 0===t&&(t=r);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return o.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&$t(6),void 0!==n&&"function"!=typeof n&&$t(7),jt(t)){var a=Wt(e),l=Qt(e,t,void 0),c=!0;try{s=i(l),c=!1}finally{c?_t(a):Dt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Bt(a,n),Ht(t,a)}),(function(t){throw _t(a),t})):(Bt(a,n),Ht(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===le&&(s=void 0),e.F&&Ft(s,!0),n){var h=[],u=[];Lt("Patches").M(t,s,h,u),n(h,u)}return s}$t(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(r))}))};var n,r,o=e.produce(t,i,(function(t,e){n=t,r=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,n,r]})):[o,n,r]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){jt(t)||$t(8),St(t)&&(t=te(t));var e=Wt(this),i=Qt(this,t,void 0);return i[he].C=!0,Dt(e),i},e.finishDraft=function(t,e){var i=(t&&t[he]).A;return Bt(i,e),Ht(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!ae&&$t(20),this.g=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var r=Lt("Patches").$;return St(t)?r(t,e):this.produce(t,(function(t){return r(t,e)}))},t}(),ge=new be,me=ge.produce;ge.produceWithPatches.bind(ge),ge.setAutoFreeze.bind(ge),ge.setUseProxies.bind(ge),ge.applyPatches.bind(ge),ge.createDraft.bind(ge),ge.finishDraft.bind(ge);var xe=me;function we(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Oe(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function $e(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(i),!0).forEach((function(e){we(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Oe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Se(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 je="function"==typeof Symbol&&Symbol.observable||"@@observable",Ce=function(){return Math.random().toString(36).substring(7).split("").join(".")},ke={INIT:"@@redux/INIT"+Ce(),REPLACE:"@@redux/REPLACE"+Ce(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ce()}};function Ee(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ne(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Se(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Se(1));return i(Ne)(t,e)}if("function"!=typeof t)throw new Error(Se(2));var r=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function h(){if(l)throw new Error(Se(3));return o}function u(t){if("function"!=typeof t)throw new Error(Se(4));if(l)throw new Error(Se(5));var e=!0;return c(),a.push(t),function(){if(e){if(l)throw new Error(Se(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),s=null}}}function f(t){if(!Ee(t))throw new Error(Se(7));if(void 0===t.type)throw new Error(Se(8));if(l)throw new Error(Se(9));try{l=!0,o=r(o,t)}finally{l=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}function p(t){if("function"!=typeof t)throw new Error(Se(10));r=t,f({type:ke.REPLACE})}function d(){var t,e=u;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Se(11));function i(){t.next&&t.next(h())}return i(),{unsubscribe:e(i)}}})[je]=function(){return this},t}return f({type:ke.INIT}),(n={dispatch:f,subscribe:u,getState:h,replaceReducer:p})[je]=d,n}function Me(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var r=e[n];"function"==typeof t[r]&&(i[r]=t[r])}var o,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:ke.INIT}))throw new Error(Se(12));if(void 0===i(void 0,{type:ke.PROBE_UNKNOWN_ACTION()}))throw new Error(Se(13))}))}(i)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var n=!1,r={},a=0;a<s.length;a++){var l=s[a],c=i[l],h=t[l],u=c(h,e);if(void 0===u)throw e&&e.type,new Error(Se(14));r[l]=u,n=n||u!==h}return(n=n||s.length!==Object.keys(t).length)?r:t}}function Re(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Ue(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(Se(15))},r={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},o=e.map((function(t){return t(r)}));return n=Re.apply(void 0,o)(i.dispatch),$e($e({},i),{},{dispatch:n})}}}function Ae(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(r){return"function"==typeof r?r(i,n,t):e(r)}}}}var Pe=Ae();Pe.withExtraArgument=Ae;var Fe,ze=Pe,Ie=(Fe=function(t,e){return Fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Fe(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Fe(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Le=function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t},Te=Object.defineProperty,Be=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,We=function(t,e,i){return e in t?Te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Ke=function(t,e){for(var i in e||(e={}))_e.call(e,i)&&We(t,i,e[i]);if(Be)for(var n=0,r=Be(e);n<r.length;n++){i=r[n];De.call(e,i)&&We(t,i,e[i])}return t},He="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Re:Re.apply(null,arguments)};var Ze=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var r=t.apply(this,i)||this;return Object.setPrototypeOf(r,e.prototype),r}return Ie(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,Le([void 0],t[0].concat(this)))):new(e.bind.apply(e,Le([void 0],t.concat(this))))},e}(Array);function Ve(t){return jt(t)?xe(t,(function(){})):t}function Je(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new Ze;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(ze.withExtraArgument(i.extraArgument)):n.push(ze));return n}(t)}}function qe(t){var e,i=Je(),n=t||{},r=n.reducer,o=void 0===r?void 0:r,s=n.middleware,a=void 0===s?i():s,l=n.devTools,c=void 0===l||l,h=n.preloadedState,u=void 0===h?void 0:h,f=n.enhancers,p=void 0===f?void 0:f;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Me(o)}var d=a;"function"==typeof d&&(d=d(i));var v=Ue.apply(void 0,d),y=Re;c&&(y=He(Ke({trace:!1},"object"==typeof c&&c)));var b=[v];return Array.isArray(p)?b=Le([v],p):"function"==typeof p&&(b=p(b)),Ne(e,u,y.apply(void 0,b))}function Xe(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var r=e.apply(void 0,i);if(!r)throw new Error("prepareAction did not return an object");return Ke(Ke({type:t,payload:r.payload},"meta"in r&&{meta:r.meta}),"error"in r&&{error:r.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function Ge(t){var e,i={},n=[],r={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,r},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),r},addDefaultCase:function(t){return e=t,r}};return t(r),[i,n,e]}function Ye(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:Ve(t.initialState),r=t.reducers||{},o=Object.keys(r),s={},a={},l={};function c(){var e="function"==typeof t.extraReducers?Ge(t.extraReducers):[t.extraReducers],i=e[0],r=void 0===i?{}:i,o=e[1],s=void 0===o?[]:o,l=e[2],c=void 0===l?void 0:l,h=Ke(Ke({},r),a);return function(t,e,i,n){void 0===i&&(i=[]);var r,o="function"==typeof e?Ge(e):[e,i,n],s=o[0],a=o[1],l=o[2];if(function(t){return"function"==typeof t}(t))r=function(){return Ve(t())};else{var c=Ve(t);r=function(){return c}}function h(t,e){void 0===t&&(t=r());var i=Le([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[l]),i.reduce((function(t,i){if(i){var n;if(St(t))return void 0===(n=i(t,e))?t:n;if(jt(t))return xe(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return h.getInitialState=r,h}(n,h,s,c)}return o.forEach((function(t){var i,n,o=r[t],c=e+"/"+t;"reducer"in o?(i=o.reducer,n=o.prepare):i=o,s[t]=i,a[c]=i,l[t]=n?Xe(c,n):Xe(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:l,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var Qe="listenerMiddleware";Xe(Qe+"/add"),Xe(Qe+"/removeAll"),Xe(Qe+"/remove"),function(){function t(t,e){var i=r[t];return i?i.enumerable=e:r[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[he];return ve.get(e,t)},set:function(e){var i=this[he];ve.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var r=t[e][he];if(!r.P)switch(r.i){case 5:n(r)&&Gt(r);break;case 4:i(r)&&Gt(r)}}}function i(t){for(var e=t.t,i=t.k,n=fe(i),r=n.length-1;r>=0;r--){var o=n[r];if(o!==he){var s=e[o];if(void 0===s&&!Et(e,o))return!0;var a=i[o],l=a&&a[he];if(l?l.t!==s:!Mt(a,s))return!0}}var c=!!e[he];return n.length!==fe(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var r={};!function(t,e){de[t]||(de[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),r=function(e,i){if(e){for(var n=Array(i.length),r=0;r<i.length;r++)Object.defineProperty(n,""+r,t(r,!0));return n}var o=pe(i);delete o[he];for(var s=fe(o),a=0;a<s.length;a++){var l=s[a];o[l]=t(l,e||!!o[l].enumerable)}return Object.create(Object.getPrototypeOf(i),o)}(n,e),o={i:n?5:4,A:i?i.A:Tt(),P:!1,I:!1,D:{},l:i,t:e,k:r,o:null,O:!1,C:!1};return Object.defineProperty(r,he,{value:o,writable:!0}),r},S:function(t,i,r){r?St(i)&&i[he].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[he];if(i){var r=i.t,o=i.k,s=i.D,a=i.i;if(4===a)Ct(o,(function(e){e!==he&&(void 0!==r[e]||Et(r,e)?s[e]||t(o[e]):(s[e]=!0,Gt(i)))})),Ct(r,(function(t){void 0!==o[t]||Et(o,t)||(s[t]=!1,Gt(i))}));else if(5===a){if(n(i)&&(Gt(i),s.length=!0),o.length<r.length)for(var l=o.length;l<r.length;l++)s[l]=!1;else for(var c=r.length;c<o.length;c++)s[c]=!0;for(var h=Math.min(o.length,r.length),u=0;u<h;u++)o.hasOwnProperty(u)||(s[u]=!0),void 0===s[u]&&t(o[u])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const ti=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute);class ei extends xt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:ii(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:ii(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function ii(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class ni{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(ii(n))return n;if(null==i)return;const r=Ye(i);if(n)return new ni(r,n);const o=qe({reducer:r.reducer});return window.ftReduxStores[i.name]=new ni(r,o)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var ri,oi,si;const ai=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(si=null===(oi=null===(ri=window.safari)||void 0===ri?void 0:ri.pushNotification)||void 0===oi?void 0:oi.toString())&&void 0!==si?si:""),li=x`
|
|
107
|
-
|
|
108
|
-
`,
|
|
107
|
+
`,ci=x`
|
|
108
|
+
`,hi=ni.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class ui{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=hi.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?ui.build(t):null!==(e=ui.API)&&void 0!==e?e:ui.API=ui.build()}static await(t){return new Promise((e=>{let i=ui.get(t);if(i)e(i);else{const n=hi.subscribe((()=>{i=ui.get(t),i&&(n(),e(i))}))}}))}}var fi;const pi=Symbol("clearAfterUnitTest");class di{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[fi]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=hi.getState().uiLocale,hi.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=hi.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};u(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,r,o;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==r?r:{};return new Ot(null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var e;return await(null===(e=this.apiProvider())||void 0===e?void 0:e.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}fi=pi,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new di(ui.get));const vi=window.FluidTopicsI18nService;var yi=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class bi extends xt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>ui.get(),this.cache=new i,this.cleanSessionDebouncer=new n}render(){return X`
|
|
109
109
|
<slot></slot>
|
|
110
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
111
|
-
`,ki=Symbol("i18nProperties"),Ei=Symbol("i18nUnsubs");function Ni(t){var e;return e=Ei,class extends t{constructor(){super(...arguments),this[e]=new Map}i18n(t,e,...i){var n;if("string"==typeof t)return
|
|
110
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&hi.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&hi.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&hi.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&hi.actions.setNoCustom(this.noCustom),t.has("editorMode")&&hi.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&hi.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&hi.actions.setSession(this.session),t.has("availableUiLocales")&&hi.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>vi.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}bi.elementDefinitions={},bi.styles=ci,yi([o()],bi.prototype,"baseUrl",void 0),yi([o()],bi.prototype,"apiIntegrationIdentifier",void 0),yi([o()],bi.prototype,"uiLocale",void 0),yi([p([])],bi.prototype,"availableUiLocales",void 0),yi([o({type:Boolean})],bi.prototype,"editorMode",void 0),yi([o({type:Boolean})],bi.prototype,"noCustom",void 0),yi([o({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],bi.prototype,"noCustomComponent",void 0),yi([o({type:Boolean})],bi.prototype,"withManualResources",void 0),yi([p([])],bi.prototype,"messageContexts",void 0),yi([p(void 0)],bi.prototype,"session",void 0),yi([o({type:Object})],bi.prototype,"apiProvider",void 0),f("ft-app-context")(bi);var gi=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class mi extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const xi=Symbol("registerInterval");class wi extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[xi]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[xi]):this.dispatchEvent(new mi)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=xi,gi([s()],i.prototype,"stateManager",void 0),i}(ei)){}var Oi=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class $i extends Event{constructor(){super("register-ft-search-result-component",{bubbles:!0,composed:!0})}}const Si=Symbol("registerInterval");class ji extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}connectedCallback(){super.connectedCallback(),this[Si]=window.setInterval((()=>this.tryToRegisterToResultContext()),50)}tryToRegisterToResultContext(){null!=this.result?window.clearInterval(this[Si]):this.dispatchEvent(new $i)}disconnectedCallback(){super.disconnectedCallback(),this.result=void 0}}return e=Si,Oi([o({attribute:!1})],i.prototype,"result",void 0),i}(wi)){}const Ci=x`
|
|
111
|
+
`,ki=Symbol("i18nProperties"),Ei=Symbol("i18nUnsubs");function Ni(t){var e;return e=Ei,class extends t{constructor(){super(...arguments),this[e]=new Map}i18n(t,e,...i){var n;if("string"==typeof t)return vi.resolveMessage(t,e,...i);const r=null!==(n=t.args)&&void 0!==n?n:t.argsProvider?t.argsProvider(this):[];return vi.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[ki])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[ki])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ki]&&new Set([...this[ki].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Ei].has(t)||this[Ei].set(t,vi.subscribe(t,(()=>this.onI18nUpdate(t)))),vi.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Ei].forEach((t=>t())),this[Ei].clear()}}}class Mi extends(Ni(xt)){}class Ri extends(Ni(ei)){}var Ui=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class Ai extends Mi{render(){return this.key&&this.context?X`
|
|
112
112
|
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
113
|
-
`:Y}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Ai.elementDefinitions={},Ai.styles=Ci,Ui([o()],Ai.prototype,"context",void 0),Ui([o()],Ai.prototype,"key",void 0),Ui([p([])],Ai.prototype,"args",void 0),Ui([o()],Ai.prototype,"defaultMessage",void 0);class Pi{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)
|
|
113
|
+
`:Y}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Ai.elementDefinitions={},Ai.styles=Ci,Ui([o()],Ai.prototype,"context",void 0),Ui([o()],Ai.prototype,"key",void 0),Ui([p([])],Ai.prototype,"args",void 0),Ui([o()],Ai.prototype,"defaultMessage",void 0);class Pi{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>vi.resolveMessage(this.name,e,...t)})}static build(t){return new Pi(t)}static fromGwt(t){return new Pi(t)}}f("ft-i18n")(Ai);const Fi=Pi.build("designedSearchResultMetadata"),zi=Symbol.for(""),Ii=t=>{if((null==t?void 0:t.r)===zi)return null==t?void 0:t._$litStatic$},Li=t=>({_$litStatic$:t,r:zi}),Ti=new Map,Bi=(t=>(e,...i)=>{const n=i.length;let r,o;const s=[],a=[];let l,c=0,h=!1;for(;c<n;){for(l=e[c];c<n&&void 0!==(o=i[c],r=Ii(o));)l+=r+e[++c],h=!0;a.push(o),s.push(l),c++}if(c===n&&s.push(e[n]),h){const t=s.join("$$lit$$");void 0===(e=Ti.get(t))&&(s.raw=s,Ti.set(t,e=s)),i=a}return t(e,...i)})(X);
|
|
114
114
|
/**
|
|
115
115
|
* @license
|
|
116
116
|
* Copyright 2020 Google LLC
|
|
@@ -597,7 +597,7 @@ class Rr extends gr{constructor(t){if(super(t),this.it=Y,t.type!==yr)throw Error
|
|
|
597
597
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
598
598
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
599
599
|
</div>
|
|
600
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Jr))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Jr))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}qr.elementDefinitions={"ft-ripple":Mr,"ft-typography":or,"ft-icon":Tr},qr.styles=Zr,Vr([o({type:Boolean})],qr.prototype,"highlighted",void 0),Vr([o({type:Boolean})],qr.prototype,"removable",void 0),Vr([o({type:Boolean})],qr.prototype,"disabled",void 0),Vr([o({type:Boolean})],qr.prototype,"clickable",void 0),Vr([o({type:Boolean})],qr.prototype,"iconClickable",void 0),Vr([o({type:Boolean})],qr.prototype,"dense",void 0),Vr([o({type:Boolean})],qr.prototype,"multiLine",void 0),Vr([o({type:String})],qr.prototype,"label",void 0),Vr([o({type:String})],qr.prototype,"icon",void 0),Vr([o({type:Boolean})],qr.prototype,"trailingIcon",void 0),Vr([l("ft-typography slot")],qr.prototype,"slottedContent",void 0),f("ft-chip")(qr);var Xr=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class Gr extends(Ni(
|
|
600
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Jr))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Jr))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}qr.elementDefinitions={"ft-ripple":Mr,"ft-typography":or,"ft-icon":Tr},qr.styles=Zr,Vr([o({type:Boolean})],qr.prototype,"highlighted",void 0),Vr([o({type:Boolean})],qr.prototype,"removable",void 0),Vr([o({type:Boolean})],qr.prototype,"disabled",void 0),Vr([o({type:Boolean})],qr.prototype,"clickable",void 0),Vr([o({type:Boolean})],qr.prototype,"iconClickable",void 0),Vr([o({type:Boolean})],qr.prototype,"dense",void 0),Vr([o({type:Boolean})],qr.prototype,"multiLine",void 0),Vr([o({type:String})],qr.prototype,"label",void 0),Vr([o({type:String})],qr.prototype,"icon",void 0),Vr([o({type:Boolean})],qr.prototype,"trailingIcon",void 0),Vr([l("ft-typography slot")],qr.prototype,"slottedContent",void 0),f("ft-chip")(qr);var Xr=function(t,e,i,n){for(var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};class Gr extends(Ni(ji)){constructor(){super(),this.useChip=!1,this.editorMode=!1,this.addStore(hi),this.addI18nContext(Fi)}render(){return this.useChip?X`
|
|
601
601
|
<ft-tooltip text="${this.tooltipText}">
|
|
602
602
|
<ft-chip>${this.renderContent()}</ft-chip>
|
|
603
603
|
</ft-tooltip>
|
|
@@ -607,4 +607,4 @@ class Rr extends gr{constructor(t){if(super(t),this.it=Y,t.type!==yr)throw Error
|
|
|
607
607
|
display: none !important;
|
|
608
608
|
}
|
|
609
609
|
</style>
|
|
610
|
-
`}getEllipsis(t){let e=this.maxLength?t.substring(0,this.maxLength):t;return e+(e.length<t.length?"...":"")}updated(t){super.updated(t),t.has("result")&&this.result&&(this.metadata=this.selectMetadata(this.result))}selectMetadata(t){switch(t.type){case"MAP":return t.map.metadata.find((t=>t.key==this.key));case"DOCUMENT":return t.document.metadata.find((t=>t.key==this.key));case"TOPIC":return t.topic.metadata.find((t=>t.key==this.key))}}get valueText(){var t,e;return null!==(e=null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==e?e:""}get tooltipText(){var t,e;return this.metadata?`${null!==(e=null===(t=this.metadata)||void 0===t?void 0:t.label)&&void 0!==e?e:this.metadata.key}: ${this.valueText}`:""}}Gr.elementDefinitions={"ft-tooltip":dr,"ft-chip":qr},Gr.styles=li,Xr([o()],Gr.prototype,"key",void 0),Xr([o({type:Boolean})],Gr.prototype,"useChip",void 0),Xr([o({type:Number,attribute:"max-length"})],Gr.prototype,"maxLength",void 0),Xr([((t,e)=>{var i;const n=ti(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!u(t,e),(i,r)=>{var o,s;i.constructor.createProperty(r,{hasChanged:e,attribute:null!==(o=n.attribute)&&void 0!==o&&o});const a=i;a.reduxProperties=a.reduxProperties||new Map;const l=null!==(s=ti(t)?n.selector:t)&&void 0!==s?s:t=>t[r];a.reduxProperties.set(r,{selector:l,store:n.store})}})({store:
|
|
610
|
+
`}getEllipsis(t){let e=this.maxLength?t.substring(0,this.maxLength):t;return e+(e.length<t.length?"...":"")}updated(t){super.updated(t),t.has("result")&&this.result&&(this.metadata=this.selectMetadata(this.result))}selectMetadata(t){switch(t.type){case"MAP":return t.map.metadata.find((t=>t.key==this.key));case"DOCUMENT":return t.document.metadata.find((t=>t.key==this.key));case"TOPIC":return t.topic.metadata.find((t=>t.key==this.key))}}get valueText(){var t,e;return null!==(e=null===(t=this.metadata)||void 0===t?void 0:t.values.join(", "))&&void 0!==e?e:""}get tooltipText(){var t,e;return this.metadata?`${null!==(e=null===(t=this.metadata)||void 0===t?void 0:t.label)&&void 0!==e?e:this.metadata.key}: ${this.valueText}`:""}}Gr.elementDefinitions={"ft-tooltip":dr,"ft-chip":qr},Gr.styles=li,Xr([o()],Gr.prototype,"key",void 0),Xr([o({type:Boolean})],Gr.prototype,"useChip",void 0),Xr([o({type:Number,attribute:"max-length"})],Gr.prototype,"maxLength",void 0),Xr([((t,e)=>{var i;const n=ti(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!u(t,e),(i,r)=>{var o,s;i.constructor.createProperty(r,{hasChanged:e,attribute:null!==(o=n.attribute)&&void 0!==o&&o});const a=i;a.reduxProperties=a.reduxProperties||new Map;const l=null!==(s=ti(t)?n.selector:t)&&void 0!==s?s:t=>t[r];a.reduxProperties.set(r,{selector:l,store:n.store})}})({store:hi.name})],Gr.prototype,"editorMode",void 0),Xr([s()],Gr.prototype,"metadata",void 0),f("ft-search-result-metadata")(Gr),t.FtSearchResultMetadata=Gr,t.FtSearchResultMetadataCssVariables={},t.styles=li,Object.defineProperty(t,"U",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-result-metadata",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.64",
|
|
4
4
|
"description": "Search result metadata for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-chip": "0.3.
|
|
23
|
-
"@fluid-topics/ft-search-result-context": "0.3.
|
|
24
|
-
"@fluid-topics/ft-tooltip": "0.3.
|
|
25
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-chip": "0.3.64",
|
|
23
|
+
"@fluid-topics/ft-search-result-context": "0.3.64",
|
|
24
|
+
"@fluid-topics/ft-tooltip": "0.3.64",
|
|
25
|
+
"@fluid-topics/ft-wc-utils": "0.3.64",
|
|
26
26
|
"lit": "2.2.8"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@fluid-topics/public-api": "1.0.32"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "4f42c34c49255250cddf729582cc01c17b334857"
|
|
35
35
|
}
|