elli-website/js/scripts.min.js

2 lines
25 KiB
JavaScript
Raw Permalink Normal View History

2023-09-23 19:17:38 +02:00
e=this,t=function(){"use strict";function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function n(e,t,n){return t&&S(e.prototype,t),n&&S(e,n),e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t){var n,s=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,n)),s}function L(e){for(var t,n=1;n<arguments.length;n++)t=null!=arguments[n]?arguments[n]:{},n%2?T(Object(t),!0).forEach(function(n){O(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))});return e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&P(e,t)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ee(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,o,s=j(e);return t?(o=j(this).constructor,n=Reflect.construct(s,arguments,o)):n=s.apply(this,arguments),ee(this,n)}}function l(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2024-02-13 10:05:55 +01:00
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function i(e){return Array.isArray?Array.isArray(e):"[object Array]"===D(e)}function a(e){return"string"==typeof e}function B(e){return"number"==typeof e}function te(e){return!0===e||!1===e||function(e){return R(e)&&null!==e}(e)&&"[object Boolean]"==D(e)}function R(e){return"object"===z(e)}function s(e){return e!=null}function y(e){return!e.trim().length}function D(e){return e==null?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var e,o,d,u,b,M,ae=function(e){return"Invalid value for key ".concat(e)},fe=function(e){return"Pattern length exceeds max of ".concat(e,".")},A=Object.prototype.hasOwnProperty,Q=function(){function e(n){var s,o=this;t(this,e),this._keys=[],this._keyMap={},s=0,n.forEach(function(e){var t=E(e);s+=t.weight,o._keys.push(t),o._keyMap[t.id]=t,s+=t.weight}),this._keys.forEach(function(e){e.weight/=s})}return n(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function E(e){var t,n=null,s=null,o=null,r=1;if(a(e)||i(e))o=e,n=k(e),s=_(e);else{if(!A.call(e,"name"))throw new Error(function(e){return"Missing ".concat(e," property in key")}("name"));if(t=e.name,o=t,A.call(e,"weight")&&(r=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(t));n=k(t),s=_(t)}return{path:n,id:s,weight:r,src:o}}function k(e){return i(e)?e:e.split(".")}function _(e){return i(e)?e.join("."):e}e=L({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],o=!1;return function e(t,r,c){if(s(t))if(r[c]){if(l=t[r[c]],!s(l))return;if(c===r.length-1&&(a(l)||B(l)||te(l)))n.push(function(e){return e==null?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(l));else if(i(l)){o=!0;for(var l,d=0,u=l.length;d<u;d+=1)e(l[d],r,c+1)}else r.length&&e(l,r,c+1)}else n.push(t)}(e,a(t)?t.split("."):t,0),o?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}),M=/[^ ]+/g;function le(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,e=new Map,t=Math.pow(10,n);return{get:function(n){if(s=n.match(M).length,e.has(s))return e.get(s);var s,i=1/Math.sqrt(s),o=parseFloat(Math.round(i*t)/t);return e.set(s,o),o},clear:function(){e.clear()}}}u=function(){function o(){var s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=s.getFn,i=void 0===n?e.getFn:n;t(this,o),this.norm=le(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return n(o,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=e,this._keysMap={},e.forEach(function(e,n){t._keysMap[e.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,a(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();a(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(s(e)&&!y(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObje