@fluid-topics/ft-reader-feedback 2.1.15 → 2.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var gd=Object.create;var Cs=Object.defineProperty;var vd=Object.getOwnPropertyDescriptor;var yd=Object.getOwnPropertyNames;var bd=Object.getPrototypeOf,xd=Object.prototype.hasOwnProperty;var Er=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Sd=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yd(t))!xd.call(e,n)&&n!==r&&Cs(e,n,{get:()=>t[n],enumerable:!(i=vd(t,n))||i.enumerable});return e};var f=(e,t,r)=>(r=e!=null?gd(bd(e)):{},Sd(t||!e||!e.__esModule?Cs(r,"default",{value:e,enumerable:!0}):r,e));var b=Er((Yp,_s)=>{_s.exports=ftGlobals.wcUtils});var k=Er((Xp,Rs)=>{Rs.exports=ftGlobals.lit});var F=Er((Zp,Os)=>{Os.exports=ftGlobals.litDecorators});var _e=Er((Jf,ll)=>{ll.exports=ftGlobals.litClassMap});var uu=Er((Tb,cu)=>{cu.exports=ftGlobals.litUnsafeHTML});var bs=Er((cS,Fu)=>{Fu.exports=ftGlobals.litRepeat});var md=f(b());var dd=f(k()),ae=f(F()),wt=f(b());var
|
|
1
|
+
"use strict";(()=>{var gd=Object.create;var Cs=Object.defineProperty;var vd=Object.getOwnPropertyDescriptor;var yd=Object.getOwnPropertyNames;var bd=Object.getPrototypeOf,xd=Object.prototype.hasOwnProperty;var Er=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Sd=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yd(t))!xd.call(e,n)&&n!==r&&Cs(e,n,{get:()=>t[n],enumerable:!(i=vd(t,n))||i.enumerable});return e};var f=(e,t,r)=>(r=e!=null?gd(bd(e)):{},Sd(t||!e||!e.__esModule?Cs(r,"default",{value:e,enumerable:!0}):r,e));var b=Er((Yp,_s)=>{_s.exports=ftGlobals.wcUtils});var k=Er((Xp,Rs)=>{Rs.exports=ftGlobals.lit});var F=Er((Zp,Os)=>{Os.exports=ftGlobals.litDecorators});var _e=Er((Jf,ll)=>{ll.exports=ftGlobals.litClassMap});var uu=Er((Tb,cu)=>{cu.exports=ftGlobals.litUnsafeHTML});var bs=Er((cS,Fu)=>{Fu.exports=ftGlobals.litRepeat});var md=f(b());var dd=f(k()),ae=f(F()),wt=f(b());var Pi=f(b()),Is=f(F());var Tr;(function(e){e.clusteringHelperCreated="clustering-helper-created",e.mapAttachmentsUpdate="map-attachments-update",e.visibleTopicChange="visible-topic-change",e.requestedTopicNotFound="requested-topic-not-found"})(Tr||(Tr={}));var Gt;(function(e){e.FEEDBACK="FEEDBACK",e.RATING="RATING",e.PRINT="PRINT",e.BOOKMARK="BOOKMARK",e.COLLECTIONS="COLLECTIONS",e.PERSONAL_BOOKS="PERSONAL_BOOKS"})(Gt||(Gt={}));var Ad=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},no=class extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}},io=Symbol("registerInterval"),Ed=(0,Pi.applyMixinOnce)(Symbol("toFtReaderComponent"),function(e){var t;class r extends e{constructor(){super(...arguments),this[t]=0}setReaderStateManager(n){this.clearStateManager(),this.stateManager=n,this.addStore(n.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var n;return(n=this.stateManager)===null||n===void 0?void 0:n.service}connectedCallback(){super.connectedCallback(),this[io]=window.setInterval(()=>this.tryToRegisterToContext(),50)}tryToRegisterToContext(){this.stateManager!=null?window.clearInterval(this[io]):this.dispatchEvent(new no)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return t=io,Ad([(0,Is.state)()],r.prototype,"stateManager",void 0),r}),Me=class extends Ed(Pi.FtLitElementRedux){};var nt=f(k()),ot=f(F()),Qn=f(b());var ra=f(k()),V=f(b());var ta=f(k()),O=f(b());var Ns=f(k()),lt=f(b()),Ps=lt.FtCssVariableFactory.extend("--ft-ripple-color","",lt.designSystemVariables.colorContent),at={color:Ps,backgroundColor:lt.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ps),opacityContentOnSurfacePressed:lt.FtCssVariableFactory.external(lt.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:lt.FtCssVariableFactory.external(lt.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:lt.FtCssVariableFactory.external(lt.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:lt.FtCssVariableFactory.external(lt.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:lt.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Ls=lt.FtCssVariableFactory.extend("--ft-ripple-color","",lt.designSystemVariables.colorPrimary),ks={color:Ls,backgroundColor:lt.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ls)},Ds=lt.FtCssVariableFactory.extend("--ft-ripple-color","",lt.designSystemVariables.colorSecondary),Ms={color:Ds,backgroundColor:lt.FtCssVariableFactory.extend("--ft-ripple-background-color","",Ds)},$s=Ns.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
line-height: ${_r.lineHeight};
|
|
166
166
|
text-transform: ${_r.textTransform};
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,Li=Yt.css`
|
|
169
169
|
.ft-typography--caption {
|
|
170
170
|
font-family: ${Bt.fontFamily};
|
|
171
171
|
font-size: ${Bt.fontSize};
|
|
@@ -516,9 +516,9 @@
|
|
|
516
516
|
[part="buttons-container"] {
|
|
517
517
|
align-self: flex-end;
|
|
518
518
|
}
|
|
519
|
-
`;var na;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(na||(na={}));var oa;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(oa||(oa={}));var sa;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(sa||(sa={}));var aa;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(aa||(aa={}));var la;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(la||(la={}));var ca;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(ca||(ca={}));var ki;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ki||(ki={}));var ua;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(ua||(ua={}));var da;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(da||(da={}));var pa;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(pa||(pa={}));var fa;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(fa||(fa={}));var ha;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ha||(ha={}));var ma;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ma||(ma={}));var ga;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ga||(ga={}));var ct;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ct||(ct={}));var va;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(va||(va={}));var ya;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ya||(ya={}));var ba;(function(e){e.ASC="ASC",e.DESC="DESC"})(ba||(ba={}));var xa;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(xa||(xa={}));var Sa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Sa||(Sa={}));var Aa;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Aa||(Aa={}));var Ea;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Ea||(Ea={}));var Ta;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ta||(Ta={}));var wa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(wa||(wa={}));var Ca;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ca||(Ca={}));var _a;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(_a||(_a={}));var Ra;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ra||(Ra={}));var z;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(z||(z={}));var Xt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Xt||(Xt={}));var Oa;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Oa||(Oa={}));var Ia;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Ia||(Ia={}));var
|
|
519
|
+
`;var na;(function(e){e.black="black",e.green="green",e.blue="blue",e.purple="purple",e.red="red",e.orange="orange",e.yellow="yellow"})(na||(na={}));var oa;(function(e){e.OFFICIAL="OFFICIAL",e.PERSONAL="PERSONAL",e.SHARED="SHARED"})(oa||(oa={}));var sa;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(sa||(sa={}));var aa;(function(e){e.STRUCTURED_DOCUMENT="STRUCTURED_DOCUMENT",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT",e.SHARED_PERSONAL_BOOK="SHARED_PERSONAL_BOOK",e.PERSONAL_BOOK="PERSONAL_BOOK",e.ATTACHMENT="ATTACHMENT",e.RESOURCE="RESOURCE",e.HTML_PACKAGE="HTML_PACKAGE"})(aa||(aa={}));var la;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(la||(la={}));var ca;(function(e){e.VALUE="VALUE",e.DATE="DATE",e.RANGE="RANGE"})(ca||(ca={}));var ki;(function(e){e.OFFICIAL="OFFICIAL",e.AI="AI"})(ki||(ki={}));var ua;(function(e){e.BOOKMARK__CREATE="BOOKMARK__CREATE",e.BOOKMARK__DELETE="BOOKMARK__DELETE",e.CASE_DEFLECTION__START="CASE_DEFLECTION__START",e.CASE_DEFLECTION__OPEN_TICKET="CASE_DEFLECTION__OPEN_TICKET",e.CASE_DEFLECTION__RATE="CASE_DEFLECTION__RATE",e.CHATBOT__RATE="CHATBOT__RATE",e.COLLECTION__CREATE="COLLECTION__CREATE",e.COLLECTION__UPDATE="COLLECTION__UPDATE",e.COLLECTION__DELETE="COLLECTION__DELETE",e.CUSTOM_EVENT__TRIGGER="CUSTOM_EVENT__TRIGGER",e.DOCUMENT__ON_DEMAND_TRANSLATE="DOCUMENT__ON_DEMAND_TRANSLATE",e.DOCUMENT__DOWNLOAD="DOCUMENT__DOWNLOAD",e.DOCUMENT__PRINT="DOCUMENT__PRINT",e.DOCUMENT__PROCESS="DOCUMENT__PROCESS",e.DOCUMENT__RATE="DOCUMENT__RATE",e.DOCUMENT__SEARCH="DOCUMENT__SEARCH",e.DOCUMENT__START_DISPLAY="DOCUMENT__START_DISPLAY",e.DOCUMENT__UNRATE="DOCUMENT__UNRATE",e.FEEDBACK__SEND="FEEDBACK__SEND",e.AI__COMPLETED_QUERY="AI__COMPLETED_QUERY",e.AI__RATE="AI__RATE",e.AI_CASE_DEFLECTION__START="AI_CASE_DEFLECTION__START",e.AI_CASE_DEFLECTION__OPEN_TICKET="AI_CASE_DEFLECTION__OPEN_TICKET",e.KHUB__PROCESS="KHUB__PROCESS",e.KHUB__SEARCH="KHUB__SEARCH",e.LABELS__DOWNLOAD="LABELS__DOWNLOAD",e.LINK__SHARE="LINK__SHARE",e.PAGE__DISPLAY="PAGE__DISPLAY",e.PERSONAL_BOOK__CREATE="PERSONAL_BOOK__CREATE",e.PERSONAL_BOOK__DELETE="PERSONAL_BOOK__DELETE",e.PERSONAL_BOOK__UPDATE="PERSONAL_BOOK__UPDATE",e.PERSONAL_TOPIC__CREATE="PERSONAL_TOPIC__CREATE",e.PERSONAL_TOPIC__UPDATE="PERSONAL_TOPIC__UPDATE",e.PERSONAL_TOPIC__DELETE="PERSONAL_TOPIC__DELETE",e.SAVED_SEARCH__CREATE="SAVED_SEARCH__CREATE",e.SAVED_SEARCH__DELETE="SAVED_SEARCH__DELETE",e.SAVED_SEARCH__UPDATE="SAVED_SEARCH__UPDATE",e.SEARCH_PAGE__SELECT="SEARCH_PAGE__SELECT",e.SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU="SEARCH_RESULT__OPEN_BROWSER_CONTEXT_MENU",e.TOPIC__AI_TRANSLATE="TOPIC__AI_TRANSLATE",e.TOPIC__RATE="TOPIC__RATE",e.TOPIC__START_DISPLAY="TOPIC__START_DISPLAY",e.TOPIC__UNRATE="TOPIC__UNRATE",e.USER__LOGIN="USER__LOGIN",e.USER__LOGOUT="USER__LOGOUT",e.HEARTBEAT="HEARTBEAT"})(ua||(ua={}));var da;(function(e){e.STANDARD="STANDARD",e.STRUCTURAL="STRUCTURAL"})(da||(da={}));var pa;(function(e){e.THIRD_PARTY="THIRD_PARTY",e.OFF_THE_GRID="OFF_THE_GRID",e.CONTENT_PACKAGER="CONTENT_PACKAGER",e.PAGES="PAGES",e.DESIGNED_READER="DESIGNED_READER"})(pa||(pa={}));var fa;(function(e){e.HOMEPAGE="HOMEPAGE",e.CUSTOM="CUSTOM",e.HEADER="HEADER",e.READER="READER",e.TOPIC_TEMPLATE="TOPIC_TEMPLATE",e.SEARCH="SEARCH",e.SEARCH_RESULT="SEARCH_RESULT",e.SEARCH_ANNOUNCEMENT="SEARCH_ANNOUNCEMENT",e.LINK_PREVIEW="LINK_PREVIEW",e.UD_VIEWER="UD_VIEWER",e.ASSET_VIEWER="ASSET_VIEWER"})(fa||(fa={}));var ha;(function(e){e.CLASSIC="CLASSIC",e.CUSTOM="CUSTOM",e.DESIGNER="DESIGNER"})(ha||(ha={}));var ma;(function(e){e.AND="AND",e.OR="OR",e.MONOVALUED="MONOVALUED"})(ma||(ma={}));var ga;(function(e){e.NONE="NONE",e.ALPHABET="ALPHABET",e.VERSION="VERSION"})(ga||(ga={}));var ct;(function(e){e.STARS="STARS",e.LIKE="LIKE",e.DICHOTOMOUS="DICHOTOMOUS",e.NO_RATING="NO_RATING"})(ct||(ct={}));var va;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR",e.CUSTOM="CUSTOM"})(va||(va={}));var ya;(function(e){e.OPTIONAL="OPTIONAL",e.MANDATORY="MANDATORY"})(ya||(ya={}));var ba;(function(e){e.ASC="ASC",e.DESC="DESC"})(ba||(ba={}));var xa;(function(e){e.ALPHA="ALPHA",e.NATURAL="NATURAL"})(xa||(xa={}));var Sa;(function(e){e.EVERYWHERE="EVERYWHERE",e.TITLE_ONLY="TITLE_ONLY",e.NONE="NONE"})(Sa||(Sa={}));var Aa;(function(e){e.ARTICLE="ARTICLE",e.BOOK="BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Aa||(Aa={}));var Ea;(function(e){e.FLUIDTOPICS="FLUIDTOPICS",e.EXTERNAL="EXTERNAL"})(Ea||(Ea={}));var Ta;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.PERSONAL_BOOK="PERSONAL_BOOK",e.SHARED_BOOK="SHARED_BOOK",e.HTML_PACKAGE="HTML_PACKAGE"})(Ta||(Ta={}));var wa;(function(e){e.LAST_WEEK="LAST_WEEK",e.LAST_MONTH="LAST_MONTH",e.LAST_QUARTER="LAST_QUARTER",e.LAST_YEAR="LAST_YEAR"})(wa||(wa={}));var Ca;(function(e){e.MAP="MAP",e.DOCUMENT="DOCUMENT",e.TOPIC="TOPIC",e.HTML_PACKAGE="HTML_PACKAGE",e.HTML_PACKAGE_PAGE="HTML_PACKAGE_PAGE"})(Ca||(Ca={}));var _a;(function(e){e.DEFAULT="DEFAULT",e.DOCUMENTS="DOCUMENTS",e.ALL_TOPICS="ALL_TOPICS",e.TOPICS_AND_UNSTRUCTURED_DOCUMENTS="TOPICS_AND_UNSTRUCTURED_DOCUMENTS"})(_a||(_a={}));var Ra;(function(e){e.PLAIN_TEXT="PLAIN_TEXT",e.LOCALIZED_OFFICIAL="LOCALIZED_OFFICIAL",e.LOCALIZED_CUSTOM="LOCALIZED_CUSTOM"})(Ra||(Ra={}));var z;(function(e){e.PERSONAL_BOOK_USER="PERSONAL_BOOK_USER",e.PERSONAL_BOOK_SHARE_USER="PERSONAL_BOOK_SHARE_USER",e.HTML_EXPORT_USER="HTML_EXPORT_USER",e.PDF_EXPORT_USER="PDF_EXPORT_USER",e.SAVED_SEARCH_USER="SAVED_SEARCH_USER",e.COLLECTION_USER="COLLECTION_USER",e.OFFLINE_USER="OFFLINE_USER",e.ANALYTICS_USER="ANALYTICS_USER",e.BETA_USER="BETA_USER",e.DEBUG_USER="DEBUG_USER",e.PRINT_USER="PRINT_USER",e.RATING_USER="RATING_USER",e.FEEDBACK_USER="FEEDBACK_USER",e.GENERATIVE_AI_USER="GENERATIVE_AI_USER",e.GENERATIVE_AI_EXPORT_USER="GENERATIVE_AI_EXPORT_USER",e.CONTENT_PUBLISHER="CONTENT_PUBLISHER",e.BEHAVIOR_DATA_USER="BEHAVIOR_DATA_USER",e.ANNOUNCEMENT_ADMIN="ANNOUNCEMENT_ADMIN",e.KHUB_ADMIN="KHUB_ADMIN",e.USERS_ADMIN="USERS_ADMIN",e.PORTAL_ADMIN="PORTAL_ADMIN",e.ADMIN="ADMIN"})(z||(z={}));var Xt;(function(e){e.SEARCHES="SEARCHES",e.BOOKMARKS="BOOKMARKS",e.BOOKS="BOOKS",e.COLLECTIONS="COLLECTIONS"})(Xt||(Xt={}));var Oa;(function(e){e.UNAUTHENTICATED="UNAUTHENTICATED",e.USER_INCOMPLETE="USER_INCOMPLETE",e.MFA_REQUIRED="MFA_REQUIRED",e.AUTHENTICATED="AUTHENTICATED"})(Oa||(Oa={}));var Ia;(function(e){e.UNREACHABLE="UNREACHABLE",e.UNAUTHORIZED="UNAUTHORIZED",e.FORBIDDEN="FORBIDDEN",e.INCOMPATIBLE="INCOMPATIBLE",e.FAILED="FAILED",e.OK="OK"})(Ia||(Ia={}));var Pa;(function(e){e.VALID="VALID",e.INVALID="INVALID"})(Pa||(Pa={}));var La;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SUMMARY="SUMMARY",e.SEMANTIC_SEARCH="SEMANTIC_SEARCH",e.CHATBOT_INSTRUCTIONS="CHATBOT_INSTRUCTIONS",e.DOCUMENTATION="DOCUMENTATION",e.OTHER="OTHER"})(La||(La={}));var ka;(function(e){e.INACCURATE="INACCURATE",e.INCOMPLETE="INCOMPLETE",e.OFF_TOPIC="OFF_TOPIC",e.IRRELEVANT_SOURCES="IRRELEVANT_SOURCES",e.SLOW="SLOW",e.OTHER="OTHER"})(ka||(ka={}));var Da;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Da||(Da={}));var Ma;(function(e){e.JSON="JSON",e.TEXT="TEXT"})(Ma||(Ma={}));var Na;(function(e){e.TEXT="TEXT",e.HTML="HTML"})(Na||(Na={}));var $a;(function(e){e.IN_PROGRESS="IN_PROGRESS",e.ERROR="ERROR",e.DONE="DONE"})($a||($a={}));var Ua;(function(e){e.HTML="HTML",e.MARKDOWN="MARKDOWN"})(Ua||(Ua={}));var Fa;(function(e){e.SOURCES="SOURCES",e.ENRICH_AND_CLEAN="ENRICH_AND_CLEAN",e.VOCABULARIES="VOCABULARIES",e.METADATA="METADATA",e.PRETTY_URL="PRETTY_URL",e.ACCESS_RULE="ACCESS_RULE",e.DESIGNED_PAGES="DESIGNED_PAGES",e.THEME_STUDIO="THEME_STUDIO",e.PORTAL_GENERAL="PORTAL_GENERAL",e.ASSETS="ASSETS",e.CODE_LIBRARY="CODE_LIBRARY",e.THEME="THEME",e.CONTENT_STYLES="CONTENT_STYLES",e.HOMEPAGE="HOMEPAGE",e.CLASSIC_SEARCH_PAGE="CLASSIC_SEARCH_PAGE",e.CLASSIC_READER_PAGE="CLASSIC_READER_PAGE",e.PORTAL_METADATA="PORTAL_METADATA",e.LANGUAGES="LANGUAGES",e.PRINT_TEMPLATES="PRINT_TEMPLATES",e.OFFLINE="OFFLINE",e.CUSTOM_JS="CUSTOM_JS",e.CONFIDENTIALITY="CONFIDENTIALITY",e.NOTIFICATIONS="NOTIFICATIONS"})(Fa||(Fa={}));var Ba;(function(e){e.MAP="MAP",e.UNSTRUCTURED_DOCUMENT="UNSTRUCTURED_DOCUMENT"})(Ba||(Ba={}));var Td={[z.PERSONAL_BOOK_SHARE_USER]:[z.PERSONAL_BOOK_USER],[z.HTML_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.PDF_EXPORT_USER]:[z.PERSONAL_BOOK_USER],[z.KHUB_ADMIN]:[z.CONTENT_PUBLISHER],[z.ADMIN]:[z.KHUB_ADMIN,z.USERS_ADMIN,z.PORTAL_ADMIN,z.BEHAVIOR_DATA_USER],[z.GENERATIVE_AI_EXPORT_USER]:[z.GENERATIVE_AI_USER]};function Ha(e,t){return e===t||(Td[e]??[]).some(r=>Ha(r,t))}function Ce(e,t){return e==null?!1:(Array.isArray(e)?e:Array.isArray(e.roles)?e.roles:Array.isArray(e.profile?.roles)?e.profile.roles:[]).some(i=>Ha(i,t))}var fo=globalThis,ja=e=>e,Di=fo.trustedTypes,Va=Di?Di.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ya="$lit$",Ue=`lit$${Math.random().toFixed(9).slice(2)}$`,Xa="?"+Ue,wd=`<${Xa}>`,ir=document,Mi=()=>ir.createComment(""),ri=e=>e===null||typeof e!="object"&&typeof e!="function",ho=Array.isArray,Cd=e=>ho(e)||typeof e?.[Symbol.iterator]=="function",so=`[
|
|
520
520
|
\f\r]`,ei=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,za=/-->/g,Wa=/>/g,er=RegExp(`>|${so}(?:([^\\s"'>=/]+)(${so}*=${so}*(?:[^
|
|
521
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ka=/'/g,Ga=/"/g,Za=/^(?:script|style|textarea|title)$/i,mo=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Qa=mo(1),Ja=mo(2),tl=mo(3),ii=Symbol.for("lit-noChange"),ut=Symbol.for("lit-nothing"),qa=new WeakMap,rr=ir.createTreeWalker(ir,129);function el(e,t){if(!ho(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Va!==void 0?Va.createHTML(t):t}var _d=(e,t)=>{let r=e.length-1,i=[],n,o=t===2?"<svg>":t===3?"<math>":"",s=ei;for(let a=0;a<r;a++){let l=e[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===ei?u[1]==="!--"?s=za:u[1]!==void 0?s=Wa:u[2]!==void 0?(Za.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=er):u[3]!==void 0&&(s=er):s===er?u[0]===">"?(s=n??ei,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?er:u[3]==='"'?Ga:Ka):s===Ga||s===Ka?s=er:s===za||s===Wa?s=ei:(s=er,n=void 0);let h=s===er&&e[a+1].startsWith("/>")?" ":"";o+=s===ei?l+wd:d>=0?(i.push(c),l.slice(0,d)+Ya+l.slice(d)+Ue+h):l+Ue+(d===-2?a:h)}return[el(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},ni=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,u]=_d(t,r);if(this.el=e.createElement(c,i),rr.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=rr.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(Ya)){let p=u[s++],h=n.getAttribute(d).split(Ue),m=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?lo:m[1]==="?"?co:m[1]==="@"?uo:
|
|
521
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ka=/'/g,Ga=/"/g,Za=/^(?:script|style|textarea|title)$/i,mo=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Qa=mo(1),Ja=mo(2),tl=mo(3),ii=Symbol.for("lit-noChange"),ut=Symbol.for("lit-nothing"),qa=new WeakMap,rr=ir.createTreeWalker(ir,129);function el(e,t){if(!ho(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Va!==void 0?Va.createHTML(t):t}var _d=(e,t)=>{let r=e.length-1,i=[],n,o=t===2?"<svg>":t===3?"<math>":"",s=ei;for(let a=0;a<r;a++){let l=e[a],c,u,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===ei?u[1]==="!--"?s=za:u[1]!==void 0?s=Wa:u[2]!==void 0?(Za.test(u[2])&&(n=RegExp("</"+u[2],"g")),s=er):u[3]!==void 0&&(s=er):s===er?u[0]===">"?(s=n??ei,d=-1):u[1]===void 0?d=-2:(d=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?er:u[3]==='"'?Ga:Ka):s===Ga||s===Ka?s=er:s===za||s===Wa?s=ei:(s=er,n=void 0);let h=s===er&&e[a+1].startsWith("/>")?" ":"";o+=s===ei?l+wd:d>=0?(i.push(c),l.slice(0,d)+Ya+l.slice(d)+Ue+h):l+Ue+(d===-2?a:h)}return[el(e,o+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]},ni=class e{constructor({strings:t,_$litType$:r},i){let n;this.parts=[];let o=0,s=0,a=t.length-1,l=this.parts,[c,u]=_d(t,r);if(this.el=e.createElement(c,i),rr.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(n=rr.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let d of n.getAttributeNames())if(d.endsWith(Ya)){let p=u[s++],h=n.getAttribute(d).split(Ue),m=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:m[2],strings:h,ctor:m[1]==="."?lo:m[1]==="?"?co:m[1]==="@"?uo:Lr}),n.removeAttribute(d)}else d.startsWith(Ue)&&(l.push({type:6,index:o}),n.removeAttribute(d));if(Za.test(n.tagName)){let d=n.textContent.split(Ue),p=d.length-1;if(p>0){n.textContent=Di?Di.emptyScript:"";for(let h=0;h<p;h++)n.append(d[h],Mi()),rr.nextNode(),l.push({type:2,index:++o});n.append(d[p],Mi())}}}else if(n.nodeType===8)if(n.data===Xa)l.push({type:2,index:o});else{let d=-1;for(;(d=n.data.indexOf(Ue,d+1))!==-1;)l.push({type:7,index:o}),d+=Ue.length-1}o++}}static createElement(t,r){let i=ir.createElement("template");return i.innerHTML=t,i}};function Pr(e,t,r=e,i){if(t===ii)return t;let n=i!==void 0?r._$Co?.[i]:r._$Cl,o=ri(t)?void 0:t._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),o===void 0?n=void 0:(n=new o(e),n._$AT(e,r,i)),i!==void 0?(r._$Co??=[])[i]=n:r._$Cl=n),n!==void 0&&(t=Pr(e,n._$AS(e,t.values),n,i)),t}var ao=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:r},parts:i}=this._$AD,n=(t?.creationScope??ir).importNode(r,!0);rr.currentNode=n;let o=rr.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new Ni(o,o.nextSibling,this,t):l.type===1?c=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(c=new po(o,this,t)),this._$AV.push(c),l=i[++a]}s!==l?.index&&(o=rr.nextNode(),s++)}return rr.currentNode=ir,n}p(t){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}},Ni=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,i,n){this.type=2,this._$AH=ut,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Pr(this,t,r),ri(t)?t===ut||t==null||t===""?(this._$AH!==ut&&this._$AR(),this._$AH=ut):t!==this._$AH&&t!==ii&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Cd(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==ut&&ri(this._$AH)?this._$AA.nextSibling.data=t:this.T(ir.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=ni.createElement(el(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(r);else{let o=new ao(n,this),s=o.u(this.options);o.p(r),this.T(s),this._$AH=o}}_$AC(t){let r=qa.get(t.strings);return r===void 0&&qa.set(t.strings,r=new ni(t)),r}k(t){ho(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let o of t)n===r.length?r.push(i=new e(this.O(Mi()),this.O(Mi()),this,this.options)):i=r[n],i._$AI(o),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let i=ja(t).nextSibling;ja(t).remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Lr=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,n,o){this.type=1,this._$AH=ut,this._$AN=void 0,this.element=t,this.name=r,this._$AM=n,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ut}_$AI(t,r=this,i,n){let o=this.strings,s=!1;if(o===void 0)t=Pr(this,t,r,0),s=!ri(t)||t!==this._$AH&&t!==ii,s&&(this._$AH=t);else{let a=t,l,c;for(t=o[0],l=0;l<o.length-1;l++)c=Pr(this,a[i+l],r,l),c===ii&&(c=this._$AH[l]),s||=!ri(c)||c!==this._$AH[l],c===ut?t=ut:t!==ut&&(t+=(c??"")+o[l+1]),this._$AH[l]=c}s&&!n&&this.j(t)}j(t){t===ut?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lo=class extends Lr{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ut?void 0:t}},co=class extends Lr{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==ut)}},uo=class extends Lr{constructor(t,r,i,n,o){super(t,r,i,n,o),this.type=5}_$AI(t,r=this){if((t=Pr(this,t,r,0)??ut)===ii)return;let i=this._$AH,n=t===ut&&i!==ut||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==ut&&(i===ut||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},po=class{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Pr(this,t)}};var Rd=fo.litHtmlPolyfillSupport;Rd?.(ni,Ni),(fo.litHtmlVersions??=[]).push("3.3.3");var il=Symbol.for(""),Od=e=>{if(e?.r===il)return e?._$litStatic$},go=e=>({_$litStatic$:e,r:il});var rl=new Map,vo=e=>(t,...r)=>{let i=r.length,n,o,s=[],a=[],l,c=0,u=!1;for(;c<i;){for(l=t[c];c<i&&(o=r[c],(n=Od(o))!==void 0);)l+=n+t[++c],u=!0;c!==i&&a.push(o),s.push(l),c++}if(c===i&&s.push(t[i]),u){let d=s.join("$$lit$$");(t=rl.get(d))===void 0&&(s.raw=s,rl.set(d,t=s)),r=a}return e(t,...r)},yo=vo(Qa),Mf=vo(Ja),Nf=vo(tl);var bo=f(F()),ol=f(b());var Zt;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(Zt||(Zt={}));var nl=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},tt=class extends ol.FtLitElement{constructor(){super(...arguments),this.variant=Zt.body1}render(){return this.element?yo`
|
|
522
522
|
<${go(this.element)}
|
|
523
523
|
part="text"
|
|
524
524
|
class="ft-typography ft-typography--${this.variant}">
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
</${go(this.element)}>
|
|
527
527
|
`:yo`
|
|
528
528
|
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
|
|
529
|
-
`}};tt.styles=[Fs,Bs,Hs,js,Ir,Vs,
|
|
529
|
+
`}};tt.styles=[Fs,Bs,Hs,js,Ir,Vs,Li,zs,Ws,Ks,Gs];nl([(0,bo.property)()],tt.prototype,"element",void 0);nl([(0,bo.property)()],tt.prototype,"variant",void 0);var al=f(b());var sl={"ft-typography":tt};(0,al.customElements)(sl);var wn=f(k()),Ae=f(F()),yu=f(_e()),Le=f(b());var Yr=f(k()),Mt=f(F()),Xr=f(b());var cl=f(k()),bt=f(F()),ul=f(_e()),oi=f(b());var Lt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},$=class extends oi.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new oi.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new oi.Debouncer(10),this.moveRipple=t=>{var r,i;let{x:n,y:o}=this.getCoordinates(t),s=(i=(r=this.ripple)===null||r===void 0?void 0:r.getBoundingClientRect())!==null&&i!==void 0?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(n!=null?n-s.x:s.width/2),this.originY=Math.round(o!=null?o-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return cl.html`
|
|
530
530
|
<style>
|
|
531
531
|
.ft-ripple .ft-ripple--effect {
|
|
532
532
|
left: ${this.originX}px;
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
<div class="ft-ripple--background"></div>
|
|
538
538
|
<div class="ft-ripple--effect"></div>
|
|
539
539
|
</div>
|
|
540
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let i=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",i,s),t.addEventListener("touchstart",n,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",i,s),t.removeEventListener("touchstart",n,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,i=t,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};$.elementDefinitions={};$.styles=$s;
|
|
540
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var r,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(r=this.target)===null||r===void 0||r.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,r;let i=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;i&&this.setupFor((r=this.target)!==null&&r!==void 0?r:i)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let r=(...a)=>l=>{a.forEach(c=>window.addEventListener(c,this.endPress,{once:!0})),this.startPress(l)},i=r("mouseup","contextmenu"),n=r("touchend","touchcancel"),o=a=>{["Enter"," "].includes(a.key)&&r("keyup")(a)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",i,s),t.addEventListener("touchstart",n,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",o,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",i,s),t.removeEventListener("touchstart",n,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",o,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let r=t,i=t,n,o;return r.x!=null?{x:n,y:o}=r:i.touches!=null&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let r of t.composedPath()){if(r===this.target)break;if("hasAttribute"in r&&r.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};$.elementDefinitions={};$.styles=$s;Lt([(0,bt.property)({type:Boolean})],$.prototype,"primary",void 0);Lt([(0,bt.property)({type:Boolean})],$.prototype,"secondary",void 0);Lt([(0,bt.property)({type:Boolean})],$.prototype,"unbounded",void 0);Lt([(0,bt.property)({type:Boolean})],$.prototype,"activated",void 0);Lt([(0,bt.property)({type:Boolean})],$.prototype,"selected",void 0);Lt([(0,bt.property)({type:Boolean})],$.prototype,"disabled",void 0);Lt([(0,bt.state)()],$.prototype,"hovered",void 0);Lt([(0,bt.state)()],$.prototype,"focused",void 0);Lt([(0,bt.state)()],$.prototype,"pressed",void 0);Lt([(0,bt.state)()],$.prototype,"rippling",void 0);Lt([(0,bt.state)()],$.prototype,"originX",void 0);Lt([(0,bt.state)()],$.prototype,"originY",void 0);Lt([(0,bt.query)(".ft-ripple")],$.prototype,"ripple",void 0);Lt([(0,bt.query)(".ft-ripple--effect")],$.prototype,"rippleEffect",void 0);var pl=f(b());var dl={"ft-ripple":$};(0,pl.customElements)(dl);var vu=f(_e());var su=f(k()),ie=f(F()),re=f(b());var fl=f(k()),Fe=f(b()),si={distance:Fe.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:Fe.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:Fe.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),borderRadiusS:Fe.FtCssVariableFactory.extend("--ft-tooltip-border-radius","",Fe.designSystemVariables.borderRadiusS),maxWidth:Fe.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},hl=fl.css`
|
|
541
541
|
.ft-tooltip--container {
|
|
542
542
|
display: block;
|
|
543
543
|
}
|
|
@@ -568,8 +568,8 @@
|
|
|
568
568
|
position: relative;
|
|
569
569
|
word-break: break-word;
|
|
570
570
|
}
|
|
571
|
-
`;var gl=["top","right","bottom","left"],ml=["start","end"],So=gl.reduce((e,t)=>e.concat(t,t+"-"+ml[0],t+"-"+ml[1]),[]),ai=Math.min,Be=Math.max,li=Math.round;var de=e=>({x:e,y:e}),Id={left:"right",right:"left",bottom:"top",top:"bottom"};function vl(e,t,r){return Be(e,ai(t,r))}function $i(e,t){return typeof e=="function"?e(t):e}function ci(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Eo(e){return e==="y"?"height":"width"}function Ui(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function To(e){return Ao(Ui(e))}function yl(e,t,r){r===void 0&&(r=!1);let i=He(e),n=To(e),o=Eo(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xo(s)),[s,xo(s)]}function bl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function xo(e){let t=ci(e);return Id[t]+e.slice(t.length)}function Ld(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function xl(e){return typeof e!="number"?Ld(e):{top:e,right:e,bottom:e,left:e}}function nr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function Sl(e,t,r){let{reference:i,floating:n}=e,o=Ui(t),s=To(t),a=Eo(s),l=ci(t),c=o==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}let m=He(t);return m&&(h[s]+=p*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Al(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=$i(t,e),m=xl(h),x=a[p?d==="floating"?"reference":"floating":d],A=nr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),I=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},pt=nr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(A.top-pt.top+m.top)/I.y,bottom:(pt.bottom-A.bottom+m.bottom)/I.y,left:(A.left-pt.left+m.left)/I.x,right:(pt.right-A.right+m.right)/I.x}}var Pd=50,El=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Al},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:d}=Sl(c,i,l),p=i,h=0,m={};for(let g=0;g<o.length;g++){let x=o[g];if(!x)continue;let{name:A,fn:E}=x,{x:R,y:I,data:pt,reset:st}=await E({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=R??u,d=I??d,m[A]={...m[A],...pt},st&&h<Pd&&(h++,typeof st=="object"&&(st.placement&&(p=st.placement),st.rects&&(c=st.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):st.rects),{x:u,y:d}=Sl(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:m}};function kd(e,t,r){return(e?[...r.filter(n=>He(n)===e),...r.filter(n=>He(n)!==e)]:r.filter(n=>ci(n)===n)).filter(n=>e?He(n)===e||(t?bl(n)!==n:!1):!0)}var Tl=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=So,autoAlignment:h=!0,...m}=$i(e,t),g=d!==void 0||p===So?kd(d||null,h,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,A=g[x];if(A==null)return{};if(a!==A)return{reset:{placement:g[0]}};let E=await l.detectOverflow(t,m),R=yl(A,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),I=[E[ci(A)],E[R[0]],E[R[1]]],pt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:A,overflows:I}],st=g[x+1];if(st)return{data:{index:x+1,overflows:pt},reset:{placement:st}};let ke=pt.map(Ut=>{let Kt=He(Ut.placement);return[Ut.placement,Kt&&u?Ut.overflows.slice(0,2).reduce((Ft,Je)=>Ft+Je,0):Ut.overflows[0],Ut.overflows]}).sort((Ut,Kt)=>Ut[1]-Kt[1]),De=((n=ke.filter(Ut=>Ut[2].slice(0,He(Ut[0])?2:3).every(Kt=>Kt<=0))[0])==null?void 0:n[0])||ke[0][0];return De!==a?{data:{index:x+1,overflows:pt},reset:{placement:De}}:{}}}};var wl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:I}=E;return{x:R,y:I}}},...c}=$i(e,t),u={x:r,y:i},d=await o.detectOverflow(t,c),p=Ui(n),h=Ao(p),m=u[h],g=u[p],x=(E,R)=>vl(R+d[E==="y"?"top":"left"],R,R-d[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(g=x(p,g));let A=l.fn({...t,[h]:m,[p]:g});return{...A,data:{x:A.x-r,y:A.y-i,enabled:{[h]:s,[p]:a}}}}}};function Bi(){return typeof window<"u"}function sr(e){return _l(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(_l(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _l(e){return Bi()?e instanceof Node||e instanceof kt(e).Node:!1}function Qt(e){return Bi()?e instanceof Element||e instanceof kt(e).Element:!1}function be(e){return Bi()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Cl(e){return!Bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function kr(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Rl(e){return/^(table|td|th)$/.test(sr(e))}function ui(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Dd=/transform|translate|scale|rotate|perspective|filter/,Md=/paint|layout|strict|content/,or=e=>!!e&&e!=="none",wo;function Dr(e){let t=Qt(e)?Jt(e):e;return or(t.transform)||or(t.translate)||or(t.scale)||or(t.rotate)||or(t.perspective)||!Hi()&&(or(t.backdropFilter)||or(t.filter))||Dd.test(t.willChange||"")||Md.test(t.contain||"")}function Ol(e){let t=Re(e);for(;be(t)&&!ar(t);){if(Dr(t))return t;if(ui(t))return null;t=Re(t)}return null}function Hi(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function ar(e){return/^(html|body|#document)$/.test(sr(e))}function Jt(e){return kt(e).getComputedStyle(e)}function di(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(sr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Cl(e)&&e.host||ye(e);return Cl(t)?t.host:t}function Il(e){let t=Re(e);return ar(t)?(e.ownerDocument||e).body:be(t)&&kr(t)?t:Il(t)}function Fi(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Il(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=kt(n);if(o){let a=ji(s);return t.concat(s,s.visualViewport||[],kr(n)?n:[],a&&r?Fi(a):[])}else return t.concat(n,Fi(n,[],r))}function ji(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dl(e){let t=Jt(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=be(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=li(r)!==o||li(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Ml(e){return Qt(e)?e:e.contextElement}function Mr(e){let t=Ml(e);if(!be(t))return de(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=Dl(t),s=(o?li(r.width):r.width)/i,a=(o?li(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Nd=de(0);function Nl(e){let t=kt(e);return!Hi()||!t.visualViewport?Nd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $d(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==kt(e)?!1:t}function pi(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=Ml(e),s=de(1);t&&(i?Qt(i)&&(s=Mr(i)):s=Mr(e));let a=$d(o,r,i)?Nl(o):de(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o){let p=kt(o),h=i&&Qt(i)?kt(i):i,m=p,g=ji(m);for(;g&&i&&h!==m;){let x=Mr(g),A=g.getBoundingClientRect(),E=Jt(g),R=A.left+(g.clientLeft+parseFloat(E.paddingLeft))*x.x,I=A.top+(g.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=R,c+=I,m=kt(g),g=ji(m)}}return nr({width:u,height:d,x:l,y:c})}function Vi(e,t){let r=di(e).scrollLeft;return t?t.left+r:pi(ye(e)).left+r}function $l(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Vi(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function Ud(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=ye(i),a=t?ui(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=de(1),u=de(0),d=be(i);if((d||!d&&!o)&&((sr(i)!=="body"||kr(s))&&(l=di(i)),d)){let h=pi(i);c=Mr(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let p=s&&!d&&!o?$l(s,l):de(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Fd(e){return Array.from(e.getClientRects())}function Bd(e){let t=ye(e),r=di(e),i=e.ownerDocument.body,n=Be(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Be(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),s=-r.scrollLeft+Vi(e),a=-r.scrollTop;return Jt(i).direction==="rtl"&&(s+=Be(t.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:a}}var Ll=25;function Hd(e,t){let r=kt(e),i=ye(e),n=r.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let u=Hi();(!u||u&&t==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let c=Vi(i);if(c<=0){let u=i.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-h);m<=Ll&&(o-=m)}else c<=Ll&&(o+=c);return{width:o,height:s,x:a,y:l}}function jd(e,t){let r=pi(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=be(e)?Mr(e):de(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Pl(e,t,r){let i;if(t==="viewport")i=Hd(e,r);else if(t==="document")i=Bd(ye(e));else if(Qt(t))i=jd(t,r);else{let n=Nl(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nr(i)}function Ul(e,t){let r=Re(e);return r===t||!Qt(r)||ar(r)?!1:Jt(r).position==="fixed"||Ul(r,t)}function Vd(e,t){let r=t.get(e);if(r)return r;let i=Fi(e,[],!1).filter(a=>Qt(a)&&sr(a)!=="body"),n=null,o=Jt(e).position==="fixed",s=o?Re(e):e;for(;Qt(s)&&!ar(s);){let a=Jt(s),l=Dr(s);!l&&a.position==="fixed"&&(n=null),(o?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||kr(s)&&!l&&Ul(e,s))?i=i.filter(u=>u!==s):n=a,s=Re(s)}return t.set(e,i),i}function zd(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?ui(t)?[]:Vd(t,this._c):[].concat(r),i],a=Pl(t,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=Pl(t,s[p],n);l=Be(h.top,l),c=ai(h.right,c),u=ai(h.bottom,u),d=Be(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Wd(e){let{width:t,height:r}=Dl(e);return{width:t,height:r}}function Kd(e,t,r){let i=be(t),n=ye(t),o=r==="fixed",s=pi(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=de(0);function c(){l.x=Vi(n)}if(i||!i&&!o)if((sr(t)!=="body"||kr(n))&&(a=di(t)),i){let h=pi(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else n&&c();o&&!i&&n&&c();let u=n&&!i&&!o?$l(n,a):de(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function Co(e){return Jt(e).position==="static"}function kl(e,t){if(!be(e)||Jt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ye(e)===r&&(r=r.ownerDocument.body),r}function Fl(e,t){let r=kt(e);if(ui(e))return r;if(!be(e)){let n=Re(e);for(;n&&!ar(n);){if(Qt(n)&&!Co(n))return n;n=Re(n)}return r}let i=kl(e,t);for(;i&&Rl(i)&&Co(i);)i=kl(i,t);return i&&ar(i)&&Co(i)&&!Dr(i)?r:i||Ol(e)||r}var Gd=async function(e){let t=this.getOffsetParent||Fl,r=this.getDimensions,i=await r(e.floating);return{reference:Kd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function qd(e){return Jt(e).direction==="rtl"}var zi={convertOffsetParentRelativeRectToViewportRelativeRect:Ud,getDocumentElement:ye,getClippingRect:zd,getOffsetParent:Fl,getElementRects:Gd,getClientRects:Fd,getDimensions:Wd,getScale:Mr,isElement:Qt,isRTL:qd};var Bl=Tl,Hl=wl;var jl=(e,t,r)=>{let i=new Map,n={platform:zi,...r},o={...n.platform,_c:i};return El(e,t,{...n,platform:o})};function Vl(e){return Yd(e)}function _o(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Yd(e){for(let t=e;t;t=_o(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=_o(e);t;t=_o(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Dr(r)||t.tagName==="BODY"))return t}return null}async function zl(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},jl(e,t,{strategy:i.strategy,platform:{...zi,getOffsetParent:n=>zi.getOffsetParent(n,Vl)},middleware:[Hl({crossAxis:!0}),Bl({allowedPlacements:[i.placement]})]})}var qr=f(b());var Jo=f(F());var Wl=f(F(),1);var Ro=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Kl(e,t){return(0,Wl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return fi(e);try{return JSON.parse(r)}catch{return fi(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:hi,...t??{}})}function Xd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Wi(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Wi(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Wi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Wi(e,t){try{return Xd(e,t)}catch{return!1}}function hi(e,t){return!Wi(e,t)}function fi(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Ki(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var Gl=f(F(),1);var Oo=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:hi,attribute:!1,...t};(0,Gl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Gi=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var lr=f(F(),1);var qi=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Yl=f(k(),1);var Yi=globalThis,Zd=Yi.ShadowRoot&&(Yi.ShadyCSS===void 0||Yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ql=(e,t)=>{if(Zd)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Yi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Xi=class extends Yl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return ql(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Ro(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Xl(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var $r=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},tc,Zl=Symbol("constructorPrototype"),Ql=Symbol("constructorName"),ec=Symbol("exportpartsDebouncer"),Jl=Symbol("dynamicDependenciesLoaded"),Nr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Nr.eventName="exportparts-updated";var xe=class extends Xi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[tc]=new qi(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[ec].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ql]=this.constructor.name,this[Zl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ql]&&Object.setPrototypeOf(this,this[Zl])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Jl]||(r[Jl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Nr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Nr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Nr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=Xl(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,i,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=t.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],g=[...h,...m].filter(l).map(x=>x.trim());for(let x of g)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};tc=ec;$r([(0,lr.property)()],xe.prototype,"exportpartsPrefix",void 0);$r([Kl([])],xe.prototype,"exportpartsPrefixes",void 0);$r([(0,lr.property)({reflect:!0})],xe.prototype,"exportparts",void 0);$r([(0,lr.property)()],xe.prototype,"customStylesheet",void 0);$r([(0,lr.property)()],xe.prototype,"elementToFocus",void 0);$r([(0,lr.state)()],xe.prototype,"useAdoptedStyleSheets",void 0);function Zi(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var mi=Symbol("internalReduxEventsUnsubscribers"),je=Symbol("internalStoresUnsubscribers"),cr=Symbol("internalStores"),Qd=Ki(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[cr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[cr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[cr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[cr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[cr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[cr].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[je].has(s.store):this[je].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[je].set(s,a.subscribe(()=>this.updateFromStores())),this[mi].set(s,[]),Zi(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[mi].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[je].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[je].has(s)&&this[je].get(s)(),this[je].delete(s),(a=this[mi].get(s))===null||a===void 0||a.forEach(l=>l()),this[mi].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=je,r=cr,i=mi,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),rc=class extends Qd(xe){};function te(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Oe(e){return!!e&&!!e[G]}function pe(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===sp})(e)||Array.isArray(e)||!!e[cc]||!!(!((t=e.constructor)===null||t===void 0)&&t[cc])||Uo(e)||Fo(e))}function ur(e,t,r){r===void 0&&(r=!1),Br(e)===0?(r?Object.keys:Fr)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function Br(e){var t=e[G];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Uo(e)?2:Fo(e)?3:0}function Ur(e,t){return Br(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jd(e,t){return Br(e)===2?e.get(t):e[t]}function uc(e,t,r){var i=Br(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function dc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Uo(e){return np&&e instanceof Map}function Fo(e){return op&&e instanceof Set}function Ve(e){return e.o||e.t}function Bo(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=hc(e);delete t[G];for(var r=Fr(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Ho(e,t){return t===void 0&&(t=!1),jo(e)||Oe(e)||!pe(e)||(Br(e)>1&&(e.set=e.add=e.clear=e.delete=tp),Object.freeze(e),t&&ur(e,(function(r,i){return Ho(i,!0)}),!0)),e}function tp(){te(2)}function jo(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Se(e){var t=$o[e];return t||te(18,e),t}function ep(e,t){$o[e]||($o[e]=t)}function Do(){return vi}function Io(e,t){t&&(Se("Patches"),e.u=[],e.s=[],e.v=t)}function Qi(e){Mo(e),e.p.forEach(rp),e.p=null}function Mo(e){e===vi&&(vi=e.l)}function ic(e){return vi={p:[],l:vi,h:e,m:!0,_:0}}function rp(e){var t=e[G];t.i===0||t.i===1?t.j():t.g=!0}function Lo(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Se("ES5").S(t,e,i),i?(r[G].P&&(Qi(t),te(4)),pe(e)&&(e=Ji(t,e),t.l||tn(t,e)),t.u&&Se("Patches").M(r[G].t,e,t.u,t.s)):e=Ji(t,r,[]),Qi(t),t.u&&t.v(t.u,t.s),e!==fc?e:void 0}function Ji(e,t,r){if(jo(t))return t;var i=t[G];if(!i)return ur(t,(function(a,l){return nc(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return tn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Bo(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),ur(o,(function(a,l){return nc(e,i,n,a,l,r,s)})),tn(e,n,!1),r&&e.u&&Se("Patches").N(i,r,e.u,e.s)}return i.o}function nc(e,t,r,i,n,o,s){if(Oe(n)){var a=Ji(e,n,o&&t&&t.i!==3&&!Ur(t.R,i)?o.concat(i):void 0);if(uc(r,i,a),!Oe(a))return;e.m=!1}else s&&r.add(n);if(pe(n)&&!jo(n)){if(!e.h.D&&e._<1)return;Ji(e,n),t&&t.A.l||tn(e,n)}}function tn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Ho(t,r)}function Po(e,t){var r=e[G];return(r?Ve(r):e)[t]}function oc(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function ze(e){e.P||(e.P=!0,e.l&&ze(e.l))}function ko(e){e.o||(e.o=Bo(e.t))}function No(e,t,r){var i=Uo(t)?Se("MapSet").F(t,r):Fo(t)?Se("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Do(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=yi;s&&(l=[a],c=gi);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(t,r):Se("ES5").J(t,r);return(r?r.A:Do()).p.push(i),i}function ip(e){return Oe(e)||te(22,e),(function t(r){if(!pe(r))return r;var i,n=r[G],o=Br(r);if(n){if(!n.P&&(n.i<4||!Se("ES5").K(n)))return n.t;n.I=!0,i=sc(r,o),n.I=!1}else i=sc(r,o);return ur(i,(function(s,a){n&&Jd(n.t,s)===a||uc(i,s,t(a))})),o===3?new Set(i):i})(e)}function sc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Bo(e)}function pc(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[G];return yi.get(c,s)},set:function(c){var u=this[G];yi.set(u,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][G];if(!l.P)switch(l.i){case 5:i(l)&&ze(l);break;case 4:r(l)&&ze(l)}}}function r(s){for(var a=s.t,l=s.k,c=Fr(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==G){var p=a[d];if(p===void 0&&!Ur(a,d))return!0;var h=l[d],m=h&&h[G];if(m?m.t!==p:!dc(h,p))return!0}}var g=!!a[G];return c.length!==Fr(a).length+(g?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&te(3,JSON.stringify(Ve(s)))}var o={};ep("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var g=hc(p);delete g[G];for(var x=Fr(g),A=0;A<x.length;A++){var E=x[A];g[E]=e(E,d||!!g[E].enumerable)}return Object.create(Object.getPrototypeOf(p),g)})(l,s),u={i:l?5:4,A:a?a.A:Do(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,G,{value:u,writable:!0}),c},S:function(s,a,l){l?Oe(a)&&a[G].A===s&&t(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[G];if(d){var p=d.t,h=d.k,m=d.R,g=d.i;if(g===4)ur(h,(function(I){I!==G&&(p[I]!==void 0||Ur(p,I)?m[I]||c(h[I]):(m[I]=!0,ze(d)))})),ur(p,(function(I){h[I]!==void 0||Ur(h,I)||(m[I]=!1,ze(d))}));else if(g===5){if(i(d)&&(ze(d),m.length=!0),h.length<p.length)for(var x=h.length;x<p.length;x++)m[x]=!1;else for(var A=p.length;A<h.length;A++)m[A]=!0;for(var E=Math.min(h.length,p.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var ac,vi,Vo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",np=typeof Map<"u",op=typeof Set<"u",lc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",fc=Vo?Symbol.for("immer-nothing"):((ac={})["immer-nothing"]=!0,ac),cc=Vo?Symbol.for("immer-draftable"):"__$immer_draftable",G=Vo?Symbol.for("immer-state"):"__$immer_state";var sp=""+Object.prototype.constructor,Fr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,hc=Object.getOwnPropertyDescriptors||function(e){var t={};return Fr(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},$o={},yi={get:function(e,t){if(t===G)return e;var r=Ve(e);if(!Ur(r,t))return(function(n,o,s){var a,l=oc(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!pe(i)?i:i===Po(e.t,t)?(ko(e),e.o[t]=No(e.A.h,i,e)):i},has:function(e,t){return t in Ve(e)},ownKeys:function(e){return Reflect.ownKeys(Ve(e))},set:function(e,t,r){var i=oc(Ve(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=Po(Ve(e),t),o=n?.[G];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(dc(r,n)&&(r!==void 0||Ur(e.t,t)))return!0;ko(e),ze(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Po(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ko(e),ze(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ve(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){te(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){te(12)}},gi={};ur(yi,(function(e,t){gi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gi.deleteProperty=function(e,t){return gi.set.call(this,e,t,void 0)},gi.set=function(e,t,r){return yi.set.call(this,e[0],t,r,e[0])};var ap=(function(){function e(r){var i=this;this.O=lc,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(g){var x=this;g===void 0&&(g=a);for(var A=arguments.length,E=Array(A>1?A-1:0),R=1;R<A;R++)E[R-1]=arguments[R];return l.produce(g,(function(I){var pt;return(pt=o).call.apply(pt,[x,I].concat(E))}))}}var c;if(typeof o!="function"&&te(6),s!==void 0&&typeof s!="function"&&te(7),pe(n)){var u=ic(i),d=No(i,n,void 0),p=!0;try{c=o(d),p=!1}finally{p?Qi(u):Mo(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Io(u,s),Lo(g,u)}),(function(g){throw Qi(u),g})):(Io(u,s),Lo(c,u))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===fc&&(c=void 0),i.D&&Ho(c,!0),s){var h=[],m=[];Se("Patches").M(n,c,h,m),s(h,m)}return c}te(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(d))}))};var s,a,l=i.produce(n,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){pe(r)||te(8),Oe(r)&&(r=ip(r));var i=ic(this),n=No(this,r,void 0);return n[G].C=!0,Mo(i),n},t.finishDraft=function(r,i){var n=r&&r[G],o=n.A;return Io(o,i),Lo(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!lc&&te(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=Se("Patches").$;return Oe(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),Ht=new ap,lp=Ht.produce,am=Ht.produceWithPatches.bind(Ht),lm=Ht.setAutoFreeze.bind(Ht),cm=Ht.setUseProxies.bind(Ht),um=Ht.applyPatches.bind(Ht),dm=Ht.createDraft.bind(Ht),pm=Ht.finishDraft.bind(Ht),en=lp;function dr(e){"@babel/helpers - typeof";return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(e)}function mc(e,t){if(dr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(dr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gc(e){var t=mc(e,"string");return dr(t)=="symbol"?t:t+""}function vc(e,t,r){return(t=gc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yc(Object(r),!0).forEach(function(i){vc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yc(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function At(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var bc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Wo=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+Wo(),REPLACE:"@@redux/REPLACE"+Wo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wo()}};function cp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ko(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(At(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(At(1));return r(Ko)(e,t)}if(typeof e!="function")throw new Error(At(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(At(3));return o}function d(g){if(typeof g!="function")throw new Error(At(4));if(l)throw new Error(At(5));var x=!0;return c(),a.push(g),function(){if(x){if(l)throw new Error(At(6));x=!1,c();var E=a.indexOf(g);a.splice(E,1),s=null}}}function p(g){if(!cp(g))throw new Error(At(7));if(typeof g.type>"u")throw new Error(At(8));if(l)throw new Error(At(9));try{l=!0,o=n(o,g)}finally{l=!1}for(var x=s=a,A=0;A<x.length;A++){var E=x[A];E()}return g}function h(g){if(typeof g!="function")throw new Error(At(10));n=g,p({type:rn.REPLACE})}function m(){var g,x=d;return g={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(At(11));function R(){E.next&&E.next(u())}R();var I=x(R);return{unsubscribe:I}}},g[bc]=function(){return this},g}return p({type:rn.INIT}),i={dispatch:p,subscribe:d,getState:u,replaceReducer:h},i[bc]=m,i}function up(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:rn.INIT});if(typeof i>"u")throw new Error(At(12));if(typeof r(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(At(13))})}function xc(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{up(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var g=o[m],x=r[g],A=c[g],E=x(A,u);if(typeof E>"u"){var R=u&&u.type;throw new Error(At(14))}h[g]=E,p=p||E!==A}return p=p||o.length!==Object.keys(c).length,p?h:c}}function Hr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Sc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(At(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=Hr.apply(void 0,a)(n.dispatch),zo(zo({},n),{},{dispatch:o})}}}function Ac(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Ec=Ac();Ec.withExtraArgument=Ac;var Go=Ec;var Rc=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),dp=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},jr=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},pp=Object.defineProperty,fp=Object.defineProperties,hp=Object.getOwnPropertyDescriptors,Tc=Object.getOwnPropertySymbols,mp=Object.prototype.hasOwnProperty,gp=Object.prototype.propertyIsEnumerable,wc=function(e,t,r){return t in e?pp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},We=function(e,t){for(var r in t||(t={}))mp.call(t,r)&&wc(e,r,t[r]);if(Tc)for(var i=0,n=Tc(t);i<n.length;i++){var r=n[i];gp.call(t,r)&&wc(e,r,t[r])}return e},qo=function(e,t){return fp(e,hp(t))},vp=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var yp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Hr:Hr.apply(null,arguments)},Im=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function bp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function Ke(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return We(We({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var xp=(function(e){Rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,jr([void 0],r[0].concat(this)))):new(t.bind.apply(t,jr([void 0],r.concat(this))))},t})(Array),Sp=(function(e){Rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,jr([void 0],r[0].concat(this)))):new(t.bind.apply(t,jr([void 0],r.concat(this))))},t})(Array);function Zo(e){return pe(e)?en(e,function(){}):e}function Ap(e){return typeof e=="boolean"}function Ep(){return function(t){return Tp(t)}}function Tp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new xp;if(r&&(Ap(r)?c.push(Go):c.push(Go.withExtraArgument(r.extraArgument))),0){if(n)var u;if(s)var d;if(l)var p}return c}var Yo=!0;function Oc(e){var t=Ep(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof n=="function")h=n;else if(bp(n))h=xc(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!Yo&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yo&&m.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=Sc.apply(void 0,m),x=Hr;l&&(x=yp(We({trace:!Yo},typeof l=="object"&&l)));var A=new Sp(g),E=A;Array.isArray(p)?E=jr([g],p):typeof p=="function"&&(E=p(A));var R=x.apply(void 0,E);return Ko(h,u,R)}function Ic(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function wp(e){return typeof e=="function"}function Cp(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?Ic(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(wp(e))l=function(){return Zo(e())};else{var c=Zo(e);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=jr([o[p.type]],s.filter(function(m){var g=m.matcher;return g(p)}).map(function(m){var g=m.reducer;return g}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,g){if(g)if(Oe(m)){var x=m,A=g(x,p);return A===void 0?m:A}else{if(pe(m))return en(m,function(E){return g(E,p)});var A=g(m,p);if(A===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return m},d)}return u.getInitialState=l,u}function _p(e,t){return e+"/"+t}function Lc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Zo(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(u){var d=i[u],p=_p(t,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?Ke(p,m):Ke(p)});function l(){var u=typeof e.extraReducers=="function"?Ic(e.extraReducers):[e.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,g=u[2],x=g===void 0?void 0:g,A=We(We({},p),s);return Cp(r,function(E){for(var R in A)E.addCase(R,A[R]);for(var I=0,pt=m;I<pt.length;I++){var st=pt[I];E.addMatcher(st.matcher,st.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:t,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Rp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Op=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Rp[Math.random()*64|0];return t},Ip=["name","message","stack","code"],Xo=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Cc=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Lp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Ip;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},Dm=(function(){function e(t,r,i){var n=Ke(t+"/fulfilled",function(u,d,p,h){return{payload:u,meta:qo(We({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=Ke(t+"/pending",function(u,d,p){return{payload:void 0,meta:qo(We({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Ke(t+"/rejected",function(u,d,p,h,m){return{payload:h,error:(i&&i.serializeError||Lp)(u||"Rejected"),meta:qo(We({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=i?.idGenerator?i.idGenerator(u):Op(),g=new l,x,A=!1;function E(I){x=I,g.abort()}var R=(function(){return vp(this,null,function(){var I,pt,st,ke,ro,De,Ut;return dp(this,function(Kt){switch(Kt.label){case 0:return Kt.trys.push([0,4,,5]),ke=(I=i?.condition)==null?void 0:I.call(i,u,{getState:p,extra:h}),kp(ke)?[4,ke]:[3,2];case 1:ke=Kt.sent(),Kt.label=2;case 2:if(ke===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,ro=new Promise(function(Ft,Je){return g.signal.addEventListener("abort",function(){return Je({name:"AbortError",message:x||"Aborted"})})}),d(o(m,u,(pt=i?.getPendingMeta)==null?void 0:pt.call(i,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([ro,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:g.signal,abort:E,rejectWithValue:function(Ft,Je){return new Xo(Ft,Je)},fulfillWithValue:function(Ft,Je){return new Cc(Ft,Je)}})).then(function(Ft){if(Ft instanceof Xo)throw Ft;return Ft instanceof Cc?n(Ft.payload,m,u,Ft.meta):n(Ft,m,u)})])];case 3:return st=Kt.sent(),[3,5];case 4:return De=Kt.sent(),st=De instanceof Xo?s(null,m,u,De.payload,De.meta):s(De,m,u),[3,5];case 5:return Ut=i&&!i.dispatchConditionRejection&&s.match(st)&&st.meta.condition,Ut||d(st),[2,st]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:u,unwrap:function(){return R.then(Pp)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Pp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pc="listener",kc="completed",Dc="cancelled",Mm="task-"+Dc,Nm="task-"+kc,$m=Pc+"-"+Dc,Um=Pc+"-"+kc;var Qo="listenerMiddleware";var Fm=Ke(Qo+"/add"),Bm=Ke(Qo+"/removeAll"),Hm=Ke(Qo+"/remove");var _c,jm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(_c||(_c=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Dp=function(e){return function(t){setTimeout(t,e)}},Vm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Dp(10);pc();var Mp=Ki(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),nn=class extends Mp(Object){};window.ftReduxStores||(window.ftReduxStores={});var Mc=class e extends nn{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(Zi(o))return o;if(n==null)return;let s=Lc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=Oc({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=fi(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Gi;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var on=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var sn=f(b()),Np="ft-app-info",Ie=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ie.eventName="authentication-change";var bi=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};bi.eventName="ui-locale-changed";var $p={session:(e,t)=>{(0,sn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>S.dispatchEvent(new Ie(t.payload)),0))}},S=sn.FtReduxStore.get({name:Np,reducers:$p,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],availableContentLocales:[],defaultLocales:void 0,searchInAllLanguagesAllowed:!1,searchLanguageSetsUiLanguage:!1,uiLanguageSetsSearchLanguage:!1,uiLanguageSetsReaderLanguage:!1,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Nc=f(b()),an=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},vg=(0,Nc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(S)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>on.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return an([(0,Jo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),an([(0,Jo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),an([Oo({store:S.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),an([Oo({store:S.name})],t.prototype,"uiLocale",void 0),t});var pn=f(b());var ts=f(b());var pr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=S.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=S.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var Vr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:pr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):pr.await()}};var Et=class extends Vr{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new ts.CacheRegistry,this.cache=t?n.commonCache:new ts.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var ln=class extends Et{async listMySearches(){let{session:t}=S.getState();return Ce(t,z.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var cn=class extends Et{async listMyBookmarks(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var un=class extends Et{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=S.getState().session;return!!t?.sessionAuthenticated}};var dn=class extends Et{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=S.getState().session;return!!t?.sessionAuthenticated}};var Up="ft-user-assets",Fp={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(Xt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;rs(e,r,[...es(e,r),n]),$c(e,r,1,i),Uc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;rs(e,r,es(e,r).map(n=>n.id===i.id?i:n)),Uc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;rs(e,r,es(e,r).filter(o=>o.id!==n)),$c(e,r,-1,i)}},Fc={[Xt.SEARCHES]:"savedSearches",[Xt.BOOKMARKS]:"bookmarks",[Xt.BOOKS]:void 0,[Xt.COLLECTIONS]:void 0},es=(e,t)=>{var r;let i=Fc[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},rs=(e,t,r)=>{let i=Fc[t];i&&(e[i]=r)},$c=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===Xt.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Uc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Ot=pn.FtReduxStore.get({name:Up,reducers:Fp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Xt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),is=class{constructor(t=new un,r=new dn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new cn,this.savedSearchesService=new ln,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=S.getState();(0,pn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ot.actions.clearAssetCount(),Ot.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ot.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ot.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ot.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ot.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ot.getState().assetCounts.allAsset[t]!==r.count&&Ot.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ot.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ot.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ot.getState().assetCounts.bookmarkByMap).length!==0;t===Xt.BOOKMARKS&&r&&Ot.actions.clearBookmarkCountByMap(),Ot.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ot.actions.bookmarks(r)}}},ns=new is;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ns);var os=class{addCommand(t,r=!1){S.commands.add(t,r)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new os;var ee=f(b());var Bc,zr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Bp=Symbol("clearAfterUnitTest"),fn=class extends(0,ee.withEventBus)(Et){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Bc]=()=>{this.defaultMessages={},this.cache=new ee.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=S.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,ee.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new ee.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof ee.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new zr({loadedContexts:t})),this.dispatchEvent(new zr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new zr({loadedContexts:[t]})),this.dispatchEvent(new zr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,ee.delay)(0).then(()=>i()).catch(()=>null)))}};Bc=Bp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Wr=window.FluidTopicsI18nService,hn=window.FluidTopicsCustomI18nService;var Hc=f(b()),ss=class{highlightHtml(t,r,i){(0,Hc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new ss;var jc=f(b());var as=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return jc.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:S.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new as;var Vc=f(b());var xi=class{static get(t,r){var i,n;let o=S.getState(),{lang:s,region:a}=(n=(i=o.defaultLocales)===null||i===void 0?void 0:i.defaultContentLocale)!==null&&n!==void 0?n:{lang:"en",region:"US"};return new Vc.SearchPlaceConverter(o.baseUrl,t??20,o.searchInAllLanguagesAllowed,r??`${s}-${a}`)}};var mn=class extends Et{async sendDocumentStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send khub.search event")}async sendDocumentSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.search event")}async sendSearchPageSelectEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(t){let r;switch(t.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+t.editorialType)}return{id:t.id,title:t.title,type:r,metadata:t.metadata}}sortEventArrays(t){let r=Object.entries(t).map(([i,n])=>Array.isArray(n)?[i,n.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(t,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(t),async()=>(await this.awaitApi).sendEvents(t).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var ls=class{urlToSearchRequest(t){return xi.get().parse(t)}searchRequestToUrl(t){return xi.get().serialize(t)}};window.FluidTopicsUrlService=new ls;var Le=f(b());var fr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};fr.eventName="change";var cs=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},zc=new cs;var gn=class e extends Le.WithEventBus{static build(){return new e(window.history,zc,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Le.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new fr(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(fr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(fr.eventName,t)}currentItem(){return(0,Le.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Le.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Le.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Le.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Kr=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=S.getState().session;return!!t?.sessionAuthenticated}};var Wc=f(k());var Kc=Wc.css`
|
|
572
|
-
`;var Yc=f(k()),jt=f(F()),gr=f(b());var hr=f(b());function Gc(e,t){let{authenticationRequired:r,session:i}=S.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var vn=class extends Vr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var us=class e extends hr.FtStateManager{static build(t){return new e(S,t)}constructor(t,r){super(),this.store=t,this.cache=new hr.CacheRegistry,this.withManualResources=!0,this.
|
|
571
|
+
`;var gl=["top","right","bottom","left"],ml=["start","end"],So=gl.reduce((e,t)=>e.concat(t,t+"-"+ml[0],t+"-"+ml[1]),[]),ai=Math.min,Be=Math.max,li=Math.round;var de=e=>({x:e,y:e}),Id={left:"right",right:"left",bottom:"top",top:"bottom"};function vl(e,t,r){return Be(e,ai(t,r))}function $i(e,t){return typeof e=="function"?e(t):e}function ci(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function Ao(e){return e==="x"?"y":"x"}function Eo(e){return e==="y"?"height":"width"}function Ui(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function To(e){return Ao(Ui(e))}function yl(e,t,r){r===void 0&&(r=!1);let i=He(e),n=To(e),o=Eo(n),s=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=xo(s)),[s,xo(s)]}function bl(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}function xo(e){let t=ci(e);return Id[t]+e.slice(t.length)}function Pd(e){var t,r,i,n;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}}function xl(e){return typeof e!="number"?Pd(e):{top:e,right:e,bottom:e,left:e}}function nr(e){let{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function Sl(e,t,r){let{reference:i,floating:n}=e,o=Ui(t),s=To(t),a=Eo(s),l=ci(t),c=o==="y",u=i.x+i.width/2-n.width/2,d=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2,h;switch(l){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-n.width,y:d};break;default:h={x:i.x,y:i.y}}let m=He(t);return m&&(h[s]+=p*(m==="end"?1:-1)*(r&&c?-1:1)),h}async function Al(e,t){var r;t===void 0&&(t={});let{x:i,y:n,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=$i(t,e),m=xl(h),x=a[p?d==="floating"?"reference":"floating":d],A=nr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),E=d==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),I=await(o.isElement==null?void 0:o.isElement(R))&&await(o.getScale==null?void 0:o.getScale(R))||{x:1,y:1},pt=nr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:E,offsetParent:R,strategy:l}):E);return{top:(A.top-pt.top+m.top)/I.y,bottom:(pt.bottom-A.bottom+m.bottom)/I.y,left:(A.left-pt.left+m.left)/I.x,right:(pt.right-A.right+m.right)/I.x}}var Ld=50,El=async(e,t,r)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:Al},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:d}=Sl(c,i,l),p=i,h=0,m={};for(let g=0;g<o.length;g++){let x=o[g];if(!x)continue;let{name:A,fn:E}=x,{x:R,y:I,data:pt,reset:st}=await E({x:u,y:d,initialPlacement:i,placement:p,strategy:n,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=R??u,d=I??d,m[A]={...m[A],...pt},st&&h<Ld&&(h++,typeof st=="object"&&(st.placement&&(p=st.placement),st.rects&&(c=st.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):st.rects),{x:u,y:d}=Sl(c,p,l)),g=-1)}return{x:u,y:d,placement:p,strategy:n,middlewareData:m}};function kd(e,t,r){return(e?[...r.filter(n=>He(n)===e),...r.filter(n=>He(n)!==e)]:r.filter(n=>ci(n)===n)).filter(n=>e?He(n)===e||(t?bl(n)!==n:!1):!0)}var Tl=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,i,n;let{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:p=So,autoAlignment:h=!0,...m}=$i(e,t),g=d!==void 0||p===So?kd(d||null,h,p):p,x=((r=s.autoPlacement)==null?void 0:r.index)||0,A=g[x];if(A==null)return{};if(a!==A)return{reset:{placement:g[0]}};let E=await l.detectOverflow(t,m),R=yl(A,o,await(l.isRTL==null?void 0:l.isRTL(c.floating))),I=[E[ci(A)],E[R[0]],E[R[1]]],pt=[...((i=s.autoPlacement)==null?void 0:i.overflows)||[],{placement:A,overflows:I}],st=g[x+1];if(st)return{data:{index:x+1,overflows:pt},reset:{placement:st}};let ke=pt.map(Ut=>{let Kt=He(Ut.placement);return[Ut.placement,Kt&&u?Ut.overflows.slice(0,2).reduce((Ft,Je)=>Ft+Je,0):Ut.overflows[0],Ut.overflows]}).sort((Ut,Kt)=>Ut[1]-Kt[1]),De=((n=ke.filter(Ut=>Ut[2].slice(0,He(Ut[0])?2:3).every(Kt=>Kt<=0))[0])==null?void 0:n[0])||ke[0][0];return De!==a?{data:{index:x+1,overflows:pt},reset:{placement:De}}:{}}}};var wl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:i,placement:n,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:E=>{let{x:R,y:I}=E;return{x:R,y:I}}},...c}=$i(e,t),u={x:r,y:i},d=await o.detectOverflow(t,c),p=Ui(n),h=Ao(p),m=u[h],g=u[p],x=(E,R)=>vl(R+d[E==="y"?"top":"left"],R,R-d[E==="y"?"bottom":"right"]);s&&(m=x(h,m)),a&&(g=x(p,g));let A=l.fn({...t,[h]:m,[p]:g});return{...A,data:{x:A.x-r,y:A.y-i,enabled:{[h]:s,[p]:a}}}}}};function Bi(){return typeof window<"u"}function sr(e){return _l(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(_l(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _l(e){return Bi()?e instanceof Node||e instanceof kt(e).Node:!1}function Qt(e){return Bi()?e instanceof Element||e instanceof kt(e).Element:!1}function be(e){return Bi()?e instanceof HTMLElement||e instanceof kt(e).HTMLElement:!1}function Cl(e){return!Bi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot}function kr(e){let{overflow:t,overflowX:r,overflowY:i,display:n}=Jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&n!=="inline"&&n!=="contents"}function Rl(e){return/^(table|td|th)$/.test(sr(e))}function ui(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Dd=/transform|translate|scale|rotate|perspective|filter/,Md=/paint|layout|strict|content/,or=e=>!!e&&e!=="none",wo;function Dr(e){let t=Qt(e)?Jt(e):e;return or(t.transform)||or(t.translate)||or(t.scale)||or(t.rotate)||or(t.perspective)||!Hi()&&(or(t.backdropFilter)||or(t.filter))||Dd.test(t.willChange||"")||Md.test(t.contain||"")}function Ol(e){let t=Re(e);for(;be(t)&&!ar(t);){if(Dr(t))return t;if(ui(t))return null;t=Re(t)}return null}function Hi(){return wo==null&&(wo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wo}function ar(e){return/^(html|body|#document)$/.test(sr(e))}function Jt(e){return kt(e).getComputedStyle(e)}function di(e){return Qt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Re(e){if(sr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Cl(e)&&e.host||ye(e);return Cl(t)?t.host:t}function Il(e){let t=Re(e);return ar(t)?(e.ownerDocument||e).body:be(t)&&kr(t)?t:Il(t)}function Fi(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=Il(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),s=kt(n);if(o){let a=ji(s);return t.concat(s,s.visualViewport||[],kr(n)?n:[],a&&r?Fi(a):[])}else return t.concat(n,Fi(n,[],r))}function ji(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dl(e){let t=Jt(e),r=parseFloat(t.width)||0,i=parseFloat(t.height)||0,n=be(e),o=n?e.offsetWidth:r,s=n?e.offsetHeight:i,a=li(r)!==o||li(i)!==s;return a&&(r=o,i=s),{width:r,height:i,$:a}}function Ml(e){return Qt(e)?e:e.contextElement}function Mr(e){let t=Ml(e);if(!be(t))return de(1);let r=t.getBoundingClientRect(),{width:i,height:n,$:o}=Dl(t),s=(o?li(r.width):r.width)/i,a=(o?li(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Nd=de(0);function Nl(e){let t=kt(e);return!Hi()||!t.visualViewport?Nd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $d(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==kt(e)?!1:t}function pi(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=Ml(e),s=de(1);t&&(i?Qt(i)&&(s=Mr(i)):s=Mr(e));let a=$d(o,r,i)?Nl(o):de(0),l=(n.left+a.x)/s.x,c=(n.top+a.y)/s.y,u=n.width/s.x,d=n.height/s.y;if(o){let p=kt(o),h=i&&Qt(i)?kt(i):i,m=p,g=ji(m);for(;g&&i&&h!==m;){let x=Mr(g),A=g.getBoundingClientRect(),E=Jt(g),R=A.left+(g.clientLeft+parseFloat(E.paddingLeft))*x.x,I=A.top+(g.clientTop+parseFloat(E.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=R,c+=I,m=kt(g),g=ji(m)}}return nr({width:u,height:d,x:l,y:c})}function Vi(e,t){let r=di(e).scrollLeft;return t?t.left+r:pi(ye(e)).left+r}function $l(e,t){let r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-Vi(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function Ud(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e,o=n==="fixed",s=ye(i),a=t?ui(t.floating):!1;if(i===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=de(1),u=de(0),d=be(i);if((d||!d&&!o)&&((sr(i)!=="body"||kr(s))&&(l=di(i)),d)){let h=pi(i);c=Mr(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}let p=s&&!d&&!o?$l(s,l):de(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Fd(e){return Array.from(e.getClientRects())}function Bd(e){let t=ye(e),r=di(e),i=e.ownerDocument.body,n=Be(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Be(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),s=-r.scrollLeft+Vi(e),a=-r.scrollTop;return Jt(i).direction==="rtl"&&(s+=Be(t.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:a}}var Pl=25;function Hd(e,t){let r=kt(e),i=ye(e),n=r.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){o=n.width,s=n.height;let u=Hi();(!u||u&&t==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}let c=Vi(i);if(c<=0){let u=i.ownerDocument,d=u.body,p=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-h);m<=Pl&&(o-=m)}else c<=Pl&&(o+=c);return{width:o,height:s,x:a,y:l}}function jd(e,t){let r=pi(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=be(e)?Mr(e):de(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=n*o.x,c=i*o.y;return{width:s,height:a,x:l,y:c}}function Ll(e,t,r){let i;if(t==="viewport")i=Hd(e,r);else if(t==="document")i=Bd(ye(e));else if(Qt(t))i=jd(t,r);else{let n=Nl(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nr(i)}function Ul(e,t){let r=Re(e);return r===t||!Qt(r)||ar(r)?!1:Jt(r).position==="fixed"||Ul(r,t)}function Vd(e,t){let r=t.get(e);if(r)return r;let i=Fi(e,[],!1).filter(a=>Qt(a)&&sr(a)!=="body"),n=null,o=Jt(e).position==="fixed",s=o?Re(e):e;for(;Qt(s)&&!ar(s);){let a=Jt(s),l=Dr(s);!l&&a.position==="fixed"&&(n=null),(o?!l&&!n:!l&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||kr(s)&&!l&&Ul(e,s))?i=i.filter(u=>u!==s):n=a,s=Re(s)}return t.set(e,i),i}function zd(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e,s=[...r==="clippingAncestors"?ui(t)?[]:Vd(t,this._c):[].concat(r),i],a=Ll(t,s[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let p=1;p<s.length;p++){let h=Ll(t,s[p],n);l=Be(h.top,l),c=ai(h.right,c),u=ai(h.bottom,u),d=Be(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Wd(e){let{width:t,height:r}=Dl(e);return{width:t,height:r}}function Kd(e,t,r){let i=be(t),n=ye(t),o=r==="fixed",s=pi(e,!0,o,t),a={scrollLeft:0,scrollTop:0},l=de(0);function c(){l.x=Vi(n)}if(i||!i&&!o)if((sr(t)!=="body"||kr(n))&&(a=di(t)),i){let h=pi(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else n&&c();o&&!i&&n&&c();let u=n&&!i&&!o?$l(n,a):de(0),d=s.left+a.scrollLeft-l.x-u.x,p=s.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:s.width,height:s.height}}function Co(e){return Jt(e).position==="static"}function kl(e,t){if(!be(e)||Jt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ye(e)===r&&(r=r.ownerDocument.body),r}function Fl(e,t){let r=kt(e);if(ui(e))return r;if(!be(e)){let n=Re(e);for(;n&&!ar(n);){if(Qt(n)&&!Co(n))return n;n=Re(n)}return r}let i=kl(e,t);for(;i&&Rl(i)&&Co(i);)i=kl(i,t);return i&&ar(i)&&Co(i)&&!Dr(i)?r:i||Ol(e)||r}var Gd=async function(e){let t=this.getOffsetParent||Fl,r=this.getDimensions,i=await r(e.floating);return{reference:Kd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function qd(e){return Jt(e).direction==="rtl"}var zi={convertOffsetParentRelativeRectToViewportRelativeRect:Ud,getDocumentElement:ye,getClippingRect:zd,getOffsetParent:Fl,getElementRects:Gd,getClientRects:Fd,getDimensions:Wd,getScale:Mr,isElement:Qt,isRTL:qd};var Bl=Tl,Hl=wl;var jl=(e,t,r)=>{let i=new Map,n={platform:zi,...r},o={...n.platform,_c:i};return El(e,t,{...n,platform:o})};function Vl(e){return Yd(e)}function _o(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function Yd(e){for(let t=e;t;t=_o(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=_o(e);t;t=_o(t)){if(!(t instanceof Element))continue;let r=getComputedStyle(t);if(r.display!=="contents"&&(r.position!=="static"||Dr(r)||t.tagName==="BODY"))return t}return null}async function zl(e,t,r){let i;return typeof r=="object"?i=r:i={placement:r},jl(e,t,{strategy:i.strategy,platform:{...zi,getOffsetParent:n=>zi.getOffsetParent(n,Vl)},middleware:[Hl({crossAxis:!0}),Bl({allowedPlacements:[i.placement]})]})}var qr=f(b());var Jo=f(F());var Wl=f(F(),1);var Ro=e=>t=>{window.customElements.get(e)||window.customElements.define(e,t)};function Kl(e,t){return(0,Wl.property)({type:Object,converter:{fromAttribute:r=>{if(r==null)return fi(e);try{return JSON.parse(r)}catch{return fi(e)}},toAttribute:r=>JSON.stringify(r)},hasChanged:hi,...t??{}})}function Xd(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let r,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!Wi(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Wi(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();let n=s=>Object.keys(s).filter(a=>s[a]!=null),o=n(e);if(r=o.length,r!==n(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){let s=o[i];if(!Wi(e[s],t[s]))return!1}return!0}return e!==e&&t!==t||e==null&&t==null}function Wi(e,t){try{return Xd(e,t)}catch{return!1}}function hi(e,t){return!Wi(e,t)}function fi(e){return typeof window.structuredClone=="function"?structuredClone(e):e!=null?JSON.parse(JSON.stringify(e)):e}function Ki(e,t){let r=i=>i[e]===!0;return i=>{if(r(i))return i;let n=t(i);return n[e]=!0,n}}var Gl=f(F(),1);var Oo=e=>{let t=e??{};return(r,i)=>{var n;let o={hasChanged:hi,attribute:!1,...t};(0,Gl.property)(o)(r,i);let s=r.constructor;s.reduxProperties=new Map(s.reduxProperties),s.reduxProperties.set(i,{selector:(n=t.selector)!==null&&n!==void 0?n:(a=>a[i]),store:t.store})}};var Gi=class{constructor(){this.queue=[]}add(t,r=!1){r&&this.clear(t.type),this.queue.push(t)}consume(t){let r=this.queue.find(i=>i.type===t);return r&&(this.queue=this.queue.filter(i=>i!==r)),r}clear(t){typeof t=="string"?this.queue=this.queue.filter(r=>r.type!==t):this.queue=this.queue.filter(r=>!t.test(r.type))}};var lr=f(F(),1);var qi=class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,r){return this.callbacks=[t],this.debounce(r)}queue(t,r){return this.callbacks.push(t),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return this.promise==null&&(this.promise=new Promise((r,i)=>{this.resolvePromise=r,this.rejectPromise=i})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),t??this.timeout),this.promise}async runCallbacks(){var t,r;let i=[...this.callbacks];this.callbacks=[];let n=(t=this.rejectPromise)!==null&&t!==void 0?t:(()=>null),o=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of i)try{await s()}catch(a){n(a);return}o(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Yl=f(k(),1);var Yi=globalThis,Zd=Yi.ShadowRoot&&(Yi.ShadyCSS===void 0||Yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;var ql=(e,t)=>{if(Zd)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let i=document.createElement("style"),n=Yi.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,e.appendChild(i)}};var Xi=class extends Yl.LitElement{get scopedRegistryConstructor(){return this.constructor}createRenderRoot(){let t=this.scopedRegistryConstructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,t.defineScopedElements(t.elementDefinitions));let r={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(r);return ql(i,t.elementStyles),i}static canDefineScopedElement(t){return!!this.registry&&!this.registry.get(t)}static defineScopedElements(t){Object.entries(t).forEach(([r,i])=>this.defineScopedElement(r,i))}static defineScopedElement(t,r){Ro(t)(r),this.canDefineScopedElement(t)&&this.registry.define(t,r)}canDefineScopedElement(t){return this.scopedRegistryConstructor.canDefineScopedElement(t)}defineScopedElements(t){this.scopedRegistryConstructor.defineScopedElements(t)}defineScopedElement(t,r){this.scopedRegistryConstructor.defineScopedElement(t,r)}};function Xl(e,t,...r){var i;let n=e.querySelector(t);for(let o of r)n=(i=n?.shadowRoot)===null||i===void 0?void 0:i.querySelector(o);return n}var $r=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},tc,Zl=Symbol("constructorPrototype"),Ql=Symbol("constructorName"),ec=Symbol("exportpartsDebouncer"),Jl=Symbol("dynamicDependenciesLoaded"),Nr=class e extends CustomEvent{constructor(){super(e.eventName,{bubbles:!0})}};Nr.eventName="exportparts-updated";var xe=class extends Xi{constructor(){super(),this.useAdoptedStyleSheets=!0,this.adoptedCustomStyleSheet=new CSSStyleSheet,this[tc]=new qi(5),this.scheduleExportpartsUpdate=()=>{var t,r,i;(!((t=this.exportpartsPrefix)===null||t===void 0)&&t.trim()||(i=(r=this.exportpartsPrefixes)===null||r===void 0?void 0:r.length)!==null&&i!==void 0&&i)&&this[ec].run(()=>{var n,o;!((n=this.exportpartsPrefix)===null||n===void 0)&&n.trim()?this.setExportpartsAttribute([this.exportpartsPrefix]):this.exportpartsPrefixes!=null&&((o=this.exportpartsPrefixes)===null||o===void 0?void 0:o.length)>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)})},this[Ql]=this.constructor.name,this[Zl]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ql]&&Object.setPrototypeOf(this,this[Zl])}connectedCallback(){var t;super.connectedCallback();try{this.shadowRoot&&!this.shadowRoot.adoptedStyleSheets.includes(this.adoptedCustomStyleSheet)&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.adoptedCustomStyleSheet]),this.useAdoptedStyleSheets=!0}catch(i){this.useAdoptedStyleSheets=!1,console.error("Cannot use adopted stylesheets",i)}let r=this.constructor;r[Jl]||(r[Jl]=!0,this.importDynamicDependencies()),(t=this.shadowRoot)===null||t===void 0||t.addEventListener(Nr.eventName,this.scheduleExportpartsUpdate)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)===null||t===void 0||t.removeEventListener(Nr.eventName,this.scheduleExportpartsUpdate)}importDynamicDependencies(){}updated(t){super.updated(t),this.updateComplete.then(()=>{this.contentAvailableCallback(t),this.focusElementToFocus(t),this.applyCustomStylesheet(t),this.scheduleExportpartsUpdate(),t.has("exportparts")&&this.dispatchEvent(new Nr)})}contentAvailableCallback(t){}focusElementToFocus(t){if(t.has("elementToFocus")&&this.elementToFocus!=null){let{element:r,selector:i,shadowPath:n}=this.elementToFocus;if(i!=null){let o=[...n??[],i];r=Xl(this.shadowRoot,...o)}r?.focus(),window.FluidTopicsA11yHints.isKeyboardNavigation||r?.blur(),this.elementToFocus=void 0}}applyCustomStylesheet(t){var r,i,n;if(((i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll(".ft-lit-element--custom-stylesheet"))!==null&&i!==void 0?i:[]).forEach(o=>o.remove()),this.useAdoptedStyleSheets){if(t.has("customStylesheet"))try{this.adoptedCustomStyleSheet.replaceSync((n=this.customStylesheet)!==null&&n!==void 0?n:"")}catch(o){console.error(o,this.customStylesheet),this.useAdoptedStyleSheets=!1}}else if(this.customStylesheet){let o=document.createElement("style");o.classList.add("ft-lit-element--custom-stylesheet"),o.innerHTML=this.customStylesheet,this.shadowRoot.append(o)}}setExportpartsAttribute(t){var r,i,n,o,s,a;let l=p=>p!=null&&p.trim().length>0,c=t.filter(l).map(p=>p.trim());if(c.length===0){this.exportparts=void 0;return}let u=new Set;for(let p of(i=(r=this.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("[part],[exportparts]"))!==null&&i!==void 0?i:[]){let h=(o=(n=p.getAttribute("part"))===null||n===void 0?void 0:n.split(" "))!==null&&o!==void 0?o:[],m=(a=(s=p.getAttribute("exportparts"))===null||s===void 0?void 0:s.split(",").map(x=>x.split(":")[1]))!==null&&a!==void 0?a:[],g=[...h,...m].filter(l).map(x=>x.trim());for(let x of g)u.add(x)}if(u.size===0){this.exportparts=void 0;return}let d=[...u.values()].flatMap(p=>c.map(h=>`${p}:${h}--${p}`));this.exportparts=[...this.part,...d].join(", ")}};tc=ec;$r([(0,lr.property)()],xe.prototype,"exportpartsPrefix",void 0);$r([Kl([])],xe.prototype,"exportpartsPrefixes",void 0);$r([(0,lr.property)({reflect:!0})],xe.prototype,"exportparts",void 0);$r([(0,lr.property)()],xe.prototype,"customStylesheet",void 0);$r([(0,lr.property)()],xe.prototype,"elementToFocus",void 0);$r([(0,lr.state)()],xe.prototype,"useAdoptedStyleSheets",void 0);function Zi(e){var t;return(t=e?.isFtReduxStore)!==null&&t!==void 0?t:!1}var mi=Symbol("internalReduxEventsUnsubscribers"),je=Symbol("internalStoresUnsubscribers"),cr=Symbol("internalStores"),Qd=Ki(Symbol("withRedux"),function(e){var t,r,i;class n extends e{constructor(){super(...arguments),this[t]=new Map,this[r]=new Map,this[i]=new Map}get reduxConstructor(){return this.constructor}willUpdate(s){super.willUpdate(s),[...this.reduxConstructor.reduxReactiveProperties].some(a=>s.has(a))&&this.updateFromStores()}getUnnamedStore(){if(this[cr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[cr].values()][0]}getStore(s){return s==null?this.getUnnamedStore():this[cr].get(s)}addStore(s,a){var l;a=(l=a??s.name)!==null&&l!==void 0?l:"default-store",this.unsubscribeFromStore(a),this[cr].set(a,s),this.subscribeToStore(a,s),this.updateFromStores()}removeStore(s){let a=typeof s=="string"?s:s.name;this.unsubscribeFromStore(a),this[cr].delete(a)}setupStores(){this.unsubscribeFromStores(),this[cr].forEach((s,a)=>this.subscribeToStore(a,s)),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach((s,a)=>{let l=this.constructor.getPropertyOptions(a);if(!l?.attribute||!this.hasAttribute(typeof l?.attribute=="string"?l.attribute:a)){let c=this.getStore(s.store);c&&(s.store?this[je].has(s.store):this[je].size>0)&&(this[a]=s.selector(c.getState(),this))}})}subscribeToStore(s,a){var l;this[je].set(s,a.subscribe(()=>this.updateFromStores())),this[mi].set(s,[]),Zi(a)&&a.eventBus&&((l=this.reduxConstructor.reduxEventListeners)===null||l===void 0||l.forEach((c,u)=>{if(typeof this[u]=="function"&&(!c.store||a.name===c.store)){let d=p=>this[u](p);a.addEventListener(c.eventName,d),this[mi].get(s).push(()=>a.removeEventListener(c.eventName,d))}})),this.onStoreAvailable(s)}unsubscribeFromStores(){this[je].forEach((s,a)=>this.unsubscribeFromStore(a))}unsubscribeFromStore(s){var a;this[je].has(s)&&this[je].get(s)(),this[je].delete(s),(a=this[mi].get(s))===null||a===void 0||a.forEach(l=>l()),this[mi].delete(s)}onStoreAvailable(s){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}return t=je,r=cr,i=mi,n.reduxProperties=new Map,n.reduxReactiveProperties=new Set,n.reduxEventListeners=new Map,n}),rc=class extends Qd(xe){};function te(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(0)var n,o;throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(s){return"'"+s+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Oe(e){return!!e&&!!e[G]}function pe(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var n=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===sp})(e)||Array.isArray(e)||!!e[cc]||!!(!((t=e.constructor)===null||t===void 0)&&t[cc])||Uo(e)||Fo(e))}function ur(e,t,r){r===void 0&&(r=!1),Br(e)===0?(r?Object.keys:Fr)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,n){return t(n,i,e)}))}function Br(e){var t=e[G];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Uo(e)?2:Fo(e)?3:0}function Ur(e,t){return Br(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jd(e,t){return Br(e)===2?e.get(t):e[t]}function uc(e,t,r){var i=Br(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function dc(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Uo(e){return np&&e instanceof Map}function Fo(e){return op&&e instanceof Set}function Ve(e){return e.o||e.t}function Bo(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=hc(e);delete t[G];for(var r=Fr(t),i=0;i<r.length;i++){var n=r[i],o=t[n];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[n]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[n]})}return Object.create(Object.getPrototypeOf(e),t)}function Ho(e,t){return t===void 0&&(t=!1),jo(e)||Oe(e)||!pe(e)||(Br(e)>1&&(e.set=e.add=e.clear=e.delete=tp),Object.freeze(e),t&&ur(e,(function(r,i){return Ho(i,!0)}),!0)),e}function tp(){te(2)}function jo(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Se(e){var t=$o[e];return t||te(18,e),t}function ep(e,t){$o[e]||($o[e]=t)}function Do(){return vi}function Io(e,t){t&&(Se("Patches"),e.u=[],e.s=[],e.v=t)}function Qi(e){Mo(e),e.p.forEach(rp),e.p=null}function Mo(e){e===vi&&(vi=e.l)}function ic(e){return vi={p:[],l:vi,h:e,m:!0,_:0}}function rp(e){var t=e[G];t.i===0||t.i===1?t.j():t.g=!0}function Po(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Se("ES5").S(t,e,i),i?(r[G].P&&(Qi(t),te(4)),pe(e)&&(e=Ji(t,e),t.l||tn(t,e)),t.u&&Se("Patches").M(r[G].t,e,t.u,t.s)):e=Ji(t,r,[]),Qi(t),t.u&&t.v(t.u,t.s),e!==fc?e:void 0}function Ji(e,t,r){if(jo(t))return t;var i=t[G];if(!i)return ur(t,(function(a,l){return nc(e,i,t,a,l,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return tn(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var n=i.i===4||i.i===5?i.o=Bo(i.k):i.o,o=n,s=!1;i.i===3&&(o=new Set(n),n.clear(),s=!0),ur(o,(function(a,l){return nc(e,i,n,a,l,r,s)})),tn(e,n,!1),r&&e.u&&Se("Patches").N(i,r,e.u,e.s)}return i.o}function nc(e,t,r,i,n,o,s){if(Oe(n)){var a=Ji(e,n,o&&t&&t.i!==3&&!Ur(t.R,i)?o.concat(i):void 0);if(uc(r,i,a),!Oe(a))return;e.m=!1}else s&&r.add(n);if(pe(n)&&!jo(n)){if(!e.h.D&&e._<1)return;Ji(e,n),t&&t.A.l||tn(e,n)}}function tn(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Ho(t,r)}function Lo(e,t){var r=e[G];return(r?Ve(r):e)[t]}function oc(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function ze(e){e.P||(e.P=!0,e.l&&ze(e.l))}function ko(e){e.o||(e.o=Bo(e.t))}function No(e,t,r){var i=Uo(t)?Se("MapSet").F(t,r):Fo(t)?Se("MapSet").T(t,r):e.O?(function(n,o){var s=Array.isArray(n),a={i:s?1:0,A:o?o.A:Do(),P:!1,I:!1,R:{},l:o,t:n,k:null,o:null,j:null,C:!1},l=a,c=yi;s&&(l=[a],c=gi);var u=Proxy.revocable(l,c),d=u.revoke,p=u.proxy;return a.k=p,a.j=d,p})(t,r):Se("ES5").J(t,r);return(r?r.A:Do()).p.push(i),i}function ip(e){return Oe(e)||te(22,e),(function t(r){if(!pe(r))return r;var i,n=r[G],o=Br(r);if(n){if(!n.P&&(n.i<4||!Se("ES5").K(n)))return n.t;n.I=!0,i=sc(r,o),n.I=!1}else i=sc(r,o);return ur(i,(function(s,a){n&&Jd(n.t,s)===a||uc(i,s,t(a))})),o===3?new Set(i):i})(e)}function sc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Bo(e)}function pc(){function e(s,a){var l=o[s];return l?l.enumerable=a:o[s]=l={configurable:!0,enumerable:a,get:function(){var c=this[G];return yi.get(c,s)},set:function(c){var u=this[G];yi.set(u,s,c)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][G];if(!l.P)switch(l.i){case 5:i(l)&&ze(l);break;case 4:r(l)&&ze(l)}}}function r(s){for(var a=s.t,l=s.k,c=Fr(l),u=c.length-1;u>=0;u--){var d=c[u];if(d!==G){var p=a[d];if(p===void 0&&!Ur(a,d))return!0;var h=l[d],m=h&&h[G];if(m?m.t!==p:!dc(h,p))return!0}}var g=!!a[G];return c.length!==Fr(a).length+(g?0:1)}function i(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var c=0;c<a.length;c++)if(!a.hasOwnProperty(c))return!0;return!1}function n(s){s.g&&te(3,JSON.stringify(Ve(s)))}var o={};ep("ES5",{J:function(s,a){var l=Array.isArray(s),c=(function(d,p){if(d){for(var h=Array(p.length),m=0;m<p.length;m++)Object.defineProperty(h,""+m,e(m,!0));return h}var g=hc(p);delete g[G];for(var x=Fr(g),A=0;A<x.length;A++){var E=x[A];g[E]=e(E,d||!!g[E].enumerable)}return Object.create(Object.getPrototypeOf(p),g)})(l,s),u={i:l?5:4,A:a?a.A:Do(),P:!1,I:!1,R:{},l:a,t:s,k:c,o:null,g:!1,C:!1};return Object.defineProperty(c,G,{value:u,writable:!0}),c},S:function(s,a,l){l?Oe(a)&&a[G].A===s&&t(s.p):(s.u&&(function c(u){if(u&&typeof u=="object"){var d=u[G];if(d){var p=d.t,h=d.k,m=d.R,g=d.i;if(g===4)ur(h,(function(I){I!==G&&(p[I]!==void 0||Ur(p,I)?m[I]||c(h[I]):(m[I]=!0,ze(d)))})),ur(p,(function(I){h[I]!==void 0||Ur(h,I)||(m[I]=!1,ze(d))}));else if(g===5){if(i(d)&&(ze(d),m.length=!0),h.length<p.length)for(var x=h.length;x<p.length;x++)m[x]=!1;else for(var A=p.length;A<h.length;A++)m[A]=!0;for(var E=Math.min(h.length,p.length),R=0;R<E;R++)h.hasOwnProperty(R)||(m[R]=!0),m[R]===void 0&&c(h[R])}}}})(s.p[0]),t(s.p))},K:function(s){return s.i===4?r(s):i(s)}})}var ac,vi,Vo=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",np=typeof Map<"u",op=typeof Set<"u",lc=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",fc=Vo?Symbol.for("immer-nothing"):((ac={})["immer-nothing"]=!0,ac),cc=Vo?Symbol.for("immer-draftable"):"__$immer_draftable",G=Vo?Symbol.for("immer-state"):"__$immer_state";var sp=""+Object.prototype.constructor,Fr=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,hc=Object.getOwnPropertyDescriptors||function(e){var t={};return Fr(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},$o={},yi={get:function(e,t){if(t===G)return e;var r=Ve(e);if(!Ur(r,t))return(function(n,o,s){var a,l=oc(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(n.k):void 0})(e,r,t);var i=r[t];return e.I||!pe(i)?i:i===Lo(e.t,t)?(ko(e),e.o[t]=No(e.A.h,i,e)):i},has:function(e,t){return t in Ve(e)},ownKeys:function(e){return Reflect.ownKeys(Ve(e))},set:function(e,t,r){var i=oc(Ve(e),t);if(i?.set)return i.set.call(e.k,r),!0;if(!e.P){var n=Lo(Ve(e),t),o=n?.[G];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(dc(r,n)&&(r!==void 0||Ur(e.t,t)))return!0;ko(e),ze(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Lo(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ko(e),ze(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ve(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){te(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){te(12)}},gi={};ur(yi,(function(e,t){gi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),gi.deleteProperty=function(e,t){return gi.set.call(this,e,t,void 0)},gi.set=function(e,t,r){return yi.set.call(this,e[0],t,r,e[0])};var ap=(function(){function e(r){var i=this;this.O=lc,this.D=!0,this.produce=function(n,o,s){if(typeof n=="function"&&typeof o!="function"){var a=o;o=n;var l=i;return function(g){var x=this;g===void 0&&(g=a);for(var A=arguments.length,E=Array(A>1?A-1:0),R=1;R<A;R++)E[R-1]=arguments[R];return l.produce(g,(function(I){var pt;return(pt=o).call.apply(pt,[x,I].concat(E))}))}}var c;if(typeof o!="function"&&te(6),s!==void 0&&typeof s!="function"&&te(7),pe(n)){var u=ic(i),d=No(i,n,void 0),p=!0;try{c=o(d),p=!1}finally{p?Qi(u):Mo(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return Io(u,s),Po(g,u)}),(function(g){throw Qi(u),g})):(Io(u,s),Po(c,u))}if(!n||typeof n!="object"){if((c=o(n))===void 0&&(c=n),c===fc&&(c=void 0),i.D&&Ho(c,!0),s){var h=[],m=[];Se("Patches").M(n,c,h,m),s(h,m)}return c}te(21,n)},this.produceWithPatches=function(n,o){if(typeof n=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p<u;p++)d[p-1]=arguments[p];return i.produceWithPatches(c,(function(h){return n.apply(void 0,[h].concat(d))}))};var s,a,l=i.produce(n,o,(function(c,u){s=c,a=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,s,a]})):[l,s,a]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){pe(r)||te(8),Oe(r)&&(r=ip(r));var i=ic(this),n=No(this,r,void 0);return n[G].C=!0,Mo(i),n},t.finishDraft=function(r,i){var n=r&&r[G],o=n.A;return Io(o,i),Po(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!lc&&te(20),this.O=r},t.applyPatches=function(r,i){var n;for(n=i.length-1;n>=0;n--){var o=i[n];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}n>-1&&(i=i.slice(n+1));var s=Se("Patches").$;return Oe(r)?s(r,i):this.produce(r,(function(a){return s(a,i)}))},e})(),Ht=new ap,lp=Ht.produce,am=Ht.produceWithPatches.bind(Ht),lm=Ht.setAutoFreeze.bind(Ht),cm=Ht.setUseProxies.bind(Ht),um=Ht.applyPatches.bind(Ht),dm=Ht.createDraft.bind(Ht),pm=Ht.finishDraft.bind(Ht),en=lp;function dr(e){"@babel/helpers - typeof";return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(e)}function mc(e,t){if(dr(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(dr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gc(e){var t=mc(e,"string");return dr(t)=="symbol"?t:t+""}function vc(e,t,r){return(t=gc(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yc(Object(r),!0).forEach(function(i){vc(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yc(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function At(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var bc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Wo=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+Wo(),REPLACE:"@@redux/REPLACE"+Wo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Wo()}};function cp(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ko(e,t,r){var i;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(At(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(At(1));return r(Ko)(e,t)}if(typeof e!="function")throw new Error(At(2));var n=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(At(3));return o}function d(g){if(typeof g!="function")throw new Error(At(4));if(l)throw new Error(At(5));var x=!0;return c(),a.push(g),function(){if(x){if(l)throw new Error(At(6));x=!1,c();var E=a.indexOf(g);a.splice(E,1),s=null}}}function p(g){if(!cp(g))throw new Error(At(7));if(typeof g.type>"u")throw new Error(At(8));if(l)throw new Error(At(9));try{l=!0,o=n(o,g)}finally{l=!1}for(var x=s=a,A=0;A<x.length;A++){var E=x[A];E()}return g}function h(g){if(typeof g!="function")throw new Error(At(10));n=g,p({type:rn.REPLACE})}function m(){var g,x=d;return g={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(At(11));function R(){E.next&&E.next(u())}R();var I=x(R);return{unsubscribe:I}}},g[bc]=function(){return this},g}return p({type:rn.INIT}),i={dispatch:p,subscribe:d,getState:u,replaceReducer:h},i[bc]=m,i}function up(e){Object.keys(e).forEach(function(t){var r=e[t],i=r(void 0,{type:rn.INIT});if(typeof i>"u")throw new Error(At(12));if(typeof r(void 0,{type:rn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(At(13))})}function xc(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++){var n=t[i];typeof e[n]=="function"&&(r[n]=e[n])}var o=Object.keys(r),s,a;try{up(r)}catch(l){a=l}return function(c,u){if(c===void 0&&(c={}),a)throw a;if(0)var d;for(var p=!1,h={},m=0;m<o.length;m++){var g=o[m],x=r[g],A=c[g],E=x(A,u);if(typeof E>"u"){var R=u&&u.type;throw new Error(At(14))}h[g]=E,p=p||E!==A}return p=p||o.length!==Object.keys(c).length,p?h:c}}function Hr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(i){return i}:t.length===1?t[0]:t.reduce(function(i,n){return function(){return i(n.apply(void 0,arguments))}})}function Sc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(i){return function(){var n=i.apply(void 0,arguments),o=function(){throw new Error(At(15))},s={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=Hr.apply(void 0,a)(n.dispatch),zo(zo({},n),{},{dispatch:o})}}}function Ac(e){var t=function(i){var n=i.dispatch,o=i.getState;return function(s){return function(a){return typeof a=="function"?a(n,o,e):s(a)}}};return t}var Ec=Ac();Ec.withExtraArgument=Ac;var Go=Ec;var Rc=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=n[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),dp=function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(o=c[0]&2?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],n=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},jr=function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e},pp=Object.defineProperty,fp=Object.defineProperties,hp=Object.getOwnPropertyDescriptors,Tc=Object.getOwnPropertySymbols,mp=Object.prototype.hasOwnProperty,gp=Object.prototype.propertyIsEnumerable,wc=function(e,t,r){return t in e?pp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},We=function(e,t){for(var r in t||(t={}))mp.call(t,r)&&wc(e,r,t[r]);if(Tc)for(var i=0,n=Tc(t);i<n.length;i++){var r=n[i];gp.call(t,r)&&wc(e,r,t[r])}return e},qo=function(e,t){return fp(e,hp(t))},vp=function(e,t,r){return new Promise(function(i,n){var o=function(l){try{a(r.next(l))}catch(c){n(c)}},s=function(l){try{a(r.throw(l))}catch(c){n(c)}},a=function(l){return l.done?i(l.value):Promise.resolve(l.value).then(o,s)};a((r=r.apply(e,t)).next())})};var yp=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Hr:Hr.apply(null,arguments)},Im=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function bp(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function Ke(e,t){function r(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(t){var o=t.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return We(We({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:i[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(i){return i.type===e},r}var xp=(function(e){Rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,jr([void 0],r[0].concat(this)))):new(t.bind.apply(t,jr([void 0],r.concat(this))))},t})(Array),Sp=(function(e){Rc(t,e);function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=e.apply(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,jr([void 0],r[0].concat(this)))):new(t.bind.apply(t,jr([void 0],r.concat(this))))},t})(Array);function Zo(e){return pe(e)?en(e,function(){}):e}function Ap(e){return typeof e=="boolean"}function Ep(){return function(t){return Tp(t)}}function Tp(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t,i=e.immutableCheck,n=i===void 0?!0:i,o=e.serializableCheck,s=o===void 0?!0:o,a=e.actionCreatorCheck,l=a===void 0?!0:a,c=new xp;if(r&&(Ap(r)?c.push(Go):c.push(Go.withExtraArgument(r.extraArgument))),0){if(n)var u;if(s)var d;if(l)var p}return c}var Yo=!0;function Oc(e){var t=Ep(),r=e||{},i=r.reducer,n=i===void 0?void 0:i,o=r.middleware,s=o===void 0?t():o,a=r.devTools,l=a===void 0?!0:a,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,p=d===void 0?void 0:d,h;if(typeof n=="function")h=n;else if(bp(n))h=xc(n);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=s;if(typeof m=="function"&&(m=m(t),!Yo&&!Array.isArray(m)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Yo&&m.some(function(I){return typeof I!="function"}))throw new Error("each middleware provided to configureStore must be a function");var g=Sc.apply(void 0,m),x=Hr;l&&(x=yp(We({trace:!Yo},typeof l=="object"&&l)));var A=new Sp(g),E=A;Array.isArray(p)?E=jr([g],p):typeof p=="function"&&(E=p(A));var R=x.apply(void 0,E);return Ko(h,u,R)}function Ic(e){var t={},r=[],i,n={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,n},addMatcher:function(o,s){return r.push({matcher:o,reducer:s}),n},addDefaultCase:function(o){return i=o,n}};return e(n),[t,r,i]}function wp(e){return typeof e=="function"}function Cp(e,t,r,i){r===void 0&&(r=[]);var n=typeof t=="function"?Ic(t):[t,r,i],o=n[0],s=n[1],a=n[2],l;if(wp(e))l=function(){return Zo(e())};else{var c=Zo(e);l=function(){return c}}function u(d,p){d===void 0&&(d=l());var h=jr([o[p.type]],s.filter(function(m){var g=m.matcher;return g(p)}).map(function(m){var g=m.reducer;return g}));return h.filter(function(m){return!!m}).length===0&&(h=[a]),h.reduce(function(m,g){if(g)if(Oe(m)){var x=m,A=g(x,p);return A===void 0?m:A}else{if(pe(m))return en(m,function(E){return g(E,p)});var A=g(m,p);if(A===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}return m},d)}return u.getInitialState=l,u}function _p(e,t){return e+"/"+t}function Pc(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var r=typeof e.initialState=="function"?e.initialState:Zo(e.initialState),i=e.reducers||{},n=Object.keys(i),o={},s={},a={};n.forEach(function(u){var d=i[u],p=_p(t,u),h,m;"reducer"in d?(h=d.reducer,m=d.prepare):h=d,o[u]=h,s[p]=h,a[u]=m?Ke(p,m):Ke(p)});function l(){var u=typeof e.extraReducers=="function"?Ic(e.extraReducers):[e.extraReducers],d=u[0],p=d===void 0?{}:d,h=u[1],m=h===void 0?[]:h,g=u[2],x=g===void 0?void 0:g,A=We(We({},p),s);return Cp(r,function(E){for(var R in A)E.addCase(R,A[R]);for(var I=0,pt=m;I<pt.length;I++){var st=pt[I];E.addMatcher(st.matcher,st.reducer)}x&&E.addDefaultCase(x)})}var c;return{name:t,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:a,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var Rp="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Op=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=Rp[Math.random()*64|0];return t},Ip=["name","message","stack","code"],Xo=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Cc=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),Pp=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,i=Ip;r<i.length;r++){var n=i[r];typeof e[n]=="string"&&(t[n]=e[n])}return t}return{message:String(e)}},Dm=(function(){function e(t,r,i){var n=Ke(t+"/fulfilled",function(u,d,p,h){return{payload:u,meta:qo(We({},h||{}),{arg:p,requestId:d,requestStatus:"fulfilled"})}}),o=Ke(t+"/pending",function(u,d,p){return{payload:void 0,meta:qo(We({},p||{}),{arg:d,requestId:u,requestStatus:"pending"})}}),s=Ke(t+"/rejected",function(u,d,p,h,m){return{payload:h,error:(i&&i.serializeError||Pp)(u||"Rejected"),meta:qo(We({},m||{}),{arg:p,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:(function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u})();function c(u){return function(d,p,h){var m=i?.idGenerator?i.idGenerator(u):Op(),g=new l,x,A=!1;function E(I){x=I,g.abort()}var R=(function(){return vp(this,null,function(){var I,pt,st,ke,ro,De,Ut;return dp(this,function(Kt){switch(Kt.label){case 0:return Kt.trys.push([0,4,,5]),ke=(I=i?.condition)==null?void 0:I.call(i,u,{getState:p,extra:h}),kp(ke)?[4,ke]:[3,2];case 1:ke=Kt.sent(),Kt.label=2;case 2:if(ke===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return A=!0,ro=new Promise(function(Ft,Je){return g.signal.addEventListener("abort",function(){return Je({name:"AbortError",message:x||"Aborted"})})}),d(o(m,u,(pt=i?.getPendingMeta)==null?void 0:pt.call(i,{requestId:m,arg:u},{getState:p,extra:h}))),[4,Promise.race([ro,Promise.resolve(r(u,{dispatch:d,getState:p,extra:h,requestId:m,signal:g.signal,abort:E,rejectWithValue:function(Ft,Je){return new Xo(Ft,Je)},fulfillWithValue:function(Ft,Je){return new Cc(Ft,Je)}})).then(function(Ft){if(Ft instanceof Xo)throw Ft;return Ft instanceof Cc?n(Ft.payload,m,u,Ft.meta):n(Ft,m,u)})])];case 3:return st=Kt.sent(),[3,5];case 4:return De=Kt.sent(),st=De instanceof Xo?s(null,m,u,De.payload,De.meta):s(De,m,u),[3,5];case 5:return Ut=i&&!i.dispatchConditionRejection&&s.match(st)&&st.meta.condition,Ut||d(st),[2,st]}})})})();return Object.assign(R,{abort:E,requestId:m,arg:u,unwrap:function(){return R.then(Lp)}})}}return Object.assign(c,{pending:o,rejected:s,fulfilled:n,typePrefix:t})}return e.withTypes=function(){return e},e})();function Lp(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function kp(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Lc="listener",kc="completed",Dc="cancelled",Mm="task-"+Dc,Nm="task-"+kc,$m=Lc+"-"+Dc,Um=Lc+"-"+kc;var Qo="listenerMiddleware";var Fm=Ke(Qo+"/add"),Bm=Ke(Qo+"/removeAll"),Hm=Ke(Qo+"/remove");var _c,jm=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(_c||(_c=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Dp=function(e){return function(t){setTimeout(t,e)}},Vm=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Dp(10);pc();var Mp=Ki(Symbol("withEventBus"),function(e,t){return class extends e{constructor(){super(...arguments),this.eventBus=t??document.createElement("span")}addEventListener(r,i,n){this.eventBus.addEventListener(r,i,n)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,i,n){this.eventBus.removeEventListener(r,i,n)}}}),nn=class extends Mp(Object){};window.ftReduxStores||(window.ftReduxStores={});var Mc=class e extends nn{static get(t){var r;let i=typeof t=="string"?t:t.name,n=typeof t=="string"?void 0:t,o=window.ftReduxStores[i];if(Zi(o))return o;if(n==null)return;let s=Pc({...n,reducers:(r=n.reducers)!==null&&r!==void 0?r:{}}),a=Oc({reducer:(l,c)=>{if(c.type==="CLEAR_FT_REDUX_STORE"){let u=fi(s.getInitialState());for(let d of c.keeping)u[d]=(l??u)[d];return u}else if(typeof c.type=="string"&&c.type.startsWith("DEFAULT_VALUE_SETTER__"))return{...l,...c.overwrites};return s.reducer(l,c)}});return window.ftReduxStores[n.name]=new e(s,a,n.eventBus)}constructor(t,r,i){super(),this.reduxSlice=t,this.reduxStore=r,this.isFtReduxStore=!0,this.commands=new Gi;let n=o=>o!=null?JSON.parse(JSON.stringify(o)):o;this.actions=new Proxy(this.reduxSlice.actions,{get:(o,s,a)=>{let l=s,c=o[l];return c?(...u)=>{let d=c(...u.map(n));return this.reduxStore.dispatch(d),d}:u=>{this.setState({[l]:n(u)})}}}),this.eventBus=i??this.eventBus}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:[]})}clearKeeping(...t){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE",keeping:t})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_VALUE_SETTER__"+Object.keys(t).join("_"),overwrites:t})}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}};var on=class{static format(t,r,i,n,o){return window.moment?window.moment(t).locale(r).format(this.getMomentDateFormat(i,n,!!o)):this.getIntlDateTime(t,r,i,n,!!o)}static getMomentDateFormat(t,r,i){return i?"LT":t?r?"lll":"ll":r?"L LT":"L"}static getIntlDateTime(t,r,i,n,o){let s=typeof t=="string"?new Date(t):t,a=new Intl.DateTimeFormat(r,{dateStyle:i?"medium":"short"}).format(s),l=new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(s);return o?l:n?`${a} ${l}`:a}static getTimezoneAsString(){let t=i=>String(Math.floor(i)).padStart(2,"0"),r=new Date().getTimezoneOffset();return`${r<0?"+":"-"}${t(Math.abs(r)/60)}:${t(Math.abs(r)%60)}`}};var sn=f(b()),Np="ft-app-info",Ie=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};Ie.eventName="authentication-change";var bi=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:t})}};bi.eventName="ui-locale-changed";var $p={session:(e,t)=>{(0,sn.deepEqual)(e.session,t.payload)||(e.session=t.payload,setTimeout(()=>S.dispatchEvent(new Ie(t.payload)),0))}},S=sn.FtReduxStore.get({name:Np,reducers:$p,initialState:{baseUrl:void 0,apiIntegrationIdentifier:void 0,apiIntegrationAppVersion:void 0,uiLocale:document.documentElement.lang||"en-US",availableContentLocales:[],localesConfiguration:void 0,metadataConfiguration:void 0,privacyPolicyConfiguration:void 0,editorMode:!1,noCustom:!1,noCustomComponent:!1,session:void 0,openExternalDocumentInNewTab:!1,navigatorOnline:!0,forcedOffline:!1,authenticationRequired:!1}});var Nc=f(b()),an=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},vg=(0,Nc.applyMixinOnce)(Symbol("withDateFormat"),function(e){class t extends e{constructor(...i){super(i),this.useLongDateFormat=!1,this.useDateTimeFormat=!1,this.metadataDescriptors=[],this.uiLocale="en-US",this.addStore(S)}dateFormatOptionsChanged(i){return i.has("metadataDescriptors")||i.has("useLongDateFormat")||i.has("useDateTimeFormat")||i.has("uiLocale")}getDateFormatter(i){var n,o;return((o=(n=this.metadataDescriptors.find(a=>a.key===i))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1)?a=>on.format(a,this.uiLocale,this.useLongDateFormat,this.useDateTimeFormat):void 0}}return an([(0,Jo.property)({type:Boolean})],t.prototype,"useLongDateFormat",void 0),an([(0,Jo.property)({type:Boolean})],t.prototype,"useDateTimeFormat",void 0),an([Oo({store:S.name,selector:r=>{var i,n;return(n=(i=r.metadataConfiguration)===null||i===void 0?void 0:i.descriptors)!==null&&n!==void 0?n:[]}})],t.prototype,"metadataDescriptors",void 0),an([Oo({store:S.name})],t.prototype,"uiLocale",void 0),t});var pn=f(b());var ts=f(b());var pr=class e{static get(t){let{baseUrl:r,apiIntegrationIdentifier:i}=S.getState(),n=t??i;if(r&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(r,n,!0)}static await(t){return new Promise(r=>{let i=e.get(t);if(i)r(i);else{let n=S.subscribe(()=>{i=e.get(t),i&&(n(),r(i))})}})}};var Vr=class{constructor(t){this.overrideApi=t}get api(){var t;return(t=this.overrideApi)!==null&&t!==void 0?t:pr.get()}get awaitApi(){return this.overrideApi?Promise.resolve(this.overrideApi):pr.await()}};var Et=class extends Vr{constructor(t=!0,r){var i;super(r),this.sortObjectFields=(o,s)=>typeof s!="object"||s==null||Array.isArray(s)?s:Object.fromEntries(Object.entries(s).sort(([a],[l])=>a.localeCompare(l)));let n=this.constructor;n.commonCache=(i=n.commonCache)!==null&&i!==void 0?i:new ts.CacheRegistry,this.cache=t?n.commonCache:new ts.CacheRegistry}clearCache(){this.cache.clearAll()}hash(t){return String(Array.from(JSON.stringify(t,this.sortObjectFields)).reduce((r,i)=>0|31*r+i.charCodeAt(0),0))}};var ln=class extends Et{async listMySearches(){let{session:t}=S.getState();return Ce(t,z.SAVED_SEARCH_USER)?this.cache.get("my-searches",async()=>(await this.awaitApi).listMySearches(t.profile.userId),300*1e3):[]}};var cn=class extends Et{async listMyBookmarks(){let t=S.getState().session;return t?.sessionAuthenticated?this.cache.get("my-bookmarks",async()=>(await this.awaitApi).listMyBookmarks(t.profile.userId),300*1e3):[]}};var un=class extends Et{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetCount(t){if(this.isAuthenticated())return this.cache.get(`user-asset-count-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/${t}`),this.CACHE_DURATION)}async getUserBookmarkCountByMap(t){if(this.isAuthenticated())return this.cache.get(`user-bookmark-count-by-map-${t}`,async()=>(await this.awaitApi).get(`/internal/api/webapp/user/assets/count/BOOKMARKS/${t}`),this.CACHE_DURATION)}isAuthenticated(){let t=S.getState().session;return!!t?.sessionAuthenticated}};var dn=class extends Et{constructor(){super(...arguments),this.CACHE_DURATION=180*1e3}async getUserAssetLabels(){return this.isAuthenticated()?this.cache.get("user-asset-labels",async()=>(await this.awaitApi).get("/internal/api/webapp/user/assets/labels"),this.CACHE_DURATION):[]}isAuthenticated(){let t=S.getState().session;return!!t?.sessionAuthenticated}};var Up="ft-user-assets",Fp={setAssetCount:(e,t)=>{let{userAssetType:r,count:i}=t.payload.assetCount;e.assetCounts.allAsset[r]=i},clearAssetCount:e=>{Object.values(Xt).forEach(t=>{e.assetCounts.allAsset[t]=void 0})},setBookmarkCountByMap:(e,t)=>{let r=t.payload.mapId;e.assetCounts.bookmarkByMap[r]=t.payload.count},clearBookmarkCountByMap:e=>{e.assetCounts.bookmarkByMap={}},addAsset:(e,t)=>{let{assetType:r,mapId:i,asset:n}=t.payload;rs(e,r,[...es(e,r),n]),$c(e,r,1,i),Uc(e,n)},editAsset:(e,t)=>{let{assetType:r,asset:i}=t.payload;rs(e,r,es(e,r).map(n=>n.id===i.id?i:n)),Uc(e,i)},removeAsset:(e,t)=>{let{assetType:r,mapId:i,assetId:n}=t.payload;rs(e,r,es(e,r).filter(o=>o.id!==n)),$c(e,r,-1,i)}},Fc={[Xt.SEARCHES]:"savedSearches",[Xt.BOOKMARKS]:"bookmarks",[Xt.BOOKS]:void 0,[Xt.COLLECTIONS]:void 0},es=(e,t)=>{var r;let i=Fc[t];return i?(r=e[i])!==null&&r!==void 0?r:[]:[]},rs=(e,t,r)=>{let i=Fc[t];i&&(e[i]=r)},$c=(e,t,r,i)=>{let n=e.assetCounts.allAsset[t];if(n!==void 0&&(e.assetCounts.allAsset[t]=Math.max(0,n+r),t===Xt.BOOKMARKS&&i)){let o=e.assetCounts.bookmarkByMap[i];e.assetCounts.bookmarkByMap[i]=Math.max(0,o+r)}},Uc=(e,t)=>{let r=e.assetLabels.map(n=>n.title),i=t.labels.filter(n=>!r.includes(n)).map(n=>({title:n}));e.assetLabels.push(...i)},Ot=pn.FtReduxStore.get({name:Up,reducers:Fp,initialState:{savedSearches:void 0,bookmarks:void 0,assetCounts:{allAsset:Object.fromEntries(Object.values(Xt).map(e=>[e,void 0])),bookmarkByMap:{}},assetLabels:[]}}),is=class{constructor(t=new un,r=new dn){this.assetCountsService=t,this.assetLabelsService=r,this.currentSession=S.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new cn,this.savedSearchesService=new ln,S.subscribe(()=>this.reloadWhenUserSessionChanges())}reloadWhenUserSessionChanges(){var t;let{session:r}=S.getState();(0,pn.deepEqual)((t=this.currentSession)===null||t===void 0?void 0:t.profile,r?.profile)||(this.currentSession=r,this.clearMySearches(),this.reloadBookmarks(),this.clearUserAssetCounts(),this.reloadAssetLabels())}clearUserAssetCounts(){this.assetCountsService.clearCache(),Ot.actions.clearAssetCount(),Ot.actions.clearBookmarkCountByMap()}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){this.savedSearchesService.clearCache(),Ot.actions.savedSearches(void 0)}clearMyBookmarks(){this.bookmarksService.clearCache(),Ot.actions.bookmarks(void 0)}async reloadMySearches(){this.savedSearchesService.clearCache();let t=await this.savedSearchesService.listMySearches();Ot.actions.savedSearches(t)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async reloadAssetLabels(){this.assetLabelsService.clearCache();let t=await this.assetLabelsService.getUserAssetLabels();Ot.actions.assetLabels(t)}async loadAssetCount(t){let r=await this.assetCountsService.getUserAssetCount(t);r&&Ot.getState().assetCounts.allAsset[t]!==r.count&&Ot.actions.setAssetCount({assetCount:r})}async loadBookmarkByMapId(t){let r=await this.assetCountsService.getUserBookmarkCountByMap(t);r&&Ot.getState().assetCounts.bookmarkByMap[t]!==r.count&&Ot.actions.setBookmarkCountByMap({count:r.count,mapId:t})}async reloadAssetCount(t){this.assetCountsService.clearCache();let r=Object.keys(Ot.getState().assetCounts.bookmarkByMap).length!==0;t===Xt.BOOKMARKS&&r&&Ot.actions.clearBookmarkCountByMap(),Ot.getState().assetCounts.allAsset[t]!==void 0&&await this.loadAssetCount(t)}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){let r=!((t=this.currentSession)===null||t===void 0)&&t.sessionAuthenticated?await this.bookmarksService.listMyBookmarks():void 0;Ot.actions.bookmarks(r)}}},ns=new is;window.FluidTopicsUserAssetsActions==null&&(window.FluidTopicsUserAssetsActions=ns);var os=class{addCommand(t,r=!1){S.commands.add(t,r)}consumeCommand(t){return S.commands.consume(t)}};window.FluidTopicsAppInfoStoreService=new os;var ee=f(b());var Bc,zr=class extends CustomEvent{constructor(t){super("ft-i18n-context-loaded",{detail:t})}},Bp=Symbol("clearAfterUnitTest"),fn=class extends(0,ee.withEventBus)(Et){constructor(t){super(),this.messageContextProvider=t,this.defaultMessages={},this.listeners={},this.currentUiLocale="",this[Bc]=()=>{this.defaultMessages={},this.cache=new ee.CacheRegistry,this.listeners={}},this.currentUiLocale=S.getState().uiLocale,S.subscribe(()=>this.clearWhenUiLocaleChanges())}clearWhenUiLocaleChanges(){let{uiLocale:t}=S.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){let r=t.name.toLowerCase();this.cache.setFinal(r,t),this.notify(r)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,r){var i;if(t=t.toLowerCase(),r&&Object.keys(r).length>0){let n={...(i=this.defaultMessages[t])!==null&&i!==void 0?i:{},...r};(0,ee.deepEqual)(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}return this.fetchContext(t)}resolveContext(t){var r,i;return this.fetchContext(t),(i=(r=this.cache.getNow(t))===null||r===void 0?void 0:r.messages)!==null&&i!==void 0?i:{}}resolveRawMessage(t,r){let i=t.toLowerCase();return this.resolveContext(i)[r]}resolveMessage(t,r,...i){var n;let o=t.toLowerCase(),s=this.resolveContext(o);return new ee.ParametrizedLabelResolver((n=this.defaultMessages[o])!==null&&n!==void 0?n:{},s).resolve(r,...i)}async fetchContext(t){let r=!this.cache.has(t),i;try{i=await this.cache.get(t,()=>this.messageContextProvider(this.currentUiLocale,t)),r&&await this.notify(t)}catch(n){!(n instanceof ee.CanceledPromiseError)&&r&&console.error(n)}return i}subscribe(t,r){var i;return t=t.toLowerCase(),this.listeners[t]=(i=this.listeners[t])!==null&&i!==void 0?i:new Set,this.listeners[t].add(r),()=>{var n;return(n=this.listeners[t])===null||n===void 0?void 0:n.delete(r)}}async notifyAll(){let t=Object.keys(this.listeners);document.body.dispatchEvent(new zr({loadedContexts:t})),this.dispatchEvent(new zr({loadedContexts:t})),await Promise.all(t.map(r=>this.notify(r,!1)))}async notify(t,r=!0){r&&(document.body.dispatchEvent(new zr({loadedContexts:[t]})),this.dispatchEvent(new zr({loadedContexts:[t]}))),this.listeners[t]!=null&&await Promise.all([...this.listeners[t].values()].map(i=>(0,ee.delay)(0).then(()=>i()).catch(()=>null)))}};Bc=Bp;window.FluidTopicsI18nService==null&&(window.FluidTopicsI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getFluidTopicsMessageContext(e,t))}});window.FluidTopicsCustomI18nService==null&&(window.FluidTopicsCustomI18nService=new class extends fn{constructor(){super(async(e,t)=>(await this.awaitApi).getCustomMessageContext(e,t))}});var Wr=window.FluidTopicsI18nService,hn=window.FluidTopicsCustomI18nService;var Hc=f(b()),ss=class{highlightHtml(t,r,i){(0,Hc.highlightHtml)(t,r,i)}};window.FluidTopicsHighlightHtmlService=new ss;var jc=f(b());var as=class{isDate(t){var r,i,n,o;return(o=(n=((i=(r=S.getState().metadataConfiguration)===null||r===void 0?void 0:r.descriptors)!==null&&i!==void 0?i:[]).find(a=>a.key===t))===null||n===void 0?void 0:n.date)!==null&&o!==void 0?o:!1}format(t,r){var i,n,o,s;if(t==null)return"";try{return jc.DateFormatter.format(t,(i=r?.locale)!==null&&i!==void 0?i:S.getState().uiLocale,(n=r?.longFormat)!==null&&n!==void 0?n:!1,(o=r?.withTime)!==null&&o!==void 0?o:!1,(s=r?.onlyTime)!==null&&s!==void 0?s:!1)}catch(a){throw console.error(`Date ${JSON.stringify(t)} is not valid`,a),a}}};window.FluidTopicsDateService=new as;var Vc=f(b());var xi=class{static get(t,r){var i,n,o,s;let a=S.getState(),{lang:l,region:c}=(o=(n=(i=a.localesConfiguration)===null||i===void 0?void 0:i.defaultLocales)===null||n===void 0?void 0:n.defaultContentLocale)!==null&&o!==void 0?o:{lang:"en",region:"US"};return new Vc.SearchPlaceConverter(a.baseUrl,t??20,(s=a.localesConfiguration)===null||s===void 0?void 0:s.allLanguagesAllowed,r??`${l}-${c}`)}};var mn=class extends Et{async sendDocumentStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.start_display event")}async sendTopicStartDisplayEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.start_display event")}async sendKhubSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send khub.search event")}async sendDocumentSearchEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.search event")}async sendSearchPageSelectEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_page.select event")}async sendSearchResultOpenContextMenuEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send search_result.open_context_menu event")}async sendDocumentOnDemandTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send document.on_demand_translate event")}async sendTopicAiTranslateEvent(t){return this.sendEvents([this.sortEventArrays(t)],"Failed to send topic.ai_translate event")}convertMapToAnalyticsDocument(t){let r;switch(t.editorialType){case"BOOK":r="STRUCTURED_DOCUMENT";break;case"SHARED_BOOK":r="SHARED_PERSONAL_BOOK";break;case"ARTICLE":r="RESOURCE";break;case"HTML_PACKAGE":r="HTML_PACKAGE";break;default:throw new TypeError("Unknown editorial type for map : "+t.editorialType)}return{id:t.id,title:t.title,type:r,metadata:t.metadata}}sortEventArrays(t){let r=Object.entries(t).map(([i,n])=>Array.isArray(n)?[i,n.map(o=>typeof o=="object"&&o!=null&&!Array.isArray(o)?this.sortEventArrays(o):o).sort((o,s)=>typeof o=="object"&&o!==null&&"key"in o?o.key.localeCompare(s.key):typeof o=="string"&&typeof s=="string"?o.localeCompare(s):String(o).localeCompare(String(s)))]:typeof n=="object"&&n!==null?[i,this.sortEventArrays(n)]:[i,n]);return Object.fromEntries(r)}sendEvents(t,r){let i="anything not undefined";return this.cache.get("analytics-event-"+this.hash(t),async()=>(await this.awaitApi).sendEvents(t).then(()=>i).catch(n=>(console.info(r),console.debug(n),i)),1e3)}};var ls=class{urlToSearchRequest(t){return xi.get().parse(t)}searchRequestToUrl(t){return xi.get().serialize(t)}};window.FluidTopicsUrlService=new ls;var Pe=f(b());var fr=class e extends CustomEvent{constructor(t){super(e.eventName,{detail:{currentItem:t}})}};fr.eventName="change";var cs=class{itemName(t){return`fluid-topics-history-item-${t}`}get(t){let r=sessionStorage.getItem(this.itemName(t));return r?JSON.parse(r):void 0}set(t,r){sessionStorage.setItem(this.itemName(t),JSON.stringify(r))}},zc=new cs;var gn=class e extends Pe.WithEventBus{static build(){return new e(window.history,zc,()=>window.location,!1)}constructor(t,r,i,n){var o,s;super(),this.history=t,this.historyStorage=r,this.windowLocation=i,this.states=[],this.realPushState=t.pushState,this.realReplaceState=t.replaceState,this.initialIndex=(s=(o=t.state)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:t.length-1,this.currentIndex=this.initialIndex,this.setCurrentState(this.buildCurrentState()),this.installProxies(),this.initEventListeners(),this.initData(n)}setCurrentState(t,r=!1){let i=r&&this.currentIndex===t.index-1;this.currentState={...this.buildCurrentState(),...t},this.currentIndex=this.currentState.index,this.states[this.currentIndex]=this.currentState,i&&(this.states=this.states.slice(0,this.currentIndex+1)),this.historyStorage.set(this.currentIndex,this.currentState),(0,Pe.deepEqual)(this.currentState,this.history.state)||this.realReplaceState.apply(this.history,[this.currentState,this.currentState.title,window.location.href]),setTimeout(()=>this.dispatchEvent(new fr(this.currentItem())),0)}installProxies(){let t=r=>(i,n,[o,s,a])=>{let l=r(),c={...l===this.currentIndex?this.currentState:void 0,...o,index:l,href:typeof a=="string"?a:(a??this.windowLocation()).href};i.apply(n,[c,s,a]),this.setCurrentState(c,!0)};this.history.pushState=new Proxy(this.history.pushState,{apply:t(()=>this.currentIndex+1)}),this.history.replaceState=new Proxy(this.history.replaceState,{apply:t(()=>this.currentIndex)})}initEventListeners(){window.addEventListener("popstate",t=>this.setCurrentState(t.state)),document.querySelector("title")==null&&document.head.append(document.createElement("title")),new MutationObserver(()=>this.updateCurrentState({title:document.title})).observe(document.querySelector("title"),{subtree:!0,characterData:!0,childList:!0})}initData(t){for(let r=this.history.length-1;r>=0;r--)t?this.states[r]=this.historyStorage.get(r):setTimeout(()=>this.states[r]=this.historyStorage.get(r),this.history.length-r)}updateCurrentState(t){var r;let i={...this.buildCurrentState(),...t,index:this.currentIndex,title:(r=t?.title)!==null&&r!==void 0?r:this.currentState.title};this.setCurrentState(i)}addHistoryChangeListener(t){this.addEventListener(fr.eventName,t)}removeHistoryChangeListener(t){this.removeEventListener(fr.eventName,t)}currentItem(){return(0,Pe.deepCopy)(this.currentState)}back(){let t=this.previousDifferentMajorPosition();t>=0?this.history.go(t-this.currentIndex):this.currentIndex!==this.initialIndex?this.history.go(this.initialIndex-this.currentIndex):this.history.back()}backwardItem(){return(0,Pe.deepCopy)(this.states[this.previousDifferentMajorPosition()])}backwardItemMatching(t){let r=this.states.filter(i=>!!i).filter(i=>i.index<this.currentIndex).reverse();return(0,Pe.deepCopy)(r.find(i=>t(i)))}previousDifferentMajorPosition(){let t=this.currentIndex>0?this.currentIndex-1:0;for(;t>0&&!this.isDifferentMajorState(t);)t--;return t}forward(){let t=this.nextMajorPosition();t&&t<this.states.length?this.history.go(t-this.currentIndex):this.history.forward()}forwardItem(){let t=this.nextMajorPosition();if(t)return(0,Pe.deepCopy)(this.states[t])}nextMajorPosition(){let t=this.currentIndex;if(!(t>=this.states.length)){do t++;while(t<this.states.length&&!this.isDifferentMajorState(t));return this.getHigherPositionInTheSameState(t)}}getHigherPositionInTheSameState(t){var r;let i=(r=this.states[t])===null||r===void 0?void 0:r.majorStateId;if(!i)return t;let n=t,o=t+1;for(;this.states.length>o&&!this.isDifferentMajorState(o,i);)this.hasState(o)&&(n=o),o++;return n}buildCurrentState(){var t,r;return{...this.history.state,index:this.currentIndex,href:this.windowLocation().href,title:(r=(t=this.history.state)===null||t===void 0?void 0:t.title)!==null&&r!==void 0?r:document.title}}hasState(t){return this.states[t]!=null}isDifferentMajorState(t,r){var i;if(!this.hasState(t))return!1;let n=r??this.currentState.majorStateId,o=(i=this.states[t])===null||i===void 0?void 0:i.majorStateId;return o==null||o!=n}};window.FluidTopicsInternalHistoryService==null&&(window.FluidTopicsInternalHistoryService=gn.build(),window.FluidTopicsHistoryService={currentItem:()=>window.FluidTopicsInternalHistoryService.currentItem(),back:()=>window.FluidTopicsInternalHistoryService.back(),forward:()=>window.FluidTopicsInternalHistoryService.forward(),backwardItem:()=>window.FluidTopicsInternalHistoryService.backwardItem(),forwardItem:()=>window.FluidTopicsInternalHistoryService.forwardItem(),backwardItemMatching:e=>window.FluidTopicsInternalHistoryService.backwardItemMatching(e),addHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.addHistoryChangeListener(e),removeHistoryChangeListener:e=>window.FluidTopicsInternalHistoryService.removeHistoryChangeListener(e)});var Kr=class{constructor(){this.storeListeners=[]}store(t,r){if(this.isAuthenticated())return;let i=JSON.stringify(r);window.localStorage.setItem(t,i),window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:i,storageArea:window.localStorage}))}get(t){var r,i;if(!this.isAuthenticated())return(i=JSON.parse((r=window.localStorage.getItem(t))!==null&&r!==void 0?r:"null"))!==null&&i!==void 0?i:void 0}addStoreListener(t,r){let i=n=>{n.key===t()&&!this.isAuthenticated()&&r()};this.storeListeners.push(i),window.addEventListener("storage",i)}clearStoreListeners(){this.storeListeners.forEach(t=>window.removeEventListener("storage",t)),this.storeListeners.length=0}isAuthenticated(){let t=S.getState().session;return!!t?.sessionAuthenticated}};var Wc=f(k());var Kc=Wc.css`
|
|
572
|
+
`;var Yc=f(k()),jt=f(F()),gr=f(b());var hr=f(b());function Gc(e,t){let{authenticationRequired:r,session:i}=S.getState();return r&&!i?.sessionAuthenticated?Promise.resolve(t):e()}var vn=class extends Vr{async updateUiLocale(t){return(await this.awaitApi).updateUiLocale(t)}};var us=class e extends hr.FtStateManager{static build(t){return new e(S,t)}constructor(t,r){super(),this.store=t,this.cache=new hr.CacheRegistry,this.withManualResources=!0,this.userLocaleService=new vn,this.cleanSessionDebouncer=new hr.Debouncer,this.reloadDebouncer=new hr.Debouncer(500),this.apiProvider=r??(()=>pr.get())}setWithManualResources(t){this.withManualResources=t,this.updateIfNeeded()}async initService(){this.store.addEventListener(Ie.eventName,this.reloadConfiguration)}async updateIfNeeded(){this.apiProvider()&&(this.withManualResources||(this.store.getState().session==null&&this.updateSession(),this.store.getState().metadataConfiguration==null&&this.updateMetadataConfiguration()),this.store.getState().localesConfiguration==null&&this.updateLocalesConfiguration(),(this.store.getState().availableContentLocales==null||this.store.getState().availableContentLocales.length==0)&&this.updateAvailableContentLocales())}async updateSession(){let t=await this.cache.get("session",async()=>{let r=await this.apiProvider().getCurrentSession();return r.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run(()=>{this.cache.clear("session"),this.setSession(void 0)},r.idleTimeoutInMillis),r});this.setSession(t)}async updateMetadataConfiguration(){this.setMetadataConfiguration(await this.cache.get("metadataConfiguration",()=>this.apiProvider().getMetadataConfiguration()))}async updateLocalesConfiguration(){this.setLocalesConfiguration(await this.cache.get("localesConfiguration",()=>this.apiProvider().getLocalesConfiguration()))}async updateAvailableContentLocales(){var t;let r=await this.cache.get("availableContentLocales",()=>Gc(()=>this.apiProvider().getAvailableSearchLocales(),{contentLocales:[]}));this.setAvailableContentLocales((t=r.contentLocales)!==null&&t!==void 0?t:[])}reloadConfiguration(){var t;(t=this.cache)===null||t===void 0||t.clear("availableContentLocales"),typeof this.updateAvailableContentLocales=="function"&&this.updateAvailableContentLocales()}setBaseUrl(t){this.store.actions.baseUrl(t),window.fluidTopicsBaseUrl=t}setApiIntegrationIdentifier(t){this.store.actions.apiIntegrationIdentifier(t)}setApiIntegrationAppVersion(t){this.store.actions.apiIntegrationAppVersion(t)}setUiLocale(t){this.store.actions.uiLocale(t)}setLocalesConfiguration(t){this.store.actions.localesConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setAvailableContentLocales(t){this.store.actions.availableContentLocales(t),setTimeout(()=>this.updateIfNeeded())}stopReloadDebouncer(){this.reloadDebouncer.cancel()}requestUiLocaleUpdate(t){this.userLocaleService.updateUiLocale({uiLocale:t}).then(r=>{r.uiLocaleChanged&&(this.reloadDebouncer.run(()=>window.location.reload()),this.store.dispatchEvent(new bi(r)))}).catch(()=>{})}setMetadataConfiguration(t){this.store.actions.metadataConfiguration(t),setTimeout(()=>this.updateIfNeeded())}setNoCustom(t){this.store.actions.noCustom(t)}setEditorMode(t){this.store.actions.editorMode(t)}setNoCustomComponent(t){this.store.actions.noCustomComponent(t)}setSession(t){this.store.actions.session(t),setTimeout(()=>this.updateIfNeeded())}setOpenExternalDocumentInNewTab(t){this.store.actions.openExternalDocumentInNewTab(t)}setNavigatorOnline(t){this.store.actions.navigatorOnline(t)}setForcedOffline(t){this.store.actions.forcedOffline(t)}setAuthenticationRequired(t){this.store.actions.authenticationRequired(t)}},qc=us.build();var mr=class extends Event{constructor(t,r,i,n){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=r,this.callback=i,this.subscribe=n??!1}};var Si=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let r=this.pendingContextRequests.get(t.context);if(r===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:i}=r;for(let{elementRef:n,callbackRef:o}of i){let s=n.deref(),a=o.deref();s===void 0||a===void 0||s.dispatchEvent(new mr(t.context,s,a,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let r=t.contextTarget??t.composedPath()[0],i=t.callback,n=this.pendingContextRequests.get(t.context);n===void 0&&this.pendingContextRequests.set(t.context,n={callbacks:new WeakMap,requests:[]});let o=n.callbacks.get(r);o===void 0&&n.callbacks.set(r,o=new WeakSet),o.has(i)||(o.add(i),n.requests.push({elementRef:new WeakRef(r),callbackRef:new WeakRef(i)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};var Tt=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},J=class extends gr.FtLitElementRedux{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.apiIntegrationAppVersion="ft-integration-app-version",this.uiLocale="en-US",this.editorMode=!1,this.noCustom=!1,this.openExternalDocumentInNewTab=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.navigatorOnline=!1,this.forcedOffline=!1,this.authenticationRequired=!1,this.messageContexts=[],this.stateManager=qc,this.contextRoot=new Si}render(){return Yc.html`
|
|
573
573
|
<slot></slot>
|
|
574
574
|
`}connectedCallback(){super.connectedCallback(),this.stateManager.initService(),this.contextRoot.attach(document.body)}disconnectedCallback(){super.disconnectedCallback(),this.contextRoot.detach(document.body)}update(t){var r;super.update(t),t.has("baseUrl")&&this.stateManager.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&this.stateManager.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("apiIntegrationAppVersion")&&this.stateManager.setApiIntegrationAppVersion(this.apiIntegrationAppVersion),t.has("uiLocale")&&this.stateManager.setUiLocale(this.uiLocale),t.has("metadataConfiguration")&&this.stateManager.setMetadataConfiguration(this.metadataConfiguration),t.has("noCustom")&&this.stateManager.setNoCustom(this.noCustom),t.has("editorMode")&&this.stateManager.setEditorMode(this.editorMode),t.has("noCustomComponent")&&this.stateManager.setNoCustomComponent(this.noCustomComponent),t.has("session")&&this.stateManager.setSession(this.session),t.has("messageContexts")&&this.messageContexts!=null&&this.messageContexts.forEach(i=>Wr.addContext(i)),t.has("openExternalDocumentInNewTab")&&this.stateManager.setOpenExternalDocumentInNewTab(this.openExternalDocumentInNewTab),t.has("navigatorOnline")&&this.stateManager.setNavigatorOnline(this.navigatorOnline),t.has("forcedOffline")&&this.stateManager.setForcedOffline(this.forcedOffline),t.has("authenticationRequired")&&this.stateManager.setAuthenticationRequired(this.authenticationRequired),t.has("withManualResources")&&((r=this.stateManager)===null||r===void 0||r.setWithManualResources(this.withManualResources)),setTimeout(()=>this.stateManager.updateIfNeeded())}};J.elementDefinitions={};J.styles=Kc;Tt([(0,jt.property)()],J.prototype,"baseUrl",void 0);Tt([(0,jt.property)()],J.prototype,"apiIntegrationIdentifier",void 0);Tt([(0,jt.property)()],J.prototype,"apiIntegrationAppVersion",void 0);Tt([(0,jt.property)()],J.prototype,"uiLocale",void 0);Tt([(0,gr.jsonProperty)(null)],J.prototype,"availableUiLocales",void 0);Tt([(0,gr.jsonProperty)(null)],J.prototype,"metadataConfiguration",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"editorMode",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"noCustom",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"openExternalDocumentInNewTab",void 0);Tt([(0,jt.property)({converter:{fromAttribute(e){return e==="false"?!1:e==="true"||(e??!1)}}})],J.prototype,"noCustomComponent",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"withManualResources",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"navigatorOnline",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"forcedOffline",void 0);Tt([(0,jt.property)({type:Boolean})],J.prototype,"authenticationRequired",void 0);Tt([(0,gr.jsonProperty)([])],J.prototype,"messageContexts",void 0);Tt([(0,gr.jsonProperty)(void 0)],J.prototype,"session",void 0);var Zc=f(b());var Xc={"ft-app-context":J};(0,Zc.customElements)(Xc);var Qc=f(F());var ds=class{fromLocalizableLabel(t){return t.type=="PLAIN_TEXT"?{message:t.text}:{key:t.key,custom:t.type=="LOCALIZED_CUSTOM",context:t.context,message:t.key}}fromAttribute(t){if(t!=null)try{return JSON.parse(t)}catch{if(this.isI18nKey(t)){let[r,i]=t.split(".");return{context:r,key:i,custom:r!=="officialContext",message:""}}return{message:t}}}toAttribute(t){if(t!=null)return JSON.stringify(t)}isI18nKey(t){return t.match(/^[\w-]+\.[\w-]+$/)}},Gr=new ds;var Vp=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Ei=Symbol("i18nAttributes"),Jc=Symbol("i18nListAttributes"),Ti=Symbol("i18nProperties"),yn=Symbol("i18nContexts"),Ai=Symbol("i18nUnsubs"),Ge=(0,qr.applyMixinOnce)(Symbol("withI18n"),function(e){var t,r;class i extends e{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map,this[r]=new Map}getI18nService(o){return o??this.useCustomMessageContexts?hn:Wr}i18n(o){let{context:s,key:a,message:l}=o,{custom:c,args:u,argsProvider:d}=o;if(s&&a){this.hasI18nContext(s)||this.addI18nContext(s,void 0,c);let p=u??(d?d(this):[]);return this.getI18nService(c).resolveMessage(s,a,...p)}return l}async awaitI18n(o){let{context:s,custom:a}=o;return s&&await this.getI18nService(a).prepareContext(s),this.i18n(o)}customI18n(o,s){if(Gr.isI18nKey(o)){let[a,l]=o.split(".");return this.i18n({custom:!0,context:a,key:l,...s})||o}return o}firstUpdated(o){super.firstUpdated(o),this.updateI18nAttributes(()=>!0),this.updateI18nProperties(()=>!0)}update(o){super.update(o),this.updateI18nAttributes((s,a,l)=>o.has(a)||typeof s.argsProvider=="function"),this.updateI18nProperties(s=>typeof s.argsProvider=="function")}onI18nUpdate(o){this.updateI18nAttributes((s,a,l)=>{var c;return((c=l?.context)===null||c===void 0?void 0:c.toLowerCase())===o}),this.updateI18nProperties(s=>s.context.toLowerCase()===o),this.requestUpdate()}updateI18nAttributes(o){var s,a;let l=this,c=(u,d,p)=>p?.context&&p.key&&o(u,d,p)?{...p,message:this.i18n({context:p.context,key:p.key,custom:p.custom,...u})}:p;(s=this[Ei])===null||s===void 0||s.forEach((u,d)=>l[d]=c(u,d,l[d])),(a=this[Jc])===null||a===void 0||a.forEach((u,d)=>{var p;return l[d]=(p=l[d])===null||p===void 0?void 0:p.map(h=>c(u,d,h))})}updateI18nProperties(o){var s;(s=this[Ti])===null||s===void 0||s.forEach((a,l)=>{o(a,l)&&(this[l]=this.i18n(a))})}addI18nMessages(o,s,a){console.warn('Deprecated usage of method "addI18nMessages", use "addI18nContext" instead.'),this.addI18nContext(o,s,a)}addI18nContext(o,s,a){let l=(typeof o=="string"?o:o.name).toLowerCase();a=typeof o=="string"?a:o.custom,this[yn].set(l,{isCustomContext:a}),this[Ai].has(l)||this[Ai].set(l,this.getI18nService(a).subscribe(l,()=>this.onI18nUpdate(l))),this.getI18nService(a).prepareContext(l,s)}hasI18nContext(o){return this[yn].has(o.toLowerCase())}connectedCallback(){super.connectedCallback(),this[yn].forEach((o,s)=>this.addI18nContext(s,void 0,o.isCustomContext))}disconnectedCallback(){super.disconnectedCallback(),this[Ai].forEach(o=>o()),this[Ai].clear()}}return t=yn,r=Ai,Vp([(0,Qc.property)({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}),bn=class extends Ge(qr.FtLitElement){},xn=class extends Ge(qr.FtLitElementRedux){};var tu=f(b());var ps=class{fromAttribute(t){if(!t)return[];try{let r=JSON.parse(t);return Array.isArray(r)?r.map(i=>typeof i=="string"?Gr.fromAttribute(i):i):[]}catch{return[]}}toAttribute(t){if(t!=null)return JSON.stringify(t)}},zp=new ps;var eu=(e,t)=>(r,i)=>{var n;r.constructor.createProperty(i,{type:Object,hasChanged:tu.hasChanged,converter:Gr,...t}),r[Ei]=(n=r[Ei])!==null&&n!==void 0?n:new Map,r[Ei].set(i,e??{})};var qe=class e{static build(t){return new e(t)}static buildCustom(t){return new e(t,!0)}static fromGwt(t){return new e(t)}get service(){return this.custom?hn:Wr}constructor(t,r=!1){this.name=t,this.custom=r,this.properties=new Proxy({},{get:(i,n)=>{let o=n;return s=>({context:this.name,key:o,custom:this.custom,args:typeof s=="function"?void 0:s,argsProvider:typeof s=="function"?s:void 0})}}),this.messages=new Proxy({},{get:(i,n)=>(...o)=>this.service.resolveMessage(this.name,n,...o)}),this.rawMessages=new Proxy({},{get:(i,n)=>this.service.resolveRawMessage(this.name,n)}),this.keys=new Proxy({},{get:(i,n)=>()=>n}),this.attributes=new Proxy({},{get:(i,n)=>()=>({context:this.name,key:n,message:this.service.resolveRawMessage(this.name,n)})})}};var Sn=(e,t)=>(r,i)=>{var n,o;r.constructor.createProperty(i,t??{attribute:!1,type:String});let s={...e,key:(n=e.key)!==null&&n!==void 0?n:i};r[Ti]=(o=r[Ti])!==null&&o!==void 0?o:new Map,r[Ti].set(i,s)};var ru=f(k());var iu=ru.css`
|
|
575
575
|
`;var An=f(k()),En=f(F()),Tn=f(b());var wi=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},fe=class extends xn{constructor(){super(),this.editorMode=!1,this.addStore(S)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":An.nothing:An.html`
|
|
@@ -708,14 +708,14 @@
|
|
|
708
708
|
</ft-tooltip>
|
|
709
709
|
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.onFocusout)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusout",this.onFocusout)}onFocusout(){this.isFocused=!1}onChange(){this.selected=this.unselectable?!this.selected:!0,this.dispatchEvent(new fs(this.selected))}getLabel(){return this.label||this.getTextContent()}resolveIcon(){return this.icon?Yr.html`
|
|
710
710
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
711
|
-
`:Yr.nothing}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};it.elementDefinitions={"ft-ripple":$,"ft-typography":tt,"ft-tooltip":et,"ft-icon":rt};it.styles=[Xr.safariEllipsisFix,gu];me([(0,Mt.property)()],it.prototype,"value",void 0);me([(0,Mt.property)()],it.prototype,"icon",void 0);me([(0,Mt.property)()],it.prototype,"iconVariant",void 0);me([(0,Mt.property)()],it.prototype,"label",void 0);me([(0,Mt.property)()],it.prototype,"tooltipPosition",void 0);me([(0,Mt.property)({type:Boolean,reflect:!0})],it.prototype,"selected",void 0);me([(0,Mt.property)({type:Boolean})],it.prototype,"trailingIcon",void 0);me([(0,Mt.property)({type:Boolean})],it.prototype,"unselectable",void 0);me([(0,Mt.query)(".ft-switch-option--content slot")],it.prototype,"slottedContent",void 0);me([(0,Mt.query)(".ft-switch-option--input")],it.prototype,"input",void 0);me([(0,Mt.state)()],it.prototype,"isFocused",void 0);var yr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ms=class extends CustomEvent{constructor(t){super("change",{detail:t})}},
|
|
711
|
+
`:Yr.nothing}getTextContent(){var t,r;return(r=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(i=>i.textContent).join("").trim())!==null&&r!==void 0?r:""}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}};it.elementDefinitions={"ft-ripple":$,"ft-typography":tt,"ft-tooltip":et,"ft-icon":rt};it.styles=[Xr.safariEllipsisFix,gu];me([(0,Mt.property)()],it.prototype,"value",void 0);me([(0,Mt.property)()],it.prototype,"icon",void 0);me([(0,Mt.property)()],it.prototype,"iconVariant",void 0);me([(0,Mt.property)()],it.prototype,"label",void 0);me([(0,Mt.property)()],it.prototype,"tooltipPosition",void 0);me([(0,Mt.property)({type:Boolean,reflect:!0})],it.prototype,"selected",void 0);me([(0,Mt.property)({type:Boolean})],it.prototype,"trailingIcon",void 0);me([(0,Mt.property)({type:Boolean})],it.prototype,"unselectable",void 0);me([(0,Mt.query)(".ft-switch-option--content slot")],it.prototype,"slottedContent",void 0);me([(0,Mt.query)(".ft-switch-option--input")],it.prototype,"input",void 0);me([(0,Mt.state)()],it.prototype,"isFocused",void 0);var yr=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},ms=class extends CustomEvent{constructor(t){super("change",{detail:t})}},Pt=class extends Le.FtLitElement{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.displayFocusWhenUsingKeyboard=!1,this.options=[]}get value(){var t;return(t=this.selectedOption)===null||t===void 0?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach(r=>r.unselectable=this.unselectable)}render(){let t={"ft-switch":!0,"ft-switch--dense":this.dense};return wn.html`
|
|
712
712
|
<div @keydown=${this.onKeyDown} tabindex="-1" class="${(0,yu.classMap)(t)}" role="radiogroup" aria-label="${this.label}">
|
|
713
713
|
<slot @slotchange=${this.onSlotchange}
|
|
714
714
|
@option-change=${this.onOptionChangeByScript}
|
|
715
715
|
@option-change-by-user=${this.onOptionChangeByUser}
|
|
716
716
|
></slot>
|
|
717
717
|
</div>
|
|
718
|
-
`}onKeyDown(t){let r;(t.key=="ArrowDown"||t.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(t.key=="ArrowUp"||t.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),t.code=="Space"&&(r=this.options.indexOf(t.target)),r!=null&&(t.preventDefault(),this.options[this.fixIndex(r)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(r)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],(t=this.slottedContent)===null||t===void 0||t.assignedElements().forEach(r=>{r instanceof it&&this.registerOption(r)}),this.selectedOption=this.options.find(r=>r.selected)}registerOption(t){var r;(r=t.shadowRoot)===null||r===void 0||r.querySelectorAll("input").forEach(i=>{i.setAttribute("tabindex","-1")}),t.setAttribute("tabindex","0"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let r=t.target;this.onOptionChange(r)}onOptionChangeByUser(t){var r;t.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(t.target),this.dispatchEvent(new ms((r=this.selectedOption)===null||r===void 0?void 0:r.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(t=>{t.selected=t===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(t.isFocused=t===this.selectedOption)})}};
|
|
718
|
+
`}onKeyDown(t){let r;(t.key=="ArrowDown"||t.key=="ArrowRight")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)+1:0),(t.key=="ArrowUp"||t.key=="ArrowLeft")&&(r=this.selectedOption?this.options.indexOf(this.selectedOption)-1:this.options.length-1),t.code=="Space"&&(r=this.options.indexOf(t.target)),r!=null&&(t.preventDefault(),this.options[this.fixIndex(r)].focus(),this.displayFocusWhenUsingKeyboard=!0,this.options[this.fixIndex(r)].selected=!0)}fixIndex(t){return t<0?this.options.length-1:t>this.options.length-1?0:t}onSlotchange(){var t;this.options=[],(t=this.slottedContent)===null||t===void 0||t.assignedElements().forEach(r=>{r instanceof it&&this.registerOption(r)}),this.selectedOption=this.options.find(r=>r.selected)}registerOption(t){var r;(r=t.shadowRoot)===null||r===void 0||r.querySelectorAll("input").forEach(i=>{i.setAttribute("tabindex","-1")}),t.setAttribute("tabindex","0"),t.unselectable=this.unselectable,this.options.push(t)}onOptionChangeByScript(t){t.stopPropagation();let r=t.target;this.onOptionChange(r)}onOptionChangeByUser(t){var r;t.stopPropagation(),this.displayFocusWhenUsingKeyboard=!1,this.onOptionChange(t.target),this.dispatchEvent(new ms((r=this.selectedOption)===null||r===void 0?void 0:r.value))}onOptionChange(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}private(t){t.selected?this.selectedOption=t:this.selectedOption=this.options.find(r=>r.selected)}focus(){this.ftSwitchDiv.focus()}updateOptions(){this.options.forEach(t=>{t.selected=t===this.selectedOption,this.displayFocusWhenUsingKeyboard&&(t.isFocused=t===this.selectedOption)})}};Pt.elementDefinitions={};Pt.styles=wn.css`
|
|
719
719
|
:host {
|
|
720
720
|
display: inline-block;
|
|
721
721
|
}
|
|
@@ -731,25 +731,25 @@
|
|
|
731
731
|
}
|
|
732
732
|
|
|
733
733
|
.ft-switch slot::slotted(ft-switch-option) {
|
|
734
|
-
${(0,
|
|
735
|
-
${(0,
|
|
736
|
-
${(0,
|
|
734
|
+
${(0,Le.setVariable)(ft.borderRadiusLeft,"0")};
|
|
735
|
+
${(0,Le.setVariable)(ft.borderRadiusRight,"0")};
|
|
736
|
+
${(0,Le.setVariable)(ft.borderWidthLeft,"0")};
|
|
737
737
|
}
|
|
738
738
|
|
|
739
739
|
.ft-switch slot::slotted(ft-switch-option:first-child) {
|
|
740
|
-
${(0,
|
|
741
|
-
${(0,
|
|
740
|
+
${(0,Le.setVariable)(ft.borderRadiusLeft,Q.borderRadius)};
|
|
741
|
+
${(0,Le.setVariable)(ft.borderWidthLeft,"1px")};
|
|
742
742
|
}
|
|
743
743
|
|
|
744
744
|
.ft-switch slot::slotted(ft-switch-option:last-child) {
|
|
745
|
-
${(0,
|
|
745
|
+
${(0,Le.setVariable)(ft.borderRadiusRight,Q.borderRadius)};
|
|
746
746
|
}
|
|
747
747
|
|
|
748
748
|
.ft-switch--dense slot::slotted(ft-switch-option) {
|
|
749
749
|
--switch-internal-vertical-padding: 2px;
|
|
750
750
|
--switch-internal-horizontal-padding: 4px;
|
|
751
751
|
}
|
|
752
|
-
`;yr([(0,Ae.property)({type:Boolean})],
|
|
752
|
+
`;yr([(0,Ae.property)({type:Boolean})],Pt.prototype,"dense",void 0);yr([(0,Ae.property)({type:Boolean})],Pt.prototype,"unselectable",void 0);yr([(0,Ae.property)()],Pt.prototype,"label",void 0);yr([(0,Ae.query)(".ft-switch slot")],Pt.prototype,"slottedContent",void 0);yr([(0,Ae.state)()],Pt.prototype,"selectedOption",void 0);yr([(0,Ae.state)()],Pt.prototype,"displayFocusWhenUsingKeyboard",void 0);yr([(0,Ae.query)(".ft-switch")],Pt.prototype,"ftSwitchDiv",void 0);var xu=f(b());var bu={"ft-switch":Pt,"ft-switch-option":it};(0,xu.customElements)(bu);var Eu=f(k()),U=f(b());var Su=f(k()),W=f(b());var w={fontSize:W.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:W.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:W.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:W.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:W.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:W.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:W.FtCssVariableFactory.extend("--ft-input-label-border-color","",W.designSystemVariables.colorOutline),textColor:W.FtCssVariableFactory.extend("--ft-input-label-text-color","",W.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:W.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",W.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:W.FtCssVariableFactory.extend("--ft-input-label-background-color","",W.designSystemVariables.colorSurface),borderRadius:W.FtCssVariableFactory.extend("--ft-input-label-border-radius","",W.designSystemVariables.borderRadiusS),colorError:W.FtCssVariableFactory.external(W.designSystemVariables.colorError,"Design system")},Au=Su.css`
|
|
753
753
|
.ft-input-label {
|
|
754
754
|
position: absolute;
|
|
755
755
|
inset: 0;
|
|
@@ -1005,8 +1005,8 @@
|
|
|
1005
1005
|
@keydown=${this.initKeydownPress}>
|
|
1006
1006
|
<ft-icon .variant=${this.iconVariant} .value=${this.icon} focusable="false" aria-hidden="true"></ft-icon>
|
|
1007
1007
|
</div>
|
|
1008
|
-
`}initDragFromMouse(t){t.detail>0&&this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let r=t.key;["Enter","Space","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&(t.preventDefault(),t.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=t.currentTarget;r==="Enter"||r==="Space"?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):r==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(r==="ArrowLeft"?this.fixedWidth-=10:r==="ArrowRight"?this.fixedWidth+=10:r==="ArrowUp"?this.fixedHeight-=10:r==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&this.dispatchEvent(new Cn(this.fixedWidth,this.fixedHeight)))}initDrag(t,r){this.dragging=!0,this.startX=t,this.startY=r,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,r){let i=this.fixedWidth+t-this.startX,n=this.fixedHeight+r-this.startY;this.dispatchEvent(new Cn(i,n))}};vt.elementDefinitions={"ft-icon":rt};vt.styles=[Rn.noTextSelect,_u];Ee([(0,Vt.property)({type:Number})],vt.prototype,"initialWidth",void 0);Ee([(0,Vt.property)({type:Number})],vt.prototype,"initialHeight",void 0);Ee([(0,Vt.property)()],vt.prototype,"icon",void 0);Ee([(0,Vt.property)()],vt.prototype,"iconVariant",void 0);Ee([(0,Vt.property)()],vt.prototype,"cursor",void 0);Ee([(0,Vt.property)()],vt.prototype,"ariaLabel",void 0);Ee([(0,Vt.state)()],vt.prototype,"dragging",void 0);Ee([(0,Vt.state)()],vt.prototype,"isAriaPressed",void 0);Ee([(0,Vt.eventOptions)({passive:!0})],vt.prototype,"initDragFromMouse",null);Ee([(0,Vt.eventOptions)({passive:!0})],vt.prototype,"initDragFromTouch",null);var Ou=f(b());var Ru={"ft-resizer":vt};(0,Ou.customElements)(Ru);var On=f(F());var gs=f(k()),vs=f(F());function Iu(e,t,r){return e?t(e):r?.(e)}var
|
|
1009
|
-
<div class="${(0,
|
|
1008
|
+
`}initDragFromMouse(t){t.detail>0&&this.initDrag(t.clientX,t.clientY)}initDragFromTouch(t){t.preventDefault(),t.stopPropagation(),this.initDrag(t.touches[0].clientX,t.touches[0].clientY)}initKeydownPress(t){let r=t.key;["Enter","Space","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&(t.preventDefault(),t.stopPropagation()),this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight;let n=t.currentTarget;r==="Enter"||r==="Space"?(this.isAriaPressed=!this.isAriaPressed,n.setAttribute("aria-pressed",this.isAriaPressed.toString())):r==="Escape"&&(this.isAriaPressed=!1,n.setAttribute("aria-pressed",this.isAriaPressed.toString())),this.isAriaPressed&&(r==="ArrowLeft"?this.fixedWidth-=10:r==="ArrowRight"?this.fixedWidth+=10:r==="ArrowUp"?this.fixedHeight-=10:r==="ArrowDown"&&(this.fixedHeight+=10),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&this.dispatchEvent(new Cn(this.fixedWidth,this.fixedHeight)))}initDrag(t,r){this.dragging=!0,this.startX=t,this.startY=r,this.fixedWidth=this.initialWidth,this.fixedHeight=this.initialHeight,this.installDocumentEventListeners()}installDocumentEventListeners(){document.addEventListener("mousemove",this.doDragFromMouse,!1),document.addEventListener("mouseup",this.stopDrag,!1),document.addEventListener("touchmove",this.doDragFromTouch,!1),document.addEventListener("touchend",this.stopDrag,!1),document.addEventListener("touchcancel",this.stopDrag,!1)}doDrag(t,r){let i=this.fixedWidth+t-this.startX,n=this.fixedHeight+r-this.startY;this.dispatchEvent(new Cn(i,n))}};vt.elementDefinitions={"ft-icon":rt};vt.styles=[Rn.noTextSelect,_u];Ee([(0,Vt.property)({type:Number})],vt.prototype,"initialWidth",void 0);Ee([(0,Vt.property)({type:Number})],vt.prototype,"initialHeight",void 0);Ee([(0,Vt.property)()],vt.prototype,"icon",void 0);Ee([(0,Vt.property)()],vt.prototype,"iconVariant",void 0);Ee([(0,Vt.property)()],vt.prototype,"cursor",void 0);Ee([(0,Vt.property)()],vt.prototype,"ariaLabel",void 0);Ee([(0,Vt.state)()],vt.prototype,"dragging",void 0);Ee([(0,Vt.state)()],vt.prototype,"isAriaPressed",void 0);Ee([(0,Vt.eventOptions)({passive:!0})],vt.prototype,"initDragFromMouse",null);Ee([(0,Vt.eventOptions)({passive:!0})],vt.prototype,"initDragFromTouch",null);var Ou=f(b());var Ru={"ft-resizer":vt};(0,Ou.customElements)(Ru);var On=f(F());var gs=f(k()),vs=f(F());function Iu(e,t,r){return e?t(e):r?.(e)}var Lu=f(_e()),ku=f(b()),Pu=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},br=class extends ku.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return gs.html`
|
|
1009
|
+
<div class="${(0,Lu.classMap)(this.inputLabelClasses)}">
|
|
1010
1010
|
${Iu(this.text,()=>gs.html`
|
|
1011
1011
|
<div class="ft-input-label--text ft-typography--caption">
|
|
1012
1012
|
<label class="ft-input-label--floating-text">${this.text}</label>
|
|
@@ -1014,7 +1014,7 @@
|
|
|
1014
1014
|
</div>
|
|
1015
1015
|
`)}
|
|
1016
1016
|
</div>
|
|
1017
|
-
`}};br.elementDefinitions={};
|
|
1017
|
+
`}};br.elementDefinitions={};Pu([(0,vs.property)({type:String})],br.prototype,"text",void 0);Pu([(0,vs.property)({type:Boolean})],br.prototype,"raised",void 0);var ys=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},zt=class extends br{constructor(){super(...arguments),this.outlined=!1,this.error=!1,this.disabled=!1}get inputLabelClasses(){return{"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error}}};zt.elementDefinitions={};zt.styles=[Li,Au];ys([(0,On.property)({type:Boolean})],zt.prototype,"outlined",void 0);ys([(0,On.property)({type:Boolean})],zt.prototype,"error",void 0);ys([(0,On.property)({type:Boolean})],zt.prototype,"disabled",void 0);var Mu=f(b());var Du={"ft-input-label":zt};(0,Mu.customElements)(Du);var ne=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},dt=class extends(0,Te.toFtFormComponent)(Te.FtLitElement){constructor(){super(...arguments),this.label="",this.value="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.height=50,this.focused=!1}render(){let t={"ft-text-area":!0,"ft-text-area--filled":!this.outlined,"ft-text-area--outlined":this.outlined,"ft-text-area--disabled":this.disabled,"ft-text-area--has-value":!!this.value,"ft-text-area--no-label":!this.label,"ft-text-area--in-error":this.error};return In.html`
|
|
1018
1018
|
<style>
|
|
1019
1019
|
.ft-text-area--main-panel {
|
|
1020
1020
|
height: calc(4 * ${B.verticalSpacing} + ${B.labelSize} + ${B.fontSize} + ${this.height}px);
|
|
@@ -1108,7 +1108,7 @@
|
|
|
1108
1108
|
<ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
|
|
1109
1109
|
`:Ze.html`
|
|
1110
1110
|
<slot part="icon" name="icon"></slot>
|
|
1111
|
-
`}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,oe.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};N.elementDefinitions={"ft-ripple":$,"ft-tooltip":et,"ft-icon":rt,"ft-loader":xr,"ft-typography":tt};N.styles=[oe.safariEllipsisFix,ea,oe.noTextSelect];X([(0,K.property)({type:Boolean})],N.prototype,"primary",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"outlined",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"dense",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"round",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"disabled",void 0);X([(0,K.property)()],N.prototype,"icon",void 0);X([(0,K.property)()],N.prototype,"iconVariant",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"trailingIcon",void 0);X([(0,K.property)()],N.prototype,"label",void 0);X([(0,K.property)()],N.prototype,"type",void 0);X([(0,K.property)()],N.prototype,"href",void 0);X([(0,K.property)()],N.prototype,"target",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"loading",void 0);X([(0,K.property)({attribute:"aria-label"})],N.prototype,"ariaLabel",void 0);X([(0,K.property)()],N.prototype,"ariaHasPopup",void 0);X([(0,K.property)({attribute:"aria-pressed"})],N.prototype,"ariaPressed",void 0);X([(0,K.property)()],N.prototype,"tooltipPosition",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"hideTooltip",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"forceTooltip",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"activated",void 0);X([(0,K.query)(".ft-button")],N.prototype,"button",void 0);X([(0,K.query)(".ft-button--label slot")],N.prototype,"slottedContent",void 0);X([(0,K.query)("[part=tooltip]")],N.prototype,"tooltip",void 0);var Wu=f(b());var zu={"ft-button":N};(0,Wu.customElements)(zu);var M=qe.build("integratedFeedbackComponent"),Ku={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review"};var
|
|
1111
|
+
`}focus(){var t;(t=this.button)===null||t===void 0||t.focus()}showTooltip(){var t;(t=this.tooltip)===null||t===void 0||t.show()}showTemporaryTooltip(t,r){var i;return(i=this.tooltip)===null||i===void 0?void 0:i.showTemporaryText(t,r)}setTooltipManual(t){this.tooltip&&(this.tooltip.manual=t)}click(){var t;(t=this.button)===null||t===void 0||t.click()}getLabel(){return this.label||this.getTextContent()}getTextContent(){return(0,oe.unslotText)(this.slottedContent).trim()}hasTextContent(){return this.getTextContent().length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}};N.elementDefinitions={"ft-ripple":$,"ft-tooltip":et,"ft-icon":rt,"ft-loader":xr,"ft-typography":tt};N.styles=[oe.safariEllipsisFix,ea,oe.noTextSelect];X([(0,K.property)({type:Boolean})],N.prototype,"primary",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"outlined",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"dense",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"round",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"disabled",void 0);X([(0,K.property)()],N.prototype,"icon",void 0);X([(0,K.property)()],N.prototype,"iconVariant",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"trailingIcon",void 0);X([(0,K.property)()],N.prototype,"label",void 0);X([(0,K.property)()],N.prototype,"type",void 0);X([(0,K.property)()],N.prototype,"href",void 0);X([(0,K.property)()],N.prototype,"target",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"loading",void 0);X([(0,K.property)({attribute:"aria-label"})],N.prototype,"ariaLabel",void 0);X([(0,K.property)()],N.prototype,"ariaHasPopup",void 0);X([(0,K.property)({attribute:"aria-pressed"})],N.prototype,"ariaPressed",void 0);X([(0,K.property)()],N.prototype,"tooltipPosition",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"hideTooltip",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"forceTooltip",void 0);X([(0,K.property)({type:Boolean})],N.prototype,"activated",void 0);X([(0,K.query)(".ft-button")],N.prototype,"button",void 0);X([(0,K.query)(".ft-button--label slot")],N.prototype,"slottedContent",void 0);X([(0,K.query)("[part=tooltip]")],N.prototype,"tooltip",void 0);var Wu=f(b());var zu={"ft-button":N};(0,Wu.customElements)(zu);var M=qe.build("integratedFeedbackComponent"),Ku={starsRating:"{0} stars","starsRating[\\=1]":"1 star",like:"Like",dislike:"Dislike",dichotomousYes:"Yes",dichotomousNo:"No",notRated:"Not rated",ratedNow:"Rated now",ratedToday:"Rated today",ratedOn:"Rated on {0, date}",feedbackInputLabel:"How can we improve it?",feedbackfromEmail:"Your email",feedbackfromEmailInvalid:"Please enter a valid email address",okButton:"Send feedback",cancelButton:"Cancel",moreOptionsButton:"More options",feedbackSuccess:"Feedback successfully sent. Thank you!",feedbackFailure:"Failed to send feedback. Please try again later.",ratingSuccess:"Rating successfully sent. Thank you!",ratingFailure:"Failed to send rating. Please try again later.",mapFeedbackMainTitle:"Send feedback",mapRatingSectionTitle:"Rate this document",mapDichotomousRatingSectionTitle:"Did it solve your problem?",mapFeedbackSectionTitle:"Write your review",topicFeedbackMainTitle:"Send feedback",topicRatingSectionTitle:"Rate this content",topicDichotomousRatingSectionTitle:"Did this content solve your problem?",topicFeedbackSectionTitle:"Write your review"};var Pn=class extends CustomEvent{constructor(t){super("live-change",{detail:t})}},Ln=class extends CustomEvent{constructor(t){super("change",{detail:t})}},kn=class extends CustomEvent{constructor(t){super("invalid",{detail:t})}};var Gu=f(k()),C=f(b());var P={fontSize:C.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:C.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:C.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:C.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:C.FtCssVariableFactory.extend("--ft-text-field-helper-color","",C.designSystemVariables.colorOnSurfaceMedium),colorPrimary:C.FtCssVariableFactory.external(C.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:C.FtCssVariableFactory.external(C.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:C.FtCssVariableFactory.external(C.designSystemVariables.borderRadiusS,"Design system"),colorError:C.FtCssVariableFactory.external(C.designSystemVariables.colorError,"Design system"),prefixColor:C.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",C.designSystemVariables.colorOnSurfaceMedium),iconColor:C.FtCssVariableFactory.extend("--ft-text-field-icon-color","",C.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:C.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:C.FtCssVariableFactory.extend("--ft-text-field-background-color","",C.designSystemVariables.colorSurface),colorOutline:C.FtCssVariableFactory.external(C.designSystemVariables.colorOutline,"Design system"),elevation02:C.FtCssVariableFactory.external(C.designSystemVariables.elevation02,"Design system"),suggestSize:C.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},qu=Gu.css`
|
|
1112
1112
|
*:focus {
|
|
1113
1113
|
outline: none;
|
|
1114
1114
|
}
|
|
@@ -1118,21 +1118,21 @@
|
|
|
1118
1118
|
flex-direction: column;
|
|
1119
1119
|
align-items: stretch;
|
|
1120
1120
|
position: relative;
|
|
1121
|
-
--text-field-internal-suggest-size: ${
|
|
1121
|
+
--text-field-internal-suggest-size: ${P.suggestSize};
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
1124
|
ft-input-label {
|
|
1125
|
-
${(0,C.setVariable)(w.fontSize,
|
|
1126
|
-
${(0,C.setVariable)(w.raisedFontSize,
|
|
1127
|
-
${(0,C.setVariable)(w.verticalSpacing,
|
|
1128
|
-
${(0,C.setVariable)(w.horizontalSpacing,
|
|
1129
|
-
${(0,C.setVariable)(w.backgroundColor,
|
|
1125
|
+
${(0,C.setVariable)(w.fontSize,P.fontSize)};
|
|
1126
|
+
${(0,C.setVariable)(w.raisedFontSize,P.labelSize)};
|
|
1127
|
+
${(0,C.setVariable)(w.verticalSpacing,P.verticalSpacing)};
|
|
1128
|
+
${(0,C.setVariable)(w.horizontalSpacing,P.horizontalSpacing)};
|
|
1129
|
+
${(0,C.setVariable)(w.backgroundColor,P.backgroundColor)};
|
|
1130
1130
|
}
|
|
1131
1131
|
|
|
1132
1132
|
.ft-text-field--main-panel {
|
|
1133
1133
|
position: relative;
|
|
1134
1134
|
display: flex;
|
|
1135
|
-
height: calc(4 * ${
|
|
1135
|
+
height: calc(4 * ${P.verticalSpacing} + ${P.labelSize} + ${P.fontSize});
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
1138
|
.ft-text-field--input-panel {
|
|
@@ -1141,10 +1141,10 @@
|
|
|
1141
1141
|
display: flex;
|
|
1142
1142
|
align-items: center;
|
|
1143
1143
|
overflow: hidden;
|
|
1144
|
-
padding: 0 ${
|
|
1144
|
+
padding: 0 ${P.horizontalSpacing};
|
|
1145
1145
|
|
|
1146
|
-
${(0,C.setVariable)(qt.fontSize,
|
|
1147
|
-
${(0,C.setVariable)(qt.lineHeight,
|
|
1146
|
+
${(0,C.setVariable)(qt.fontSize,P.fontSize)};
|
|
1147
|
+
${(0,C.setVariable)(qt.lineHeight,P.fontSize)};
|
|
1148
1148
|
}
|
|
1149
1149
|
|
|
1150
1150
|
.ft-text-field--input-panel ft-ripple {
|
|
@@ -1154,11 +1154,11 @@
|
|
|
1154
1154
|
|
|
1155
1155
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input-panel {
|
|
1156
1156
|
align-items: flex-end;
|
|
1157
|
-
padding: 0 ${
|
|
1157
|
+
padding: 0 ${P.horizontalSpacing} ${P.verticalSpacing} ${P.horizontalSpacing};
|
|
1158
1158
|
}
|
|
1159
1159
|
|
|
1160
1160
|
.ft-text-field--prefix {
|
|
1161
|
-
color: ${
|
|
1161
|
+
color: ${P.prefixColor};
|
|
1162
1162
|
margin-right: 2px;
|
|
1163
1163
|
flex-shrink: 1;
|
|
1164
1164
|
overflow: hidden;
|
|
@@ -1177,22 +1177,22 @@
|
|
|
1177
1177
|
flex-shrink: 1;
|
|
1178
1178
|
min-width: 0; /* flex sets this to auto an prevents input from shrinking properly */
|
|
1179
1179
|
|
|
1180
|
-
color: ${
|
|
1181
|
-
padding: calc(2 * ${
|
|
1180
|
+
color: ${P.colorOnSurface};
|
|
1181
|
+
padding: calc(2 * ${P.verticalSpacing}) 0;
|
|
1182
1182
|
border: none;
|
|
1183
1183
|
background: none;
|
|
1184
1184
|
|
|
1185
1185
|
&:-webkit-autofill,
|
|
1186
1186
|
&:-webkit-autofill:hover,
|
|
1187
1187
|
&:-webkit-autofill:focus {
|
|
1188
|
-
-webkit-text-fill-color: ${
|
|
1188
|
+
-webkit-text-fill-color: ${P.colorOnSurface};
|
|
1189
1189
|
transition: background-color 50000000s ease-in-out 100000s;
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
1193
|
.ft-text-field--filled.ft-text-field--with-label .ft-text-field--input {
|
|
1194
1194
|
padding-bottom: 0;
|
|
1195
|
-
padding-top: calc(${
|
|
1195
|
+
padding-top: calc(${P.labelSize} + 2 * ${P.verticalSpacing});
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
1198
|
.ft-text-field--input::-webkit-calendar-picker-indicator,
|
|
@@ -1201,37 +1201,37 @@
|
|
|
1201
1201
|
}
|
|
1202
1202
|
|
|
1203
1203
|
.ft-text-field--disabled .ft-text-field--input {
|
|
1204
|
-
color: ${
|
|
1204
|
+
color: ${P.colorOnSurfaceDisabled};
|
|
1205
1205
|
}
|
|
1206
1206
|
|
|
1207
1207
|
.ft-text-field:not(.ft-text-field--disabled):focus-within ft-input-label {
|
|
1208
|
-
${(0,C.setVariable)(w.borderColor,
|
|
1209
|
-
${(0,C.setVariable)(w.textColor,
|
|
1208
|
+
${(0,C.setVariable)(w.borderColor,P.colorPrimary)};
|
|
1209
|
+
${(0,C.setVariable)(w.textColor,P.colorPrimary)};
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
1212
|
.ft-text-field--filled .ft-text-field--input-panel {
|
|
1213
|
-
border-radius: ${
|
|
1213
|
+
border-radius: ${P.borderRadiusS} ${P.borderRadiusS} 0 0;
|
|
1214
1214
|
}
|
|
1215
1215
|
|
|
1216
1216
|
.ft-text-field--outlined .ft-text-field--input-panel {
|
|
1217
|
-
border-radius: ${
|
|
1217
|
+
border-radius: ${P.borderRadiusS};
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
1220
|
.ft-text-field--helper-text {
|
|
1221
|
-
padding: 0 12px 0 ${
|
|
1222
|
-
color: ${
|
|
1221
|
+
padding: 0 12px 0 ${P.horizontalSpacing};
|
|
1222
|
+
color: ${P.helperColor};
|
|
1223
1223
|
}
|
|
1224
1224
|
|
|
1225
1225
|
.ft-text-field--in-error .ft-text-field--input,
|
|
1226
1226
|
.ft-text-field--in-error .ft-text-field--helper-text,
|
|
1227
1227
|
.ft-text-field--in-error .ft-text-field--prefix {
|
|
1228
|
-
color: ${
|
|
1228
|
+
color: ${P.colorError};
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
1231
|
.ft-text-field--icon {
|
|
1232
1232
|
align-self: center;
|
|
1233
1233
|
margin-left: 8px;
|
|
1234
|
-
color: ${
|
|
1234
|
+
color: ${P.iconColor};
|
|
1235
1235
|
}
|
|
1236
1236
|
|
|
1237
1237
|
.ft-text-field--container {
|
|
@@ -1242,11 +1242,11 @@
|
|
|
1242
1242
|
display: none;
|
|
1243
1243
|
flex-direction: column;
|
|
1244
1244
|
position: absolute;
|
|
1245
|
-
z-index: ${
|
|
1246
|
-
background: ${
|
|
1247
|
-
border: 1px solid ${
|
|
1248
|
-
border-radius: 0 0 ${
|
|
1249
|
-
box-shadow: ${
|
|
1245
|
+
z-index: ${P.floatingZIndex};
|
|
1246
|
+
background: ${P.backgroundColor};
|
|
1247
|
+
border: 1px solid ${P.colorOutline};
|
|
1248
|
+
border-radius: 0 0 ${P.borderRadiusS} ${P.borderRadiusS};
|
|
1249
|
+
box-shadow: ${P.elevation02};
|
|
1250
1250
|
outline: none;
|
|
1251
1251
|
max-height: var(--text-field-internal-suggest-size);
|
|
1252
1252
|
overflow-y: auto;
|
|
@@ -1267,7 +1267,7 @@
|
|
|
1267
1267
|
.ft-text-field--with-password ft-icon:hover {
|
|
1268
1268
|
cursor: pointer;
|
|
1269
1269
|
}
|
|
1270
|
-
`;var ht=f(k()),
|
|
1270
|
+
`;var ht=f(k()),L=f(F()),Ju=f(bs()),td=f(_e());var Wt=f(b());var Zu=f(b()),Ri=f(k()),Sr=f(F());var Yu=f(k());var Xu=Yu.css`
|
|
1271
1271
|
.ft-text-field-suggestion {
|
|
1272
1272
|
position: relative;
|
|
1273
1273
|
padding: 8px 16px;
|
|
@@ -1297,7 +1297,7 @@
|
|
|
1297
1297
|
}
|
|
1298
1298
|
|
|
1299
1299
|
.ft-text-field-suggestion--helper-text {
|
|
1300
|
-
color: ${
|
|
1300
|
+
color: ${P.helperColor};
|
|
1301
1301
|
}
|
|
1302
1302
|
|
|
1303
1303
|
slot {
|
|
@@ -1393,7 +1393,7 @@
|
|
|
1393
1393
|
.variant=${this.iconVariant}
|
|
1394
1394
|
.value=${this.icon}
|
|
1395
1395
|
@click=${()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()}}></ft-icon>
|
|
1396
|
-
`:ht.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var r,i,n;!((r=this.input)===null||r===void 0)&&r.matches(":autofill")&&this.dispatchedValue!==((i=this.input)===null||i===void 0?void 0:i.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,r=!1){var i,n;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new
|
|
1396
|
+
`:ht.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var r,i,n;!((r=this.input)===null||r===void 0)&&r.matches(":autofill")&&this.dispatchedValue!==((i=this.input)===null||i===void 0?void 0:i.value)&&this.setValue((n=this.input)===null||n===void 0?void 0:n.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,r=!1){var i,n;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new Pn(t))),r&&this.dispatchedValue!==t&&(this.inputValid=(n=(i=this.input)===null||i===void 0?void 0:i.checkValidity())!==null&&n!==void 0?n:!0,this.inputValid?(this.dispatchedValue=t,this.dispatchEvent(new Ln(t))):this.dispatchEvent(new kn(this.input.validationMessage)))}handleInput(t){var r;let i=((r=this.input)===null||r===void 0?void 0:r.value)||"";this.setValue(i,t.key=="Escape"||t.key=="Enter")}catchComposingEvents(t){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var r;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let i=this.visibleSuggestions.findIndex(o=>o.matches(":focus-within")),n;t.key==="ArrowDown"?n=i<this.visibleSuggestions.length-1?i+1:0:n=i>0?i-1:this.visibleSuggestions.length-1,(r=this.visibleSuggestions[n])===null||r===void 0||r.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var r;this.setValue(t.detail,!0),(r=this.input)===null||r===void 0||r.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,r;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((r=this.input)===null||r===void 0?void 0:r.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let t=["bottom","top"];(0,Wt.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",t,"fixed","--text-field-internal-suggest-size",0).then(({x:r,y:i})=>{this.suggestionsContainer.style.left=`${r}px`,this.suggestionsContainer.style.top=`${i}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};_.elementDefinitions={"ft-input-label":zt,"ft-ripple":$,"ft-typography":tt,"ft-icon":rt,"ft-text-field-suggestion":se};_.styles=[Ir,Wt.noTextInputDefaultClearButton,qu];D([(0,L.property)()],_.prototype,"label",void 0);D([(0,L.property)({noAccessor:!0})],_.prototype,"value",null);D([(0,L.state)()],_.prototype,"dispatchedValue",void 0);D([(0,L.property)()],_.prototype,"helper",void 0);D([(0,L.property)()],_.prototype,"suggestionsHelper",void 0);D([(0,L.property)({type:Boolean})],_.prototype,"outlined",void 0);D([(0,L.property)({type:Boolean})],_.prototype,"disabled",void 0);D([(0,L.property)({type:Boolean})],_.prototype,"error",void 0);D([(0,L.property)({type:Boolean})],_.prototype,"fixedMenuPosition",void 0);D([(0,L.property)()],_.prototype,"prefix",void 0);D([(0,L.property)()],_.prototype,"icon",void 0);D([(0,L.property)()],_.prototype,"name",void 0);D([(0,L.property)()],_.prototype,"type",void 0);D([(0,L.property)()],_.prototype,"passwordHiddenIcon",void 0);D([(0,L.property)()],_.prototype,"passwordRevealedIcon",void 0);D([(0,L.property)()],_.prototype,"iconVariant",void 0);D([(0,L.property)({type:Boolean})],_.prototype,"filterSuggestions",void 0);D([(0,Wt.numberProperty)()],_.prototype,"maxLength",void 0);D([(0,L.property)({type:Boolean})],_.prototype,"password",void 0);D([(0,L.property)({type:String})],_.prototype,"autocomplete",void 0);D([(0,L.property)({attribute:!1})],_.prototype,"suggestionsProvider",void 0);D([(0,L.state)()],_.prototype,"focused",void 0);D([(0,L.state)()],_.prototype,"inputValid",void 0);D([(0,L.state)()],_.prototype,"hidePassword",void 0);D([(0,L.state)()],_.prototype,"hideSuggestions",void 0);D([(0,L.state)()],_.prototype,"visibleSuggestions",void 0);D([(0,L.state)()],_.prototype,"providedSuggestions",void 0);D([(0,L.query)(".ft-text-field--main-panel")],_.prototype,"mainPanel",void 0);D([(0,L.query)(".ft-text-field--input")],_.prototype,"input",void 0);D([(0,L.query)(".ft-text-field-suggestion--new-value")],_.prototype,"newValueSuggestion",void 0);D([(0,L.query)(".ft-text-field--suggestions")],_.prototype,"suggestionsContainer",void 0);D([(0,L.queryAll)("ft-text-field-suggestion")],_.prototype,"providedSuggestionsInDom",void 0);D([(0,L.queryAssignedElements)({selector:"ft-text-field-suggestion"})],_.prototype,"slottedSuggestions",void 0);D([(0,Wt.ignoreComposingEvents)()],_.prototype,"handleInput",null);D([(0,Wt.ignoreComposingEvents)()],_.prototype,"catchComposingEvents",null);var rd=f(b());var ed={"ft-text-field":_,"ft-text-field-suggestion":se};(0,rd.customElements)(ed);var id=f(k());var nd=id.css`
|
|
1397
1397
|
`;var Oi=f(k()),Ar=f(F()),yt=f(b());var Nt=f(b());var od=f(b()),Wp={setTranslationDestinationLanguage:(e,t)=>{e.translation.destinationLanguage=t.payload},setTranslationSourceLanguage:(e,t)=>{e.translation.sourceLanguage=t.payload},setTranslationProfileId:(e,t)=>{e.translation.profileId=t.payload},setTranslationLoading:(e,t)=>{e.translation.isLoading=t.payload},setTranslationError:(e,t)=>{e.translation.isError=t.payload},setTopicsRating:(e,t)=>{for(let r in t.payload)e.topicsRating[r]=t.payload[r]}},sd=e=>od.FtReduxStore.get({name:"ft-reader-"+e,initialState:{mapId:void 0,renderedTopics:[],visibleTopics:[],map:void 0,toc:void 0,pagesToc:void 0,paginationConfiguration:void 0,currentPage:void 0,scrollTarget:void 0,configuration:void 0,searchInDocumentQuery:void 0,relatives:void 0,mapRating:void 0,topicsRating:{},translation:{sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1},linkPreviewDialogId:void 0},reducers:Wp});var As=class{constructor(t,r){this.mapId=t,this.paginatedToc=r,this.nodeByTocId={},this.nodeByUrl={},this.duplicatedPrettyUrls=new Set,this.pages=[],this.pageByTocId={}}build(){return{paginationConfiguration:this.paginatedToc.configuration,toc:this.convertNodes(this.paginatedToc.paginatedToc,1),pagesToc:this.extractPagesToc(this.paginatedToc.paginatedToc,1),nodeByTocId:this.nodeByTocId,nodeByUrl:this.nodeByUrl,duplicatedPrettyUrls:this.duplicatedPrettyUrls,pages:this.pages,pageByTocId:this.pageByTocId,translationError:this.paginatedToc.translationError}}extractPagesToc(t,r,i){return t.flatMap(n=>{var o;return n.pageConfiguration&&this.registerPage(this.buildPage(n,i)),n.tocId==null?this.extractPagesToc(n.children,r,i):[{tocId:n.tocId,title:(o=n.title)!==null&&o!==void 0?o:"",untranslatedTitle:n.untranslatedTitle,depth:r,children:this.extractPagesToc(n.children,r+1,n.tocId)}]})}convertNodes(t,r,i){return t.flatMap(n=>{var o,s,a;if(n.tocId==null)return[...this.convertSectionNodes((o=n.pageToc)!==null&&o!==void 0?o:[],r,n.tocId),...this.convertNodes(n.children,r,n.tocId)];let l=(s=n.prettyUrl)===null||s===void 0?void 0:s.replace(/^\//,""),c={tocId:n.tocId,contentId:n.contentId,title:n.title,untranslatedTitle:n.untranslatedTitle,hasRating:n.hasRating,origin:n.origin,prettyUrl:l,depth:r,parentTocId:i,children:[]};this.register(c);let u=this.convertSectionNodes((a=n.pageToc)!==null&&a!==void 0?a:[],r+1,n.tocId),d=this.convertNodes(n.children,r+1,c.tocId);return c.children=[...u,...d],[c]})}convertSectionNodes(t,r,i){return t.flatMap(n=>{var o;let s=(o=n.prettyUrl)===null||o===void 0?void 0:o.replace(/^\//,""),a={...n,prettyUrl:s,depth:r,parentTocId:i,children:[]};return this.register(a),a.children=this.convertSectionNodes(n.children,r+1,n.tocId),[a]})}buildPage(t,r){var i,n,o,s,a,l,c;let u=(i=t.tocId)!==null&&i!==void 0?i:(n=t.pageToc)===null||n===void 0?void 0:n[0].tocId,d={number:this.pages.length+1,title:(o=t.title)!==null&&o!==void 0?o:"",untranslatedTitle:t.untranslatedTitle,rootTocId:u??"root",toc:((s=t.pageToc)!==null&&s!==void 0?s:[]).map(g=>this.nodeByTocId[g.tocId]),topics:[],hiddenTopics:[],rootDepth:u?this.nodeByTocId[u].depth:1,breadcrumb:r?this.buildBreadcrumb(this.nodeByTocId[r]):[]},p=(g,x)=>(x?d.topics:d.hiddenTopics).push(g),h=(l=(a=t.pageConfiguration)===null||a===void 0?void 0:a.parentsVisibility)!==null&&l!==void 0?l:[];d.breadcrumb.forEach((g,x)=>{p(g,h[x])}),t.tocId&&p(t.tocId,t.pageConfiguration.isVisible),d.topics.push(...this.tocIds((c=t.pageToc)!==null&&c!==void 0?c:[]));let m=this.resolveOverridenRootTocIdByParentForcedByPagination(d.breadcrumb,h);return d.rootTocId=m??d.rootTocId,d.rootDepth=m?this.nodeByTocId[m].depth:d.rootDepth,d}resolveOverridenRootTocIdByParentForcedByPagination(t,r){for(let i=0;i<t.length;i++)if(r[i])return t[i]}registerPage(t){for(let r of[...t.topics,...t.hiddenTopics])this.pageByTocId[r]||(this.pageByTocId[r]=t);this.pages.push(t)}tocIds(t){return t.flatMap(r=>[r.tocId,...this.tocIds(r.children)])}buildBreadcrumb(t){let r=[t.tocId];for(;t?.parentTocId;)r.unshift(t.parentTocId),t=this.nodeByTocId[t.parentTocId];return r}register(t){t.prettyUrl&&(this.nodeByUrl[t.prettyUrl]==null?this.nodeByUrl[t.prettyUrl]=t:this.duplicatedPrettyUrls.add(t.prettyUrl)),this.nodeByUrl[`${this.mapId}/${t.tocId}`]=t,this.nodeByTocId[t.tocId]=t}},Mn=class{convertPaginatedToc(t,r){return new As(t,r).build()}};var Nn=class extends Et{get mapId(){return this._mapId}set mapId(t){t!==this._mapId&&this.clear(),this._mapId=t}constructor(t,r,i){super(!1,r),this.converter=t,this._mapId=i,this.initCache()}async withMapId(t){return this._mapId?t(this._mapId):void 0}initCache(){this.cache.register("configuration",()=>this.api.getReaderConfiguration()),this.cache.register("map",()=>this.withMapId(t=>this.fetchMap(t))),this.cache.register("enrichedToc",()=>this.withMapId(t=>this.fetchPages(t).then(r=>this.converter.convertPaginatedToc(t,r)))),this.cache.register("ratingSummary",()=>{var t,r;return Ce((r=(t=S.getState().session)===null||t===void 0?void 0:t.profile.roles)!==null&&r!==void 0?r:[],"RATING_USER")?this.withMapId(n=>this.fetchMapRating(n)):Promise.resolve()})}clear(){this.cache.clearMatching(t=>t!=="configuration")}makeCacheKey(t,r){return t+(r?"-destinationLanguage-"+r?.destinationLanguage:"")}getMap(t){return this.cache.get(this.makeCacheKey("map",t),()=>this.fetchMap(this.mapId,t))}getMapNow(t){return this.cache.getNow(this.makeCacheKey("map",t))}getConfiguration(){return this.cache.get("configuration")}clearConfiguration(){this.cache.clear("configuration")}getEnrichedToc(t){return this.cache.get(this.makeCacheKey("enrichedToc",t),()=>this.fetchPages(this.mapId,t).then(r=>this.converter.convertPaginatedToc(this.mapId,r)))}getEnrichedTocNow(t){return this.cache.getNow(this.makeCacheKey("enrichedToc",t))}async getPaginationConfiguration(){return(await this.getEnrichedToc()).paginationConfiguration}async getToc(t){return(await this.getEnrichedToc(t)).toc}async getPagesToc(t){return(await this.getEnrichedToc(t)).pagesToc}async getTranslationError(t){return(await this.getEnrichedToc(t)).translationError}async getTocNode(t,r){return(await this.getEnrichedToc(r)).nodeByTocId[t]}getTocNodeNow(t,r){var i;return(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.nodeByTocId[t]}getTocNodeNowByUrl(t,r){var i,n;let o=this.getMapNow(r);return o?.prettyUrl==t||`${o?.id}/root`===t?(i=this.getEnrichedTocNow(r))===null||i===void 0?void 0:i.toc[0]:(n=this.getEnrichedTocNow(r))===null||n===void 0?void 0:n.nodeByUrl[t]}async getPage(t,r){let i=await this.getEnrichedToc(r);return i.pages[t-1]||i.pages[0]}async getPageByTocId(t,r){let i=await this.getEnrichedToc(r);return i.pageByTocId[t]||i.pages[0]}getTopicInfo(t){return this.cache.get("topic-"+t.tocId,()=>this.fetchTopicMetadata(t))}getTopicContent(t){return this.cache.get("topic-content-"+t.tocId,()=>this.fetchTopicHTMLContent(t))}getTranslatedTopicContent(t,r){return this.cache.get(this.makeCacheKey("translated-topic-content-"+t.tocId,r),()=>this.fetchTranslatedTopicHTMLContent(t,r))}async getTopicMetadataValue(t,r){let i=this.getTocNodeNow(t);if(!i)return;let n=await this.getTopicInfo(i);return n?.metadata.find(o=>o.key==r)}getAttachments(){return this.cache.get("map-attachments",()=>this.fetchAttachments())}clearMapAttachments(){this.cache.clear("map-attachments")}getRelativesForDocument(t,r){return this.cache.get("document-relatives-"+t+"-"+r.join("-"),()=>this.fetchRelativesForDocument(t,r))}getRelativesForTopicInMap(t,r,i){return this.cache.get("topic-relatives-"+[t,r,...i].join("-"),()=>this.fetchRelativesForTopicInMap(t,r,i))}getAttachmentDownloadLink(t){return this.makeAbsolute(`${this.api.endpoints.khub.maps.mapId(this.mapId).attachments.attachmentId(t).content}?download=true&locationValue=reader`)}getLink(t,r,i){let n=this.getNavigationData(t,r,i),o=this.getReaderLinkPrefix()+(n.prettyUrl?n.prettyUrl:`${n.mapId}/${n.tocId}`),s=new URL(o,this.api.tenantBaseUrl);return n.page!=null&&s.searchParams.set("page",`${n.page}`),n.prettyUrlDuplicated&&s.searchParams.set("tocId",n.tocId),n.section!=null&&s.searchParams.set("section",n.section),s.href}getNavigationData(t,r,i,n){var o,s;t=t||"root";let a=this.getEnrichedTocNow(n),l=a?.pageByTocId[t],c=a?.nodeByTocId[t],u=c?.prettyUrl;return{mapId:this.mapId,tocId:t,topicTitle:(o=c?.title)!==null&&o!==void 0?o:"",untranslatedTopicTitle:c?.untranslatedTitle,page:r&&l&&l.number!==r?r:void 0,prettyUrl:u?.replace(/^r\//,""),prettyUrlDuplicated:(s=a?.duplicatedPrettyUrls.has(u??""))!==null&&s!==void 0?s:!1,section:i}}async getAccurateNavigationData(t,r,i,n){return await this.getEnrichedToc(n),this.getNavigationData(t,r,i,n)}getRatingSummary(){return this.cache.get("ratingSummary")}reloadRating(){return this.cache.clear("ratingSummary"),this.getRatingSummary()}getMapRating(){return this.getRatingSummary().then(t=>t?.publication)}getTopicRating(t){return this.getRatingSummary().then(r=>{var i;return r?{type:r.topics.type,rating:(i=r.topics)===null||i===void 0?void 0:i.ratings.find(n=>n.tocId===t)}:void 0})}rateMap(t,r){return this.makeRateMapRequest(t,r).then(()=>this.clearRatingIfNecessary())}unrateMap(){return this.makeUnrateMapRequest().then(()=>this.clearRatingIfNecessary())}sendMapFeedback(t,r){return this.makeMapFeedbackRequest(t,r)}rateTopic(t,r,i){return this.makeRateTopicRequest(t,r,i).then(()=>this.clearRatingIfNecessary())}unrateTopic(t){return this.makeUnrateTopicRequest(t).then(()=>this.clearRatingIfNecessary())}async clearRatingIfNecessary(){let t=S.getState().session;t?.sessionAuthenticated&&this.cache.clear("ratingSummary")}sendTopicFeedback(t,r,i){return this.makeTopicFeedbackRequest(t,r,i)}fontsStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts)}themeStylesheet(){return this.api.makeAbsolute(this.api.endpoints.stylesheets.theme)}buildBreadcrumb(t,r){let i=this.getTocNodeNow(t,r),n=[{tocId:i.tocId,title:i.title,untranslatedTitle:i.untranslatedTitle}],o=this.getTocNodeNow(i.parentTocId,r);for(;o;)n.unshift({tocId:o.tocId,title:o.title,untranslatedTitle:o.untranslatedTitle}),o=this.getTocNodeNow(o.parentTocId,r);return n}isFeatureAccessible(t,{session:r}){var i;if(!this.isFeatureAvailable(t))return!1;switch(t){case Gt.FEEDBACK:return Ce(r??[],z.FEEDBACK_USER);case Gt.RATING:return Ce(r??[],z.RATING_USER);case Gt.PRINT:return Ce(r??[],z.PRINT_USER);case Gt.BOOKMARK:return!!r?.sessionAuthenticated;case Gt.COLLECTIONS:return Ce(r??[],z.COLLECTION_USER);case Gt.PERSONAL_BOOKS:return Ce(r??[],z.PERSONAL_BOOK_USER)&&!(!((i=this.getMapNow())===null||i===void 0)&&i.pbkConfidential);default:return!1}}makeAbsolute(t){return this.api.makeAbsolute(t)}};var $n=class e extends Nn{static async build(t){return new e(new Mn,void 0,t)}clear(){super.clear(),this.fingerprint=void 0}async fetchMap(t,r){let i=await this.api.getMap(t,r);return this.fingerprint=i.fingerprint,i}fetchMapRating(t){return this.api.getMapRating(t)}async fetchPages(t,r){return await this.getMap(r),this.api.getPages(t,this.fingerprint,r)}fetchTopicHTMLContent(t){return this.api.getTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint)}fetchTranslatedTopicHTMLContent(t,r){return this.api.getTranslatedTopicHTMLContent(this.mapId,t.contentId,"DESIGNED_READER",this.fingerprint,r)}fetchTopicMetadata(t){return this.api.getTopic(this.mapId,t.contentId,this.fingerprint)}fetchAttachments(){return this.api.getMapAttachments(this.mapId).catch(()=>[])}fetchRelativesForDocument(t,r){let i={query:"",paging:{page:1,perPage:-1},scope:"DOCUMENTS",metadataFilters:[{key:t,valueFilter:{negative:!1,values:r}}],sort:[],facets:[]};return this.api.search(i)}fetchRelativesForTopicInMap(t,r,i){let n={query:"",paging:{page:1,perPage:1},scope:"ALL_TOPICS",metadataFilters:[{key:r,valueFilter:{negative:!1,values:i}},{key:"ft:publicationId",valueFilter:{negative:!1,values:[t]}}],sort:[],facets:[]};return this.api.search(n)}makeMapFeedbackRequest(t,r){return this.api.sendMapFeedback(this.mapId,t,r)}makeRateMapRequest(t,r){return this.api.rateMap(this.mapId,t,r)}makeRateTopicRequest(t,r,i){return this.api.rateTopic(this.mapId,t,r,i)}makeTopicFeedbackRequest(t,r,i){return this.api.sendTopicFeedback(this.mapId,t,r,i)}makeUnrateMapRequest(){return this.api.unrateMap(this.mapId)}makeUnrateTopicRequest(t){return this.api.unrateTopic(this.mapId,t)}getReaderLinkPrefix(){return"r/"}isFeatureAvailable(t){return!0}};var Kp="topicPivot";function ad(e,t){let r=new URL(e);return t?.values.forEach(i=>{r.searchParams.append(Kp,i)}),r.href}var Un=class e{static build(t,r){return new e(sd(t.trim()||"context"),r??$n.build)}loaded(){return(0,Nt.waitUntil)(()=>this._loaded)}constructor(t,r,i,n){this.store=t,this.clusteringHelperProvider=i,this.metadataForSwitchToRelatives=new Set,this._loaded=!1,this.loadDebouncer=new Nt.Debouncer(10),this.analyticsEventsService=n??new mn,this.initService(r)}async initService(t){return this.service=await t(),this.service.mapId=this.store.getState().mapId,this.reload()}async setMapId(t){t!==this.store.getState().mapId&&(this.store.actions.mapId(t),this.service&&(this.service.mapId=t),await this.reload())}setRenderedTopics(t){this.store.actions.renderedTopics(t)}setVisibleTopics(t){this.store.actions.visibleTopics(t)}async awaitService(){return(0,Nt.waitFor)(()=>this.service)}async navigateToTopic(t,r,i){await this.loaded();let n=await this.awaitService(),o=await(i!=null?n.getPage(i,this.getTranslationSettings()):n.getPageByTocId(t??"root",this.getTranslationSettings()));this.store.actions.currentPage(o);let s=this.resolveValidNonRootTocId(t,o);this.store.actions.scrollTarget({tocId:s,section:r}),this.store.getState().visibleTopics[0]!==s&&this.store.actions.visibleTopics([])}resolveValidNonRootTocId(t,r){var i,n,o;let s=(i=t==="root"?void 0:t)!==null&&i!==void 0?i:r.rootTocId;return r.topics.includes(s)?s:(t!="root"&&!r.hiddenTopics.includes(s)&&this.store.dispatchEvent(new CustomEvent(Tr.requestedTopicNotFound,{detail:{tocId:s}})),(o=(n=r.topics[0])!==null&&n!==void 0?n:r.hiddenTopics[0])!==null&&o!==void 0?o:"root")}async navigateToPage(t){await this.loaded();let i=await(await this.awaitService()).getPage(t,this.getTranslationSettings());this.store.actions.currentPage(i)}scrollDone(){this.store.actions.scrollTarget({})}async load(){var t;!((t=this.service)===null||t===void 0)&&t.mapId&&this.store.getState().map==null&&await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}clear(){var t;this._loaded=!1,this.store.actions.configuration(void 0),this.store.actions.map(void 0),this.store.actions.toc(void 0),this.store.actions.pagesToc(void 0),this.store.actions.currentPage(void 0),this.store.actions.searchInDocumentQuery(""),this.store.actions.relatives(void 0),this.store.actions.renderedTopics([]),this.store.actions.visibleTopics([]),this.store.actions.translation({sourceLanguage:void 0,destinationLanguage:void 0,profileId:void 0,isLoading:!1,isError:!1}),this.store.actions.mapRating(void 0),(t=this.service)===null||t===void 0||t.clear(),this.clusteringHelper=void 0}reload(){return this.clear(),this.load()}async fetchData(t){var r,i,n,o,s;try{t&&this.setTranslationLoading(!0);let a=l=>{throw t&&this.setTranslationError(!0),l};await Promise.all([this.loadConfiguration(),(r=this.service)===null||r===void 0?void 0:r.getMap(t).then(l=>this.store.actions.map(l)).catch(a),(i=this.service)===null||i===void 0?void 0:i.getToc(t).then(l=>this.store.actions.toc(l)).catch(a),(n=this.service)===null||n===void 0?void 0:n.getPagesToc(t).then(l=>this.store.actions.pagesToc(l)).catch(a),(o=this.service)===null||o===void 0?void 0:o.getPaginationConfiguration().then(l=>this.store.actions.paginationConfiguration(l)).catch(a),(s=this.service)===null||s===void 0?void 0:s.getTranslationError(t).then(l=>this.setTranslationError(l))]),this.metadataForSwitchToRelatives.size>0&&this.fetchRelatives(),this._loaded=!0,t&&this.setTranslationLoading(!1)}catch(a){this.errorHandler&&!(a instanceof Nt.CanceledPromiseError)&&this.errorHandler(a)}}loadConfiguration(){var t;return(t=this.service)===null||t===void 0?void 0:t.getConfiguration().then(r=>this.store.actions.configuration(r))}reloadConfiguration(){var t;return(t=this.service)===null||t===void 0||t.clearConfiguration(),this.loadConfiguration()}async fetchRelatives(){var t,r;let i=(t=this.store.getState().map)===null||t===void 0?void 0:t.metadata.filter(n=>{var o;return n.key==((o=this.store.getState().configuration)===null||o===void 0?void 0:o.relativePivotMetadata)}).flatMap(n=>n.values);if(i!==void 0&&i.length>0){let n=await((r=this.service)===null||r===void 0?void 0:r.getRelativesForDocument(this.store.getState().configuration.relativePivotMetadata,i)),o=n?.results.flatMap(s=>s.entries);this.store.actions.relatives(o)}this.updateClusteringHelper()}updateClusteringHelper(){this.clusteringHelper=this.createClusteringHelper(),this.clusteringHelper&&this.store.dispatchEvent(new Event(Tr.clusteringHelperCreated))}createClusteringHelper(){var t,r;if(this.clusteringHelperProvider)return this.clusteringHelperProvider();let i=this.store.getState().relatives;if(i){let n=i.find(s=>{var a;return((a=s.map)===null||a===void 0?void 0:a.mapId)==this.store.getState().mapId}),o=(r=(t=S.getState().metadataConfiguration)===null||t===void 0?void 0:t.descriptors)!==null&&r!==void 0?r:[];return new Nt.ClusteringHelper(i,n,this.metadataForSwitchToRelatives,o)}}async navigateToRelativeTopicIfFound(t){var r,i,n;await this.loaded();let o=await(0,Nt.waitFor)(()=>{var c;return(c=this.store.getState().configuration)===null||c===void 0?void 0:c.relativeTopicPivotMetadata}),s=this.store.getState().mapId,l=await(await this.awaitService()).getRelativesForTopicInMap(s,o,[t]);if(!((n=(i=(r=l?.results)===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.entries)===null||n===void 0)&&n[0]){let c=l.results[0].entries[0].topic.tocId;return await this.navigateToTopic(c),!0}else return await this.navigateToTopic("root"),!1}setSearchInDocumentQuery(t){this.store.actions.searchInDocumentQuery(t)}async setTranslationDestinationLanguage(t){this.store.actions.setTranslationDestinationLanguage(t),t&&this.sendDocumentOnDemandTranslateEvent(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationSourceLanguage(t){this.store.actions.setTranslationSourceLanguage(t),await this.loadDebouncer.run(()=>this.fetchData(this.getTranslationSettings()))}async setTranslationProfileId(t){this.store.actions.setTranslationProfileId(t)}async setTranslationLoading(t){this.store.actions.setTranslationLoading(t)}async setTranslationError(t){this.store.actions.setTranslationError(t)}getTranslationSettings(){var t;let r=this.store.getState();return r.translation.profileId&&r.translation.destinationLanguage?{profileId:r.translation.profileId,destinationLanguage:r.translation.destinationLanguage.code,sourceLanguage:(t=r.map)===null||t===void 0?void 0:t.lang}:void 0}setLinkPreviewDialogId(t){this.store.actions.linkPreviewDialogId(t)}async fetchMapRating(){var t;this.store.actions.mapRating(await((t=this.service)===null||t===void 0?void 0:t.getMapRating()))}async fetchTopicRating(t){var r;let i=await((r=this.service)===null||r===void 0?void 0:r.getTopicRating(t));i&&this.store.actions.setTopicsRating({[t]:i})}registerMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.add(t),this.store.getState().relatives==null?this.fetchRelatives():this.updateClusteringHelper()}unregisterMetadataForSwitchToRelatives(t){this.metadataForSwitchToRelatives.delete(t),this.updateClusteringHelper()}getAccurateNavigationData(t,r,i){return this.service.getAccurateNavigationData(t,r?.number,i?.section,this.getTranslationSettings())}buildBreadcrumb(t){var r;return(r=this.service)===null||r===void 0?void 0:r.buildBreadcrumb(t,this.getTranslationSettings())}fetchTopicContent(t){var r,i;let n=this.getTranslationSettings();return n?(this.sendTopicAiTranslateEvent(n.destinationLanguage,t),(r=this.service)===null||r===void 0?void 0:r.getTranslatedTopicContent(t,n).then(o=>(o.isTranslationError&&this.setTranslationError(!0),o.content))):(i=this.service)===null||i===void 0?void 0:i.getTopicContent(t)}getTocNode(t){return this.service.getTocNode(t,this.getTranslationSettings())}getPage(t){return this.service.getPage(t,this.getTranslationSettings())}onMapAttachmentsUpdate(){var t;(t=this.service)===null||t===void 0||t.clearMapAttachments(),this.store.dispatchEvent(new Event(Tr.mapAttachmentsUpdate))}async getRelativeDocumentUrlForLocale(t){var r,i,n;this.store.getState().relatives==null&&await this.fetchRelatives();let o=Nt.ClusteringHelper.findResultWithMetadataValue((r=this.store.getState().relatives)!==null&&r!==void 0?r:[],"ft:locale",t),s=(0,Nt.accessResultUrl)(o);if(s){let a=this.store.getState().visibleTopics[0],l=(i=this.store.getState().configuration)===null||i===void 0?void 0:i.relativeTopicPivotMetadata;if(l&&a){let c=await((n=this.service)===null||n===void 0?void 0:n.getTopicMetadataValue(a,l));s=ad(s,c)}}return s}sendDocumentOnDemandTranslateEvent(t){var r;let{editorMode:i,apiIntegrationIdentifier:n,apiIntegrationAppVersion:o}=S.getState(),s=this.store.getState(),a=s.map,l=s.translation.profileId;if(!(i||!a||!n||!o||!l))try{let u={...this.analyticsEventsService.convertMapToAnalyticsDocument(a),title:(r=a.untranslatedTitle)!==null&&r!==void 0?r:a.title};this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({name:"DOCUMENT__ON_DEMAND_TRANSLATE",offline:!1,appName:n,appVersion:o,sourceLanguage:this.parseLanguageToAnalyticsFormat(a.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(t.code),profileId:l,document:u,translationOrigin:ki.AI})}catch(c){console.warn("Failed to send on-demand document translate event:",c)}}sendTopicAiTranslateEvent(t,r){var i;let{editorMode:n,apiIntegrationIdentifier:o,apiIntegrationAppVersion:s}=S.getState(),a=this.store.getState(),l=a.map,c=a.translation.profileId;if(!(n||!l||!o||!s||!c))try{let u=this.buildBreadcrumb(r.tocId);if(!u){console.warn("Failed to build breadcrumb for topic ai translate event");return}let p={...this.analyticsEventsService.convertMapToAnalyticsDocument(l),title:(i=l.untranslatedTitle)!==null&&i!==void 0?i:l.title};this.analyticsEventsService.sendTopicAiTranslateEvent({name:"TOPIC__AI_TRANSLATE",offline:!1,appName:o,appVersion:s,sourceLanguage:this.parseLanguageToAnalyticsFormat(l.lang),destinationLanguage:this.parseLanguageToAnalyticsFormat(t),breadcrumb:u.map(h=>{var m;return{tocId:h.tocId,title:(m=h.untranslatedTitle)!==null&&m!==void 0?m:h.title}}),document:p,profileId:c})}catch(u){console.warn("Failed to send topic ai translate event:",u)}}parseLanguageToAnalyticsFormat(t){if(!t)return;let r=t.split("-");return r.length===2?{languageCode:r[0],countryCode:r[1]}:{languageCode:r[0],countryCode:""}}};var Fn=class extends CustomEvent{constructor(t,r){super("ft-reader-map-loaded",{detail:{map:t,toc:r}})}},Bn=class extends CustomEvent{constructor(t,r){super("ft-reader-visible-topics-change",{detail:{visibleTopics:r}})}},Hn=class extends CustomEvent{constructor(t){super("ft-reader-navigation-done",{detail:t})}},jn=class extends CustomEvent{constructor(t){super("ft-reader-load-error",{detail:t})}},Vn=class extends Event{constructor(){super("ft-reader-map-not-found")}},zn=class extends Event{constructor(){super("ft-reader-map-unauthorized")}},Wn=class extends Event{constructor(){super("ft-reader-map-forbidden")}},Kn=class extends Event{constructor(){super("ft-reader-topic-relative-not-found",{bubbles:!0,composed:!0})}};var $t=function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(n<3?s(o):n>3?s(t,r,o):s(t,r))||o);return n>3&&o&&Object.defineProperty(t,r,o),o},Es=class{constructor(t){this.stateManager=t}searchInDocument(t){this.stateManager.setSearchInDocumentQuery(t??"")}},mt=class extends yt.FtLitElementRedux{constructor(){super(),this.visibleTopics=[],this.updateConfiguration=()=>{this.stateManager.reloadConfiguration()},this.scrollToTargetDebouncer=new yt.Debouncer(5),this.navigationDebouncer=new yt.Debouncer(10),this.mapLoadedEventDebouncer=new yt.Debouncer(50),this.addStore(S)}render(){return Oi.html`
|
|
1398
1398
|
${this.importStyleIfNeeded()}
|
|
1399
1399
|
<slot @register-ft-reader-component=${this.registerComponent}></slot>
|
|
@@ -1512,7 +1512,7 @@
|
|
|
1512
1512
|
${a}
|
|
1513
1513
|
</div>
|
|
1514
1514
|
</form>
|
|
1515
|
-
`}return nt.nothing}onFormSubmitEvent(t,r){t.preventDefault(),r?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,r,i;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((r=(t=this.session)===null||t===void 0?void 0:t.profile)===null||r===void 0?void 0:r.userId)==null&&(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new Gn({message:this.feedbackInput.value,...((t=this.configuration)===null||t===void 0?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.setValue("",!0),0)}};H.elementDefinitions={"ft-button":N,"ft-typography":tt,"ft-switch":
|
|
1515
|
+
`}return nt.nothing}onFormSubmitEvent(t,r){t.preventDefault(),r?this.onMailerFeedbackSent():this.sendFeedback()}validFromEmail(){var t,r,i;let n=/^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;return!(((r=(t=this.session)===null||t===void 0?void 0:t.profile)===null||r===void 0?void 0:r.userId)==null&&(!((i=this.configuration)===null||i===void 0)&&i.mailsSentByFluidTopicsForUnauthenticatedUsers))||n.test(this.from)}sendFeedback(){var t;this.dispatchEvent(new Gn({message:this.feedbackInput.value,...((t=this.configuration)===null||t===void 0?void 0:t.mailsSentByFluidTopicsForUnauthenticatedUsers)&&{from:this.from}}))}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("mailer-feedback"))}onOpenMoreDetails(){this.dispatchEvent(new CustomEvent("open-more-options"))}clearFeedbackInput(){setTimeout(()=>this.feedbackInput.setValue("",!0),0)}};H.elementDefinitions={"ft-button":N,"ft-typography":tt,"ft-switch":Pt,"ft-switch-option":it,"ft-text-area":dt,"ft-text-field":_};H.styles=ia;gt([(0,ot.property)({type:Boolean})],H.prototype,"editorMode",void 0);gt([(0,ot.property)({type:Boolean})],H.prototype,"hideTitle",void 0);gt([(0,ot.property)({type:Boolean})],H.prototype,"withMoreOptionsButton",void 0);gt([(0,ot.property)({type:Boolean})],H.prototype,"ratingAllowed",void 0);gt([(0,ot.property)({attribute:!1})],H.prototype,"i18nProperties",void 0);gt([(0,ot.property)({attribute:!1})],H.prototype,"ratingSummary",void 0);gt([(0,ot.property)({attribute:!1})],H.prototype,"session",void 0);gt([(0,ot.query)(".ft-reader-feedback--feedback-input")],H.prototype,"feedbackInput",void 0);gt([(0,ot.state)()],H.prototype,"from",void 0);gt([(0,ot.state)()],H.prototype,"feedbackMessage",void 0);gt([(0,ot.property)()],H.prototype,"iconVariant",void 0);gt([(0,ot.property)()],H.prototype,"emptyStarIcon",void 0);gt([(0,ot.property)()],H.prototype,"filledStarIcon",void 0);gt([(0,ot.property)()],H.prototype,"emptyLikeIcon",void 0);gt([(0,ot.property)()],H.prototype,"filledLikeIcon",void 0);gt([(0,ot.property)()],H.prototype,"emptyDislikeIcon",void 0);gt([(0,ot.property)()],H.prototype,"filledDislikeIcon",void 0);gt([(0,Qn.redux)({store:"reader",selector:e=>{var t;return(t=e.configuration)===null||t===void 0?void 0:t.feedback}})],H.prototype,"configuration",void 0);gt([(0,ot.property)()],H.prototype,"feedbackMailLinkBuilder",void 0);var Qr=qe.fromGwt("server");var Jr=class{constructor(){this.subject="",this.url="",this.subjectMetadata="",this.bodyMetadata="",this.isAuthenticated=!1}update(t,r,i,n,o){var s;this.subject=t,this.url=r,this.configuration=n,this.isAuthenticated=o,this.subjectMetadata=this.filterMetadata(i,n.subjectMetadataIds).map(a=>"["+a.values[a.values.length-1]+"]").join(""),this.bodyMetadata=this.filterMetadata(i,(s=n.bodyMetadataIds)!==null&&s!==void 0?s:[]).map(a=>"["+a.values.join(", ")+"]").join(" ")}filterMetadata(t,r){return r.map(i=>t.find(n=>n.key===i)).filter(i=>i!=null&&i.values.length>0)}shouldUseMailer(){var t,r;let i=this.isAuthenticated&&!(!((t=this.configuration)===null||t===void 0)&&t.mailsSentByFluidTopics),n=!this.isAuthenticated&&!(!((r=this.configuration)===null||r===void 0)&&r.mailsSentByFluidTopicsForUnauthenticatedUsers);return i||n}build(t){var r;if(t!=null&&t.length===0||!this.shouldUseMailer())return;let i=encodeURIComponent(this.subject+" "+this.subjectMetadata),n=encodeURIComponent(`
|
|
1516
1516
|
${this.bodyMetadata}
|
|
1517
1517
|
${this.url}
|
|
1518
1518
|
_________________________________________________________________
|