@fluid-topics/ft-reader-search-in-document 1.1.99 → 1.1.100

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.
@@ -932,7 +932,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ft-conte
932
932
  `}update(e){var o;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:(o=this.defaultMessage)!==null&&o!==void 0?o:""})}};Ge.elementDefinitions={};Ge.styles=fu;no([(0,bn.redux)()],Ge.prototype,"editorMode",void 0);no([(0,gn.property)()],Ge.prototype,"context",void 0);no([(0,gn.property)()],Ge.prototype,"key",void 0);no([(0,bn.jsonProperty)([])],Ge.prototype,"args",void 0);no([(0,gn.property)()],Ge.prototype,"defaultMessage",void 0)});var Qe,Dd=f(()=>{"use strict";br();Qe=class t{static build(e){return new t(e)}static fromGwt(e){return new t(e)}constructor(e){this.name=e,this.properties=new Proxy({},{get:(o,n)=>{let i=n;return a=>({context:this.name,key:i,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(o,n)=>(...i)=>pr.resolveMessage(this.name,n,...i)})}}});var Md=f(()=>{"use strict";mn()});var Bd=f(()=>{"use strict"});var Ud,Je=f(()=>{"use strict";Ud=y(A());ga();Dd();mn();Md();Ni();Bd();ga();(0,Ud.customElement)("ft-i18n")(Ge)});var Hd=_t(zd=>{(function(t){var e=function(o){var n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(m){return m&&DataView.prototype.isPrototypeOf(m)}if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(m){return m&&a.indexOf(Object.prototype.toString.call(m))>-1};function l(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}function d(m){return typeof m!="string"&&(m=String(m)),m}function p(m){var S={next:function(){var I=m.shift();return{done:I===void 0,value:I}}};return n.iterable&&(S[Symbol.iterator]=function(){return S}),S}function h(m){this.map={},m instanceof h?m.forEach(function(S,I){this.append(I,S)},this):Array.isArray(m)?m.forEach(function(S){this.append(S[0],S[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(S){this.append(S,m[S])},this)}h.prototype.append=function(m,S){m=l(m),S=d(S);var I=this.map[m];this.map[m]=I?I+", "+S:S},h.prototype.delete=function(m){delete this.map[l(m)]},h.prototype.get=function(m){return m=l(m),this.has(m)?this.map[m]:null},h.prototype.has=function(m){return this.map.hasOwnProperty(l(m))},h.prototype.set=function(m,S){this.map[l(m)]=d(S)},h.prototype.forEach=function(m,S){for(var I in this.map)this.map.hasOwnProperty(I)&&m.call(S,this.map[I],I,this)},h.prototype.keys=function(){var m=[];return this.forEach(function(S,I){m.push(I)}),p(m)},h.prototype.values=function(){var m=[];return this.forEach(function(S){m.push(S)}),p(m)},h.prototype.entries=function(){var m=[];return this.forEach(function(S,I){m.push([I,S])}),p(m)},n.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function g(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function b(m){return new Promise(function(S,I){m.onload=function(){S(m.result)},m.onerror=function(){I(m.error)}})}function v(m){var S=new FileReader,I=b(S);return S.readAsArrayBuffer(m),I}function x(m){var S=new FileReader,I=b(S);return S.readAsText(m),I}function O(m){for(var S=new Uint8Array(m),I=new Array(S.length),Q=0;Q<S.length;Q++)I[Q]=String.fromCharCode(S[Q]);return I.join("")}function P(m){if(m.slice)return m.slice(0);var S=new Uint8Array(m.byteLength);return S.set(new Uint8Array(m)),S.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:n.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:n.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():n.arrayBuffer&&n.blob&&i(m)?(this._bodyArrayBuffer=P(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||s(m))?this._bodyArrayBuffer=P(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var m=g(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var m=g(this);if(m)return m;if(this._bodyBlob)return x(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(O(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(V)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function M(m){var S=m.toUpperCase();return N.indexOf(S)>-1?S:m}function _(m,S){S=S||{};var I=S.body;if(m instanceof _){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,S.headers||(this.headers=new h(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!I&&m._bodyInit!=null&&(I=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=S.credentials||this.credentials||"same-origin",(S.headers||!this.headers)&&(this.headers=new h(S.headers)),this.method=M(S.method||this.method||"GET"),this.mode=S.mode||this.mode||null,this.signal=S.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&I)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(I)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})};function V(m){var S=new FormData;return m.trim().split("&").forEach(function(I){if(I){var Q=I.split("="),de=Q.shift().replace(/\+/g," "),K=Q.join("=").replace(/\+/g," ");S.append(decodeURIComponent(de),decodeURIComponent(K))}}),S}function ve(m){var S=new h,I=m.replace(/\r?\n[\t ]+/g," ");return I.split(/\r?\n/).forEach(function(Q){var de=Q.split(":"),K=de.shift().trim();if(K){var fo=de.join(":").trim();S.append(K,fo)}}),S}R.call(_.prototype);function ce(m,S){S||(S={}),this.type="default",this.status=S.status===void 0?200:S.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in S?S.statusText:"OK",this.headers=new h(S.headers),this.url=S.url||"",this._initBody(m)}R.call(ce.prototype),ce.prototype.clone=function(){return new ce(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},ce.error=function(){var m=new ce(null,{status:0,statusText:""});return m.type="error",m};var Pr=[301,302,303,307,308];ce.redirect=function(m,S){if(Pr.indexOf(S)===-1)throw new RangeError("Invalid status code");return new ce(null,{status:S,headers:{location:m}})},o.DOMException=t.DOMException;try{new o.DOMException}catch{o.DOMException=function(S,I){this.message=S,this.name=I;var Q=Error(S);this.stack=Q.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ke(m,S){return new Promise(function(I,Q){var de=new _(m,S);if(de.signal&&de.signal.aborted)return Q(new o.DOMException("Aborted","AbortError"));var K=new XMLHttpRequest;function fo(){K.abort()}K.onload=function(){var Ir={status:K.status,statusText:K.statusText,headers:ve(K.getAllResponseHeaders()||"")};Ir.url="responseURL"in K?K.responseURL:Ir.headers.get("X-Request-URL");var Bn="response"in K?K.response:K.responseText;I(new ce(Bn,Ir))},K.onerror=function(){Q(new TypeError("Network request failed"))},K.ontimeout=function(){Q(new TypeError("Network request failed"))},K.onabort=function(){Q(new o.DOMException("Aborted","AbortError"))},K.open(de.method,de.url,!0),de.credentials==="include"?K.withCredentials=!0:de.credentials==="omit"&&(K.withCredentials=!1),"responseType"in K&&n.blob&&(K.responseType="blob"),de.headers.forEach(function(Ir,Bn){K.setRequestHeader(Bn,Ir)}),de.signal&&(de.signal.addEventListener("abort",fo),K.onreadystatechange=function(){K.readyState===4&&de.signal.removeEventListener("abort",fo)}),K.send(typeof de._bodyInit>"u"?null:de._bodyInit)})}return ke.polyfill=!0,t.fetch||(t.fetch=ke,t.Headers=h,t.Request=_,t.Response=ce),o.Headers=h,o.Request=_,o.Response=ce,o.fetch=ke,Object.defineProperty(o,"__esModule",{value:!0}),o}({})})(typeof self<"u"?self:zd)});var jd=f(()=>{});var Gd,Vd,Kd,Zd,qd,Yd,Xd,Qd,Jd,ep,tp,xr,rp,vn,op,vr,Sr,ue,va=f(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Gd||(Gd={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Vd||(Vd={}));(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Kd||(Kd={}));(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Zd||(Zd={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(qd||(qd={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(Yd||(Yd={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(Xd||(Xd={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Qd||(Qd={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Jd||(Jd={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(ep||(ep={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(tp||(tp={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(xr||(xr={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(rp||(rp={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(vn||(vn={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(op||(op={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(vr||(vr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(Sr||(Sr={}));(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(ue||(ue={}))});var np,ip=f(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(np||(np={}))});var QO,ap=f(()=>{va();QO={[ue.PERSONAL_BOOK_SHARE_USER]:[ue.PERSONAL_BOOK_USER],[ue.HTML_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.PDF_EXPORT_USER]:[ue.PERSONAL_BOOK_USER],[ue.KHUB_ADMIN]:[ue.CONTENT_PUBLISHER],[ue.ADMIN]:[ue.KHUB_ADMIN,ue.USERS_ADMIN,ue.PORTAL_ADMIN],[ue.DEVELOPER]:[ue.BETA_USER,ue.DEBUG_USER]}});var sp=f(()=>{});var rC,Sa=f(()=>{rC=y(Hd(),1);jd();va();ip();ap();sp()});var cp,lp=f(()=>{qn();cp=t=>t??ae});var up=f(()=>{lp()});function dp(t){var e,o,n,i,a;return((i=(o=(e=t.map)===null||e===void 0?void 0:e.openMode)!==null&&o!==void 0?o:(n=t.topic)===null||n===void 0?void 0:n.openMode)!==null&&i!==void 0?i:(a=t.document)===null||a===void 0?void 0:a.openMode)===vn.EXTERNAL}function Sn(t){var e,o,n,i,a;if(dp(t))return(i=(o=(e=t.map)===null||e===void 0?void 0:e.originUrl)!==null&&o!==void 0?o:(n=t.topic)===null||n===void 0?void 0:n.originUrl)!==null&&i!==void 0?i:(a=t.document)===null||a===void 0?void 0:a.originUrl;switch(t.type){case vr.MAP:return t.map.readerUrl;case vr.DOCUMENT:return t.document.viewerUrl;case vr.TOPIC:return t.topic.readerUrl}return""}function pp(t,e){return cp(e&&dp(t)?"_blank":void 0)}var Or,Oa=f(()=>{"use strict";Sa();up();Or=class extends CustomEvent{constructor(e,o){super("ft-search-result-click",{detail:{result:e,rank:o},bubbles:!0,composed:!0})}}});var yp,Qh,Ea,wa=f(()=>{"use strict";yp=y(k()),Qh={},Ea=yp.css`
933
933
  `});var gp=f(()=>{"use strict"});var bp,Jh,xp,vp=f(()=>{"use strict";bp=y(A()),Jh={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var o;t.request.clusterSortCriterions=(o=e.payload)!==null&&o!==void 0?o:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload},setRequestPeriodFilter:(t,e)=>{t.request.periodFilter=e.payload}},xp=t=>bp.FtReduxStore.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:Jh})});var En,Sp=f(()=>{"use strict";br();En=class extends Ye{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((o,n)=>0|31*o+n.charCodeAt(0),0)}}});var et,Op,so,Cr,Aa=f(()=>{"use strict";et=y(A());vp();Sa();Sp();Op=t=>t.request.virtualField===xr.TITLE_ONLY&&t.request.scope===Sr.DOCUMENTS,so=class t extends Event{constructor(){super(t.eventName)}};so.eventName="search-context-clear-all-filters";Cr=class t{static build(e,o){return new t(xp(e.trim()||"context"),o)}constructor(e,o){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new et.Debouncer(10),this.searchDebouncer=new et.Debouncer(100),this.suggestDebouncer=new et.Debouncer(300),this.service=o??new En}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let o=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(o){let i=a=>o.some(s=>s.lang==a);i(e)||(e=i(n)?n:o[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let o=e.filter(n=>n.values.length>0);this.store.actions.setRequestFilters(o),this.store.actions.setPageNumber(1),o.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(xr.TITLE_ONLY),this.store.actions.setRequestScope(Sr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(xr.EVERYWHERE),this.store.actions.setRequestScope(Sr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return Op(this.store.getState())}get periodFilter(){return this.store.getState().request.periodFilter}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new so)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,o){let n=this.facetIds.filter(i=>i!=e);o&&n.push(o),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,o){let n=this.store.getState().request.filters,i={key:e,values:o,negative:!1},a=[...n.filter(s=>s.key!==e),i];this.setFilters(a)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setPeriodFilter(e){this.store.actions.setRequestPeriodFilter(e),this.store.actions.setPageNumber(1),this.launchSearch()}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,o;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=(0,et.cancelable)(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((o=this.store.getState().results)!==null&&o!==void 0?o:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof et.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let o=this.store.getState(),n=o.request,i={input:o.liveQuery,filters:n.filters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=(0,et.cancelable)(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(o){!(o instanceof et.CanceledPromiseError)&&this.errorHandler&&this.errorHandler(o)}}clear(){this.store.clear()}}});function tm(t){var e;class o extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ra]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Ra]):this.dispatchEvent(new Na)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ra,em([(0,Ep.state)()],o.prototype,"stateManager",void 0),o}var Cp,Ep,em,Na,Ra,we,Pt=f(()=>{"use strict";Cp=y(A()),Ep=y(X());gp();Aa();em=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},Na=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Ra=Symbol("registerInterval");we=class extends tm(Cp.FtLitElementRedux){}});var wp,tt,Ve,me,wn,An,Rn,ee,Pa=f(()=>{"use strict";wp=y(k()),tt=y(X()),Ve=y(A());wa();Pt();br();pa();me=function(t,e,o,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,o,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,o,a):s(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},wn=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},An=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},Rn=class extends CustomEvent{constructor(e,o,n){super("ft-search-results-change",{detail:{request:e,paging:o,spellcheck:n}})}},ee=class extends Ve.FtLitElementRedux{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Cr.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=o=>this.handleLoadError(o),this.addStore(this.stateManager.store,"search")}return this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.addStore(D)}render(){return wp.html`
