mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2024-12-21 23:53:55 +01:00
2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
/*! For license information please see autocomplete.js.LICENSE.txt */
|
|
(self.findifyJsonp=self.findifyJsonp||[]).push([[413],{aaqy:function(e,t,r){"use strict";var n=r("tZxb");function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,u){if(u!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},T9WB:function(e,t,r){e.exports=r("aaqy")()},tZxb:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},jKGO:function(e,t,r){"use strict";function n(e){return(n="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)}var o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)};function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=r("Jmof"),l=r("T9WB"),f=[],s=[];function p(e){var t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then((function(e){return r.loading=!1,r.loaded=e,e})).catch((function(e){throw r.loading=!1,r.error=e,e})),r}function d(e){var t={loading:!1,loaded:{},error:null},r=[];try{Object.keys(e).forEach((function(n){var o=p(e[n]);o.loading?t.loading=!0:(t.loaded[n]=o.loaded,t.error=o.error),r.push(o.promise),o.promise.then((function(e){t.loaded[n]=e})).catch((function(e){t.error=e}))}))}catch(e){t.error=e}return t.promise=Promise.all(r).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function y(e,t){return c.createElement((r=e)&&r.__esModule?r.default:r,t);var r}function m(e,t){var n,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var d=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:y,webpack:null,modules:null},t),m=null;function b(){return m||(m=e(d.loader)),m.promise}return f.push(b),"function"==typeof d.webpack&&s.push((function(){if(e=d.webpack,"object"===o(r.m)&&e().every((function(e){return void 0!==e&&void 0!==r.m[e]})))return b();var e})),p=n=function(t){function r(n){i(this,r);var o=u(this,t.call(this,n));return o.retry=function(){o.setState({error:null,loading:!0,timedOut:!1}),m=e(d.loader),o._loadModule()},b(),o.state={error:m.error,pastDelay:!1,timedOut:!1,loading:m.loading,loaded:m.loaded},o}return a(r,t),r.preload=function(){return b()},r.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},r.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(d.modules)&&d.modules.forEach((function(t){e.context.loadable.report(t)})),m.loading){"number"==typeof d.delay&&(0===d.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){e.setState({pastDelay:!0})}),d.delay)),"number"==typeof d.timeout&&(this._timeout=setTimeout((function(){e.setState({timedOut:!0})}),d.timeout));var t=function(){e._mounted&&(e.setState({error:m.error,loaded:m.loaded,loading:m.loading}),e._clearTimeouts())};m.promise.then((function(){t()})).catch((function(e){t()}))}},r.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},r.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},r.prototype.render=function(){return this.state.loading||this.state.error?c.createElement(d.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?d.render(this.state.loaded,this.props):null},r}(c.Component),n.contextTypes={loadable:l.shape({report:l.func.isRequired})},p}function b(e){return m(p,e)}b.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(d,e)};var h=function(e){function t(){return i(this,t),u(this,e.apply(this,arguments))}return a(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return c.Children.only(this.props.children)},t}(c.Component);function v(e){for(var t=[];e.length;){var r=e.pop();t.push(r())}return Promise.all(t).then((function(){if(e.length)return v(e)}))}h.propTypes={report:l.func.isRequired},h.childContextTypes={loadable:l.shape({report:l.func.isRequired}).isRequired},b.Capture=h,b.preloadAll=function(){return new Promise((function(e,t){v(f).then(e,t)}))},b.preloadReady=function(){return new Promise((function(e,t){v(s).then(e,e)}))},e.exports=b},L4m3:function(e,t,r){"use strict";r("bhYp");var n=r("Jmof"),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,i={},l=null,f=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(f=t.ref),t)a.call(t,n)&&!c.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:f,props:i,_owner:u.current}}t.jsx=l,t.jsxs=l},APSE:function(e,t,r){"use strict";e.exports=r("L4m3")},"jd+S":function(e,t,r){"use strict";t.default={views:{search:function(){return Promise.all([r.e(61),r.e(701),r.e(464)]).then(r.bind(r,"2g2b"))},autocomplete:function(){return r.e(413).then(r.bind(r,"Ne2L"))},recommendation:function(){return Promise.all([r.e(61),r.e(701),r.e(864)]).then(r.bind(r,"0Y/9"))},zeroResults:function(){return Promise.all([r.e(61),r.e(701),r.e(464)]).then(r.bind(r,"d67Z"))},custom:function(){return r.e(745).then(r.bind(r,"oJDh"))},content:function(){return Promise.all([r.e(61),r.e(701),r.e(414)]).then(r.bind(r,"8bt2"))},tabs:function(){return r.e(844).then(r.bind(r,"TDmD"))}},autocomplete:{sidebar:function(){return Promise.all([r.e(487),r.e(61),r.e(701),r.e(752)]).then(r.bind(r,"cyJn"))},dropdown:function(){return Promise.all([r.e(61),r.e(701),r.e(955)]).then(r.bind(r,"+MKu"))},fullscreenWithInput:function(){return Promise.all([r.e(61),r.e(701),r.e(106)]).then(r.bind(r,"wRha"))}},components:{virtualizedList:function(){return Promise.all([r.e(855),r.e(756)]).then(r.bind(r,"nGW9"))},drawer:function(){return Promise.all([r.e(487),r.e(12)]).then(r.bind(r,"94tO"))},dropdown:function(){return Promise.all([r.e(750),r.e(61),r.e(978)]).then(r.bind(r,"0kbf"))},swiper:function(){return Promise.all([r.e(250),r.e(61),r.e(285)]).then(r.bind(r,"1y4O"))},swiperRaw:function(){return Promise.all([r.e(250),r.e(519)]).then(r.bind(r,"PDvd"))},rangeSlider:function(){return r.e(922).then(r.bind(r,"nd5R"))}}}},Evfj:function(e,t,r){"use strict";r.d(t,{portal:function(){return b}});var n=r("Jmof"),o=r("wLXD");function i(e){return(i="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 u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d(e);if(t){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=function(e){!function(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&&l(e,t)}(a,e);var t,r,i,u=f(a);function a(e){var t,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),y(p(t=u.call(this,e)),"element",void 0),t.element=((r=document.createElement("div")).className="findify-portal",document.body.appendChild(r),r),t}return t=a,(r=[{key:"componentDidMount",value:function(){document.body.appendChild(this.element)}},{key:"componentWillUnmount",value:function(){document.body.removeChild(this.element)}},{key:"render",value:function(){return(0,o.createPortal)((0,n.createElement)(this.props.children),this.element)}}])&&c(t.prototype,r),i&&c(t,i),a}(n.Component);y(m,"displayName","BodyRender");var b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.createElement)(m,a({children:e},t))}},"1jHD":function(e,t,r){"use strict";var n=r("Jmof");function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var c={};t.default=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var u=t,a=(0,n.useRef)(u.sort().reverse());a.current.forEach((function(e){c[e]||(c[e]=window.matchMedia("(min-width: ".concat(e,"px)")))}));var l=function(){var e=a.current.find((function(e){return c[e].matches})),t=a.current.map((function(t){return e===t}));return[!e].concat(i(t.reverse()))},f=(0,n.useState)(l),s=o(f,2),p=s[0],d=s[1];return(0,n.useEffect)((function(){var e=function(){return d(l)};return a.current.forEach((function(t){return c[t].addListener(e)})),function(){return a.current.forEach((function(t){return c[t].removeListener(e)}))}}),[]),p}},Ne2L:function(e,t,r){"use strict";r.r(t);var n=r("Jmof"),o=r("aZci"),i=r("Evfj"),u=r("jKGO"),a=r.n(u),c=r("1jHD"),l=r("Ymml"),f=r("APSE");function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=function(e,t){return("sidebar"===e?i.portal:n.createElement)(function(e,t){return function(){var r=(0,n.useMemo)((function(){return a()({loader:l.LayoutTypes[e],loading:function(){return null}})}),[]);return(0,f.jsx)("div",{"data-findify-autocomplete-wrapper":"true",children:(0,f.jsx)(r,m({},t))})}}(e,t))};t.default=function(e){var t=e.isTrendingSearches,r=d(e,["isTrendingSearches"]),n=(0,o.useConfig)().config,i=s((0,c.default)([n.get("mobileBreakpoint")]),2),u=i[0],a=i[1]?"desktop":"mobile",l=n.getIn([a,"template"]),f="fullscreen"===l;return h(f?"dropdown":l,m(m({},r),{},{config:n.merge(n.get(a)),isMobile:u,isFullScreen:f,isTrendingSearches:t}))}},Ymml:function(e,t,r){"use strict";r.d(t,{LayoutTypes:function(){return o}});var n=r("jd+S"),o={sidebar:n.default.autocomplete.sidebar,dropdown:n.default.autocomplete.dropdown,"fullscreen-with-input":n.default.autocomplete.fullscreenWithInput}}}]); |