@fluid-topics/ft-wc-utils 1.1.7 → 1.1.9

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.
@@ -185,4 +185,4 @@ const Eo=2;let Ro=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,
185
185
  display: inline-block;
186
186
  width: 0;
187
187
  }
188
- `;class zr{constructor(){this.stack=[]}add(t,e=!1){e&&(this.stack=this.stack.filter((e=>e.type!==t.type))),this.stack.push(t)}consume(t){const e=this.stack.find((e=>e.type===t));return e&&(this.stack=this.stack.filter((t=>t!==e))),e}}function Hr(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Tr,Gr,Vr;const qr=Symbol("internalReduxEventsUnsubscribers"),Jr=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores");function Xr(t){for(var e=arguments.length,o=Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Qr(t){return!!t&&!!t[Pi]}function ti(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 o=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===Mi}(t)||Array.isArray(t)||!!t[Bi]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Bi])||ai(t)||si(t))}function ei(t,e,o){void 0===o&&(o=!1),0===oi(t)?(o?Object.keys:_i)(t).forEach((function(r){o&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(o,r){return e(r,o,t)}))}function oi(t){var e=t[Pi];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:ai(t)?2:si(t)?3:0}function ri(t,e){return 2===oi(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ii(t,e,o){var r=oi(t);2===r?t.set(e,o):3===r?t.add(o):t[e]=o}function ni(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function ai(t){return $i&&t instanceof Map}function si(t){return Fi&&t instanceof Set}function ci(t){return t.o||t.t}function li(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Zi(t);delete e[Pi];for(var o=_i(e),r=0;r<o.length;r++){var i=o[r],n=e[i];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[i]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function fi(t,e){return void 0===e&&(e=!1),ui(t)||Qr(t)||!ti(t)||(oi(t)>1&&(t.set=t.add=t.clear=t.delete=hi),Object.freeze(t),e&&ei(t,(function(t,e){return fi(e,!0)}),!0)),t}function hi(){Xr(2)}function ui(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function di(t){var e=Di[t];return e||Xr(18,t),e}function pi(){return ki}function yi(t,e){e&&(di("Patches"),t.u=[],t.s=[],t.v=e)}function gi(t){bi(t),t.p.forEach(Oi),t.p=null}function bi(t){t===ki&&(ki=t.l)}function mi(t){return ki={p:[],l:ki,h:t,m:!0,_:0}}function Oi(t){var e=t[Pi];0===e.i||1===e.i?e.j():e.g=!0}function vi(t,e){e._=e.p.length;var o=e.p[0],r=void 0!==t&&t!==o;return e.h.O||di("ES5").S(e,t,r),r?(o[Pi].P&&(gi(e),Xr(4)),ti(t)&&(t=Si(e,t),e.l||wi(e,t)),e.u&&di("Patches").M(o[Pi].t,t,e.u,e.s)):t=Si(e,o,[]),gi(e),e.u&&e.v(e.u,e.s),t!==Ki?t:void 0}function Si(t,e,o){if(ui(e))return e;var r=e[Pi];if(!r)return ei(e,(function(i,n){return Ni(t,r,e,i,n,o)}),!0),e;if(r.A!==t)return e;if(!r.P)return wi(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=li(r.k):r.o,n=i,a=!1;3===r.i&&(n=new Set(i),i.clear(),a=!0),ei(n,(function(e,n){return Ni(t,r,i,e,n,o,a)})),wi(t,i,!1),o&&t.u&&di("Patches").N(r,o,t.u,t.s)}return r.o}function Ni(t,e,o,r,i,n,a){if(Qr(i)){var s=Si(t,i,n&&e&&3!==e.i&&!ri(e.R,r)?n.concat(r):void 0);if(ii(o,r,s),!Qr(s))return;t.m=!1}else a&&o.add(i);if(ti(i)&&!ui(i)){if(!t.h.D&&t._<1)return;Si(t,i),e&&e.A.l||wi(t,i)}}function wi(t,e,o){void 0===o&&(o=!1),!t.l&&t.h.D&&t.m&&fi(e,o)}function Ci(t,e){var o=t[Pi];return(o?ci(o):t)[e]}function xi(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var r=Object.getOwnPropertyDescriptor(o,e);if(r)return r;o=Object.getPrototypeOf(o)}}function Ei(t){t.P||(t.P=!0,t.l&&Ei(t.l))}function Ri(t){t.o||(t.o=li(t.t))}function Li(t,e,o){var r=ai(e)?di("MapSet").F(e,o):si(e)?di("MapSet").T(e,o):t.O?function(t,e){var o=Array.isArray(t),r={i:o?1:0,A:e?e.A:pi(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,n=zi;o&&(i=[r],n=Hi);var a=Proxy.revocable(i,n),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(e,o):di("ES5").J(e,o);return(o?o.A:pi()).p.push(r),r}function Ii(t){return Qr(t)||Xr(22,t),function t(e){if(!ti(e))return e;var o,r=e[Pi],i=oi(e);if(r){if(!r.P&&(r.i<4||!di("ES5").K(r)))return r.t;r.I=!0,o=Ui(e,i),r.I=!1}else o=Ui(e,i);return ei(o,(function(e,i){r&&function(t,e){return 2===oi(t)?t.get(e):t[e]}(r.t,e)===i||ii(o,e,t(i))})),3===i?new Set(o):o}(t)}function Ui(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return li(t)}Tr=Jr,Gr=Yr,Vr=qr;var Wi,ki,Ai="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$i="undefined"!=typeof Map,Fi="undefined"!=typeof Set,ji="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ki=Ai?Symbol.for("immer-nothing"):((Wi={})["immer-nothing"]=!0,Wi),Bi=Ai?Symbol.for("immer-draftable"):"__$immer_draftable",Pi=Ai?Symbol.for("immer-state"):"__$immer_state",Mi=""+Object.prototype.constructor,_i="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Zi=Object.getOwnPropertyDescriptors||function(t){var e={};return _i(t).forEach((function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)})),e},Di={},zi={get:function(t,e){if(e===Pi)return t;var o=ci(t);if(!ri(o,e))return function(t,e,o){var r,i=xi(e,o);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,o,e);var r=o[e];return t.I||!ti(r)?r:r===Ci(t.t,e)?(Ri(t),t.o[e]=Li(t.A.h,r,t)):r},has:function(t,e){return e in ci(t)},ownKeys:function(t){return Reflect.ownKeys(ci(t))},set:function(t,e,o){var r=xi(ci(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,o),!0;if(!t.P){var i=Ci(ci(t),e),n=null==i?void 0:i[Pi];if(n&&n.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(ni(o,i)&&(void 0!==o||ri(t.t,e)))return!0;Ri(t),Ei(t)}return t.o[e]===o&&(void 0!==o||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==Ci(t.t,e)||e in t.t?(t.R[e]=!1,Ri(t),Ei(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=ci(t),r=Reflect.getOwnPropertyDescriptor(o,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:o[e]}:r},defineProperty:function(){Xr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Xr(12)}},Hi={};ei(zi,(function(t,e){Hi[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Hi.deleteProperty=function(t,e){return Hi.set.call(this,t,e,void 0)},Hi.set=function(t,e,o){return zi.set.call(this,t[0],e,o,t[0])};var Ti=function(){function t(t){var e=this;this.O=ji,this.D=!0,this.produce=function(t,o,r){if("function"==typeof t&&"function"!=typeof o){var i=o;o=t;var n=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var r;return(r=o).call.apply(r,[e,t].concat(a))}))}}var a;if("function"!=typeof o&&Xr(6),void 0!==r&&"function"!=typeof r&&Xr(7),ti(t)){var s=mi(e),c=Li(e,t,void 0),l=!0;try{a=o(c),l=!1}finally{l?gi(s):bi(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return yi(s,r),vi(t,s)}),(function(t){throw gi(s),t})):(yi(s,r),vi(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=o(t))&&(a=t),a===Ki&&(a=void 0),e.D&&fi(a,!0),r){var f=[],h=[];di("Patches").M(t,a,f,h),r(f,h)}return a}Xr(21,t)},this.produceWithPatches=function(t,o){if("function"==typeof t)return function(o){for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return e.produceWithPatches(o,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,n=e.produce(t,o,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,r,i]})):[n,r,i]},"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){ti(t)||Xr(8),Qr(t)&&(t=Ii(t));var e=mi(this),o=Li(this,t,void 0);return o[Pi].C=!0,bi(e),o},e.finishDraft=function(t,e){var o=(t&&t[Pi]).A;return yi(o,e),vi(void 0,o)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!ji&&Xr(20),this.O=t},e.applyPatches=function(t,e){var o;for(o=e.length-1;o>=0;o--){var r=e[o];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}o>-1&&(e=e.slice(o+1));var i=di("Patches").$;return Qr(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Gi=new Ti,Vi=Gi.produce;function qi(t){return qi="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},qi(t)}function Ji(t){var e=function(t,e){if("object"!==qi(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!==qi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===qi(e)?e:String(e)}function Yi(t,e,o){return(e=Ji(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Xi(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function Qi(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Xi(Object(o),!0).forEach((function(e){Yi(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Xi(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function tn(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. "}Gi.produceWithPatches.bind(Gi),Gi.setAutoFreeze.bind(Gi),Gi.setUseProxies.bind(Gi),Gi.applyPatches.bind(Gi),Gi.createDraft.bind(Gi),Gi.finishDraft.bind(Gi);var en="function"==typeof Symbol&&Symbol.observable||"@@observable",on=function(){return Math.random().toString(36).substring(7).split("").join(".")},rn={INIT:"@@redux/INIT"+on(),REPLACE:"@@redux/REPLACE"+on(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+on()}};function nn(t,e,o){var r;if("function"==typeof e&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error(tn(0));if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error(tn(1));return o(nn)(t,e)}if("function"!=typeof t)throw new Error(tn(2));var i=t,n=e,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(tn(3));return n}function h(t){if("function"!=typeof t)throw new Error(tn(4));if(c)throw new Error(tn(5));var e=!0;return l(),s.push(t),function(){if(e){if(c)throw new Error(tn(6));e=!1,l();var o=s.indexOf(t);s.splice(o,1),a=null}}}function u(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(tn(7));if(void 0===t.type)throw new Error(tn(8));if(c)throw new Error(tn(9));try{c=!0,n=i(n,t)}finally{c=!1}for(var e=a=s,o=0;o<e.length;o++){(0,e[o])()}return t}return u({type:rn.INIT}),(r={dispatch:u,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(tn(10));i=t,u({type:rn.REPLACE})}})[en]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(tn(11));function o(){t.next&&t.next(f())}return o(),{unsubscribe:e(o)}}})[en]=function(){return this},t},r}function an(t){for(var e=Object.keys(t),o={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(o[i]=t[i])}var n,a=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(e){var o=t[e];if(void 0===o(void 0,{type:rn.INIT}))throw new Error(tn(12));if(void 0===o(void 0,{type:rn.PROBE_UNKNOWN_ACTION()}))throw new Error(tn(13))}))}(o)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var r=!1,i={},s=0;s<a.length;s++){var c=a[s],l=o[c],f=t[c],h=l(f,e);if(void 0===h)throw e&&e.type,new Error(tn(14));i[c]=h,r=r||h!==f}return(r=r||a.length!==Object.keys(t).length)?i:t}}function sn(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];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 cn(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(t){return function(){var o=t.apply(void 0,arguments),r=function(){throw new Error(tn(15))},i={getState:o.getState,dispatch:function(){return r.apply(void 0,arguments)}},n=e.map((function(t){return t(i)}));return r=sn.apply(void 0,n)(o.dispatch),Qi(Qi({},o),{},{dispatch:r})}}}function ln(t){return function(e){var o=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(o,r,t):e(i)}}}}var fn=ln();fn.withExtraArgument=ln;var hn,un=fn,dn=(hn=function(t,e){return hn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},hn(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 o(){this.constructor=t}hn(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),pn=function(t,e){var o,r,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},yn=function(t,e){for(var o=0,r=e.length,i=t.length;o<r;o++,i++)t[i]=e[o];return t},gn=Object.defineProperty,bn=Object.defineProperties,mn=Object.getOwnPropertyDescriptors,On=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable,Nn=function(t,e,o){return e in t?gn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},wn=function(t,e){for(var o in e||(e={}))vn.call(e,o)&&Nn(t,o,e[o]);if(On)for(var r=0,i=On(e);r<i.length;r++){o=i[r];Sn.call(e,o)&&Nn(t,o,e[o])}return t},Cn=function(t,e){return bn(t,mn(e))},xn="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?sn:sn.apply(null,arguments)};var En=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return dn(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,yn([void 0],t[0].concat(this)))):new(e.bind.apply(e,yn([void 0],t.concat(this))))},e}(Array),Rn=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return dn(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,yn([void 0],t[0].concat(this)))):new(e.bind.apply(e,yn([void 0],t.concat(this))))},e}(Array);function Ln(t){return ti(t)?Vi(t,(function(){})):t}function In(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,o=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new En;o&&(!function(t){return"boolean"==typeof t}(o)?r.push(un.withExtraArgument(o.extraArgument)):r.push(un));return r}(t)}}function Un(t){var e,o=In(),r=t||{},i=r.reducer,n=void 0===i?void 0:i,a=r.middleware,s=void 0===a?o():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,h=void 0===f?void 0:f,u=r.enhancers,d=void 0===u?void 0:u;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var o=e;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return e===o}(n))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=an(n)}var p=s;"function"==typeof p&&(p=p(o));var y=cn.apply(void 0,p),g=sn;l&&(g=xn(wn({trace:!1},"object"==typeof l&&l)));var b=new Rn(y),m=b;return Array.isArray(d)?m=yn([y],d):"function"==typeof d&&(m=d(b)),nn(e,h,g.apply(void 0,m))}function Wn(t,e){function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return wn(wn({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(e){return e.type===t},o}function kn(t){var e,o={},r=[],i={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[r]=e,i},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),i},addDefaultCase:function(t){return e=t,i}};return t(i),[o,r,e]}function An(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var o,r="function"==typeof t.initialState?t.initialState:Ln(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};function l(){var e="function"==typeof t.extraReducers?kn(t.extraReducers):[t.extraReducers],o=e[0],i=void 0===o?{}:o,n=e[1],a=void 0===n?[]:n,c=e[2],l=void 0===c?void 0:c,f=wn(wn({},i),s);return function(t,e,o,r){void 0===o&&(o=[]);var i,n="function"==typeof e?kn(e):[e,o,r],a=n[0],s=n[1],c=n[2];if(function(t){return"function"==typeof t}(t))i=function(){return Ln(t())};else{var l=Ln(t);i=function(){return l}}function f(t,e){void 0===t&&(t=i());var o=yn([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===o.filter((function(t){return!!t})).length&&(o=[c]),o.reduce((function(t,o){if(o){var r;if(Qr(t))return void 0===(r=o(t,e))?t:r;if(ti(t))return Vi(t,(function(t){return o(t,e)}));if(void 0===(r=o(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=i,f}(r,(function(t){for(var e in f)t.addCase(e,f[e]);for(var o=0,r=a;o<r.length;o++){var i=r[o];t.addMatcher(i.matcher,i.reducer)}l&&t.addDefaultCase(l)}))}return n.forEach((function(t){var o,r,n=i[t],l=e+"/"+t;"reducer"in n?(o=n.reducer,r=n.prepare):o=n,a[t]=o,s[l]=o,c[t]=r?Wn(l,r):Wn(l)})),{name:e,reducer:function(t,e){return o||(o=l()),o(t,e)},actions:c,caseReducers:a,getInitialState:function(){return o||(o=l()),o.getInitialState()}}}var $n=["name","message","stack","code"],Fn=function(t,e){this.payload=t,this.meta=e},jn=function(t,e){this.payload=t,this.meta=e},Kn=function(t){if("object"==typeof t&&null!==t){for(var e={},o=0,r=$n;o<r.length;o++){var i=r[o];"string"==typeof t[i]&&(e[i]=t[i])}return e}return{message:String(t)}};function Bn(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,o){var r=Wn(t+"/fulfilled",(function(t,e,o,r){return{payload:t,meta:Cn(wn({},r||{}),{arg:o,requestId:e,requestStatus:"fulfilled"})}})),i=Wn(t+"/pending",(function(t,e,o){return{payload:void 0,meta:Cn(wn({},o||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=Wn(t+"/rejected",(function(t,e,r,i,n){return{payload:i,error:(o&&o.serializeError||Kn)(t||"Rejected"),meta:Cn(wn({},n||{}),{arg:r,requestId:e,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="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(s,c,l){var f,h=(null==o?void 0:o.idGenerator)?o.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",o=t;o--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),u=new a;function d(t){f=t,u.abort()}var p=function(){return a=this,p=null,y=function(){var a,p,y,g,b,m;return pn(this,(function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),g=null==(a=null==o?void 0:o.condition)?void 0:a.call(o,t,{getState:c,extra:l}),null===(v=g)||"object"!=typeof v||"function"!=typeof v.then?[3,2]:[4,g];case 1:g=O.sent(),O.label=2;case 2:if(!1===g||u.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return u.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:f||"Aborted"})}))})),s(i(h,t,null==(p=null==o?void 0:o.getPendingMeta)?void 0:p.call(o,{requestId:h,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:c,extra:l,requestId:h,signal:u.signal,abort:d,rejectWithValue:function(t,e){return new Fn(t,e)},fulfillWithValue:function(t,e){return new jn(t,e)}})).then((function(e){if(e instanceof Fn)throw e;return e instanceof jn?r(e.payload,h,t,e.meta):r(e,h,t)}))])];case 3:return y=O.sent(),[3,5];case 4:return m=O.sent(),y=m instanceof Fn?n(null,h,t,m.payload,m.meta):n(m,h,t),[3,5];case 5:return o&&!o.dispatchConditionRejection&&n.match(y)&&y.meta.condition||s(y),[2,y]}var v}))},new Promise((function(t,e){var o=function(t){try{i(y.next(t))}catch(t){e(t)}},r=function(t){try{i(y.throw(t))}catch(t){e(t)}},i=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(o,r)};i((y=y.apply(a,p)).next())}));var a,p,y}();return Object.assign(p,{abort:d,requestId:h,arg:t,unwrap:function(){return p.then(Bn)}})}}),{pending:i,rejected:n,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var Pn="listenerMiddleware";Wn(Pn+"/add"),Wn(Pn+"/removeAll"),Wn(Pn+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var o=i[t];return o?o.enumerable=e:i[t]=o={configurable:!0,enumerable:e,get:function(){var e=this[Pi];return zi.get(e,t)},set:function(e){var o=this[Pi];zi.set(o,t,e)}},o}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Pi];if(!i.P)switch(i.i){case 5:r(i)&&Ei(i);break;case 4:o(i)&&Ei(i)}}}function o(t){for(var e=t.t,o=t.k,r=_i(o),i=r.length-1;i>=0;i--){var n=r[i];if(n!==Pi){var a=e[n];if(void 0===a&&!ri(e,n))return!0;var s=o[n],c=s&&s[Pi];if(c?c.t!==a:!ni(s,a))return!0}}var l=!!e[Pi];return r.length!==_i(e).length+(l?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var o=Object.getOwnPropertyDescriptor(e,e.length-1);if(o&&!o.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){Di[t]||(Di[t]=e)}("ES5",{J:function(e,o){var r=Array.isArray(e),i=function(e,o){if(e){for(var r=Array(o.length),i=0;i<o.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var n=Zi(o);delete n[Pi];for(var a=_i(n),s=0;s<a.length;s++){var c=a[s];n[c]=t(c,e||!!n[c].enumerable)}return Object.create(Object.getPrototypeOf(o),n)}(r,e),n={i:r?5:4,A:o?o.A:pi(),P:!1,I:!1,R:{},l:o,t:e,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Pi,{value:n,writable:!0}),i},S:function(t,o,i){i?Qr(o)&&o[Pi].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var o=e[Pi];if(o){var i=o.t,n=o.k,a=o.R,s=o.i;if(4===s)ei(n,(function(e){e!==Pi&&(void 0!==i[e]||ri(i,e)?a[e]||t(n[e]):(a[e]=!0,Ei(o)))})),ei(i,(function(t){void 0!==n[t]||ri(n,t)||(a[t]=!1,Ei(o))}));else if(5===s){if(r(o)&&(Ei(o),a.length=!0),n.length<i.length)for(var c=n.length;c<i.length;c++)a[c]=!1;else for(var l=i.length;l<n.length;l++)a[l]=!0;for(var f=Math.min(n.length,i.length),h=0;h<f;h++)n.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(n[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?o(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class Mn{static get(t){var e;const o="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,i=window.ftReduxStores[o];if(Hr(i))return i;if(null==r)return;const n=An({...r,reducers:null!==(e=r.reducers)&&void 0!==e?e:{}}),a=Un({reducer:(t,e)=>{var o;switch(e.type){case"CLEAR_FT_REDUX_STORE":return n.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(o=e.overwrites)&&void 0!==o?o:{}};default:return n.reducer(t,e)}}});return window.ftReduxStores[r.name]=new Mn(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new zr,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,o)=>{const r=e,i=t[r];return i?(...t)=>{const e=i(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[r]: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 _n=Symbol("elementInternals");var Zn,Dn,zn;const Hn=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(zn=null===(Dn=null===(Zn=window.safari)||void 0===Zn?void 0:Zn.pushNotification)||void 0===Dn?void 0:Dn.toString())&&void 0!==zn?zn:"");var Tn=Object.freeze({__proto__:null,CacheRegistry:class{constructor(){this.loaders={},this.content={},this.clearTimeouts={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.clearClearTimeout(t),this.content[t]instanceof ko&&this.content[t].cancel(),delete this.content[t]}clearClearTimeout(t){null!=this.clearTimeouts[t]&&(window.clearTimeout(this.clearTimeouts[t]),delete this.clearTimeouts[t])}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,e,o){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=Ao(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=o&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),o)),e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}},CancelablePromise:ko,CanceledPromiseError:Wo,Debouncer:Fo,FtCommandQueue:zr,FtCssVariableFactory:_o,FtLitElement:Fr,FtLitElementRedux:class extends Fr{constructor(){super(...arguments),this[Tr]=new Map,this[Gr]=new Map,this[Vr]=[]}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[Yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yr].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Yr].get(t)}addStore(t,e){var o;e=null!==(o=null!=e?e:Hr(t)?t.name:void 0)&&void 0!==o?o:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Yr].delete(e)}setupStore(t,e){this[Yr].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Yr].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const o=this.constructor.getPropertyOptions(e);if(!(null==o?void 0:o.attribute)||!this.hasAttribute("string"==typeof(null==o?void 0:o.attribute)?o.attribute:e)){const o=this.getStore(t.store);o&&(t.store?this[Jr].has(t.store):this[Jr].size>0)&&(this[e]=t.selector(o.getState(),this))}}))}subscribeToStore(t,e){var o;this[Jr].set(t,e.subscribe((()=>this.updateFromStores()))),Hr(e)&&e.eventBus&&(null===(o=this.reduxEventListeners)||void 0===o||o.forEach(((t,o)=>{if("function"==typeof this[o]&&(!t.store||e.name===t.store)){const r=t=>this[o](t);e.eventBus.addEventListener(t.eventName,r),this[qr].push((()=>e.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Jr].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[qr].forEach((t=>t())),this[qr]=[]}unsubscribeFromStore(t){this[Jr].has(t)&&this[Jr].get(t)(),this[Jr].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}},FtNotificationEvent:Cr,FtReduxStore:Mn,ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var o,r;t=this.resolvePluralKey(t,e);let i=null!==(r=null!==(o=this.labels[t])&&void 0!==o?o:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,o)=>this.formatValue(t,o))))),i}resolvePluralKey(t,e){for(let o of e)if("number"==typeof o){const e=`${String(t)}[\\=${o}]`;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 o=o=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(o):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(o):t.toLocaleString(o);try{return o(document.documentElement.lang)}catch(t){return o()}}},PostResizeEvent:Er,PreResizeEvent:xr,ScopedRegistryLitElement:Ir,button:dr,cancelable:Ao,chart:gr,checkbox:Or,chip:br,clearAllStores:function(){var t;for(let e of Object.values(null!==(t=window.ftReduxStores)&&void 0!==t?t:{}))Hr(e)&&e.clear()},customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},dateReviver:function(...t){return function(e,o){return t.includes(e)?Ko(o):o}},deepEqual:Bo,delay:jo,designSystemVariables:wr,eventPathContainsMatchingElement:function(t,e,o){if(e.length>0){const r=t.composedPath();for(let t of r){if(t===o)return!1;if(t.matches&&e.some((e=>t.matches(e))))return!0}}return!1},flatDeep:function t(e,o){return e.flatMap((e=>[e,...t(o(e),o)]))},foundation:Zo,highlightHtml:function(t,e){let o=t.getAttribute("data-highlight-html-query");if((null!=o?o:"")!==(null!=e?e:"")){const o=new Kr(t);o.unmark(Mr),e&&e.trim()&&o.mark(e,Mr)}t.setAttribute("data-highlight-html-query",null!=e?e:"")},highlightHtmlColorCssVariable:Br,highlightHtmlStyles:Pr,isFtReduxStore:Hr,isSafari:Hn,jsonProperty:Po,noTextSelect:_r,notice:mr,notification:Nr,parseDate:Ko,radio:Sr,redux:t=>{const e=null!=t?t:{};return(t,o)=>{var r;const i={hasChanged:(t,e)=>!Bo(t,e),attribute:!1,...e};Se(i)(t,o);const n=t;n.reduxProperties=n.reduxProperties||new Map,n.reduxProperties.set(o,{selector:null!==(r=e.selector)&&void 0!==r?r:t=>t[o],store:e.store})}},reduxEventListener:t=>(e,o)=>{const r=e;r.reduxEventListeners=r.reduxEventListeners||new Map,r.reduxEventListeners.set(o,t)},reduxReactive:()=>(t,e)=>{const o=t;o.reduxReactiveProperties=o.reduxReactiveProperties||[],o.reduxReactiveProperties.push(e)},safariEllipsisFix:Dr,semantic:ur,serializeRequest:function(t,e){var o;const r=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");r.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${r.toString()}`).href},setVariable:function(t,e){return Mo(`${t.name}: ${e}`)},switch_:yr,tabs:pr,toFtFormComponent:function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[_n].form}constructor(...t){super(t),this[_n]=this.attachInternals(),this[_n].role=e}setFormValue(t){this[_n].setFormValue(t)}}},toggle:vr,typographies:hr,typographyBody1Medium:Vo,typographyBody1Regular:Go,typographyBody1Semibold:qo,typographyBody2Medium:Yo,typographyBody2Regular:Jo,typographyBody2Semibold:Xo,typographyCaption1Bold:sr,typographyCaption1Medium:nr,typographyCaption1Semibold:ar,typographyCaption2Bold:fr,typographyCaption2Medium:cr,typographyCaption2Semibold:lr,typographyDisplay:Do,typographyLabel1Bold:er,typographyLabel1Medium:Qo,typographyLabel1Semibold:tr,typographyLabel2Bold:ir,typographyLabel2Medium:or,typographyLabel2Semibold:rr,typographyTitle1:zo,typographyTitle2:Ho,typographyTitle3:To,typographyVariants:["display","title-1","title-2","title-3","body-1","body-2","label-1","label-2","caption-1","caption-2"],waitFor:async function(t,e=5){let o=await t();for(;null==o;)await jo(e),o=await t();return o},waitUntil:async function(t,e=5){let o=await t();for(;!o;)await jo(e),o=await t()},withConditionalVisibility:function(t){class e extends t{constructor(){super(...arguments),this.forceVisible=!1,this.isVisible=!0,this.isElementWithConditionalVisibility=!0}calculateStyles(t,e){if(t){const t=document.createElement("style");t.classList.add("conditional-visibility-style"),t.innerHTML=e,this.shadowRoot.append(t)}}hideIfNecessary(){const t=!(this.forceVisible||this.isVisible);this.calculateStyles(t,":host { display: none !important; }")}highlightIfForceVisible(){this.calculateStyles(this.forceVisible,":host { box-shadow: 0px 0px 0px 8px rgba(227,119,59,0.4) inset; }")}update(t){super.update(t),this.updateComplete.then((()=>{this.shadowRoot.querySelectorAll(".conditional-visibility-style").forEach((t=>t.remove())),this.hideIfNecessary(),this.highlightIfForceVisible()}))}}return $o([Se({type:Boolean,attribute:!1})],e.prototype,"forceVisible",void 0),$o([Ne()],e.prototype,"isVisible",void 0),e},wordWrap:Zr});t.lit=me,t.litClassMap=Me,t.litDecorators=xe,t.litRepeat=Be,t.litStyleMap=He,t.litUnsafeHTML=Uo,t.wcUtils=Tn}));
188
+ `;class zr{constructor(){this.queue=[]}add(t,e=!1){e&&(this.queue=this.queue.filter((e=>e.type!==t.type))),this.queue.push(t)}consume(t){const e=this.queue.find((e=>e.type===t));return e&&(this.queue=this.queue.filter((t=>t!==e))),e}}function Hr(t){var e;return null!==(e=null==t?void 0:t.isFtReduxStore)&&void 0!==e&&e}var Tr,Gr,Vr;const qr=Symbol("internalReduxEventsUnsubscribers"),Jr=Symbol("internalStoresUnsubscribers"),Yr=Symbol("internalStores");class Xr extends Fr{constructor(){super(...arguments),this[Tr]=new Map,this[Gr]=new Map,this[Vr]=[]}get reduxConstructor(){return this.constructor}update(t){super.update(t),[...this.reduxConstructor.reduxReactiveProperties].some((e=>t.has(e)))&&this.updateFromStores()}getUnnamedStore(){if(this[Yr].size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this[Yr].values()][0]}getStore(t){return null==t?this.getUnnamedStore():this[Yr].get(t)}addStore(t,e){var o;e=null!==(o=null!=e?e:Hr(t)?t.name:void 0)&&void 0!==o?o:"default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:t.name;this.unsubscribeFromStore(e),this[Yr].delete(e)}setupStore(t,e){this[Yr].set(t,e),this.subscribeToStore(t,e),this.updateFromStores()}setupStores(){this.unsubscribeFromStores(),this[Yr].forEach(((t,e)=>this.subscribeToStore(e,t))),this.updateFromStores()}updateFromStores(){this.reduxConstructor.reduxProperties.forEach(((t,e)=>{const o=this.constructor.getPropertyOptions(e);if(!(null==o?void 0:o.attribute)||!this.hasAttribute("string"==typeof(null==o?void 0:o.attribute)?o.attribute:e)){const o=this.getStore(t.store);o&&(t.store?this[Jr].has(t.store):this[Jr].size>0)&&(this[e]=t.selector(o.getState(),this))}}))}subscribeToStore(t,e){var o;this[Jr].set(t,e.subscribe((()=>this.updateFromStores()))),Hr(e)&&e.eventBus&&(null===(o=this.reduxConstructor.reduxEventListeners)||void 0===o||o.forEach(((t,o)=>{if("function"==typeof this[o]&&(!t.store||e.name===t.store)){const r=t=>this[o](t);e.eventBus.addEventListener(t.eventName,r),this[qr].push((()=>e.eventBus.removeEventListener(t.eventName,r)))}}))),this.onStoreAvailable(t)}unsubscribeFromStores(){this[Jr].forEach(((t,e)=>this.unsubscribeFromStore(e))),this[qr].forEach((t=>t())),this[qr]=[]}unsubscribeFromStore(t){this[Jr].has(t)&&this[Jr].get(t)(),this[Jr].delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeFromStores()}}function Qr(t){for(var e=arguments.length,o=Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(o.length?" "+o.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ti(t){return!!t&&!!t[Mi]}function ei(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 o=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===_i}(t)||Array.isArray(t)||!!t[Pi]||!!(null===(e=t.constructor)||void 0===e?void 0:e[Pi])||si(t)||ci(t))}function oi(t,e,o){void 0===o&&(o=!1),0===ri(t)?(o?Object.keys:Zi)(t).forEach((function(r){o&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(o,r){return e(r,o,t)}))}function ri(t){var e=t[Mi];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:si(t)?2:ci(t)?3:0}function ii(t,e){return 2===ri(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ni(t,e,o){var r=ri(t);2===r?t.set(e,o):3===r?t.add(o):t[e]=o}function ai(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function si(t){return Fi&&t instanceof Map}function ci(t){return ji&&t instanceof Set}function li(t){return t.o||t.t}function fi(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Di(t);delete e[Mi];for(var o=Zi(e),r=0;r<o.length;r++){var i=o[r],n=e[i];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[i]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function hi(t,e){return void 0===e&&(e=!1),di(t)||ti(t)||!ei(t)||(ri(t)>1&&(t.set=t.add=t.clear=t.delete=ui),Object.freeze(t),e&&oi(t,(function(t,e){return hi(e,!0)}),!0)),t}function ui(){Qr(2)}function di(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function pi(t){var e=zi[t];return e||Qr(18,t),e}function yi(){return Ai}function gi(t,e){e&&(pi("Patches"),t.u=[],t.s=[],t.v=e)}function bi(t){mi(t),t.p.forEach(vi),t.p=null}function mi(t){t===Ai&&(Ai=t.l)}function Oi(t){return Ai={p:[],l:Ai,h:t,m:!0,_:0}}function vi(t){var e=t[Mi];0===e.i||1===e.i?e.j():e.g=!0}function Si(t,e){e._=e.p.length;var o=e.p[0],r=void 0!==t&&t!==o;return e.h.O||pi("ES5").S(e,t,r),r?(o[Mi].P&&(bi(e),Qr(4)),ei(t)&&(t=Ni(e,t),e.l||Ci(e,t)),e.u&&pi("Patches").M(o[Mi].t,t,e.u,e.s)):t=Ni(e,o,[]),bi(e),e.u&&e.v(e.u,e.s),t!==Bi?t:void 0}function Ni(t,e,o){if(di(e))return e;var r=e[Mi];if(!r)return oi(e,(function(i,n){return wi(t,r,e,i,n,o)}),!0),e;if(r.A!==t)return e;if(!r.P)return Ci(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=fi(r.k):r.o,n=i,a=!1;3===r.i&&(n=new Set(i),i.clear(),a=!0),oi(n,(function(e,n){return wi(t,r,i,e,n,o,a)})),Ci(t,i,!1),o&&t.u&&pi("Patches").N(r,o,t.u,t.s)}return r.o}function wi(t,e,o,r,i,n,a){if(ti(i)){var s=Ni(t,i,n&&e&&3!==e.i&&!ii(e.R,r)?n.concat(r):void 0);if(ni(o,r,s),!ti(s))return;t.m=!1}else a&&o.add(i);if(ei(i)&&!di(i)){if(!t.h.D&&t._<1)return;Ni(t,i),e&&e.A.l||Ci(t,i)}}function Ci(t,e,o){void 0===o&&(o=!1),!t.l&&t.h.D&&t.m&&hi(e,o)}function xi(t,e){var o=t[Mi];return(o?li(o):t)[e]}function Ei(t,e){if(e in t)for(var o=Object.getPrototypeOf(t);o;){var r=Object.getOwnPropertyDescriptor(o,e);if(r)return r;o=Object.getPrototypeOf(o)}}function Ri(t){t.P||(t.P=!0,t.l&&Ri(t.l))}function Li(t){t.o||(t.o=fi(t.t))}function Ii(t,e,o){var r=si(e)?pi("MapSet").F(e,o):ci(e)?pi("MapSet").T(e,o):t.O?function(t,e){var o=Array.isArray(t),r={i:o?1:0,A:e?e.A:yi(),P:!1,I:!1,R:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,n=Hi;o&&(i=[r],n=Ti);var a=Proxy.revocable(i,n),s=a.revoke,c=a.proxy;return r.k=c,r.j=s,c}(e,o):pi("ES5").J(e,o);return(o?o.A:yi()).p.push(r),r}function Ui(t){return ti(t)||Qr(22,t),function t(e){if(!ei(e))return e;var o,r=e[Mi],i=ri(e);if(r){if(!r.P&&(r.i<4||!pi("ES5").K(r)))return r.t;r.I=!0,o=Wi(e,i),r.I=!1}else o=Wi(e,i);return oi(o,(function(e,i){r&&function(t,e){return 2===ri(t)?t.get(e):t[e]}(r.t,e)===i||ni(o,e,t(i))})),3===i?new Set(o):o}(t)}function Wi(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return fi(t)}Tr=Jr,Gr=Yr,Vr=qr,Xr.reduxProperties=new Map,Xr.reduxReactiveProperties=new Set,Xr.reduxEventListeners=new Map;var ki,Ai,$i="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Fi="undefined"!=typeof Map,ji="undefined"!=typeof Set,Ki="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Bi=$i?Symbol.for("immer-nothing"):((ki={})["immer-nothing"]=!0,ki),Pi=$i?Symbol.for("immer-draftable"):"__$immer_draftable",Mi=$i?Symbol.for("immer-state"):"__$immer_state",_i=""+Object.prototype.constructor,Zi="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Di=Object.getOwnPropertyDescriptors||function(t){var e={};return Zi(t).forEach((function(o){e[o]=Object.getOwnPropertyDescriptor(t,o)})),e},zi={},Hi={get:function(t,e){if(e===Mi)return t;var o=li(t);if(!ii(o,e))return function(t,e,o){var r,i=Ei(e,o);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,o,e);var r=o[e];return t.I||!ei(r)?r:r===xi(t.t,e)?(Li(t),t.o[e]=Ii(t.A.h,r,t)):r},has:function(t,e){return e in li(t)},ownKeys:function(t){return Reflect.ownKeys(li(t))},set:function(t,e,o){var r=Ei(li(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,o),!0;if(!t.P){var i=xi(li(t),e),n=null==i?void 0:i[Mi];if(n&&n.t===o)return t.o[e]=o,t.R[e]=!1,!0;if(ai(o,i)&&(void 0!==o||ii(t.t,e)))return!0;Li(t),Ri(t)}return t.o[e]===o&&(void 0!==o||e in t.o)||Number.isNaN(o)&&Number.isNaN(t.o[e])||(t.o[e]=o,t.R[e]=!0),!0},deleteProperty:function(t,e){return void 0!==xi(t.t,e)||e in t.t?(t.R[e]=!1,Li(t),Ri(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var o=li(t),r=Reflect.getOwnPropertyDescriptor(o,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:o[e]}:r},defineProperty:function(){Qr(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Qr(12)}},Ti={};oi(Hi,(function(t,e){Ti[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ti.deleteProperty=function(t,e){return Ti.set.call(this,t,e,void 0)},Ti.set=function(t,e,o){return Hi.set.call(this,t[0],e,o,t[0])};var Gi=function(){function t(t){var e=this;this.O=Ki,this.D=!0,this.produce=function(t,o,r){if("function"==typeof t&&"function"!=typeof o){var i=o;o=t;var n=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return n.produce(t,(function(t){var r;return(r=o).call.apply(r,[e,t].concat(a))}))}}var a;if("function"!=typeof o&&Qr(6),void 0!==r&&"function"!=typeof r&&Qr(7),ei(t)){var s=Oi(e),c=Ii(e,t,void 0),l=!0;try{a=o(c),l=!1}finally{l?bi(s):mi(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(t){return gi(s,r),Si(t,s)}),(function(t){throw bi(s),t})):(gi(s,r),Si(a,s))}if(!t||"object"!=typeof t){if(void 0===(a=o(t))&&(a=t),a===Bi&&(a=void 0),e.D&&hi(a,!0),r){var f=[],h=[];pi("Patches").M(t,a,f,h),r(f,h)}return a}Qr(21,t)},this.produceWithPatches=function(t,o){if("function"==typeof t)return function(o){for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return e.produceWithPatches(o,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,n=e.produce(t,o,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&n instanceof Promise?n.then((function(t){return[t,r,i]})):[n,r,i]},"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){ei(t)||Qr(8),ti(t)&&(t=Ui(t));var e=Oi(this),o=Ii(this,t,void 0);return o[Mi].C=!0,mi(e),o},e.finishDraft=function(t,e){var o=(t&&t[Mi]).A;return gi(o,e),Si(void 0,o)},e.setAutoFreeze=function(t){this.D=t},e.setUseProxies=function(t){t&&!Ki&&Qr(20),this.O=t},e.applyPatches=function(t,e){var o;for(o=e.length-1;o>=0;o--){var r=e[o];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}o>-1&&(e=e.slice(o+1));var i=pi("Patches").$;return ti(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Vi=new Gi,qi=Vi.produce;function Ji(t){return Ji="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},Ji(t)}function Yi(t){var e=function(t,e){if("object"!==Ji(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,e||"default");if("object"!==Ji(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Ji(e)?e:String(e)}function Xi(t,e,o){return(e=Yi(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function Qi(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function tn(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?Qi(Object(o),!0).forEach((function(e){Xi(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Qi(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function en(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. "}Vi.produceWithPatches.bind(Vi),Vi.setAutoFreeze.bind(Vi),Vi.setUseProxies.bind(Vi),Vi.applyPatches.bind(Vi),Vi.createDraft.bind(Vi),Vi.finishDraft.bind(Vi);var on="function"==typeof Symbol&&Symbol.observable||"@@observable",rn=function(){return Math.random().toString(36).substring(7).split("").join(".")},nn={INIT:"@@redux/INIT"+rn(),REPLACE:"@@redux/REPLACE"+rn(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+rn()}};function an(t,e,o){var r;if("function"==typeof e&&"function"==typeof o||"function"==typeof o&&"function"==typeof arguments[3])throw new Error(en(0));if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error(en(1));return o(an)(t,e)}if("function"!=typeof t)throw new Error(en(2));var i=t,n=e,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function f(){if(c)throw new Error(en(3));return n}function h(t){if("function"!=typeof t)throw new Error(en(4));if(c)throw new Error(en(5));var e=!0;return l(),s.push(t),function(){if(e){if(c)throw new Error(en(6));e=!1,l();var o=s.indexOf(t);s.splice(o,1),a=null}}}function u(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(en(7));if(void 0===t.type)throw new Error(en(8));if(c)throw new Error(en(9));try{c=!0,n=i(n,t)}finally{c=!1}for(var e=a=s,o=0;o<e.length;o++){(0,e[o])()}return t}return u({type:nn.INIT}),(r={dispatch:u,subscribe:h,getState:f,replaceReducer:function(t){if("function"!=typeof t)throw new Error(en(10));i=t,u({type:nn.REPLACE})}})[on]=function(){var t,e=h;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(en(11));function o(){t.next&&t.next(f())}return o(),{unsubscribe:e(o)}}})[on]=function(){return this},t},r}function sn(t){for(var e=Object.keys(t),o={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(o[i]=t[i])}var n,a=Object.keys(o);try{!function(t){Object.keys(t).forEach((function(e){var o=t[e];if(void 0===o(void 0,{type:nn.INIT}))throw new Error(en(12));if(void 0===o(void 0,{type:nn.PROBE_UNKNOWN_ACTION()}))throw new Error(en(13))}))}(o)}catch(t){n=t}return function(t,e){if(void 0===t&&(t={}),n)throw n;for(var r=!1,i={},s=0;s<a.length;s++){var c=a[s],l=o[c],f=t[c],h=l(f,e);if(void 0===h)throw e&&e.type,new Error(en(14));i[c]=h,r=r||h!==f}return(r=r||a.length!==Object.keys(t).length)?i:t}}function cn(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];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 ln(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return function(t){return function(){var o=t.apply(void 0,arguments),r=function(){throw new Error(en(15))},i={getState:o.getState,dispatch:function(){return r.apply(void 0,arguments)}},n=e.map((function(t){return t(i)}));return r=cn.apply(void 0,n)(o.dispatch),tn(tn({},o),{},{dispatch:r})}}}function fn(t){return function(e){var o=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(o,r,t):e(i)}}}}var hn=fn();hn.withExtraArgument=fn;var un,dn=hn,pn=(un=function(t,e){return un=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},un(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 o(){this.constructor=t}un(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),yn=function(t,e){var o,r,i,n,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return n={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function s(n){return function(s){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,r=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==n[0]&&2!==n[0])){a=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){a.label=n[1];break}if(6===n[0]&&a.label<i[1]){a.label=i[1],i=n;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(n);break}i[2]&&a.ops.pop(),a.trys.pop();continue}n=e.call(t,a)}catch(t){n=[6,t],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}},gn=function(t,e){for(var o=0,r=e.length,i=t.length;o<r;o++,i++)t[i]=e[o];return t},bn=Object.defineProperty,mn=Object.defineProperties,On=Object.getOwnPropertyDescriptors,vn=Object.getOwnPropertySymbols,Sn=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,wn=function(t,e,o){return e in t?bn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o},Cn=function(t,e){for(var o in e||(e={}))Sn.call(e,o)&&wn(t,o,e[o]);if(vn)for(var r=0,i=vn(e);r<i.length;r++){o=i[r];Nn.call(e,o)&&wn(t,o,e[o])}return t},xn=function(t,e){return mn(t,On(e))},En="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?cn:cn.apply(null,arguments)};var Rn=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return pn(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,gn([void 0],t[0].concat(this)))):new(e.bind.apply(e,gn([void 0],t.concat(this))))},e}(Array),Ln=function(t){function e(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var i=t.apply(this,o)||this;return Object.setPrototypeOf(i,e.prototype),i}return pn(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,gn([void 0],t[0].concat(this)))):new(e.bind.apply(e,gn([void 0],t.concat(this))))},e}(Array);function In(t){return ei(t)?qi(t,(function(){})):t}function Un(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,o=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new Rn;o&&(!function(t){return"boolean"==typeof t}(o)?r.push(dn.withExtraArgument(o.extraArgument)):r.push(dn));return r}(t)}}function Wn(t){var e,o=Un(),r=t||{},i=r.reducer,n=void 0===i?void 0:i,a=r.middleware,s=void 0===a?o():a,c=r.devTools,l=void 0===c||c,f=r.preloadedState,h=void 0===f?void 0:f,u=r.enhancers,d=void 0===u?void 0:u;if("function"==typeof n)e=n;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var o=e;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return e===o}(n))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=sn(n)}var p=s;"function"==typeof p&&(p=p(o));var y=ln.apply(void 0,p),g=cn;l&&(g=En(Cn({trace:!1},"object"==typeof l&&l)));var b=new Ln(y),m=b;return Array.isArray(d)?m=gn([y],d):"function"==typeof d&&(m=d(b)),an(e,h,g.apply(void 0,m))}function kn(t,e){function o(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];if(e){var i=e.apply(void 0,o);if(!i)throw new Error("prepareAction did not return an object");return Cn(Cn({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:o[0]}}return o.toString=function(){return""+t},o.type=t,o.match=function(e){return e.type===t},o}function An(t){var e,o={},r=[],i={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in o)throw new Error("addCase cannot be called with two reducers for the same action type");return o[r]=e,i},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),i},addDefaultCase:function(t){return e=t,i}};return t(i),[o,r,e]}function $n(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var o,r="function"==typeof t.initialState?t.initialState:In(t.initialState),i=t.reducers||{},n=Object.keys(i),a={},s={},c={};function l(){var e="function"==typeof t.extraReducers?An(t.extraReducers):[t.extraReducers],o=e[0],i=void 0===o?{}:o,n=e[1],a=void 0===n?[]:n,c=e[2],l=void 0===c?void 0:c,f=Cn(Cn({},i),s);return function(t,e,o,r){void 0===o&&(o=[]);var i,n="function"==typeof e?An(e):[e,o,r],a=n[0],s=n[1],c=n[2];if(function(t){return"function"==typeof t}(t))i=function(){return In(t())};else{var l=In(t);i=function(){return l}}function f(t,e){void 0===t&&(t=i());var o=gn([a[e.type]],s.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===o.filter((function(t){return!!t})).length&&(o=[c]),o.reduce((function(t,o){if(o){var r;if(ti(t))return void 0===(r=o(t,e))?t:r;if(ei(t))return qi(t,(function(t){return o(t,e)}));if(void 0===(r=o(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return f.getInitialState=i,f}(r,(function(t){for(var e in f)t.addCase(e,f[e]);for(var o=0,r=a;o<r.length;o++){var i=r[o];t.addMatcher(i.matcher,i.reducer)}l&&t.addDefaultCase(l)}))}return n.forEach((function(t){var o,r,n=i[t],l=e+"/"+t;"reducer"in n?(o=n.reducer,r=n.prepare):o=n,a[t]=o,s[l]=o,c[t]=r?kn(l,r):kn(l)})),{name:e,reducer:function(t,e){return o||(o=l()),o(t,e)},actions:c,caseReducers:a,getInitialState:function(){return o||(o=l()),o.getInitialState()}}}var Fn=["name","message","stack","code"],jn=function(t,e){this.payload=t,this.meta=e},Kn=function(t,e){this.payload=t,this.meta=e},Bn=function(t){if("object"==typeof t&&null!==t){for(var e={},o=0,r=Fn;o<r.length;o++){var i=r[o];"string"==typeof t[i]&&(e[i]=t[i])}return e}return{message:String(t)}};function Pn(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}!function(){function t(t,e,o){var r=kn(t+"/fulfilled",(function(t,e,o,r){return{payload:t,meta:xn(Cn({},r||{}),{arg:o,requestId:e,requestStatus:"fulfilled"})}})),i=kn(t+"/pending",(function(t,e,o){return{payload:void 0,meta:xn(Cn({},o||{}),{arg:e,requestId:t,requestStatus:"pending"})}})),n=kn(t+"/rejected",(function(t,e,r,i,n){return{payload:i,error:(o&&o.serializeError||Bn)(t||"Rejected"),meta:xn(Cn({},n||{}),{arg:r,requestId:e,rejectedWithValue:!!i,requestStatus:"rejected",aborted:"AbortError"===(null==t?void 0:t.name),condition:"ConditionError"===(null==t?void 0:t.name)})}})),a="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(s,c,l){var f,h=(null==o?void 0:o.idGenerator)?o.idGenerator(t):function(t){void 0===t&&(t=21);for(var e="",o=t;o--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),u=new a;function d(t){f=t,u.abort()}var p=function(){return a=this,p=null,y=function(){var a,p,y,g,b,m;return yn(this,(function(O){switch(O.label){case 0:return O.trys.push([0,4,,5]),g=null==(a=null==o?void 0:o.condition)?void 0:a.call(o,t,{getState:c,extra:l}),null===(v=g)||"object"!=typeof v||"function"!=typeof v.then?[3,2]:[4,g];case 1:g=O.sent(),O.label=2;case 2:if(!1===g||u.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(t,e){return u.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:f||"Aborted"})}))})),s(i(h,t,null==(p=null==o?void 0:o.getPendingMeta)?void 0:p.call(o,{requestId:h,arg:t},{getState:c,extra:l}))),[4,Promise.race([b,Promise.resolve(e(t,{dispatch:s,getState:c,extra:l,requestId:h,signal:u.signal,abort:d,rejectWithValue:function(t,e){return new jn(t,e)},fulfillWithValue:function(t,e){return new Kn(t,e)}})).then((function(e){if(e instanceof jn)throw e;return e instanceof Kn?r(e.payload,h,t,e.meta):r(e,h,t)}))])];case 3:return y=O.sent(),[3,5];case 4:return m=O.sent(),y=m instanceof jn?n(null,h,t,m.payload,m.meta):n(m,h,t),[3,5];case 5:return o&&!o.dispatchConditionRejection&&n.match(y)&&y.meta.condition||s(y),[2,y]}var v}))},new Promise((function(t,e){var o=function(t){try{i(y.next(t))}catch(t){e(t)}},r=function(t){try{i(y.throw(t))}catch(t){e(t)}},i=function(e){return e.done?t(e.value):Promise.resolve(e.value).then(o,r)};i((y=y.apply(a,p)).next())}));var a,p,y}();return Object.assign(p,{abort:d,requestId:h,arg:t,unwrap:function(){return p.then(Pn)}})}}),{pending:i,rejected:n,fulfilled:r,typePrefix:t})}t.withTypes=function(){return t}}();var Mn="listenerMiddleware";kn(Mn+"/add"),kn(Mn+"/removeAll"),kn(Mn+"/remove"),"function"==typeof queueMicrotask&&queueMicrotask.bind("undefined"!=typeof window?window:"undefined"!=typeof global?global:globalThis),function(){function t(t,e){var o=i[t];return o?o.enumerable=e:i[t]=o={configurable:!0,enumerable:e,get:function(){var e=this[Mi];return Hi.get(e,t)},set:function(e){var o=this[Mi];Hi.set(o,t,e)}},o}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Mi];if(!i.P)switch(i.i){case 5:r(i)&&Ri(i);break;case 4:o(i)&&Ri(i)}}}function o(t){for(var e=t.t,o=t.k,r=Zi(o),i=r.length-1;i>=0;i--){var n=r[i];if(n!==Mi){var a=e[n];if(void 0===a&&!ii(e,n))return!0;var s=o[n],c=s&&s[Mi];if(c?c.t!==a:!ai(s,a))return!0}}var l=!!e[Mi];return r.length!==Zi(e).length+(l?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var o=Object.getOwnPropertyDescriptor(e,e.length-1);if(o&&!o.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){zi[t]||(zi[t]=e)}("ES5",{J:function(e,o){var r=Array.isArray(e),i=function(e,o){if(e){for(var r=Array(o.length),i=0;i<o.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var n=Di(o);delete n[Mi];for(var a=Zi(n),s=0;s<a.length;s++){var c=a[s];n[c]=t(c,e||!!n[c].enumerable)}return Object.create(Object.getPrototypeOf(o),n)}(r,e),n={i:r?5:4,A:o?o.A:yi(),P:!1,I:!1,R:{},l:o,t:e,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Mi,{value:n,writable:!0}),i},S:function(t,o,i){i?ti(o)&&o[Mi].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var o=e[Mi];if(o){var i=o.t,n=o.k,a=o.R,s=o.i;if(4===s)oi(n,(function(e){e!==Mi&&(void 0!==i[e]||ii(i,e)?a[e]||t(n[e]):(a[e]=!0,Ri(o)))})),oi(i,(function(t){void 0!==n[t]||ii(n,t)||(a[t]=!1,Ri(o))}));else if(5===s){if(r(o)&&(Ri(o),a.length=!0),n.length<i.length)for(var c=n.length;c<i.length;c++)a[c]=!1;else for(var l=i.length;l<n.length;l++)a[l]=!0;for(var f=Math.min(n.length,i.length),h=0;h<f;h++)n.hasOwnProperty(h)||(a[h]=!0),void 0===a[h]&&t(n[h])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?o(t):r(t)}})}(),window.ftReduxStores||(window.ftReduxStores={});class _n{static get(t){var e;const o="string"==typeof t?t:t.name,r="string"==typeof t?void 0:t,i=window.ftReduxStores[o];if(Hr(i))return i;if(null==r)return;const n=$n({...r,reducers:null!==(e=r.reducers)&&void 0!==e?e:{}}),a=Wn({reducer:(t,e)=>{var o;switch(e.type){case"CLEAR_FT_REDUX_STORE":return n.getInitialState();case"DEFAULT_STATE_FIELDS_VALUES_SETTER":return{...t,...null!==(o=e.overwrites)&&void 0!==o?o:{}};default:return n.reducer(t,e)}}});return window.ftReduxStores[r.name]=new _n(n,a)}constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.eventBus=document.createElement("event-bus"),this.commands=new zr,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,o)=>{const r=e,i=t[r];return i?(...t)=>{const e=i(...t);return this.reduxStore.dispatch(e),e}:t=>{this.setState({[r]: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 Zn=Symbol("elementInternals");var Dn,zn,Hn;const Tn=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Hn=null===(zn=null===(Dn=window.safari)||void 0===Dn?void 0:Dn.pushNotification)||void 0===zn?void 0:zn.toString())&&void 0!==Hn?Hn:""),Gn="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;var Vn=Object.freeze({__proto__:null,CacheRegistry:class{constructor(){this.loaders={},this.content={},this.clearTimeouts={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||this.forceClear(t)}forceClear(t){this.clearClearTimeout(t),this.content[t]instanceof ko&&this.content[t].cancel(),delete this.content[t]}clearClearTimeout(t){null!=this.clearTimeouts[t]&&(window.clearTimeout(this.clearTimeouts[t]),delete this.clearTimeouts[t])}set(t,e){this.forceClear(t),this.register(t,(async()=>e)),this.content[t]=e}setFinal(t,e){this.forceClear(t),this.registerFinal(t,(async()=>e)),this.content[t]=e}async get(t,e,o){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const r=Ao(e());return this.content[t]=r,r.then((e=>(this.content[t]=e,null!=o&&(this.clearClearTimeout(t),this.clearTimeouts[t]=window.setTimeout((()=>this.clear(t)),o)),e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}isResolvedValue(t){return!(null==t||t instanceof Promise||t instanceof Error)}getNow(t){if(this.isResolvedValue(this.content[t]))return this.content[t]}has(t){return null!=this.content[t]}resolvedKeys(){return Object.keys(this.content).filter((t=>this.isResolvedValue(this.content[t])))}resolvedValues(){return Object.values(this.content).filter((t=>this.isResolvedValue(t)))}keys(){return Object.keys(this.content)}values(){return Object.values(this.content)}},CancelablePromise:ko,CanceledPromiseError:Wo,Debouncer:Fo,FtCommandQueue:zr,FtCssVariableFactory:_o,FtLitElement:Fr,FtLitElementRedux:Xr,FtNotificationEvent:Cr,FtReduxStore:_n,ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var o,r;t=this.resolvePluralKey(t,e);let i=null!==(r=null!==(o=this.labels[t])&&void 0!==o?o:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}([^}]*)\\}`,"g"),((e,o)=>this.formatValue(t,o))))),i}resolvePluralKey(t,e){for(let o of e)if("number"==typeof o){const e=`${String(t)}[\\=${o}]`;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 o=o=>(null==e?void 0:e.includes("date"))?t.toLocaleDateString(o):(null==e?void 0:e.includes("time"))?t.toLocaleTimeString(o):t.toLocaleString(o);try{return o(document.documentElement.lang)}catch(t){return o()}}},PostResizeEvent:Er,PreResizeEvent:xr,ScopedRegistryLitElement:Ir,button:dr,cancelable:Ao,chart:gr,checkbox:Or,chip:br,clearAllStores:function(){var t;for(let e of Object.values(null!==(t=window.ftReduxStores)&&void 0!==t?t:{}))Hr(e)&&e.clear()},customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},dateReviver:function(...t){return function(e,o){return t.includes(e)?Ko(o):o}},deepEqual:Bo,delay:jo,designSystemVariables:wr,eventPathContainsMatchingElement:function(t,e,o){if(e.length>0){const r=t.composedPath();for(let t of r){if(t===o)return!1;if(t.matches&&e.some((e=>t.matches(e))))return!0}}return!1},flatDeep:function t(e,o){return e.flatMap((e=>[e,...t(o(e),o)]))},foundation:Zo,highlightHtml:function(t,e){let o=t.getAttribute("data-highlight-html-query");if((null!=o?o:"")!==(null!=e?e:"")){const o=new Kr(t);o.unmark(Mr),e&&e.trim()&&o.mark(e,Mr)}t.setAttribute("data-highlight-html-query",null!=e?e:"")},highlightHtmlColorCssVariable:Br,highlightHtmlStyles:Pr,isFtReduxStore:Hr,isSafari:Tn,isTouchScreen:Gn,jsonProperty:Po,minmax:function(t,e,o){return Math.min(Math.max(t,e),o)},noTextSelect:_r,notice:mr,notification:Nr,parseDate:Ko,radio:Sr,redux:t=>{const e=null!=t?t:{};return(t,o)=>{var r;const i={hasChanged:(t,e)=>!Bo(t,e),attribute:!1,...e};Se(i)(t,o);const n=t.constructor;n.reduxProperties=new Map(n.reduxProperties),n.reduxProperties.set(o,{selector:null!==(r=e.selector)&&void 0!==r?r:t=>t[o],store:e.store})}},reduxEventListener:t=>(e,o)=>{const r=e.constructor;r.reduxEventListeners=new Map(r.reduxEventListeners),r.reduxEventListeners.set(o,t)},reduxReactive:()=>(t,e)=>{var o;const r=t.constructor;r.reduxReactiveProperties=new Set(r.reduxReactiveProperties),null===(o=r.reduxReactiveProperties)||void 0===o||o.add(e)},safariEllipsisFix:Dr,semantic:ur,serializeRequest:function(t,e){var o;const r=new URLSearchParams({"content-lang":null!==(o=e.contentLocale)&&void 0!==o?o:"all",query:e.query});if(e.filters.length>0){const t=e.filters.map((t=>{const e=t.values.map((t=>t.replace(/_/g,"\\\\\\\\_").replace(/~/g,"\\\\~").replace(/\*/g,"\\*"))).map((t=>encodeURIComponent(function(t){return`"${t}"`}(t)))).join("_");return`${t.key}~${e}`})).join("*");r.append("filters",t)}return new URL(`${t.replace(/\/+$/,"")}/search?${r.toString()}`).href},setVariable:function(t,e){return Mo(`${t.name}: ${e}`)},switch_:yr,tabs:pr,toFtFormComponent:function(t,e){return class extends t{static get formAssociated(){return!0}get form(){return this[Zn].form}constructor(...t){super(t),this[Zn]=this.attachInternals(),this[Zn].role=e}setFormValue(t){this[Zn].setFormValue(t)}}},toggle:vr,typographies:hr,typographyBody1Medium:Vo,typographyBody1Regular:Go,typographyBody1Semibold:qo,typographyBody2Medium:Yo,typographyBody2Regular:Jo,typographyBody2Semibold:Xo,typographyCaption1Bold:sr,typographyCaption1Medium:nr,typographyCaption1Semibold:ar,typographyCaption2Bold:fr,typographyCaption2Medium:cr,typographyCaption2Semibold:lr,typographyDisplay:Do,typographyLabel1Bold:er,typographyLabel1Medium:Qo,typographyLabel1Semibold:tr,typographyLabel2Bold:ir,typographyLabel2Medium:or,typographyLabel2Semibold:rr,typographyTitle1:zo,typographyTitle2:Ho,typographyTitle3:To,typographyVariants:["display","title-1","title-2","title-3","body-1","body-2","label-1","label-2","caption-1","caption-2"],waitFor:async function(t,e=5){let o=await t();for(;null==o;)await jo(e),o=await t();return o},waitUntil:async function(t,e=5){let o=await t();for(;!o;)await jo(e),o=await t()},withConditionalVisibility:function(t){class e extends t{constructor(){super(...arguments),this.forceVisible=!1,this.isVisible=!0,this.isElementWithConditionalVisibility=!0}calculateStyles(t,e){if(t){const t=document.createElement("style");t.classList.add("conditional-visibility-style"),t.innerHTML=e,this.shadowRoot.append(t)}}hideIfNecessary(){const t=!(this.forceVisible||this.isVisible);this.calculateStyles(t,":host { display: none !important; }")}highlightIfForceVisible(){this.calculateStyles(this.forceVisible,":host { box-shadow: 0px 0px 0px 8px rgba(227,119,59,0.4) inset; }")}update(t){super.update(t),this.updateComplete.then((()=>{this.shadowRoot.querySelectorAll(".conditional-visibility-style").forEach((t=>t.remove())),this.hideIfNecessary(),this.highlightIfForceVisible()}))}}return $o([Se({type:Boolean,attribute:!1})],e.prototype,"forceVisible",void 0),$o([Ne()],e.prototype,"isVisible",void 0),e},wordWrap:Zr});t.lit=me,t.litClassMap=Me,t.litDecorators=xe,t.litRepeat=Be,t.litStyleMap=He,t.litUnsafeHTML=Uo,t.wcUtils=Vn}));
@@ -7,3 +7,4 @@ export declare function dateReviver(...dateKeys: string[]): (key: string, value:
7
7
  export declare function parseDate(value: string): Date;
8
8
  export declare function deepEqual(a: any, b: any): boolean;
9
9
  export declare function eventPathContainsMatchingElement(e: Event, matchers: string[], containerElement: HTMLElement): boolean;
10
+ export declare function minmax(min: number, value: number, max: number): number;
package/build/helpers.js CHANGED
@@ -131,3 +131,6 @@ export function eventPathContainsMatchingElement(e, matchers, containerElement)
131
131
  }
