@fluid-topics/ft-search-input 0.3.67 → 0.3.68
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.
- package/build/ft-search-input.light.js +84 -73
- package/build/ft-search-input.min.js +67 -56
- package/package.json +9 -9
|
@@ -54,7 +54,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
|
-
*/;var O;const S=window,
|
|
57
|
+
*/;var O;const S=window,E=S.trustedTypes,k=E?E.emptyScript:"",j=S.reactiveElementPolyfillSupport,C={toAttribute(t,e){switch(e){case Boolean:t=t?k:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},N=(t,e)=>e!==t&&(e==e||t==t),M={attribute:!0,type:String,converter:C,reflect:!1,hasChanged:N};class R extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;null!==(e=this.h)&&void 0!==e||(this.h=[]),this.h.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=M){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||M}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift($(t))}else void 0!==t&&e.push($(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return w(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=M){var n;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:C).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,o=n._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=n.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:C;this._$El=o,this[o]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||N)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
58
58
|
/**
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2017 Google LLC
|
|
@@ -85,7 +85,7 @@ var vt,bt;class yt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
85
85
|
-ms-user-select: none;
|
|
86
86
|
user-select: none;
|
|
87
87
|
}
|
|
88
|
-
`,
|
|
88
|
+
`,Et=x`
|
|
89
89
|
.ft-word-wrap {
|
|
90
90
|
white-space: normal;
|
|
91
91
|
word-wrap: break-word;
|
|
@@ -97,7 +97,7 @@ var vt,bt;class yt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
97
97
|
-webkit-hyphens: auto;
|
|
98
98
|
hyphens: auto
|
|
99
99
|
}
|
|
100
|
-
`,
|
|
100
|
+
`,kt=x`
|
|
101
101
|
.ft-safari-ellipsis-fix {
|
|
102
102
|
margin-right: 0;
|
|
103
103
|
|
|
@@ -108,7 +108,7 @@ var vt,bt;class yt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
108
108
|
display: inline-block;
|
|
109
109
|
width: 0;
|
|
110
110
|
}
|
|
111
|
-
`;class jt{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=`${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 Ct(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 Nt(t){return!!t&&!!t[ve]}function Mt(t){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)===be}(t)||Array.isArray(t)||!!t[de]||!!t.constructor[de]||zt(t)||It(t))}function Rt(t,e,i){void 0===i&&(i=!1),0===Ut(t)?(i?Object.keys:ye)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Ut(t){var e=t[ve];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:zt(t)?2:It(t)?3:0}function At(t,e){return 2===Ut(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Pt(t,e,i){var n=Ut(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function Ft(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function zt(t){return ue&&t instanceof Map}function It(t){return fe&&t instanceof Set}function Bt(t){return t.o||t.t}function Tt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ge(t);delete e[ve];for(var i=ye(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 Lt(t,e){return void 0===e&&(e=!1),_t(t)||Nt(t)||!Mt(t)||(Ut(t)>1&&(t.set=t.add=t.clear=t.delete=Dt),Object.freeze(t),e&&Rt(t,(function(t,e){return Lt(e,!0)}),!0)),t}function Dt(){Ct(2)}function _t(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Wt(t){var e=me[t];return e||Ct(18,t),e}function Kt(){return le}function Ht(t,e){e&&(Wt("Patches"),t.u=[],t.s=[],t.v=e)}function Zt(t){Vt(t),t.p.forEach(Jt),t.p=null}function Vt(t){t===le&&(le=t.l)}function qt(t){return le={p:[],l:le,h:t,m:!0,_:0}}function Jt(t){var e=t[ve];0===e.i||1===e.i?e.j():e.O=!0}function Xt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||Wt("ES5").S(e,t,n),n?(i[ve].P&&(Zt(e),Ct(4)),Mt(t)&&(t=Gt(e,t),e.l||Yt(e,t)),e.u&&Wt("Patches").M(i[ve].t,t,e.u,e.s)):t=Gt(e,i,[]),Zt(e),e.u&&e.v(e.u,e.s),t!==pe?t:void 0}function Gt(t,e,i){if(_t(e))return e;var n=e[ve];if(!n)return Rt(e,(function(o,r){return Qt(t,n,e,o,r,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Yt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=Tt(n.k):n.o;Rt(3===n.i?new Set(o):o,(function(e,r){return Qt(t,n,o,e,r,i)})),Yt(t,o,!1),i&&t.u&&Wt("Patches").R(n,i,t.u,t.s)}return n.o}function Qt(t,e,i,n,o,r){if(Nt(o)){var s=Gt(t,o,r&&e&&3!==e.i&&!At(e.D,n)?r.concat(n):void 0);if(Pt(i,n,s),!Nt(s))return;t.m=!1}if(Mt(o)&&!_t(o)){if(!t.h.F&&t._<1)return;Gt(t,o),e&&e.A.l||Yt(t,o)}}function Yt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&Lt(e,i)}function te(t,e){var i=t[ve];return(i?Bt(i):t)[e]}function ee(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 ie(t){t.P||(t.P=!0,t.l&&ie(t.l))}function ne(t){t.o||(t.o=Tt(t.t))}function oe(t,e,i){var n=zt(e)?Wt("MapSet").N(e,i):It(e)?Wt("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Kt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},o=n,r=xe;i&&(o=[n],r=we);var s=Proxy.revocable(o,r),a=s.revoke,l=s.proxy;return n.k=l,n.j=a,l}(e,i):Wt("ES5").J(e,i);return(i?i.A:Kt()).p.push(n),n}function re(t){return Nt(t)||Ct(22,t),function t(e){if(!Mt(e))return e;var i,n=e[ve],o=Ut(e);if(n){if(!n.P&&(n.i<4||!Wt("ES5").K(n)))return n.t;n.I=!0,i=se(e,o),n.I=!1}else i=se(e,o);return Rt(i,(function(e,o){n&&function(t,e){return 2===Ut(t)?t.get(e):t[e]}(n.t,e)===o||Pt(i,e,t(o))})),3===o?new Set(i):i}(t)}function se(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Tt(t)}var ae,le,ce="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ue="undefined"!=typeof Map,fe="undefined"!=typeof Set,he="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,pe=ce?Symbol.for("immer-nothing"):((ae={})["immer-nothing"]=!0,ae),de=ce?Symbol.for("immer-draftable"):"__$immer_draftable",ve=ce?Symbol.for("immer-state"):"__$immer_state",be=""+Object.prototype.constructor,ye="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ge=Object.getOwnPropertyDescriptors||function(t){var e={};return ye(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},me={},xe={get:function(t,e){if(e===ve)return t;var i=Bt(t);if(!At(i,e))return function(t,e,i){var n,o=ee(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||!Mt(n)?n:n===te(t.t,e)?(ne(t),t.o[e]=oe(t.A.h,n,t)):n},has:function(t,e){return e in Bt(t)},ownKeys:function(t){return Reflect.ownKeys(Bt(t))},set:function(t,e,i){var n=ee(Bt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var o=te(Bt(t),e),r=null==o?void 0:o[ve];if(r&&r.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(Ft(i,o)&&(void 0!==i||At(t.t,e)))return!0;ne(t),ie(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==te(t.t,e)||e in t.t?(t.D[e]=!1,ne(t),ie(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Bt(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(){Ct(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ct(12)}},we={};Rt(xe,(function(t,e){we[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),we.deleteProperty=function(t,e){return we.set.call(this,t,e,void 0)},we.set=function(t,e,i){return xe.set.call(this,t[0],e,i,t[0])};var $e=function(){function t(t){var e=this;this.g=he,this.F=!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&&Ct(6),void 0!==n&&"function"!=typeof n&&Ct(7),Mt(t)){var a=qt(e),l=oe(e,t,void 0),c=!0;try{s=i(l),c=!1}finally{c?Zt(a):Vt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Ht(a,n),Xt(t,a)}),(function(t){throw Zt(a),t})):(Ht(a,n),Xt(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===pe&&(s=void 0),e.F&&Lt(s,!0),n){var u=[],f=[];Wt("Patches").M(t,s,u,f),n(u,f)}return s}Ct(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){Mt(t)||Ct(8),Nt(t)&&(t=re(t));var e=qt(this),i=oe(this,t,void 0);return i[ve].C=!0,Vt(e),i},e.finishDraft=function(t,e){var i=(t&&t[ve]).A;return Ht(i,e),Xt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!he&&Ct(20),this.g=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=Wt("Patches").$;return Nt(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}(),Oe=new $e,Se=Oe.produce;Oe.produceWithPatches.bind(Oe),Oe.setAutoFreeze.bind(Oe),Oe.setUseProxies.bind(Oe),Oe.applyPatches.bind(Oe),Oe.createDraft.bind(Oe),Oe.finishDraft.bind(Oe);var ke=Se;function Ee(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function je(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 Ce(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?je(Object(i),!0).forEach((function(e){Ee(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ne(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. "}var Me="function"==typeof Symbol&&Symbol.observable||"@@observable",Re=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ue={INIT:"@@redux/INIT"+Re(),REPLACE:"@@redux/REPLACE"+Re(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Re()}};function Ae(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}function Pe(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Ne(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Ne(1));return i(Pe)(t,e)}if("function"!=typeof t)throw new Error(Ne(2));var o=t,r=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(Ne(3));return r}function f(t){if("function"!=typeof t)throw new Error(Ne(4));if(l)throw new Error(Ne(5));var e=!0;return c(),a.push(t),function(){if(e){if(l)throw new Error(Ne(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),s=null}}}function h(t){if(!Ae(t))throw new Error(Ne(7));if(void 0===t.type)throw new Error(Ne(8));if(l)throw new Error(Ne(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}function p(t){if("function"!=typeof t)throw new Error(Ne(10));o=t,h({type:Ue.REPLACE})}function d(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ne(11));function i(){t.next&&t.next(u())}return i(),{unsubscribe:e(i)}}})[Me]=function(){return this},t}return h({type:Ue.INIT}),(n={dispatch:h,subscribe:f,getState:u,replaceReducer:p})[Me]=d,n}function Fe(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:Ue.INIT}))throw new Error(Ne(12));if(void 0===i(void 0,{type:Ue.PROBE_UNKNOWN_ACTION()}))throw new Error(Ne(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],u=t[l],f=c(u,e);if(void 0===f)throw e&&e.type,new Error(Ne(14));o[l]=f,n=n||f!==u}return(n=n||s.length!==Object.keys(t).length)?o:t}}function ze(){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 Ie(){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(Ne(15))},o={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},r=e.map((function(t){return t(o)}));return n=ze.apply(void 0,r)(i.dispatch),Ce(Ce({},i),{},{dispatch:n})}}}function Be(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 Te=Be();Te.withExtraArgument=Be;var Le,De=Te,_e=(Le=function(t,e){return Le=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])},Le(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}Le(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),We=function(t,e){for(var i=0,n=e.length,o=t.length;i<n;i++,o++)t[o]=e[i];return t},Ke=Object.defineProperty,He=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,qe=function(t,e,i){return e in t?Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Je=function(t,e){for(var i in e||(e={}))Ze.call(e,i)&&qe(t,i,e[i]);if(He)for(var n=0,o=He(e);n<o.length;n++){i=o[n];Ve.call(e,i)&&qe(t,i,e[i])}return t},Xe="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ze:ze.apply(null,arguments)};var Ge=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 _e(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,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array);function Qe(t){return Mt(t)?ke(t,(function(){})):t}function Ye(){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 Ge;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(De.withExtraArgument(i.extraArgument)):n.push(De));return n}(t)}}function ti(t){var e,i=Ye(),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,u=n.preloadedState,f=void 0===u?void 0:u,h=n.enhancers,p=void 0===h?void 0:h;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=Fe(r)}var d=a;"function"==typeof d&&(d=d(i));var v=Ie.apply(void 0,d),b=ze;c&&(b=Xe(Je({trace:!1},"object"==typeof c&&c)));var y=[v];return Array.isArray(p)?y=We([v],p):"function"==typeof p&&(y=p(y)),Pe(e,f,b.apply(void 0,y))}function ei(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 Je(Je({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 ii(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 ni(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:Qe(t.initialState),o=t.reducers||{},r=Object.keys(o),s={},a={},l={};function c(){var e="function"==typeof t.extraReducers?ii(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,u=Je(Je({},o),a);return function(t,e,i,n){void 0===i&&(i=[]);var o,r="function"==typeof e?ii(e):[e,i,n],s=r[0],a=r[1],l=r[2];if(function(t){return"function"==typeof t}(t))o=function(){return Qe(t())};else{var c=Qe(t);o=function(){return c}}function u(t,e){void 0===t&&(t=o());var i=We([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(Nt(t))return void 0===(n=i(t,e))?t:n;if(Mt(t))return ke(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 u.getInitialState=o,u}(n,u,s,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?ei(c,n):ei(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 oi="listenerMiddleware";ei(oi+"/add"),ei(oi+"/removeAll"),ei(oi+"/remove"),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[ve];return xe.get(e,t)},set:function(e){var i=this[ve];xe.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][ve];if(!o.P)switch(o.i){case 5:n(o)&&ie(o);break;case 4:i(o)&&ie(o)}}}function i(t){for(var e=t.t,i=t.k,n=ye(i),o=n.length-1;o>=0;o--){var r=n[o];if(r!==ve){var s=e[r];if(void 0===s&&!At(e,r))return!0;var a=i[r],l=a&&a[ve];if(l?l.t!==s:!Ft(a,s))return!0}}var c=!!e[ve];return n.length!==ye(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){me[t]||(me[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=ge(i);delete r[ve];for(var s=ye(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:Kt(),P:!1,I:!1,D:{},l:i,t:e,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,ve,{value:r,writable:!0}),o},S:function(t,i,o){o?Nt(i)&&i[ve].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[ve];if(i){var o=i.t,r=i.k,s=i.D,a=i.i;if(4===a)Rt(r,(function(e){e!==ve&&(void 0!==o[e]||At(o,e)?s[e]||t(r[e]):(s[e]=!0,ie(i)))})),Rt(o,(function(t){void 0!==r[t]||At(r,t)||(s[t]=!1,ie(i))}));else if(5===a){if(n(i)&&(ie(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 u=Math.min(r.length,o.length),f=0;f<u;f++)r.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(r[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const ri=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),si=(t,e)=>{var i;const n=ri(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!f(t,e),(i,o)=>{var r,s;i.constructor.createProperty(o,{hasChanged:e,attribute:null!==(r=n.attribute)&&void 0!==r&&r});const a=i;a.reduxProperties=a.reduxProperties||new Map;const l=null!==(s=ri(t)?n.selector:t)&&void 0!==s?s:t=>t[o];a.reduxProperties.set(o,{selector:l,store:n.store})}};class ai extends Ot{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:li(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:li(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}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&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function li(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class ci{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(li(n))return n;if(null==i)return;const o=ni(i);if(n)return new ci(o,n);const r=ti({reducer:o.reducer});return window.ftReduxStores[i.name]=new ci(o,r)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var ui,fi,hi;const pi=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(hi=null===(fi=null===(ui=window.safari)||void 0===ui?void 0:ui.pushNotification)||void 0===fi?void 0:fi.toString())&&void 0!==hi?hi:""),di=1,vi=2,bi=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
111
|
+
`;class jt{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=`${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 Ct(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 Nt(t){return!!t&&!!t[ve]}function Mt(t){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)===be}(t)||Array.isArray(t)||!!t[de]||!!t.constructor[de]||zt(t)||It(t))}function Rt(t,e,i){void 0===i&&(i=!1),0===Ut(t)?(i?Object.keys:ye)(t).forEach((function(n){i&&"symbol"==typeof n||e(n,t[n],t)})):t.forEach((function(i,n){return e(n,i,t)}))}function Ut(t){var e=t[ve];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:zt(t)?2:It(t)?3:0}function At(t,e){return 2===Ut(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Pt(t,e,i){var n=Ut(t);2===n?t.set(e,i):3===n?(t.delete(e),t.add(i)):t[e]=i}function Ft(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function zt(t){return ue&&t instanceof Map}function It(t){return fe&&t instanceof Set}function Bt(t){return t.o||t.t}function Tt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=ge(t);delete e[ve];for(var i=ye(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 Lt(t,e){return void 0===e&&(e=!1),_t(t)||Nt(t)||!Mt(t)||(Ut(t)>1&&(t.set=t.add=t.clear=t.delete=Dt),Object.freeze(t),e&&Rt(t,(function(t,e){return Lt(e,!0)}),!0)),t}function Dt(){Ct(2)}function _t(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function Wt(t){var e=me[t];return e||Ct(18,t),e}function Kt(){return le}function Ht(t,e){e&&(Wt("Patches"),t.u=[],t.s=[],t.v=e)}function Zt(t){Vt(t),t.p.forEach(Jt),t.p=null}function Vt(t){t===le&&(le=t.l)}function qt(t){return le={p:[],l:le,h:t,m:!0,_:0}}function Jt(t){var e=t[ve];0===e.i||1===e.i?e.j():e.O=!0}function Xt(t,e){e._=e.p.length;var i=e.p[0],n=void 0!==t&&t!==i;return e.h.g||Wt("ES5").S(e,t,n),n?(i[ve].P&&(Zt(e),Ct(4)),Mt(t)&&(t=Gt(e,t),e.l||Yt(e,t)),e.u&&Wt("Patches").M(i[ve].t,t,e.u,e.s)):t=Gt(e,i,[]),Zt(e),e.u&&e.v(e.u,e.s),t!==pe?t:void 0}function Gt(t,e,i){if(_t(e))return e;var n=e[ve];if(!n)return Rt(e,(function(o,r){return Qt(t,n,e,o,r,i)}),!0),e;if(n.A!==t)return e;if(!n.P)return Yt(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=Tt(n.k):n.o;Rt(3===n.i?new Set(o):o,(function(e,r){return Qt(t,n,o,e,r,i)})),Yt(t,o,!1),i&&t.u&&Wt("Patches").R(n,i,t.u,t.s)}return n.o}function Qt(t,e,i,n,o,r){if(Nt(o)){var s=Gt(t,o,r&&e&&3!==e.i&&!At(e.D,n)?r.concat(n):void 0);if(Pt(i,n,s),!Nt(s))return;t.m=!1}if(Mt(o)&&!_t(o)){if(!t.h.F&&t._<1)return;Gt(t,o),e&&e.A.l||Yt(t,o)}}function Yt(t,e,i){void 0===i&&(i=!1),t.h.F&&t.m&&Lt(e,i)}function te(t,e){var i=t[ve];return(i?Bt(i):t)[e]}function ee(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 ie(t){t.P||(t.P=!0,t.l&&ie(t.l))}function ne(t){t.o||(t.o=Tt(t.t))}function oe(t,e,i){var n=zt(e)?Wt("MapSet").N(e,i):It(e)?Wt("MapSet").T(e,i):t.g?function(t,e){var i=Array.isArray(t),n={i:i?1:0,A:e?e.A:Kt(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},o=n,r=xe;i&&(o=[n],r=we);var s=Proxy.revocable(o,r),a=s.revoke,l=s.proxy;return n.k=l,n.j=a,l}(e,i):Wt("ES5").J(e,i);return(i?i.A:Kt()).p.push(n),n}function re(t){return Nt(t)||Ct(22,t),function t(e){if(!Mt(e))return e;var i,n=e[ve],o=Ut(e);if(n){if(!n.P&&(n.i<4||!Wt("ES5").K(n)))return n.t;n.I=!0,i=se(e,o),n.I=!1}else i=se(e,o);return Rt(i,(function(e,o){n&&function(t,e){return 2===Ut(t)?t.get(e):t[e]}(n.t,e)===o||Pt(i,e,t(o))})),3===o?new Set(i):i}(t)}function se(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Tt(t)}var ae,le,ce="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ue="undefined"!=typeof Map,fe="undefined"!=typeof Set,he="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,pe=ce?Symbol.for("immer-nothing"):((ae={})["immer-nothing"]=!0,ae),de=ce?Symbol.for("immer-draftable"):"__$immer_draftable",ve=ce?Symbol.for("immer-state"):"__$immer_state",be=""+Object.prototype.constructor,ye="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,ge=Object.getOwnPropertyDescriptors||function(t){var e={};return ye(t).forEach((function(i){e[i]=Object.getOwnPropertyDescriptor(t,i)})),e},me={},xe={get:function(t,e){if(e===ve)return t;var i=Bt(t);if(!At(i,e))return function(t,e,i){var n,o=ee(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||!Mt(n)?n:n===te(t.t,e)?(ne(t),t.o[e]=oe(t.A.h,n,t)):n},has:function(t,e){return e in Bt(t)},ownKeys:function(t){return Reflect.ownKeys(Bt(t))},set:function(t,e,i){var n=ee(Bt(t),e);if(null==n?void 0:n.set)return n.set.call(t.k,i),!0;if(!t.P){var o=te(Bt(t),e),r=null==o?void 0:o[ve];if(r&&r.t===i)return t.o[e]=i,t.D[e]=!1,!0;if(Ft(i,o)&&(void 0!==i||At(t.t,e)))return!0;ne(t),ie(t)}return t.o[e]===i&&"number"!=typeof i&&(void 0!==i||e in t.o)||(t.o[e]=i,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==te(t.t,e)||e in t.t?(t.D[e]=!1,ne(t),ie(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var i=Bt(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(){Ct(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Ct(12)}},we={};Rt(xe,(function(t,e){we[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),we.deleteProperty=function(t,e){return we.set.call(this,t,e,void 0)},we.set=function(t,e,i){return xe.set.call(this,t[0],e,i,t[0])};var $e=function(){function t(t){var e=this;this.g=he,this.F=!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&&Ct(6),void 0!==n&&"function"!=typeof n&&Ct(7),Mt(t)){var a=qt(e),l=oe(e,t,void 0),c=!0;try{s=i(l),c=!1}finally{c?Zt(a):Vt(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return Ht(a,n),Xt(t,a)}),(function(t){throw Zt(a),t})):(Ht(a,n),Xt(s,a))}if(!t||"object"!=typeof t){if(void 0===(s=i(t))&&(s=t),s===pe&&(s=void 0),e.F&&Lt(s,!0),n){var u=[],f=[];Wt("Patches").M(t,s,u,f),n(u,f)}return s}Ct(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){Mt(t)||Ct(8),Nt(t)&&(t=re(t));var e=qt(this),i=oe(this,t,void 0);return i[ve].C=!0,Vt(e),i},e.finishDraft=function(t,e){var i=(t&&t[ve]).A;return Ht(i,e),Xt(void 0,i)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!he&&Ct(20),this.g=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=Wt("Patches").$;return Nt(t)?o(t,e):this.produce(t,(function(t){return o(t,e)}))},t}(),Oe=new $e,Se=Oe.produce;Oe.produceWithPatches.bind(Oe),Oe.setAutoFreeze.bind(Oe),Oe.setUseProxies.bind(Oe),Oe.applyPatches.bind(Oe),Oe.createDraft.bind(Oe),Oe.finishDraft.bind(Oe);var Ee=Se;function ke(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function je(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 Ce(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?je(Object(i),!0).forEach((function(e){ke(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ne(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. "}var Me="function"==typeof Symbol&&Symbol.observable||"@@observable",Re=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ue={INIT:"@@redux/INIT"+Re(),REPLACE:"@@redux/REPLACE"+Re(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Re()}};function Ae(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}function Pe(t,e,i){var n;if("function"==typeof e&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(Ne(0));if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error(Ne(1));return i(Pe)(t,e)}if("function"!=typeof t)throw new Error(Ne(2));var o=t,r=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(Ne(3));return r}function f(t){if("function"!=typeof t)throw new Error(Ne(4));if(l)throw new Error(Ne(5));var e=!0;return c(),a.push(t),function(){if(e){if(l)throw new Error(Ne(6));e=!1,c();var i=a.indexOf(t);a.splice(i,1),s=null}}}function h(t){if(!Ae(t))throw new Error(Ne(7));if(void 0===t.type)throw new Error(Ne(8));if(l)throw new Error(Ne(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}function p(t){if("function"!=typeof t)throw new Error(Ne(10));o=t,h({type:Ue.REPLACE})}function d(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ne(11));function i(){t.next&&t.next(u())}return i(),{unsubscribe:e(i)}}})[Me]=function(){return this},t}return h({type:Ue.INIT}),(n={dispatch:h,subscribe:f,getState:u,replaceReducer:p})[Me]=d,n}function Fe(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:Ue.INIT}))throw new Error(Ne(12));if(void 0===i(void 0,{type:Ue.PROBE_UNKNOWN_ACTION()}))throw new Error(Ne(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],u=t[l],f=c(u,e);if(void 0===f)throw e&&e.type,new Error(Ne(14));o[l]=f,n=n||f!==u}return(n=n||s.length!==Object.keys(t).length)?o:t}}function ze(){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 Ie(){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(Ne(15))},o={getState:i.getState,dispatch:function(){return n.apply(void 0,arguments)}},r=e.map((function(t){return t(o)}));return n=ze.apply(void 0,r)(i.dispatch),Ce(Ce({},i),{},{dispatch:n})}}}function Be(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 Te=Be();Te.withExtraArgument=Be;var Le,De=Te,_e=(Le=function(t,e){return Le=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])},Le(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}Le(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),We=function(t,e){for(var i=0,n=e.length,o=t.length;i<n;i++,o++)t[o]=e[i];return t},Ke=Object.defineProperty,He=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,qe=function(t,e,i){return e in t?Ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i},Je=function(t,e){for(var i in e||(e={}))Ze.call(e,i)&&qe(t,i,e[i]);if(He)for(var n=0,o=He(e);n<o.length;n++){i=o[n];Ve.call(e,i)&&qe(t,i,e[i])}return t},Xe="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ze:ze.apply(null,arguments)};var Ge=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 _e(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,We([void 0],t[0].concat(this)))):new(e.bind.apply(e,We([void 0],t.concat(this))))},e}(Array);function Qe(t){return Mt(t)?Ee(t,(function(){})):t}function Ye(){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 Ge;i&&(!function(t){return"boolean"==typeof t}(i)?n.push(De.withExtraArgument(i.extraArgument)):n.push(De));return n}(t)}}function ti(t){var e,i=Ye(),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,u=n.preloadedState,f=void 0===u?void 0:u,h=n.enhancers,p=void 0===h?void 0:h;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=Fe(r)}var d=a;"function"==typeof d&&(d=d(i));var v=Ie.apply(void 0,d),b=ze;c&&(b=Xe(Je({trace:!1},"object"==typeof c&&c)));var y=[v];return Array.isArray(p)?y=We([v],p):"function"==typeof p&&(y=p(y)),Pe(e,f,b.apply(void 0,y))}function ei(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 Je(Je({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 ii(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 ni(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:Qe(t.initialState),o=t.reducers||{},r=Object.keys(o),s={},a={},l={};function c(){var e="function"==typeof t.extraReducers?ii(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,u=Je(Je({},o),a);return function(t,e,i,n){void 0===i&&(i=[]);var o,r="function"==typeof e?ii(e):[e,i,n],s=r[0],a=r[1],l=r[2];if(function(t){return"function"==typeof t}(t))o=function(){return Qe(t())};else{var c=Qe(t);o=function(){return c}}function u(t,e){void 0===t&&(t=o());var i=We([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(Nt(t))return void 0===(n=i(t,e))?t:n;if(Mt(t))return Ee(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 u.getInitialState=o,u}(n,u,s,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?ei(c,n):ei(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 oi="listenerMiddleware";ei(oi+"/add"),ei(oi+"/removeAll"),ei(oi+"/remove"),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[ve];return xe.get(e,t)},set:function(e){var i=this[ve];xe.set(i,t,e)}},i}function e(t){for(var e=t.length-1;e>=0;e--){var o=t[e][ve];if(!o.P)switch(o.i){case 5:n(o)&&ie(o);break;case 4:i(o)&&ie(o)}}}function i(t){for(var e=t.t,i=t.k,n=ye(i),o=n.length-1;o>=0;o--){var r=n[o];if(r!==ve){var s=e[r];if(void 0===s&&!At(e,r))return!0;var a=i[r],l=a&&a[ve];if(l?l.t!==s:!Ft(a,s))return!0}}var c=!!e[ve];return n.length!==ye(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){me[t]||(me[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=ge(i);delete r[ve];for(var s=ye(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:Kt(),P:!1,I:!1,D:{},l:i,t:e,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,ve,{value:r,writable:!0}),o},S:function(t,i,o){o?Nt(i)&&i[ve].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var i=e[ve];if(i){var o=i.t,r=i.k,s=i.D,a=i.i;if(4===a)Rt(r,(function(e){e!==ve&&(void 0!==o[e]||At(o,e)?s[e]||t(r[e]):(s[e]=!0,ie(i)))})),Rt(o,(function(t){void 0!==r[t]||At(r,t)||(s[t]=!1,ie(i))}));else if(5===a){if(n(i)&&(ie(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 u=Math.min(r.length,o.length),f=0;f<u;f++)r.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(r[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?i(t):n(t)}})}();const ri=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged||null!=t.attribute),si=(t,e)=>{var i;const n=ri(t)?t:{};return e=null!==(i=null!=e?e:n.hasChanged)&&void 0!==i?i:(t,e)=>!f(t,e),(i,o)=>{var r,s;i.constructor.createProperty(o,{hasChanged:e,attribute:null!==(r=n.attribute)&&void 0!==r&&r});const a=i;a.reduxProperties=a.reduxProperties||new Map;const l=null!==(s=ri(t)?n.selector:t)&&void 0!==s?s:t=>t[o];a.reduxProperties.set(o,{selector:l,store:n.store})}};class ai extends Ot{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:li(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:li(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}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&&(this[e]=t.selector(i.getState(),this))}}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}}function li(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class ci{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,i)=>{const n=t[e];if(n)return(...t)=>{const e=n(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e="string"==typeof t?t:t.name,i="string"==typeof t?void 0:t,n=window.ftReduxStores[e];if(li(n))return n;if(null==i)return;const o=ni(i);if(n)return new ci(o,n);const r=ti({reducer:o.reducer});return window.ftReduxStores[i.name]=new ci(o,r)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var ui,fi,hi;const pi=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(hi=null===(fi=null===(ui=window.safari)||void 0===ui?void 0:ui.pushNotification)||void 0===fi?void 0:fi.toString())&&void 0!==hi?hi:""),di=1,vi=2,bi=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
112
112
|
/**
|
|
113
113
|
* @license
|
|
114
114
|
* Copyright 2017 Google LLC
|
|
@@ -118,7 +118,7 @@ var vt,bt;class yt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
118
118
|
* @license
|
|
119
119
|
* Copyright 2018 Google LLC
|
|
120
120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
121
|
-
*/const gi=bi(class extends yi{constructor(t){var e;if(super(t),t.type!==di||"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.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const o=t.element.classList;this.nt.forEach((t=>{t in e||(o.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(o.add(t),this.nt.add(t)):(o.remove(t),this.nt.delete(t)))}return Q}}),mi=mt.extend("--ft-ripple-color",wt.colorContent),xi={color:mi,backgroundColor:mt.extend("--ft-ripple-background-color",mi),opacityContentOnSurfacePressed:mt.external(wt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:mt.external(wt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:mt.external(wt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:mt.external(wt.opacityContentOnSurfaceSelected,"Design system")},wi=mt.extend("--ft-ripple-color",wt.colorPrimary),$i=wi,Oi=mt.extend("--ft-ripple-background-color",wi),Si=mt.extend("--ft-ripple-color",wt.colorSecondary),
|
|
121
|
+
*/const gi=bi(class extends yi{constructor(t){var e;if(super(t),t.type!==di||"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.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const o=t.element.classList;this.nt.forEach((t=>{t in e||(o.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(n=this.st)||void 0===n?void 0:n.has(t))||(i?(o.add(t),this.nt.add(t)):(o.remove(t),this.nt.delete(t)))}return Q}}),mi=mt.extend("--ft-ripple-color",wt.colorContent),xi={color:mi,backgroundColor:mt.extend("--ft-ripple-background-color",mi),opacityContentOnSurfacePressed:mt.external(wt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:mt.external(wt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:mt.external(wt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:mt.external(wt.opacityContentOnSurfaceSelected,"Design system")},wi=mt.extend("--ft-ripple-color",wt.colorPrimary),$i=wi,Oi=mt.extend("--ft-ripple-background-color",wi),Si=mt.extend("--ft-ripple-color",wt.colorSecondary),Ei=Si,ki=mt.extend("--ft-ripple-background-color",Si),ji=x`
|
|
122
122
|
:host {
|
|
123
123
|
display: contents;
|
|
124
124
|
}
|
|
@@ -148,11 +148,11 @@ var vt,bt;class yt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
151
|
-
background-color: ${
|
|
151
|
+
background-color: ${ki};
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
155
|
-
background-color: ${
|
|
155
|
+
background-color: ${Ei};
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
@@ -230,7 +230,7 @@ var vt,bt;class yt extends R{constructor(){super(...arguments),this.renderOption
|
|
|
230
230
|
* Copyright 2020 Google LLC
|
|
231
231
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
232
232
|
*/
|
|
233
|
-
const Mi=Symbol.for(""),Ri=t=>{if((null==t?void 0:t.r)===Mi)return null==t?void 0:t._$litStatic$},Ui=t=>({_$litStatic$:t,r:Mi}),Ai=new Map,Pi=(t=>(e,...i)=>{const n=i.length;let o,r;const s=[],a=[];let l,c=0,u=!1;for(;c<n;){for(l=e[c];c<n&&void 0!==(r=i[c],o=Ri(r));)l+=o+e[++c],u=!0;a.push(r),s.push(l),c++}if(c===n&&s.push(e[n]),u){const t=s.join("$$lit$$");void 0===(e=Ai.get(t))&&(s.raw=s,Ai.set(t,e=s)),i=a}return t(e,...i)})(G);var Fi;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Fi||(Fi={}));const zi=mt.extend("--ft-typography-font-family",wt.titleFont),Ii=mt.extend("--ft-typography-font-family",wt.contentFont),Bi={fontFamily:Ii,fontSize:mt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:mt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:mt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:mt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:mt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Ti=mt.extend("--ft-typography-title-font-family",zi),Li=mt.extend("--ft-typography-title-font-size",Bi.fontSize,"20px"),Di=mt.extend("--ft-typography-title-font-weight",Bi.fontWeight,"normal"),_i=mt.extend("--ft-typography-title-letter-spacing",Bi.letterSpacing,"0.15px"),Wi=mt.extend("--ft-typography-title-line-height",Bi.lineHeight,"1.2"),Ki=mt.extend("--ft-typography-title-text-transform",Bi.textTransform,"inherit"),Hi=mt.extend("--ft-typography-title-dense-font-family",zi),Zi=mt.extend("--ft-typography-title-dense-font-size",Bi.fontSize,"14px"),Vi=mt.extend("--ft-typography-title-dense-font-weight",Bi.fontWeight,"normal"),qi=mt.extend("--ft-typography-title-dense-letter-spacing",Bi.letterSpacing,"0.105px"),Ji=mt.extend("--ft-typography-title-dense-line-height",Bi.lineHeight,"1.7"),Xi=mt.extend("--ft-typography-title-dense-text-transform",Bi.textTransform,"inherit"),Gi=mt.extend("--ft-typography-subtitle1-font-family",Ii),Qi=mt.extend("--ft-typography-subtitle1-font-size",Bi.fontSize,"16px"),Yi=mt.extend("--ft-typography-subtitle1-font-weight",Bi.fontWeight,"600"),tn=mt.extend("--ft-typography-subtitle1-letter-spacing",Bi.letterSpacing,"0.144px"),en=mt.extend("--ft-typography-subtitle1-line-height",Bi.lineHeight,"1.5"),nn=mt.extend("--ft-typography-subtitle1-text-transform",Bi.textTransform,"inherit"),on=mt.extend("--ft-typography-subtitle2-font-family",Ii),rn=mt.extend("--ft-typography-subtitle2-font-size",Bi.fontSize,"14px"),sn=mt.extend("--ft-typography-subtitle2-font-weight",Bi.fontWeight,"normal"),an=mt.extend("--ft-typography-subtitle2-letter-spacing",Bi.letterSpacing,"0.098px"),ln=mt.extend("--ft-typography-subtitle2-line-height",Bi.lineHeight,"1.7"),cn=mt.extend("--ft-typography-subtitle2-text-transform",Bi.textTransform,"inherit"),un=mt.extend("--ft-typography-body1-font-family",Ii),fn=mt.extend("--ft-typography-body1-font-size",Bi.fontSize,"16px"),hn=mt.extend("--ft-typography-body1-font-weight",Bi.fontWeight,"normal"),pn=mt.extend("--ft-typography-body1-letter-spacing",Bi.letterSpacing,"0.496px"),dn=mt.extend("--ft-typography-body1-line-height",Bi.lineHeight,"1.5"),vn=mt.extend("--ft-typography-body1-text-transform",Bi.textTransform,"inherit"),bn=mt.extend("--ft-typography-body2-font-family",Ii),yn=mt.extend("--ft-typography-body2-font-size",Bi.fontSize,"14px"),gn=mt.extend("--ft-typography-body2-font-weight",Bi.fontWeight,"normal"),mn=mt.extend("--ft-typography-body2-letter-spacing",Bi.letterSpacing,"0.252px"),xn=mt.extend("--ft-typography-body2-line-height",Bi.lineHeight,"1.4"),wn=mt.extend("--ft-typography-body2-text-transform",Bi.textTransform,"inherit"),$n=mt.extend("--ft-typography-caption-font-family",Ii),On=mt.extend("--ft-typography-caption-font-size",Bi.fontSize,"12px"),Sn=mt.extend("--ft-typography-caption-font-weight",Bi.fontWeight,"normal"),
|
|
233
|
+
const Mi=Symbol.for(""),Ri=t=>{if((null==t?void 0:t.r)===Mi)return null==t?void 0:t._$litStatic$},Ui=t=>({_$litStatic$:t,r:Mi}),Ai=new Map,Pi=(t=>(e,...i)=>{const n=i.length;let o,r;const s=[],a=[];let l,c=0,u=!1;for(;c<n;){for(l=e[c];c<n&&void 0!==(r=i[c],o=Ri(r));)l+=o+e[++c],u=!0;a.push(r),s.push(l),c++}if(c===n&&s.push(e[n]),u){const t=s.join("$$lit$$");void 0===(e=Ai.get(t))&&(s.raw=s,Ai.set(t,e=s)),i=a}return t(e,...i)})(G);var Fi;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(Fi||(Fi={}));const zi=mt.extend("--ft-typography-font-family",wt.titleFont),Ii=mt.extend("--ft-typography-font-family",wt.contentFont),Bi={fontFamily:Ii,fontSize:mt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:mt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:mt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:mt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:mt.create("--ft-typography-text-transform","UNKNOWN","inherit")},Ti=mt.extend("--ft-typography-title-font-family",zi),Li=mt.extend("--ft-typography-title-font-size",Bi.fontSize,"20px"),Di=mt.extend("--ft-typography-title-font-weight",Bi.fontWeight,"normal"),_i=mt.extend("--ft-typography-title-letter-spacing",Bi.letterSpacing,"0.15px"),Wi=mt.extend("--ft-typography-title-line-height",Bi.lineHeight,"1.2"),Ki=mt.extend("--ft-typography-title-text-transform",Bi.textTransform,"inherit"),Hi=mt.extend("--ft-typography-title-dense-font-family",zi),Zi=mt.extend("--ft-typography-title-dense-font-size",Bi.fontSize,"14px"),Vi=mt.extend("--ft-typography-title-dense-font-weight",Bi.fontWeight,"normal"),qi=mt.extend("--ft-typography-title-dense-letter-spacing",Bi.letterSpacing,"0.105px"),Ji=mt.extend("--ft-typography-title-dense-line-height",Bi.lineHeight,"1.7"),Xi=mt.extend("--ft-typography-title-dense-text-transform",Bi.textTransform,"inherit"),Gi=mt.extend("--ft-typography-subtitle1-font-family",Ii),Qi=mt.extend("--ft-typography-subtitle1-font-size",Bi.fontSize,"16px"),Yi=mt.extend("--ft-typography-subtitle1-font-weight",Bi.fontWeight,"600"),tn=mt.extend("--ft-typography-subtitle1-letter-spacing",Bi.letterSpacing,"0.144px"),en=mt.extend("--ft-typography-subtitle1-line-height",Bi.lineHeight,"1.5"),nn=mt.extend("--ft-typography-subtitle1-text-transform",Bi.textTransform,"inherit"),on=mt.extend("--ft-typography-subtitle2-font-family",Ii),rn=mt.extend("--ft-typography-subtitle2-font-size",Bi.fontSize,"14px"),sn=mt.extend("--ft-typography-subtitle2-font-weight",Bi.fontWeight,"normal"),an=mt.extend("--ft-typography-subtitle2-letter-spacing",Bi.letterSpacing,"0.098px"),ln=mt.extend("--ft-typography-subtitle2-line-height",Bi.lineHeight,"1.7"),cn=mt.extend("--ft-typography-subtitle2-text-transform",Bi.textTransform,"inherit"),un=mt.extend("--ft-typography-body1-font-family",Ii),fn=mt.extend("--ft-typography-body1-font-size",Bi.fontSize,"16px"),hn=mt.extend("--ft-typography-body1-font-weight",Bi.fontWeight,"normal"),pn=mt.extend("--ft-typography-body1-letter-spacing",Bi.letterSpacing,"0.496px"),dn=mt.extend("--ft-typography-body1-line-height",Bi.lineHeight,"1.5"),vn=mt.extend("--ft-typography-body1-text-transform",Bi.textTransform,"inherit"),bn=mt.extend("--ft-typography-body2-font-family",Ii),yn=mt.extend("--ft-typography-body2-font-size",Bi.fontSize,"14px"),gn=mt.extend("--ft-typography-body2-font-weight",Bi.fontWeight,"normal"),mn=mt.extend("--ft-typography-body2-letter-spacing",Bi.letterSpacing,"0.252px"),xn=mt.extend("--ft-typography-body2-line-height",Bi.lineHeight,"1.4"),wn=mt.extend("--ft-typography-body2-text-transform",Bi.textTransform,"inherit"),$n=mt.extend("--ft-typography-caption-font-family",Ii),On=mt.extend("--ft-typography-caption-font-size",Bi.fontSize,"12px"),Sn=mt.extend("--ft-typography-caption-font-weight",Bi.fontWeight,"normal"),En=mt.extend("--ft-typography-caption-letter-spacing",Bi.letterSpacing,"0.396px"),kn=mt.extend("--ft-typography-caption-line-height",Bi.lineHeight,"1.33"),jn=mt.extend("--ft-typography-caption-text-transform",Bi.textTransform,"inherit"),Cn=mt.extend("--ft-typography-breadcrumb-font-family",Ii),Nn=mt.extend("--ft-typography-breadcrumb-font-size",Bi.fontSize,"10px"),Mn=mt.extend("--ft-typography-breadcrumb-font-weight",Bi.fontWeight,"normal"),Rn=mt.extend("--ft-typography-breadcrumb-letter-spacing",Bi.letterSpacing,"0.33px"),Un=mt.extend("--ft-typography-breadcrumb-line-height",Bi.lineHeight,"1.6"),An=mt.extend("--ft-typography-breadcrumb-text-transform",Bi.textTransform,"inherit"),Pn=mt.extend("--ft-typography-overline-font-family",Ii),Fn=mt.extend("--ft-typography-overline-font-size",Bi.fontSize,"10px"),zn=mt.extend("--ft-typography-overline-font-weight",Bi.fontWeight,"normal"),In=mt.extend("--ft-typography-overline-letter-spacing",Bi.letterSpacing,"1.5px"),Bn=mt.extend("--ft-typography-overline-line-height",Bi.lineHeight,"1.6"),Tn=mt.extend("--ft-typography-overline-text-transform",Bi.textTransform,"uppercase"),Ln={fontFamily:mt.extend("--ft-typography-button-font-family",Ii),fontSize:mt.extend("--ft-typography-button-font-size",Bi.fontSize,"14px"),fontWeight:mt.extend("--ft-typography-button-font-weight",Bi.fontWeight,"600"),letterSpacing:mt.extend("--ft-typography-button-letter-spacing",Bi.letterSpacing,"1.246px"),lineHeight:mt.extend("--ft-typography-button-line-height",Bi.lineHeight,"1.15"),textTransform:mt.extend("--ft-typography-button-text-transform",Bi.textTransform,"uppercase")},Dn=x`
|
|
234
234
|
.ft-typography--title {
|
|
235
235
|
font-family: ${Ti};
|
|
236
236
|
font-size: ${Li};
|
|
@@ -290,8 +290,8 @@ const Mi=Symbol.for(""),Ri=t=>{if((null==t?void 0:t.r)===Mi)return null==t?void
|
|
|
290
290
|
font-family: ${$n};
|
|
291
291
|
font-size: ${On};
|
|
292
292
|
font-weight: ${Sn};
|
|
293
|
-
letter-spacing: ${
|
|
294
|
-
line-height: ${
|
|
293
|
+
letter-spacing: ${En};
|
|
294
|
+
line-height: ${kn};
|
|
295
295
|
text-transform: ${jn};
|
|
296
296
|
}
|
|
297
297
|
`,qn=x`
|
|
@@ -522,7 +522,7 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
522
522
|
${lo(this.resolvedIcon)}
|
|
523
523
|
<slot ?hidden=${i}></slot>
|
|
524
524
|
</i>
|
|
525
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case bo.file_format:this.resolvedIcon=null!==(t=uo[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case bo.material:this.resolvedIcon=this.value||Y;break;default:this.resolvedIcon=null!==(e=co[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}go.elementDefinitions={},go.styles=vo,yo([r()],go.prototype,"variant",void 0),yo([r()],go.prototype,"value",void 0),yo([s()],go.prototype,"resolvedIcon",void 0),yo([l("slot")],go.prototype,"slottedContent",void 0),h("ft-icon")(go);const mo=mt.extend("--ft-button-color",wt.colorPrimary),xo={backgroundColor:mt.extend("--ft-button-background-color",wt.colorSurface),borderRadius:mt.extend("--ft-button-border-radius",wt.borderRadiusL),color:mo,fontSize:mt.extend("--ft-button-font-size",Ln.fontSize),iconSize:mt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:mt.extend("--ft-button-ripple-color",mo),verticalPadding:mt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:mt.create("--ft-button-horizontal-padding","SIZE","8px"),opacityDisabled:mt.external(wt.colorOpacityDisabled,"Design system")},wo=mt.extend("--ft-button-primary-color",mt.extend("--ft-button-color",wt.colorOnPrimary)),$o={backgroundColor:mt.extend("--ft-button-primary-background-color",mt.extend("--ft-button-background-color",wt.colorPrimary)),color:wo,rippleColor:mt.extend("--ft-button-primary-ripple-color",wo)},Oo=mt.extend("--ft-button-dense-border-radius",mt.extend("--ft-button-border-radius",wt.borderRadiusM)),So=[St,x`
|
|
525
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case bo.file_format:this.resolvedIcon=null!==(t=uo[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case bo.material:this.resolvedIcon=this.value||Y;break;default:this.resolvedIcon=null!==(e=co[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}go.elementDefinitions={},go.styles=vo,yo([r()],go.prototype,"variant",void 0),yo([r()],go.prototype,"value",void 0),yo([s()],go.prototype,"resolvedIcon",void 0),yo([l("slot")],go.prototype,"slottedContent",void 0),h("ft-icon")(go);const mo=mt.extend("--ft-button-color",wt.colorPrimary),xo={backgroundColor:mt.extend("--ft-button-background-color",wt.colorSurface),borderRadius:mt.extend("--ft-button-border-radius",wt.borderRadiusL),color:mo,fontSize:mt.extend("--ft-button-font-size",Ln.fontSize),iconSize:mt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:mt.extend("--ft-button-ripple-color",mo),verticalPadding:mt.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:mt.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:mt.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:mt.external(wt.colorOpacityDisabled,"Design system")},wo=mt.extend("--ft-button-primary-color",mt.extend("--ft-button-color",wt.colorOnPrimary)),$o={backgroundColor:mt.extend("--ft-button-primary-background-color",mt.extend("--ft-button-background-color",wt.colorPrimary)),color:wo,rippleColor:mt.extend("--ft-button-primary-ripple-color",wo)},Oo=mt.extend("--ft-button-dense-border-radius",mt.extend("--ft-button-border-radius",wt.borderRadiusM)),So=mt.create("--ft-button-dense-vertical-padding","SIZE","2px"),Eo=mt.create("--ft-button-dense-horizontal-padding","SIZE","4px"),ko=mt.create("--ft-button-dense-icon-padding","SIZE","4px"),jo=[St,x`
|
|
526
526
|
:host {
|
|
527
527
|
display: inline-block;
|
|
528
528
|
max-width: 100%;
|
|
@@ -561,12 +561,11 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
561
561
|
box-sizing: border-box;
|
|
562
562
|
border: none;
|
|
563
563
|
pointer-events: auto;
|
|
564
|
+
gap: ${xo.iconPadding};
|
|
564
565
|
|
|
565
566
|
--ft-button-internal-line-height: calc(${xo.fontSize} + 2px);
|
|
566
567
|
--ft-button-internal-color: ${xo.color};
|
|
567
568
|
${xt(po.size,xo.iconSize)};
|
|
568
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
569
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
570
569
|
${xt(xi.color,xo.rippleColor)};
|
|
571
570
|
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${xo.iconSize});
|
|
572
571
|
|
|
@@ -577,18 +576,31 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
577
576
|
-webkit-mask-image: radial-gradient(white, black);
|
|
578
577
|
}
|
|
579
578
|
|
|
579
|
+
.ft-button.ft-button--outlined {
|
|
580
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
581
|
+
padding: calc(${xo.verticalPadding} - 1px) calc(${xo.horizontalPadding} - 1px);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.ft-button.ft-button--dense {
|
|
585
|
+
padding: ${So} ${Eo};
|
|
586
|
+
border-radius: ${Oo};
|
|
587
|
+
gap: ${ko};
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.ft-button.ft-button--dense.ft-button--outlined {
|
|
591
|
+
padding: calc(${So} - 1px) calc(${Eo} - 1px);
|
|
592
|
+
}
|
|
593
|
+
|
|
580
594
|
.ft-button:not([disabled]):hover {
|
|
581
595
|
cursor: pointer;
|
|
582
596
|
}
|
|
583
597
|
|
|
584
|
-
.ft-button--
|
|
585
|
-
--ft-button-internal-
|
|
586
|
-
--ft-button-internal-horizontal-padding: 4px;
|
|
587
|
-
border-radius: ${Oo};
|
|
598
|
+
.ft-button--round {
|
|
599
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${xo.verticalPadding});
|
|
588
600
|
}
|
|
589
601
|
|
|
590
|
-
.ft-button--round {
|
|
591
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 +
|
|
602
|
+
.ft-button--round.ft-button--dense {
|
|
603
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${So});
|
|
592
604
|
}
|
|
593
605
|
|
|
594
606
|
.ft-button[disabled] {
|
|
@@ -602,11 +614,6 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
602
614
|
${xt(xi.color,$o.rippleColor)};
|
|
603
615
|
}
|
|
604
616
|
|
|
605
|
-
.ft-button.ft-button--outlined {
|
|
606
|
-
border: 1px solid var(--ft-button-internal-color);
|
|
607
|
-
padding: calc(${xo.verticalPadding} - 1px) calc(${xo.horizontalPadding} - 1px);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
617
|
.ft-button:focus {
|
|
611
618
|
outline: none;
|
|
612
619
|
}
|
|
@@ -617,7 +624,6 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
617
624
|
white-space: nowrap;
|
|
618
625
|
text-overflow: ellipsis;
|
|
619
626
|
display: block;
|
|
620
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
621
627
|
${xt(Ln.fontSize,"1em")};
|
|
622
628
|
${xt(Ln.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
623
629
|
}
|
|
@@ -632,8 +638,13 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
632
638
|
}
|
|
633
639
|
|
|
634
640
|
.ft-button--label[hidden] + ft-icon {
|
|
635
|
-
margin: 0 calc(
|
|
636
|
-
padding: 0
|
|
641
|
+
margin: 0 calc(${xo.horizontalPadding} * -1);
|
|
642
|
+
padding: 0 ${xo.verticalPadding};
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
646
|
+
margin: 0 calc(${Eo} * -1);
|
|
647
|
+
padding: 0 ${So};
|
|
637
648
|
}
|
|
638
649
|
|
|
639
650
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -645,7 +656,7 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
645
656
|
${xt(oo.size,xo.iconSize)};
|
|
646
657
|
${xt(oo.color,"var(--ft-button-internal-color)")};
|
|
647
658
|
}
|
|
648
|
-
`];var
|
|
659
|
+
`];var Co=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 No extends Ot{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=bo.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(G`
|
|
649
660
|
<button part="button"
|
|
650
661
|
class="${gi(t)}"
|
|
651
662
|
aria-label="${this.getLabel()}"
|
|
@@ -668,7 +679,7 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
668
679
|
</ft-tooltip>
|
|
669
680
|
`:t}resolveIcon(){return this.loading?G`
|
|
670
681
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?G`
|
|
671
|
-
<ft-icon part="icon" variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}
|
|
682
|
+
<ft-icon part="icon" variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:Y}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}No.elementDefinitions={"ft-ripple":Ni,"ft-tooltip":no,"ft-typography":Yn,"ft-icon":go,"ft-loader":so},No.styles=[kt,jo],Co([r({type:String,reflect:!0})],No.prototype,"role",void 0),Co([r({type:Boolean})],No.prototype,"primary",void 0),Co([r({type:Boolean})],No.prototype,"outlined",void 0),Co([r({type:Boolean})],No.prototype,"disabled",void 0),Co([r({type:Boolean})],No.prototype,"dense",void 0),Co([r({type:Boolean})],No.prototype,"round",void 0),Co([r({type:String})],No.prototype,"label",void 0),Co([r({type:String})],No.prototype,"icon",void 0),Co([r({type:String})],No.prototype,"iconVariant",void 0),Co([r({type:Boolean})],No.prototype,"trailingIcon",void 0),Co([r({type:Boolean})],No.prototype,"loading",void 0),Co([r({type:String})],No.prototype,"tooltipPosition",void 0),Co([r({type:Boolean})],No.prototype,"hideTooltip",void 0),Co([r({type:Boolean})],No.prototype,"forceTooltip",void 0),Co([l(".ft-button")],No.prototype,"button",void 0),Co([l(".ft-button--label slot")],No.prototype,"slottedContent",void 0),h("ft-button")(No);const Mo={height:mt.create("--ft-search-input-height","SIZE","38px"),borderRadius:mt.extend("--ft-search-input-border-radius",wt.borderRadiusS),desktopFiltersHeight:mt.create("--ft-search-input-desktop-filters-height","SIZE","350px"),floatingZIndex:mt.create("--ft-search-input-floating-components-z-index","NUMBER","3"),colorSurface:mt.external(wt.colorSurface,"Design system"),colorOnSurface:mt.external(wt.colorOnSurface,"Design system"),colorOnSurfaceMedium:mt.external(wt.colorOnSurfaceMedium,"Design system"),colorOutline:mt.external(wt.colorOutline,"Design system"),colorPrimary:mt.external(wt.colorPrimary,"Design system"),elevation02:mt.external(wt.elevation02,"Design system"),buttonColor:mt.external(xo.color,"Button"),buttonRippleColor:mt.external(xo.rippleColor,"Button")},Ro=x`
|
|
672
683
|
* {
|
|
673
684
|
box-sizing: border-box;
|
|
674
685
|
}
|
|
@@ -678,11 +689,11 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
678
689
|
display: flex;
|
|
679
690
|
flex-direction: row;
|
|
680
691
|
align-items: center;
|
|
681
|
-
height: ${
|
|
692
|
+
height: ${Mo.height};
|
|
682
693
|
|
|
683
|
-
background: ${
|
|
684
|
-
border: 1px solid ${
|
|
685
|
-
border-radius: ${
|
|
694
|
+
background: ${Mo.colorSurface};
|
|
695
|
+
border: 1px solid ${Mo.colorOutline};
|
|
696
|
+
border-radius: ${Mo.borderRadius};
|
|
686
697
|
}
|
|
687
698
|
|
|
688
699
|
.ft-search-input--input-container {
|
|
@@ -697,23 +708,23 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
697
708
|
width: 100%;
|
|
698
709
|
display: grid;
|
|
699
710
|
padding: 0 8px;
|
|
700
|
-
border-radius: ${
|
|
711
|
+
border-radius: ${Mo.borderRadius};
|
|
701
712
|
}
|
|
702
713
|
|
|
703
714
|
.ft-search-input--input-container:focus-within .ft-search-input--input-outline {
|
|
704
|
-
outline: 2px solid ${
|
|
715
|
+
outline: 2px solid ${Mo.colorPrimary};
|
|
705
716
|
}
|
|
706
717
|
|
|
707
718
|
.ft-search-input--input {
|
|
708
719
|
height: 100%;
|
|
709
720
|
border: none;
|
|
710
721
|
background-color: transparent;
|
|
711
|
-
color: ${
|
|
722
|
+
color: ${Mo.colorOnSurface};
|
|
712
723
|
outline: none;
|
|
713
724
|
}
|
|
714
725
|
|
|
715
726
|
.ft-search-input--input::placeholder {
|
|
716
|
-
color: ${
|
|
727
|
+
color: ${Mo.colorOnSurfaceMedium};
|
|
717
728
|
}
|
|
718
729
|
|
|
719
730
|
.ft-search-input--actions {
|
|
@@ -723,7 +734,7 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
723
734
|
align-items: center;
|
|
724
735
|
height: 100%;
|
|
725
736
|
|
|
726
|
-
${xt(to.zIndex,`calc(${
|
|
737
|
+
${xt(to.zIndex,`calc(${Mo.floatingZIndex} + 1)`)};
|
|
727
738
|
}
|
|
728
739
|
|
|
729
740
|
.ft-search-input > ft-button,
|
|
@@ -743,27 +754,27 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
743
754
|
.ft-search-input.ft-search-input--with-suggestions:focus-within:not(.ft-search-input--with-suggestions-closed) ft-search-input-suggestion {
|
|
744
755
|
display: block;
|
|
745
756
|
}
|
|
746
|
-
`,
|
|
747
|
-
`,
|
|
757
|
+
`,Uo=x`
|
|
758
|
+
`,Ao=ci.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 Po{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Ao.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?Po.build(t):null!==(e=Po.API)&&void 0!==e?e:Po.API=Po.build()}static await(t){return new Promise((e=>{let i=Po.get(t);if(i)e(i);else{const n=Ao.subscribe((()=>{i=Po.get(t),i&&(n(),e(i))}))}}))}}var Fo;const zo=Symbol("clearAfterUnitTest");class Io{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[Fo]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=Ao.getState().uiLocale,Ao.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Ao.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};f(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 jt(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})))}}Fo=zo,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Io((async(t,e)=>(await Po.await()).getFluidTopicsMessageContext(t,e)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Io((async(t,e)=>(await Po.await()).getCustomMessageContext(t,e))));const Bo=window.FluidTopicsI18nService,To=window.FluidTopicsCustomI18nService;var Lo=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 Do extends Ot{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=()=>Po.get(),this.cache=new i,this.cleanSessionDebouncer=new n}render(){return G`
|
|
748
759
|
<slot></slot>
|
|
749
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
750
|
-
`;var
|
|
760
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&Ao.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Ao.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Ao.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Ao.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Ao.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Ao.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Ao.actions.setSession(this.session),t.has("availableUiLocales")&&Ao.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Bo.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()))))}}Do.elementDefinitions={},Do.styles=Uo,Lo([r()],Do.prototype,"baseUrl",void 0),Lo([r()],Do.prototype,"apiIntegrationIdentifier",void 0),Lo([r()],Do.prototype,"uiLocale",void 0),Lo([p([])],Do.prototype,"availableUiLocales",void 0),Lo([r({type:Boolean})],Do.prototype,"editorMode",void 0),Lo([r({type:Boolean})],Do.prototype,"noCustom",void 0),Lo([r({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Do.prototype,"noCustomComponent",void 0),Lo([r({type:Boolean})],Do.prototype,"withManualResources",void 0),Lo([p([])],Do.prototype,"messageContexts",void 0),Lo([p(void 0)],Do.prototype,"session",void 0),Lo([r({type:Object})],Do.prototype,"apiProvider",void 0),h("ft-app-context")(Do);var _o=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 Wo extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const Ko=Symbol("registerInterval");class Ho extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[Ko]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Ko]):this.dispatchEvent(new Wo)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=Ko,_o([s()],i.prototype,"stateManager",void 0),i}(ai)){}const Zo=x`
|
|
761
|
+
`;var Vo=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 qo=Symbol("i18nProperties"),Jo=Symbol("i18nUnsubs");function Xo(t){var e;class i extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?To:Bo}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[qo])||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[qo])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[qo]&&new Set([...this[qo].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Jo].has(t)||this[Jo].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[Jo].forEach((t=>t())),this[Jo].clear()}}return e=Jo,Vo([r({type:Boolean})],i.prototype,"useCustomMessageContexts",void 0),i}class Go extends(Xo(Ot)){}class Qo extends(Xo(ai)){}var Yo=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 tr extends Qo{constructor(){super(),this.editorMode=!1,this.addStore(Ao)}render(){return this.key&&this.context?G`
|
|
751
762
|
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
752
|
-
`:this.editorMode?"Select a context and a label key.":Y}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}
|
|
763
|
+
`:this.editorMode?"Select a context and a label key.":Y}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}tr.elementDefinitions={},tr.styles=Zo,Yo([si()],tr.prototype,"editorMode",void 0),Yo([r()],tr.prototype,"context",void 0),Yo([r()],tr.prototype,"key",void 0),Yo([p([])],tr.prototype,"args",void 0),Yo([r()],tr.prototype,"defaultMessage",void 0);class er{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>Bo.resolveMessage(this.name,e,...t)})}static build(t){return new er(t)}static fromGwt(t){return new er(t)}}h("ft-i18n")(tr);const ir=er.build("designedSearchInput"),nr=x`
|
|
753
764
|
* {
|
|
754
765
|
box-sizing: border-box;
|
|
755
766
|
}
|
|
756
767
|
|
|
757
768
|
.ft-search-input-suggestion {
|
|
758
769
|
position: absolute;
|
|
759
|
-
z-index: ${
|
|
770
|
+
z-index: ${Mo.floatingZIndex};
|
|
760
771
|
top: calc(100% + 2px);
|
|
761
772
|
left: -1px;
|
|
762
773
|
right: -1px;
|
|
763
|
-
background: ${
|
|
764
|
-
border: 1px solid ${
|
|
765
|
-
border-radius: 0 0 ${
|
|
766
|
-
box-shadow: ${
|
|
774
|
+
background: ${Mo.colorSurface};
|
|
775
|
+
border: 1px solid ${Mo.colorOutline};
|
|
776
|
+
border-radius: 0 0 ${Mo.borderRadius} ${Mo.borderRadius};
|
|
777
|
+
box-shadow: ${Mo.elevation02};
|
|
767
778
|
}
|
|
768
779
|
|
|
769
780
|
.ft-search-input-suggestion--suggestion {
|
|
@@ -774,7 +785,7 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
774
785
|
padding: 8px;
|
|
775
786
|
gap: 8px;
|
|
776
787
|
cursor: pointer;
|
|
777
|
-
color: ${
|
|
788
|
+
color: ${Mo.colorOnSurface};
|
|
778
789
|
min-height: 44px;
|
|
779
790
|
}
|
|
780
791
|
|
|
@@ -796,11 +807,11 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
796
807
|
* @license
|
|
797
808
|
* Copyright 2020 Google LLC
|
|
798
809
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
799
|
-
*/,{I:
|
|
810
|
+
*/,{I:or}=pt,rr=()=>document.createComment(""),sr=(t,e,i)=>{var n;const o=t._$AA.parentNode,r=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=o.insertBefore(rr(),r),n=o.insertBefore(rr(),r);i=new or(e,n,t,t.options)}else{const e=i._$AB.nextSibling,s=i._$AM,a=s!==t;if(a){let e;null===(n=i._$AQ)||void 0===n||n.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==s._$AU&&i._$AP(e)}if(e!==r||a){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,r),t=e}}}return i},ar=(t,e,i=t)=>(t._$AI(e,i),t),lr={},cr=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let i=t._$AA;const n=t._$AB.nextSibling;for(;i!==n;){const t=i.nextSibling;i.remove(),i=t}},ur=(t,e,i)=>{const n=new Map;for(let o=e;o<=i;o++)n.set(t[o],o);return n},fr=bi(class extends yi{constructor(t){if(super(t),t.type!==vi)throw Error("repeat() can only be used in text expressions")}ht(t,e,i){let n;void 0===i?i=e:void 0!==e&&(n=e);const o=[],r=[];let s=0;for(const e of t)o[s]=n?n(e,s):s,r[s]=i(e,s),s++;return{values:r,keys:o}}render(t,e,i){return this.ht(t,e,i).values}update(t,[e,i,n]){var o;const r=(t=>t._$AH)(t),{values:s,keys:a}=this.ht(e,i,n);if(!Array.isArray(r))return this.ut=a,s;const l=null!==(o=this.ut)&&void 0!==o?o:this.ut=[],c=[];let u,f,h=0,p=r.length-1,d=0,v=s.length-1;for(;h<=p&&d<=v;)if(null===r[h])h++;else if(null===r[p])p--;else if(l[h]===a[d])c[d]=ar(r[h],s[d]),h++,d++;else if(l[p]===a[v])c[v]=ar(r[p],s[v]),p--,v--;else if(l[h]===a[v])c[v]=ar(r[h],s[v]),sr(t,c[v+1],r[h]),h++,v--;else if(l[p]===a[d])c[d]=ar(r[p],s[d]),sr(t,r[h],r[p]),p--,d++;else if(void 0===u&&(u=ur(a,d,v),f=ur(l,h,p)),u.has(l[h]))if(u.has(l[p])){const e=f.get(a[d]),i=void 0!==e?r[e]:null;if(null===i){const e=sr(t,r[h]);ar(e,s[d]),c[d]=e}else c[d]=ar(i,s[d]),sr(t,r[h],i),r[e]=null;d++}else cr(r[p]),p--;else cr(r[h]),h++;for(;d<=v;){const e=sr(t,c[v+1]);ar(e,s[d]),c[d++]=e}for(;h<=p;){const t=r[h++];null!==t&&cr(t)}return this.ut=a,((t,e=lr)=>{t._$AH=e})(t,c),Q}});var hr=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("suggestion-selected",{detail:t})}}let dr=class extends Ho{constructor(){super(...arguments),this.suggestResults=[]}render(){return G`
|
|
800
811
|
<div class="ft-search-input-suggestion ft-word-wrap"
|
|
801
812
|
part="container"
|
|
802
813
|
@keydown=${t=>this.onSuggestKeyDown(t)}>
|
|
803
|
-
${
|
|
814
|
+
${fr(this.suggestResults,(t=>t.value),(t=>G`
|
|
804
815
|
<a href="#"
|
|
805
816
|
part="suggestion"
|
|
806
817
|
class="ft-search-input-suggestion--suggestion"
|
|
@@ -812,18 +823,18 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
812
823
|
</a>
|
|
813
824
|
`))}
|
|
814
825
|
</div>
|
|
815
|
-
`}onSuggestKeyDown(t){var e,i,n,o,r,s;switch(t.key){case"ArrowUp":null===(n=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(s=null!==(r=null===(o=this.getFocusedSuggestionElement())||void 0===o?void 0:o.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===s||s.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.dispatchEvent(new
|
|
826
|
+
`}onSuggestKeyDown(t){var e,i,n,o,r,s;switch(t.key){case"ArrowUp":null===(n=null!==(i=null===(e=this.getFocusedSuggestionElement())||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.getLastSuggestionElement())||void 0===n||n.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(s=null!==(r=null===(o=this.getFocusedSuggestionElement())||void 0===o?void 0:o.nextElementSibling)&&void 0!==r?r:this.getFirstSuggestionElement())||void 0===s||s.focus(),t.preventDefault(),t.stopPropagation()}}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.dispatchEvent(new pr(e))}getIcon(t){const e="DOCUMENT"===t.type?bo.file_format:bo.fluid_topics;let i;switch(t.type){case"MAP":i="BOOK"===t.editorialType?co.BOOK:co.ARTICLE;break;case"DOCUMENT":i=function(t,e){var i,n,o,r;t=(null!=t?t:"").toLowerCase(),e=(null!=e?e:"").toLowerCase();const[s,a]=((null!==(i=ho.get(t))&&void 0!==i?i:t)+"/").split("/");return null!==(r=null!==(o=null!==(n=fo.get(a))&&void 0!==n?n:fo.get(e))&&void 0!==o?o:fo.get(s))&&void 0!==r?r:uo.UNKNOWN}(t.mimeType,t.filenameExtension);break;case"TOPIC":i=co.TOPICS}return G`
|
|
816
827
|
<ft-icon variant="${e}" part="suggestion-icon">
|
|
817
828
|
${i}
|
|
818
829
|
</ft-icon>
|
|
819
|
-
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};
|
|
830
|
+
`}getFocusedSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion:focus-within")}getLastSuggestionElement(){let t=this.shadowRoot.querySelectorAll(".ft-search-input-suggestion--suggestion");return t.length>0?t[t.length-1]:null}getFirstSuggestionElement(){return this.shadowRoot.querySelector(".ft-search-input-suggestion--suggestion")}focusFirstSuggestion(){var t;null===(t=this.getFirstSuggestionElement())||void 0===t||t.focus()}};dr.elementDefinitions={"ft-ripple":Ni,"ft-typography":Yn,"ft-icon":go},dr.styles=[Et,nr],hr([si()],dr.prototype,"suggestResults",void 0),dr=hr([(t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:n}=e;return{kind:i,elements:n,finisher(e){customElements.define(t,e)}}})(t,e))("ft-search-input-suggestion")],dr);var vr=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 br extends(Xo(Ho)){constructor(){super(),this.liveQuery="",this.suggestResults=[],this.forceCloseSuggestion=!1,this.addI18nContext(ir)}render(){let t={"ft-search-input":!0,"ft-search-input--with-suggestions":this.suggestResults.length>0,"ft-search-input--with-suggestions-closed":this.forceCloseSuggestion};return G`
|
|
820
831
|
<div class="${gi(t)}" @focusout=${()=>this.forceCloseSuggestion=!1}>
|
|
821
832
|
<div class="ft-search-input--input-container" part="input-container" tabindex="-1">
|
|
822
833
|
<div class="ft-search-input--input-outline" part="input-outline">
|
|
823
834
|
<input class="ft-search-input--input ft-typography--body2"
|
|
824
835
|
part="input"
|
|
825
836
|
type="text"
|
|
826
|
-
placeholder="${
|
|
837
|
+
placeholder="${ir.messages.placeholder()}"
|
|
827
838
|
.value="${this.liveQuery}"
|
|
828
839
|
@keydown=${t=>this.onSearchBarKeyDown(t)}
|
|
829
840
|
@keyup=${t=>this.onSearchBarKeyUp(t)}>
|
|
@@ -837,9 +848,9 @@ class ao extends yi{constructor(t){if(super(t),this.it=Y,t.type!==vi)throw Error
|
|
|
837
848
|
part="launch-search-in-input"
|
|
838
849
|
icon="search"
|
|
839
850
|
round dense
|
|
840
|
-
label="${
|
|
851
|
+
label="${ir.messages.searchButton()}"
|
|
841
852
|
@click=${()=>this.launchSearch()}
|
|
842
853
|
></ft-button>
|
|
843
854
|
</div>
|
|
844
855
|
</div>
|
|
845
|
-
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var e,i;"Enter"===t.key?(null===(e=this.stateManager)||void 0===e||e.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(i=this.stateManager)||void 0===i||i.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var e;null===(e=this.stateManager)||void 0===e||e.setQuery(t.detail),this.forceCloseSuggestion=!0}}
|
|
856
|
+
`}onSearchBarKeyDown(t){if("ArrowDown"===t.key)t.stopPropagation(),t.preventDefault(),this.suggestion.focusFirstSuggestion()}onSearchBarKeyUp(t){var e,i;"Enter"===t.key?(null===(e=this.stateManager)||void 0===e||e.setQuery(this.input.value),this.forceCloseSuggestion=!0):null===(i=this.stateManager)||void 0===i||i.setLiveQuery(this.input.value)}launchSearch(){var t;null===(t=this.stateManager)||void 0===t||t.setQuery(this.liveQuery),this.forceCloseSuggestion=!0}onSuggestionSelected(t){var e;null===(e=this.stateManager)||void 0===e||e.setQuery(t.detail),this.forceCloseSuggestion=!0}}br.elementDefinitions={"ft-search-input-suggestion":dr,"ft-button":No},br.styles=[Zn,Ro],vr([si()],br.prototype,"request",void 0),vr([si()],br.prototype,"liveQuery",void 0),vr([si()],br.prototype,"suggestResults",void 0),vr([s()],br.prototype,"forceCloseSuggestion",void 0),vr([l(".ft-search-input--input")],br.prototype,"input",void 0),vr([l("ft-search-input-suggestion")],br.prototype,"suggestion",void 0),h("ft-search-input")(br),t.FtSearchInput=br,t.FtSearchInputCssVariables=Mo,t.styles=Ro,Object.defineProperty(t,"W",{value:!0})}({});
|