PageSourceSearch

https://s.flipboard.com/webu/app-views-embed-tool.f621f868d8b4531bf95d.bundle.js

js flipboard.com collected 2026-10-01 08:40:42 UTC 6,053 bytes, 2 lines download raw bytes

1"use strict";(("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__=("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__||[]).push([[4751],{22061:function(e,t,r){r.r(t);r(96928),r(61229),r(34115),r(634),r(58188),r(20796),r(15735),r(28673),r(6886),r(18178),r(77950),r(85940),r(43450),r(67890);var n,i=r(2784),o=r(45697),a=r.n(o),l=r(45828),s=r(11826),c=r(93039),u=r(99445),d=r(23414),f=r(66410),h=r(37757),p=r(52322);function m(e){return m="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},m(e)}function _(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 b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function y(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=g(e);if(t){var i=g(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}function v(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?x(e):t}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function j(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=(j(n={},"".concat(d.Z.PORTRAIT),{width:300,height:600}),j(n,"".concat(d.Z.THUMBNAIL),{width:250,height:300}),j(n,"".concat(d.Z.BANNER),{width:970,height:250}),n),w=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&&b(e,t)}(o,e);var t,r,n,i=y(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).state={url:"",urlDirty:!1,layout:d.Z.PORTRAIT,iframeSrc:""},t.handleUrlChange=t.handleUrlChange.bind(x(t)),t.handleLayoutChange=t.handleLayoutChange.bind(x(t)),t.isUrlValid=t.isUrlValid.bind(x(t)),t.iframeElement=t.iframe.bind(x(t)),t.snippet=t.snippet.bind(x(t)),t}return t=o,(r=[{key:"iframeSrc",value:function(e,t){return this.isUrlValid()&&"".concat((0,u.OI)(e),"/widget?layout=").concat(t)}},{key:"iframe",value:function(){if(!this.isUrlValid())return null;var e=this.state,t=e.url,r=e.layout;return(0,p.jsx)("iframe",{src:this.iframeSrc(t,r),frameBorder:"0",width:O[r].width,height:O[r].height})}},{key:"snippet",value:function(){if(!this.isUrlValid())return"";var e=this.state,t=e.url,r=e.layout;return'<iframe\n            src="'.concat(this.iframeSrc(t,r),'"\n            frameBorder="0"\n            width="').concat(O[r].width,'"\n            height="').concat(O[r].height,'"\n          ></iframe>')}},{key:"handleUrlChange",value:function(e){var t=e.target.value,r=this.iframeSrc(t,this.state.layout);this.setState({urlDirty:!0,url:t,iframeSrc:r})}},{key:"handleLayoutChange",value:function(e){var t=e.target.value;this.setState({layout:t,iframeSrc:this.iframeSrc(this.state.url,t)})}},{key:"isUrlValid",value:function(){var e=this.state.url;if(0===!e.indexOf(l.Z.FLIPBOARD_TOP_DOMAIN_URL))return!1;var t=e.replace(l.Z.FLIPBOARD_TOP_DOMAIN_URL,"");return(0,s.ER)(t)}},{key:"render",value:function(){var e=this,t=this.props.t;return(0,p.jsxs)("div",{className:"embed-tool",children:[(0,p.jsx)("div",{className:"embed-tool__header ui-text--title",children:t("embed_tool_title")}),(0,p.jsxs)("div",{className:"embed-tool__form",children:[(0,p.jsxs)("div",{className:"embed-tool__step embed-tool__step--form",children:[(0,p.jsx)("p",{className:"ui-text--body embed-tool__step-label",children:t("embed_tool_url_input_label")}),(0,p.jsx)("form",{children:(0,p.jsx)("section",{className:"layout-section",children:(0,p.jsxs)("fieldset",{children:[(0,p.jsx)("textarea",{name:"url",className:"textarea--medium",placeholder:"Ex: https://flipboard.com/@flipboard/-magswelove-9dnecbitz",value:this.state.url,onChange:this.handleUrlChange}),this.state.urlDirty&&!this.isUrlValid()&&(0,p.jsx)("p",{className:"embed-tool__form-error ui-text--supporting-emphasis",children:"".concat(t("embed_tool_url_input_error")," Ex:\n                      https://flipboard.com/@flipboard/-magswelove-9dnecbitz")}),(0,p.jsx)("ul",{children:Object.values(d.Z).map((function(t){return(0,p.jsx)("li",{className:"embed-tool__layout-option",children:(0,p.jsx)(f.Z,{name:"layout",label:(0,c.Z)(t),value:t,checked:e.state.layout===t,onChange:e.handleLayoutChange})},t)}))})]})})})]}),(0,p.jsxs)("div",{className:"embed-tool__step embed-tool__step--snippet",children:[(0,p.jsx)("p",{className:"ui-text--body embed-tool__step-label",children:t("embed_tool_snippet_label")}),(0,p.jsx)("div",{className:"embed-tool__snippet textarea--medium",children:"".concat(this.snippet())})]}),(0,p.jsxs)("div",{className:"embed-tool__step embed-tool__step--preview",children:[(0,p.jsx)("p",{className:"ui-text--body embed-tool__step-label embed-tool__preview-header",children:t("embed_tool_preview_label")}),(0,p.jsx)("p",{className:"ui-text--body embed-tool__step-label embed-tool__preview-header",children:t("embed_tool_preview_privacy_message_warning")}),(0,p.jsx)("div",{className:"embed-tool__preview-wrapper",children:this.iframe()})]})]})]})}}])&&_(t.prototype,r),n&&_(t,n),o}(i.Component);w.propTypes={t:a().func.isRequired},t.default=(0,h.Z)(w)},23414:function(e,t){t.Z={PORTRAIT:"portrait",THUMBNAIL:"thumbnail",BANNER:"banner"}}}]);
2//# sourceMappingURL=app-views-embed-tool.f621f868d8b4531bf95d.bundle.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.