132
132
  return false;
133
133
  }
134
+ export function minmax(min, value, max) {
135
+ return Math.min(Math.max(min, value), max);
136
+ }
package/build/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import "./silent-define";
2
2
  export declare const isSafari: boolean;
3
+ export declare const isTouchScreen: boolean;
3
4
  export * from "./CacheRegistry";
4
5
  export * from "./CancelablePromise";
5
6
  export * from "./conditional-visibility";
package/build/index.js CHANGED
@@ -2,6 +2,10 @@ var _a, _b, _c;
2
2
  import "./silent-define";
3
3
  export const isSafari = (navigator.vendor && !!navigator.vendor.match(/apple/i))
4
4
  || ((_c = (_b = (_a = window.safari) === null || _a === void 0 ? void 0 : _a.pushNotification) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : "") === "[object SafariRemoteNotification]";
5
+ export const isTouchScreen = (('ontouchstart' in window)
6
+ || (navigator.maxTouchPoints > 0)
7
+ // @ts-ignore
8
+ || (navigator.msMaxTouchPoints > 0));
5
9
  export * from "./CacheRegistry";
6
10
  export * from "./CancelablePromise";
7
11
  export * from "./conditional-visibility";
@@ -3,7 +3,7 @@ export interface FtCommand {
3
3
  type: string;
4
4
  }
5
5
  export declare class FtCommandQueue {
6
- private stack;
6
+ private queue;
7
7
  add(command: FtCommand, unique?: boolean): void;
8
8
  consume<T extends FtCommand>(type: string): Optional<T>;
9
9
  }
@@ -1,17 +1,17 @@
1
1
  export class FtCommandQueue {
2
2
  constructor() {
3
- this.stack = [];
3
+ this.queue = [];
4
4
  }
5
5
  add(command, unique = false) {
6
6
  if (unique) {
7
- this.stack = this.stack.filter(c => c.type !== command.type);
7
+ this.queue = this.queue.filter(c => c.type !== command.type);
8
8
  }
9
- this.stack.push(command);
9
+ this.queue.push(command);
10
10
  }
11
11
  consume(type) {
12
- const maybeCommand = this.stack.find(c => c.type === type);
12
+ const maybeCommand = this.queue.find(c => c.type === type);
13
13
  if (maybeCommand) {
14
- this.stack = this.stack.filter(c => c !== maybeCommand);
14
+ this.queue = this.queue.filter(c => c !== maybeCommand);
15
15
  }
16
16
  return maybeCommand;
17
17
  }
@@ -8,12 +8,13 @@ declare const internalReduxEventsUnsubscribers: unique symbol;
8
8
  declare const internalStoresUnsubscribers: unique symbol;
9
9
  declare const internalStores: unique symbol;
10
10
  export declare class FtLitElementRedux extends FtLitElement {
11
- reduxReactiveProperties?: string[];
12
- reduxProperties?: Map<string, ReduxProperty<unknown, FtLitElementRedux>>;
13
- reduxEventListeners?: Map<string, ReduxEventListenerInit>;
11
+ static reduxProperties: Map<string, ReduxProperty<any, any>>;
12
+ static reduxReactiveProperties: Set<string>;
13
+ static reduxEventListeners: Map<string, ReduxEventListenerInit>;
14
14
  private readonly [internalStoresUnsubscribers];
15
15
  private readonly [internalStores];
16
16
  private [internalReduxEventsUnsubscribers];
17
+ private get reduxConstructor();
17
18
  protected update(props: PropertyValues): void;
18
19
  private getUnnamedStore;
19
20
  getStore<ReturnType = Optional<Store>>(name?: string): ReturnType;
@@ -4,17 +4,19 @@ import { isFtReduxStore } from "./models";
4
4
  const internalReduxEventsUnsubscribers = Symbol("internalReduxEventsUnsubscribers");
5
5
  const internalStoresUnsubscribers = Symbol("internalStoresUnsubscribers");
6
6
  const internalStores = Symbol("internalStores");
7
- export class FtLitElementRedux extends FtLitElement {
7
+ class FtLitElementRedux extends FtLitElement {
8
8
  constructor() {
9
9
  super(...arguments);
10
10
  this[_a] = new Map();
11
11
  this[_b] = new Map();
12
12
  this[_c] = [];
13
13
  }
14
+ get reduxConstructor() {
15
+ return this.constructor;
16
+ }
14
17
  update(props) {
15
- var _d;
16
18
  super.update(props);
17
- if ((_d = this.reduxReactiveProperties) === null || _d === void 0 ? void 0 : _d.some(prop => props.has(prop))) {
19
+ if ([...this.reduxConstructor.reduxReactiveProperties].some(prop => props.has(prop))) {
18
20
  this.updateFromStores();
19
21
  }
20
22
  }
@@ -51,23 +53,21 @@ export class FtLitElementRedux extends FtLitElement {
51
53
  this.updateFromStores();
52
54
  }
53
55
  updateFromStores() {
54
- if (this.reduxProperties) {
55
- this.reduxProperties.forEach((prop, attributeName) => {
56
- const options = this.constructor.getPropertyOptions(attributeName);
57
- if (!(options === null || options === void 0 ? void 0 : options.attribute) || !this.hasAttribute(typeof (options === null || options === void 0 ? void 0 : options.attribute) === "string" ? options.attribute : attributeName)) {
58
- const store = this.getStore(prop.store);
59
- if (store && (prop.store ? this[internalStoresUnsubscribers].has(prop.store) : this[internalStoresUnsubscribers].size > 0)) {
60
- this[attributeName] = prop.selector(store.getState(), this);
61
- }
56
+ this.reduxConstructor.reduxProperties.forEach((prop, attributeName) => {
57
+ const options = this.constructor.getPropertyOptions(attributeName);
58
+ if (!(options === null || options === void 0 ? void 0 : options.attribute) || !this.hasAttribute(typeof (options === null || options === void 0 ? void 0 : options.attribute) === "string" ? options.attribute : attributeName)) {
59
+ const store = this.getStore(prop.store);
60
+ if (store && (prop.store ? this[internalStoresUnsubscribers].has(prop.store) : this[internalStoresUnsubscribers].size > 0)) {
61
+ this[attributeName] = prop.selector(store.getState(), this);
62
62
  }
63
- });
64
- }
63
+ }
64
+ });
65
65
  }
66
66
  subscribeToStore(name, store) {
67
67
  var _d;
68
68
  this[internalStoresUnsubscribers].set(name, store.subscribe(() => this.updateFromStores()));
69
69
  if (isFtReduxStore(store) && store.eventBus) {
70
- (_d = this.reduxEventListeners) === null || _d === void 0 ? void 0 : _d.forEach((init, methodName) => {
70
+ (_d = this.reduxConstructor.reduxEventListeners) === null || _d === void 0 ? void 0 : _d.forEach((init, methodName) => {
71
71
  if (typeof this[methodName] === "function" && (!init.store || store.name === init.store)) {
72
72
  const callback = (e) => this[methodName](e);
73
73
  store.eventBus.addEventListener(init.eventName, callback);
@@ -100,3 +100,7 @@ export class FtLitElementRedux extends FtLitElement {
100
100
  }
101
101
  }
102
102
  _a = internalStoresUnsubscribers, _b = internalStores, _c = internalReduxEventsUnsubscribers;
103
+ FtLitElementRedux.reduxProperties = new Map();
104
+ FtLitElementRedux.reduxReactiveProperties = new Set();
105
+ FtLitElementRedux.reduxEventListeners = new Map();
106
+ export { FtLitElementRedux };
@@ -2,9 +2,10 @@ import { deepEqual } from "../helpers";
2
2
  import { property } from "lit/decorators.js";
3
3
  export const reduxReactive = () => {
4
4
  return (proto, name) => {
5
- const reduxReactiveProto = proto;
6
- reduxReactiveProto.reduxReactiveProperties = reduxReactiveProto.reduxReactiveProperties || [];
7
- reduxReactiveProto.reduxReactiveProperties.push(name);
5
+ var _a;
6
+ const reduxReactiveProto = proto.constructor;
7
+ reduxReactiveProto.reduxReactiveProperties = new Set(reduxReactiveProto.reduxReactiveProperties);
8
+ (_a = reduxReactiveProto.reduxReactiveProperties) === null || _a === void 0 ? void 0 : _a.add(name);
8
9
  };
9
10
  };
10
11
  export const redux = (propertyInit) => {
@@ -17,9 +18,9 @@ export const redux = (propertyInit) => {
17
18
  ...init
18
19
  };
19
20
  property(litPropertyInit)(proto, name);
20
- const reduxProto = proto;
21
- reduxProto.reduxProperties = reduxProto.reduxProperties || new Map();
22
- reduxProto.reduxProperties.set(name, {
21
+ const reduxConstructor = proto.constructor;
22
+ reduxConstructor.reduxProperties = new Map(reduxConstructor.reduxProperties);
23
+ reduxConstructor.reduxProperties.set(name, {
23
24
  selector: (_a = init.selector) !== null && _a !== void 0 ? _a : ((s) => s[name]),
24
25
  store: init.store
25
26
  });
@@ -27,8 +28,8 @@ export const redux = (propertyInit) => {
27
28
  };
28
29
  export const reduxEventListener = (init) => {
29
30
  return (proto, name) => {
30
- const reduxProto = proto;
31
- reduxProto.reduxEventListeners = reduxProto.reduxEventListeners || new Map();
31
+ const reduxProto = proto.constructor;
32
+ reduxProto.reduxEventListeners = new Map(reduxProto.reduxEventListeners);
32
33
  reduxProto.reduxEventListeners.set(name, init);
33
34
  };
34
35
  };
@@ -2,7 +2,7 @@ import { PropertyDeclaration } from "lit";
2
2
  import { Action, CreateSliceOptions, PayloadAction, SliceCaseReducers, ValidateSliceCaseReducers } from "@reduxjs/toolkit";
3
3
  import type { FtLitElementRedux } from "./FtLitElementRedux";
4
4
  import type { FtReduxStore } from "./FtReduxStore";
5
- export type ReduxSelector<State, Element extends FtLitElementRedux> = (rootState: State, element: Element) => unknown;
5
+ export type ReduxSelector<State, Element extends FtLitElementRedux> = (rootState: State, element: Element) => any;
6
6
  export interface ReduxProperty<State, Element extends FtLitElementRedux> {
7
7
  store?: string;
8
8
  selector: ReduxSelector<State, Element>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-wc-utils",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Internal web components tools",
5
5
  "author": "Fluid Topics <devtopics@antidot.net>",
6
6
  "license": "ISC",
@@ -21,5 +21,5 @@
21
21
  "lit": "3.1.0",
22
22
  "mark.js": "8.11.1"
23
23
  },
24
- "gitHead": "732f43d1a665d4917e01d0e34665779782fdd3c9"
24
+ "gitHead": "260010bbe1de163e812ed46e15cd25b7008f2f87"
25
25
  }