1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[664],{47018:function(e,t,r){function _typeof(e){return(_typeof="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(r(18381));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function ownKeys(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 _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _defineProperties(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 _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o="64px",i={},a=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw 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&&_setPrototypeOf(e,t)}(Preview,e);var t,r,a,c=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r,n=_getPrototypeOf(Preview);if(t){var o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return(e=r)&&("object"===_typeof(e)||"function"==typeof e)?e:_assertThisInitialized(this)});function Preview(){var e;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,Preview);for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return _defineProperty(_assertThisInitialized(e=c.call.apply(c,[this].concat(r))),"mounted",!1),_defineProperty(_assertThisInitialized(e),"state",{image:null}),_defineProperty(_assertThisInitialized(e),"handleKeyPress",function(t){("Enter"===t.key||" "===t.key)&&e.props.onClick()}),e}return r=[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.url,n=t.light;(e.url!==r||e.light!==n)&&this.fetchImage(this.props)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"fetchImage",value:function(e){var t=this,r=e.url,o=e.light,a=e.oEmbedUrl;if(!n.default.isValidElement(o)){if("string"==typeof o){this.setState({image:o});return}if(i[r]){this.setState({image:i[r]});return}return this.setState({image:null}),window.fetch(a.replace("{url}",r)).then(function(e){return e.json()}).then(function(e){if(e.thumbnail_url&&t.mounted){var n=e.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");t.setState({image:n}),i[r]=n}})}}},{key:"render",value:function(){var e=this.props,t=e.light,r=e.onClick,i=e.playIcon,a=e.previewTabIndex,c=this.state.image,u=n.default.isValidElement(t),l={display:"flex",alignItems:"center",justifyContent:"center"},f={preview:_objectSpread({width:"100%",height:"100%",backgroundImage:c&&!u?"url(".concat(c,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},l),shadow:_objectSpread({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:o,width:o,height:o,position:u?"absolute":void 0},l),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},s=n.default.createElement("div",{style:f.shadow,className:"react-player__shadow"},n.default.createElement("div",{style:f.playIcon,className:"react-player__play-icon"}));return n.default.createElement("div",{style:f.preview,className:"react-player__preview",onClick:r,tabIndex:a,onKeyPress:this.handleKeyPress},u?t:null,i||s)}}],_defineProperties(Preview.prototype,r),a&&_defineProperties(Preview,a),Preview}(n.Component);t.default=a}}]); 2//# sourceMappingURL=reactPlayerPreview.840a0ceb0c9323b6.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.