@fluid-topics/ft-reader-feedback 1.0.55 → 1.0.56

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.
@@ -98,7 +98,7 @@ var mt,wt;let $t=class extends j{constructor(){super(...arguments),this.renderOp
98
98
  display: inline-block;
99
99
  width: 0;
100
100
  }
101
- `;class Pt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let o=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>o=o.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),o}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function Dt(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ft,Lt,Bt;const zt=Symbol("internalReduxEventsUnsubscribers"),Ht=Symbol("internalStoresUnsubscribers"),Kt=Symbol("internalStores");class Wt extends jt{constructor(){super(...arguments),this[Ft]=new Map,this[Lt]=new Map,this[Bt]=[]}updated(t){var e;super.updated(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[Kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Kt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Kt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Dt(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Kt].delete(e)}setupStore(t,e){this[Kt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Kt].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[Ht].has(t.store):this[Ht].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Ht].set(t,e.subscribe((()=>this.updateFromStores()))),Dt(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const n=t=>this[i](t);e.eventBus.addEventListener(t.eventName,n),this[zt].push((()=>e.eventBus.removeEventListener(t.eventName,n)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Ht].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[zt].forEach((t=>t())),this[zt]=[]}unsubscribeFromStore(t){this[Ht].has(t)&&this[Ht].get(t)(),this[Ht].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function Vt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Zt(t){return!!t&&!!t[Ie]}function Gt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===je}(t)||Array.isArray(t)||!!t[Te]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Te])||te(t)||ee(t))}function qt(t,e,i){void 0===i&&(i=!1),0===Xt(t)?(i?Object.keys:Ue)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Xt(t){var e=t[Ie];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:te(t)?2:ee(t)?3:0}function Jt(t,e){return 2===Xt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Yt(t,e,i){var n=Xt(t);2===n?t.set(e,i):3===n?t.add(i):t[e]=i}function Qt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function te(t){return Re&&t instanceof Map}function ee(t){return Ce&&t instanceof Set}function ie(t){return t.o||t.t}function ne(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Me(t);delete e[Ie];for(var i=Ue(e),n=0;n<i.length;n++){var o=i[n],r=e[o];!1===r.writable&&(r.writable=!0,r.configurable=!0),(r.get||r.set)&&(e[o]={configurable:!0,writable:!0,enumerable:r.enumerable,value:t[o]})}return Object.create(Object.getPrototypeOf(t),e)}function oe(t,e){return void 0===e&&(e=!1),se(t)||Zt(t)||!Gt(t)||(Xt(t)>1&&(t.set=t.add=t.clear=t.delete=re),Object.freeze(t),e&&qt(t,(function(t,e){return oe(e,!0)}),!0)),t}function re(){Vt(2)}function se(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function ae(t){var e=Pe[t];return e||Vt(18,t),e}function le(){return Ee}function ce(t,e){e&&(ae("Patches"),t.u=[],t.s=[],t.v=e)}function he(t){ue(t),t.p.forEach(de),t.p=null}function ue(t){t===Ee&&(Ee=t.l)}function fe(t){return Ee={p:[],l:Ee,h:t,m:!0,_:0}}function de(t){var e=t[Ie];0===e.i||1===e.i?e.j():e.g=!0}function pe(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.O||ae("ES5").S(e,t,n),n?(i[Ie].P&&(he(e),Vt(4)),Gt(t)&&(t=ve(e,t),e.l||ye(e,t)),e.u&&ae("Patches").M(i[Ie].t,t,e.u,e.s)):t=ve(e,i,[]),he(e),e.u&&e.v(e.u,e.s),t!==Ne?t:void 0}function ve(t,e,i){if(se(e))return e;var n=e[Ie];if(!n)return qt(e,(function(o,r){return be(t,n,e,o,r,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return ye(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=ne(n.k):n.o,r=o,s=!1;3===n.i&&(r=new Set(o),o.clear(),s=!0),qt(r,(function(e,r){return be(t,n,o,e,r,i,s)})),ye(t,o,!1),i&&t.u&&ae("Patches").N(n,i,t.u,t.s)}return n.o}function be(t,e,i,n,o,r,s){if(Zt(o)){var a=ve(t,o,r&&e&&3!==e.i&&!Jt(e.R,n)?r.concat(n):void 0);if(Yt(i,n,a),!Zt(a))return;t.m=!1}else s&&i.add(o);if(Gt(o)&&!se(o)){if(!t.h.D&&t._<1)return;ve(t,o),e&&e.A.l||ye(t,o)}}function ye(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&oe(e,i)}function ge(t,e){var i=t[Ie];return(i?ie(i):t)[e]}function xe(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function me(t){t.P||(t.P=!0,t.l&&me(t.l))}function we(t){t.o||(t.o=ne(t.t))}function $e(t,e,i){var n=te(e)?ae("MapSet").F(e,i):ee(e)?ae("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:le(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},o=n,r=De;i&&(o=[n],r=Fe);var s=Proxy.revocable(o,r),a=s.revoke,l=s.proxy;return n.k=l,n.j=a,l}(e,i):ae("ES5").J(e,i);return(i?i.A:le()).p.push(n),n}function Se(t){return Zt(t)||Vt(22,t),function t(e){if(!Gt(e))return e;var i,n=e[Ie],o=Xt(e);if(n){if(!n.P&&(n.i<4||!ae("ES5").K(n)))return n.t;n.I=!0,i=ke(e,o),n.I=!1}else i=ke(e,o);return qt(i,(function(e,o){n&&function(t,e){return 2===Xt(t)?t.get(e):t[e]}(n.t,e)===o||Yt(i,e,t(o))})),3===o?new Set(i):i}(t)}function ke(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ne(t)}Ft=Ht,Lt=Kt,Bt=zt;var Oe,Ee,_e="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Re="undefined"!=typeof Map,Ce="undefined"!=typeof Set,Ae="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ne=_e?Symbol.for("immer-nothing"):((Oe={})["immer-nothing"]=!0,Oe),Te=_e?Symbol.for("immer-draftable"):"__$immer_draftable",Ie=_e?Symbol.for("immer-state"):"__$immer_state",je=""+Object.prototype.constructor,Ue="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Me=Object.getOwnPropertyDescriptors||function(t){var e={};return Ue(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Pe={},De={get:function(t,e){if(e===Ie)return t;var i=ie(t);if(!Jt(i,e))return function(t,e,i){var n,o=xe(e,i);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!Gt(n)?n:n===ge(t.t,e)?(we(t),t.o[e]=$e(t.A.h,n,t)):n},has:function(t,e){return e in ie(t)},ownKeys:function(t){return Reflect.ownKeys(ie(t))},set:function(t,e,i){var n=xe(ie(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var o=ge(ie(t),e),r=null==o?void 0:o[Ie];if(r&&r.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(Qt(i,o)&&(void 0!==i||Jt(t.t,e)))return!0;we(t),me(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==ge(t.t,e)||e in t.t?(t.R[e]=!1,we(t),me(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=ie(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){Vt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Vt(12)}},Fe={};qt(De,(function(t,e){Fe[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Fe.deleteProperty=function(t,e){return Fe.set.call(this,t,e,void 0)},Fe.set=function(t,e,i){return De.set.call(this,t[0],e,i,t[0])};var Le=function(){function t(t){var e=this;this.O=Ae,this.D=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var o=i;i=t;var r=e;return function(t){var e=this;void 0===t&&(t=o);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return r.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&Vt(6),void 0!==n&&"function"!=typeof n&&Vt(7),Gt(t)){var a=fe(e),l=$e(e,t,void 0),c=!0;try{s=i(l),c=!1}finally{c?he(a):ue(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return ce(a,n),pe(t,a)}),(function(t){throw he(a),t})):(ce(a,n),pe(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===Ne&&(s=void 0),e.D&&oe(s,!0),n){var h=[],u=[];ae("Patches").M(t,s,h,u),n(h,u)}return s}Vt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(o))}))};var n,o,r=e.produce(t,i,(function(t,e){n=t,o=e}));return"undefined"!=typeof Promise&&r instanceof Promise?r.then((function(t){return[t,n,o]})):[r,n,o]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Gt(t)||Vt(8),Zt(t)&&(t=Se(t));var e=fe(this),i=$e(this,t,void 0);return i[Ie].C=!0,ue(e),i},e.finishDraft=function(t,e){var i=(t&&t[Ie]).A;return ce(i,e),pe(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Ae&&Vt(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var o=ae("Patches").$;return Zt(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}(),Be=new Le,ze=Be.produce;function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Ke(t){var e=function(t,e){if("object"!==He(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===He(e)?e:String(e)}function We(t,e,i){return(e=Ke(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ve(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ze(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ve(Object(i),!0).forEach((function(e){We(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ge(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Be.produceWithPatches.bind(Be),Be.setAutoFreeze.bind(Be),Be.setUseProxies.bind(Be),Be.applyPatches.bind(Be),Be.createDraft.bind(Be),Be.finishDraft.bind(Be);var qe="function"==typeof Symbol&&Symbol.observable||"@@observable",Xe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Je={INIT:"@@redux/INIT"+Xe(),REPLACE:"@@redux/REPLACE"+Xe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Xe()}};function Ye(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Ge(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Ge(1));return i(Ye)(t,e)}if("function"!=typeof t)throw new Error(Ge(2));var o=t,r=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function h(){if(l)throw new Error(Ge(3));return r}function u(t){if("function"!=typeof t)throw new Error(Ge(4));if(l)throw new Error(Ge(5));var e=!0;return c(),a.push(t),function(){if(e){if(l)throw new Error(Ge(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),s=null}}}function f(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Ge(7));if(void 0===t.type)throw new Error(Ge(8));if(l)throw new Error(Ge(9));try{l=!0,r=o(r,t)}finally{l=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}return f({type:Je.INIT}),(n={dispatch:f,subscribe:u,getState:h,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ge(10));o=t,f({type:Je.REPLACE})}})[qe]=function(){var t,e=u;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ge(11));function i(){t.next&&t.next(h())}return i(),{unsubscribe:e(i)}}})[qe]=function(){return this},t},n}function Qe(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var o=e[n];"function"==typeof t[o]&&(i[o]=t[o])}var r,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Je.INIT}))throw new Error(Ge(12));if(void 0===i(void 0,{type:Je.PROBE_UNKNOWN_ACTION()}))throw new Error(Ge(13))}))}(i)}catch(t){r=t}return function(t,e){if(void 0===t&&(t={}),r)throw r;for(var n=!1,o={},a=0;a<s.length;a++){var l=s[a],c=i[l],h=t[l],u=c(h,e);if(void 0===u)throw e&&e.type,new Error(Ge(14));o[l]=u,n=n||u!==h}return(n=n||s.length!==Object.keys(t).length)?o:t}}function ti(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function ei(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(Ge(15))},o={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},r=e.map((function(t){return t(o)}));return n=ti.apply(void 0,r)(i.dispatch),Ze(Ze({},i),{},{dispatch:n})}}}function ii(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(o){return"function"==typeof o?o(i,n,t):e(o)}}}}var ni=ii();ni.withExtraArgument=ii;var oi,ri=ni,si=(oi=function(t,e){return oi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},oi(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}oi(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),ai=function(t,e){var i,n,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=e.call(t,s)}catch(t){r=[6,t],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},li=function(t,e){for(var i=0,n=e.length,o=t.length;i<n;i++,o++)t[o]=e[i];return t},ci=Object.defineProperty,hi=Object.defineProperties,ui=Object.getOwnPropertyDescriptors,fi=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,vi=function(t,e,i){return e in t?ci(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},bi=function(t,e){for(var i in e||(e={}))di.call(e,i)&&vi(t,i,e[i]);if(fi)for(var n=0,o=fi(e);n<o.length;n++){i=o[n];pi.call(e,i)&&vi(t,i,e[i])}return t},yi=function(t,e){return hi(t,ui(e))},gi="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ti:ti.apply(null,arguments)};var xi=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=t.apply(this,i)||this;return Object.setPrototypeOf(o,e.prototype),o}return si(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,li([void 0],t[0].concat(this)))):new(e.bind.apply(e,li([void 0],t.concat(this))))},e}(Array),mi=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=t.apply(this,i)||this;return Object.setPrototypeOf(o,e.prototype),o}return si(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,li([void 0],t[0].concat(this)))):new(e.bind.apply(e,li([void 0],t.concat(this))))},e}(Array);function wi(t){return Gt(t)?ze(t,(function(){})):t}function $i(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new xi;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(ri.withExtraArgument(i.extraArgument)):n.push(ri));return n}(t)}}function Si(t){var e,i=$i(),n=t||{},o=n.reducer,r=void 0===o?void 0:o,s=n.middleware,a=void 0===s?i():s,l=n.devTools,c=void 0===l||l,h=n.preloadedState,u=void 0===h?void 0:h,f=n.enhancers,d=void 0===f?void 0:f;if("function"==typeof r)e=r;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(r))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Qe(r)}var p=a;"function"==typeof p&&(p=p(i));var v=ei.apply(void 0,p),b=ti;c&&(b=gi(bi({trace:!1},"object"==typeof c&&c)));var y=new mi(v),g=y;return Array.isArray(d)?g=li([v],d):"function"==typeof d&&(g=d(y)),Ye(e,u,b.apply(void 0,g))}function ki(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var o=e.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return bi(bi({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function Oi(t){var e,i={},n=[],o={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,o},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),o},addDefaultCase:function(t){return e=t,o}};return t(o),[i,n,e]}function Ei(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:wi(t.initialState),o=t.reducers||{},r=Object.keys(o),s={},a={},l={};function c(){var e="function"==typeof t.extraReducers?Oi(t.extraReducers):[t.extraReducers],i=e[0],o=void 0===i?{}:i,r=e[1],s=void 0===r?[]:r,l=e[2],c=void 0===l?void 0:l,h=bi(bi({},o),a);return function(t,e,i,n){void 0===i&&(i=[]);var o,r="function"==typeof e?Oi(e):[e,i,n],s=r[0],a=r[1],l=r[2];if(function(t){return"function"==typeof t}(t))o=function(){return wi(t())};else{var c=wi(t);o=function(){return c}}function h(t,e){void 0===t&&(t=o());var i=li([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[l]),i.reduce((function(t,i){if(i){var n;if(Zt(t))return void 0===(n=i(t,e))?t:n;if(Gt(t))return ze(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return h.getInitialState=o,h}(n,(function(t){for(var e in h)t.addCase(e,h[e]);for(var i=0,n=s;i<n.length;i++){var o=n[i];t.addMatcher(o.matcher,o.reducer)}c&&t.addDefaultCase(c)}))}return r.forEach((function(t){var i,n,r=o[t],c=e+"/"+t;"reducer"in r?(i=r.reducer,n=r.prepare):i=r,s[t]=i,a[c]=i,l[t]=n?ki(c,n):ki(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:l,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var _i=["name","message","stack","code"],Ri=function(t,e){this.payload=t,this.meta=e},Ci=function(t,e){this.payload=t,this.meta=e},Ai=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,n=_i;i<n.length;i++){var o=n[i];"string"==typeof t[o]&&(e[o]=t[o])}return e}return{message:String(t)}};function Ni(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var n=ki(t+"/fulfilled",(function(t,e,i,n){return{payload:t,meta:yi(bi({},n||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),o=ki(t+"/pending",(function(t,e,i){return{payload:void 0,meta:yi(bi({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),r=ki(t+"/rejected",(function(t,e,n,o,r){return{payload:o,error:(i&&i.serializeError||Ai)(t||"Rejected"),meta:yi(bi({},r||{}),{arg:n,requestId:e,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(a,l,c){var h,u=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),f=new s;function d(t){h=t,f.abort()}var p=function(){return s=this,p=null,v=function(){var s,p,v,b,y,g;return ai(this,(function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),b=null==(s=null==i?void 0:i.condition)?void 0:s.call(i,t,{getState:l,extra:c}),null===(m=b)||"object"!=typeof m||"function"!=typeof m.then?[3,2]:[4,b];case 1:b=x.sent(),x.label=2;case 2:if(!1===b||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return y=new Promise((function(t,e){return f.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:h||"Aborted"})}))})),a(o(u,t,null==(p=null==i?void 0:i.getPendingMeta)?void 0:p.call(i,{requestId:u,arg:t},{getState:l,extra:c}))),[4,Promise.race([y,Promise.resolve(e(t,{dispatch:a,getState:l,extra:c,requestId:u,signal:f.signal,abort:d,rejectWithValue:function(t,e){return new Ri(t,e)},fulfillWithValue:function(t,e){return new Ci(t,e)}})).then((function(e){if(e instanceof Ri)throw e;return e instanceof Ci?n(e.payload,u,t,e.meta):n(e,u,t)}))])];case 3:return v=x.sent(),[3,5];case 4:return g=x.sent(),v=g instanceof Ri?r(null,u,t,g.payload,g.meta):r(g,u,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&r.match(v)&&v.meta.condition||a(v),[2,v]}var m}))},new Promise((function(t,e){var i=function(t){try{o(v.next(t))}catch(t){e(t)}},n=function(t){try{o(v.throw(t))}catch(t){e(t)}},o=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,n)};o((v=v.apply(s,p)).next())}));var s,p,v}();return Object.assign(p,{abort:d,requestId:u,arg:t,unwrap:function(){return p.then(Ni)}})}}),{pending:o,rejected:r,fulfilled:n,typePrefix:t})}t.withTypes=function(){return t}}();var Ti="listenerMiddleware";ki(Ti+"/add"),ki(Ti+"/removeAll"),ki(Ti+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=o[t];return i?i.enumerable=e:o[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[Ie];return De.get(e,t)},set:function(e){var i=this[Ie];De.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][Ie];if(!o.P)switch(o.i){case 5:n(o)&&me(o);break;case 4:i(o)&&me(o)}}}function i(t){for(var e=t.t,i=t.k,n=Ue(i),o=n.length-1;o>=0;o--){var r=n[o];if(r!==Ie){var s=e[r];if(void 0===s&&!Jt(e,r))return!0;var a=i[r],l=a&&a[Ie];if(l?l.t!==s:!Qt(a,s))return!0}}var c=!!e[Ie];return n.length!==Ue(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var o={};!function(t,e){Pe[t]||(Pe[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),o=function(e,i){if(e){for(var n=Array(i.length),o=0;o<i.length;o++)Object.defineProperty(n,""+o,t(o,!0));return n}var r=Me(i);delete r[Ie];for(var s=Ue(r),a=0;a<s.length;a++){var l=s[a];r[l]=t(l,e||!!r[l].enumerable)}return Object.create(Object.getPrototypeOf(i),r)}(n,e),r={i:n?5:4,A:i?i.A:le(),P:!1,I:!1,R:{},l:i,t:e,k:o,o:null,g:!1,C:!1};return Object.defineProperty(o,Ie,{value:r,writable:!0}),o},S:function(t,i,o){o?Zt(i)&&i[Ie].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Ie];if(i){var o=i.t,r=i.k,s=i.R,a=i.i;if(4===a)qt(r,(function(e){e!==Ie&&(void 0!==o[e]||Jt(o,e)?s[e]||t(r[e]):(s[e]=!0,me(i)))})),qt(o,(function(t){void 0!==r[t]||Jt(r,t)||(s[t]=!1,me(i))}));else if(5===a){if(n(i)&&(me(i),s.length=!0),r.length<o.length)for(var l=r.length;l<o.length;l++)s[l]=!1;else for(var c=o.length;c<r.length;c++)s[c]=!0;for(var h=Math.min(r.length,o.length),u=0;u<h;u++)r.hasOwnProperty(u)||(s[u]=!0),void 0===s[u]&&t(r[u])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Ii{static get(t){var e;const i="string"==typeof t?t:t.name,n="string"==typeof t?void 0:t,o=window.ftReduxStores[i];if(Dt(o))return o;if(null==n)return;const r=Ei({...n,reducers:null!==(e=n.reducers)&&void 0!==e?e:{}}),s=Si({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return r.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return r.reducer(t,e)}}});return window.ftReduxStores[n.name]=new Ii(r,s)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=e,o=t[n];return o?(...t)=>{const e=o(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[n]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",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()}}const ji=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const o={hasChanged:(t,e)=>!p(t,e),attribute:!1,...e};s(o)(t,i);const r=t;r.reduxProperties=r.reduxProperties||new Map,r.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var Ui,Mi,Pi;const Di=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Pi=null===(Mi=null===(Ui=window.safari)||void 0===Ui?void 0:Ui.pushNotification)||void 0===Mi?void 0:Mi.toString())&&void 0!==Pi?Pi:"");var Fi=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Li extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Bi=Symbol("registerInterval");class zi extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Bi]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Bi]):this.dispatchEvent(new Li)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Bi,Fi([a()],i.prototype,"stateManager",void 0),i}(Wt)){}const Hi=kt.extend("--ft-ripple-color",Et.colorContent),Ki={color:Hi,backgroundColor:kt.extend("--ft-ripple-background-color",Hi),opacityContentOnSurfacePressed:kt.external(Et.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:kt.external(Et.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:kt.external(Et.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:kt.external(Et.opacityContentOnSurfaceSelected,"Design system"),borderRadius:kt.create("--ft-ripple-border-radius","SIZE","0px")},Wi=kt.extend("--ft-ripple-color",Et.colorPrimary),Vi=Wi,Zi=kt.extend("--ft-ripple-background-color",Wi),Gi=kt.extend("--ft-ripple-color",Et.colorSecondary),qi=Gi,Xi=kt.extend("--ft-ripple-background-color",Gi),Ji=S`
101
+ `;class Pt{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var i,n;t=this.resolvePluralKey(t,e);let o=null!==(n=null!==(i=this.labels[t])&&void 0!==i?i:this.defaultLabels[t])&&void 0!==n?n:"";return e.forEach(((t,e)=>o=o.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,i)=>this.formatValue(t,i))))),o}resolvePluralKey(t,e){for(let i of e)if("number"==typeof i){const e=`${String(t)}[\\=${i}]`;if(e in this.labels||e in this.defaultLabels)return e}return t}formatValue(t,e){return t instanceof Date?this.formatDate(t,e):null!=t?t:""}formatDate(t,e){const i=i=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(i):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(i):t.toLocaleString(i);try{return i(document.documentElement.lang)}catch(t){return i()}}}function Dt(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Ft,Lt,Bt;const zt=Symbol("internalReduxEventsUnsubscribers"),Ht=Symbol("internalStoresUnsubscribers"),Kt=Symbol("internalStores");class Wt extends jt{constructor(){super(...arguments),this[Ft]=new Map,this[Lt]=new Map,this[Bt]=[]}update(t){var e;super.update(t),(null===(e=this.reduxReactiveProperties)||void 0===e?void 0:e.some((e=>t.has(e))))&&this.updateFromStores()}getUnnamedStore(){if(this[Kt].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Kt].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Kt].get(t)}addStore(t,e){var i;e=null!==(i=null!=e?e:Dt(t)?t.name:void 0)&&void 0!==i?i:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Kt].delete(e)}setupStore(t,e){this[Kt].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Kt].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const i=this.constructor.getPropertyOptions(e);if(!(null==i?void 0:i.attribute)||!this.hasAttribute("string"==typeof(null==i?void 0:i.attribute)?i.attribute:e)){const i=this.getStore(t.store);i&&(t.store?this[Ht].has(t.store):this[Ht].size>0)&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){var i;this[Ht].set(t,e.subscribe((()=>this.updateFromStores()))),Dt(e)&&e.eventBus&&(null===(i=this.reduxEventListeners)||void 0===i||i.forEach(((t,i)=>{if("function"==typeof this[i]&&(!t.store||e.name===t.store)){const n=t=>this[i](t);e.eventBus.addEventListener(t.eventName,n),this[zt].push((()=>e.eventBus.removeEventListener(t.eventName,n)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Ht].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[zt].forEach((t=>t())),this[zt]=[]}unsubscribeFromStore(t){this[Ht].has(t)&&this[Ht].get(t)(),this[Ht].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function Vt(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(i.length?" "+i.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Zt(t){return!!t&&!!t[Ie]}function Gt(t){var e;return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var i=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return i===Object||"function"==typeof i&&Function.toString.call(i)===je}(t)||Array.isArray(t)||!!t[Te]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Te])||te(t)||ee(t))}function qt(t,e,i){void 0===i&&(i=!1),0===Xt(t)?(i?Object.keys:Ue)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Xt(t){var e=t[Ie];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:te(t)?2:ee(t)?3:0}function Jt(t,e){return 2===Xt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Yt(t,e,i){var n=Xt(t);2===n?t.set(e,i):3===n?t.add(i):t[e]=i}function Qt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function te(t){return Re&&t instanceof Map}function ee(t){return Ce&&t instanceof Set}function ie(t){return t.o||t.t}function ne(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Me(t);delete e[Ie];for(var i=Ue(e),n=0;n<i.length;n++){var o=i[n],r=e[o];!1===r.writable&&(r.writable=!0,r.configurable=!0),(r.get||r.set)&&(e[o]={configurable:!0,writable:!0,enumerable:r.enumerable,value:t[o]})}return Object.create(Object.getPrototypeOf(t),e)}function oe(t,e){return void 0===e&&(e=!1),se(t)||Zt(t)||!Gt(t)||(Xt(t)>1&&(t.set=t.add=t.clear=t.delete=re),Object.freeze(t),e&&qt(t,(function(t,e){return oe(e,!0)}),!0)),t}function re(){Vt(2)}function se(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function ae(t){var e=Pe[t];return e||Vt(18,t),e}function le(){return Ee}function ce(t,e){e&&(ae("Patches"),t.u=[],t.s=[],t.v=e)}function he(t){ue(t),t.p.forEach(de),t.p=null}function ue(t){t===Ee&&(Ee=t.l)}function fe(t){return Ee={p:[],l:Ee,h:t,m:!0,_:0}}function de(t){var e=t[Ie];0===e.i||1===e.i?e.j():e.g=!0}function pe(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.O||ae("ES5").S(e,t,n),n?(i[Ie].P&&(he(e),Vt(4)),Gt(t)&&(t=ve(e,t),e.l||ye(e,t)),e.u&&ae("Patches").M(i[Ie].t,t,e.u,e.s)):t=ve(e,i,[]),he(e),e.u&&e.v(e.u,e.s),t!==Ne?t:void 0}function ve(t,e,i){if(se(e))return e;var n=e[Ie];if(!n)return qt(e,(function(o,r){return be(t,n,e,o,r,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return ye(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=ne(n.k):n.o,r=o,s=!1;3===n.i&&(r=new Set(o),o.clear(),s=!0),qt(r,(function(e,r){return be(t,n,o,e,r,i,s)})),ye(t,o,!1),i&&t.u&&ae("Patches").N(n,i,t.u,t.s)}return n.o}function be(t,e,i,n,o,r,s){if(Zt(o)){var a=ve(t,o,r&&e&&3!==e.i&&!Jt(e.R,n)?r.concat(n):void 0);if(Yt(i,n,a),!Zt(a))return;t.m=!1}else s&&i.add(o);if(Gt(o)&&!se(o)){if(!t.h.D&&t._<1)return;ve(t,o),e&&e.A.l||ye(t,o)}}function ye(t,e,i){void 0===i&&(i=!1),!t.l&&t.h.D&&t.m&&oe(e,i)}function ge(t,e){var i=t[Ie];return(i?ie(i):t)[e]}function xe(t,e){if(e in t)for(var i=Object.getPrototypeOf(t);i;){var n=Object.getOwnPropertyDescriptor(i,e);if(n)return n;i=Object.getPrototypeOf(i)}}function me(t){t.P||(t.P=!0,t.l&&me(t.l))}function we(t){t.o||(t.o=ne(t.t))}function $e(t,e,i){var n=te(e)?ae("MapSet").F(e,i):ee(e)?ae("MapSet").T(e,i):t.O?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:le(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},o=n,r=De;i&&(o=[n],r=Fe);var s=Proxy.revocable(o,r),a=s.revoke,l=s.proxy;return n.k=l,n.j=a,l}(e,i):ae("ES5").J(e,i);return(i?i.A:le()).p.push(n),n}function Se(t){return Zt(t)||Vt(22,t),function t(e){if(!Gt(e))return e;var i,n=e[Ie],o=Xt(e);if(n){if(!n.P&&(n.i<4||!ae("ES5").K(n)))return n.t;n.I=!0,i=ke(e,o),n.I=!1}else i=ke(e,o);return qt(i,(function(e,o){n&&function(t,e){return 2===Xt(t)?t.get(e):t[e]}(n.t,e)===o||Yt(i,e,t(o))})),3===o?new Set(i):i}(t)}function ke(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return ne(t)}Ft=Ht,Lt=Kt,Bt=zt;var Oe,Ee,_e="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Re="undefined"!=typeof Map,Ce="undefined"!=typeof Set,Ae="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ne=_e?Symbol.for("immer-nothing"):((Oe={})["immer-nothing"]=!0,Oe),Te=_e?Symbol.for("immer-draftable"):"__$immer_draftable",Ie=_e?Symbol.for("immer-state"):"__$immer_state",je=""+Object.prototype.constructor,Ue="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Me=Object.getOwnPropertyDescriptors||function(t){var e={};return Ue(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},Pe={},De={get:function(t,e){if(e===Ie)return t;var i=ie(t);if(!Jt(i,e))return function(t,e,i){var n,o=xe(e,i);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(t.k):void 0}(t,i,e);var n=i[e];return t.I||!Gt(n)?n:n===ge(t.t,e)?(we(t),t.o[e]=$e(t.A.h,n,t)):n},has:function(t,e){return e in ie(t)},ownKeys:function(t){return Reflect.ownKeys(ie(t))},set:function(t,e,i){var n=xe(ie(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var o=ge(ie(t),e),r=null==o?void 0:o[Ie];if(r&&r.t===i)return t.o[e]=i,t.R[e]=!1,!0;if(Qt(i,o)&&(void 0!==i||Jt(t.t,e)))return!0;we(t),me(t)}return t.o[e]===i&&(void 0!==i||e in t.o)||Number.isNaN(i)&&Number.isNaN(t.o[e])||(t.o[e]=i,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==ge(t.t,e)||e in t.t?(t.R[e]=!1,we(t),me(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=ie(t),n=Reflect.getOwnPropertyDescriptor(i,e);return n?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:n.enumerable,value:i[e]}:n},defineProperty:function(){Vt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Vt(12)}},Fe={};qt(De,(function(t,e){Fe[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Fe.deleteProperty=function(t,e){return Fe.set.call(this,t,e,void 0)},Fe.set=function(t,e,i){return De.set.call(this,t[0],e,i,t[0])};var Le=function(){function t(t){var e=this;this.O=Ae,this.D=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var o=i;i=t;var r=e;return function(t){var e=this;void 0===t&&(t=o);for(var n=arguments.length,s=Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return r.produce(t,(function(t){var n;return(n=i).call.apply(n,[e,t].concat(s))}))}}var s;if("function"!=typeof i&&Vt(6),void 0!==n&&"function"!=typeof n&&Vt(7),Gt(t)){var a=fe(e),l=$e(e,t,void 0),c=!0;try{s=i(l),c=!1}finally{c?he(a):ue(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return ce(a,n),pe(t,a)}),(function(t){throw he(a),t})):(ce(a,n),pe(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===Ne&&(s=void 0),e.D&&oe(s,!0),n){var h=[],u=[];ae("Patches").M(t,s,h,u),n(h,u)}return s}Vt(21,t)},this.produceWithPatches=function(t,i){if("function"==typeof t)return function(i){for(var n=arguments.length,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return e.produceWithPatches(i,(function(e){return t.apply(void 0,[e].concat(o))}))};var n,o,r=e.produce(t,i,(function(t,e){n=t,o=e}));return"undefined"!=typeof Promise&&r instanceof Promise?r.then((function(t){return[t,n,o]})):[r,n,o]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Gt(t)||Vt(8),Zt(t)&&(t=Se(t));var e=fe(this),i=$e(this,t,void 0);return i[Ie].C=!0,ue(e),i},e.finishDraft=function(t,e){var i=(t&&t[Ie]).A;return ce(i,e),pe(void 0,i)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Ae&&Vt(20),this.O=t},e.applyPatches=function(t,e){var i;for(i=e.length-1;i>=0;i--){var n=e[i];if(0===n.path.length&&"replace"===n.op){t=n.value;break}}i>-1&&(e=e.slice(i+1));var o=ae("Patches").$;return Zt(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}(),Be=new Le,ze=Be.produce;function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function Ke(t){var e=function(t,e){if("object"!==He(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===He(e)?e:String(e)}function We(t,e,i){return(e=Ke(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ve(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Ze(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ve(Object(i),!0).forEach((function(e){We(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ge(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Be.produceWithPatches.bind(Be),Be.setAutoFreeze.bind(Be),Be.setUseProxies.bind(Be),Be.applyPatches.bind(Be),Be.createDraft.bind(Be),Be.finishDraft.bind(Be);var qe="function"==typeof Symbol&&Symbol.observable||"@@observable",Xe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Je={INIT:"@@redux/INIT"+Xe(),REPLACE:"@@redux/REPLACE"+Xe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Xe()}};function Ye(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Ge(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Ge(1));return i(Ye)(t,e)}if("function"!=typeof t)throw new Error(Ge(2));var o=t,r=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function h(){if(l)throw new Error(Ge(3));return r}function u(t){if("function"!=typeof t)throw new Error(Ge(4));if(l)throw new Error(Ge(5));var e=!0;return c(),a.push(t),function(){if(e){if(l)throw new Error(Ge(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),s=null}}}function f(t){if(!function(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t))throw new Error(Ge(7));if(void 0===t.type)throw new Error(Ge(8));if(l)throw new Error(Ge(9));try{l=!0,r=o(r,t)}finally{l=!1}for(var e=s=a,i=0;i<e.length;i++){(0,e[i])()}return t}return f({type:Je.INIT}),(n={dispatch:f,subscribe:u,getState:h,replaceReducer:function(t){if("function"!=typeof t)throw new Error(Ge(10));o=t,f({type:Je.REPLACE})}})[qe]=function(){var t,e=u;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ge(11));function i(){t.next&&t.next(h())}return i(),{unsubscribe:e(i)}}})[qe]=function(){return this},t},n}function Qe(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++){var o=e[n];"function"==typeof t[o]&&(i[o]=t[o])}var r,s=Object.keys(i);try{!function(t){Object.keys(t).forEach((function(e){var i=t[e];if(void 0===i(void 0,{type:Je.INIT}))throw new Error(Ge(12));if(void 0===i(void 0,{type:Je.PROBE_UNKNOWN_ACTION()}))throw new Error(Ge(13))}))}(i)}catch(t){r=t}return function(t,e){if(void 0===t&&(t={}),r)throw r;for(var n=!1,o={},a=0;a<s.length;a++){var l=s[a],c=i[l],h=t[l],u=c(h,e);if(void 0===u)throw e&&e.type,new Error(Ge(14));o[l]=u,n=n||u!==h}return(n=n||s.length!==Object.keys(t).length)?o:t}}function ti(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function ei(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){return function(){var i=t.apply(void 0,arguments),n=function(){throw new Error(Ge(15))},o={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},r=e.map((function(t){return t(o)}));return n=ti.apply(void 0,r)(i.dispatch),Ze(Ze({},i),{},{dispatch:n})}}}function ii(t){return function(e){var i=e.dispatch,n=e.getState;return function(e){return function(o){return"function"==typeof o?o(i,n,t):e(o)}}}}var ni=ii();ni.withExtraArgument=ii;var oi,ri=ni,si=(oi=function(t,e){return oi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},oi(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}oi(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),ai=function(t,e){var i,n,o,r,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(o=2&r[0]?n.return:r[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,r[1])).done)return o;switch(n=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=e.call(t,s)}catch(t){r=[6,t],n=0}finally{i=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,a])}}},li=function(t,e){for(var i=0,n=e.length,o=t.length;i<n;i++,o++)t[o]=e[i];return t},ci=Object.defineProperty,hi=Object.defineProperties,ui=Object.getOwnPropertyDescriptors,fi=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,vi=function(t,e,i){return e in t?ci(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},bi=function(t,e){for(var i in e||(e={}))di.call(e,i)&&vi(t,i,e[i]);if(fi)for(var n=0,o=fi(e);n<o.length;n++){i=o[n];pi.call(e,i)&&vi(t,i,e[i])}return t},yi=function(t,e){return hi(t,ui(e))},gi="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ti:ti.apply(null,arguments)};var xi=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=t.apply(this,i)||this;return Object.setPrototypeOf(o,e.prototype),o}return si(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,li([void 0],t[0].concat(this)))):new(e.bind.apply(e,li([void 0],t.concat(this))))},e}(Array),mi=function(t){function e(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=t.apply(this,i)||this;return Object.setPrototypeOf(o,e.prototype),o}return si(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,li([void 0],t[0].concat(this)))):new(e.bind.apply(e,li([void 0],t.concat(this))))},e}(Array);function wi(t){return Gt(t)?ze(t,(function(){})):t}function $i(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,i=void 0===e||e;t.immutableCheck,t.serializableCheck;var n=new xi;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(ri.withExtraArgument(i.extraArgument)):n.push(ri));return n}(t)}}function Si(t){var e,i=$i(),n=t||{},o=n.reducer,r=void 0===o?void 0:o,s=n.middleware,a=void 0===s?i():s,l=n.devTools,c=void 0===l||l,h=n.preloadedState,u=void 0===h?void 0:h,f=n.enhancers,d=void 0===f?void 0:f;if("function"==typeof r)e=r;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var i=e;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return e===i}(r))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Qe(r)}var p=a;"function"==typeof p&&(p=p(i));var v=ei.apply(void 0,p),b=ti;c&&(b=gi(bi({trace:!1},"object"==typeof c&&c)));var y=new mi(v),g=y;return Array.isArray(d)?g=li([v],d):"function"==typeof d&&(g=d(y)),Ye(e,u,b.apply(void 0,g))}function ki(t,e){function i(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];if(e){var o=e.apply(void 0,i);if(!o)throw new Error("prepareAction did not return an object");return bi(bi({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:i[0]}}return i.toString=function(){return""+t},i.type=t,i.match=function(e){return e.type===t},i}function Oi(t){var e,i={},n=[],o={addCase:function(t,e){var n="string"==typeof t?t:t.type;if(n in i)throw new Error("addCase cannot be called with two reducers for the same action type");return i[n]=e,o},addMatcher:function(t,e){return n.push({matcher:t,reducer:e}),o},addDefaultCase:function(t){return e=t,o}};return t(o),[i,n,e]}function Ei(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var i,n="function"==typeof t.initialState?t.initialState:wi(t.initialState),o=t.reducers||{},r=Object.keys(o),s={},a={},l={};function c(){var e="function"==typeof t.extraReducers?Oi(t.extraReducers):[t.extraReducers],i=e[0],o=void 0===i?{}:i,r=e[1],s=void 0===r?[]:r,l=e[2],c=void 0===l?void 0:l,h=bi(bi({},o),a);return function(t,e,i,n){void 0===i&&(i=[]);var o,r="function"==typeof e?Oi(e):[e,i,n],s=r[0],a=r[1],l=r[2];if(function(t){return"function"==typeof t}(t))o=function(){return wi(t())};else{var c=wi(t);o=function(){return c}}function h(t,e){void 0===t&&(t=o());var i=li([s[e.type]],a.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===i.filter((function(t){return!!t})).length&&(i=[l]),i.reduce((function(t,i){if(i){var n;if(Zt(t))return void 0===(n=i(t,e))?t:n;if(Gt(t))return ze(t,(function(t){return i(t,e)}));if(void 0===(n=i(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return t}),t)}return h.getInitialState=o,h}(n,(function(t){for(var e in h)t.addCase(e,h[e]);for(var i=0,n=s;i<n.length;i++){var o=n[i];t.addMatcher(o.matcher,o.reducer)}c&&t.addDefaultCase(c)}))}return r.forEach((function(t){var i,n,r=o[t],c=e+"/"+t;"reducer"in r?(i=r.reducer,n=r.prepare):i=r,s[t]=i,a[c]=i,l[t]=n?ki(c,n):ki(c)})),{name:e,reducer:function(t,e){return i||(i=c()),i(t,e)},actions:l,caseReducers:s,getInitialState:function(){return i||(i=c()),i.getInitialState()}}}var _i=["name","message","stack","code"],Ri=function(t,e){this.payload=t,this.meta=e},Ci=function(t,e){this.payload=t,this.meta=e},Ai=function(t){if("object"==typeof t&&null!==t){for(var e={},i=0,n=_i;i<n.length;i++){var o=n[i];"string"==typeof t[o]&&(e[o]=t[o])}return e}return{message:String(t)}};function Ni(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,i){var n=ki(t+"/fulfilled",(function(t,e,i,n){return{payload:t,meta:yi(bi({},n||{}),{arg:i,requestId:e,requestStatus:"fulfilled"})}})),o=ki(t+"/pending",(function(t,e,i){return{payload:void 0,meta:yi(bi({},i||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),r=ki(t+"/rejected",(function(t,e,n,o,r){return{payload:o,error:(i&&i.serializeError||Ai)(t||"Rejected"),meta:yi(bi({},r||{}),{arg:n,requestId:e,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return t.prototype.abort=function(){},t}();return Object.assign((function(t){return function(a,l,c){var h,u=(null==i?void 0:i.idGenerator)?i.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",i=t;i--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),f=new s;function d(t){h=t,f.abort()}var p=function(){return s=this,p=null,v=function(){var s,p,v,b,y,g;return ai(this,(function(x){switch(x.label){case 0:return x.trys.push([0,4,,5]),b=null==(s=null==i?void 0:i.condition)?void 0:s.call(i,t,{getState:l,extra:c}),null===(m=b)||"object"!=typeof m||"function"!=typeof m.then?[3,2]:[4,b];case 1:b=x.sent(),x.label=2;case 2:if(!1===b||f.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return y=new Promise((function(t,e){return f.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:h||"Aborted"})}))})),a(o(u,t,null==(p=null==i?void 0:i.getPendingMeta)?void 0:p.call(i,{requestId:u,arg:t},{getState:l,extra:c}))),[4,Promise.race([y,Promise.resolve(e(t,{dispatch:a,getState:l,extra:c,requestId:u,signal:f.signal,abort:d,rejectWithValue:function(t,e){return new Ri(t,e)},fulfillWithValue:function(t,e){return new Ci(t,e)}})).then((function(e){if(e instanceof Ri)throw e;return e instanceof Ci?n(e.payload,u,t,e.meta):n(e,u,t)}))])];case 3:return v=x.sent(),[3,5];case 4:return g=x.sent(),v=g instanceof Ri?r(null,u,t,g.payload,g.meta):r(g,u,t),[3,5];case 5:return i&&!i.dispatchConditionRejection&&r.match(v)&&v.meta.condition||a(v),[2,v]}var m}))},new Promise((function(t,e){var i=function(t){try{o(v.next(t))}catch(t){e(t)}},n=function(t){try{o(v.throw(t))}catch(t){e(t)}},o=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(i,n)};o((v=v.apply(s,p)).next())}));var s,p,v}();return Object.assign(p,{abort:d,requestId:u,arg:t,unwrap:function(){return p.then(Ni)}})}}),{pending:o,rejected:r,fulfilled:n,typePrefix:t})}t.withTypes=function(){return t}}();var Ti="listenerMiddleware";ki(Ti+"/add"),ki(Ti+"/removeAll"),ki(Ti+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var i=o[t];return i?i.enumerable=e:o[t]=i={configurable:!0,enumerable:e,get:function(){var e=this[Ie];return De.get(e,t)},set:function(e){var i=this[Ie];De.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][Ie];if(!o.P)switch(o.i){case 5:n(o)&&me(o);break;case 4:i(o)&&me(o)}}}function i(t){for(var e=t.t,i=t.k,n=Ue(i),o=n.length-1;o>=0;o--){var r=n[o];if(r!==Ie){var s=e[r];if(void 0===s&&!Jt(e,r))return!0;var a=i[r],l=a&&a[Ie];if(l?l.t!==s:!Qt(a,s))return!0}}var c=!!e[Ie];return n.length!==Ue(e).length+(c?0:1)}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var i=Object.getOwnPropertyDescriptor(e,e.length-1);if(i&&!i.get)return!0;for(var n=0;n<e.length;n++)if(!e.hasOwnProperty(n))return!0;return!1}var o={};!function(t,e){Pe[t]||(Pe[t]=e)}("ES5",{J:function(e,i){var n=Array.isArray(e),o=function(e,i){if(e){for(var n=Array(i.length),o=0;o<i.length;o++)Object.defineProperty(n,""+o,t(o,!0));return n}var r=Me(i);delete r[Ie];for(var s=Ue(r),a=0;a<s.length;a++){var l=s[a];r[l]=t(l,e||!!r[l].enumerable)}return Object.create(Object.getPrototypeOf(i),r)}(n,e),r={i:n?5:4,A:i?i.A:le(),P:!1,I:!1,R:{},l:i,t:e,k:o,o:null,g:!1,C:!1};return Object.defineProperty(o,Ie,{value:r,writable:!0}),o},S:function(t,i,o){o?Zt(i)&&i[Ie].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[Ie];if(i){var o=i.t,r=i.k,s=i.R,a=i.i;if(4===a)qt(r,(function(e){e!==Ie&&(void 0!==o[e]||Jt(o,e)?s[e]||t(r[e]):(s[e]=!0,me(i)))})),qt(o,(function(t){void 0!==r[t]||Jt(r,t)||(s[t]=!1,me(i))}));else if(5===a){if(n(i)&&(me(i),s.length=!0),r.length<o.length)for(var l=r.length;l<o.length;l++)s[l]=!1;else for(var c=o.length;c<r.length;c++)s[c]=!0;for(var h=Math.min(r.length,o.length),u=0;u<h;u++)r.hasOwnProperty(u)||(s[u]=!0),void 0===s[u]&&t(r[u])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Ii{static get(t){var e;const i="string"==typeof t?t:t.name,n="string"==typeof t?void 0:t,o=window.ftReduxStores[i];if(Dt(o))return o;if(null==n)return;const r=Ei({...n,reducers:null!==(e=n.reducers)&&void 0!==e?e:{}}),s=Si({reducer:(t,e)=>{var i;switch(e.type){case"CLEAR_FT_REDUX_STORE":return r.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(i=e.overwrites)&&void 0!==i?i:{}};default:return r.reducer(t,e)}}});return window.ftReduxStores[n.name]=new Ii(r,s)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=e,o=t[n];return o?(...t)=>{const e=o(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[n]:t})}}})}clear(){this.reduxStore.dispatch({type:"CLEAR_FT_REDUX_STORE"})}setState(t){this.reduxStore.dispatch({type:"DEFAULT_STATE_FIELDS_VALUES_SETTER",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()}}const ji=t=>{const e=null!=t?t:{};return(t,i)=>{var n;const o={hasChanged:(t,e)=>!p(t,e),attribute:!1,...e};s(o)(t,i);const r=t;r.reduxProperties=r.reduxProperties||new Map,r.reduxProperties.set(i,{selector:null!==(n=e.selector)&&void 0!==n?n:t=>t[i],store:e.store})}};var Ui,Mi,Pi;const Di=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Pi=null===(Mi=null===(Ui=window.safari)||void 0===Ui?void 0:Ui.pushNotification)||void 0===Mi?void 0:Mi.toString())&&void 0!==Pi?Pi:"");var Fi=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Li extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}const Bi=Symbol("registerInterval");class zi extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setReaderStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"reader")}clearStateManager(){this.stateManager&&(this.removeStore("reader"),this.stateManager=void 0)}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),this[Bi]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Bi]):this.dispatchEvent(new Li)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Bi,Fi([a()],i.prototype,"stateManager",void 0),i}(Wt)){}const Hi=kt.extend("--ft-ripple-color",Et.colorContent),Ki={color:Hi,backgroundColor:kt.extend("--ft-ripple-background-color",Hi),opacityContentOnSurfacePressed:kt.external(Et.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:kt.external(Et.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:kt.external(Et.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:kt.external(Et.opacityContentOnSurfaceSelected,"Design system"),borderRadius:kt.create("--ft-ripple-border-radius","SIZE","0px")},Wi=kt.extend("--ft-ripple-color",Et.colorPrimary),Vi=Wi,Zi=kt.extend("--ft-ripple-background-color",Wi),Gi=kt.extend("--ft-ripple-color",Et.colorSecondary),qi=Gi,Xi=kt.extend("--ft-ripple-background-color",Gi),Ji=S`
102
102
  :host {
103
103
  display: contents;
104
104
  }
@@ -120,6 +120,30 @@ var mt,wt;let $t=class extends j{constructor(){super(...arguments),this.renderOp
120
120
  opacity: 0;
121
121
  }
122
122
 
123
+ .ft-ripple .ft-ripple--effect {
124
+ aspect-ratio: 1;
125
+ width: auto;
126
+ height: auto;
127
+ min-width: 170%;
128
+ min-height: 170%;
129
+ }
130
+
131
+ .ft-ripple .ft-ripple--background{
132
+ width: 100%;
133
+ height: 100%;
134
+ }
135
+
136
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
137
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
138
+ aspect-ratio: 1;
139
+ width: auto;
140
+ height: auto;
141
+ max-width: unset;
142
+ max-height: unset;
143
+ min-width: 100%;
144
+ min-height: 100%;
145
+ }
146
+
123
147
  .ft-ripple .ft-ripple--background {
124
148
  background-color: ${Ki.backgroundColor};
125
149
  }
@@ -147,8 +171,6 @@ var mt,wt;let $t=class extends j{constructor(){super(...arguments),this.renderOp
147
171
  .ft-ripple .ft-ripple--background {
148
172
  top: 0;
149
173
  left: 0;
150
- height: 100%;
151
- width: 100%;
152
174
  transition: opacity 75ms linear;
153
175
  }
154
176
 
@@ -691,14 +713,8 @@ const Do=1,Fo=2,Lo=t=>(...e)=>({_$litDirective$:t,values:e});class Bo{constructo
691
713
  * Copyright 2018 Google LLC
692
714
  * SPDX-License-Identifier: BSD-3-Clause
693
715
  */
694
- const or=Lo(class extends Bo{constructor(t){var e;if(super(t),t.type!==Do||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,n;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const o=t.element.classList;this.it.forEach((t=>{t in e||(o.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(n=this.nt)||void 0===n?void 0:n.has(t))||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return nt}});var rr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class sr extends jt{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.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new o(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new o(10),this.moveRipple=t=>{var e,i;let{x:n,y:o}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=n?n-r.x:r.width/2),this.originY=Math.round(null!=o?o-r.y:r.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(null==t?void 0: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 it`
716
+ const or=Lo(class extends Bo{constructor(t){var e;if(super(t),t.type!==Do||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,n;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const o=t.element.classList;this.it.forEach((t=>{t in e||(o.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(n=this.nt)||void 0===n?void 0:n.has(t))||(i?(o.add(t),this.it.add(t)):(o.remove(t),this.it.delete(t)))}return nt}});var rr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class sr extends jt{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 o(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new o(10),this.moveRipple=t=>{var e,i;let{x:n,y:o}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=n?n-r.x:r.width/2),this.originY=Math.round(null!=o?o-r.y:r.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(null==t?void 0: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 it`
695
717
  <style>
696
- .ft-ripple .ft-ripple--effect,
697
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
698
- width: ${this.rippleSize}px;
699
- height: ${this.rippleSize}px;
700
- }
701
-
702
718
  .ft-ripple .ft-ripple--effect {
703
719
  left: ${this.originX}px;
704
720
  top: ${this.originY}px;
@@ -708,7 +724,7 @@ const or=Lo(class extends Bo{constructor(t){var e;if(super(t),t.type!==Do||"clas
708
724
  <div class="ft-ripple--background"></div>
709
725
  <div class="ft-ripple--effect"></div>
710
726
  </div>
711
- `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}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");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),n=e("touchend","touchcancel"),o=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",n),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",o),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",n),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",o),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let n,o;return null!=e.x?({x:n,y:o}=e):null!=i.touches&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}sr.elementDefinitions={},sr.styles=Ji,rr([s({type:Boolean})],sr.prototype,"primary",void 0),rr([s({type:Boolean})],sr.prototype,"secondary",void 0),rr([s({type:Boolean})],sr.prototype,"unbounded",void 0),rr([s({type:Boolean})],sr.prototype,"activated",void 0),rr([s({type:Boolean})],sr.prototype,"selected",void 0),rr([s({type:Boolean})],sr.prototype,"disabled",void 0),rr([a()],sr.prototype,"hovered",void 0),rr([a()],sr.prototype,"focused",void 0),rr([a()],sr.prototype,"pressed",void 0),rr([a()],sr.prototype,"rippling",void 0),rr([a()],sr.prototype,"rippleSize",void 0),rr([a()],sr.prototype,"originX",void 0),rr([a()],sr.prototype,"originY",void 0),rr([c(".ft-ripple")],sr.prototype,"ripple",void 0),rr([c(".ft-ripple--effect")],sr.prototype,"rippleEffect",void 0),v("ft-ripple")(sr);const ar={borderRadiusLeft:kt.extend("--ft-switch-option-border-radius-left",Et.borderRadiusL),borderRadiusRight:kt.extend("--ft-switch-option-border-radius-right",Et.borderRadiusL),borderWidthLeft:kt.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:kt.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:kt.create("--ft-switch-option-border-width-vertical","SIZE","1px")},lr=S`
727
+ `}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 e,i;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||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,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i)}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");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),n=e("touchend","touchcancel"),o=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",n),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",o),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",n),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",o),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const e=t,i=t;let n,o;return null!=e.x?({x:n,y:o}=e):null!=i.touches&&(n=i.touches[0].clientX,o=i.touches[0].clientY),{x:n,y:o}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}sr.elementDefinitions={},sr.styles=Ji,rr([s({type:Boolean})],sr.prototype,"primary",void 0),rr([s({type:Boolean})],sr.prototype,"secondary",void 0),rr([s({type:Boolean})],sr.prototype,"unbounded",void 0),rr([s({type:Boolean})],sr.prototype,"activated",void 0),rr([s({type:Boolean})],sr.prototype,"selected",void 0),rr([s({type:Boolean})],sr.prototype,"disabled",void 0),rr([a()],sr.prototype,"hovered",void 0),rr([a()],sr.prototype,"focused",void 0),rr([a()],sr.prototype,"pressed",void 0),rr([a()],sr.prototype,"rippling",void 0),rr([a()],sr.prototype,"originX",void 0),rr([a()],sr.prototype,"originY",void 0),rr([c(".ft-ripple")],sr.prototype,"ripple",void 0),rr([c(".ft-ripple--effect")],sr.prototype,"rippleEffect",void 0),v("ft-ripple")(sr);const ar={borderRadiusLeft:kt.extend("--ft-switch-option-border-radius-left",Et.borderRadiusL),borderRadiusRight:kt.extend("--ft-switch-option-border-radius-right",Et.borderRadiusL),borderWidthLeft:kt.create("--ft-switch-option-border-width-left","SIZE","1px"),borderWidthRight:kt.create("--ft-switch-option-border-width-right","SIZE","1px"),borderWidthVertical:kt.create("--ft-switch-option-border-width-vertical","SIZE","1px")},lr=S`
712
728
  .ft-switch-option {
713
729
  position: relative;
714
730
  display: inline-block;
@@ -792,7 +808,7 @@ const or=Lo(class extends Bo{constructor(t){var e;if(super(t),t.type!==Do||"clas
792
808
  .ft-switch-option--selected ft-icon {
793
809
  color: ${ao.selectedTextColor};
794
810
  }
795
- `;var cr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class hr extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}}class ur extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}}class fr extends jt{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new ur(this.selected))}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(it`
811
+ `;var cr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class hr extends CustomEvent{constructor(t){super("option-change-by-user",{detail:t,bubbles:!0,composed:!0})}}class ur extends CustomEvent{constructor(t){super("option-change",{detail:t,bubbles:!0,composed:!0})}}class fr extends jt{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}update(t){super.update(t),t.has("selected")&&this.dispatchEvent(new ur(this.selected))}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(it`
796
812
  <label part="label" for="input" class=${or(t)}
797
813
  @click=${this.onChange}>
798
814
  <div class="ft-switch-option--content">
@@ -816,7 +832,7 @@ const or=Lo(class extends Bo{constructor(t){var e;if(super(t),t.type!==Do||"clas
816
832
  </ft-tooltip>
817
833
  `}onChange(){this.selected=!this.unselectable||!this.selected,this.dispatchEvent(new hr(this.selected))}getLabel(){return this.label||this.textContent}resolveIcon(){return this.icon?it`
818
834
  <ft-icon part="icon" .variant=${this.iconVariant} .value=${this.icon}></ft-icon>
819
- `:ot}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}fr.elementDefinitions={"ft-ripple":sr,"ft-typography":Po,"ft-tooltip":nr,"ft-icon":Go},fr.styles=[Mt,lr],cr([s()],fr.prototype,"value",void 0),cr([s()],fr.prototype,"icon",void 0),cr([s()],fr.prototype,"iconVariant",void 0),cr([s()],fr.prototype,"label",void 0),cr([s()],fr.prototype,"tooltipPosition",void 0),cr([s({type:Boolean,reflect:!0})],fr.prototype,"selected",void 0),cr([s({type:Boolean})],fr.prototype,"trailingIcon",void 0),cr([s({type:Boolean})],fr.prototype,"unselectable",void 0),cr([c(".ft-switch-option--content slot")],fr.prototype,"slottedContent",void 0),cr([c(".ft-switch-option--input")],fr.prototype,"input",void 0);var dr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class pr extends CustomEvent{constructor(t){super("change",{detail:t})}}class vr extends jt{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}updated(t){super.updated(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return it`
835
+ `:ot}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}}fr.elementDefinitions={"ft-ripple":sr,"ft-typography":Po,"ft-tooltip":nr,"ft-icon":Go},fr.styles=[Mt,lr],cr([s()],fr.prototype,"value",void 0),cr([s()],fr.prototype,"icon",void 0),cr([s()],fr.prototype,"iconVariant",void 0),cr([s()],fr.prototype,"label",void 0),cr([s()],fr.prototype,"tooltipPosition",void 0),cr([s({type:Boolean,reflect:!0})],fr.prototype,"selected",void 0),cr([s({type:Boolean})],fr.prototype,"trailingIcon",void 0),cr([s({type:Boolean})],fr.prototype,"unselectable",void 0),cr([c(".ft-switch-option--content slot")],fr.prototype,"slottedContent",void 0),cr([c(".ft-switch-option--input")],fr.prototype,"input",void 0);var dr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class pr extends CustomEvent{constructor(t){super("change",{detail:t})}}class vr extends jt{constructor(){super(...arguments),this.dense=!1,this.unselectable=!1,this.options=[]}get value(){var t;return null===(t=this.selectedOption)||void 0===t?void 0:t.value}update(t){super.update(t),t.has("selectedOption")&&this.updateOptions(),t.has("unselectable")&&this.options.forEach((t=>t.unselectable=this.unselectable))}render(){const t={"ft-switch":!0,"ft-switch--dense":this.dense};return it`
820
836
  <div @keydown=${this.onKeyDown} tabindex="0" class="${or(t)}">
821
837
  <slot @slotchange=${this.onSlotchange}
822
838
  @option-change=${this.onOptionChangeByScript}
@@ -1204,7 +1220,7 @@ const{I:Ar}=gt,Nr=()=>document.createComment(""),Tr=(t,e,i)=>{var n;const o=t._$
1204
1220
  `,zr=S`
1205
1221
  `,Hr=Ii.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Kr{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Hr.getState(),n=null!=t?t:i;if(e&&n&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,n,!0)}static get(t){var e;return null!=t?Kr.build(t):null!==(e=Kr.API)&&void 0!==e?e:Kr.API=Kr.build()}static await(t){return new Promise((e=>{let i=Kr.get(t);if(i)e(i);else{const n=Hr.subscribe((()=>{i=Kr.get(t),i&&(n(),e(i))}))}}))}}var Wr;const Vr=Symbol("clearAfterUnitTest");class Zr{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new n,this.listeners={},this.currentUiLocale="",this[Wr]=()=>{this.defaultMessages={},this.cache=new n,this.listeners={}},this.currentUiLocale=Hr.getState().uiLocale,Hr.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Hr.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const n={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};p(this.defaultMessages[t],n)||(this.defaultMessages[t]=n,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var n,o,r;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(o=null===(n=this.cache.getNow(t))||void 0===n?void 0:n.messages)&&void 0!==o?o:{};return new Pt(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(()=>this.messageContextProvider(this.currentUiLocale,t))),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}Wr=Vr,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Zr((async(t,e)=>(await Kr.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Zr((async(t,e)=>(await Kr.await()).getCustomMessageContext(t,e))));const Gr=window.FluidTopicsI18nService,qr=window.FluidTopicsCustomI18nService;var Xr=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Jr extends jt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Kr.get(),this.cache=new n,this.cleanSessionDebouncer=new o}render(){return it`
1206
1222
  <slot></slot>
1207
- `}updated(t){super.updated(t),t.has("baseUrl")&&Hr.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Hr.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Hr.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Hr.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Hr.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Hr.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Hr.actions.setSession(this.session),t.has("availableUiLocales")&&Hr.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Gr.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}Jr.elementDefinitions={},Jr.styles=zr,Xr([s()],Jr.prototype,"baseUrl",void 0),Xr([s()],Jr.prototype,"apiIntegrationIdentifier",void 0),Xr([s()],Jr.prototype,"uiLocale",void 0),Xr([b([])],Jr.prototype,"availableUiLocales",void 0),Xr([s({type:Boolean})],Jr.prototype,"editorMode",void 0),Xr([s({type:Boolean})],Jr.prototype,"noCustom",void 0),Xr([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Jr.prototype,"noCustomComponent",void 0),Xr([s({type:Boolean})],Jr.prototype,"withManualResources",void 0),Xr([b([])],Jr.prototype,"messageContexts",void 0),Xr([b(void 0)],Jr.prototype,"session",void 0),Xr([s({type:Object})],Jr.prototype,"apiProvider",void 0);class Yr{async listMySearches(){var t;return(null===(t=Hr.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Kr.await()).listMySearches(Hr.getState().session.profile.userId):[]}}const Qr=new n;class ts{async listMyBookmarks(){return Qr.get("bookmarks",(async()=>(await Kr.await()).listMyBookmarks(Hr.getState().session.profile.userId)))}clearCache(){Qr.clear("bookmarks")}}const es=Ii.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Hr.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ts,Hr.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Hr.getState();p(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){es.actions.savedSearches(void 0)}clearMyBookmarks(){es.actions.bookmarks(void 0)}async reloadMySearches(){const t=new Yr,e=await t.listMySearches();es.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;es.actions.bookmarks(e)}}},v("ft-app-context")(Jr);var is=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const ns=Symbol("i18nProperties"),os=Symbol("i18nUnsubs");function rs(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?qr:Gr}i18n(t,e,...i){var n;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(n=t.args)&&void 0!==n?n:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[ns])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[ns])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ns]&&new Set([...this[ns].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[os].has(t)||this[os].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[os].forEach((t=>t())),this[os].clear()}}return e=os,is([s({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class ss extends(rs(jt)){}class as extends(rs(Wt)){}var ls=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class cs extends as{constructor(){super(),this.editorMode=!1,this.addStore(Hr)}render(){return this.key&&this.context?it`
1223
+ `}update(t){super.update(t),t.has("baseUrl")&&Hr.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Hr.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Hr.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Hr.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Hr.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Hr.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Hr.actions.setSession(this.session),t.has("availableUiLocales")&&Hr.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Gr.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}Jr.elementDefinitions={},Jr.styles=zr,Xr([s()],Jr.prototype,"baseUrl",void 0),Xr([s()],Jr.prototype,"apiIntegrationIdentifier",void 0),Xr([s()],Jr.prototype,"uiLocale",void 0),Xr([b([])],Jr.prototype,"availableUiLocales",void 0),Xr([s({type:Boolean})],Jr.prototype,"editorMode",void 0),Xr([s({type:Boolean})],Jr.prototype,"noCustom",void 0),Xr([s({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Jr.prototype,"noCustomComponent",void 0),Xr([s({type:Boolean})],Jr.prototype,"withManualResources",void 0),Xr([b([])],Jr.prototype,"messageContexts",void 0),Xr([b(void 0)],Jr.prototype,"session",void 0),Xr([s({type:Object})],Jr.prototype,"apiProvider",void 0);class Yr{async listMySearches(){var t;return(null===(t=Hr.getState().session)||void 0===t?void 0:t.sessionAuthenticated)?(await Kr.await()).listMySearches(Hr.getState().session.profile.userId):[]}}const Qr=new n;class ts{async listMyBookmarks(){return Qr.get("bookmarks",(async()=>(await Kr.await()).listMyBookmarks(Hr.getState().session.profile.userId)))}clearCache(){Qr.clear("bookmarks")}}const es=Ii.get({name:"ft-user-assets",initialState:{savedSearches:void 0,bookmarks:void 0}});new class{constructor(){this.currentSession=Hr.getState().session,this.bookmarksAreUsed=!1,this.bookmarksService=new ts,Hr.subscribe((()=>this.reloadWhenUserSessionChanges()))}reloadWhenUserSessionChanges(){var t;const{session:e}=Hr.getState();p(null===(t=this.currentSession)||void 0===t?void 0:t.profile,null==e?void 0:e.profile)||(this.currentSession=e,this.clearMySearches(),this.reloadBookmarks())}clear(){this.clearMySearches(),this.clearMyBookmarks()}clearMySearches(){es.actions.savedSearches(void 0)}clearMyBookmarks(){es.actions.bookmarks(void 0)}async reloadMySearches(){const t=new Yr,e=await t.listMySearches();es.actions.savedSearches(e)}async reloadBookmarks(){this.bookmarksService.clearCache(),await this.updateBookmarksIfUsed()}async registerBookmarkComponent(){this.bookmarksAreUsed=!0,await this.updateBookmarksIfUsed()}async updateBookmarksIfUsed(){var t;if(this.bookmarksAreUsed){const e=(null===(t=this.currentSession)||void 0===t?void 0:t.sessionAuthenticated)?await this.bookmarksService.listMyBookmarks():void 0;es.actions.bookmarks(e)}}},v("ft-app-context")(Jr);var is=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const ns=Symbol("i18nProperties"),os=Symbol("i18nUnsubs");function rs(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?qr:Gr}i18n(t,e,...i){var n;if("string"==typeof t)return this.i18nService.resolveMessage(t,e,...i);const o=null!==(n=t.args)&&void 0!==n?n:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...o)}onI18nUpdate(t){var e;null===(e=this[ns])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}update(t){var e;super.update(t),null===(e=this[ns])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[ns]&&new Set([...this[ns].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[os].has(t)||this[os].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[os].forEach((t=>t())),this[os].clear()}}return e=os,is([s({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class ss extends(rs(jt)){}class as extends(rs(Wt)){}var ls=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class cs extends as{constructor(){super(),this.editorMode=!1,this.addStore(Hr)}render(){return this.key&&this.context?it`
1208
1224
  <span class="ft-i18n">
1209
1225
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
1210
1226
  </span>
@@ -1415,7 +1431,7 @@ const{I:Ar}=gt,Nr=()=>document.createComment(""),Tr=(t,e,i)=>{var n;const o=t._$
1415
1431
  .variant=${this.iconVariant}
1416
1432
  .value=${this.icon}
1417
1433
  @click=${()=>{var t;return null===(t=this.input)||void 0===t?void 0:t.focus()}}></ft-icon>
1418
- `:ot}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),n=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&n&&(this.suggestionsOnTop=t.bottom+n.height>window.innerHeight&&t.top-n.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let n;n="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[n])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}xs.elementDefinitions={"ft-input-label":Or,"ft-ripple":sr,"ft-typography":Po,"ft-icon":Go},xs.styles=[Bn,ys],gs([s()],xs.prototype,"label",void 0),gs([s({noAccessor:!0})],xs.prototype,"value",null),gs([a()],xs.prototype,"dispatchedValue",void 0),gs([s()],xs.prototype,"helper",void 0),gs([s({type:Boolean})],xs.prototype,"outlined",void 0),gs([s({type:Boolean})],xs.prototype,"disabled",void 0),gs([s({type:Boolean})],xs.prototype,"error",void 0),gs([s()],xs.prototype,"prefix",void 0),gs([s()],xs.prototype,"icon",void 0),gs([s()],xs.prototype,"passwordHiddenIcon",void 0),gs([s()],xs.prototype,"passwordRevealedIcon",void 0),gs([s()],xs.prototype,"iconVariant",void 0),gs([s({type:Boolean})],xs.prototype,"filterSuggestions",void 0),gs([s({type:Number})],xs.prototype,"maxLength",void 0),gs([s({type:Boolean})],xs.prototype,"password",void 0),gs([a()],xs.prototype,"focused",void 0),gs([a()],xs.prototype,"hidePassword",void 0),gs([a()],xs.prototype,"suggestionsOnTop",void 0),gs([a()],xs.prototype,"hideSuggestions",void 0),gs([a()],xs.prototype,"visibleSuggestions",void 0),gs([c(".ft-text-field--main-panel")],xs.prototype,"mainPanel",void 0),gs([c(".ft-text-field--input")],xs.prototype,"input",void 0),gs([c(".ft-text-field--suggestions")],xs.prototype,"suggestionsContainer",void 0),gs([f({selector:"ft-text-field-suggestion"})],xs.prototype,"suggestions",void 0);const ms=S`
1434
+ `:ot}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded(),t.has("value")&&null!=t.get("value")&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&null!=t.get("dispatchedValue")&&(this.hideSuggestions=!0)}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),n=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&n&&(this.suggestionsOnTop=t.bottom+n.height>window.innerHeight&&t.top-n.height>0)}}setValue(t,e=!1){this.value!==t&&(this.setInternalValue(t),this.dispatchEvent(new CustomEvent("live-change",{detail:t}))),e&&this.dispatchedValue!==t&&(this.dispatchedValue=t,this.dispatchEvent(new CustomEvent("change",{detail:t})))}handleInput(t){var e;const i=(null===(e=this.input)||void 0===e?void 0:e.value)||"";this.setValue(i,"Escape"==t.key||"Enter"==t.key)}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let n;n="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[n])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,e;(null===(t=this.mainPanel)||void 0===t?void 0:t.matches(":focus-within"))||(this.focused=!1,this.setValue((null===(e=this.input)||void 0===e?void 0:e.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}}xs.elementDefinitions={"ft-input-label":Or,"ft-ripple":sr,"ft-typography":Po,"ft-icon":Go},xs.styles=[Bn,ys],gs([s()],xs.prototype,"label",void 0),gs([s({noAccessor:!0})],xs.prototype,"value",null),gs([a()],xs.prototype,"dispatchedValue",void 0),gs([s()],xs.prototype,"helper",void 0),gs([s({type:Boolean})],xs.prototype,"outlined",void 0),gs([s({type:Boolean})],xs.prototype,"disabled",void 0),gs([s({type:Boolean})],xs.prototype,"error",void 0),gs([s()],xs.prototype,"prefix",void 0),gs([s()],xs.prototype,"icon",void 0),gs([s()],xs.prototype,"passwordHiddenIcon",void 0),gs([s()],xs.prototype,"passwordRevealedIcon",void 0),gs([s()],xs.prototype,"iconVariant",void 0),gs([s({type:Boolean})],xs.prototype,"filterSuggestions",void 0),gs([s({type:Number})],xs.prototype,"maxLength",void 0),gs([s({type:Boolean})],xs.prototype,"password",void 0),gs([a()],xs.prototype,"focused",void 0),gs([a()],xs.prototype,"hidePassword",void 0),gs([a()],xs.prototype,"suggestionsOnTop",void 0),gs([a()],xs.prototype,"hideSuggestions",void 0),gs([a()],xs.prototype,"visibleSuggestions",void 0),gs([c(".ft-text-field--main-panel")],xs.prototype,"mainPanel",void 0),gs([c(".ft-text-field--input")],xs.prototype,"input",void 0),gs([c(".ft-text-field--suggestions")],xs.prototype,"suggestionsContainer",void 0),gs([f({selector:"ft-text-field-suggestion"})],xs.prototype,"suggestions",void 0);const ms=S`
1419
1435
  .ft-text-field-suggestion {
1420
1436
  position: relative;
1421
1437
  padding: 8px 16px;
@@ -1533,7 +1549,7 @@ const{I:Ar}=gt,Nr=()=>document.createComment(""),Tr=(t,e,i)=>{var n;const o=t._$
1533
1549
  ${this.i18n(this.i18nProperties.feedbackSectionTitle)}
1534
1550
  </ft-typography>
1535
1551
  ${null==(null===(t=this.user)||void 0===t?void 0:t.userId)&&(null===(e=this.configuration)||void 0===e?void 0:e.mailsSentByFluidTopicsForUnauthenticatedUsers)?it`
1536
- <ft-text-field
1552
+ <ft-text-field outlined
1537
1553
  class="ft-reader-feedback--from-input"
1538
1554
  label=${fs.messages.feedbackfromEmail()}
1539
1555
  @live-change=${t=>this.from=t.detail.trim()}
@@ -1582,7 +1598,7 @@ const{I:Ar}=gt,Nr=()=>document.createComment(""),Tr=(t,e,i)=>{var n;const o=t._$
1582
1598
  display: none !important;
1583
1599
  }
1584
1600
  </style>
1585
- `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,n;super.updated(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(n=this.user)||void 0===n?void 0:n.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.map&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,n;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(i=this.service)||void 0===i?void 0:i.rateMap(null===(n=this.ratingSummary)||void 0===n?void 0:n.type,t))}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new _t({type:"info",message:fs.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}As.elementDefinitions={"ft-reader-feedback":Es},Cs([ji({store:Hr.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],As.prototype,"user",void 0),Cs([ji({store:"reader"})],As.prototype,"map",void 0),Cs([ji({store:Hr.name})],As.prototype,"editorMode",void 0),Cs([ji({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],As.prototype,"configuration",void 0),Cs([a()],As.prototype,"ratingSummary",void 0),Cs([s({type:Boolean})],As.prototype,"hideTitle",void 0),Cs([s()],As.prototype,"iconVariant",void 0),Cs([s()],As.prototype,"emptyStarIcon",void 0),Cs([s()],As.prototype,"filledStarIcon",void 0),Cs([s()],As.prototype,"emptyLikeIcon",void 0),Cs([s()],As.prototype,"filledLikeIcon",void 0),Cs([s()],As.prototype,"emptyDislikeIcon",void 0),Cs([s()],As.prototype,"filledDislikeIcon",void 0),Cs([c("ft-reader-feedback")],As.prototype,"readerFeedback",void 0),Cs([us(_s.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],As.prototype,"mailSubject",void 0);var Ns=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ts extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const Is=Symbol("registerInterval");class js extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[Is]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[Is]):this.dispatchEvent(new Ts)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=Is,Ns([a()],i.prototype,"tocNode",void 0),Ns([a()],i.prototype,"disableContextInteractions",void 0),i}(zi)){}var Us=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ms extends(rs(js)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=Vo.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Rs,this.i18nProperties={feedbackMainTitle:fs.properties.topicFeedbackMainTitle(),ratingSectionTitle:fs.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:fs.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:fs.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new o(100),this.sendRatingDebouncer=new o(500),this.addStore(Hr)}render(){return this.map&&this.tocNode&&(this.editorMode||this.componentVisible)?it`
1601
+ `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}update(t){var e,i,n;super.update(t),t.has("map")&&this.map&&this.updateData(),["map","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink())&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(n=this.user)||void 0===n?void 0:n.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}onStoreAvailable(t){super.onStoreAvailable(t),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.map&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getMapRating()))}))}rate(t){this.ratingSummary&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,n;if(!this.editorMode&&this.ratingSummary){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateMap()):await(null===(i=this.service)||void 0===i?void 0:i.rateMap(null===(n=this.ratingSummary)||void 0===n?void 0:n.type,t))}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{this.editorMode?this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()})):(await(null===(e=this.service)||void 0===e?void 0:e.sendMapFeedback(t.detail.message,t.detail.from)),this.dispatchEvent(new _t({type:"info",message:fs.messages.feedbackSuccess()}))),this.readerFeedback.clearFeedbackInput()}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.feedbackFailure()}))}}onMailerFeedbackSent(){this.dispatchEvent(new CustomEvent("ft-reader-mailer-map-feedback",{composed:!0,bubbles:!0}))}}As.elementDefinitions={"ft-reader-feedback":Es},Cs([ji({store:Hr.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],As.prototype,"user",void 0),Cs([ji({store:"reader"})],As.prototype,"map",void 0),Cs([ji({store:Hr.name})],As.prototype,"editorMode",void 0),Cs([ji({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],As.prototype,"configuration",void 0),Cs([a()],As.prototype,"ratingSummary",void 0),Cs([s({type:Boolean})],As.prototype,"hideTitle",void 0),Cs([s()],As.prototype,"iconVariant",void 0),Cs([s()],As.prototype,"emptyStarIcon",void 0),Cs([s()],As.prototype,"filledStarIcon",void 0),Cs([s()],As.prototype,"emptyLikeIcon",void 0),Cs([s()],As.prototype,"filledLikeIcon",void 0),Cs([s()],As.prototype,"emptyDislikeIcon",void 0),Cs([s()],As.prototype,"filledDislikeIcon",void 0),Cs([c("ft-reader-feedback")],As.prototype,"readerFeedback",void 0),Cs([us(_s.properties["mail.map_feedback.subject"]((t=>{var e;return[null===(e=t.map)||void 0===e?void 0:e.title]})))],As.prototype,"mailSubject",void 0);var Ns=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ts extends Event{constructor(){super("register-ft-reader-topic-component",{bubbles:!0,composed:!0})}}const Is=Symbol("registerInterval");class js extends(function(t){var e;class i extends t{constructor(){super(...arguments),this.disableContextInteractions=!1,this[e]=0}connectedCallback(){super.connectedCallback(),this[Is]=window.setInterval((()=>this.tryToRegisterToTopicContext()),50)}tryToRegisterToTopicContext(){null!=this.tocNode?window.clearInterval(this[Is]):this.dispatchEvent(new Ts)}disconnectedCallback(){super.disconnectedCallback(),this.tocNode=void 0}}return e=Is,Ns([a()],i.prototype,"tocNode",void 0),Ns([a()],i.prototype,"disableContextInteractions",void 0),i}(zi)){}var Us=function(t,e,i,n){for(var o,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,a=t.length-1;a>=0;a--)(o=t[a])&&(s=(r<3?o(s):r>3?o(e,i,s):o(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class Ms extends(rs(js)){constructor(){super(),this.editorMode=!1,this.hideTitle=!1,this.iconVariant=Vo.fluid_topics,this.emptyStarIcon="STAR",this.filledStarIcon="STAR_PLAIN",this.emptyLikeIcon="THUMBS_UP",this.filledLikeIcon="THUMBS_UP_PLAIN",this.emptyDislikeIcon="THUMBS_DOWN",this.filledDislikeIcon="THUMBS_DOWN_PLAIN",this.feedbackLinkBuilder=new Rs,this.i18nProperties={feedbackMainTitle:fs.properties.topicFeedbackMainTitle(),ratingSectionTitle:fs.properties.topicRatingSectionTitle(),dichotomousRatingSectionTitle:fs.properties.topicDichotomousRatingSectionTitle(),feedbackSectionTitle:fs.properties.topicFeedbackSectionTitle()},this.updateDebouncer=new o(100),this.sendRatingDebouncer=new o(500),this.addStore(Hr)}render(){return this.map&&this.tocNode&&(this.editorMode||this.componentVisible)?it`
1586
1602
  <ft-reader-feedback
1587
1603
  .i18nProperties=${this.i18nProperties}
1588
1604
  ?ratingAllowed=${this.tocNode.hasRating}
@@ -1608,4 +1624,4 @@ const{I:Ar}=gt,Nr=()=>document.createComment(""),Tr=(t,e,i)=>{var n;const o=t._$
1608
1624
  display: none !important;
1609
1625
  }
1610
1626
  </style>
1611
- `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}updated(t){var e,i,n;super.updated(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(n=this.user)||void 0===n?void 0:n.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.tocNode&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,n;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(i=this.service)||void 0===i?void 0:i.rateTopic(this.tocNode.tocId,null===(n=this.ratingSummary)||void 0===n?void 0:n.type,t))}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new _t({type:"info",message:fs.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}Ms.elementDefinitions={"ft-reader-feedback":Es},Us([ji({store:Hr.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],Ms.prototype,"user",void 0),Us([ji({store:"reader"})],Ms.prototype,"map",void 0),Us([ji({store:Hr.name})],Ms.prototype,"editorMode",void 0),Us([ji({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Ms.prototype,"configuration",void 0),Us([a()],Ms.prototype,"ratingSummary",void 0),Us([s({type:Boolean})],Ms.prototype,"hideTitle",void 0),Us([s()],Ms.prototype,"iconVariant",void 0),Us([s()],Ms.prototype,"emptyStarIcon",void 0),Us([s()],Ms.prototype,"filledStarIcon",void 0),Us([s()],Ms.prototype,"emptyLikeIcon",void 0),Us([s()],Ms.prototype,"filledLikeIcon",void 0),Us([s()],Ms.prototype,"emptyDislikeIcon",void 0),Us([s()],Ms.prototype,"filledDislikeIcon",void 0),Us([c("ft-reader-feedback")],Ms.prototype,"readerFeedback",void 0),Us([us(_s.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],Ms.prototype,"mailSubject",void 0),v("ft-reader-map-feedback")(As),v("ft-reader-topic-feedback")(Ms),t.FtReaderFeedbackCssVariables=lo,t.FtReaderMapFeedback=As,t.FtReaderTopicFeedback=Ms,t.styles=co}({});
1627
+ `}get componentVisible(){var t;return!!this.user&&this.user.roles.includes("FEEDBACK_USER")||!!this.user&&this.user.roles.includes("RATING_USER")&&"NO_RATING"!==(null===(t=this.ratingSummary)||void 0===t?void 0:t.type)}update(t){var e,i,n;super.update(t),["tocNode","user"].some((e=>t.has(e)))&&this.tocNode&&this.updateData(),["map","tocNode","configuration","user","mailSubject"].some((e=>t.has(e)))&&this.map&&this.tocNode&&this.configuration&&this.feedbackLinkBuilder.update(this.mailSubject,null!==(i=null===(e=this.service)||void 0===e?void 0:e.getLink(this.tocNode.tocId))&&void 0!==i?i:"",this.map.metadata,this.configuration,null!=(null===(n=this.user)||void 0===n?void 0:n.userId))}connectedCallback(){super.connectedCallback(),this.updateData()}updateData(){this.updateDebouncer.run((async()=>{var t,e;this.tocNode&&((null===(t=this.user)||void 0===t?void 0:t.userId)||null==this.ratingSummary)&&(this.ratingSummary=await(null===(e=this.service)||void 0===e?void 0:e.getTopicRating(this.tocNode.tocId)))}))}rate(t){this.ratingSummary&&this.tocNode&&(this.ratingSummary={...this.ratingSummary,rating:null==t.detail?void 0:{tocId:this.tocNode.tocId,type:this.ratingSummary.type,value:t.detail,date:new Date}},this.sendRatingDebouncer.run((()=>this.sendRating(t.detail))))}async sendRating(t){var e,i,n;if(!this.editorMode&&this.ratingSummary&&this.tocNode){try{null==t?await(null===(e=this.service)||void 0===e?void 0:e.unrateTopic(this.tocNode.tocId)):await(null===(i=this.service)||void 0===i?void 0:i.rateTopic(this.tocNode.tocId,null===(n=this.ratingSummary)||void 0===n?void 0:n.type,t))}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.ratingFailure()}))}this.updateData()}else this.editorMode&&this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()}))}async sendFeedback(t){var e;try{!this.editorMode&&this.tocNode?(await(null===(e=this.service)||void 0===e?void 0:e.sendTopicFeedback(this.tocNode.tocId,t.detail.message,t.detail.from)),this.dispatchEvent(new _t({type:"info",message:fs.messages.feedbackSuccess()})),this.readerFeedback.clearFeedbackInput()):this.editorMode&&this.dispatchEvent(new _t({type:"info",message:ps.messages.feedbackAndRatingDisabledInEditor()}))}catch{this.dispatchEvent(new _t({type:"error",message:fs.messages.feedbackFailure()}))}}onMailerFeedbackSent(){const t=this.tocNode;this.dispatchEvent(new CustomEvent("ft-reader-mailer-topic-feedback",{detail:{topic:t},composed:!0,bubbles:!0}))}}Ms.elementDefinitions={"ft-reader-feedback":Es},Us([ji({store:Hr.name,selector:t=>{var e;return null===(e=t.session)||void 0===e?void 0:e.profile}})],Ms.prototype,"user",void 0),Us([ji({store:"reader"})],Ms.prototype,"map",void 0),Us([ji({store:Hr.name})],Ms.prototype,"editorMode",void 0),Us([ji({store:"reader",selector:t=>{var e;return null===(e=t.configuration)||void 0===e?void 0:e.feedback}})],Ms.prototype,"configuration",void 0),Us([a()],Ms.prototype,"ratingSummary",void 0),Us([s({type:Boolean})],Ms.prototype,"hideTitle",void 0),Us([s()],Ms.prototype,"iconVariant",void 0),Us([s()],Ms.prototype,"emptyStarIcon",void 0),Us([s()],Ms.prototype,"filledStarIcon",void 0),Us([s()],Ms.prototype,"emptyLikeIcon",void 0),Us([s()],Ms.prototype,"filledLikeIcon",void 0),Us([s()],Ms.prototype,"emptyDislikeIcon",void 0),Us([s()],Ms.prototype,"filledDislikeIcon",void 0),Us([c("ft-reader-feedback")],Ms.prototype,"readerFeedback",void 0),Us([us(_s.properties["mail.feedback.subject"]((t=>{var e,i;return[null===(e=t.tocNode)||void 0===e?void 0:e.title,null===(i=t.map)||void 0===i?void 0:i.title]})))],Ms.prototype,"mailSubject",void 0),v("ft-reader-map-feedback")(As),v("ft-reader-topic-feedback")(Ms),t.FtReaderFeedbackCssVariables=lo,t.FtReaderMapFeedback=As,t.FtReaderTopicFeedback=Ms,t.styles=co}({});
@@ -29,7 +29,7 @@ export declare class FtReaderMapFeedback extends FtReaderMapFeedback_base implem
29
29
  constructor();
30
30
  protected render(): import("lit-html").TemplateResult<1>;
31
31
  private get componentVisible();
32
- protected updated(props: PropertyValues): void;
32
+ protected update(props: PropertyValues): void;
33
33
  connectedCallback(): void;
34
34
  onStoreAvailable(name?: string): void;
35
35
  private updateDebouncer;
@@ -76,9 +76,9 @@ class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
76
76
  return (!!this.user && this.user.roles.includes("FEEDBACK_USER"))
77
77
  || (!!this.user && this.user.roles.includes("RATING_USER") && ((_a = this.ratingSummary) === null || _a === void 0 ? void 0 : _a.type) !== "NO_RATING");
78
78
  }
79
- updated(props) {
79
+ update(props) {
80
80
  var _a, _b, _c;
81
- super.updated(props);
81
+ super.update(props);
82
82
  if (props.has("map") && this.map) {
83
83
  this.updateData();
84
84
  }
@@ -31,7 +31,7 @@ export declare class FtReaderTopicFeedback extends FtReaderTopicFeedback_base im
31
31
  constructor();
32
32
  protected render(): import("lit-html").TemplateResult<1>;
33
33
  private get componentVisible();
34
- protected updated(props: PropertyValues): void;
34
+ protected update(props: PropertyValues): void;
35
35
  connectedCallback(): void;
36
36
  private updateDebouncer;
37
37
  private updateData;
@@ -76,9 +76,9 @@ class FtReaderTopicFeedback extends withI18n(FtReaderTopicComponent) {
76
76
  return (!!this.user && this.user.roles.includes("FEEDBACK_USER"))
77
77
  || (!!this.user && this.user.roles.includes("RATING_USER") && ((_a = this.ratingSummary) === null || _a === void 0 ? void 0 : _a.type) !== "NO_RATING");
78
78
  }
79
- updated(props) {
79
+ update(props) {
80
80
  var _a, _b, _c;
81
- super.updated(props);
81
+ super.update(props);
82
82
  if (["tocNode", "user"].some(p => props.has(p)) && this.tocNode) {
83
83
  this.updateData();
84
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-feedback",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Feedback forms for a map and its topics in an integrated reader",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,13 +19,13 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "1.0.55",
23
- "@fluid-topics/ft-reader-context": "1.0.55",
24
- "@fluid-topics/ft-wc-utils": "1.0.55",
22
+ "@fluid-topics/ft-app-context": "1.0.56",
23
+ "@fluid-topics/ft-reader-context": "1.0.56",
24
+ "@fluid-topics/ft-wc-utils": "1.0.56",
25
25
  "lit": "2.7.2"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluid-topics/public-api": "1.0.45"
29
29
  },
30
- "gitHead": "4eca32ed1fec3fd25b6d76b26895a6318cfa8ca2"
30
+ "gitHead": "da00d6ea6bfc74fef8c6687f383355e35a26289b"
31
31
  }