@fluid-topics/ft-reader-search-in-document 2.1.15 → 2.1.16
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.
|
@@ -338,8 +338,8 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
338
338
|
position: relative;
|
|
339
339
|
word-break: break-word;
|
|
340
340
|
}
|
|
341
|
-
`});var rO,Oi,xn,oO,H,Ze=u(()=>{"use strict";O();rO="ft-app-info",Oi=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:e})}};Oi.eventName="authentication-change";xn=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:e})}};xn.eventName="ui-locale-changed";oO={session:(r,e)=>{De(r.session,e.payload)||(r.session=e.payload,setTimeout(()=>H.dispatchEvent(new Oi(e.payload)),0))}},H=xr.get({name:rO,reducers:oO,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}})});var Ia,bP,my=u(()=>{"use strict";K();Ea();Aa();Ze();O();Ia=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},bP=we(Symbol("withDateFormat"),function(r){class e extends r{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(H)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>wo.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ia([h({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ia([h({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ia([fe({store:H.name,selector:t=>{var o,n;return(n=(o=t.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Ia([fe({store:H.name})],e.prototype,"uiLocale",void 0),e})});var To,yd=u(()=>{"use strict";Ze();To=class r{static get(e){let{baseUrl:t,apiIntegrationIdentifier:o}=H.getState(),n=e??o;if(t&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(t,n,!0)}static await(e){return new Promise(t=>{let o=r.get(e);if(o)t(o);else{let n=H.subscribe(()=>{o=r.get(e),o&&(n(),t(o))})}})}}});var Ei,bd=u(()=>{"use strict";yd();Ei=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:To.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):To.await()}}});var Qe,Gr=u(()=>{"use strict";O();bd();Qe=class extends Ei{constructor(e=!0,t){var o;super(t),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new er,this.cache=e?n.commonCache:new er}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((t,o)=>0|31*t+o.charCodeAt(0),0))}}});var Pa,vd=u(()=>{"use strict";Ze();Hr();Gr();Pa=class extends Qe{async listMySearches(){let{session:e}=H.getState();return Sg(e,Ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}}});var Na,xd=u(()=>{"use strict";Ze();Gr();Na=class extends Qe{async listMyBookmarks(){let e=H.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}}});var $a,gy=u(()=>{"use strict";Ze();Gr();$a=class extends Qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=H.getState().session;return!!e?.sessionAuthenticated}}});var Da,yy=u(()=>{"use strict";Gr();Ze();Da=class extends Qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=H.getState().session;return!!e?.sessionAuthenticated}}});var iO,nO,xy,Sd,Cd,by,vy,it,Od,Ed,Ma=u(()=>{"use strict";Hr();O();vd();xd();Ze();gy();yy();iO="ft-user-assets",nO={setAssetCount:(r,e)=>{let{userAssetType:t,count:o}=e.payload.assetCount;r.assetCounts.allAsset[t]=o},clearAssetCount:r=>{Object.values($t).forEach(e=>{r.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(r,e)=>{let t=e.payload.mapId;r.assetCounts.bookmarkByMap[t]=e.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,e)=>{let{assetType:t,mapId:o,asset:n}=e.payload;Cd(r,t,[...Sd(r,t),n]),by(r,t,1,o),vy(r,n)},editAsset:(r,e)=>{let{assetType:t,asset:o}=e.payload;Cd(r,t,Sd(r,t).map(n=>n.id===o.id?o:n)),vy(r,o)},removeAsset:(r,e)=>{let{assetType:t,mapId:o,assetId:n}=e.payload;Cd(r,t,Sd(r,t).filter(a=>a.id!==n)),by(r,t,-1,o)}},xy={[$t.SEARCHES]:"savedSearches",[$t.BOOKMARKS]:"bookmarks",[$t.BOOKS]:void 0,[$t.COLLECTIONS]:void 0},Sd=(r,e)=>{var t;let o=xy[e];return o?(t=r[o])!==null&&t!==void 0?t:[]:[]},Cd=(r,e,t)=>{let o=xy[e];o&&(r[o]=t)},by=(r,e,t,o)=>{let n=r.assetCounts.allAsset[e];if(n!==void 0&&(r.assetCounts.allAsset[e]=Math.max(0,n+t),e===$t.BOOKMARKS&&o)){let a=r.assetCounts.bookmarkByMap[o];r.assetCounts.bookmarkByMap[o]=Math.max(0,a+t)}},vy=(r,e)=>{let t=r.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!t.includes(n)).map(n=>({title:n}));r.assetLabels.push(...o)},it=xr.get({name:iO,reducers:nO,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values($t).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Od=class{constructor(e=new $a,t=new Da){this.assetCountsService=e,this.assetLabelsService=t,this.currentSession=H.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Na,this.savedSearchesService=new Pa,H.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:t}=H.getState();De((e=this.currentSession)===null||e===void 0?void 0:e.profile,t?.profile)||(this.currentSession=t,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),it.actions.clearAssetCount(),it.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),it.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),it.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();it.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();it.actions.assetLabels(e)}async loadAssetCount(e){let t=await this.assetCountsService.getUserAssetCount(e);t&&it.getState().assetCounts.allAsset[e]!==t.count&&it.actions.setAssetCount({assetCount:t})}async loadBookmarkByMapId(e){let t=await this.assetCountsService.getUserBookmarkCountByMap(e);t&&it.getState().assetCounts.bookmarkByMap[e]!==t.count&&it.actions.setBookmarkCountByMap({count:t.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let t=Object.keys(it.getState().assetCounts.bookmarkByMap).length!==0;e===$t.BOOKMARKS&&t&&it.actions.clearBookmarkCountByMap(),it.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let t=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;it.actions.bookmarks(t)}}},Ed=new Od;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ed)});var Sy=u(()=>{"use strict";Hr();Ma()});var wd,Cy=u(()=>{"use strict";Ze();wd=class{addCommand(e,t=!1){H.commands.add(e,t)}consumeCommand(e){return H.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new wd});var Oy,wi,aO,Fa,Ri,Ba,Ey=u(()=>{"use strict";Ze();O();Gr();wi=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},aO=Symbol("clearAfterUnitTest"),Fa=class extends ea(Qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Oy]=()=>{this.defaultMessages={},this.cache=new er,this.listeners={}},this.currentUiLocale=H.getState().uiLocale,H.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=H.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let t=e.name.toLowerCase();this.cache.setFinal(t,e),this.notify(t)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,t){var o;if(e=e.toLowerCase(),t&&Object.keys(t).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...t};De(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var t,o;return this.fetchContext(e),(o=(t=this.cache.getNow(e))===null||t===void 0?void 0:t.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,t){let o=e.toLowerCase();return this.resolveContext(o)[t]}resolveMessage(e,t,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new Nr((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(t,...o)}async fetchContext(e){let t=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),t&&await this.notify(e)}catch(n){!(n instanceof Jt)&&t&&console.error(n)}return o}subscribe(e,t){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(t),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(t)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new wi({loadedContexts:e})),this.dispatchEvent(new wi({loadedContexts:e})),await Promise.all(e.map(t=>this.notify(t,!1)))}async notify(e,t=!0){t&&(document.body.dispatchEvent(new wi({loadedContexts:[e]})),this.dispatchEvent(new wi({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Jn(0).then(()=>o()).catch(()=>null)))}};Oy=aO;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Fa{constructor(){super(async(r,e)=>(await this.awaitApi).getFluidTopicsMessageContext(r,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Fa{constructor(){super(async(r,e)=>(await this.awaitApi).getCustomMessageContext(r,e))}});Ri=window.FluidTopicsI18nService,Ba=window.FluidTopicsCustomI18nService});var Rd,wy=u(()=>{"use strict";O();Rd=class{highlightHtml(e,t,o){Kl(e,t,o)}};window.FluidTopicsHighlightHtmlService=new Rd});var Ad,Ry=u(()=>{"use strict";O();Ze();Ad=class{isDate(e){var t,o,n,a;return(a=(n=((o=(t=H.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,t){var o,n,a,s;if(e==null)return"";try{return wo.format(e,(o=t?.locale)!==null&&o!==void 0?o:H.getState().uiLocale,(n=t?.longFormat)!==null&&n!==void 0?n:!1,(a=t?.withTime)!==null&&a!==void 0?a:!1,(s=t?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ad});var Er,Ld=u(()=>{"use strict";O();Ze();Er=class{static get(e,t){var o,n;let a=H.getState(),{lang:s,region:l}=(n=(o=a.defaultLocales)===null||o===void 0?void 0:o.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Vr(a.baseUrl,e??20,a.searchInAllLanguagesAllowed,t??`${s}-${l}`)}}});var Ua,Ay=u(()=>{"use strict";Gr();Ua=class extends Qe{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let t;switch(e.editorialType){case"BOOK":t="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":t="SHARED_PERSONAL_BOOK";break;case"ARTICLE":t="RESOURCE";break;case"HTML_PACKAGE":t="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:t,metadata:e.metadata}}sortEventArrays(e){let t=Object.entries(e).map(([o,n])=>Array.isArray(n)?[o,n.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[o,this.sortEventArrays(n)]:[o,n]);return Object.fromEntries(t)}sendEvents(e,t){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(n=>(console.info(t),console.debug(n),o)),1e3)}}});var kd,Ly=u(()=>{"use strict";Ld();kd=class{urlToSearchRequest(e){return Er.get().parse(e)}searchRequestToUrl(e){return Er.get().serialize(e)}};window.FluidTopicsUrlService=new kd});var _o,ky=u(()=>{"use strict";_o=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};_o.eventName="change"});var Td,Ty,_y=u(()=>{"use strict";Td=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let t=sessionStorage.getItem(this.itemName(e));return t?JSON.parse(t):void 0}set(e,t){sessionStorage.setItem(this.itemName(e),JSON.stringify(t))}},Ty=new Td});var za,Iy=u(()=>{"use strict";O();ky();_y();za=class r extends yr{static build(){return new r(window.history,Ty,()=>window.location,!1)}constructor(e,t,o,n){var a,s;super(),this.history=e,this.historyStorage=t,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,t=!1){let o=t&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),De(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new _o(this.currentItem())),0)}installProxies(){let e=t=>(o,n,[a,s,l])=>{let d=t(),f={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[f,s,l]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let t=this.history.length-1;t>=0;t--)e?this.states[t]=this.historyStorage.get(t):setTimeout(()=>this.states[t]=this.historyStorage.get(t),this.history.length-t)}updateCurrentState(e){var t;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(t=e?.title)!==null&&t!==void 0?t:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(_o.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(_o.eventName,e)}currentItem(){return mt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return mt(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let t=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return mt(t.find(o=>e(o)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return mt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var t;let o=(t=this.states[e])===null||t===void 0?void 0:t.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,t;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(t=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&t!==void 0?t:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,t){var o;if(!this.hasState(e))return!1;let n=t??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}}});var Py=u(()=>{"use strict";Iy();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=za.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:r=>window.FluidTopicsInternalHistoryService.backwardItemMatching(r),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)})});var Ny=u(()=>{"use strict";Ze()});var Ha=u(()=>{"use strict";xd();yd();Cy();Ey();Gr();wy();vd();Ry();Ld();Ay();Ly();Py();Ny()});var $y,_d=u(()=>{"use strict";_();$y=w`
|
|
342
|
-
`});var Dy=u(()=>{"use strict"});function My(r,e){let{authenticationRequired:t,session:o}=H.getState();return t&&!o?.sessionAuthenticated?Promise.resolve(e):r()}var Fy=u(()=>{"use strict";Ze()});var Va,By=u(()=>{"use strict";bd();Va=class extends Ei{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}}});var Id,Sn,Pd=u(()=>{"use strict";O();Ze();Fy();Ha();By();Id=class r extends Co{static build(e){return new r(H,e)}constructor(e,t){super(),this.store=e,this.cache=new er,this.withManualResources=!0,this.
|
|
341
|
+
`});var rO,Oi,xn,oO,H,Ze=u(()=>{"use strict";O();rO="ft-app-info",Oi=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:e})}};Oi.eventName="authentication-change";xn=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:e})}};xn.eventName="ui-locale-changed";oO={session:(r,e)=>{De(r.session,e.payload)||(r.session=e.payload,setTimeout(()=>H.dispatchEvent(new Oi(e.payload)),0))}},H=xr.get({name:rO,reducers:oO,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}})});var Ia,bP,my=u(()=>{"use strict";K();Ea();Aa();Ze();O();Ia=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},bP=we(Symbol("withDateFormat"),function(r){class e extends r{constructor(...o){super(o),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(H)}dateFormatOptionsChanged(o){return o.has("metadataDescriptors")||o.has("useLongDateFormat")||o.has("useDateTimeFormat")||o.has("uiLocale")}getDateFormatter(o){var n,a;return((a=(n=this.metadataDescriptors.find(l=>l.key===o))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1)?l=>wo.format(l,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return Ia([h({type:Boolean})],e.prototype,"useLongDateFormat",void 0),Ia([h({type:Boolean})],e.prototype,"useDateTimeFormat",void 0),Ia([fe({store:H.name,selector:t=>{var o,n;return(n=(o=t.metadataConfiguration)===null||o===void 0?void 0:o.descriptors)!==null&&n!==void 0?n:[]}})],e.prototype,"metadataDescriptors",void 0),Ia([fe({store:H.name})],e.prototype,"uiLocale",void 0),e})});var To,yd=u(()=>{"use strict";Ze();To=class r{static get(e){let{baseUrl:t,apiIntegrationIdentifier:o}=H.getState(),n=e??o;if(t&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(t,n,!0)}static await(e){return new Promise(t=>{let o=r.get(e);if(o)t(o);else{let n=H.subscribe(()=>{o=r.get(e),o&&(n(),t(o))})}})}}});var Ei,bd=u(()=>{"use strict";yd();Ei=class{constructor(e){this.overrideApi=e}get api(){var e;return(e=this.overrideApi)!==null&&e!==void 0?e:To.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):To.await()}}});var Qe,Gr=u(()=>{"use strict";O();bd();Qe=class extends Ei{constructor(e=!0,t){var o;super(t),this.sortObjectFields=(a,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([l],[d])=>l.localeCompare(d)));let n=this.constructor;n.commonCache=(o=n.commonCache)!==null&&o!==void 0?o:new er,this.cache=e?n.commonCache:new er}clearCache(){this.cache.clearAll()}hash(e){return String(Array.from(JSON.stringify(e,this.sortObjectFields)).reduce((t,o)=>0|31*t+o.charCodeAt(0),0))}}});var Pa,vd=u(()=>{"use strict";Ze();Hr();Gr();Pa=class extends Qe{async listMySearches(){let{session:e}=H.getState();return Sg(e,Ie.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(e.profile.userId),300*1e3):[]}}});var Na,xd=u(()=>{"use strict";Ze();Gr();Na=class extends Qe{async listMyBookmarks(){let e=H.getState().session;return e?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(e.profile.userId),300*1e3):[]}}});var $a,gy=u(()=>{"use strict";Ze();Gr();$a=class extends Qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(e){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${e}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(e){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${e}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${e}`),this.CACHE_DURATION)}isAuthenticated(){let e=H.getState().session;return!!e?.sessionAuthenticated}}});var Da,yy=u(()=>{"use strict";Gr();Ze();Da=class extends Qe{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let e=H.getState().session;return!!e?.sessionAuthenticated}}});var iO,nO,xy,Sd,Cd,by,vy,it,Od,Ed,Ma=u(()=>{"use strict";Hr();O();vd();xd();Ze();gy();yy();iO="ft-user-assets",nO={setAssetCount:(r,e)=>{let{userAssetType:t,count:o}=e.payload.assetCount;r.assetCounts.allAsset[t]=o},clearAssetCount:r=>{Object.values($t).forEach(e=>{r.assetCounts.allAsset[e]=void 0})},setBookmarkCountByMap:(r,e)=>{let t=e.payload.mapId;r.assetCounts.bookmarkByMap[t]=e.payload.count},clearBookmarkCountByMap:r=>{r.assetCounts.bookmarkByMap={}},addAsset:(r,e)=>{let{assetType:t,mapId:o,asset:n}=e.payload;Cd(r,t,[...Sd(r,t),n]),by(r,t,1,o),vy(r,n)},editAsset:(r,e)=>{let{assetType:t,asset:o}=e.payload;Cd(r,t,Sd(r,t).map(n=>n.id===o.id?o:n)),vy(r,o)},removeAsset:(r,e)=>{let{assetType:t,mapId:o,assetId:n}=e.payload;Cd(r,t,Sd(r,t).filter(a=>a.id!==n)),by(r,t,-1,o)}},xy={[$t.SEARCHES]:"savedSearches",[$t.BOOKMARKS]:"bookmarks",[$t.BOOKS]:void 0,[$t.COLLECTIONS]:void 0},Sd=(r,e)=>{var t;let o=xy[e];return o?(t=r[o])!==null&&t!==void 0?t:[]:[]},Cd=(r,e,t)=>{let o=xy[e];o&&(r[o]=t)},by=(r,e,t,o)=>{let n=r.assetCounts.allAsset[e];if(n!==void 0&&(r.assetCounts.allAsset[e]=Math.max(0,n+t),e===$t.BOOKMARKS&&o)){let a=r.assetCounts.bookmarkByMap[o];r.assetCounts.bookmarkByMap[o]=Math.max(0,a+t)}},vy=(r,e)=>{let t=r.assetLabels.map(n=>n.title),o=e.labels.filter(n=>!t.includes(n)).map(n=>({title:n}));r.assetLabels.push(...o)},it=xr.get({name:iO,reducers:nO,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values($t).map(r=>[r,void 0])),bookmarkByMap:{}},assetLabels:[]}}),Od=class{constructor(e=new $a,t=new Da){this.assetCountsService=e,this.assetLabelsService=t,this.currentSession=H.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Na,this.savedSearchesService=new Pa,H.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var e;let{session:t}=H.getState();De((e=this.currentSession)===null||e===void 0?void 0:e.profile,t?.profile)||(this.currentSession=t,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),it.actions.clearAssetCount(),it.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),it.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),it.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let e=await this.savedSearchesService.listMySearches();it.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let e=await this.assetLabelsService.getUserAssetLabels();it.actions.assetLabels(e)}async loadAssetCount(e){let t=await this.assetCountsService.getUserAssetCount(e);t&&it.getState().assetCounts.allAsset[e]!==t.count&&it.actions.setAssetCount({assetCount:t})}async loadBookmarkByMapId(e){let t=await this.assetCountsService.getUserBookmarkCountByMap(e);t&&it.getState().assetCounts.bookmarkByMap[e]!==t.count&&it.actions.setBookmarkCountByMap({count:t.count,mapId:e})}async reloadAssetCount(e){this.assetCountsService.clearCache();let t=Object.keys(it.getState().assetCounts.bookmarkByMap).length!==0;e===$t.BOOKMARKS&&t&&it.actions.clearBookmarkCountByMap(),it.getState().assetCounts.allAsset[e]!==void 0&&await this.loadAssetCount(e)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var e;if(this.bookmarksAreUsed){let t=!((e=this.currentSession)===null||e===void 0)&&e.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;it.actions.bookmarks(t)}}},Ed=new Od;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=Ed)});var Sy=u(()=>{"use strict";Hr();Ma()});var wd,Cy=u(()=>{"use strict";Ze();wd=class{addCommand(e,t=!1){H.commands.add(e,t)}consumeCommand(e){return H.commands.consume(e)}};window.FluidTopicsAppInfoStoreService=new wd});var Oy,wi,aO,Fa,Ri,Ba,Ey=u(()=>{"use strict";Ze();O();Gr();wi=class extends CustomEvent{constructor(e){super("ft-i18n-context-loaded",{detail:e})}},aO=Symbol("clearAfterUnitTest"),Fa=class extends ea(Qe){constructor(e){super(),this.messageContextProvider=e,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Oy]=()=>{this.defaultMessages={},this.cache=new er,this.listeners={}},this.currentUiLocale=H.getState().uiLocale,H.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:e}=H.getState();this.currentUiLocale!==e&&(this.currentUiLocale=e,this.cache.clearAll(),this.notifyAll())}addContext(e){let t=e.name.toLowerCase();this.cache.setFinal(t,e),this.notify(t)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(e,t){var o;if(e=e.toLowerCase(),t&&Object.keys(t).length>0){let n={...(o=this.defaultMessages[e])!==null&&o!==void 0?o:{},...t};De(this.defaultMessages[e],n)||(this.defaultMessages[e]=n,await this.notify(e))}return this.fetchContext(e)}resolveContext(e){var t,o;return this.fetchContext(e),(o=(t=this.cache.getNow(e))===null||t===void 0?void 0:t.messages)!==null&&o!==void 0?o:{}}resolveRawMessage(e,t){let o=e.toLowerCase();return this.resolveContext(o)[t]}resolveMessage(e,t,...o){var n;let a=e.toLowerCase(),s=this.resolveContext(a);return new Nr((n=this.defaultMessages[a])!==null&&n!==void 0?n:{},s).resolve(t,...o)}async fetchContext(e){let t=!this.cache.has(e),o;try{o=await this.cache.get(e,()=>this.messageContextProvider(this.currentUiLocale,e)),t&&await this.notify(e)}catch(n){!(n instanceof Jt)&&t&&console.error(n)}return o}subscribe(e,t){var o;return e=e.toLowerCase(),this.listeners[e]=(o=this.listeners[e])!==null&&o!==void 0?o:new Set,this.listeners[e].add(t),()=>{var n;return(n=this.listeners[e])===null||n===void 0?void 0:n.delete(t)}}async notifyAll(){let e=Object.keys(this.listeners);document.body.dispatchEvent(new wi({loadedContexts:e})),this.dispatchEvent(new wi({loadedContexts:e})),await Promise.all(e.map(t=>this.notify(t,!1)))}async notify(e,t=!0){t&&(document.body.dispatchEvent(new wi({loadedContexts:[e]})),this.dispatchEvent(new wi({loadedContexts:[e]}))),this.listeners[e]!=null&&await Promise.all([...this.listeners[e].values()].map(o=>Jn(0).then(()=>o()).catch(()=>null)))}};Oy=aO;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends Fa{constructor(){super(async(r,e)=>(await this.awaitApi).getFluidTopicsMessageContext(r,e))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends Fa{constructor(){super(async(r,e)=>(await this.awaitApi).getCustomMessageContext(r,e))}});Ri=window.FluidTopicsI18nService,Ba=window.FluidTopicsCustomI18nService});var Rd,wy=u(()=>{"use strict";O();Rd=class{highlightHtml(e,t,o){Kl(e,t,o)}};window.FluidTopicsHighlightHtmlService=new Rd});var Ad,Ry=u(()=>{"use strict";O();Ze();Ad=class{isDate(e){var t,o,n,a;return(a=(n=((o=(t=H.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&o!==void 0?o:[]).find(l=>l.key===e))===null||n===void 0?void 0:n.date)!==null&&a!==void 0?a:!1}format(e,t){var o,n,a,s;if(e==null)return"";try{return wo.format(e,(o=t?.locale)!==null&&o!==void 0?o:H.getState().uiLocale,(n=t?.longFormat)!==null&&n!==void 0?n:!1,(a=t?.withTime)!==null&&a!==void 0?a:!1,(s=t?.onlyTime)!==null&&s!==void 0?s:!1)}catch(l){throw console.error(`Date ${JSON.stringify(e)} is not valid`,l),l}}};window.FluidTopicsDateService=new Ad});var Er,Ld=u(()=>{"use strict";O();Ze();Er=class{static get(e,t){var o,n,a,s;let l=H.getState(),{lang:d,region:f}=(a=(n=(o=l.localesConfiguration)===null||o===void 0?void 0:o.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&a!==void 0?a:{lang:"en",region:"US"};return new Vr(l.baseUrl,e??20,(s=l.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,t??`${d}-${f}`)}}});var Ua,Ay=u(()=>{"use strict";Gr();Ua=class extends Qe{async sendDocumentStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send khub.search event")}async sendDocumentSearchEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.search event")}async sendSearchPageSelectEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(e){return this.sendEvents([this.sortEventArrays(e)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(e){let t;switch(e.editorialType){case"BOOK":t="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":t="SHARED_PERSONAL_BOOK";break;case"ARTICLE":t="RESOURCE";break;case"HTML_PACKAGE":t="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+e.editorialType)}return{id:e.id,title:e.title,type:t,metadata:e.metadata}}sortEventArrays(e){let t=Object.entries(e).map(([o,n])=>Array.isArray(n)?[o,n.map(a=>typeof a=="object"&&a!=null&&!Array.isArray(a)?this.sortEventArrays(a):a).sort((a,s)=>typeof a=="object"&&a!==null&&"key"in a?a.key.localeCompare(s.key):typeof a=="string"&&typeof s=="string"?a.localeCompare(s):String(a).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[o,this.sortEventArrays(n)]:[o,n]);return Object.fromEntries(t)}sendEvents(e,t){let o="anything not undefined";return this.cache.get("analytics-event-"+this.hash(e),async()=>(await this.awaitApi).sendEvents(e).then(()=>o).catch(n=>(console.info(t),console.debug(n),o)),1e3)}}});var kd,Ly=u(()=>{"use strict";Ld();kd=class{urlToSearchRequest(e){return Er.get().parse(e)}searchRequestToUrl(e){return Er.get().serialize(e)}};window.FluidTopicsUrlService=new kd});var _o,ky=u(()=>{"use strict";_o=class r extends CustomEvent{constructor(e){super(r.eventName,{detail:{currentItem:e}})}};_o.eventName="change"});var Td,Ty,_y=u(()=>{"use strict";Td=class{itemName(e){return`fluid-topics-history-item-${e}`}get(e){let t=sessionStorage.getItem(this.itemName(e));return t?JSON.parse(t):void 0}set(e,t){sessionStorage.setItem(this.itemName(e),JSON.stringify(t))}},Ty=new Td});var za,Iy=u(()=>{"use strict";O();ky();_y();za=class r extends yr{static build(){return new r(window.history,Ty,()=>window.location,!1)}constructor(e,t,o,n){var a,s;super(),this.history=e,this.historyStorage=t,this.windowLocation=o,this.states=[],this.realPushState=e.pushState,this.realReplaceState=e.replaceState,this.initialIndex=(s=(a=e.state)===null||a===void 0?void 0:a.index)!==null&&s!==void 0?s:e.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(e,t=!1){let o=t&&this.currentIndex===e.index-1;this.currentState={...this.buildCurrentState(),...e},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,o&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),De(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new _o(this.currentItem())),0)}installProxies(){let e=t=>(o,n,[a,s,l])=>{let d=t(),f={...d===this.currentIndex?this.currentState:void 0,...a,index:d,href:typeof l=="string"?l:(l??this.windowLocation()).href};o.apply(n,[f,s,l]),this.setCurrentState(f,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:e(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:e(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",e=>this.setCurrentState(e.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(e){for(let t=this.history.length-1;t>=0;t--)e?this.states[t]=this.historyStorage.get(t):setTimeout(()=>this.states[t]=this.historyStorage.get(t),this.history.length-t)}updateCurrentState(e){var t;let o={...this.buildCurrentState(),...e,index:this.currentIndex,title:(t=e?.title)!==null&&t!==void 0?t:this.currentState.title};this.setCurrentState(o)}addHistoryChangeListener(e){this.addEventListener(_o.eventName,e)}removeHistoryChangeListener(e){this.removeEventListener(_o.eventName,e)}currentItem(){return mt(this.currentState)}back(){let e=this.previousDifferentMajorPosition();e>=0?this.history.go(e-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return mt(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(e){let t=this.states.filter(o=>!!o).filter(o=>o.index<this.currentIndex).reverse();return mt(t.find(o=>e(o)))}previousDifferentMajorPosition(){let e=this.currentIndex>0?this.currentIndex-1:0;for(;e>0&&!this.isDifferentMajorState(e);)e--;return e}forward(){let e=this.nextMajorPosition();e&&e<this.states.length?this.history.go(e-this.currentIndex):this.history.forward()}forwardItem(){let e=this.nextMajorPosition();if(e)return mt(this.states[e])}nextMajorPosition(){let e=this.currentIndex;if(!(e>=this.states.length)){do e++;while(e<this.states.length&&!this.isDifferentMajorState(e));return this.getHigherPositionInTheSameState(e)}}getHigherPositionInTheSameState(e){var t;let o=(t=this.states[e])===null||t===void 0?void 0:t.majorStateId;if(!o)return e;let n=e,a=e+1;for(;this.states.length>a&&!this.isDifferentMajorState(a,o);)this.hasState(a)&&(n=a),a++;return n}buildCurrentState(){var e,t;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(t=(e=this.history.state)===null||e===void 0?void 0:e.title)!==null&&t!==void 0?t:document.title}}hasState(e){return this.states[e]!=null}isDifferentMajorState(e,t){var o;if(!this.hasState(e))return!1;let n=t??this.currentState.majorStateId,a=(o=this.states[e])===null||o===void 0?void 0:o.majorStateId;return a==null||a!=n}}});var Py=u(()=>{"use strict";Iy();window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=za.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:r=>window.FluidTopicsInternalHistoryService.backwardItemMatching(r),addHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(r),removeHistoryChangeListener:r=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(r)})});var Ny=u(()=>{"use strict";Ze()});var Ha=u(()=>{"use strict";xd();yd();Cy();Ey();Gr();wy();vd();Ry();Ld();Ay();Ly();Py();Ny()});var $y,_d=u(()=>{"use strict";_();$y=w`
|
|
342
|
+
`});var Dy=u(()=>{"use strict"});function My(r,e){let{authenticationRequired:t,session:o}=H.getState();return t&&!o?.sessionAuthenticated?Promise.resolve(e):r()}var Fy=u(()=>{"use strict";Ze()});var Va,By=u(()=>{"use strict";bd();Va=class extends Ei{async updateUiLocale(e){return(await this.awaitApi).updateUiLocale(e)}}});var Id,Sn,Pd=u(()=>{"use strict";O();Ze();Fy();Ha();By();Id=class r extends Co{static build(e){return new r(H,e)}constructor(e,t){super(),this.store=e,this.cache=new er,this.withManualResources=!0,this.userLocaleService=new Va,this.cleanSessionDebouncer=new ae,this.reloadDebouncer=new ae(500),this.apiProvider=t??(()=>To.get())}setWithManualResources(e){this.withManualResources=e,this.updateIfNeeded()}async initService(){this.store.addEventListener(Oi.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let e=await this.cache.get("session",async()=>{let t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},t.idleTimeoutInMillis),t});this.setSession(e)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var e;let t=await this.cache.get("availableContentLocales",()=>My(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((e=t.contentLocales)!==null&&e!==void 0?e:[])}reloadConfiguration(){var e;(e=this.cache)===null||e===void 0||e.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(e){this.store.actions.baseUrl(e),window.fluidTopicsBaseUrl=e}setApiIntegrationIdentifier(e){this.store.actions.apiIntegrationIdentifier(e)}setApiIntegrationAppVersion(e){this.store.actions.apiIntegrationAppVersion(e)}setUiLocale(e){this.store.actions.uiLocale(e)}setLocalesConfiguration(e){this.store.actions.localesConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(e){this.store.actions.availableContentLocales(e),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(e){this.userLocaleService.updateUiLocale({uiLocale:e}).then(t=>{t.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new xn(t)))}).catch(()=>{})}setMetadataConfiguration(e){this.store.actions.metadataConfiguration(e),setTimeout(()=>this.updateIfNeeded())}setNoCustom(e){this.store.actions.noCustom(e)}setEditorMode(e){this.store.actions.editorMode(e)}setNoCustomComponent(e){this.store.actions.noCustomComponent(e)}setSession(e){this.store.actions.session(e),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(e){this.store.actions.openExternalDocumentInNewTab(e)}setNavigatorOnline(e){this.store.actions.navigatorOnline(e)}setForcedOffline(e){this.store.actions.forcedOffline(e)}setAuthenticationRequired(e){this.store.actions.authenticationRequired(e)}},Sn=Id.build()});var Io,Cn=u(()=>{Io=class extends Event{constructor(e,t,o,n){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=o,this.subscribe=n??!1}}});var Uy=u(()=>{});var Nd=u(()=>{Cn();});var zy=u(()=>{});var $d=u(()=>{Cn();zy();});var On,Hy=u(()=>{Cn();On=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=e=>{let t=this.pendingContextRequests.get(e.context);if(t===void 0)return;this.pendingContextRequests.delete(e.context);let{requests:o}=t;for(let{elementRef:n,callbackRef:a}of o){let s=n.deref(),l=a.deref();s===void 0||l===void 0||s.dispatchEvent(new Io(e.context,s,l,!0))}},this.onContextRequest=e=>{if(e.subscribe!==!0)return;let t=e.contextTarget??e.composedPath()[0],o=e.callback,n=this.pendingContextRequests.get(e.context);n===void 0&&this.pendingContextRequests.set(e.context,n={callbacks:new WeakMap,requests:[]});let a=n.callbacks.get(t);a===void 0&&n.callbacks.set(t,a=new WeakSet),a.has(o)||(a.add(o),n.requests.push({elementRef:new WeakRef(t),callbackRef:new WeakRef(o)}))}}attach(e){e.addEventListener("context-request",this.onContextRequest),e.addEventListener("context-provider",this.onContextProvider)}detach(e){e.removeEventListener("context-request",this.onContextRequest),e.removeEventListener("context-provider",this.onContextProvider)}}});var Vy=u(()=>{$d();});var Wy=u(()=>{Nd();});var jy=u(()=>{Cn();Uy();Nd();$d();Hy();Vy();Wy()});var Ye,ke,Dd=u(()=>{"use strict";_();K();O();_d();Ha();Pd();jy();Ye=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},ke=class extends bt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=Sn,this.contextRoot=new On}render(){return b`
|
|
343
343
|
<slot></slot>
|
|
344
344
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(e){var t;super.update(e),e.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),e.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),e.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),e.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),e.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),e.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),e.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),e.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),e.has("session")&&this.stateManager.setSession(this.session),e.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(o=>Ri.addContext(o)),e.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),e.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),e.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),e.has("withManualResources")&&((t=this.stateManager)===null||t===void 0||t.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};ke.elementDefinitions={};ke.styles=$y;Ye([h()],ke.prototype,"baseUrl",void 0);Ye([h()],ke.prototype,"apiIntegrationIdentifier",void 0);Ye([h()],ke.prototype,"apiIntegrationAppVersion",void 0);Ye([h()],ke.prototype,"uiLocale",void 0);Ye([ue(null)],ke.prototype,"availableUiLocales",void 0);Ye([ue(null)],ke.prototype,"metadataConfiguration",void 0);Ye([h({type:Boolean})],ke.prototype,"editorMode",void 0);Ye([h({type:Boolean})],ke.prototype,"noCustom",void 0);Ye([h({type:Boolean})],ke.prototype,"openExternalDocumentInNewTab",void 0);Ye([h({converter:{fromAttribute(r){return r==="false"?!1:r==="true"||(r??!1)}}})],ke.prototype,"noCustomComponent",void 0);Ye([h({type:Boolean})],ke.prototype,"withManualResources",void 0);Ye([h({type:Boolean})],ke.prototype,"navigatorOnline",void 0);Ye([h({type:Boolean})],ke.prototype,"forcedOffline",void 0);Ye([h({type:Boolean})],ke.prototype,"authenticationRequired",void 0);Ye([ue([])],ke.prototype,"messageContexts",void 0);Ye([ue(void 0)],ke.prototype,"session",void 0)});var Gy,Ky=u(()=>{"use strict";Dd();Gy={"ft-app-context":ke}});var qy=u(()=>{"use strict";O();Ky();U(Gy)});var jt=u(()=>{"use strict";my();Ze();Ma();Sy();Ha();_d();Dy();Dd();Pd();qy()});var Md,Ai,Wa=u(()=>{"use strict";Md=class{fromLocalizableLabel(e){return e.type=="PLAIN_TEXT"?{message:e.text}:{key:e.key,custom:e.type=="LOCALIZED_CUSTOM",context:e.context,message:e.key}}fromAttribute(e){if(e!=null)try{return JSON.parse(e)}catch{if(this.isI18nKey(e)){let[t,o]=e.split(".");return{context:t,key:o,custom:t!=="officialContext",message:""}}return{message:e}}}toAttribute(e){if(e!=null)return JSON.stringify(e)}isI18nKey(e){return e.match(/^[\w-]+\.[\w-]+$/)}},Ai=new Md});var cO,wn,Zy,Qy,ja,En,ut,Ga,Ka,Rn=u(()=>{"use strict";O();jt();K();Wa();cO=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},wn=Symbol("i18nAttributes"),Zy=Symbol("i18nListAttributes"),Qy=Symbol("i18nProperties"),ja=Symbol("i18nContexts"),En=Symbol("i18nUnsubs"),ut=we(Symbol("withI18n"),function(r){var e,t;class o extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map,this[t]=new Map}getI18nService(a){return a??this.useCustomMessageContexts?Ba:Ri}i18n(a){let{context:s,key:l,message:d}=a,{custom:f,args:g,argsProvider:m}=a;if(s&&l){this.hasI18nContext(s)||this.addI18nContext(s,void 0,f);let y=g??(m?m(this):[]);return this.getI18nService(f).resolveMessage(s,l,...y)}return d}async awaitI18n(a){let{context:s,custom:l}=a;return s&&await this.getI18nService(l).prepareContext(s),this.i18n(a)}customI18n(a,s){if(Ai.isI18nKey(a)){let[l,d]=a.split(".");return this.i18n({custom:!0,context:l,key:d,...s})||a}return a}firstUpdated(a){super.firstUpdated(a),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(a){super.update(a),this.updateI18nAttributes((s,l,d)=>a.has(l)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(a){this.updateI18nAttributes((s,l,d)=>{var f;return((f=d?.context)===null||f===void 0?void 0:f.toLowerCase())===a}),this.updateI18nProperties(s=>s.context.toLowerCase()===a),this.requestUpdate()}updateI18nAttributes(a){var s,l;let d=this,f=(g,m,y)=>y?.context&&y.key&&a(g,m,y)?{...y,message:this.i18n({context:y.context,key:y.key,custom:y.custom,...g})}:y;(s=this[wn])===null||s===void 0||s.forEach((g,m)=>d[m]=f(g,m,d[m])),(l=this[Zy])===null||l===void 0||l.forEach((g,m)=>{var y;return d[m]=(y=d[m])===null||y===void 0?void 0:y.map(v=>f(g,m,v))})}updateI18nProperties(a){var s;(s=this[Qy])===null||s===void 0||s.forEach((l,d)=>{a(l,d)&&(this[d]=this.i18n(l))})}addI18nMessages(a,s,l){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(a,s,l)}addI18nContext(a,s,l){let d=(typeof a=="string"?a:a.name).toLowerCase();l=typeof a=="string"?l:a.custom,this[ja].set(d,{isCustomContext:l}),this[En].has(d)||this[En].set(d,this.getI18nService(l).subscribe(d,()=>this.onI18nUpdate(d))),this.getI18nService(l).prepareContext(d,s)}hasI18nContext(a){return this[ja].has(a.toLowerCase())}connectedCallback(){super.connectedCallback(),this[ja].forEach((a,s)=>this.addI18nContext(s,void 0,a.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[En].forEach(a=>a()),this[En].clear()}}return e=ja,t=En,cO([h({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}),Ga=class extends ut(D){},Ka=class extends ut(bt){}});var Fd,dO,Yy=u(()=>{"use strict";Wa();Fd=class{fromAttribute(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.map(o=>typeof o=="string"?Ai.fromAttribute(o):o):[]}catch{return[]}}toAttribute(e){if(e!=null)return JSON.stringify(e)}},dO=new Fd});var Li,qa=u(()=>{"use strict";Rn();O();Wa();Yy();Li=(r,e)=>(t,o)=>{var n;t.constructor.createProperty(o,{type:Object,hasChanged:gt,converter:Ai,...e}),t[wn]=(n=t[wn])!==null&&n!==void 0?n:new Map,t[wn].set(o,r??{})}});var lr,Xy=u(()=>{"use strict";jt();lr=class r{static build(e){return new r(e)}static buildCustom(e){return new r(e,!0)}static fromGwt(e){return new r(e)}get service(){return this.custom?Ba:Ri}constructor(e,t=!1){this.name=e,this.custom=t,this.properties=new Proxy({},{get:(o,n)=>{let a=n;return s=>({context:this.name,key:a,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...a)=>this.service.resolveMessage(this.name,n,...a)}),this.rawMessages=new Proxy({},{get:(o,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(o,n)=>()=>n}),this.attributes=new Proxy({},{get:(o,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}}});var Jy=u(()=>{"use strict";Rn()});var eb,Bd=u(()=>{"use strict";_();eb=w`
|
|
345
345
|
`});var tb=u(()=>{"use strict"});var An,Gt,Ud=u(()=>{"use strict";_();K();O();Bd();Rn();jt();An=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},Gt=class extends Ka{constructor(){super(),this.editorMode=!1,this.addStore(H)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":T:b`
|
|
@@ -764,7 +764,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:i.extend("--ftds-con
|
|
|
764
764
|
outline: revert;
|
|
765
765
|
}
|
|
766
766
|
`});function _b(r){var e;return((e=_t(r))===null||e===void 0?void 0:e.openMode)===Ra.EXTERNAL}function os(r){return _b(r)?_t(r).originUrl:sl(r)}function Ib(r,e){return Kr(e&&_b(r)?"_blank":void 0)}var tu=u(()=>{"use strict";Hr();Ya();O()});var _i,Ii,is,ns,as,Tn,_n=u(()=>{"use strict";_i=class extends CustomEvent{constructor(e,t){super("ft-search-result-click",{detail:{result:e,rank:t},bubbles:!0,composed:!0})}},Ii=class extends CustomEvent{constructor(e,t){super("ft-search-result-open-context-menu",{detail:{result:e,rank:t},bubbles:!0,composed:!0})}},is=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},ns=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},as=class extends CustomEvent{constructor(e,t,o){super("ft-search-results-change",{detail:{request:e,paging:t,spellcheck:o}})}},Tn=class r extends Event{constructor(){super(r.eventName)}};Tn.eventName="search-context-clear-all-filters"});var hO,ou,iu=u(()=>{"use strict";_();hO={},ou=w`
|
|
767
|
-
`});var Nb=u(()=>{"use strict"});var Qt,Pi=u(()=>{"use strict";(function(r){r.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Qt||(Qt={}))});var mO,$b,Db=u(()=>{"use strict";O();mO={setRequest:(r,e)=>{r.request=e.payload}},$b=r=>xr.get({name:"ft-search-"+r,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],sortId:void 0,paging:{page:1,perPage:20},keywordMatch:void 0},liveQuery:"",recentQueries:[],paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,announcements:void 0,suggestResults:void 0,configuration:void 0},reducers:mO})});var ss,Mb=u(()=>{"use strict";jt();ss=class extends Qe{constructor(e){super(!0,e),this.cache.registerFinal("search-configuration",async()=>(await this.awaitApi).getSearchConfiguration())}async launchSearch(e){let t={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((o,n)=>o.id.localeCompare(n.id))};return this.cache.get("search-"+this.hash(t),async()=>(await this.awaitApi).search(e),120*1e3)}async launchSuggest(e){let t={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(t),async()=>(await this.awaitApi).getSuggestions(e),120*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}async getConfiguration(){return this.cache.get("search-configuration")}sortFilters(e){return e.map(t=>t.valueFilter==null?t:{...t,valueFilter:{...t.valueFilter,values:[...t.valueFilter.values].sort((o,n)=>o.localeCompare(n))}}).sort((t,o)=>t.key.localeCompare(o.key))}}});var Fb,Bb,ls,gO,Ni,nu=u(()=>{"use strict";Pi();O();Db();Hr();Mb();_n();jt();Fb=r=>r.request.virtualField===Eo.TITLE_ONLY&&r.request.scope===fi.DOCUMENTS,Bb=r=>r.request.keywordMatch==zr.MANDATORY,ls="ft-recent-queries",gO=20,Ni=class r extends Co{static build(e,t){return new r($b(e.trim()||"context"),t)}constructor(e,t){super(),this.store=e,this.ignoreEmptyQuery=!1,this.canUpdateUiLocale=!1,this.openExternalDocumentInNewTab=!1,this.onNewNeededRequest=o=>{o==Qt.CLUSTERED_SEARCH&&this.launchSearch(this.buildSearchRequest(this.store.getState()))},this.onStorageEvent=o=>{o.key===ls&&this.loadRecentQueries()},this.localesDebouncer=new ae(10),this.searchDebouncer=new ae(100),this.launchSearch=o=>this.searchDebouncer.run(()=>this.fetchSearchData(o??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=o=>({...o.request,facets:this.facetIds.map(n=>({id:n}))}),this.suggestDebouncer=new ae(1e3),this.launchSuggest=o=>this.suggestDebouncer.run(()=>this.fetchSuggestData(o??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=o=>{var n;return{input:o.liveQuery,metadataFilters:o.request.metadataFilters,sort:(n=o.request.sort)!==null&&n!==void 0?n:[],sortId:o.request.sortId,contentLocale:o.request.contentLocale,scope:o.request.scope,keywordMatch:o.request.keywordMatch}},this.service=t??new ss,this.service.cache.addEventListener("clear-cache",o=>{o.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=ui(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=ui(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.service.getConfiguration().then(e=>{this.store.actions.configuration(e),this.setSortId(this.store.getState().request.sortId)}),this.loadRecentQueries(),this.launchSearch()}addWindowListeners(){window.addEventListener("storage",this.onStorageEvent)}removeWindowListeners(){window.removeEventListener("storage",this.onStorageEvent)}updateSearchRequest(e,t=!1){let o=mt(this.store.getState().request);delete o.changedByConfiguration,this.store.actions.setRequest({...o,paging:{perPage:o.paging.perPage,page:t?1:o.paging.page},...e})}setQuery(e){this.updateSearchRequest({query:e},!0),this.setLiveQuery(e)}setContentLocale(e){var t,o;let n=(t=this.store.getState().locales)!==null&&t!==void 0?t:[],a=this.store.getState().request.contentLocale;if(e!=a){if(n.length>0){let s=l=>n.some(d=>d.lang==l);s(e)||(e=s(a)?a:n[0].lang)}this.updateSearchRequest({contentLocale:e,metadataFilters:[]},!0),this.canUpdateUiLocale&&(!((o=Sn.localesConfiguration)===null||o===void 0)&&o.searchLanguageSetsUiLanguage)&&e&&Sn.requestUiLocaleUpdate(e)}return e}forceContentLocale(e){this.updateSearchRequest({contentLocale:e})}setPageSize(e){let t=this.store.getState().request;this.updateSearchRequest({paging:{...t.paging,perPage:isNaN(e)?20:gr(1,e,1e3)}})}setPageNumber(e){let t=this.store.getState().request;this.updateSearchRequest({paging:{...t.paging,page:isNaN(e)?1:Math.max(1,e)}})}get sortOptions(){var e,t;return(t=(e=this.store.getState().configuration)===null||e===void 0?void 0:e.sortOptions)!==null&&t!==void 0?t:[]}setSort(e){this.updateSearchRequest({sort:e},!0)}setSortId(e,t=!1){var o;let n=t?{changedByConfiguration:!0}:{};if(e==null||this.sortOptions.length==0)return this.updateSearchRequest({sortId:e,...n},!0),e;let a=(o=this.sortOptions.find(s=>s.id==e))!==null&&o!==void 0?o:this.sortOptions[0];return this.updateSearchRequest({sortId:a.id,...n},!0),a.id}setFilters(e){let t=e.filter(o=>!o.valueFilter||o.valueFilter.values.length>0);this.updateSearchRequest({metadataFilters:t},!0)}setClusterSortCriterion(e){this.updateSearchRequest({clusterSortCriterions:e})}setSearchInDocumentTitlesOnly(e){e?this.updateSearchRequest({virtualField:Eo.TITLE_ONLY,scope:fi.DOCUMENTS},!0):this.updateSearchRequest({virtualField:Eo.EVERYWHERE,scope:fi.DEFAULT},!0)}setKeywordMatch(e){this.updateSearchRequest({keywordMatch:e},!0)}setVirtualField(e){this.updateSearchRequest({virtualField:e},!0)}get searchInDocumentTitlesOnly(){return Fb(this.store.getState())}get keywordMatch(){return Bb(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Tn)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,t){let o=this.facetIds.filter(n=>n!=e);t&&o.push(t),this.facetIds=o}get facetIds(){var e;let t=this.store.getState().request;return[...new Set([...t.facets.map(o=>o.id),...((e=t.metadataFilters)!==null&&e!==void 0?e:[]).map(o=>o.key)])]}set facetIds(e){let o=[...new Set(e)].map(n=>({id:n}));this.updateSearchRequest({facets:o})}setFilter(e,t){this.setValueFilter(e,t)}setValueFilter(e,t){let o=this.store.getState().request.metadataFilters,n={key:e,valueFilter:{values:t,negative:!1}},a=[...o.filter(s=>!s.valueFilter),...o.filter(s=>s.valueFilter&&s.key!==n.key),n];this.setFilters(a)}setDateFilter(e,t){let o=this.store.getState().request.metadataFilters,n={key:e,dateFilter:{type:t}},a=[...o.filter(s=>!s.dateFilter),...o.filter(s=>s.dateFilter&&s.key!==n.key),n];this.setFilters(a)}removeDateFilter(e){let t=this.store.getState().request.metadataFilters,o=[...t.filter(n=>!n.dateFilter),...t.filter(n=>n.dateFilter&&n.key!==e)];this.setFilters(o)}setRangeFilter(e,t,o){let n=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:t,to:o}},s=[...n.filter(l=>!l.rangeFilter),...n.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let t=this.store.getState().request.metadataFilters,o=[...t.filter(n=>!n.rangeFilter),...t.filter(n=>n.rangeFilter&&n.key!==e)];this.setFilters(o)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.updateSearchRequest({...e,facets:this.store.getState().request.facets},!0),this.setLiveQuery(e.query)}setScope(e){this.updateSearchRequest({scope:e})}setOtherQueryParams(e){this.updateSearchRequest({otherQueryParams:e})}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setCanUpdateUiLocale(e){this.canUpdateUiLocale=e}loadRecentQueries(){var e;this.store.actions.recentQueries(JSON.parse((e=window.localStorage.getItem(ls))!==null&&e!==void 0?e:"[]"))}addRecentQuery(e){if(e=e.trim(),e.length===0)return;let t=e.toLowerCase(),o=this.store.getState().recentQueries.filter(n=>n.toLowerCase()!==t).slice(0,gO-1);o.unshift(e),this.setRecentQueries(o)}removeRecentQuery(e){let t=e.trim().toLowerCase(),o=this.store.getState().recentQueries,n=o.filter(a=>a.toLowerCase()!==t);o.length!==n.length&&this.setRecentQueries(n)}setRecentQueries(e){let t=JSON.stringify(e);window.localStorage.setItem(ls,t),window.dispatchEvent(new StorageEvent("storage",{key:ls,newValue:t,storageArea:window.localStorage,url:window.location.href}))}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var t,o,n,a,s;if((t=this.cancelableSearch)===null||t===void 0||t.cancel(),!!this.isRequestNeeded(Qt.CLUSTERED_SEARCH))try{if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{!((o=this.store.getState().results)===null||o===void 0)&&o.length||this.store.actions.results(void 0),this.cancelableSearch=qo(this.service.launchSearch(e));let l=await this.cancelableSearch;if(this.store.actions.announcements(l.announcements),l.paging.currentPage<=1)this.store.actions.results(l.results),this.store.actions.facets(l.facets),this.store.actions.spellcheck(l.spellcheck);else{let d=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(l.results);this.store.actions.results(d),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(l.paging.currentPage-1)*((a=e.paging.perPage)!==null&&a!==void 0?a:20)+1}`})}this.store.actions.paging(l.paging)}}catch(l){l instanceof Jt||(console.error(l),(s=this.errorHandler)===null||s===void 0||s.call(this,l))}}async fetchSuggestData(e){var t;try{if((t=this.cancelableSuggest)===null||t===void 0||t.cancel(),e.input.length<3){this.store.actions.suggestResults([]);return}this.cancelableSuggest=qo(this.service.launchSuggest(e));let o=await this.cancelableSuggest;this.store.actions.suggestResults(o.suggestions)}catch(o){!(o instanceof Jt)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}}});var Ub,su,zb,au,yO,bO,Mt,Do=u(()=>{"use strict";O();K();Pi();nu();Ub=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},su=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},zb=Symbol("registerInterval"),au=Symbol("registerAttempts"),yO=40,bO=we(Symbol("toFtSearchComponent"),function(r){class e extends r{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(o){var n,a,s;super.willUpdate(o),o.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(a=o.get("neededSearchRequests"))!==null&&a!==void 0?a:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(o){this.clearStateManager(),this.stateManager=o,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(o.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[au]=0,this.tryToRegisterToContext(),this[zb]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[au]>yO?window.clearInterval(this[zb]):(this[au]++,this.dispatchEvent(new su))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Ub([I()],e.prototype,"stateManager",void 0),Ub([I({hasChanged:gt})],e.prototype,"neededSearchRequests",void 0),e}),Mt=class extends bO(bt){}});function In(r){return r.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Pn(r){var e,t;return r.dateFilter?{key:r.key,type:"DATE",dateValue:r.dateFilter.type}:r.rangeFilter?{key:r.key,type:"RANGE",from:r.rangeFilter.from,to:r.rangeFilter.to}:{key:r.key,values:(e=r.valueFilter)===null||e===void 0?void 0:e.values,negative:(t=r.valueFilter)===null||t===void 0?void 0:t.negative}}var lu=u(()=>{"use strict"});var cs,Hb=u(()=>{"use strict";O();Hr();jt();lu();cs=class{constructor(e,t){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.document=void 0,this.sendEvent=([o,n])=>{if(!this.canSendEvent()||!o||!n)return;let a=this.store.getState().request;this.document==null?this.sendKhubSearchEvent(a,o,n):this.sendDocumentSearchEvent(a,o,n)},this.eventsService=t??new Ua,this.resultsWatcher=ui(e,o=>[o.results,o.paging],this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.document=e}setDocumentSearchFromMap(e){this.setDocumentSearch(this.eventsService.convertMapToAnalyticsDocument(e))}initAppInfo(){let{apiIntegrationIdentifier:e,apiIntegrationAppVersion:t}=H.getState();this.setAppName(e??"unknown"),this.setAppVersion(t??"unknown")}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=H.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,t,o){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.totalClustersCount},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:In(e.metadataFilters),facets:e.metadataFilters.map(a=>Pn(a))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,t,o){if(e.metadataFilters.find(a=>{var s;return a.key==="ft:publicationId"&&((s=a.valueFilter)===null||s===void 0?void 0:s.values[0])===this.document.id})!==void 0){let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.totalClustersCount},searchQuery:{terms:e.query},document:this.document};this.eventsService.sendDocumentSearchEvent(a)}}sendResultClickedEvent(e,t){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==ar.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.SEARCH_PAGE__SELECT,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:In(o.metadataFilters),facets:o.metadataFilters.map(s=>Pn(s))},searchResult:{rank:t,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,t){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==ar.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:In(o.metadataFilters),facets:o.metadataFilters.map(s=>Pn(s))},searchResult:{rank:t,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case ar.MAP:return{id:e.map.mapId,title:e.map.title,type:Ur.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case ar.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:Ur.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case ar.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:Ur.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case ar.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:Ur.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case ar.HTML_PACKAGE_PAGE:return{id:e.htmlPackagePage.packageId,title:e.htmlPackagePage.title,type:Ur.HTML_PACKAGE,metadata:e.htmlPackagePage.metadata};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var t;return(t=_t(e))===null||t===void 0?void 0:t.originUrl}}});var Fe,ve,cu=u(()=>{"use strict";_();K();O();iu();Do();jt();Ma();Hb();_n();Fe=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},ve=class extends bt{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Ni.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new cs(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this._appIntegrationInfoReady=!1,this.addStore(H)}render(){return b`
|
|
767
|
+
`});var Nb=u(()=>{"use strict"});var Qt,Pi=u(()=>{"use strict";(function(r){r.CLUSTERED_SEARCH="CLUSTERED_SEARCH"})(Qt||(Qt={}))});var mO,$b,Db=u(()=>{"use strict";O();mO={setRequest:(r,e)=>{r.request=e.payload}},$b=r=>xr.get({name:"ft-search-"+r,initialState:{request:{query:"",clusterSortCriterions:[],metadataFilters:[],facets:[],sort:[],sortId:void 0,paging:{page:1,perPage:20},keywordMatch:void 0},liveQuery:"",recentQueries:[],paging:void 0,facets:void 0,spellcheck:void 0,locales:[],results:void 0,announcements:void 0,suggestResults:void 0,configuration:void 0},reducers:mO})});var ss,Mb=u(()=>{"use strict";jt();ss=class extends Qe{constructor(e){super(!0,e),this.cache.registerFinal("search-configuration",async()=>(await this.awaitApi).getSearchConfiguration())}async launchSearch(e){let t={...e,metadataFilters:this.sortFilters(e.metadataFilters),facets:[...e.facets].sort((o,n)=>o.id.localeCompare(n.id))};return this.cache.get("search-"+this.hash(t),async()=>(await this.awaitApi).search(e),120*1e3)}async launchSuggest(e){let t={...e,metadataFilters:this.sortFilters(e.metadataFilters)};return this.cache.get("suggest-"+this.hash(t),async()=>(await this.awaitApi).getSuggestions(e),120*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}async getConfiguration(){return this.cache.get("search-configuration")}sortFilters(e){return e.map(t=>t.valueFilter==null?t:{...t,valueFilter:{...t.valueFilter,values:[...t.valueFilter.values].sort((o,n)=>o.localeCompare(n))}}).sort((t,o)=>t.key.localeCompare(o.key))}}});var Fb,Bb,ls,gO,Ni,nu=u(()=>{"use strict";Pi();O();Db();Hr();Mb();_n();jt();Fb=r=>r.request.virtualField===Eo.TITLE_ONLY&&r.request.scope===fi.DOCUMENTS,Bb=r=>r.request.keywordMatch==zr.MANDATORY,ls="ft-recent-queries",gO=20,Ni=class r extends Co{static build(e,t){return new r($b(e.trim()||"context"),t)}constructor(e,t){super(),this.store=e,this.ignoreEmptyQuery=!1,this.canUpdateUiLocale=!1,this.openExternalDocumentInNewTab=!1,this.onNewNeededRequest=o=>{o==Qt.CLUSTERED_SEARCH&&this.launchSearch(this.buildSearchRequest(this.store.getState()))},this.onStorageEvent=o=>{o.key===ls&&this.loadRecentQueries()},this.localesDebouncer=new ae(10),this.searchDebouncer=new ae(100),this.launchSearch=o=>this.searchDebouncer.run(()=>this.fetchSearchData(o??this.buildSearchRequest(this.store.getState()))),this.buildSearchRequest=o=>({...o.request,facets:this.facetIds.map(n=>({id:n}))}),this.suggestDebouncer=new ae(1e3),this.launchSuggest=o=>this.suggestDebouncer.run(()=>this.fetchSuggestData(o??this.buildSuggestRequest(this.store.getState()))),this.buildSuggestRequest=o=>{var n;return{input:o.liveQuery,metadataFilters:o.request.metadataFilters,sort:(n=o.request.sort)!==null&&n!==void 0?n:[],sortId:o.request.sortId,contentLocale:o.request.contentLocale,scope:o.request.scope,keywordMatch:o.request.keywordMatch}},this.service=t??new ss,this.service.cache.addEventListener("clear-cache",o=>{o.detail.clearedKeys.includes("available-locales")&&this.updateLocales()}),this.searchWatcher=ui(e,this.buildSearchRequest,this.launchSearch),this.suggestWatcher=ui(e,this.buildSuggestRequest,this.launchSuggest)}async initService(){return this.updateLocales(),this.service.getConfiguration().then(e=>{this.store.actions.configuration(e),this.setSortId(this.store.getState().request.sortId)}),this.loadRecentQueries(),this.launchSearch()}addWindowListeners(){window.addEventListener("storage",this.onStorageEvent)}removeWindowListeners(){window.removeEventListener("storage",this.onStorageEvent)}updateSearchRequest(e,t=!1){let o=mt(this.store.getState().request);delete o.changedByConfiguration,this.store.actions.setRequest({...o,paging:{perPage:o.paging.perPage,page:t?1:o.paging.page},...e})}setQuery(e){this.updateSearchRequest({query:e},!0),this.setLiveQuery(e)}setContentLocale(e){var t,o;let n=(t=this.store.getState().locales)!==null&&t!==void 0?t:[],a=this.store.getState().request.contentLocale;if(e!=a){if(n.length>0){let s=l=>n.some(d=>d.lang==l);s(e)||(e=s(a)?a:n[0].lang)}this.updateSearchRequest({contentLocale:e,metadataFilters:[]},!0),this.canUpdateUiLocale&&(!((o=Sn.store.getState().localesConfiguration)===null||o===void 0)&&o.searchLanguageSetsUiLanguage)&&e&&Sn.requestUiLocaleUpdate(e)}return e}forceContentLocale(e){this.updateSearchRequest({contentLocale:e})}setPageSize(e){let t=this.store.getState().request;this.updateSearchRequest({paging:{...t.paging,perPage:isNaN(e)?20:gr(1,e,1e3)}})}setPageNumber(e){let t=this.store.getState().request;this.updateSearchRequest({paging:{...t.paging,page:isNaN(e)?1:Math.max(1,e)}})}get sortOptions(){var e,t;return(t=(e=this.store.getState().configuration)===null||e===void 0?void 0:e.sortOptions)!==null&&t!==void 0?t:[]}setSort(e){this.updateSearchRequest({sort:e},!0)}setSortId(e,t=!1){var o;let n=t?{changedByConfiguration:!0}:{};if(e==null||this.sortOptions.length==0)return this.updateSearchRequest({sortId:e,...n},!0),e;let a=(o=this.sortOptions.find(s=>s.id==e))!==null&&o!==void 0?o:this.sortOptions[0];return this.updateSearchRequest({sortId:a.id,...n},!0),a.id}setFilters(e){let t=e.filter(o=>!o.valueFilter||o.valueFilter.values.length>0);this.updateSearchRequest({metadataFilters:t},!0)}setClusterSortCriterion(e){this.updateSearchRequest({clusterSortCriterions:e})}setSearchInDocumentTitlesOnly(e){e?this.updateSearchRequest({virtualField:Eo.TITLE_ONLY,scope:fi.DOCUMENTS},!0):this.updateSearchRequest({virtualField:Eo.EVERYWHERE,scope:fi.DEFAULT},!0)}setKeywordMatch(e){this.updateSearchRequest({keywordMatch:e},!0)}setVirtualField(e){this.updateSearchRequest({virtualField:e},!0)}get searchInDocumentTitlesOnly(){return Fb(this.store.getState())}get keywordMatch(){return Bb(this.store.getState())}clearAllFilters(){this.setFilters([]),this.store.dispatchEvent(new Tn)}addFacet(e){this.facetIds=[...this.facetIds,e]}replaceFacet(e,t){let o=this.facetIds.filter(n=>n!=e);t&&o.push(t),this.facetIds=o}get facetIds(){var e;let t=this.store.getState().request;return[...new Set([...t.facets.map(o=>o.id),...((e=t.metadataFilters)!==null&&e!==void 0?e:[]).map(o=>o.key)])]}set facetIds(e){let o=[...new Set(e)].map(n=>({id:n}));this.updateSearchRequest({facets:o})}setFilter(e,t){this.setValueFilter(e,t)}setValueFilter(e,t){let o=this.store.getState().request.metadataFilters,n={key:e,valueFilter:{values:t,negative:!1}},a=[...o.filter(s=>!s.valueFilter),...o.filter(s=>s.valueFilter&&s.key!==n.key),n];this.setFilters(a)}setDateFilter(e,t){let o=this.store.getState().request.metadataFilters,n={key:e,dateFilter:{type:t}},a=[...o.filter(s=>!s.dateFilter),...o.filter(s=>s.dateFilter&&s.key!==n.key),n];this.setFilters(a)}removeDateFilter(e){let t=this.store.getState().request.metadataFilters,o=[...t.filter(n=>!n.dateFilter),...t.filter(n=>n.dateFilter&&n.key!==e)];this.setFilters(o)}setRangeFilter(e,t,o){let n=this.store.getState().request.metadataFilters,a={key:e,rangeFilter:{from:t,to:o}},s=[...n.filter(l=>!l.rangeFilter),...n.filter(l=>l.rangeFilter&&l.key!==a.key),a];this.setFilters(s)}removeRangeFilter(e){let t=this.store.getState().request.metadataFilters,o=[...t.filter(n=>!n.rangeFilter),...t.filter(n=>n.rangeFilter&&n.key!==e)];this.setFilters(o)}setLiveQuery(e){this.store.actions.liveQuery(e)}setRequest(e){this.updateSearchRequest({...e,facets:this.store.getState().request.facets},!0),this.setLiveQuery(e.query)}setScope(e){this.updateSearchRequest({scope:e})}setOtherQueryParams(e){this.updateSearchRequest({otherQueryParams:e})}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setCanUpdateUiLocale(e){this.canUpdateUiLocale=e}loadRecentQueries(){var e;this.store.actions.recentQueries(JSON.parse((e=window.localStorage.getItem(ls))!==null&&e!==void 0?e:"[]"))}addRecentQuery(e){if(e=e.trim(),e.length===0)return;let t=e.toLowerCase(),o=this.store.getState().recentQueries.filter(n=>n.toLowerCase()!==t).slice(0,gO-1);o.unshift(e),this.setRecentQueries(o)}removeRecentQuery(e){let t=e.trim().toLowerCase(),o=this.store.getState().recentQueries,n=o.filter(a=>a.toLowerCase()!==t);o.length!==n.length&&this.setRecentQueries(n)}setRecentQueries(e){let t=JSON.stringify(e);window.localStorage.setItem(ls,t),window.dispatchEvent(new StorageEvent("storage",{key:ls,newValue:t,storageArea:window.localStorage,url:window.location.href}))}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.locales((await this.service.getAvailableSearchLocales()).contentLocales))}async fetchSearchData(e){var t,o,n,a,s;if((t=this.cancelableSearch)===null||t===void 0||t.cancel(),!!this.isRequestNeeded(Qt.CLUSTERED_SEARCH))try{if(this.store.actions.paging(void 0),this.ignoreEmptyQuery&&e.query.length==0)this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0);else{!((o=this.store.getState().results)===null||o===void 0)&&o.length||this.store.actions.results(void 0),this.cancelableSearch=qo(this.service.launchSearch(e));let l=await this.cancelableSearch;if(this.store.actions.announcements(l.announcements),l.paging.currentPage<=1)this.store.actions.results(l.results),this.store.actions.facets(l.facets),this.store.actions.spellcheck(l.spellcheck);else{let d=((n=this.store.getState().results)!==null&&n!==void 0?n:[]).concat(l.results);this.store.actions.results(d),this.store.commands.clear(/^focus-result-/),this.store.commands.add({type:`focus-result-${(l.paging.currentPage-1)*((a=e.paging.perPage)!==null&&a!==void 0?a:20)+1}`})}this.store.actions.paging(l.paging)}}catch(l){l instanceof Jt||(console.error(l),(s=this.errorHandler)===null||s===void 0||s.call(this,l))}}async fetchSuggestData(e){var t;try{if((t=this.cancelableSuggest)===null||t===void 0||t.cancel(),e.input.length<3){this.store.actions.suggestResults([]);return}this.cancelableSuggest=qo(this.service.launchSuggest(e));let o=await this.cancelableSuggest;this.store.actions.suggestResults(o.suggestions)}catch(o){!(o instanceof Jt)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}clearResults(){this.store.actions.paging(void 0),this.store.actions.results(void 0),this.store.actions.announcements(void 0),this.store.actions.facets(void 0),this.store.actions.spellcheck(void 0)}}});var Ub,su,zb,au,yO,bO,Mt,Do=u(()=>{"use strict";O();K();Pi();nu();Ub=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},su=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},zb=Symbol("registerInterval"),au=Symbol("registerAttempts"),yO=40,bO=we(Symbol("toFtSearchComponent"),function(r){class e extends r{constructor(){super(...arguments),this.neededSearchRequests=[]}willUpdate(o){var n,a,s;super.willUpdate(o),o.has("neededSearchRequests")&&((n=this.stateManager)===null||n===void 0||n.unregisterComponent(this,(a=o.get("neededSearchRequests"))!==null&&a!==void 0?a:[]),(s=this.stateManager)===null||s===void 0||s.registerComponent(this,this.neededSearchRequests))}setSearchStateManager(o){this.clearStateManager(),this.stateManager=o,this.stateManager.registerComponent(this,this.neededSearchRequests),this.addStore(o.store,"search")}clearStateManager(){this.stateManager&&(this.stateManager.unregisterComponent(this,this.neededSearchRequests),this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[au]=0,this.tryToRegisterToContext(),this[zb]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null||this[au]>yO?window.clearInterval(this[zb]):(this[au]++,this.dispatchEvent(new su))}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return Ub([I()],e.prototype,"stateManager",void 0),Ub([I({hasChanged:gt})],e.prototype,"neededSearchRequests",void 0),e}),Mt=class extends bO(bt){}});function In(r){return r.filter(e=>e.key==="ft:lastEdition").filter(e=>!e.valueFilter).map(e=>e.dateFilter?e.dateFilter.type:"CUSTOM").shift()}function Pn(r){var e,t;return r.dateFilter?{key:r.key,type:"DATE",dateValue:r.dateFilter.type}:r.rangeFilter?{key:r.key,type:"RANGE",from:r.rangeFilter.from,to:r.rangeFilter.to}:{key:r.key,values:(e=r.valueFilter)===null||e===void 0?void 0:e.values,negative:(t=r.valueFilter)===null||t===void 0?void 0:t.negative}}var lu=u(()=>{"use strict"});var cs,Hb=u(()=>{"use strict";O();Hr();jt();lu();cs=class{constructor(e,t){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.enableAnalyticsEvents=!0,this.appName=void 0,this.appVersion=void 0,this.document=void 0,this.sendEvent=([o,n])=>{if(!this.canSendEvent()||!o||!n)return;let a=this.store.getState().request;this.document==null?this.sendKhubSearchEvent(a,o,n):this.sendDocumentSearchEvent(a,o,n)},this.eventsService=t??new Ua,this.resultsWatcher=ui(e,o=>[o.results,o.paging],this.sendEvent)}setEnableAnalyticsEvents(e){this.enableAnalyticsEvents=e}setAppName(e){this.appName=e}setAppVersion(e){this.appVersion=e}setDocumentSearch(e){this.document=e}setDocumentSearchFromMap(e){this.setDocumentSearch(this.eventsService.convertMapToAnalyticsDocument(e))}initAppInfo(){let{apiIntegrationIdentifier:e,apiIntegrationAppVersion:t}=H.getState();this.setAppName(e??"unknown"),this.setAppVersion(t??"unknown")}canSendEvent(){if(this.appName==null||this.appVersion==null)return console.debug("ft-search-context.eventManager is not initialized. No events will be sent!"),!1;let{editorMode:e}=H.getState();return this.enableAnalyticsEvents&&!e}sendKhubSearchEvent(e,t,o){let n={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.KHUB__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.totalClustersCount},searchQuery:{terms:e.query,searchType:e.virtualField,lastUpdate:In(e.metadataFilters),facets:e.metadataFilters.map(a=>Pn(a))}};this.eventsService.sendKhubSearchEvent(n)}sendDocumentSearchEvent(e,t,o){if(e.metadataFilters.find(a=>{var s;return a.key==="ft:publicationId"&&((s=a.valueFilter)===null||s===void 0?void 0:s.values[0])===this.document.id})!==void 0){let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.DOCUMENT__SEARCH,searchResponse:{autocorrect:this.store.getState().spellcheck!=null,nbResults:o.totalClustersCount},searchQuery:{terms:e.query},document:this.document};this.eventsService.sendDocumentSearchEvent(a)}}sendResultClickedEvent(e,t){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==ar.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.SEARCH_PAGE__SELECT,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:In(o.metadataFilters),facets:o.metadataFilters.map(s=>Pn(s))},searchResult:{rank:t,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchPageSelectEvent(a)}sendResultContextMenuOpenedEvent(e,t){if(!this.canSendEvent())return;let o=this.store.getState().request,n;e.type==ar.TOPIC&&(n={tocId:e.topic.tocId,title:e.topic.title});let a={offline:!1,appVersion:this.appVersion,appName:this.appName,name:Oo.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU,searchQuery:{terms:o.query,searchType:o.virtualField,lastUpdate:In(o.metadataFilters),facets:o.metadataFilters.map(s=>Pn(s))},searchResult:{rank:t,type:e.type,document:this.convertDocument(e),topic:n},externalLink:this.convertExternalLink(e)};this.eventsService.sendSearchResultOpenContextMenuEvent(a)}convertDocument(e){switch(e.type){case ar.MAP:return{id:e.map.mapId,title:e.map.title,type:Ur.STRUCTURED_DOCUMENT,metadata:e.map.metadata};case ar.TOPIC:return{id:e.topic.mapId,title:e.topic.mapTitle,type:Ur.STRUCTURED_DOCUMENT,metadata:e.topic.metadata};case ar.DOCUMENT:return{id:e.document.documentId,title:e.document.title,type:Ur.UNSTRUCTURED_DOCUMENT,metadata:e.document.metadata,mimeType:e.document.mimeType};case ar.HTML_PACKAGE:return{id:e.htmlPackage.packageId,title:e.htmlPackage.title,type:Ur.HTML_PACKAGE,metadata:e.htmlPackage.metadata};case ar.HTML_PACKAGE_PAGE:return{id:e.htmlPackagePage.packageId,title:e.htmlPackagePage.title,type:Ur.HTML_PACKAGE,metadata:e.htmlPackagePage.metadata};default:throw new TypeError("Unknown type "+e.type)}}convertExternalLink(e){var t;return(t=_t(e))===null||t===void 0?void 0:t.originUrl}}});var Fe,ve,cu=u(()=>{"use strict";_();K();O();iu();Do();jt();Ma();Hb();_n();Fe=function(r,e,t,o){var n=arguments.length,a=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,t):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,e,t,o);else for(var l=r.length-1;l>=0;l--)(s=r[l])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);return n>3&&a&&Object.defineProperty(e,t,a),a},ve=class extends bt{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Ni.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=t=>this.handleLoadError(t),this.addStore(this.stateManager.store,"search")}return this._stateManager}get eventManager(){return this._eventManager==null&&(this._eventManager=new cs(this.stateManager.store)),this._eventManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.otherQueryParams={},this._appIntegrationInfoReady=!1,this.addStore(H)}render(){return b`
|
|
768
768
|
<slot @register-ft-search-component=${this.registerComponent} @ft-search-result-click=${this.onResultClicked}
|
|
769
769
|
@ft-search-result-open-context-menu=${this.onResultContextMenuOpened}></slot>
|
|
770
770
|
`}willUpdate(e){super.willUpdate(e),e.has("_appIntegrationInfoReady")&&this._appIntegrationInfoReady&&this.eventManager.initAppInfo(),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.forceContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),e.has("sortId")&&this.stateManager.setSortId(this.sortId),e.has("sort")&&this.sort!==void 0&&this.stateManager.setSort(this.sort),e.has("pageSize")&&this.pageSize!==void 0&&this.stateManager.setPageSize(this.pageSize),e.has("searchInDocumentTitlesOnly")&&this.searchInDocumentTitlesOnly!==void 0&&this.stateManager.setSearchInDocumentTitlesOnly(this.searchInDocumentTitlesOnly),e.has("keywordMatch")&&this.stateManager.setKeywordMatch(this.keywordMatch),e.has("scope")&&this.scope!==void 0&&this.stateManager.setScope(this.scope),e.has("virtualField")&&this.virtualField!==void 0&&this.stateManager.setVirtualField(this.virtualField),e.has("ignoreEmptyQuery")&&this.ignoreEmptyQuery!==void 0&&this.stateManager.setIgnoreEmptyQuery(this.ignoreEmptyQuery),e.has("openExternalDocumentInNewTab")&&this.openExternalDocumentInNewTab!==void 0&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),e.has("otherQueryParams")&&this.otherQueryParams!==void 0&&this.stateManager.setOtherQueryParams(this.otherQueryParams),e.has("session")&&this.session!==void 0&&e.get("session")!=null&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.clearResults(),this.stateManager.setQuery(this.query),this.stateManager.forceContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort),this.stateManager.setOtherQueryParams(this.otherQueryParams),this.stateManager.addWindowListeners()}disconnectedCallback(){super.disconnectedCallback(),this.stateManager.removeWindowListeners(),this.stateManager.clearResults()}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new ns(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new as(this.request,this.paging,this.spellcheckAutocorrect))}registerComponent(e){e.stopPropagation();let t=e.composedPath()[0];this.register(t)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new is(e))}reloadSavedSearches(){Ed.clearMySearches()}clear(){this.stateManager.clear()}onResultClicked(e){this.eventManager.sendResultClickedEvent(e.detail.result,e.detail.rank)}onResultContextMenuOpened(e){this.eventManager.sendResultContextMenuOpenedEvent(e.detail.result,e.detail.rank)}};ve.elementDefinitions={};ve.styles=ou;Fe([fe({store:H.name})],ve.prototype,"session",void 0);Fe([h()],ve.prototype,"query",void 0);Fe([h()],ve.prototype,"contentLocale",void 0);Fe([Tt()],ve.prototype,"pageSize",void 0);Fe([h({type:Boolean})],ve.prototype,"searchInDocumentTitlesOnly",void 0);Fe([h()],ve.prototype,"keywordMatch",void 0);Fe([h()],ve.prototype,"scope",void 0);Fe([h()],ve.prototype,"virtualField",void 0);Fe([h({type:Boolean})],ve.prototype,"ignoreEmptyQuery",void 0);Fe([fe({store:H.name})],ve.prototype,"openExternalDocumentInNewTab",void 0);Fe([ue([])],ve.prototype,"filters",void 0);Fe([h()],ve.prototype,"sortId",void 0);Fe([ue([])],ve.prototype,"sort",void 0);Fe([ue({})],ve.prototype,"otherQueryParams",void 0);Fe([fe({store:"search"})],ve.prototype,"request",void 0);Fe([fe({store:"search"})],ve.prototype,"paging",void 0);Fe([fe({store:"search",selector:r=>r.spellcheck})],ve.prototype,"spellcheckAutocorrect",void 0);Fe([fe({store:H.name,selector:r=>r.apiIntegrationIdentifier!==void 0&&r.apiIntegrationAppVersion!==void 0})],ve.prototype,"_appIntegrationInfoReady",void 0);Fe([h({attribute:!1})],ve.prototype,"searchServiceProvider",void 0)});var Vb,Wb=u(()=>{"use strict";cu();Vb={"ft-search-context":ve}});var jb=u(()=>{"use strict";O();Wb();U(Vb)});var Gb={};q(Gb,{FtSearchContext:()=>ve,FtSearchContextCssVariables:()=>hO,FtSearchStateManager:()=>Ni,convertMetadataFilterToAnalyticsFacet:()=>Pn,getAnalyticsLastUpdate:()=>In,keywordMatchSelector:()=>Bb,searchInDocumentTitlesOnlySelector:()=>Fb,styles:()=>ou});var Kb=u(()=>{"use strict";iu();Nb();cu();nu();lu();jb()});var qb=u(()=>{"use strict"});var Rr,du=u(()=>{"use strict";Dt();Rr=lr.build("designedSearchInput")});var Ft,uu=u(()=>{"use strict";(function(r){r.S="S",r.M="M",r.L="L",r.XL="XL",r.XXL="XXL"})(Ft||(Ft={}))});var Zb,pu=u(()=>{"use strict";_();Zb=w`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-search-in-document",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.16",
|
|
4
4
|
"description": "A search component to retrieve occurrences in documents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "2.1.
|
|
23
|
-
"@fluid-topics/ft-card": "2.1.
|
|
24
|
-
"@fluid-topics/ft-i18n": "2.1.
|
|
25
|
-
"@fluid-topics/ft-search-context": "2.1.
|
|
26
|
-
"@fluid-topics/ft-search-input": "2.1.
|
|
27
|
-
"@fluid-topics/ft-search-load-more-button": "2.1.
|
|
28
|
-
"@fluid-topics/ft-search-result-abstract": "2.1.
|
|
29
|
-
"@fluid-topics/ft-search-result-title": "2.1.
|
|
30
|
-
"@fluid-topics/ft-search-results": "2.1.
|
|
31
|
-
"@fluid-topics/ft-search-results-number": "2.1.
|
|
32
|
-
"@fluid-topics/ft-typography": "2.1.
|
|
33
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-button": "2.1.16",
|
|
23
|
+
"@fluid-topics/ft-card": "2.1.16",
|
|
24
|
+
"@fluid-topics/ft-i18n": "2.1.16",
|
|
25
|
+
"@fluid-topics/ft-search-context": "2.1.16",
|
|
26
|
+
"@fluid-topics/ft-search-input": "2.1.16",
|
|
27
|
+
"@fluid-topics/ft-search-load-more-button": "2.1.16",
|
|
28
|
+
"@fluid-topics/ft-search-result-abstract": "2.1.16",
|
|
29
|
+
"@fluid-topics/ft-search-result-title": "2.1.16",
|
|
30
|
+
"@fluid-topics/ft-search-results": "2.1.16",
|
|
31
|
+
"@fluid-topics/ft-search-results-number": "2.1.16",
|
|
32
|
+
"@fluid-topics/ft-typography": "2.1.16",
|
|
33
|
+
"@fluid-topics/ft-wc-utils": "2.1.16",
|
|
34
34
|
"@fluid-topics/public-api": "1.0.129",
|
|
35
35
|
"lit": "3.1.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "64057d048f5055bec9279a012204c826d10bc8fc"
|
|
38
38
|
}
|