not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

228 lines
12 KiB

  1. var GUI =
  2. (window["webpackJsonpGUI"] = window["webpackJsonpGUI"] || []).push([["gui"],{
  3. /***/ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./src/playground/index.css":
  4. /*!*****************************************************************************************************************!*\
  5. !*** ./node_modules/css-loader??ref--5-1!./node_modules/postcss-loader/src??postcss!./src/playground/index.css ***!
  6. \*****************************************************************************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. exports = module.exports = __webpack_require__(/*! ../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
  10. // imports
  11. // module
  12. exports.push([module.i, "html,\nbody,\n.index_app_3Qs6X {\n /* probably unecessary, transitional until layout is refactored */\n width: 100%; \n height: 100%;\n margin: 0;\n\n /* Setting min height/width makes the UI scroll below those sizes */\n min-width: 1024px;\n min-height: 640px; /* Min height to fit sprite/backdrop button */\n}\n\n/* @todo: move globally? Safe / side FX, for blocks particularly? */\n\n* { -webkit-box-sizing: border-box; box-sizing: border-box; }\n", ""]);
  13. // exports
  14. exports.locals = {
  15. "app": "index_app_3Qs6X"
  16. };
  17. /***/ }),
  18. /***/ "./src/playground/index.css":
  19. /*!**********************************!*\
  20. !*** ./src/playground/index.css ***!
  21. \**********************************/
  22. /*! no static exports found */
  23. /***/ (function(module, exports, __webpack_require__) {
  24. var content = __webpack_require__(/*! !../../node_modules/css-loader??ref--5-1!../../node_modules/postcss-loader/src??postcss!./index.css */ "./node_modules/css-loader/index.js?!./node_modules/postcss-loader/src/index.js?!./src/playground/index.css");
  25. if(typeof content === 'string') content = [[module.i, content, '']];
  26. var transform;
  27. var insertInto;
  28. var options = {"hmr":true}
  29. options.transform = transform
  30. options.insertInto = undefined;
  31. var update = __webpack_require__(/*! ../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
  32. if(content.locals) module.exports = content.locals;
  33. if(false) {}
  34. /***/ }),
  35. /***/ "./src/playground/index.jsx":
  36. /*!**********************************!*\
  37. !*** ./src/playground/index.jsx ***!
  38. \**********************************/
  39. /*! no exports provided */
  40. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  41. "use strict";
  42. __webpack_require__.r(__webpack_exports__);
  43. /* harmony import */ var es6_object_assign_auto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! es6-object-assign/auto */ "./node_modules/es6-object-assign/auto.js");
  44. /* harmony import */ var es6_object_assign_auto__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(es6_object_assign_auto__WEBPACK_IMPORTED_MODULE_0__);
  45. /* harmony import */ var core_js_fn_array_includes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/fn/array/includes */ "./node_modules/core-js/fn/array/includes.js");
  46. /* harmony import */ var core_js_fn_array_includes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_fn_array_includes__WEBPACK_IMPORTED_MODULE_1__);
  47. /* harmony import */ var core_js_fn_promise_finally__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/fn/promise/finally */ "./node_modules/core-js/fn/promise/finally.js");
  48. /* harmony import */ var core_js_fn_promise_finally__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_fn_promise_finally__WEBPACK_IMPORTED_MODULE_2__);
  49. /* harmony import */ var intl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! intl */ "./node_modules/intl/index.js");
  50. /* harmony import */ var intl__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(intl__WEBPACK_IMPORTED_MODULE_3__);
  51. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  52. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
  53. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
  54. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_5__);
  55. /* harmony import */ var _lib_analytics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/analytics */ "./src/lib/analytics.js");
  56. /* harmony import */ var _lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lib/app-state-hoc.jsx */ "./src/lib/app-state-hoc.jsx");
  57. /* harmony import */ var _components_browser_modal_browser_modal_jsx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/browser-modal/browser-modal.jsx */ "./src/components/browser-modal/browser-modal.jsx");
  58. /* harmony import */ var _lib_supported_browser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../lib/supported-browser */ "./src/lib/supported-browser.js");
  59. /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./index.css */ "./src/playground/index.css");
  60. /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_10__);
  61. // Polyfills
  62. // For Safari 9
  63. // Register "base" page view
  64. _lib_analytics__WEBPACK_IMPORTED_MODULE_6__["default"].pageview('/');
  65. var appTarget = document.createElement('div');
  66. appTarget.className = _index_css__WEBPACK_IMPORTED_MODULE_10___default.a.app;
  67. document.body.appendChild(appTarget);
  68. if (Object(_lib_supported_browser__WEBPACK_IMPORTED_MODULE_9__["default"])()) {
  69. // require needed here to avoid importing unsupported browser-crashing code
  70. // at the top level
  71. __webpack_require__(/*! ./render-gui.jsx */ "./src/playground/render-gui.jsx").default(appTarget);
  72. } else {
  73. _components_browser_modal_browser_modal_jsx__WEBPACK_IMPORTED_MODULE_8__["default"].setAppElement(appTarget);
  74. var WrappedBrowserModalComponent = Object(_lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_7__["default"])(_components_browser_modal_browser_modal_jsx__WEBPACK_IMPORTED_MODULE_8__["default"], true
  75. /* localesOnly */
  76. );
  77. var handleBack = function handleBack() {}; // eslint-disable-next-line react/jsx-no-bind
  78. react_dom__WEBPACK_IMPORTED_MODULE_5___default.a.render(react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(WrappedBrowserModalComponent, {
  79. onBack: handleBack
  80. }), appTarget);
  81. }
  82. /***/ }),
  83. /***/ "./src/playground/render-gui.jsx":
  84. /*!***************************************!*\
  85. !*** ./src/playground/render-gui.jsx ***!
  86. \***************************************/
  87. /*! exports provided: default */
  88. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  89. "use strict";
  90. __webpack_require__.r(__webpack_exports__);
  91. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
  92. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  93. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
  94. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
  95. /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/index.js");
  96. /* harmony import */ var _lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lib/app-state-hoc.jsx */ "./src/lib/app-state-hoc.jsx");
  97. /* harmony import */ var _containers_gui_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../containers/gui.jsx */ "./src/containers/gui.jsx");
  98. /* harmony import */ var _lib_hash_parser_hoc_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../lib/hash-parser-hoc.jsx */ "./src/lib/hash-parser-hoc.jsx");
  99. /* harmony import */ var _lib_titled_hoc_jsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/titled-hoc.jsx */ "./src/lib/titled-hoc.jsx");
  100. /* harmony import */ var _lib_log_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../lib/log.js */ "./src/lib/log.js");
  101. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  102. var onClickLogo = function onClickLogo() {
  103. window.location = 'https://scratch.mit.edu';
  104. };
  105. var handleTelemetryModalCancel = function handleTelemetryModalCancel() {
  106. Object(_lib_log_js__WEBPACK_IMPORTED_MODULE_7__["default"])('User canceled telemetry modal');
  107. };
  108. var handleTelemetryModalOptIn = function handleTelemetryModalOptIn() {
  109. Object(_lib_log_js__WEBPACK_IMPORTED_MODULE_7__["default"])('User opted into telemetry');
  110. };
  111. var handleTelemetryModalOptOut = function handleTelemetryModalOptOut() {
  112. Object(_lib_log_js__WEBPACK_IMPORTED_MODULE_7__["default"])('User opted out of telemetry');
  113. };
  114. /*
  115. * Render the GUI playground. This is a separate function because importing anything
  116. * that instantiates the VM causes unsupported browsers to crash
  117. * {object} appTarget - the DOM element to render to
  118. */
  119. /* harmony default export */ __webpack_exports__["default"] = (function (appTarget) {
  120. _containers_gui_jsx__WEBPACK_IMPORTED_MODULE_4__["default"].setAppElement(appTarget); // note that redux's 'compose' function is just being used as a general utility to make
  121. // the hierarchy of HOC constructor calls clearer here; it has nothing to do with redux's
  122. // ability to compose reducers.
  123. var WrappedGui = Object(redux__WEBPACK_IMPORTED_MODULE_2__["compose"])(_lib_app_state_hoc_jsx__WEBPACK_IMPORTED_MODULE_3__["default"], _lib_hash_parser_hoc_jsx__WEBPACK_IMPORTED_MODULE_5__["default"], _lib_titled_hoc_jsx__WEBPACK_IMPORTED_MODULE_6__["default"])(_containers_gui_jsx__WEBPACK_IMPORTED_MODULE_4__["default"]); // TODO a hack for testing the backpack, allow backpack host to be set by url param
  124. var backpackHostMatches = window.location.href.match(/[?&]backpack_host=([^&]*)&?/);
  125. var backpackHost = backpackHostMatches ? backpackHostMatches[1] : null;
  126. var scratchDesktopMatches = window.location.href.match(/[?&]isScratchDesktop=([^&]+)/);
  127. var simulateScratchDesktop;
  128. if (scratchDesktopMatches) {
  129. try {
  130. // parse 'true' into `true`, 'false' into `false`, etc.
  131. simulateScratchDesktop = JSON.parse(scratchDesktopMatches[1]);
  132. } catch (_unused) {
  133. // it's not JSON so just use the string
  134. // note that a typo like "falsy" will be treated as true
  135. simulateScratchDesktop = scratchDesktopMatches[1];
  136. }
  137. }
  138. if (false) {}
  139. react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render( // important: this is checking whether `simulateScratchDesktop` is truthy, not just defined!
  140. simulateScratchDesktop ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(WrappedGui, {
  141. isScratchDesktop: true,
  142. showTelemetryModal: true,
  143. canSave: false,
  144. onTelemetryModalCancel: handleTelemetryModalCancel,
  145. onTelemetryModalOptIn: handleTelemetryModalOptIn,
  146. onTelemetryModalOptOut: handleTelemetryModalOptOut
  147. }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(WrappedGui, {
  148. backpackVisible: true,
  149. showComingSoon: true,
  150. backpackHost: backpackHost,
  151. canSave: false,
  152. onClickLogo: onClickLogo
  153. }), appTarget);
  154. });
  155. /***/ }),
  156. /***/ 1:
  157. /*!*******************************************!*\
  158. !*** ./locale-data/complete.js (ignored) ***!
  159. \*******************************************/
  160. /*! no static exports found */
  161. /***/ (function(module, exports) {
  162. /* (ignored) */
  163. /***/ })
  164. },[["./src/playground/index.jsx","lib.min"]]]);
  165. //# sourceMappingURL=gui.js.map