@fluid-topics/ft-reader-topic-content 1.1.32 → 1.1.34

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.
@@ -20,7 +20,7 @@
20
20
  white-space: pre-wrap;
21
21
  word-break: break-word;
22
22
  }
23
- `;var r;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(r||(r={}));var l=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class c extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const h=Symbol("registerInterval");class d extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[h]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[h]):this.dispatchEvent(new c)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=h,l([s.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}var x=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class u extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const v=Symbol("registerInterval");class p extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[v]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[v]):this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=v,x([s.state()],i.prototype,"tocNode",void 0),x([s.state()],i.prototype,"disableContextInteractions",void 0),i}(d)){}var f,m;!function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;"}(f||(f={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(m||(m={})),new Map([...["abw"].map((t=>[t,m.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,m.AUDIO])),...["avi"].map((t=>[t,m.AVI])),...["chm","xhs"].map((t=>[t,m.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,m.CODE])),...["csv"].map((t=>[t,m.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,m.DITA])),...["epub"].map((t=>[t,m.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,m.EXCEL])),...["flac"].map((t=>[t,m.FLAC])),...["gif"].map((t=>[t,m.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,m.GZIP])),...["html","htm","xhtml"].map((t=>[t,m.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map((t=>[t,m.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,m.JPEG])),...["json"].map((t=>[t,m.JSON])),...["m4a","m4p"].map((t=>[t,m.M4A])),...["mov","qt"].map((t=>[t,m.MOV])),...["mp3"].map((t=>[t,m.MP3])),...["mp4","m4v"].map((t=>[t,m.MP4])),...["ogg","oga"].map((t=>[t,m.OGG])),...["pdf","ps"].map((t=>[t,m.PDF])),...["png"].map((t=>[t,m.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,m.POWERPOINT])),...["rar"].map((t=>[t,m.RAR])),...["stp"].map((t=>[t,m.STP])),...["txt","rtf","md","mdown"].map((t=>[t,m.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,m.VIDEO])),...["wav"].map((t=>[t,m.WAV])),...["wma"].map((t=>[t,m.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,m.WORD])),...["xml","xsl","rdf"].map((t=>[t,m.XML])),...["yaml","yml","x-yaml"].map((t=>[t,m.YAML])),...["zip"].map((t=>[t,m.ZIP]))]),m.ABW,m.AUDIO,m.AVI,m.CHM,m.CODE,m.CSV,m.DITA,m.EPUB,m.EXCEL,m.FLAC,m.GIF,m.GZIP,m.HTML,m.IMAGE,m.JPEG,m.JSON,m.M4A,m.MOV,m.MP3,m.MP4,m.OGG,m.PDF,m.PNG,m.POWERPOINT,m.RAR,m.STP,m.TEXT,m.UNKNOWN,m.VIDEO,m.WAV,m.WMA,m.WORD,m.XML,m.YAML,m.ZIP;const b=e.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),w=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),g=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),y=e.FtCssVariableFactory.extend("--ft-icon-material-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),C=e.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset"),k=i.css`
23
+ `;var r;!function(t){t.FEEDBACK="FEEDBACK",t.RATING="RATING",t.PRINT="PRINT",t.BOOKMARK="BOOKMARK",t.COLLECTIONS="COLLECTIONS",t.PERSONAL_BOOKS="PERSONAL_BOOKS"}(r||(r={}));var l=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class c extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const h=Symbol("registerInterval");class d extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[h]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[h]):this.dispatchEvent(new c)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=h,l([s.state()],i.prototype,"stateManager",void 0),i}(e.FtLitElementRedux)){}var x=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class u extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const v=Symbol("registerInterval");class p extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[v]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[v]):this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=v,x([s.state()],i.prototype,"tocNode",void 0),x([s.state()],i.prototype,"disableContextInteractions",void 0),i}(d)){}var f,m;!function(t){t.THUMBS_DOWN="&#xe94d;",t.THUMBS_DOWN_PLAIN="&#xe94e;",t.THUMBS_UP="&#xe94f;",t.THUMBS_UP_PLAIN="&#xe950;",t.STAR="&#xe94c;",t.STAR_PLAIN="&#xe900;",t.DESKTOP="&#xe95e;",t.LIFE_RING="&#xe975;",t.GLOBE="&#xe976;",t.PIGGY_BANK="&#xe977;",t.TABLET_LANDSCAPE="&#xe95f;",t.TABLET_PORTRAIT="&#xe960;",t.MOBILE_LANDSCAPE="&#xe961;",t.MOBILE_PORTRAIT="&#xe962;",t.ARROW_RIGHT_TO_LINE="&#xe95d;",t.THIN_ARROW_UP="&#xe95c;",t.CONTEXTUAL="&#xe95b;",t.CHART_SIMPLE="&#xe968;",t.BARS_PROGRESS="&#xe969;",t.LINE_CHART="&#xe96c;",t.STACKED_CHART="&#xe96d;",t.CHART_BAR_NORMALIZED="&#xe97b;",t.BOOK_OPEN_GEAR="&#xe96a;",t.BOOK_OPEN_GEAR_SLASH="&#xe96b;",t.DIAGRAM_SUNBURST="&#xe963;",t.DIAGRAM_SANKEY="&#xe964;",t.UNSTRUCTURED_DOC="&#xe95a;",t.RESET="&#xe958;",t.THIN_ARROW_LEFT="&#xe956;",t.THIN_ARROW_RIGHT="&#xe957;",t.MY_COLLECTIONS="&#xe955;",t.OFFLINE_SETTINGS="&#xe954;",t.MY_LIBRARY="&#xe959;",t.RATE_PLAIN="&#xe952;",t.RATE="&#xe953;",t.FEEDBACK_PLAIN="&#xe951;",t.PAUSE="&#xe949;",t.PLAY="&#xe94a;",t.RELATIVES_PLAIN="&#xe947;",t.RELATIVES="&#xe948;",t.SHORTCUT_MENU="&#xe946;",t.PRINT="&#xe944;",t.DEFAULT_ROLES="&#xe945;",t.ACCOUNT_SETTINGS="&#xe943;",t.ONLINE="&#xe941;",t.OFFLINE="&#xe816;",t.UPLOAD="&#xe940;",t.BOOK_PLAIN="&#xe93f;",t.SYNC="&#xe93d;",t.SHARED_PBK="&#xe931;",t.COLLECTIONS="&#xe92a;",t.SEARCH_IN_PUBLICATION="&#xe92f;",t.BOOKS="&#xe806;",t.LOCKER="&#xe93b;",t.ARROW_DOWN="&#xe92b;",t.ARROW_LEFT="&#xe92c;",t.ARROW_RIGHT="&#xe92d;",t.ARROW_UP="&#xe92e;",t.SAVE="&#xe93a;",t.MAILS_AND_NOTIFICATIONS="&#xe939;",t.DOT="&#xe936;",t.MINUS="&#xe937;",t.PLUS="&#xe938;",t.FILTERS="&#xe935;",t.STRIPE_ARROW_RIGHT="&#xe934;",t.STRIPE_ARROW_LEFT="&#xe933;",t.ATTACHMENTS="&#xe932;",t.ADD_BOOKMARK="&#xe804;",t.BOOKMARK="&#xe805;",t.EXPORT="&#xe80f;",t.MENU="&#xe807;",t.TAG="&#xe93e;",t.TAG_PLAIN="&#xe942;",t.COPY_TO_CLIPBOARD="&#xe930;",t.COLUMNS="&#xe928;",t.ARTICLE="&#xe927;",t.CLOSE_PLAIN="&#xe925;",t.CHECK_PLAIN="&#xe926;",t.LOGOUT="&#xe923;",t.SIGN_IN="&#xe922;",t.THIN_ARROW="&#xe921;",t.TRIANGLE_BOTTOM="&#xe91d;",t.TRIANGLE_LEFT="&#xe91e;",t.TRIANGLE_RIGHT="&#xe91f;",t.TRIANGLE_TOP="&#xe920;",t.FACET_HAS_DESCENDANT="&#xe91c;",t.MINUS_PLAIN="&#xe91a;",t.PLUS_PLAIN="&#xe91b;",t.INFO="&#xe919;",t.ICON_EXPAND="&#xe917;",t.ICON_COLLAPSE="&#xe918;",t.ADD_TO_PBK="&#xe800;",t.ALERT="&#xe801;",t.ADD_ALERT="&#xe802;",t.BACK_TO_SEARCH="&#xe803;",t.DOWNLOAD="&#xe808;",t.EDIT="&#xe809;",t.FEEDBACK="&#xe80a;",t.MODIFY_PBK="&#xe80c;",t.SCHEDULED="&#xe80d;",t.SEARCH="&#xe80e;",t.SHARE="&#xe80f1;",t.TOC="&#xe810;",t.WRITE_UGC="&#xe811;",t.TRASH="&#xe812;",t.EXTLINK="&#xe814;",t.EXTLINK_LIGHT="&#xe978;",t.CALENDAR="&#xe815;",t.BOOK="&#xe817;",t.DOWNLOAD_PLAIN="&#xe818;",t.CHECK="&#xe819;",t.TOPICS="&#xe901;",t.EYE="&#xf06e;",t.EYE_SLASH="&#xe970;",t.DISC="&#xe902;",t.CIRCLE="&#xe903;",t.SHARED="&#xe904;",t.SORT_UNSORTED="&#xe905;",t.SORT_UP="&#xe906;",t.SORT_DOWN="&#xe907;",t.WORKING="&#xe908;",t.CLOSE="&#xe909;",t.ZOOM_OUT="&#xe90a;",t.ZOOM_IN="&#xe90b;",t.ZOOM_REALSIZE="&#xe90c;",t.ZOOM_FULLSCREEN="&#xe90d;",t.ADMIN_RESTRICTED="&#xe90e;",t.ADMIN_THEME="&#xe911;",t.WARNING="&#xe913;",t.CONTEXT="&#xe914;",t.SEARCH_HOME="&#xe915;",t.STEPS="&#xe916;",t.HOME="&#xe80b;",t.TRANSLATE="&#xe924;",t.USER="&#xe813;",t.ADMIN="&#xe90f;",t.ANALYTICS="&#xe929;",t.ADMIN_KHUB="&#xe910;",t.ADMIN_USERS="&#xe912;",t.ADMIN_INTEGRATION="&#xe93c;",t.ADMIN_PORTAL="&#xe94b;",t.COMMENT_QUESTION="&#xe965;",t.COMMENT_QUESTION_PLAIN="&#xe966;",t.MESSAGE_BOT="&#xe967;",t.PIP="&#xe973;",t.PIP_WIDE="&#xe974;",t.EXPAND_WIDE="&#xe972;",t.X_MARK="&#xe971;",t.CLONE="&#xe979;",t.CLONE_LINK_SIMPLE="&#xe97a;"}(f||(f={})),function(t){t.UNKNOWN="&#xe90a;",t.ABW="&#xe900;",t.AUDIO="&#xe901;",t.AVI="&#xe902;",t.CHM="&#xe904;",t.CODE="&#xe905;",t.CSV="&#xe903;",t.DITA="&#xe906;",t.EPUB="&#xe907;",t.EXCEL="&#xe908;",t.FLAC="&#xe909;",t.GIF="&#xe90b;",t.GZIP="&#xe90c;",t.HTML="&#xe90d;",t.IMAGE="&#xe90e;",t.JPEG="&#xe90f;",t.JSON="&#xe910;",t.M4A="&#xe911;",t.MOV="&#xe912;",t.MP3="&#xe913;",t.MP4="&#xe914;",t.OGG="&#xe915;",t.PDF="&#xe916;",t.PNG="&#xe917;",t.POWERPOINT="&#xe918;",t.RAR="&#xe91a;",t.STP="&#xe91b;",t.TEXT="&#xe91c;",t.VIDEO="&#xe91e;",t.WAV="&#xe91f;",t.WMA="&#xe920;",t.WORD="&#xe921;",t.XML="&#xe922;",t.YAML="&#xe919;",t.ZIP="&#xe923;"}(m||(m={})),new Map([...["abw"].map((t=>[t,m.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,m.AUDIO])),...["avi"].map((t=>[t,m.AVI])),...["chm","xhs"].map((t=>[t,m.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,m.CODE])),...["csv"].map((t=>[t,m.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,m.DITA])),...["epub"].map((t=>[t,m.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,m.EXCEL])),...["flac"].map((t=>[t,m.FLAC])),...["gif"].map((t=>[t,m.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,m.GZIP])),...["html","htm","xhtml"].map((t=>[t,m.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map((t=>[t,m.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,m.JPEG])),...["json"].map((t=>[t,m.JSON])),...["m4a","m4p"].map((t=>[t,m.M4A])),...["mov","qt"].map((t=>[t,m.MOV])),...["mp3"].map((t=>[t,m.MP3])),...["mp4","m4v"].map((t=>[t,m.MP4])),...["ogg","oga"].map((t=>[t,m.OGG])),...["pdf","ps"].map((t=>[t,m.PDF])),...["png"].map((t=>[t,m.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,m.POWERPOINT])),...["rar"].map((t=>[t,m.RAR])),...["stp"].map((t=>[t,m.STP])),...["txt","rtf","md","mdown"].map((t=>[t,m.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,m.VIDEO])),...["wav"].map((t=>[t,m.WAV])),...["wma"].map((t=>[t,m.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,m.WORD])),...["xml","xsl","rdf"].map((t=>[t,m.XML])),...["yaml","yml","x-yaml"].map((t=>[t,m.YAML])),...["zip"].map((t=>[t,m.ZIP]))]),m.ABW,m.AUDIO,m.AVI,m.CHM,m.CODE,m.CSV,m.DITA,m.EPUB,m.EXCEL,m.FLAC,m.GIF,m.GZIP,m.HTML,m.IMAGE,m.JPEG,m.JSON,m.M4A,m.MOV,m.MP3,m.MP4,m.OGG,m.PDF,m.PNG,m.POWERPOINT,m.RAR,m.STP,m.TEXT,m.UNKNOWN,m.VIDEO,m.WAV,m.WMA,m.WORD,m.XML,m.YAML,m.ZIP;const b=e.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),g=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),w=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),y=e.FtCssVariableFactory.extend("--ft-icon-material-font-family","",e.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),C=e.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset"),k=i.css`
24
24
  :host, i.ft-icon {
25
25
  display: inline-flex;
26
26
  align-items: center;
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  i.ft-icon.ft-icon--fluid-topics {
54
- font-family: ${w}, ft-icons, fticons, sans-serif;
54
+ font-family: ${g}, ft-icons, fticons, sans-serif;
55
55
 
56
56
  /* Ugly fix because font is broken */
57
57
  font-size: calc(0.75 * ${b});
@@ -62,26 +62,26 @@
62
62
  }
63
63
 
64
64
  .ft-icon--file-format {
65
- font-family: ${g}, ft-mime, sans-serif;
65
+ font-family: ${w}, ft-mime, sans-serif;
66
66
  }
67
67
 
68
68
  .ft-icon--material {
69
69
  font-family: ${y}, "Material Icons", sans-serif;
70
70
  }
71
- `;var j;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(j||(j={}));var O=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class S extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){const t=this.variant&&Object.values(j).includes(this.variant)?this.variant:j.fluid_topics,e=t!==j.material||!!this.value;return i.html`
71
+ `;var j;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(j||(j={}));var I=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class O extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){const t=this.variant&&Object.values(j).includes(this.variant)?this.variant:j.fluid_topics,e=t!==j.material||!!this.value;return i.html`
72
72
  <i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
73
73
  ${o.unsafeHTML(this.resolvedIcon)}
74
74
  <slot ?hidden=${e}></slot>
75
75
  </i>
76
- `}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let s=this.value||this.textContent;switch(this.variant){case j.file_format:this.resolvedIcon=null!==(t=m[s.replace("-","_").toUpperCase()])&&void 0!==t?t:s;break;case j.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=f[s.replace("-","_").toUpperCase()])&&void 0!==e?e:s}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}S.elementDefinitions={},S.styles=k,O([s.property()],S.prototype,"variant",void 0),O([s.property()],S.prototype,"value",void 0),O([s.state()],S.prototype,"resolvedIcon",void 0),O([s.query("slot")],S.prototype,"slottedContent",void 0),e.customElement("ft-icon")(S);const I=i.css`
76
+ `}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let s=this.value||this.textContent;switch(this.variant){case j.file_format:this.resolvedIcon=null!==(t=m[s.replace("-","_").toUpperCase()])&&void 0!==t?t:s;break;case j.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=f[s.replace("-","_").toUpperCase()])&&void 0!==e?e:s}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}O.elementDefinitions={},O.styles=k,I([s.property()],O.prototype,"variant",void 0),I([s.property()],O.prototype,"value",void 0),I([s.state()],O.prototype,"resolvedIcon",void 0),I([s.query("slot")],O.prototype,"slottedContent",void 0),e.customElement("ft-icon")(O);const S=i.css`
77
77
  `,$=i.css`
78
- `,M=e.FtReduxStore.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0}});class U{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=M.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?U.build(t):null!==(e=U.API)&&void 0!==e?e:U.API=U.build()}static await(t){return new Promise((e=>{let i=U.get(t);if(i)e(i);else{const s=M.subscribe((()=>{i=U.get(t),i&&(s(),e(i))}))}}))}}var N;const T=Symbol("clearAfterUnitTest");class A{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[N]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=M.getState().uiLocale,M.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=M.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,i){var s;if(t=t.toLowerCase(),Object.keys(i).length>0){const o={...null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},...i};e.deepEqual(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...s){var o,n,a;t=t.toLowerCase(),this.fetchContext(t);const r=null!==(n=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},r).resolve(i,...s)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>e.delay(0).then((()=>t())).catch((()=>null)))))}}N=T,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new A((async(t,e)=>(await U.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new A((async(t,e)=>(await U.await()).getCustomMessageContext(t,e))));const L=window.FluidTopicsI18nService,B=window.FluidTopicsCustomI18nService;var z=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class P extends e.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>U.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return i.html`
78
+ `,M=e.FtReduxStore.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0}});class U{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=M.getState(),s=null!=t?t:i;if(e&&s&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,s,!0)}static get(t){var e;return null!=t?U.build(t):null!==(e=U.API)&&void 0!==e?e:U.API=U.build()}static await(t){return new Promise((e=>{let i=U.get(t);if(i)e(i);else{const s=M.subscribe((()=>{i=U.get(t),i&&(s(),e(i))}))}}))}}var N;const A=Symbol("clearAfterUnitTest");class T{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={},this.currentUiLocale="",this[N]=()=>{this.defaultMessages={},this.cache=new e.CacheRegistry,this.listeners={}},this.currentUiLocale=M.getState().uiLocale,M.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=M.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,i){var s;if(t=t.toLowerCase(),Object.keys(i).length>0){const o={...null!==(s=this.defaultMessages[t])&&void 0!==s?s:{},...i};e.deepEqual(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,i,...s){var o,n,a;t=t.toLowerCase(),this.fetchContext(t);const r=null!==(n=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==n?n:{};return new e.ParametrizedLabelResolver(null!==(a=this.defaultMessages[t])&&void 0!==a?a:{},r).resolve(i,...s)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>e.delay(0).then((()=>t())).catch((()=>null)))))}}N=A,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new T((async(t,e)=>(await U.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new T((async(t,e)=>(await U.await()).getCustomMessageContext(t,e))));const L=window.FluidTopicsI18nService,B=window.FluidTopicsCustomI18nService;var z=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class P extends e.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>U.get(),this.cache=new e.CacheRegistry,this.cleanSessionDebouncer=new e.Debouncer}render(){return i.html`
79
79
  <slot></slot>
80
- `}update(t){super.update(t),t.has("baseUrl")&&(M.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&M.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&M.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&M.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&M.actions.noCustom(this.noCustom),t.has("editorMode")&&M.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&M.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&M.actions.session(this.session),t.has("availableUiLocales")&&M.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>L.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}P.elementDefinitions={},P.styles=$,z([s.property()],P.prototype,"baseUrl",void 0),z([s.property()],P.prototype,"apiIntegrationIdentifier",void 0),z([s.property()],P.prototype,"uiLocale",void 0),z([e.jsonProperty(null)],P.prototype,"availableUiLocales",void 0),z([e.jsonProperty(null)],P.prototype,"metadataConfiguration",void 0),z([s.property({type:Boolean})],P.prototype,"editorMode",void 0),z([s.property({type:Boolean})],P.prototype,"noCustom",void 0),z([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],P.prototype,"noCustomComponent",void 0),z([s.property({type:Boolean})],P.prototype,"withManualResources",void 0),z([e.jsonProperty([])],P.prototype,"messageContexts",void 0),z([e.jsonProperty(void 0)],P.prototype,"session",void 0),z([s.property({type:Object})],P.prototype,"apiProvider",void 0);class R{async listMySearches(){var t;return(null===(t=M.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await U.await()).listMySearches(M.getState().session.profile.userId):[]}}const _=new e.CacheRegistry;class E{async listMyBookmarks(){return _.get("bookmarks",(async()=>(await U.await()).listMyBookmarks(M.getState().session.profile.userId)))}clearCache(){_.clear("bookmarks")}}const K=e.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=M.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new E,M.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:i}=M.getState();e.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==i?void 0:i.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){K.actions.savedSearches(void 0)}clearMyBookmarks(){K.actions.bookmarks(void 0)}async reloadMySearches(){const t=new R,e=await t.listMySearches();K.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(e)}}},e.customElement("ft-app-context")(P);var G=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const W=Symbol("i18nProperties"),D=Symbol("i18nUnsubs");function q(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?B:L}i18n(t,e,...i){var s;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(s=t.args)&&void 0!==s?s:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[W])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[W])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[W]&&new Set([...this[W].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[D].has(t)||this[D].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[D].forEach((t=>t())),this[D].clear()}}return e=D,G([s.property({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class F extends(q(e.FtLitElement)){}class Q extends(q(e.FtLitElementRedux)){}var Z=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class H extends Q{constructor(){super(),this.editorMode=!1,this.addStore(M)}render(){return this.key&&this.context?i.html`
80
+ `}update(t){super.update(t),t.has("baseUrl")&&(M.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&M.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&M.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&M.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&M.actions.noCustom(this.noCustom),t.has("editorMode")&&M.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&M.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&M.actions.session(this.session),t.has("availableUiLocales")&&M.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>L.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}P.elementDefinitions={},P.styles=$,z([s.property()],P.prototype,"baseUrl",void 0),z([s.property()],P.prototype,"apiIntegrationIdentifier",void 0),z([s.property()],P.prototype,"uiLocale",void 0),z([e.jsonProperty(null)],P.prototype,"availableUiLocales",void 0),z([e.jsonProperty(null)],P.prototype,"metadataConfiguration",void 0),z([s.property({type:Boolean})],P.prototype,"editorMode",void 0),z([s.property({type:Boolean})],P.prototype,"noCustom",void 0),z([s.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],P.prototype,"noCustomComponent",void 0),z([s.property({type:Boolean})],P.prototype,"withManualResources",void 0),z([e.jsonProperty([])],P.prototype,"messageContexts",void 0),z([e.jsonProperty(void 0)],P.prototype,"session",void 0),z([s.property({type:Object})],P.prototype,"apiProvider",void 0);class R{async listMySearches(){var t;return(null===(t=M.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await U.await()).listMySearches(M.getState().session.profile.userId):[]}}const _=new e.CacheRegistry;class E{async listMyBookmarks(){return _.get("bookmarks",(async()=>(await U.await()).listMyBookmarks(M.getState().session.profile.userId)))}clearCache(){_.clear("bookmarks")}}const K=e.FtReduxStore.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=M.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new E,M.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:i}=M.getState();e.deepEqual(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==i?void 0:i.profile)||(this.currentSession=i,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){K.actions.savedSearches(void 0)}clearMyBookmarks(){K.actions.bookmarks(void 0)}async reloadMySearches(){const t=new R,e=await t.listMySearches();K.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;K.actions.bookmarks(e)}}},e.customElement("ft-app-context")(P);var G=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const W=Symbol("i18nAttributes"),D=Symbol("i18nProperties"),q=Symbol("i18nUnsubs");function F(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?B:L}i18n(t,e,...i){var s;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(s=t.args)&&void 0!==s?s:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e,i;null===(e=this[W])||void 0===e||e.forEach(((e,i)=>{var s;const o=this.getI18nAttributeValue(i);(null===(s=null==o?void 0:o.context)||void 0===s?void 0:s.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(i,o,e)})),null===(i=this[D])||void 0===i||i.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,e,i){this[t]={...e,message:this.i18n({context:e.context,key:e.key,...i})}}update(t){var e,i;super.update(t),null===(e=this[W])||void 0===e||e.forEach(((e,i)=>{const s=this.getI18nAttributeValue(i);(null==s?void 0:s.context)&&s.key&&(t.has(i)||null!=e.argsProvider)&&(t.has(i)&&this.addI18nContext(s.context),this.updateI18nAttributeMessage(i,s,e))})),null===(i=this[D])||void 0===i||i.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,e,i,s;super.connectedCallback(),new Set([...null!==(e=null===(t=this[D])||void 0===t?void 0:t.values())&&void 0!==e?e:[],...[...null!==(s=null===(i=this[W])||void 0===i?void 0:i.keys())&&void 0!==s?s:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[q].has(t)||this[q].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages("string"==typeof t?t:t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[q].forEach((t=>t())),this[q].clear()}}return e=q,G([s.property({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class Q extends(F(e.FtLitElement)){}class V extends(F(e.FtLitElementRedux)){}var Z=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class H extends V{constructor(){super(),this.editorMode=!1,this.addStore(M)}render(){return this.key&&this.context?i.html`
81
81
  <span class="ft-i18n">
82
82
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
83
83
  </span>
84
- `:this.editorMode?"Select a context and a label key.":i.nothing}update(t){var e;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}H.elementDefinitions={},H.styles=I,Z([e.redux()],H.prototype,"editorMode",void 0),Z([s.property()],H.prototype,"context",void 0),Z([s.property()],H.prototype,"key",void 0),Z([e.jsonProperty([])],H.prototype,"args",void 0),Z([s.property()],H.prototype,"defaultMessage",void 0);class J{static build(t){return new J(t)}static fromGwt(t){return new J(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>L.resolveMessage(this.name,e,...t)})}}e.customElement("ft-i18n")(H);const V=J.build("designedReaderTopicContent");var X=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class Y extends p{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,e;return this.map&&(this.error||this.content)?i.html`
84
+ `:this.editorMode?"Select a context and a label key.":i.nothing}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}H.elementDefinitions={},H.styles=S,Z([e.redux()],H.prototype,"editorMode",void 0),Z([s.property()],H.prototype,"context",void 0),Z([s.property()],H.prototype,"key",void 0),Z([e.jsonProperty([])],H.prototype,"args",void 0),Z([s.property()],H.prototype,"defaultMessage",void 0);class J{static build(t){return new J(t)}static fromGwt(t){return new J(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>L.resolveMessage(this.name,e,...t)})}}e.customElement("ft-i18n")(H);const X=J.build("designedReaderTopicContent");var Y=function(t,e,i,s){for(var o,n=arguments.length,a=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,r=t.length-1;r>=0;r--)(o=t[r])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};class tt extends p{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,e;return this.map&&(this.error||this.content)?i.html`
85
85
  <style>
86
86
  @import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
87
87
  </style>
@@ -94,11 +94,11 @@
94
94
  <div class="topic-on-error">
95
95
  <ft-icon>WARNING</ft-icon>
96
96
  <div>
97
- ${this.is404Error()?V.messages.topicMissingAdvice():V.messages.somethingWentWrong()}
97
+ ${this.is404Error()?X.messages.topicMissingAdvice():X.messages.somethingWentWrong()}
98
98
  </div>
99
99
  </div>
100
100
  `;const a=null!==(e=null===(t=this.map)||void 0===t?void 0:t.contentStyles.customCssClasses.join(" "))&&void 0!==e?e:"";return i.html`
101
101
  <div class="depth-${null===(s=this.tocNode)||void 0===s?void 0:s.depth} content-locale-${null===(n=this.map)||void 0===n?void 0:n.lang} ${a}">
102
102
  ${null!=this.content?o.unsafeHTML(`${this.content}`):i.nothing}
103
103
  </div>
104
- `}is404Error(){return 404===this.error.status}}Y.styles=[a,e.highlightHtmlStyles],X([e.redux()],Y.prototype,"map",void 0),X([e.redux()],Y.prototype,"scrollTarget",void 0),X([s.state()],Y.prototype,"content",void 0),X([s.state()],Y.prototype,"error",void 0),X([e.redux({selector:(t,e)=>e.disableContextInteractions?"":t.searchInDocumentQuery})],Y.prototype,"searchInDocumentQuery",void 0),X([s.property({attribute:!1})],Y.prototype,"contentPreprocessor",void 0),X([s.property({attribute:!1})],Y.prototype,"onContentAvailable",void 0),X([s.query("section.topic")],Y.prototype,"topicContainer",void 0),e.customElement("ft-reader-topic-content")(Y),t.FtReaderTopicContent=Y,t.FtReaderTopicContentCssVariables=n,t.styles=a}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
104
+ `}is404Error(){return 404===this.error.status}}tt.styles=[a,e.highlightHtmlStyles],Y([e.redux()],tt.prototype,"map",void 0),Y([e.redux()],tt.prototype,"scrollTarget",void 0),Y([s.state()],tt.prototype,"content",void 0),Y([s.state()],tt.prototype,"error",void 0),Y([e.redux({selector:(t,e)=>e.disableContextInteractions?"":t.searchInDocumentQuery})],tt.prototype,"searchInDocumentQuery",void 0),Y([s.property({attribute:!1})],tt.prototype,"contentPreprocessor",void 0),Y([s.property({attribute:!1})],tt.prototype,"onContentAvailable",void 0),Y([s.query("section.topic")],tt.prototype,"topicContainer",void 0),e.customElement("ft-reader-topic-content")(tt),t.FtReaderTopicContent=tt,t.FtReaderTopicContentCssVariables=n,t.styles=a}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litUnsafeHTML);
@@ -201,11 +201,11 @@ let be=class extends $t{constructor(){super(...arguments),this.renderOptions={ho
201
201
  `,pi=Ot`
202
202
  `,di=Pr.get({name:"ft-app-info",reducers:{},initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],metadataConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0}});class yi{static build(t){const{baseUrl:e,apiIntegrationIdentifier:o}=di.getState(),r=null!=t?t:o;if(e&&r&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,r,!0)}static get(t){var e;return null!=t?yi.build(t):null!==(e=yi.API)&&void 0!==e?e:yi.API=yi.build()}static await(t){return new Promise((e=>{let o=yi.get(t);if(o)e(o);else{const r=di.subscribe((()=>{o=yi.get(t),o&&(r(),e(o))}))}}))}}var gi;const bi=Symbol("clearAfterUnitTest");class mi{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new r,this.listeners={},this.currentUiLocale="",this[gi]=()=>{this.defaultMessages={},this.cache=new r,this.listeners={}},this.currentUiLocale=di.getState().uiLocale,di.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=di.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const r={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};L(this.defaultMessages[t],r)||(this.defaultMessages[t]=r,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var r,i,n;t=t.toLowerCase(),this.fetchContext(t);const a=null!==(i=null===(r=this.cache.getNow(t))||void 0===r?void 0:r.messages)&&void 0!==i?i:{};return new Ze(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},a).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var o;return t=t.toLowerCase(),this.listeners[t]=null!==(o=this.listeners[t])&&void 0!==o?o:new Set,this.listeners[t].add(e),()=>{var o;return null===(o=this.listeners[t])||void 0===o?void 0:o.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}gi=bi,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new mi((async(t,e)=>(await yi.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new mi((async(t,e)=>(await yi.await()).getCustomMessageContext(t,e))));const vi=window.FluidTopicsI18nService,Oi=window.FluidTopicsCustomI18nService;var xi=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ni extends Le{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>yi.get(),this.cache=new r,this.cleanSessionDebouncer=new i}render(){return oe`
203
203
  <slot></slot>
204
- `}update(t){super.update(t),t.has("baseUrl")&&(di.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&di.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&di.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&di.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&di.actions.noCustom(this.noCustom),t.has("editorMode")&&di.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&di.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&di.actions.session(this.session),t.has("availableUiLocales")&&di.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>vi.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}Ni.elementDefinitions={},Ni.styles=pi,xi([U()],Ni.prototype,"baseUrl",void 0),xi([U()],Ni.prototype,"apiIntegrationIdentifier",void 0),xi([U()],Ni.prototype,"uiLocale",void 0),xi([A(null)],Ni.prototype,"availableUiLocales",void 0),xi([A(null)],Ni.prototype,"metadataConfiguration",void 0),xi([U({type:Boolean})],Ni.prototype,"editorMode",void 0),xi([U({type:Boolean})],Ni.prototype,"noCustom",void 0),xi([U({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Ni.prototype,"noCustomComponent",void 0),xi([U({type:Boolean})],Ni.prototype,"withManualResources",void 0),xi([A([])],Ni.prototype,"messageContexts",void 0),xi([A(void 0)],Ni.prototype,"session",void 0),xi([U({type:Object})],Ni.prototype,"apiProvider",void 0);class wi{async listMySearches(){var t;return(null===(t=di.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await yi.await()).listMySearches(di.getState().session.profile.userId):[]}}const Si=new r;class Ci{async listMyBookmarks(){return Si.get("bookmarks",(async()=>(await yi.await()).listMyBookmarks(di.getState().session.profile.userId)))}clearCache(){Si.clear("bookmarks")}}const Ei=Pr.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=di.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ci,di.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=di.getState();L(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){Ei.actions.savedSearches(void 0)}clearMyBookmarks(){Ei.actions.bookmarks(void 0)}async reloadMySearches(){const t=new wi,e=await t.listMySearches();Ei.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Ei.actions.bookmarks(e)}}},K("ft-app-context")(Ni);var Ri=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Ui=Symbol("i18nProperties"),Ii=Symbol("i18nUnsubs");function ki(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Oi:vi}i18n(t,e,...o){var r;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const i=null!==(r=t.args)&&void 0!==r?r:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...i)}onI18nUpdate(t){var e;null===(e=this[Ui])||void 0===e||e.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[Ui])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Ui]&&new Set([...this[Ui].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Ii].has(t)||this[Ii].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Ii].forEach((t=>t())),this[Ii].clear()}}return e=Ii,Ri([U({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Wi extends(ki(Le)){}class Li extends(ki(qe)){}var Ki=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ai extends Li{constructor(){super(),this.editorMode=!1,this.addStore(di)}render(){return this.key&&this.context?oe`
204
+ `}update(t){super.update(t),t.has("baseUrl")&&(di.actions.baseUrl(this.baseUrl),window.fluidTopicsBaseUrl=this.baseUrl),t.has("apiIntegrationIdentifier")&&di.actions.apiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&di.actions.uiLocale(this.uiLocale),t.has("metadataConfiguration")&&di.actions.metadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&di.actions.noCustom(this.noCustom),t.has("editorMode")&&di.actions.editorMode(this.editorMode),t.has("noCustomComponent")&&di.actions.noCustomComponent(this.noCustomComponent),t.has("session")&&di.actions.session(this.session),t.has("availableUiLocales")&&di.actions.availableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>vi.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){!this.withManualResources&&this.apiProvider()&&(null==this.session&&this.updateSession(),null==this.availableUiLocales&&this.updateUiLocales(),null==this.metadataConfiguration&&this.updateMetadataConfiguration())}async updateSession(){this.session=await this.cache.get("session",(async()=>{const t=await this.apiProvider().getCurrentSession();return t.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),t.idleTimeoutInMillis),t}))}async updateUiLocales(){this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>this.apiProvider().getAvailableUiLocales()))}async updateMetadataConfiguration(){this.metadataConfiguration=await this.cache.get("metadataConfiguration",(()=>this.apiProvider().getMetadataConfiguration()))}}Ni.elementDefinitions={},Ni.styles=pi,xi([U()],Ni.prototype,"baseUrl",void 0),xi([U()],Ni.prototype,"apiIntegrationIdentifier",void 0),xi([U()],Ni.prototype,"uiLocale",void 0),xi([A(null)],Ni.prototype,"availableUiLocales",void 0),xi([A(null)],Ni.prototype,"metadataConfiguration",void 0),xi([U({type:Boolean})],Ni.prototype,"editorMode",void 0),xi([U({type:Boolean})],Ni.prototype,"noCustom",void 0),xi([U({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Ni.prototype,"noCustomComponent",void 0),xi([U({type:Boolean})],Ni.prototype,"withManualResources",void 0),xi([A([])],Ni.prototype,"messageContexts",void 0),xi([A(void 0)],Ni.prototype,"session",void 0),xi([U({type:Object})],Ni.prototype,"apiProvider",void 0);class wi{async listMySearches(){var t;return(null===(t=di.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await yi.await()).listMySearches(di.getState().session.profile.userId):[]}}const Si=new r;class Ci{async listMyBookmarks(){return Si.get("bookmarks",(async()=>(await yi.await()).listMyBookmarks(di.getState().session.profile.userId)))}clearCache(){Si.clear("bookmarks")}}const Ei=Pr.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=di.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new Ci,di.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=di.getState();L(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){Ei.actions.savedSearches(void 0)}clearMyBookmarks(){Ei.actions.bookmarks(void 0)}async reloadMySearches(){const t=new wi,e=await t.listMySearches();Ei.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;Ei.actions.bookmarks(e)}}},K("ft-app-context")(Ni);var Ri=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};const Ui=Symbol("i18nAttributes"),Ii=Symbol("i18nProperties"),ki=Symbol("i18nUnsubs");function Wi(t){var e;class o extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?Oi:vi}i18n(t,e,...o){var r;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...o);const i=null!==(r=t.args)&&void 0!==r?r:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...i)}onI18nUpdate(t){var e,o;null===(e=this[Ui])||void 0===e||e.forEach(((e,o)=>{var r;const i=this.getI18nAttributeValue(o);(null===(r=null==i?void 0:i.context)||void 0===r?void 0:r.toLowerCase())===t.toLowerCase()&&this.updateI18nAttributeMessage(o,i,e)})),null===(o=this[Ii])||void 0===o||o.forEach(((e,o)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[o]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updateI18nAttributeMessage(t,e,o){this[t]={...e,message:this.i18n({context:e.context,key:e.key,...o})}}update(t){var e,o;super.update(t),null===(e=this[Ui])||void 0===e||e.forEach(((e,o)=>{const r=this.getI18nAttributeValue(o);(null==r?void 0:r.context)&&r.key&&(t.has(o)||null!=e.argsProvider)&&(t.has(o)&&this.addI18nContext(r.context),this.updateI18nAttributeMessage(o,r,e))})),null===(o=this[Ii])||void 0===o||o.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}getI18nAttributeValue(t){return this[t]}connectedCallback(){var t,e,o,r;super.connectedCallback(),new Set([...null!==(e=null===(t=this[Ii])||void 0===t?void 0:t.values())&&void 0!==e?e:[],...[...null!==(r=null===(o=this[Ui])||void 0===o?void 0:o.keys())&&void 0!==r?r:[]].map((t=>this.getI18nAttributeValue(t)))].map((t=>null==t?void 0:t.context))).forEach((t=>t&&this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[ki].has(t)||this[ki].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages("string"==typeof t?t:t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[ki].forEach((t=>t())),this[ki].clear()}}return e=ki,Ri([U({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}class Li extends(Wi(Le)){}class Ki extends(Wi(qe)){}var Ai=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ji extends Ki{constructor(){super(),this.editorMode=!1,this.addStore(di)}render(){return this.key&&this.context?oe`
205
205
  <span class="ft-i18n">
206
206
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
207
207
  </span>
208
- `:this.editorMode?"Select a context and a label key.":ie}update(t){var e;super.update(t),this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}Ai.elementDefinitions={},Ai.styles=ui,Ki([Pe()],Ai.prototype,"editorMode",void 0),Ki([U()],Ai.prototype,"context",void 0),Ki([U()],Ai.prototype,"key",void 0),Ki([A([])],Ai.prototype,"args",void 0),Ki([U()],Ai.prototype,"defaultMessage",void 0);class ji{static build(t){return new ji(t)}static fromGwt(t){return new ji(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>vi.resolveMessage(this.name,e,...t)})}}K("ft-i18n")(Ai);const $i=ji.build("designedReaderTopicContent");var Mi=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Zi extends Yr{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,e;return this.map&&(this.error||this.content)?oe`
208
+ `:this.editorMode?"Select a context and a label key.":ie}update(t){var e;super.update(t),["context","key","defaultMessage"].some((e=>t.has(e)))&&this.context&&this.key&&this.addI18nMessages(this.context,{[this.key]:null!==(e=this.defaultMessage)&&void 0!==e?e:""})}}ji.elementDefinitions={},ji.styles=ui,Ai([Pe()],ji.prototype,"editorMode",void 0),Ai([U()],ji.prototype,"context",void 0),Ai([U()],ji.prototype,"key",void 0),Ai([A([])],ji.prototype,"args",void 0),Ai([U()],ji.prototype,"defaultMessage",void 0);class $i{static build(t){return new $i(t)}static fromGwt(t){return new $i(t)}constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const o=e;return t=>({context:this.name,key:o,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>vi.resolveMessage(this.name,e,...t)})}}K("ft-i18n")(ji);const Mi=$i.build("designedReaderTopicContent");var Zi=function(t,e,o,r){for(var i,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(n<3?i(a):n>3?i(e,o,a):i(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Pi extends Yr{constructor(){super(...arguments),this.contentPreprocessor=t=>t,this.onContentAvailable=()=>null}render(){var t,e;return this.map&&(this.error||this.content)?oe`
209
209
  <style>
210
210
  @import "${null===(t=this.map)||void 0===t?void 0:t.contentStyles.topicStylesheetUrl}";
211
211
  </style>
@@ -218,11 +218,11 @@ let be=class extends $t{constructor(){super(...arguments),this.renderOptions={ho
218
218
  <div class="topic-on-error">
219
219
  <ft-icon>WARNING</ft-icon>
220
220
  <div>
221
- ${this.is404Error()?$i.messages.topicMissingAdvice():$i.messages.somethingWentWrong()}
221
+ ${this.is404Error()?Mi.messages.topicMissingAdvice():Mi.messages.somethingWentWrong()}
222
222
  </div>
223
223
  </div>
224
224
  `;const i=null!==(e=null===(t=this.map)||void 0===t?void 0:t.contentStyles.customCssClasses.join(" "))&&void 0!==e?e:"";return oe`
225
225
  <div class="depth-${null===(o=this.tocNode)||void 0===o?void 0:o.depth} content-locale-${null===(r=this.map)||void 0===r?void 0:r.lang} ${i}">
226
226
  ${null!=this.content?ti(`${this.content}`):ie}
227
227
  </div>
228
- `}is404Error(){return 404===this.error.status}}Zi.styles=[Dr,$e],Mi([Pe()],Zi.prototype,"map",void 0),Mi([Pe()],Zi.prototype,"scrollTarget",void 0),Mi([I()],Zi.prototype,"content",void 0),Mi([I()],Zi.prototype,"error",void 0),Mi([Pe({selector:(t,e)=>e.disableContextInteractions?"":t.searchInDocumentQuery})],Zi.prototype,"searchInDocumentQuery",void 0),Mi([U({attribute:!1})],Zi.prototype,"contentPreprocessor",void 0),Mi([U({attribute:!1})],Zi.prototype,"onContentAvailable",void 0),Mi([W("section.topic")],Zi.prototype,"topicContainer",void 0),K("ft-reader-topic-content")(Zi),t.FtReaderTopicContent=Zi,t.FtReaderTopicContentCssVariables=Fr,t.styles=Dr}({});
228
+ `}is404Error(){return 404===this.error.status}}Pi.styles=[Dr,$e],Zi([Pe()],Pi.prototype,"map",void 0),Zi([Pe()],Pi.prototype,"scrollTarget",void 0),Zi([I()],Pi.prototype,"content",void 0),Zi([I()],Pi.prototype,"error",void 0),Zi([Pe({selector:(t,e)=>e.disableContextInteractions?"":t.searchInDocumentQuery})],Pi.prototype,"searchInDocumentQuery",void 0),Zi([U({attribute:!1})],Pi.prototype,"contentPreprocessor",void 0),Zi([U({attribute:!1})],Pi.prototype,"onContentAvailable",void 0),Zi([W("section.topic")],Pi.prototype,"topicContainer",void 0),K("ft-reader-topic-content")(Pi),t.FtReaderTopicContent=Pi,t.FtReaderTopicContentCssVariables=Fr,t.styles=Dr}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-topic-content",
3
- "version": "1.1.32",
3
+ "version": "1.1.34",
4
4
  "description": "Content of a topic in integrated reader.",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,14 +19,14 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-chip": "1.1.32",
23
- "@fluid-topics/ft-i18n": "1.1.32",
24
- "@fluid-topics/ft-reader-context": "1.1.32",
25
- "@fluid-topics/ft-reader-topic-context": "1.1.32",
26
- "@fluid-topics/ft-tooltip": "1.1.32",
27
- "@fluid-topics/ft-wc-utils": "1.1.32",
28
- "@fluid-topics/public-api": "1.0.58",
22
+ "@fluid-topics/ft-chip": "1.1.34",
23
+ "@fluid-topics/ft-i18n": "1.1.34",
24
+ "@fluid-topics/ft-reader-context": "1.1.34",
25
+ "@fluid-topics/ft-reader-topic-context": "1.1.34",
26
+ "@fluid-topics/ft-tooltip": "1.1.34",
27
+ "@fluid-topics/ft-wc-utils": "1.1.34",
28
+ "@fluid-topics/public-api": "1.0.59",
29
29
  "lit": "3.1.0"
30
30
  },
31
- "gitHead": "7aceb8fb7c61e391e77ab55affab94df9d3f91aa"
31
+ "gitHead": "1e947e93e937ded84f056955b14b760e9dea7058"
32
32
  }