934
934
  <slot @register-ft-search-component=${this.registerComponent}></slot>
935
- `}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.setContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),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("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("periodFilter")&&this.periodFilter!==void 0&&this.stateManager.setPeriodFilter({key:"ft:lastEdition",periodType:this.periodFilter}),e.has("session")&&this.session!==void 0&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new An(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Rn(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let o=e.composedPath()[0];this.register(o)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new wn(e))}reloadSavedSearches(){Ed.clearMySearches()}clear(){this.stateManager.clear()}};ee.elementDefinitions={};ee.styles=Ea;me([(0,Ve.redux)({store:D.name})],ee.prototype,"session",void 0);me([(0,tt.property)()],ee.prototype,"query",void 0);me([(0,tt.property)()],ee.prototype,"contentLocale",void 0);me([(0,tt.property)({type:Number})],ee.prototype,"pageSize",void 0);me([(0,tt.property)({type:Boolean})],ee.prototype,"searchInDocumentTitlesOnly",void 0);me([(0,tt.property)()],ee.prototype,"periodFilter",void 0);me([(0,tt.property)()],ee.prototype,"scope",void 0);me([(0,tt.property)()],ee.prototype,"virtualField",void 0);me([(0,tt.property)({type:Boolean})],ee.prototype,"ignoreEmptyQuery",void 0);me([(0,Ve.redux)({store:D.name})],ee.prototype,"openExternalDocumentInNewTab",void 0);me([(0,Ve.jsonProperty)([])],ee.prototype,"filters",void 0);me([(0,Ve.jsonProperty)([])],ee.prototype,"sort",void 0);me([(0,Ve.redux)({store:"search"})],ee.prototype,"request",void 0);me([(0,Ve.redux)({store:"search"})],ee.prototype,"paging",void 0);me([(0,Ve.redux)({store:"search",selector:t=>t.spellcheck})],ee.prototype,"autocorrect",void 0);me([(0,tt.property)({attribute:!1})],ee.prototype,"searchServiceProvider",void 0)});var Ap=f(()=>{"use strict"});var Np={};kt(Np,{ClearAllFiltersEvent:()=>so,FtSearchContext:()=>ee,FtSearchContextCssVariables:()=>Qh,FtSearchStateManager:()=>Cr,LoadErrorEvent:()=>wn,SearchRequestChangeEvent:()=>An,SearchResultsChangeEvent:()=>Rn,searchInDocumentTitlesOnlySelector:()=>Op,styles:()=>Ea});var Rp,Pp=f(()=>{"use strict";Rp=y(A());Pa();wa();Ap();Pa();Aa();(0,Rp.customElement)("ft-search-context")(ee)});var co,Ip=f(()=>{"use strict";Je();co=Qe.build("designedSearchInput")});var Tp,Lp,_p=f(()=>{"use strict";Tp=y(k());qr();Lp=Tp.css`
935
+ `}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.setContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),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("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("periodFilter")&&this.periodFilter!=null&&this.stateManager.setPeriodFilter({key:"ft:lastEdition",periodType:this.periodFilter}),e.has("session")&&this.session!==void 0&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new An(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new Rn(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let o=e.composedPath()[0];this.register(o)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new wn(e))}reloadSavedSearches(){Ed.clearMySearches()}clear(){this.stateManager.clear()}};ee.elementDefinitions={};ee.styles=Ea;me([(0,Ve.redux)({store:D.name})],ee.prototype,"session",void 0);me([(0,tt.property)()],ee.prototype,"query",void 0);me([(0,tt.property)()],ee.prototype,"contentLocale",void 0);me([(0,tt.property)({type:Number})],ee.prototype,"pageSize",void 0);me([(0,tt.property)({type:Boolean})],ee.prototype,"searchInDocumentTitlesOnly",void 0);me([(0,tt.property)()],ee.prototype,"periodFilter",void 0);me([(0,tt.property)()],ee.prototype,"scope",void 0);me([(0,tt.property)()],ee.prototype,"virtualField",void 0);me([(0,tt.property)({type:Boolean})],ee.prototype,"ignoreEmptyQuery",void 0);me([(0,Ve.redux)({store:D.name})],ee.prototype,"openExternalDocumentInNewTab",void 0);me([(0,Ve.jsonProperty)([])],ee.prototype,"filters",void 0);me([(0,Ve.jsonProperty)([])],ee.prototype,"sort",void 0);me([(0,Ve.redux)({store:"search"})],ee.prototype,"request",void 0);me([(0,Ve.redux)({store:"search"})],ee.prototype,"paging",void 0);me([(0,Ve.redux)({store:"search",selector:t=>t.spellcheck})],ee.prototype,"autocorrect",void 0);me([(0,tt.property)({attribute:!1})],ee.prototype,"searchServiceProvider",void 0)});var Ap=f(()=>{"use strict"});var Np={};kt(Np,{ClearAllFiltersEvent:()=>so,FtSearchContext:()=>ee,FtSearchContextCssVariables:()=>Qh,FtSearchStateManager:()=>Cr,LoadErrorEvent:()=>wn,SearchRequestChangeEvent:()=>An,SearchResultsChangeEvent:()=>Rn,searchInDocumentTitlesOnlySelector:()=>Op,styles:()=>Ea});var Rp,Pp=f(()=>{"use strict";Rp=y(A());Pa();wa();Ap();Pa();Aa();(0,Rp.customElement)("ft-search-context")(ee)});var co,Ip=f(()=>{"use strict";Je();co=Qe.build("designedSearchInput")});var Tp,Lp,_p=f(()=>{"use strict";Tp=y(k());qr();Lp=Tp.css`
936
936
  * {
937
937
  box-sizing: border-box;
938
938
  }
@@ -977,7 +977,7 @@ Also for action icons.`,d.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
977
977
  `}update(e){var r;super.update(e),["context","key","defaultMessage"].some(n=>e.has(n))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:(r=this.defaultMessage)!==null&&r!==void 0?r:""})}};qe.elementDefinitions={};qe.styles=xf;Bo([te()],qe.prototype,"editorMode",void 0);Bo([C()],qe.prototype,"context",void 0);Bo([C()],qe.prototype,"key",void 0);Bo([Oe([])],qe.prototype,"args",void 0);Bo([C()],qe.prototype,"defaultMessage",void 0)});var nt,Tf=p(()=>{"use strict";Hr();nt=class t{static build(e){return new t(e)}static fromGwt(e){return new t(e)}constructor(e){this.name=e,this.properties=new Proxy({},{get:(r,n)=>{let i=n;return a=>({context:this.name,key:i,args:typeof a=="function"?void 0:a,argsProvider:typeof a=="function"?a:void 0})}}),this.messages=new Proxy({},{get:(r,n)=>(...i)=>Wr.resolveMessage(this.name,n,...i)})}}});var If=p(()=>{"use strict";ui()});var Lf=p(()=>{"use strict"});var it=p(()=>{"use strict";$();kl();Tf();ui();If();Ol();Lf();kl();z("ft-i18n")(qe)});var Mf=Gh(kf=>{(function(t){var e=function(r){var n={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function i(y){return y&&DataView.prototype.isPrototypeOf(y)}if(n.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(y){return y&&a.indexOf(Object.prototype.toString.call(y))>-1};function l(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(y))throw new TypeError("Invalid character in header field name");return y.toLowerCase()}function c(y){return typeof y!="string"&&(y=String(y)),y}function u(y){var v={next:function(){var N=y.shift();return{done:N===void 0,value:N}}};return n.iterable&&(v[Symbol.iterator]=function(){return v}),v}function h(y){this.map={},y instanceof h?y.forEach(function(v,N){this.append(N,v)},this):Array.isArray(y)?y.forEach(function(v){this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}h.prototype.append=function(y,v){y=l(y),v=c(v);var N=this.map[y];this.map[y]=N?N+", "+v:v},h.prototype.delete=function(y){delete this.map[l(y)]},h.prototype.get=function(y){return y=l(y),this.has(y)?this.map[y]:null},h.prototype.has=function(y){return this.map.hasOwnProperty(l(y))},h.prototype.set=function(y,v){this.map[l(y)]=c(v)},h.prototype.forEach=function(y,v){for(var N in this.map)this.map.hasOwnProperty(N)&&y.call(v,this.map[N],N,this)},h.prototype.keys=function(){var y=[];return this.forEach(function(v,N){y.push(N)}),u(y)},h.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),u(y)},h.prototype.entries=function(){var y=[];return this.forEach(function(v,N){y.push([N,v])}),u(y)},n.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function m(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function g(y){return new Promise(function(v,N){y.onload=function(){v(y.result)},y.onerror=function(){N(y.error)}})}function b(y){var v=new FileReader,N=g(v);return v.readAsArrayBuffer(y),N}function x(y){var v=new FileReader,N=g(v);return v.readAsText(y),N}function E(y){for(var v=new Uint8Array(y),N=new Array(v.length),K=0;K<v.length;K++)N[K]=String.fromCharCode(v[K]);return N.join("")}function T(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function I(){return this.bodyUsed=!1,this._initBody=function(y){this._bodyInit=y,y?typeof y=="string"?this._bodyText=y:n.blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:n.formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():n.arrayBuffer&&n.blob&&i(y)?(this._bodyArrayBuffer=T(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||s(y))?this._bodyArrayBuffer=T(y):this._bodyText=y=Object.prototype.toString.call(y):this._bodyText="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return x(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n.formData&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(y){var v=y.toUpperCase();return k.indexOf(v)>-1?v:y}function S(y,v){v=v||{};var N=v.body;if(y instanceof S){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new h(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!N&&y._bodyInit!=null&&(N=y._bodyInit,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new h(v.headers)),this.method=O(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&N)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(N)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})};function w(y){var v=new FormData;return y.trim().split("&").forEach(function(N){if(N){var K=N.split("="),ue=K.shift().replace(/\+/g," "),Y=K.join("=").replace(/\+/g," ");v.append(decodeURIComponent(ue),decodeURIComponent(Y))}}),v}function B(y){var v=new h,N=y.replace(/\r?\n[\t ]+/g," ");return N.split(/\r?\n/).forEach(function(K){var ue=K.split(":"),Y=ue.shift().trim();if(Y){var Ho=ue.join(":").trim();v.append(Y,Ho)}}),v}I.call(S.prototype);function W(y,v){v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in v?v.statusText:"OK",this.headers=new h(v.headers),this.url=v.url||"",this._initBody(y)}I.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},W.error=function(){var y=new W(null,{status:0,statusText:""});return y.type="error",y};var be=[301,302,303,307,308];W.redirect=function(y,v){if(be.indexOf(v)===-1)throw new RangeError("Invalid status code");return new W(null,{status:v,headers:{location:y}})},r.DOMException=t.DOMException;try{new r.DOMException}catch{r.DOMException=function(v,N){this.message=v,this.name=N;var K=Error(v);this.stack=K.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function q(y,v){return new Promise(function(N,K){var ue=new S(y,v);if(ue.signal&&ue.signal.aborted)return K(new r.DOMException("Aborted","AbortError"));var Y=new XMLHttpRequest;function Ho(){Y.abort()}Y.onload=function(){var Jr={status:Y.status,statusText:Y.statusText,headers:B(Y.getAllResponseHeaders()||"")};Jr.url="responseURL"in Y?Y.responseURL:Jr.headers.get("X-Request-URL");var Oi="response"in Y?Y.response:Y.responseText;N(new W(Oi,Jr))},Y.onerror=function(){K(new TypeError("Network request failed"))},Y.ontimeout=function(){K(new TypeError("Network request failed"))},Y.onabort=function(){K(new r.DOMException("Aborted","AbortError"))},Y.open(ue.method,ue.url,!0),ue.credentials==="include"?Y.withCredentials=!0:ue.credentials==="omit"&&(Y.withCredentials=!1),"responseType"in Y&&n.blob&&(Y.responseType="blob"),ue.headers.forEach(function(Jr,Oi){Y.setRequestHeader(Oi,Jr)}),ue.signal&&(ue.signal.addEventListener("abort",Ho),Y.onreadystatechange=function(){Y.readyState===4&&ue.signal.removeEventListener("abort",Ho)}),Y.send(typeof ue._bodyInit>"u"?null:ue._bodyInit)})}return q.polyfill=!0,t.fetch||(t.fetch=q,t.Headers=h,t.Request=S,t.Response=W),r.Headers=h,r.Request=S,r.Response=W,r.fetch=q,Object.defineProperty(r,"__esModule",{value:!0}),r}({})})(typeof self<"u"?self:kf)});var Df=p(()=>{});var Uf,Bf,Ff,Wf,Hf,zf,jf,Vf,Kf,Gf,Zf,zr,qf,fi,Yf,jr,Vr,ye,Ul=p(()=>{(function(t){t.black="black",t.green="green",t.blue="blue",t.purple="purple",t.red="red",t.orange="orange",t.yellow="yellow"})(Uf||(Uf={}));(function(t){t.OFFICIAL="OFFICIAL",t.PERSONAL="PERSONAL",t.SHARED="SHARED"})(Bf||(Bf={}));(function(t){t.THIRD_PARTY="THIRD_PARTY",t.OFF_THE_GRID="OFF_THE_GRID",t.CONTENT_PACKAGER="CONTENT_PACKAGER",t.PAGES="PAGES",t.DESIGNED_READER="DESIGNED_READER"})(Ff||(Ff={}));(function(t){t.HOMEPAGE="HOMEPAGE",t.CUSTOM="CUSTOM",t.HEADER="HEADER",t.READER="READER",t.TOPIC_TEMPLATE="TOPIC_TEMPLATE",t.SEARCH="SEARCH",t.SEARCH_RESULT="SEARCH_RESULT"})(Wf||(Wf={}));(function(t){t.CLASSIC="CLASSIC",t.CUSTOM="CUSTOM",t.DESIGNER="DESIGNER"})(Hf||(Hf={}));(function(t){t.AND="AND",t.OR="OR",t.MONOVALUED="MONOVALUED"})(zf||(zf={}));(function(t){t.NONE="NONE",t.ALPHABET="ALPHABET",t.VERSION="VERSION"})(jf||(jf={}));(function(t){t.STARS="STARS",t.LIKE="LIKE",t.DICHOTOMOUS="DICHOTOMOUS",t.NO_RATING="NO_RATING"})(Vf||(Vf={}));(function(t){t.LAST_WEEK="LAST_WEEK",t.LAST_MONTH="LAST_MONTH",t.LAST_QUARTER="LAST_QUARTER",t.LAST_YEAR="LAST_YEAR",t.CUSTOM="CUSTOM"})(Kf||(Kf={}));(function(t){t.ASC="ASC",t.DESC="DESC"})(Gf||(Gf={}));(function(t){t.ALPHA="ALPHA",t.NATURAL="NATURAL"})(Zf||(Zf={}));(function(t){t.EVERYWHERE="EVERYWHERE",t.TITLE_ONLY="TITLE_ONLY",t.NONE="NONE"})(zr||(zr={}));(function(t){t.ARTICLE="ARTICLE",t.BOOK="BOOK",t.SHARED_BOOK="SHARED_BOOK"})(qf||(qf={}));(function(t){t.FLUIDTOPICS="FLUIDTOPICS",t.EXTERNAL="EXTERNAL"})(fi||(fi={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC",t.PERSONAL_BOOK="PERSONAL_BOOK",t.SHARED_BOOK="SHARED_BOOK"})(Yf||(Yf={}));(function(t){t.MAP="MAP",t.DOCUMENT="DOCUMENT",t.TOPIC="TOPIC"})(jr||(jr={}));(function(t){t.DEFAULT="DEFAULT",t.DOCUMENTS="DOCUMENTS",t.ALL_TOPICS="ALL_TOPICS"})(Vr||(Vr={}));(function(t){t.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",t.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",t.HTML_EXPORT_USER="HTML_EXPORT_USER",t.PDF_EXPORT_USER="PDF_EXPORT_USER",t.SAVED_SEARCH_USER="SAVED_SEARCH_USER",t.COLLECTION_USER="COLLECTION_USER",t.OFFLINE_USER="OFFLINE_USER",t.ANALYTICS_USER="ANALYTICS_USER",t.BETA_USER="BETA_USER",t.DEBUG_USER="DEBUG_USER",t.PRINT_USER="PRINT_USER",t.RATING_USER="RATING_USER",t.FEEDBACK_USER="FEEDBACK_USER",t.GENERATIVE_AI_USER="GENERATIVE_AI_USER",t.CONTENT_PUBLISHER="CONTENT_PUBLISHER",t.KHUB_ADMIN="KHUB_ADMIN",t.USERS_ADMIN="USERS_ADMIN",t.PORTAL_ADMIN="PORTAL_ADMIN",t.ADMIN="ADMIN",t.DEVELOPER="DEVELOPER"})(ye||(ye={}))});var Xf,Jf=p(()=>{(function(t){t.VALID="VALID",t.INVALID="INVALID"})(Xf||(Xf={}))});var SN,Qf=p(()=>{Ul();SN={[ye.PERSONAL_BOOK_SHARE_USER]:[ye.PERSONAL_BOOK_USER],[ye.HTML_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.PDF_EXPORT_USER]:[ye.PERSONAL_BOOK_USER],[ye.KHUB_ADMIN]:[ye.CONTENT_PUBLISHER],[ye.ADMIN]:[ye.KHUB_ADMIN,ye.USERS_ADMIN,ye.PORTAL_ADMIN],[ye.DEVELOPER]:[ye.BETA_USER,ye.DEBUG_USER]}});var eh=p(()=>{});var wN,Bl=p(()=>{wN=qh(Mf(),1);Df();Ul();Jf();Qf();eh()});var th,rh=p(()=>{st();th=t=>t??ae});var oh=p(()=>{rh()});function nh(t){var e,r,n,i,a;return((i=(r=(e=t.map)===null||e===void 0?void 0:e.openMode)!==null&&r!==void 0?r:(n=t.topic)===null||n===void 0?void 0:n.openMode)!==null&&i!==void 0?i:(a=t.document)===null||a===void 0?void 0:a.openMode)===fi.EXTERNAL}function hi(t){var e,r,n,i,a;if(nh(t))return(i=(r=(e=t.map)===null||e===void 0?void 0:e.originUrl)!==null&&r!==void 0?r:(n=t.topic)===null||n===void 0?void 0:n.originUrl)!==null&&i!==void 0?i:(a=t.document)===null||a===void 0?void 0:a.originUrl;switch(t.type){case jr.MAP:return t.map.readerUrl;case jr.DOCUMENT:return t.document.viewerUrl;case jr.TOPIC:return t.topic.readerUrl}return""}function ih(t,e){return th(e&&nh(t)?"_blank":void 0)}var Kr,Fl=p(()=>{"use strict";Bl();oh();Kr=class extends CustomEvent{constructor(e,r){super("ft-search-result-click",{detail:{result:e,rank:r},bubbles:!0,composed:!0})}}});var wg,Hl,zl=p(()=>{"use strict";U();wg={},Hl=_`
978
978
  `});var ah=p(()=>{"use strict"});var Ag,sh,lh=p(()=>{"use strict";$();Ag={setRequest:(t,e)=>{t.request=e.payload},setRequestQuery:(t,e)=>{t.request.query=e.payload},setRequestContentLocale:(t,e)=>{t.request.contentLocale=e.payload},setPageSize:(t,e)=>{t.request.paging.perPage=e.payload},setPageNumber:(t,e)=>{t.request.paging.page=e.payload},setRequestSort:(t,e)=>{t.request.sort=e.payload},setRequestFilters:(t,e)=>{t.request.filters=e.payload},setRequestFacets:(t,e)=>{t.request.facets=e.payload},setRequestVirtualField:(t,e)=>{t.request.virtualField=e.payload},setRequestScope:(t,e)=>{t.request.scope=e.payload},setRequestClusterSortCriterion:(t,e)=>{var r;t.request.clusterSortCriterions=(r=e.payload)!==null&&r!==void 0?r:[]},setResults:(t,e)=>{t.results=e.payload},setFacets:(t,e)=>{t.facets=e.payload},setSpellcheck:(t,e)=>{t.spellcheck=e.payload},setLocales:(t,e)=>{t.locales=e.payload},setPaging:(t,e)=>{t.paging=e.payload},setLiveQuery:(t,e)=>{t.liveQuery=e.payload},setSuggestResults:(t,e)=>{t.suggestResults=e.payload},setRequestPeriodFilter:(t,e)=>{t.request.periodFilter=e.payload}},sh=t=>gt.get({name:"ft-search-"+t,initialState:{request:{query:"",clusterSortCriterions:[],filters:[],facets:[],sort:[],paging:{page:1,perPage:20}},liveQuery:""},reducers:Ag})});var gi,ch=p(()=>{"use strict";Hr();gi=class extends ot{async launchSearch(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).search(e),2*60*1e3)}async launchSuggest(e){return this.cache.get(this.hash(e),async()=>(await this.awaitApi).getSuggestions(e),2*60*1e3)}async getAvailableSearchLocales(){return this.cache.get("available-locales",async()=>(await this.awaitApi).getAvailableSearchLocales())}hash(e){return""+Array.from(JSON.stringify(e)).reduce((r,n)=>0|31*r+n.charCodeAt(0),0)}}});var dh,Fo,Gr,jl=p(()=>{"use strict";$();lh();Bl();ch();dh=t=>t.request.virtualField===zr.TITLE_ONLY&&t.request.scope===Vr.DOCUMENTS,Fo=class t extends Event{constructor(){super(t.eventName)}};Fo.eventName="search-context-clear-all-filters";Gr=class t{static build(e,r){return new t(sh(e.trim()||"context"),r)}constructor(e,r){this.store=e,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.localesDebouncer=new ge(10),this.searchDebouncer=new ge(100),this.suggestDebouncer=new ge(300),this.service=r??new gi}async initService(){return this.updateLocales(),this.launchSearch()}setQuery(e){this.store.actions.setRequestQuery(e),this.store.actions.setLiveQuery(e),this.store.actions.setPageNumber(1),this.launchSearch()}setContentLocale(e){let r=this.store.getState().locales,n=this.store.getState().request.contentLocale;if(e!=n){if(r){let i=a=>r.some(s=>s.lang==a);i(e)||(e=i(n)?n:r[0].lang)}this.store.actions.setRequestContentLocale(e),this.store.actions.setPageNumber(1),this.store.actions.setRequestFilters([]),this.launchSearch()}return e}setPageSize(e){this.store.actions.setPageSize(e),this.launchSearch()}setPageNumber(e){this.store.actions.setPageNumber(e),this.launchSearch()}setSort(e){this.store.actions.setRequestSort(e),this.store.actions.setPageNumber(1),this.launchSearch()}setFilters(e){let r=e.filter(n=>n.values.length>0);this.store.actions.setRequestFilters(r),this.store.actions.setPageNumber(1),r.forEach(n=>{this.facetIds.includes(n.key)||(this.facetIds=[...this.facetIds,n.key])}),this.launchSearch()}setClusterSortCriterion(e){this.store.actions.setRequestClusterSortCriterion(e),this.launchSearch()}setSearchInDocumentTitlesOnly(e){e?(this.store.actions.setRequestVirtualField(zr.TITLE_ONLY),this.store.actions.setRequestScope(Vr.DOCUMENTS)):(this.store.actions.setRequestVirtualField(zr.EVERYWHERE),this.store.actions.setRequestScope(Vr.DEFAULT)),this.launchSearch()}setVirtualField(e){this.store.actions.setRequestVirtualField(e),this.launchSearch()}get searchInDocumentTitlesOnly(){return dh(this.store.getState())}get periodFilter(){return this.store.getState().request.periodFilter}clearAllFilters(){this.setFilters([]),this.store.eventBus.dispatchEvent(new Fo)}addFacet(e){this.facetIds=[...this.facetIds,e],this.launchSearch()}replaceFacet(e,r){let n=this.facetIds.filter(i=>i!=e);r&&n.push(r),this.facetIds=n,this.launchSearch()}get facetIds(){return this.store.getState().request.facets.map(e=>e.id)}set facetIds(e){let n=[...new Set(e)].map(i=>({id:i}));this.store.actions.setRequestFacets(n)}setFilter(e,r){let n=this.store.getState().request.filters,i={key:e,values:r,negative:!1},a=[...n.filter(s=>s.key!==e),i];this.setFilters(a)}setLiveQuery(e){this.store.actions.setLiveQuery(e),this.launchSuggest()}setRequest(e){this.store.actions.setRequest(e),this.store.actions.setLiveQuery(e.query),this.store.actions.setPageNumber(1),this.launchSearch()}setScope(e){this.store.actions.setRequestScope(e),this.launchSearch()}setIgnoreEmptyQuery(e){this.ignoreEmptyQuery=e,this.launchSearch()}setOpenExternalDocumentInNewTab(e){this.openExternalDocumentInNewTab=e}setPeriodFilter(e){this.store.actions.setRequestPeriodFilter(e),this.store.actions.setPageNumber(1),this.launchSearch()}updateLocales(){return this.localesDebouncer.run(async()=>this.store.actions.setLocales((await this.service.getAvailableSearchLocales()).contentLocales))}launchSearch(){return this.searchDebouncer.run(()=>this.fetchSearchData())}launchSuggest(){return this.suggestDebouncer.run(()=>this.fetchSuggestData())}async fetchSearchData(){var e,r;try{(e=this.cancelableSearch)===null||e===void 0||e.cancel();let n=this.store.getState().request;if(this.store.actions.setPaging(void 0),this.ignoreEmptyQuery&&n.query.length==0)this.store.actions.setResults(void 0),this.store.actions.setFacets(void 0),this.store.actions.setSpellcheck(void 0);else{this.cancelableSearch=Cr(this.service.launchSearch(n));let i=await this.cancelableSearch;if(i.paging.currentPage<=1)this.store.actions.setResults(i.results),this.store.actions.setFacets(i.facets),this.store.actions.setSpellcheck(i.spellcheck);else{let a=((r=this.store.getState().results)!==null&&r!==void 0?r:[]).concat(i.results);this.store.actions.setResults(a)}this.store.actions.setPaging(i.paging)}}catch(n){!(n instanceof Rt)&&this.errorHandler&&this.errorHandler(n)}}async fetchSuggestData(){var e;try{let r=this.store.getState(),n=r.request,i={input:r.liveQuery,filters:n.filters,sort:n.sort,contentLocale:n.contentLocale,scope:n.scope};(e=this.cancelableSuggest)===null||e===void 0||e.cancel(),this.cancelableSuggest=Cr(this.service.launchSuggest(i));let a=await this.cancelableSuggest;this.store.actions.setSuggestResults(a.suggestions)}catch(r){!(r instanceof Rt)&&this.errorHandler&&this.errorHandler(r)}}clear(){this.store.clear()}}});function Ng(t){var e;class r extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(i){this.clearStateManager(),this.stateManager=i,this.addStore(i.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Vl]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[Vl]):this.dispatchEvent(new Kl)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Vl,Rg([le()],r.prototype,"stateManager",void 0),r}var Rg,Kl,Vl,Te,Bt=p(()=>{"use strict";$();ee();ah();jl();Rg=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Kl=class extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}},Vl=Symbol("registerInterval");Te=class extends Ng(Re){}});var Se,bi,xi,vi,se,Gl=p(()=>{"use strict";U();ee();$();zl();Bt();Hr();Pl();Se=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},bi=class extends CustomEvent{constructor(e){super("ft-search-load-error",{detail:e})}},xi=class extends CustomEvent{constructor(e){super("ft-search-request-change",{detail:e})}},vi=class extends CustomEvent{constructor(e,r,n){super("ft-search-results-change",{detail:{request:e,paging:r,spellcheck:n}})}},se=class extends Re{get stateManager(){if(this._stateManager==null){let e=this.searchServiceProvider?this.searchServiceProvider():void 0;this._stateManager=Gr.build(this.id||(""+Math.round(Math.random()*999e3)).padStart(6,"0"),e),this._stateManager.errorHandler=r=>this.handleLoadError(r),this.addStore(this.stateManager.store,"search")}return this._stateManager}constructor(){super(),this.query="",this.pageSize=20,this.searchInDocumentTitlesOnly=!1,this.ignoreEmptyQuery=!1,this.openExternalDocumentInNewTab=!1,this.filters=[],this.sort=[],this.addStore(F)}render(){return M`
979
979
  <slot @register-ft-search-component=${this.registerComponent}></slot>
980
- `}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.setContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),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("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("periodFilter")&&this.periodFilter!==void 0&&this.stateManager.setPeriodFilter({key:"ft:lastEdition",periodType:this.periodFilter}),e.has("session")&&this.session!==void 0&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new xi(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new vi(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new bi(e))}reloadSavedSearches(){Ef.clearMySearches()}clear(){this.stateManager.clear()}};se.elementDefinitions={};se.styles=Hl;Se([te({store:F.name})],se.prototype,"session",void 0);Se([C()],se.prototype,"query",void 0);Se([C()],se.prototype,"contentLocale",void 0);Se([C({type:Number})],se.prototype,"pageSize",void 0);Se([C({type:Boolean})],se.prototype,"searchInDocumentTitlesOnly",void 0);Se([C()],se.prototype,"periodFilter",void 0);Se([C()],se.prototype,"scope",void 0);Se([C()],se.prototype,"virtualField",void 0);Se([C({type:Boolean})],se.prototype,"ignoreEmptyQuery",void 0);Se([te({store:F.name})],se.prototype,"openExternalDocumentInNewTab",void 0);Se([Oe([])],se.prototype,"filters",void 0);Se([Oe([])],se.prototype,"sort",void 0);Se([te({store:"search"})],se.prototype,"request",void 0);Se([te({store:"search"})],se.prototype,"paging",void 0);Se([te({store:"search",selector:t=>t.spellcheck})],se.prototype,"autocorrect",void 0);Se([C({attribute:!1})],se.prototype,"searchServiceProvider",void 0)});var uh=p(()=>{"use strict"});var ph={};G(ph,{ClearAllFiltersEvent:()=>Fo,FtSearchContext:()=>se,FtSearchContextCssVariables:()=>wg,FtSearchStateManager:()=>Gr,LoadErrorEvent:()=>bi,SearchRequestChangeEvent:()=>xi,SearchResultsChangeEvent:()=>vi,searchInDocumentTitlesOnlySelector:()=>dh,styles:()=>Hl});var fh=p(()=>{"use strict";$();Gl();zl();uh();Gl();jl();z("ft-search-context")(se)});var Wo,hh=p(()=>{"use strict";it();Wo=nt.build("designedSearchInput")});var mh,yh=p(()=>{"use strict";U();Mo();mh=_`
980
+ `}update(e){super.update(e),e.has("query")&&this.query!==void 0&&this.stateManager.setQuery(this.query),e.has("contentLocale")&&this.contentLocale!==void 0&&this.stateManager.setContentLocale(this.contentLocale),e.has("filters")&&this.filters!==void 0&&this.stateManager.setFilters(this.filters),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("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("periodFilter")&&this.periodFilter!=null&&this.stateManager.setPeriodFilter({key:"ft:lastEdition",periodType:this.periodFilter}),e.has("session")&&this.session!==void 0&&(this.stateManager.service.clearCache(),this.stateManager.initService())}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.stateManager.setQuery(this.query),this.stateManager.setContentLocale(this.contentLocale),this.stateManager.setFilters(this.filters),this.stateManager.setPageSize(this.pageSize),this.stateManager.setSort(this.sort)}contentAvailableCallback(e){super.contentAvailableCallback(e),e.has("request")&&this.request&&this.dispatchEvent(new xi(this.request)),e.has("paging")&&this.paging!==void 0&&this.dispatchEvent(new vi(this.request,this.paging,this.autocorrect))}registerComponent(e){e.stopPropagation();let r=e.composedPath()[0];this.register(r)}register(e){e.setSearchStateManager(this.stateManager)}handleLoadError(e){this.dispatchEvent(new bi(e))}reloadSavedSearches(){Ef.clearMySearches()}clear(){this.stateManager.clear()}};se.elementDefinitions={};se.styles=Hl;Se([te({store:F.name})],se.prototype,"session",void 0);Se([C()],se.prototype,"query",void 0);Se([C()],se.prototype,"contentLocale",void 0);Se([C({type:Number})],se.prototype,"pageSize",void 0);Se([C({type:Boolean})],se.prototype,"searchInDocumentTitlesOnly",void 0);Se([C()],se.prototype,"periodFilter",void 0);Se([C()],se.prototype,"scope",void 0);Se([C()],se.prototype,"virtualField",void 0);Se([C({type:Boolean})],se.prototype,"ignoreEmptyQuery",void 0);Se([te({store:F.name})],se.prototype,"openExternalDocumentInNewTab",void 0);Se([Oe([])],se.prototype,"filters",void 0);Se([Oe([])],se.prototype,"sort",void 0);Se([te({store:"search"})],se.prototype,"request",void 0);Se([te({store:"search"})],se.prototype,"paging",void 0);Se([te({store:"search",selector:t=>t.spellcheck})],se.prototype,"autocorrect",void 0);Se([C({attribute:!1})],se.prototype,"searchServiceProvider",void 0)});var uh=p(()=>{"use strict"});var ph={};G(ph,{ClearAllFiltersEvent:()=>Fo,FtSearchContext:()=>se,FtSearchContextCssVariables:()=>wg,FtSearchStateManager:()=>Gr,LoadErrorEvent:()=>bi,SearchRequestChangeEvent:()=>xi,SearchResultsChangeEvent:()=>vi,searchInDocumentTitlesOnlySelector:()=>dh,styles:()=>Hl});var fh=p(()=>{"use strict";$();Gl();zl();uh();Gl();jl();z("ft-search-context")(se)});var Wo,hh=p(()=>{"use strict";it();Wo=nt.build("designedSearchInput")});var mh,yh=p(()=>{"use strict";U();Mo();mh=_`
981
981
  * {
982
982
  box-sizing: border-box;
983
983
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-search-in-document",
3
- "version": "1.1.99",
3
+ "version": "1.1.100",
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": "1.1.99",
23
- "@fluid-topics/ft-card": "1.1.99",
24
- "@fluid-topics/ft-i18n": "1.1.99",
25
- "@fluid-topics/ft-search-context": "1.1.99",
26
- "@fluid-topics/ft-search-input": "1.1.99",
27
- "@fluid-topics/ft-search-load-more-button": "1.1.99",
28
- "@fluid-topics/ft-search-result-abstract": "1.1.99",
29
- "@fluid-topics/ft-search-result-title": "1.1.99",
30
- "@fluid-topics/ft-search-results": "1.1.99",
31
- "@fluid-topics/ft-search-results-number": "1.1.99",
32
- "@fluid-topics/ft-typography": "1.1.99",
33
- "@fluid-topics/ft-wc-utils": "1.1.99",
22
+ "@fluid-topics/ft-button": "1.1.100",
23
+ "@fluid-topics/ft-card": "1.1.100",
24
+ "@fluid-topics/ft-i18n": "1.1.100",
25
+ "@fluid-topics/ft-search-context": "1.1.100",
26
+ "@fluid-topics/ft-search-input": "1.1.100",
27
+ "@fluid-topics/ft-search-load-more-button": "1.1.100",
28
+ "@fluid-topics/ft-search-result-abstract": "1.1.100",
29
+ "@fluid-topics/ft-search-result-title": "1.1.100",
30
+ "@fluid-topics/ft-search-results": "1.1.100",
31
+ "@fluid-topics/ft-search-results-number": "1.1.100",
32
+ "@fluid-topics/ft-typography": "1.1.100",
33
+ "@fluid-topics/ft-wc-utils": "1.1.100",
34
34
  "@fluid-topics/public-api": "1.0.73",
35
35
  "lit": "3.1.0"
36
36
  },
37
- "gitHead": "4f91ba9bad271e32aa24473716e9dfb3dff630bf"
37
+ "gitHead": "1a88e4b0ddcb8947f3b0f82a2d9e893044199b22"
38
38
  }