/*! For license information please see jp-search.chunk-81-0d626d46cc567b31f6e1.min.js.LICENSE.txt */ (self.webpackChunkwebpack=self.webpackChunkwebpack||[]).push([[81],{43197:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},78900:function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t>>1^n:i>>>=1;u=u>>>8^i}return-1^u}function o(e,n){var r,i,u;if(void 0!==o.crc&&n&&e||(o.crc=-1,e)){for(r=o.crc,i=0,u=e.length;i>>8^t[255&(r^e[i])];return o.crc=r,-1^r}}!function(){var e,r,o;for(r=0;r<256;r+=1){for(e=r,o=0;o<8;o+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;return e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e,((t?r(e):o(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=o}()},98027:function(e){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(n=t.cmp,function(e){return function(t,r){var o={key:t,value:e[t]},i={key:r,value:e[r]};return n(o,i)}}),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,u;if(Array.isArray(t)){for(u="[",n=0;n=t||n<0||v&&e-d>=l}function w(){var e=o();if(g(e))return x(e);p=setTimeout(w,function(e){var n=t-(e-_);return v?c(n,l-(e-d)):n}(e))}function x(e){return p=void 0,y&&a?m(e):(a=s=void 0,f)}function P(){var e=o(),n=g(e);if(a=arguments,s=this,_=e,n){if(void 0===p)return b(_);if(v)return clearTimeout(p),p=setTimeout(w,t),m(_)}return void 0===p&&(p=setTimeout(w,t)),f}return t=i(t)||0,r(n)&&(h=!!n.leading,l=(v="maxWait"in n)?u(i(n.maxWait)||0,t):l,y="trailing"in n?!!n.trailing:y),P.cancel=function(){void 0!==p&&clearTimeout(p),d=0,a=_=s=p=void 0},P.flush=function(){return void 0===p?f:x(o())},P}},10163:function(e){var t=Array.isArray;e.exports=t},17709:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},73474:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},21995:function(e,t,n){var r=n(80563),o=n(73474);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},16987:function(e,t,n){var r=n(92373);e.exports=function(){return r.Date.now()}},65812:function(e,t,n){var r=n(91367),o=n(17709),i=n(21995),u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=c.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):u.test(e)?NaN:+e}},17010:function(e,t,n){var r=n(16316);e.exports=function(e){return null==e?"":r(e)}},70660:function(e,t,n){var r=n(17010),o=0;e.exports=function(e){var t=++o;return r(e)+t}},40278:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(92213),o=n.n(r),i=n(68211),u=n.n(i),c=(0,n(84832).Z)("photon"),a={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},s="__domain__.invalid",l="http://".concat(s);function f(e,t){var n;try{n=new URL(e,l)}catch(e){return null}var r,i,f,p,_,d="https:"===n.protocol,h=new URL("https://i0.wp.com");if(_=n.host,/^i[0-2]\.wp\.com$/.test(_))h.pathname=n.pathname,h.hostname=n.hostname;else{if(n.search)return null;var v=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(v=n.pathname.replace("://","//")),n.hostname===s&&(v=n.pathname),h.pathname=v,h.hostname=(r=v,i=o()(r),f=u()(i),p="i"+Math.floor(3*f()),c('determined server "%s" to use with "%s"',p,r),p+".wp.com"),d&&h.searchParams.set("ssl",1)}if(t)for(var y in t)"host"!==y&&"hostname"!==y?"secure"!==y||t[y]?h.searchParams.set(a[y]||y,t[y]):h.protocol="http:":h.hostname=t[y];return c("generated Photon URL: %s",h.href),h.href}},35286:function(e,t,n){"use strict";n.d(t,{wA:function(){return u.wA},HY:function(){return u.HY},Vx:function(){return M},jz:function(){return L},Vf:function(){return u.Vf},ZP:function(){return re},d4:function(){return y},sO:function(){return b},eJ:function(){return h}});var r,o,i,u=n(97465),c=0,a=[],s=u.YM.__b,l=u.YM.__r,f=u.YM.diffed,p=u.YM.__c,_=u.YM.unmount;function d(e,t){u.YM.__h&&u.YM.__h(o,e,c||t),c=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function h(e){return c=1,v(k,e)}function v(e,t,n){var i=d(r++,2);return i.t=e,i.__c||(i.__=[n?n(t):k(void 0,t),function(e){var t=i.t(i.__[0],e);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function y(e,t){var n=d(r++,3);!u.YM.__s&&S(n.__H,t)&&(n.__=e,n.__H=t,o.__H.__h.push(n))}function m(e,t){var n=d(r++,4);!u.YM.__s&&S(n.__H,t)&&(n.__=e,n.__H=t,o.__h.push(n))}function b(e){return c=5,g((function(){return{current:e}}),[])}function g(e,t){var n=d(r++,7);return S(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function w(){a.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(P),e.__H.__h.forEach(O),e.__H.__h=[]}catch(t){e.__H.__h=[],u.YM.__e(t,e.__v)}})),a=[]}u.YM.__b=function(e){o=null,s&&s(e)},u.YM.__r=function(e){l&&l(e),r=0;var t=(o=e.__c).__H;t&&(t.__h.forEach(P),t.__h.forEach(O),t.__h=[])},u.YM.diffed=function(e){f&&f(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==a.push(t)&&i===u.YM.requestAnimationFrame||((i=u.YM.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),x&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);x&&(t=requestAnimationFrame(n))})(w)),o=void 0},u.YM.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||O(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.YM.__e(n,e.__v)}})),p&&p(e,t)},u.YM.unmount=function(e){_&&_(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(P)}catch(e){u.YM.__e(e,t.__v)}};var x="function"==typeof requestAnimationFrame;function P(e){var t=o;"function"==typeof e.__c&&e.__c(),o=t}function O(e){var t=o;e.__c=e.__(),o=t}function S(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function k(e,t){return"function"==typeof t?t(e):t}function C(e,t){for(var n in t)e[n]=t[n];return e}function E(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function M(e){this.props=e}(M.prototype=new u.wA).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(e,t){return E(this.props,e)||E(this.state,t)};var T=u.YM.__b;u.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),T&&T(e)};var j="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,N=function(e,t){return null==e?null:(0,u.bR)((0,u.bR)(e).map(t))},R={map:N,forEach:N,count:function(e){return e?(0,u.bR)(e).length:0},only:function(e){var t=(0,u.bR)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:u.bR},A=u.YM.__e;function D(e){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),(e=C({},e)).__c=null,e.__k=e.__k&&e.__k.map(D)),e}function Y(e){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(Y)),e}function U(){this.__u=0,this.t=null,this.__b=null}function $(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function H(){this.u=null,this.o=null}u.YM.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);A(e,t,n)},(U.prototype=new u.wA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=$(r.__v),i=!1,u=function(){i||(i=!0,n.componentWillUnmount=n.__c,o?o(c):c())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){u(),n.__c&&n.__c()};var c=function(){var e;if(!--r.__u)for(r.__v.__k[0]=Y(r.state.__e),r.setState({__e:r.__b=null});e=r.t.pop();)e.forceUpdate()};!0===t.__h||r.__u++||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(u,u)},U.prototype.componentWillUnmount=function(){this.t=[]},U.prototype.render=function(e,t){this.__b&&(this.__v.__k&&(this.__v.__k[0]=D(this.__b)),this.__b=null);var n=t.__e&&(0,u.az)(u.HY,null,e.fallback);return n&&(n.__h=null),[(0,u.az)(u.HY,null,t.__e?null:e.children),n]};var I=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]3)for(n=[n],i=3;i1&&T(o,t,n),t=S(n,o,o,e.__k,null,o.__e,t),"function"==typeof e.type&&(e.__d=t)))}function j(e,t,n,o,i,u,c,a,s){var l,f,_,d,h,v,b,g,w,x,O,S=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(s=n.__h,a=t.__e=n.__e,t.__h=null,u=[a]),(l=r.__b)&&l(t);try{e:if("function"==typeof S){if(g=t.props,w=(l=S.contextType)&&o[l.__c],x=l?w?w.props.value:l.__:o,n.__c?b=(f=t.__c=n.__c).__=f.__E:("prototype"in S&&S.prototype.render?t.__c=f=new S(g,x):(t.__c=f=new m(g,x),f.constructor=S,f.render=Y),w&&w.sub(f),f.props=g,f.state||(f.state={}),f.context=x,f.__n=o,_=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=S.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,S.getDerivedStateFromProps(g,f.__s))),d=f.props,h=f.state,_)null==S.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==S.getDerivedStateFromProps&&g!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(g,x),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(g,f.__s,x)||t.__v===n.__v){f.props=g,f.state=f.__s,t.__v!==n.__v&&(f.__d=!1),f.__v=t,t.__e=n.__e,t.__k=n.__k,f.__h.length&&c.push(f),T(t,a,e);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(g,f.__s,x),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(d,h,v)}))}f.context=x,f.props=g,f.state=f.__s,(l=r.__r)&&l(t),f.__d=!1,f.__v=t,f.__P=e,l=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(o=p(p({},o),f.getChildContext())),_||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(d,h)),O=null!=l&&l.type==y&&null==l.key?l.props.children:l,P(e,Array.isArray(O)?O:[O],t,n,o,i,u,c,a,s),f.base=t.__e,t.__h=null,f.__h.length&&c.push(f),b&&(f.__E=f.__=null),f.__e=!1}else null==u&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=R(n.__e,t,n,o,i,u,c,s);(l=r.diffed)&&l(t)}catch(e){t.__v=null,(s||null!=u)&&(t.__e=a,t.__h=!!s,u[u.indexOf(a)]=null),r.__e(e,t,n)}return t.__e}function N(e,t){r.__c&&r.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){r.__e(e,t.__v)}}))}function R(e,t,n,r,o,i,u,c){var a,f,p,_,d,h=n.props,v=t.props;if(o="svg"===t.type||o,null!=i)for(a=0;a3)for(n=[n],i=3;i=0||(o[n]=e[n]);return o}var _=n(13266),d=n.n(_),h=n(24546),v=n.n(h),y=n(80364);var m=Object.prototype.hasOwnProperty;function b(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function g(e,t){if(b(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function T(e,t){return e===t}var j,N,R,A,D,Y,U,$,H,I,W,F=(N=(j={}).connectHOC,R=void 0===N?function(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,u=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,c=n.methodName,s=void 0===c?"connectAdvanced":c,l=n.renderCountProp,_=void 0===l?void 0:l,h=n.shouldHandleStateChanges,m=void 0===h||h,b=n.storeKey,g=void 0===b?"store":b,w=n.withRef,x=void 0!==w&&w,P=n.forwardRef,O=void 0!==P&&P,S=n.context,k=void 0===S?a:S,C=p(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);v()(void 0===_,"renderCountProp is removed. render counting is built into the latest React dev tools profiling extension"),v()(!x,"withRef is removed. To access the wrapped instance, use a ref on the connected component");var E="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: . You may also pass a {context : MyContext} option to connect";v()("store"===g,"storeKey has been removed and does not do anything. "+E);var M=k;return function(t){var n=t.displayName||t.name||"Component",r=u(n),c=f({},C,{getDisplayName:u,methodName:s,renderCountProp:_,shouldHandleStateChanges:m,storeKey:g,displayName:r,wrappedComponentName:n,WrappedComponent:t}),a=C.pure,l=i.wA;a&&(l=i.Vx);var p=function(n){function u(t){var r,o,u,c,s,l,p,_,d,h,y;return r=n.call(this,t)||this,v()(O?!t.wrapperProps[g]:!t[g],"Passing redux store in props has been removed and does not do anything. "+E),r.selectDerivedProps=function(t,n,r,i){if(a&&o===n&&u===t)return c;r===s&&l===i||(s=r,l=i,p=e(r.dispatch,i)),o=n,u=t;var f=p(t,n);return c=f},r.selectChildElement=function(e,t,n){return t===_&&n===d&&y===e||(_=t,d=n,y=e,h=i.ZP.createElement(e,f({},t,{ref:n}))),h},r.indirectRenderWrappedComponent=r.indirectRenderWrappedComponent.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r)),r}o(u,n);var s=u.prototype;return s.indirectRenderWrappedComponent=function(e){return this.renderWrappedComponent(e)},s.renderWrappedComponent=function(e){v()(e,'Could not find "store" in the context of "'+r+'". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to '+r+" in connect options.");var n,o=e.storeState,i=e.store,u=this.props;O&&(u=this.props.wrapperProps,n=this.props.forwardedRef);var a=this.selectDerivedProps(o,u,i,c);return this.selectChildElement(t,a,n)},s.render=function(){var e=this.props.context&&this.props.context.Consumer&&(0,y.isContextConsumer)(i.ZP.createElement(this.props.context.Consumer,null))?this.props.context:M;return i.ZP.createElement(e.Consumer,null,this.indirectRenderWrappedComponent)},u}(l);if(p.WrappedComponent=t,p.displayName=r,O){var h=i.ZP.forwardRef((function(e,t){return i.ZP.createElement(p,{wrapperProps:e,forwardedRef:t})}));return h.displayName=r,h.WrappedComponent=t,d()(h,t)}return d()(p,t)}}:N,D=void 0===(A=j.mapStateToPropsFactories)?[function(e){return"function"==typeof e?O(e):void 0},function(e){return e?void 0:x((function(){return{}}))}]:A,U=void 0===(Y=j.mapDispatchToPropsFactories)?[function(e){return"function"==typeof e?O(e):void 0},function(e){return e?void 0:x((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?x((function(t){return(0,w.DE)(e,t)})):void 0}]:Y,H=void 0===($=j.mergePropsFactories)?k:$,W=void 0===(I=j.selectorFactory)?function(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=p(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),u=n(e,i),c=r(e,i),a=o(e,i);return(i.pure?E:C)(u,c,a,e,i)}:I,function(e,t,n,r){void 0===r&&(r={});var o=r,i=o.pure,u=void 0===i||i,c=o.areStatesEqual,a=void 0===c?T:c,s=o.areOwnPropsEqual,l=void 0===s?g:s,_=o.areStatePropsEqual,d=void 0===_?g:_,h=o.areMergedPropsEqual,v=void 0===h?g:h,y=p(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),m=M(e,D,"mapStateToProps"),b=M(t,U,"mapDispatchToProps"),w=M(n,H,"mergeProps");return R(W,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:m,initMapDispatchToProps:b,initMergeProps:w,pure:u,areStatesEqual:a,areOwnPropsEqual:l,areStatePropsEqual:d,areMergedPropsEqual:v},y))})},74978:function(e,t,n){"use strict";n.d(t,{md:function(){return v},DE:function(){return f},UY:function(){return s},MT:function(){return c}});var r=n(9276),o=function(){return Math.random().toString(36).substring(7).split("").join(".")},i={INIT:"@@redux/INIT"+o(),REPLACE:"@@redux/REPLACE"+o(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+o()}};function u(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function c(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(c)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var a=e,s=t,l=[],f=l,p=!1;function _(){f===l&&(f=l.slice())}function d(){if(p)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function h(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(p)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return _(),f.push(e),function(){if(t){if(p)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,_();var n=f.indexOf(e);f.splice(n,1),l=null}}}function v(e){if(!u(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(p)throw new Error("Reducers may not dispatch actions.");try{p=!0,s=a(s,e)}finally{p=!1}for(var t=l=f,n=0;n=u;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=a},f(Math.random(),n)},47078:function(e){var t=/<\/?([a-z][a-z0-9]*)\b[^>]*>?/gi;e.exports=function(e){return(e=e||"").replace(t,"").trim()}},9276:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}}),e=n.hmd(e);var r=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:e)},5857:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});class r{constructor(e=0,t=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=e,this.size=0,this.ttl=t}has(e){return e in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(e){if(this.has(e)){const t=this.items[e];delete this.items[e],this.size--,null!==t.prev&&(t.prev.next=t.next),null!==t.next&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),this.last===t&&(this.last=t.prev)}return this}evict(){const e=this.first;return delete this.items[e.key],this.first=e.next,this.first.prev=null,this.size--,this}get(e){let t;if(this.has(e)){const n=this.items[e];this.ttl>0&&n.expiry<=(new Date).getTime()?this.delete(e):(t=n.value,this.set(e,t,!0))}return t}keys(){return Object.keys(this.items)}set(e,t,n=!1){let r;if(n||this.has(e)){if(r=this.items[e],r.value=t,!1===n&&(r.expiry=this.ttl>0?(new Date).getTime()+this.ttl:this.ttl),this.last!==r){const e=this.last,t=r.next,n=r.prev;this.first===r&&(this.first=r.next),r.next=null,r.prev=this.last,e.next=r,null!==n&&(n.next=t),null!==t&&(t.prev=n)}}else this.max>0&&this.size===this.max&&this.evict(),r=this.items[e]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:t},1==++this.size?this.first=r:this.last.next=r;return this.last=r,this}}function o(e=1e3,t=0){if(isNaN(e)||e<0)throw new TypeError("Invalid max value");if(isNaN(t)||t<0)throw new TypeError("Invalid ttl value");return new r(e,t)}}}]);