From 2bb8ee852d733a88ec15d7b43c6ece2c91390612 Mon Sep 17 00:00:00 2001 From: Kushagra Gour Date: Wed, 23 Feb 2022 15:00:06 +0530 Subject: [PATCH] bump to deprecation notice --- app/script.js | 2 +- app/service-worker.js | 2 +- app/vendor.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/script.js b/app/script.js index b0019f3..f03999e 100644 --- a/app/script.js +++ b/app/script.js @@ -77,4 +77,4 @@ if ( }); } -webpackJsonp([0],{"+ZAi":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}t.__esModule=!0,t.default=void 0;var r=o("KM04"),l=o("inAt"),d=n(l),p=o("CIHI"),c=n(p),h=(0,r.h)("h1",null,"Atomic CSS Settings"),u=(0,r.h)("h3",null,"Configure Atomizer settings."," ",(0,r.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more")," ","about available settings."),m=function(e){function t(){return s(this,t),a(this,e.apply(this,arguments))}return i(t,e),t.prototype.componentDidUpdate=function(){var e=this;this.props.show&&setTimeout(function(){e.props.settings&&e.cm.setValue(e.props.settings.acssConfig),e.cm.refresh(),e.cm.focus()},500)},t.prototype.render=function(){var e=this;return(0,r.h)(d.default,{show:this.props.show,closeHandler:this.props.closeHandler},h,u,(0,r.h)("div",{style:"height: calc(100vh - 350px);"},(0,r.h)(c.default,{options:{mode:"application/ld+json",theme:this.props.editorTheme},onCreation:function(t){return e.cm=t},onBlur:function(t){return e.props.onChange(t.getValue())}})),(0,r.h)("div",{class:"flex flex-h-end"},(0,r.h)("button",{class:"btn btn--primary",onClick:this.props.closeHandler},"Apply and Close")))},t}(r.Component);t.default=m},0:function(){},"03MQ":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.CreateNewModal=function(e){var t=e.show,o=e.closeHandler,n=e.onBlankTemplateSelect,a=e.onTemplateSelect;return(0,s.h)(i.default,{show:t,closeHandler:o,smll:!0},(0,s.h)("div",{class:"tac"},(0,s.h)("button",{className:"btn",onClick:n},"Start a blank creation")),p,"Or choose from a template:",(0,s.h)("div",{class:"saved-items-pane__container"},d.default.map(function(e){return(0,s.h)(r.ItemTile,{inline:!0,item:e,focusable:!0,onClick:a.bind(null,e)})})))};var s=o("KM04"),a=o("inAt"),i=n(a),r=o("iGzD"),l=o("g3Nw"),d=n(l),p=(0,s.h)("hr",null)},"0job":function(e,t,o){"use strict";t.__esModule=!0,t.Icons=function(){return(0,n.h)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:{display:"none"}},s,a,i,r,l,d,p,c,h,u,m,f,(0,n.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"},g,b,y,v,C,k,S,(0,n.h)("symbol",{id:"loader-icon",viewBox:"0 0 44 44"},w)))};var n=o("KM04"),s=(0,n.h)("symbol",{id:"logo",viewBox:"-145 -2 372 175"},(0,n.h)("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",transform:"translate(-145.000000, -1.000000)"},(0,n.h)("polygon",{id:"Path-1",fill:"#FF4600",points:"31 0 232 0 132 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF6C00",points:"0 0 201 0 101 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF6C00",transform:"translate(271.500000, 86.500000) scale(1, -1) translate(-271.500000, -86.500000) ",points:"171 0 372 0 272 173.310547"}),(0,n.h)("polygon",{id:"Path-1",fill:"#FF4600",transform:"translate(241.500000, 86.500000) scale(1, -1) translate(-241.500000, -86.500000) ",points:"141 0 342 0 242 173.310547"}))),a=(0,n.h)("symbol",{id:"bug-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M14,12H10V10H14M14,16H10V14H14M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8Z"})),i=(0,n.h)("symbol",{id:"google-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M21.35,11.1H12.18V13.83H18.69C18.36,17.64 15.19,19.27 12.19,19.27C8.36,19.27 5,16.25 5,12C5,7.9 8.2,4.73 12.2,4.73C15.29,4.73 17.1,6.7 17.1,6.7L19,4.72C19,4.72 16.56,2 12.1,2C6.42,2 2.03,6.8 2.03,12C2.03,17.05 6.16,22 12.25,22C17.6,22 21.5,18.33 21.5,12.91C21.5,11.76 21.35,11.1 21.35,11.1V11.1Z"})),r=(0,n.h)("symbol",{id:"fb-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M17,2V2H17V6H15C14.31,6 14,6.81 14,7.5V10H14L17,10V14H14V22H10V14H7V10H10V6A4,4 0 0,1 14,2H17Z"})),l=(0,n.h)("symbol",{id:"github-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"})),d=(0,n.h)("symbol",{id:"settings-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"})),p=(0,n.h)("symbol",{id:"twitter-icon",viewBox:"0 0 16 16"},(0,n.h)("path",{d:"M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809 c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"})),c=(0,n.h)("symbol",{id:"heart-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"})),h=(0,n.h)("symbol",{id:"play-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M8,5.14V19.14L19,12.14L8,5.14Z"}))),u=(0,n.h)("symbol",{id:"cancel-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L16.91,5.68C15.55,4.63 13.85,4 12,4M12,20A8,8 0 0,0 20,12C20,10.15 19.37,8.45 18.32,7.09L7.09,18.32C8.45,19.37 10.15,20 12,20Z"}))),m=(0,n.h)("symbol",{id:"chevron-icon",viewBox:"0 0 24 24"},(0,n.h)("svg",null,(0,n.h)("path",{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}))),f=(0,n.h)("symbol",{id:"chat-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M20,2H4A2,2 0 0,0 2,4V22L6,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M8,14H6V12H8V14M8,11H6V9H8V11M8,8H6V6H8V8M15,14H10V12H15V14M18,11H10V9H18V11M18,8H10V6H18V8Z"})),g=(0,n.h)("path",{d:"M22,12V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V12A1,1 0 0,1 1,11V8A2,2 0 0,1 3,6H6.17C6.06,5.69 6,5.35 6,5A3,3 0 0,1 9,2C10,2 10.88,2.5 11.43,3.24V3.23L12,4L12.57,3.23V3.24C13.12,2.5 14,2 15,2A3,3 0 0,1 18,5C18,5.35 17.94,5.69 17.83,6H21A2,2 0 0,1 23,8V11A1,1 0 0,1 22,12M4,20H11V12H4V20M20,20V12H13V20H20M9,4A1,1 0 0,0 8,5A1,1 0 0,0 9,6A1,1 0 0,0 10,5A1,1 0 0,0 9,4M15,4A1,1 0 0,0 14,5A1,1 0 0,0 15,6A1,1 0 0,0 16,5A1,1 0 0,0 15,4M3,8V10H11V8H3M13,8V10H21V8H13Z"}),b=(0,n.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"}),y=(0,n.h)("symbol",{id:"cross-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"})),v=(0,n.h)("symbol",{id:"keyboard-icon",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M19,10H17V8H19M19,13H17V11H19M16,10H14V8H16M16,13H14V11H16M16,17H8V15H16M7,10H5V8H7M7,13H5V11H7M8,11H10V13H8M8,8H10V10H8M11,11H13V13H11M11,8H13V10H11M20,5H4C2.89,5 2,5.89 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7C22,5.89 21.1,5 20,5Z"})),C=(0,n.h)("symbol",{id:"mode-icon",viewBox:"0 0 100 100"},(0,n.h)("g",null,(0,n.h)("rect",{x:0,y:0,width:28,height:47}),(0,n.h)("rect",{x:36,y:0,width:28,height:47}),(0,n.h)("rect",{x:72,y:0,width:28,height:47}),(0,n.h)("rect",{x:0,y:53,width:100,height:47}))),k=(0,n.h)("symbol",{id:"vertical-mode-icon",viewBox:"0 0 100 100"},(0,n.h)("g",null,(0,n.h)("rect",{x:0,y:0,width:20,height:100}),(0,n.h)("rect",{x:23,y:0,width:20,height:100}),(0,n.h)("rect",{x:46,y:0,width:20,height:100}),(0,n.h)("rect",{x:69,y:0,width:32,height:100}))),S=(0,n.h)("symbol",{id:"search",viewBox:"0 0 24 24"},(0,n.h)("path",{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"})),w=(0,n.h)("g",{fill:"none",fillRule:"evenodd",strokeWidth:10},(0,n.h)("circle",{cx:22,cy:22,r:1},(0,n.h)("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,n.h)("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})),(0,n.h)("circle",{cx:22,cy:22,r:1},(0,n.h)("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),(0,n.h)("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})))},"0lUe":function(e,t,o){"use strict";function n(e,t){var o={};for(var n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function s(e){var t,o=e.type,n=e.children;return"bug"===o?t=p:"a11y"===o?t=c:"ui"===o&&(t=h),(0,l.h)("li",null,t,": ",n)}function a(e){var t=e.name,o=e.url;return(0,l.h)("a",{href:o,target:"_blank",rel:"noopener noreferrer"}," ",t)}function i(e){var t=e.version,o=e.isLatest,s=n(e,["version","isLatest"]);return(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},t),(0,l.h)("ul",null,s.children),o?(0,l.h)("div",{class:"mt-2"},u,m,(0,l.h)("p",null,"Web Maker now has more than 50K weekly active users! Thank you for being a part of this community of awesome developers. If you find Web Maker helpful,"," ",f,"\xA0",g,"\xA0",(0,l.h)(d.Button,{"aria-label":"Support the developer",onClick:s.onSupportBtnClick,"data-event-action":"supportDeveloperChangelogBtnClick","data-event-category":"ui",class:"btn btn-icon"},"Support the developer"))):null)}t.__esModule=!0;var r=Object.assign||function(e){for(var t,o=1;o",(0,l.h)("a",{href:"https://webmakerapp.com/app/",target:"_blank",rel:"noopener noreferrer"},"https://webmakerapp.com/app/"),"."),(0,l.h)("li",null,"Now use Web Maker web app on any modern browser (tested with Chrome and Firefox)."),(0,l.h)("li",null,(0,l.h)("strong",null,"User Accounts")," - The much requested user accounts are here. Now maintain your account and store all your creations in the cloud and access them anywhere anytime."),(0,l.h)("li",null,(0,l.h)("strong",null,"New layout mode")," - One more layout mode, that lets you align all the panes vertically."),(0,l.h)("li",null,(0,l.h)("strong",null,"No more restriction on scripts (Web app only)")," - If you are using the web app, there is no more a restriction to load scripts from only specific domains. Load any script!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Inline scripts (Web app only)")," - The restriction of writing JavaScript only in JS pane is also removed."))),re=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.7"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://tailwindcss.com/",target:"_blank",rel:"noopener noreferrer"},"Tailwind CSS")," ","added to popular CSS libraries list. Thanks"," ",(0,l.h)(a,{url:"https://github.com/diomed",name:"diomed"}),"."),(0,l.h)("li",null,"Popular libraries list updated. Thanks"," ",(0,l.h)(a,{url:"https://github.com/diomed",name:"diomed"}),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Dev"),": Bug fixes and code refactoring to make things simple."," ",(0,l.h)(a,{url:"https://github.com/iamandrewluca",name:"iamandrewluca"})," ","."))),le=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.6"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Fix close buttons not working in notifications and keyboard shortcuts modal."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Fix keyboard shortcut to see keyboard shortcuts :) Thanks",(0,l.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."))),de=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.5"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/release-2-9-5-add-library-search-pane-collapsing-ux-improvements-more-1085216c1301",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Keyboard shortcuts panel"),": Add a list of all keyboard shotcuts. Access with",(0,l.h)("code",null," Ctrl/\u2318 + Shift + ?")," or click keyboard button in footer."),(0,l.h)("li",null,(0,l.h)("strong",null,"Add external library"),": Better UX for searching third party libraries."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Code panes now go fullscreen when double-clicked on their headers - which is much more intuitive behavior based on feedback from lot of developers."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Add",(0,l.h)("code",null,"allowfullscreen")," attribute on iframes. Thanks",(0,l.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Stop screenlog.js from showing up in the exported HTML."),(0,l.h)("li",null,"Popular external libraries list updated. Thanks",(0,l.h)("a",{href:"https://github.com/jlapitan",target:"_blank",rel:"noopener noreferrer"},"jlapitan"),"."))),pe=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.4"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement"),": Atomic CSS (Atomizer) has been updated to latest version. Now you can do things like psuedo elements. Learn More."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Logging circular objects is now possible. It won't show in the Web Maker console, but will show fine in browser's console."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Console's z-index issue has been fixed."))),ce=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.3"),(0,l.h)("ul",null,(0,l.h)("li",null,"Choose the save location while exporting your saved creations. Now easily sync them to your Dropbox or any cloud storage."),(0,l.h)("li",null,"All modals inside the app now have a close button."),(0,l.h)("li",null,"Checkbox that showed on clicking a boolean value is now removed. Thanks",(0,l.h)("a",{href:"https://github.com/gauravmuk",target:"_blank",rel:"noopener noreferrer"},"Gaurav Nanda"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Screenshots on retina device are now correct. Thanks",(0,l.h)("a",{href:"https://github.com/AshBardhan",target:"_blank",rel:"noopener noreferrer"},"Ashish Bardhan"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Double console log in detached mode fixed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Console.clear now works in detached mode too."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - DOCTYPE added in preview."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Typo correction in README. Thanks",(0,l.h)("a",{href:"https://github.com/AdilMah",target:"_blank",rel:"noopener noreferrer"},"Adil Mahmood"),"."),(0,l.h)("li",null,"gstatic.com is available to load external JavaScripts from."),(0,l.h)("li",null,"Popular libraries list updated. Thanks",(0,l.h)("a",{href:"https://github.com/diomed",target:"_blank",rel:"noopener noreferrer"},"diomed"),"."),(0,l.h)("li",null,"Added",(0,l.h)("a",{href:"https://github.com/chinchang/web-maker/blob/master/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"},"contribution guidelines")," ","in the Github repository."))),he=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.2"),(0,l.h)("ul",null,(0,l.h)("li",null,"Minor bug fixes."))),ue=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6",target:"_blank",rel:"noopener noreferrer"},"Read blog post about last release.")),(0,l.h)("li",null,"Use Ctrl/Cmd+D to select next occurence of matching selection."),(0,l.h)("li",null,"Improve onboard experience."))),me=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.9.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Detached Preview")," - Yes, you read that correct! You can now detach your preview and send it to your secondary monitor."),(0,l.h)("li",null,(0,l.h)("strong",null,"Find & Replace")," - Long awaited, now its there. Ctrl/Cmd+f to find and add Alt to replace."),(0,l.h)("li",null,(0,l.h)("strong",null,"Atomic CSS (Atomizer) configurations")," - Add custom config for Atomic CSS.",(0,l.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Light mode")," - This new setting makes Web Maker drop some heavy effects like blur etc to gain more performance. Thanks",(0,l.h)("a",{href:"https://github.com/iamandrewluca",target:"_blank",rel:"noopener noreferrer"},"Andrew"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Preserve logs setting")," - Choose whether or not to preserve logs across preview refreshes. Thanks",(0,l.h)("a",{href:"https://github.com/BasitAli",target:"_blank",rel:"noopener noreferrer"},"Basit"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Line wrap setting")," - As the name says."),(0,l.h)("li",null,"Semantic UI added to popular libraries."),(0,l.h)("li",null,"Bootstrap, Vue, UI-Kit and more updated to latest versions in popular libraries."),(0,l.h)("li",null,"UX improvements in settings UI"),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Trigger preview refresh anytime with Ctrl/\u2318 + Shift + 5. Even with auto-preview on."))),fe=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.8.1"),(0,l.h)("ul",null,(0,l.h)("li",null,"Vue.js & UIKit version updated to latest version in 'Add Library' list."),(0,l.h)("li",null,"UTF-8 charset added to preview HTML to support universal characters."))),ge=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.8.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("a",{href:"https://medium.com/web-maker/release-v2-8-is-out-f44e6ea5d9c4",target:"_blank",rel:"noopener noreferrer"},"Read blog post about this release.")),(0,l.h)("li",null,(0,l.h)("strong",null,"Auto Save")," - Your creations now auto-save after your first manual save. This is configurable from settings."),(0,l.h)("li",null,(0,l.h)("strong",null,"Base2Tone-Meadow Editor Theme")," - First user contributed theme. Thanks to Diomed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Use System Fonts")," - You can now use any of your existing system fonts in the editor!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Matching Tag Highlight")," - Cursor over any HTML tag would highlight the matching pair tag."),(0,l.h)("li",null,"Auto-completion suggestion can now be switched off from settings."),(0,l.h)("li",null,(0,l.h)("strong",null,"Improvement")," - Stop white flicker in editor when the app opens."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Add Babel Polyfill to enable use of next-gen built-ins like Promise or WeakMap."),(0,l.h)("li",null,"Vue.js version updated to 2.4.0 in popular library list."),(0,l.h)("li",null,"Downloads permission is optional. Asked only when you take screenshot."))),be=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.2"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"External Libraries")," - Add Foundation.js and update UIKit 3 to latest beta."),(0,l.h)("li",null,(0,l.h)("strong",null,"rawgit.com")," &",(0,l.h)("strong",null,"wzrd.in")," domains are now allowed for loading external libraries from."),(0,l.h)("li",null,"Minor booting speed improvements"))),ye=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Framer.js support")," - You can now load the latest framer.js library from",(0,l.h)("a",{href:"https://builds.framerjs.com/",target:"_blank",rel:"noopener noreferrer"},"framer builds page")," ","and start coding framer prototypes."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Edit on CodePen is back in action."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Autocompletion menu doesn't show on cut and paste now."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Updated & fixed urls of some common external libraries to latest versions. UIKit3 & Bootstrap 4\u03B1 are now in the list."),(0,l.h)("li",null,"Preprocessor selector are now more accessible."))),ve=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.7.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Fork any creation!"),": Now you can fork any existing creation of yours to start a new work based on it. One big use case of this feature is \"Templates\"!",(0,l.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://kushagragour.in/blog/2017/05/web-maker-fork-templates/?utm_source=webmakerapp&utm_medium=referral"},"Read more about it"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Fonts \uD83D\uDE0D "),": Super-awesome 4 fonts (mostly with ligature support) now available to choose from. Fira Code is the default font now."),(0,l.h)("li",null,"Updated most used external libraries to latest versions."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Add missing Bootstrap JS file to most used external libraries list."),(0,l.h)("li",null,"Several other minor bugfixes and improvements to make Web Maker awesome!"),(0,l.h)("li",null,"Great news to share with you - Web Maker has been featured on the Chrome Webstore homepage! Thanks for all the love :)"))),Ce=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.6.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": Emojis vanishing while exporting to Codepen has been fixed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),":",(0,l.h)("code",null,"console.clear()")," now doesn't error and clears the inbuilt console."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix"),": External libraries added to the creation are exported as well to Codepen."))),ke=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.6.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"The \"Console\""),": The most awaited feature is here! There is now an inbuilt console to see your logs, errors and for quickly evaluating JavaScript code inside your preview. Enjoy! I also a",(0,l.h)("a",{href:"https://kushagragour.in/blog/2017/05/web-maker-console-is-here/?utm_source=webmakerapp&utm_medium=referral",target:"_blank",rel:"noopener noreferrer"},"blog post about it"),"."),(0,l.h)("li",null,"Number slider which popped on clicking any number in the code has been removed due to poor user experience."),(0,l.h)("li",null,"Minor usability improvements."))),Se=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.5.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Atomic CSS"),": Use can now use Atomic CSS(ACSS) in your work!",(0,l.h)("a",{href:"https://acss.io/",target:"_blank",rel:"noopener noreferrer"},"Read more about it here"),"."),(0,l.h)("li",null,(0,l.h)("strong",null,"Search your saved creations"),": Easily search through all your saved creations by title."),(0,l.h)("li",null,(0,l.h)("strong",null,"Configurable Auto-preview")," - You can turn off the auto preview in settings if you don't want the preview to update as you type."),(0,l.h)("li",null,(0,l.h)("strong",null,"Configurable refresh on resize")," - You can configure whether you want the preview to refresh when you resize the preview panel."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Fix indentation",(0,l.h)("a",{href:"https://github.com/chinchang/web-maker/issues/104",target:"_blank",rel:"noopener noreferrer"},"issue")," ","with custom indentation size."))),we=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.4.2"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Improved infinite loop protection"),": Infinite loop protection is now faster and more reliable. And works without the need of Escodegen. Thanks to Ariya Hidayat!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Default parameters not working in JavaScript is fixed."))),Me=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.4.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Import/Export"),": Your creations are most important. Now export all your creations into a single file as a backup that can be imported anytime & anywhere."),(0,l.h)("li",null,(0,l.h)("strong",null,"Editor themes"),": You have been heard. Now you can choose from a huge list of wonderful editor themes!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Identation settings"),": Not a spaces fan? Switch to tabs and set your indentation size."),(0,l.h)("li",null,(0,l.h)("strong",null,"Vim key bindings"),": Rejoice Vim lovers!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Code blast"),": Why don't you try coding with this switched on from the settings? Go on..."),(0,l.h)("li",null,(0,l.h)("strong",null,"Important"),": Due to security policy changes from Chrome 57 onwards, Web Maker now allows loading external JavaScript libraries only from certain whitelisted domains (localhost, https://ajax.googleapis.com, https://code.jquery.com, https://cdnjs.cloudflare.com, https://unpkg.com, https://maxcdn.com, https://cdn77.com, https://maxcdn.bootstrapcdn.com, https://cdn.jsdelivr.net/)"),(0,l.h)("li",null,"Save button now highlights when you have unsaved changes."),(0,l.h)("li",null,"Jade is now called Pug. Just a name change."))),_e=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.2"),(0,l.h)("ul",null,(0,l.h)("li",null,"Update Babel to support latest and coolest ES6 features."),(0,l.h)("li",null,"Improve onboarding experience at first install."))),xe=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.1"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Splitting of code and preview panes is remembered by the editor."),(0,l.h)("li",null,"Title of the creation is used for the file name when saving as HTML."))),He=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.3.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Add Library Autocompletion")," - Just start typing the name of library and you'll be shown matching libraries from cdnjs."),(0,l.h)("li",null,(0,l.h)("strong",null,"Preview Screenshot Capture")," - Want to grab a nice screenshot of your creation. You have it! Click and capture."),(0,l.h)("li",null,(0,l.h)("strong",null,"Auto Indent Code")," - Select your code and hit Shift-Tab to auto-indent it!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Keyboard Navigation in Saved List")," - Now select your creation using arrow keys and hit ENTER to open it."),(0,l.h)("li",null,"Highlight active line in code panes."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Fix in generated title of new creation."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - HTML autocompletion is manual triggered now with Ctrl+Space."))),Ie=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.2.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Code Autocompletion")," - See code suggestions while you type!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Full Screen Preview")," - Checkout your creation in a full-screen layout."),(0,l.h)("li",null,(0,l.h)("strong",null,"SASS")," - SASS support added for CSS."),(0,l.h)("li",null,(0,l.h)("strong",null,"Faster CSS update")," - Preview updates instantly without refresh when just CSS is changed."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Indentation fixed while going on new line."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Works even in Chrome Canary now. Though libraries can be added only through CDNs."))),Le=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.1.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"TypeScript")," - Now you can code in TypeScript too!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Stylus Preprocessor")," - Stylus supported adding for CSS."),(0,l.h)("li",null,(0,l.h)("strong",null,"Code Folding")," - Collapse large code blocks for easy editing."),(0,l.h)("li",null,(0,l.h)("strong",null,"Bugfix")," - Support JSX in JavaScript."),(0,l.h)("li",null,"Better onboarding for first time users."))),je=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"2.0.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Save and Load")," - Long pending and super-useful, now you can save your creations and resume them anytime later."),(0,l.h)("li",null,(0,l.h)("strong",null,"Insert JS & CSS")," - Load popular JavaScript & CSS libraries in your work without writing any code."),(0,l.h)("li",null,(0,l.h)("strong",null,"Collapsed Panes")," - Collapse/uncollapse code panes with a single click. Your pane configuration is even saved with every creation!"),(0,l.h)("li",null,(0,l.h)("strong",null,"Quick color & number change")," - Click on any color or number and experiment with quick values using a slider."),(0,l.h)("li",null,(0,l.h)("strong",null,"Linting")," - See your code errors right where you are coding."),(0,l.h)("li",null,"No more browser hang due to infinite loops!"))),Ee=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"1.7.0"),(0,l.h)("ul",null,(0,l.h)("li",null,(0,l.h)("strong",null,"Preprocessors!")," - Enjoy a whole list of preprocessors for HTML(Jade & markdown), CSS(SCSS & LESS) and JavaScript(CoffeeScript & Babel)."),(0,l.h)("li",null,"More awesome font for code."))),Ae=(0,l.h)("div",{class:"notification"},(0,l.h)("span",{class:"notification__version"},"1.6.0"),(0,l.h)("ul",null,(0,l.h)("li",null,"You can now configure Web-Maker to not replace new tab page from the settings. It is always accessible from the icon in the top-right."),(0,l.h)("li",null,"Download current code as HTML file with Ctrl/\u2318 + S keyboard shortcut."),(0,l.h)("li",null,"New notifications panel added so you are always aware of the new changes in Web-Maker.")))},1:function(){},"18yn":function(e,t,o){"use strict";t.__esModule=!0,t.Profile=function(e){var t=e.user,o=e.logoutBtnHandler;return(0,n.h)("div",{class:"tac"},(0,n.h)("img",{height:"80",class:"profile-modal__avatar-img",src:t?t.photoURL||s:"",id:"profileAvatarImg",alt:"Profile image"}),(0,n.h)("h3",{id:"profileUserName",class:"mb-2"},t&&t.displayName?t.displayName:"Anonymous Creator"),(0,n.h)("p",null,(0,n.h)("button",{class:"btn","aria-label":"Logout from your account",onClick:o},"Logout")))};var n=o("KM04"),s="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='#ccc' d='M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z' /%3E%3C/svg%3E"},"1IZv":function(e,t,o){"use strict";t.__esModule=!0,t.KeyboardShortcutsModal=function(e){var t=e.show,o=e.closeHandler;return(0,n.h)(a.default,{show:t,closeHandler:o},i,r)};var n=o("KM04"),s=o("inAt"),a=function(e){return e&&e.__esModule?e:{default:e}}(s),i=(0,n.h)("h1",null,"Keyboard Shortcuts"),r=(0,n.h)("div",{class:"flex"},(0,n.h)("div",null,(0,n.h)("h2",null,"Global"),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + ?"),(0,n.h)("span",{class:"kbd-shortcut__details"},"See keyboard shortcuts")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + 5"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Refresh preview")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + S"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Save current creations")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + O"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Open list of saved creations")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl + L"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Clear console (works when console input is focused)")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Esc"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Close saved creations panel & modals"))),(0,n.h)("div",{class:"ml-2"},(0,n.h)("h2",null,"Editor"),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + F"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Find")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + G"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Select next match")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + G"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Select previous match")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Opt/Alt + F"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Find & replace")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Shift + Tab"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Realign code")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ]"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Indent code right")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ["),(0,n.h)("span",{class:"kbd-shortcut__details"},"Indent code left")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Tab"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Emmet code completion"," ",(0,n.h)("a",{href:"https://emmet.io/",target:"_blank",rel:"noopener noreferrer"},"Read more"))),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + /"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Single line comment")),(0,n.h)("p",null,(0,n.h)("span",{class:"kbd-shortcut__keys"},"Ctrl + Shift + F"),(0,n.h)("span",{class:"kbd-shortcut__details"},"Run Prettier"))))},"3Z4F":function(e,t){"use strict";t.__esModule=!0;var o=Object.assign||function(e){for(var t,o=1;o":"")},""),i=n.externalLibs.css.split("\n").reduce(function(e,t){return e+(t?"\n":"")},""));var r="\n\n\n\n"+i+"\n\n\n\n"+e+"\n"+a+"\n";if(s||(r+=""),n.jsMode===d.JsModes.ES6&&(r+=""),"string"==typeof o)r+="\n\n",r}t.__esModule=!0,t.BASE_PATH=void 0,t.semverCompare=function(e,t){for(var o=e.split("."),n=t.split("."),s=0;3>s;s++){var a=+o[s],i=+n[s];if(a>i)return 1;if(i>a)return-1;if(!isNaN(a)&&isNaN(i))return 1;if(isNaN(a)&&!isNaN(i))return-1}return 0},t.generateRandomId=function(e){for(var t="",o=e||10;o--;)t+=u[~~(Math.random()*u.length)];return t},t.onButtonClick=function(e,t){e.addEventListener("click",function(o){return t(o),!1})},t.log=n,t.addInfiniteLoopProtection=function(e,t){var o=t.timeout,n=1,s=[],a="_wmloopvar";return c.parse(e,{tolerant:!0,range:!0,jsx:!0},function(e){switch(e.type){case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":case"WhileStatement":var t=1+e.body.range[0],i=e.body.range[1],r=("\nif (Date.now() - %d > "+o+") { window.top.previewException(new Error(\"Infinite loop\")); break;}\n").replace("%d",a+n),l="";"BlockStatement"!==e.body.type&&(r="{"+r,l="}",--t),s.push({pos:t,str:r}),s.push({pos:i,str:l}),s.push({pos:e.range[0],str:"var %d = Date.now();\n".replace("%d",a+n)}),++n;break;default:}}),s.sort(function(e,t){return t.pos-e.pos}).forEach(function(t){e=e.slice(0,t.pos)+t.str+e.slice(t.pos)}),e},t.getHumanDate=function(e){var t=new Date(e),o=t.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]+" "+t.getFullYear();return o},t.once=function(e,t,o){e.addEventListener(t,function(n){return n.target.removeEventListener(t,arguments.callee),o(n)})},t.downloadFile=s,t.writeFile=a,t.loadJS=function(e){var t=(0,p.deferred)(),o=window.document.getElementsByTagName("script")[0],n=window.document.createElement("script");return n.src=e,n.async=!0,o.parentNode.insertBefore(n,o),n.onload=function(){t.resolve()},t.promise},t.getCompleteHtml=i,t.saveAsHtml=function(e){var t=(0,l.computeHtml)(e.html,e.htmlMode),o=(0,l.computeCss)(e.css,e.cssMode),n=(0,l.computeJs)(e.js,e.jsMode,!1);Promise.all([t,o,n]).then(function(t){var o=t[0].code,n=t[1].code,a=t[2].code,l=i(o,n,a,e,!0),p=new Date,d=["web-maker",p.getFullYear(),p.getMonth()+1,p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds()].join("-");e.title&&(d=e.title),d+=".html";var c=new Blob([l],{type:"text/html;charset=UTF-8"});s(d,c),(0,r.trackEvent)("fn","saveFileComplete")})},t.handleDownloadsPermission=function(){var e=(0,p.deferred)();return window.IS_EXTENSION?(chrome.permissions.contains({permissions:["downloads"]},function(t){t?e.resolve():chrome.permissions.request({permissions:["downloads"]},function(t){t?((0,r.trackEvent)("fn","downloadsPermGiven"),e.resolve()):e.reject()})}),e.promise):(e.resolve(),e.promise)},t.getFilenameFromUrl=function(e){return e?e.match(/\/([^/]*)$/)[1]:""},t.prettify=function(e){var t=1n?e.classList.add("is-minimized"):e.classList.remove("is-minimized"),-1===e.style[o].indexOf("100% - "+2*k+"px")?e.classList.remove("is-maximized"):e.classList.add("is-maximized")})},50)},t.prototype.toggleCodeWrapCollapse=function(e){if(e.classList.contains("is-minimized")||e.classList.contains("is-maximized"))e.classList.remove("is-minimized"),e.classList.remove("is-maximized"),this.codeSplitInstance.setSizes([33.3,33.3,33.3]);else{var t=parseInt(e.dataset.codeWrapId,10),o=[k+"px",k+"px",k+"px"];o[t]="calc(100% - "+2*k+"px)",this.codeSplitInstance.setSizes(o),e.classList.add("is-maximized")}this.updateSplits()},t.prototype.collapseBtnHandler=function(t){var e=t.currentTarget.parentElement.parentElement.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneCollapseBtnClick",e.dataset.type)},t.prototype.codeWrapHeaderDblClickHandler=function(t){if(t.target.classList.contains("js-code-wrap__header")){var e=t.target.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneHeaderDblClick",e.dataset.type)}},t.prototype.resetSplitting=function(){this.setState({codeSplitSizes:this.getCodeSplitSizes(),mainSplitSizes:this.getMainSplitSizesToApply()})},t.prototype.updateSplits=function(){this.props.onSplitUpdate(),this.state.codeSplitSizes=this.props.currentItem.sizes,this.state.mainSplitSizes=this.props.currentItem.mainSizes},t.prototype.getMainSplitSizesToApply=function(){var e,t=this.props,o=t.currentItem,n=t.currentLayoutMode;return e=o&&o.mainSizes?3===n?[o.mainSizes[1],o.mainSizes[0]]:o.mainSizes:5===n?[75,25]:[50,50],e},t.prototype.getCodeSplitSizes=function(){return this.props.currentItem&&this.props.currentItem.sizes?this.props.currentItem.sizes:[33.33,33.33,33.33]},t.prototype.mainSplitDragEndHandler=function(){var e=this;this.props.prefs.refreshOnResize&&setTimeout(function(){e.setPreviewContent(!0)},1),this.updateSplits()},t.prototype.codeSplitDragStart=function(){document.body.classList.add("is-dragging")},t.prototype.codeSplitDragEnd=function(){this.updateCodeWrapCollapseStates(),document.body.classList.remove("is-dragging"),this.updateSplits()},t.prototype.handleModeRequirements=function(e){function t(){c.modes[e].hasLoaded=!0,n.resolve()}var o="lib/transpilers",n=(0,y.deferred)();return c.modes[e].hasLoaded?(n.resolve(),n.promise):(e===c.HtmlModes.JADE?(0,h.loadJS)(o+"/jade.js").then(t):e===c.HtmlModes.MARKDOWN?(0,h.loadJS)(o+"/marked.js").then(t):e===c.CssModes.LESS?(0,h.loadJS)(o+"/less.min.js").then(t):e===c.CssModes.SCSS||e===c.CssModes.SASS?(0,h.loadJS)(o+"/sass.js").then(function(){window.sass=new Sass(o+"/sass.worker.js"),t()}):e===c.CssModes.STYLUS?(0,h.loadJS)(o+"/stylus.min.js").then(t):e===c.CssModes.ACSS?(0,h.loadJS)(o+"/atomizer.browser.js").then(t):e===c.JsModes.COFFEESCRIPT?(0,h.loadJS)(o+"/coffee-script.js").then(t):e===c.JsModes.ES6?(0,h.loadJS)(o+"/babel.min.js").then(t):e===c.JsModes.TS?(0,h.loadJS)(o+"/typescript.js").then(t):n.resolve(),n.promise)},t.prototype.updateHtmlMode=function(e){return this.props.onCodeModeChange("html",e),this.props.currentItem.htmlMode=e,this.cm.html.setOption("mode",c.modes[e].cmMode),g.default.autoLoadMode(this.cm.html,c.modes[e].cmPath||c.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateCssMode=function(e){return this.props.onCodeModeChange("css",e),this.props.currentItem.cssMode=e,this.cm.css.setOption("mode",c.modes[e].cmMode),this.cm.css.setOption("readOnly",c.modes[e].cmDisable),window.cssSettingsBtn.classList[c.modes[e].hasSettings?"remove":"add"]("hide"),g.default.autoLoadMode(this.cm.css,c.modes[e].cmPath||c.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateJsMode=function(e){return this.props.onCodeModeChange("js",e),this.props.currentItem.jsMode=e,this.cm.js.setOption("mode",c.modes[e].cmMode),g.default.autoLoadMode(this.cm.js,c.modes[e].cmPath||c.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.codeModeChangeHandler=function(t){var e=this,o=t.target.value,n=t.target.dataset.type,s=this.props.currentItem["html"===n?"htmlMode":"css"===n?"cssMode":"jsMode"];s!==o&&("html"===n?this.updateHtmlMode(o).then(function(){return e.setPreviewContent(!0)}):"js"===n?this.updateJsMode(o).then(function(){return e.setPreviewContent(!0)}):"css"===n&&this.updateCssMode(o).then(function(){return e.setPreviewContent(!0)}),(0,m.trackEvent)("ui","updateCodeMode",o))},t.prototype.detachPreview=function(){var e=this;if(this.detachedWindow)return void this.detachedWindow.focus();var t=this.frame.getBoundingClientRect(),o=t.width,n=t.height;document.body.classList.add("is-detached-mode"),this.detachedWindow=window.open("./preview.html","Web Maker","width="+o+",height="+n+",resizable,scrollbars=yes,status=1"),setTimeout(function(){e.setPreviewContent(!0)},1500);var s=window.setInterval(function(){e.detachedWindow&&e.detachedWindow.closed&&(clearInterval(s),document.body.classList.remove("is-detached-mode"),e.detachedWindow=null,e.setPreviewContent(!0))},500)},t.prototype.updateLogCount=function(){window.logCountEl&&(logCountEl.textContent=this.logCount)},t.prototype.onMessageFromConsole=function(){var e=this;[].concat(Array.prototype.slice.call(arguments)).forEach(function(t){t&&t.indexOf&&-1!==t.indexOf("filesystem:chrome-extension")&&(t=t.replace(/filesystem:chrome-extension.*\.js:(\d+):*(\d*)/g,"script $1:$2"));try{e.consoleCm.replaceRange(t+" "+((t+"").match(/\[object \w+]/)?JSON.stringify(t):"")+"\n",{line:Infinity})}catch(t){e.consoleCm.replaceRange("\uD83C\uDF00\n",{line:Infinity})}e.consoleCm.scrollTo(0,Infinity),e.logCount++}),this.updateLogCount()},t.prototype.previewException=function(e){console.error("Possible infinite loop detected.",e.stack),this.onMessageFromConsole("Possible infinite loop detected.",e.stack)},t.prototype.toggleConsole=function(){this.setState({isConsoleOpen:!this.state.isConsoleOpen}),(0,m.trackEvent)("ui","consoleToggle")},t.prototype.consoleHeaderDblClickHandler=function(t){t.target.classList.contains("js-console__header")&&((0,m.trackEvent)("ui","consoleToggleDblClick"),this.toggleConsole())},t.prototype.clearConsole=function(){this.consoleCm.setValue(""),this.logCount=0,this.updateLogCount()},t.prototype.clearConsoleBtnClickHandler=function(){this.clearConsole(),(0,m.trackEvent)("ui","consoleClearBtnClick")},t.prototype.evalConsoleExpr=function(t){(76===t.which||12===t.which)&&t.ctrlKey?(this.clearConsole(),(0,m.trackEvent)("ui","consoleClearKeyboardShortcut")):13===t.which&&(this.onMessageFromConsole("> "+t.target.value),this.frame.contentWindow._wmEvaluate(t.target.value),t.target.value="",(0,m.trackEvent)("fn","evalConsoleExpr"))},t.prototype.cssSettingsBtnClickHandler=function(){this.setState({isCssSettingsModalOpen:!0}),(0,m.trackEvent)("ui","cssSettingsBtnClick")},t.prototype.cssSettingsChangeHandler=function(e){this.props.onCodeSettingsChange("css",e),this.setPreviewContent(!0)},t.prototype.getDemoFrame=function(e){e(this.frame)},t.prototype.editorFocusHandler=function(e){this.props.onEditorFocus(e)},t.prototype.render=function(){var e=this;return(0,r.h)(u.SplitPane,{class:"content-wrap flex flex-grow",sizes:this.state.mainSplitSizes,minSize:150,style:"",direction:2===this.props.currentLayoutMode?"vertical":"horizontal",onDragEnd:this.mainSplitDragEndHandler.bind(this)},(0,r.h)(u.SplitPane,{class:"code-side",id:"js-code-side",sizes:this.state.codeSplitSizes,minSize:k,direction:2===this.props.currentLayoutMode||5===this.props.currentLayoutMode?"horizontal":"vertical",onDragStart:this.codeSplitDragStart.bind(this),onDragEnd:this.codeSplitDragEnd.bind(this),onSplit:function(t){return e.codeSplitInstance=t}},(0,r.h)("div",{"data-code-wrap-id":"0",id:"htmlCodeEl","data-type":"html",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",dropdow:!0,title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},c.modes[this.props.currentItem.htmlMode||"html"].label),S,(0,r.h)("select",{"data-type":"html",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.htmlMode},w,M,_)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"htmlmixed",profile:"xhtml",gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],noAutocomplete:!0,matchTags:{bothTags:!0},prettier:!0,prettierParser:"html",emmet:!0},prefs:this.props.prefs,onChange:this.onHtmlCodeChange.bind(this),onCreation:function(t){return e.cm.html=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"1",id:"cssCodeEl","data-type":"css",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},c.modes[this.props.currentItem.cssMode||"css"].label),x,(0,r.h)("select",{"data-type":"css",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.cssMode},H,I,L,j,E,A)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{href:"#",id:"cssSettingsBtn",title:"Atomic CSS configuration",onClick:this.cssSettingsBtnClickHandler.bind(this),class:"code-wrap__header-btn hide"},B),(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"css",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"],emmet:!0,prettier:!0,prettierParser:"css"},prefs:this.props.prefs,onChange:this.onCssCodeChange.bind(this),onCreation:function(t){return e.cm.css=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"2",id:"jsCodeEl","data-type":"js",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},c.modes[this.props.currentItem.jsMode||"js"].label),O,(0,r.h)("select",{"data-type":"js",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.jsMode},T,P,D,V)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"javascript",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"],prettier:!0,prettierParser:"js"},prefs:this.props.prefs,autoComplete:this.props.prefs.autoComplete,onChange:this.onJsCodeChange.bind(this),onCreation:function(t){return e.cm.js=t},onFocus:this.editorFocusHandler.bind(this)}))),(0,r.h)("div",{class:"demo-side",id:"js-demo-side",style:""},(0,r.h)("iframe",{ref:function(t){return e.frame=t},src:"about://blank",frameborder:"0",id:"demo-frame",allowfullscreen:!0}),(0,r.h)(b.Console,{isConsoleOpen:this.state.isConsoleOpen,onConsoleHeaderDblClick:this.consoleHeaderDblClickHandler.bind(this),onClearConsoleBtnClick:this.clearConsoleBtnClickHandler.bind(this),toggleConsole:this.toggleConsole.bind(this),onEvalInputKeyup:this.evalConsoleExpr.bind(this),onReady:function(t){return e.consoleCm=t}}),(0,r.h)(C.default,{show:this.state.isCssSettingsModalOpen,closeHandler:function(){return e.setState({isCssSettingsModalOpen:!1})},onChange:this.cssSettingsChangeHandler.bind(this),settings:this.props.currentItem.cssSettings,editorTheme:this.props.prefs.editorTheme})))},t}(r.Component);t.default=F},"9VU0":function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}t.__esModule=!0,t.LibraryAutoSuggest=void 0;var i=function(){function e(e,t){for(var o,n=0;n"+t[o].name+"";e.isShowingSuggestions=!0,e.textareaBounds||(e.textareaBounds=e.t.getBoundingClientRect(),e.list.style.top=e.textareaBounds.bottom+"px",e.list.style.left=e.textareaBounds.left+"px",e.list.style.width=e.textareaBounds.width+"px"),e.list.classList.add("is-open")})},500)}},t.prototype.onKeyDown=function(e){var t;this.isShowingSuggestions&&(27===e.keyCode&&(this.closeSuggestions(),e.stopPropagation()),40===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):38===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):13===e.keyCode&&this.isShowingSuggestions&&(t=this.list.querySelector(".selected"),this.selectSuggestion(t.dataset.url),this.closeSuggestions()))},t.prototype.listMouseDownHandler=function(e){var t=e.target;t.parentElement.dataset.url&&this.selectSuggestion(t.parentElement.dataset.url)},t.prototype.selectSuggestion=function(e){this.t.focus(),(0,l.trackEvent)("ui","autoSuggestionLibSelected",e),this.selectedCallback?this.selectedCallback.call(null,e):this.replaceCurrentLine(e),this.closeSuggestions()},t.prototype.render=function(){var e=this;return(0,r.h)("div",{class:"btn-group "+(this.props.fullWidth?"flex-grow":""),ref:function(t){return e.wrap=t}},this.props.children,(0,r.h)("ul",{ref:function(t){return e.list=t},class:"dropdown__menu autocomplete-dropdown",onMouseDown:this.listMouseDownHandler.bind(this)}),(0,r.h)("div",{ref:function(t){return e.loader=t},class:"loader autocomplete__loader",style:"display:none"}))},i(t,[{key:"currentLineNumber",get:function(){return this.t.value.substr(0,this.t.selectionStart).split("\n").length}},{key:"currentLine",get:function(){var e=this.currentLineNumber;return this.t.value.split("\n")[e-1]}}]),t}(r.Component)},BcU7:function(e,t,o){"use strict";function n(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,o){function n(s,a){try{var i=t[s](a),r=i.value}catch(e){return void o(e)}return i.done?void e(r):Promise.resolve(r).then(function(e){n("next",e)},function(e){n("throw",e)})}return n("next")})}}var s=Object.assign||function(e){for(var t,o=1;o+l&&(a=Math.floor((r-l)/1e3/3600/24)),i.setState({daysLeft:a}),i}return a(t,e),t.prototype.render=function(){var e=this.props.codeSize?(this.props.codeSize/1024).toFixed(2):0;return(0,i.h)("div",{role:"button",class:"flex flex-v-center",tabIndex:"0",onClick:this.props.onClick,onBlur:this.props.onBlur},l," ",(0,i.h)("div",{class:"footer__js13k-days-left"},this.state.daysLeft," days to go"),(0,i.h)("div",{class:"footer__js13k-code-size",style:{color:10Hello, World!\"}"})),ne=(0,d.h)(S.default,null),se=(0,d.h)(G.Icons,null),ae=(0,d.h)("form",{style:"display:none;",action:"https://codepen.io/pen/define",method:"POST",target:"_blank",id:"codepenForm"},(0,d.h)("input",{type:"hidden",name:"data",value:"{\"title\": \"New Pen!\", \"html\": \"
Hello, World!
\"}"})),ie=function(e){function t(){a(this,t);var o=i(this,e.call(this));return o.AUTO_SAVE_INTERVAL=15000,o.modalDefaultStates={isModalOpen:!1,isAddLibraryModalOpen:!1,isSettingsModalOpen:!1,isHelpModalOpen:!1,isNotificationsModalOpen:!1,isLoginModalOpen:!1,isProfileModalOpen:!1,isSupportDeveloperModalOpen:!1,isKeyboardShortcutsModalOpen:!1,isAskToImportModalOpen:!1,isOnboardModalOpen:!1,isJs13KModalOpen:!1,isCreateNewModalOpen:!1},o.state=l({isSavedItemPaneOpen:!1},o.modalDefaultStates,{prefs:{},currentItem:{title:"",externalLibs:{js:"",css:""}}}),o.defaultSettings={preserveLastCode:!0,replaceNewTab:!1,htmlMode:"html",jsMode:"js",cssMode:"css",isCodeBlastOn:!1,indentWith:"spaces",indentSize:2,editorTheme:"monokai",keymap:"sublime",fontSize:16,refreshOnResize:!1,autoPreview:!0,editorFont:"FiraCode",editorCustomFont:"",autoSave:!0,autoComplete:!0,preserveConsoleLogs:!0,lightVersion:!1,lineWrap:!0,infiniteLoopTimeout:1e3,layoutMode:2,isJs13kModeOn:!1,autoCloseTags:!0},o.prefs={},O.default.auth().onAuthStateChanged(function(e){o.setState({isLoginModalOpen:!1}),e?((0,M.log)("You are -> ",e),A.alertsService.add("You are now logged in!"),o.setState({user:e}),window.user=e,!window.localStorage[Q.ASKED_TO_IMPORT_CREATIONS]&&o.fetchItems(!1,!0).then(function(e){e.length&&(o.oldSavedItems=e,o.oldSavedCreationsCount=e.length,o.setState({isAskToImportModalOpen:!0}),(0,j.trackEvent)("ui","askToImportModalSeen"))}),window.db.getUser(e.uid).then(function(t){if(t){var n=l({},o.state.prefs);l(n,e.settings),o.setState({prefs:n}),o.updateSetting()}})):(o.setState({user:void 0}),delete window.user),o.updateProfileUi()}),o}return r(t,e),t.prototype.componentWillMount=function(){var e,t=this;window.onunload=function(){t.saveCode("code"),t.detachedWindow&&t.detachedWindow.close()},db.local.get({layoutMode:1,code:""},function(o){t.toggleLayout(o.layoutMode),t.state.prefs.layoutMode=o.layoutMode,o.code&&(e=o.code)}),db.getSettings(this.defaultSettings).then(function(o){o.preserveLastCode&&e?(t.setState({unsavedEditCount:0}),e.id&&window.IS_EXTENSION?db.local.get(e.id,function(o){o[e.id]&&((0,M.log)("Load item ",e.id),t.setCurrentItem(o[e.id]).then(function(){return t.refreshEditor()}))}):((0,M.log)("Load last unsaved item",e),t.setCurrentItem(e).then(function(){return t.refreshEditor()}))):t.createNewItem(),l(t.state.prefs,o),t.setState({prefs:t.state.prefs}),t.updateSetting()}),db.getUserLastSeenVersion().then(function(e){e||(t.setState({isOnboardModalOpen:!0}),-1===document.cookie.indexOf("onboarded")&&((0,j.trackEvent)("ui","onboardModalSeen",ee),document.cookie="onboarded=1"),window.db.setUserLastSeenVersion(ee)),e&&-1===(0,M.semverCompare)(e,ee)&&!window.localStorage.pledgeModalSeen&&(t.openSupportDeveloperModal(),window.localStorage.pledgeModalSeen=!0),e&&-1!==(0,M.semverCompare)(e,ee)||(t.setState({hasUnseenChangelog:!0}),t.hasSeenNotifications=!1)})},t.prototype.updateProfileUi=function(){this.state.user?document.body.classList.add("is-logged-in"):document.body.classList.remove("is-logged-in")},t.prototype.refreshEditor=function(){this.toggleLayout(this.state.currentItem.layoutMode||this.state.prefs.layoutMode),this.updateExternalLibCount(),this.contentWrap.refreshEditor()},t.prototype.forkItem=function(e){var t=this;if(this.state.unsavedEditCount){var o=confirm("You have unsaved changes in your current work. Do you want to discard unsaved changes and continue?");if(!o)return}var n=JSON.parse(JSON.stringify(e));delete n.id,n.title="(Forked) "+e.title,n.updatedOn=Date.now(),this.setCurrentItem(n).then(function(){return t.refreshEditor()}),A.alertsService.add("\""+e.title+"\" was forked"),(0,j.trackEvent)("fn","itemForked")},t.prototype.createNewItem=function(){var e=this,t=new Date;this.setCurrentItem({title:"Untitled "+t.getDate()+"-"+(t.getMonth()+1)+"-"+t.getHours()+":"+t.getMinutes(),html:"",css:"",js:"",externalLibs:{js:"",css:""},layoutMode:this.state.currentLayoutMode}).then(function(){return e.refreshEditor()}),A.alertsService.add("New item created")},t.prototype.openItem=function(e){var t=this;this.setCurrentItem(e).then(function(){return t.refreshEditor()}),A.alertsService.add("Saved item loaded")},t.prototype.removeItem=function(e){var t=this,o=confirm("Are you sure you want to delete \""+e.title+"\"?");o&&(_.itemService.unsetItemForUser(e.id),_.itemService.removeItem(e.id).then(function(){A.alertsService.add("Item removed.",e),t.state.currentItem.id===e.id&&t.createNewItem()}),delete this.state.savedItems[e.id],this.setState({savedItems:l({},this.state.savedItems)}),(0,j.trackEvent)("fn","itemRemoved"))},t.prototype.setCurrentItem=function(e){var t=(0,E.deferred)();return e.htmlMode=e.htmlMode||this.state.prefs.htmlMode||L.HtmlModes.HTML,e.cssMode=e.cssMode||this.state.prefs.cssMode||L.CssModes.CSS,e.jsMode=e.jsMode||this.state.prefs.jsMode||L.JsModes.JS,this.setState({currentItem:e},t.resolve),this.isAutoSavingEnabled=!1,this.setState({unsavedEditCount:0}),t.promise},t.prototype.saveBtnClickHandler=function(){(0,j.trackEvent)("ui","saveBtnClick",this.state.currentItem.id?"saved":"new"),this.saveItem()},t.prototype.populateItemsInSavedPane=function(){this.setState({savedItems:l({},this.state.savedItems)}),this.toggleSavedItemsPane()},t.prototype.toggleSavedItemsPane=function(e){this.setState({isSavedItemPaneOpen:void 0===e?!this.state.isSavedItemPaneOpen:e}),this.state.isSavedItemPaneOpen?window.searchInput.focus():window.searchInput.value="",document.body.classList[this.state.isSavedItemPaneOpen?"add":"remove"]("overlay-visible")},t.prototype.fetchItems=function(){var e=s(function*(e,t){var o=this,n=(0,E.deferred)();this.state.savedItems={};var s=[];return window.user&&!t?(s=yield _.itemService.getAllItems(),(0,M.log)("got items"),e&&s.forEach(function(e){o.state.savedItems[e.id]=e}),n.resolve(s),n.promise):(db.local.get("items",function(t){var a=Object.getOwnPropertyNames(t.items||{});a.length||n.resolve([]),(0,j.trackEvent)("fn","fetchItems",a.length);for(var r=function(t){db.local.get(a[t],function(i){e&&(o.state.savedItems[a[t]]=i[a[t]]),s.push(i[a[t]]),a.length===s.length&&n.resolve(s)})},l=0;lwindow.innerWidth?2:e,this.state.currentLayoutMode===e?(this.contentWrap.resetSplitting(),void this.setState({currentLayoutMode:e})):void([1,2,3,4,5].forEach(function(e){window["layoutBtn"+e].classList.remove("selected"),document.body.classList.remove("layout-"+e)}),$("#layoutBtn"+e).classList.add("selected"),document.body.classList.add("layout-"+e),this.setState({currentLayoutMode:e},function(){t.contentWrap.resetSplitting(),t.contentWrap.setPreviewContent(!0)}))},t.prototype.layoutBtnClickHandler=function(e){this.saveSetting("layoutMode",e),(0,j.trackEvent)("ui","toggleLayoutClick",e),this.toggleLayout(e)},t.prototype.getCodePaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t||5===t?"width":"height";try{e=[htmlCodeEl.style[o],cssCodeEl.style[o],jsCodeEl.style[o]]}catch(t){e=[33.33,33.33,33.33]}finally{return e}},t.prototype.getMainPaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t?"height":"width";try{e=[+$("#js-code-side").style[o].match(/([\d.]+)%/)[1],+$("#js-demo-side").style[o].match(/([\d.]+)%/)[1]]}catch(t){e=[50,50]}finally{return e}},t.prototype.saveSetting=function(e,t){var o,n=(0,E.deferred)(),s=(o={},o[e]=t,o);return db.local.set(s,n.resolve),n.promise},t.prototype.saveCode=function(e){return this.state.currentItem.updatedOn=Date.now(),this.state.currentItem.layoutMode=this.state.currentLayoutMode,this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes(),(0,M.log)("saving key",e||this.state.currentItem.id,this.state.currentItem),_.itemService.setItem(e||this.state.currentItem.id,this.state.currentItem).then(function(){window.user&&!navigator.onLine?A.alertsService.add("Item saved locally. Will save to account when you are online."):A.alertsService.add("Item saved."),this.setState({unsavedEditCount:0})}.bind(this))},t.prototype.saveItem=function(){var e=this;if(!window.user&&!window.localStorage[Q.LOGIN_AND_SAVE_MESSAGE_SEEN]){var t=confirm("Saving without signing in will save your work only on this machine and this browser. If you want it to be secure & available anywhere, please login in your account and then save.\n\nDo you still want to continue saving locally?");if(window.localStorage[Q.LOGIN_AND_SAVE_MESSAGE_SEEN]=!0,!t)return(0,j.trackEvent)("ui",Q.LOGIN_AND_SAVE_MESSAGE_SEEN,"login"),this.closeAllOverlays(),void this.setState({isLoginModalOpen:!0});(0,j.trackEvent)("ui",Q.LOGIN_AND_SAVE_MESSAGE_SEEN,"local")}var o=!this.state.currentItem.id;this.state.currentItem.id=this.state.currentItem.id||"item-"+(0,M.generateRandomId)(),this.setState({isSaving:!0}),this.saveCode().then(function(){e.setState({isSaving:!1}),!e.isAutoSavingEnabled&&e.state.prefs.autoSave&&(e.isAutoSavingEnabled=!0,A.alertsService.add("Auto-save enabled."))}),o&&_.itemService.setItemForUser(this.state.currentItem.id)},t.prototype.onCodeModeChange=function(e,t){var o=l({},this.state.currentItem);o[e+"Mode"]=t,this.setState({currentItem:o})},t.prototype.onCodeChange=function(e,t,o){var n=this;this.state.currentItem[e]=t,o&&(this.setState({unsavedEditCount:this.state.unsavedEditCount+1}),0==this.state.unsavedEditCount%X&&this.state.unsavedEditCount>=X&&(window.saveBtn.classList.add("animated"),window.saveBtn.classList.add("wobble"),window.saveBtn.addEventListener("animationend",function(){window.saveBtn.classList.remove("animated"),window.saveBtn.classList.remove("wobble")}))),this.state.prefs.isJs13kModeOn&&(this.codeSizeCalculationTimeout&&clearTimeout(this.codeSizeCalculationTimeout),this.codeSizeCalculationTimeout=setTimeout(function(){n.calculateCodeSize(),n.codeSizeCalculationTimeout=null},1e3))},t.prototype.onCodeSettingsChange=function(e,t){this.state.currentItem[e+"Settings"]={acssConfig:t}},t.prototype.titleInputBlurHandler=function(t){this.state.currentItem.title=t.target.value,this.state.currentItem.id&&(this.saveItem(),(0,j.trackEvent)("ui","titleChanged"))},t.prototype.updateSetting=function(t){var e=this;if(t){var o=t.target.dataset.setting,n={},s=t.target;(0,M.log)(o,"checkbox"===s.type?s.checked:s.value);var a=l({},this.state.prefs);a[o]="checkbox"===s.type?s.checked:s.value,n[o]=a[o],this.setState({prefs:a}),db.sync.set(n,function(){A.alertsService.add("Setting saved")}),window.user&&window.db.getDb().then(function(t){var n;t.collection("users").doc(window.user.uid).update((n={},n["settings."+o]=e.state.prefs[o],n)).then(function(e){(0,M.log)("Setting \""+o+"\" for user",e)}).catch(function(e){return(0,M.log)(e)})}),(0,j.trackEvent)("ui","updatePref-"+o,a[o])}var i=this.state.prefs;runBtn.classList[i.autoPreview?"add":"remove"]("hide"),this.contentWrap.applyCodemirrorSettings(this.state.prefs),i.autoSave?!this.autoSaveInterval&&(this.autoSaveInterval=setInterval(function(){e.autoSaveLoop()},this.AUTO_SAVE_INTERVAL)):(clearInterval(this.autoSaveInterval),this.autoSaveInterval=null),document.body.classList[i.lightVersion?"add":"remove"]("light-version")},t.prototype.autoSaveLoop=function(){this.isAutoSavingEnabled&&this.state.unsavedEditCount&&this.saveItem()},t.prototype.loginBtnClickHandler=function(){this.setState({isLoginModalOpen:!0})},t.prototype.profileBtnClickHandler=function(){this.setState({isProfileModalOpen:!0})},t.prototype.logout=function(){if(this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to logout?");if(!e)return}(0,j.trackEvent)("fn","loggedOut"),P.auth.logout(),this.setState({isProfileModalOpen:!1}),A.alertsService.add("Log out successfull")},t.prototype.itemClickHandler=function(e){var t=this;setTimeout(function(){t.openItem(e)},350),this.toggleSavedItemsPane()},t.prototype.itemRemoveBtnClickHandler=function(e){this.removeItem(e)},t.prototype.itemForkBtnClickHandler=function(e){var t=this;this.toggleSavedItemsPane(),setTimeout(function(){t.forkItem(e)},350)},t.prototype.newBtnClickHandler=function(){if((0,j.trackEvent)("ui","newBtnClick"),this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to create something new?");e&&this.setState({isCreateNewModalOpen:!0})}else this.setState({isCreateNewModalOpen:!0})},t.prototype.openBtnClickHandler=function(){(0,j.trackEvent)("ui","openBtnClick"),this.openSavedItemsPane()},t.prototype.detachedPreviewBtnHandler=function(){(0,j.trackEvent)("ui","detachPreviewBtnClick"),this.contentWrap.detachPreview()},t.prototype.notificationsBtnClickHandler=function(){return this.setState({isNotificationsModalOpen:!0}),this.state.isNotificationsModalOpen&&!this.hasSeenNotifications&&(this.hasSeenNotifications=!0,this.setState({hasUnseenChangelog:!1}),window.db.setUserLastSeenVersion(ee)),(0,j.trackEvent)("ui","notificationButtonClick",ee),!1},t.prototype.codepenBtnClickHandler=function(t){if(this.state.currentItem.cssMode===L.CssModes.ACSS)return alert("Oops! CodePen doesn't supports Atomic CSS currently. \nHere is something you can still do -> https://medium.com/web-maker/sharing-your-atomic-css-work-on-codepen-a402001b26ab"),void t.preventDefault();var e={title:"A Web Maker experiment",html:this.state.currentItem.html,css:this.state.currentItem.css,js:this.state.currentItem.js,html_pre_processor:L.modes[this.state.currentItem.htmlMode].codepenVal,css_pre_processor:L.modes[this.state.currentItem.cssMode].codepenVal,js_pre_processor:L.modes[this.state.currentItem.jsMode].codepenVal,css_external:this.state.currentItem.externalLibs.css.split("\n").join(";"),js_external:this.state.currentItem.externalLibs.js.split("\n").join(";")};this.state.currentItem.title.match(/Untitled\s\d\d*-\d/)||(e.title=this.state.currentItem.title),e=JSON.stringify(e),window.codepenForm.querySelector("input").value=e,window.codepenForm.submit(),(0,j.trackEvent)("ui","openInCodepen"),t.preventDefault()},t.prototype.saveHtmlBtnClickHandler=function(t){(0,M.saveAsHtml)(this.state.currentItem),(0,j.trackEvent)("ui","saveHtmlClick"),t.preventDefault()},t.prototype.runBtnClickHandler=function(){this.contentWrap.setPreviewContent(!0,!0),(0,j.trackEvent)("ui","runBtnClick")},t.prototype.exportItems=function(){var e=this;(0,M.handleDownloadsPermission)().then(function(){e.fetchItems().then(function(e){var t=new Date,o=["web-maker-export",t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].join("-");o+=".json";var n=new Blob([JSON.stringify(e,!1,2)],{type:"application/json;charset=UTF-8"});(0,M.downloadFile)(o,n),(0,j.trackEvent)("fn","exportItems")})})},t.prototype.exportBtnClickHandler=function(t){this.exportItems(),t.preventDefault(),(0,j.trackEvent)("ui","exportBtnClicked")},t.prototype.screenshotBtnClickHandler=function(t){this.contentWrap.getDemoFrame(function(e){(0,F.takeScreenshot)(e.getBoundingClientRect())}),t.preventDefault()},t.prototype.openSupportDeveloperModal=function(){this.closeAllOverlays(),this.setState({isSupportDeveloperModalOpen:!0})},t.prototype.supportDeveloperBtnClickHandler=function(t){this.openSupportDeveloperModal(t)},t.prototype.dontAskToImportAnymore=function(t){this.setState({isAskToImportModalOpen:!1}),window.localStorage[Q.ASKED_TO_IMPORT_CREATIONS]=!0,t&&(0,j.trackEvent)("ui","dontAskToImportBtnClick")},t.prototype.mergeImportedItems=function(e){var t=[],o={},n=(0,E.deferred)(),s=this.state.savedItems;e.forEach(function(e){s[e.id]?t.push(e.id):((0,M.log)("merging",e.id),o[e.id]=e)});var a=e.length-t.length;if(t.length){var i=confirm(t.length+" creations already exist. Do you want to replace them?");i&&((0,M.log)("shouldreplace",i),e.forEach(function(e){o[e.id]=e}),a=e.length)}return a?_.itemService.saveItems(o).then(function(){n.resolve(),A.alertsService.add(a+" creations imported successfully."),(0,j.trackEvent)("fn","itemsImported",a)}):n.resolve(),this.closeSavedItemsPane(),n.promise},t.prototype.importCreationsAndSettingsIntoApp=function(){var e=this;this.mergeImportedItems(this.oldSavedItems).then(function(){(0,j.trackEvent)("fn","oldItemsImported"),e.dontAskToImportAnymore()})},t.prototype.editorFocusHandler=function(e){this.editorWithFocus=e},t.prototype.modalOverlayClickHandler=function(){this.closeAllOverlays()},t.prototype.splitUpdateHandler=function(){this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes()},t.prototype.calculateTextSize=function(e){if(!e)return 0;var t=/(\r?\n|\r)/g,o=/(\r?\n|\r|\s+)/g;return{count:function(e,n){n=n||{},n.lineBreaks=n.lineBreaks||1,n.ignoreWhitespace=n.ignoreWhitespace||!1;var s=e.length,a=s-e.replace(/[\u0100-\uFFFF]/g,"").length,i=s-e.replace(t,"").length;return n.ignoreWhitespace?(e=e.replace(o,""),e.length+a):s+a+Math.max(0,n.lineBreaks*(i-1))},format:function(e,t){for(var o=0;1024"+e+"")+" "+o+"B"}}.count(e)},t.prototype.getExternalLibCode=function(){var e=this.state.currentItem,t=e.externalLibs&&e.externalLibs.js||"";return t+="\n"+e.externalLibs&&e.externalLibs.css||"",t=t.split("\n").filter(function(e){return e}),t.map(function(e){return fetch(e).then(function(e){return e.text()}).then(function(t){return{code:t,fileName:(0,M.getFilenameFromUrl)(e)}})})},t.prototype.calculateCodeSize=function(){var e=this,t=this.state.currentItem,o=(0,w.computeHtml)(t.html,t.htmlMode),n=(0,w.computeCss)(t.css,t.cssMode),s=(0,w.computeJs)(t.js,t.jsMode,!1);Promise.all([o,n,s].concat(this.getExternalLibCode())).then(function(o){var n=o[0].code||"",s=o[1].code||"",a=o[2].code||"",r=(0,M.getCompleteHtml)(n,s,a,t,!0);r=r.replace(/":"")},""),i=n.externalLibs.css.split("\n").reduce(function(e,t){return e+(t?"\n":"")},""));var r="\n\n\n\n"+i+"\n\n\n\n"+e+"\n"+a+"\n";if(s||(r+=""),n.jsMode===d.JsModes.ES6&&(r+=""),"string"==typeof o)r+="\n\n",r}t.__esModule=!0,t.BASE_PATH=void 0,t.semverCompare=function(e,t){for(var o=e.split("."),n=t.split("."),s=0;3>s;s++){var a=+o[s],i=+n[s];if(a>i)return 1;if(i>a)return-1;if(!isNaN(a)&&isNaN(i))return 1;if(isNaN(a)&&!isNaN(i))return-1}return 0},t.generateRandomId=function(e){for(var t="",o=e||10;o--;)t+=u[~~(Math.random()*u.length)];return t},t.onButtonClick=function(e,t){e.addEventListener("click",function(o){return t(o),!1})},t.log=n,t.addInfiniteLoopProtection=function(e,t){var o=t.timeout,n=1,s=[],a="_wmloopvar";return c.parse(e,{tolerant:!0,range:!0,jsx:!0},function(e){switch(e.type){case"DoWhileStatement":case"ForStatement":case"ForInStatement":case"ForOfStatement":case"WhileStatement":var t=1+e.body.range[0],i=e.body.range[1],r=("\nif (Date.now() - %d > "+o+") { window.top.previewException(new Error(\"Infinite loop\")); break;}\n").replace("%d",a+n),l="";"BlockStatement"!==e.body.type&&(r="{"+r,l="}",--t),s.push({pos:t,str:r}),s.push({pos:i,str:l}),s.push({pos:e.range[0],str:"var %d = Date.now();\n".replace("%d",a+n)}),++n;break;default:}}),s.sort(function(e,t){return t.pos-e.pos}).forEach(function(t){e=e.slice(0,t.pos)+t.str+e.slice(t.pos)}),e},t.getHumanDate=function(e){var t=new Date(e),o=t.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]+" "+t.getFullYear();return o},t.once=function(e,t,o){e.addEventListener(t,function(n){return n.target.removeEventListener(t,arguments.callee),o(n)})},t.downloadFile=s,t.writeFile=a,t.loadJS=function(e){var t=(0,p.deferred)(),o=window.document.getElementsByTagName("script")[0],n=window.document.createElement("script");return n.src=e,n.async=!0,o.parentNode.insertBefore(n,o),n.onload=function(){t.resolve()},t.promise},t.getCompleteHtml=i,t.saveAsHtml=function(e){var t=(0,l.computeHtml)(e.html,e.htmlMode),o=(0,l.computeCss)(e.css,e.cssMode),n=(0,l.computeJs)(e.js,e.jsMode,!1);Promise.all([t,o,n]).then(function(t){var o=t[0].code,n=t[1].code,a=t[2].code,l=i(o,n,a,e,!0),p=new Date,d=["web-maker",p.getFullYear(),p.getMonth()+1,p.getDate(),p.getHours(),p.getMinutes(),p.getSeconds()].join("-");e.title&&(d=e.title),d+=".html";var c=new Blob([l],{type:"text/html;charset=UTF-8"});s(d,c),(0,r.trackEvent)("fn","saveFileComplete")})},t.handleDownloadsPermission=function(){var e=(0,p.deferred)();return window.IS_EXTENSION?(chrome.permissions.contains({permissions:["downloads"]},function(t){t?e.resolve():chrome.permissions.request({permissions:["downloads"]},function(t){t?((0,r.trackEvent)("fn","downloadsPermGiven"),e.resolve()):e.reject()})}),e.promise):(e.resolve(),e.promise)},t.getFilenameFromUrl=function(e){return e?e.match(/\/([^/]*)$/)[1]:""},t.prettify=function(e){var t=1n?e.classList.add("is-minimized"):e.classList.remove("is-minimized"),-1===e.style[o].indexOf("100% - "+2*k+"px")?e.classList.remove("is-maximized"):e.classList.add("is-maximized")})},50)},t.prototype.toggleCodeWrapCollapse=function(e){if(e.classList.contains("is-minimized")||e.classList.contains("is-maximized"))e.classList.remove("is-minimized"),e.classList.remove("is-maximized"),this.codeSplitInstance.setSizes([33.3,33.3,33.3]);else{var t=parseInt(e.dataset.codeWrapId,10),o=[k+"px",k+"px",k+"px"];o[t]="calc(100% - "+2*k+"px)",this.codeSplitInstance.setSizes(o),e.classList.add("is-maximized")}this.updateSplits()},t.prototype.collapseBtnHandler=function(t){var e=t.currentTarget.parentElement.parentElement.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneCollapseBtnClick",e.dataset.type)},t.prototype.codeWrapHeaderDblClickHandler=function(t){if(t.target.classList.contains("js-code-wrap__header")){var e=t.target.parentElement;this.toggleCodeWrapCollapse(e),(0,m.trackEvent)("ui","paneHeaderDblClick",e.dataset.type)}},t.prototype.resetSplitting=function(){this.setState({codeSplitSizes:this.getCodeSplitSizes(),mainSplitSizes:this.getMainSplitSizesToApply()})},t.prototype.updateSplits=function(){this.props.onSplitUpdate(),this.state.codeSplitSizes=this.props.currentItem.sizes,this.state.mainSplitSizes=this.props.currentItem.mainSizes},t.prototype.getMainSplitSizesToApply=function(){var e,t=this.props,o=t.currentItem,n=t.currentLayoutMode;return e=o&&o.mainSizes?3===n?[o.mainSizes[1],o.mainSizes[0]]:o.mainSizes:5===n?[75,25]:[50,50],e},t.prototype.getCodeSplitSizes=function(){return this.props.currentItem&&this.props.currentItem.sizes?this.props.currentItem.sizes:[33.33,33.33,33.33]},t.prototype.mainSplitDragEndHandler=function(){var e=this;this.props.prefs.refreshOnResize&&setTimeout(function(){e.setPreviewContent(!0)},1),this.updateSplits()},t.prototype.codeSplitDragStart=function(){document.body.classList.add("is-dragging")},t.prototype.codeSplitDragEnd=function(){this.updateCodeWrapCollapseStates(),document.body.classList.remove("is-dragging"),this.updateSplits()},t.prototype.handleModeRequirements=function(e){function t(){c.modes[e].hasLoaded=!0,n.resolve()}var o="lib/transpilers",n=(0,y.deferred)();return c.modes[e].hasLoaded?(n.resolve(),n.promise):(e===c.HtmlModes.JADE?(0,h.loadJS)(o+"/jade.js").then(t):e===c.HtmlModes.MARKDOWN?(0,h.loadJS)(o+"/marked.js").then(t):e===c.CssModes.LESS?(0,h.loadJS)(o+"/less.min.js").then(t):e===c.CssModes.SCSS||e===c.CssModes.SASS?(0,h.loadJS)(o+"/sass.js").then(function(){window.sass=new Sass(o+"/sass.worker.js"),t()}):e===c.CssModes.STYLUS?(0,h.loadJS)(o+"/stylus.min.js").then(t):e===c.CssModes.ACSS?(0,h.loadJS)(o+"/atomizer.browser.js").then(t):e===c.JsModes.COFFEESCRIPT?(0,h.loadJS)(o+"/coffee-script.js").then(t):e===c.JsModes.ES6?(0,h.loadJS)(o+"/babel.min.js").then(t):e===c.JsModes.TS?(0,h.loadJS)(o+"/typescript.js").then(t):n.resolve(),n.promise)},t.prototype.updateHtmlMode=function(e){return this.props.onCodeModeChange("html",e),this.props.currentItem.htmlMode=e,this.cm.html.setOption("mode",c.modes[e].cmMode),g.default.autoLoadMode(this.cm.html,c.modes[e].cmPath||c.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateCssMode=function(e){return this.props.onCodeModeChange("css",e),this.props.currentItem.cssMode=e,this.cm.css.setOption("mode",c.modes[e].cmMode),this.cm.css.setOption("readOnly",c.modes[e].cmDisable),window.cssSettingsBtn.classList[c.modes[e].hasSettings?"remove":"add"]("hide"),g.default.autoLoadMode(this.cm.css,c.modes[e].cmPath||c.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.updateJsMode=function(e){return this.props.onCodeModeChange("js",e),this.props.currentItem.jsMode=e,this.cm.js.setOption("mode",c.modes[e].cmMode),g.default.autoLoadMode(this.cm.js,c.modes[e].cmPath||c.modes[e].cmMode),this.handleModeRequirements(e)},t.prototype.codeModeChangeHandler=function(t){var e=this,o=t.target.value,n=t.target.dataset.type,s=this.props.currentItem["html"===n?"htmlMode":"css"===n?"cssMode":"jsMode"];s!==o&&("html"===n?this.updateHtmlMode(o).then(function(){return e.setPreviewContent(!0)}):"js"===n?this.updateJsMode(o).then(function(){return e.setPreviewContent(!0)}):"css"===n&&this.updateCssMode(o).then(function(){return e.setPreviewContent(!0)}),(0,m.trackEvent)("ui","updateCodeMode",o))},t.prototype.detachPreview=function(){var e=this;if(this.detachedWindow)return void this.detachedWindow.focus();var t=this.frame.getBoundingClientRect(),o=t.width,n=t.height;document.body.classList.add("is-detached-mode"),this.detachedWindow=window.open("./preview.html","Web Maker","width="+o+",height="+n+",resizable,scrollbars=yes,status=1"),setTimeout(function(){e.setPreviewContent(!0)},1500);var s=window.setInterval(function(){e.detachedWindow&&e.detachedWindow.closed&&(clearInterval(s),document.body.classList.remove("is-detached-mode"),e.detachedWindow=null,e.setPreviewContent(!0))},500)},t.prototype.updateLogCount=function(){window.logCountEl&&(logCountEl.textContent=this.logCount)},t.prototype.onMessageFromConsole=function(){var e=this;[].concat(Array.prototype.slice.call(arguments)).forEach(function(t){t&&t.indexOf&&-1!==t.indexOf("filesystem:chrome-extension")&&(t=t.replace(/filesystem:chrome-extension.*\.js:(\d+):*(\d*)/g,"script $1:$2"));try{e.consoleCm.replaceRange(t+" "+((t+"").match(/\[object \w+]/)?JSON.stringify(t):"")+"\n",{line:Infinity})}catch(t){e.consoleCm.replaceRange("\uD83C\uDF00\n",{line:Infinity})}e.consoleCm.scrollTo(0,Infinity),e.logCount++}),this.updateLogCount()},t.prototype.previewException=function(e){console.error("Possible infinite loop detected.",e.stack),this.onMessageFromConsole("Possible infinite loop detected.",e.stack)},t.prototype.toggleConsole=function(){this.setState({isConsoleOpen:!this.state.isConsoleOpen}),(0,m.trackEvent)("ui","consoleToggle")},t.prototype.consoleHeaderDblClickHandler=function(t){t.target.classList.contains("js-console__header")&&((0,m.trackEvent)("ui","consoleToggleDblClick"),this.toggleConsole())},t.prototype.clearConsole=function(){this.consoleCm.setValue(""),this.logCount=0,this.updateLogCount()},t.prototype.clearConsoleBtnClickHandler=function(){this.clearConsole(),(0,m.trackEvent)("ui","consoleClearBtnClick")},t.prototype.evalConsoleExpr=function(t){(76===t.which||12===t.which)&&t.ctrlKey?(this.clearConsole(),(0,m.trackEvent)("ui","consoleClearKeyboardShortcut")):13===t.which&&(this.onMessageFromConsole("> "+t.target.value),this.frame.contentWindow._wmEvaluate(t.target.value),t.target.value="",(0,m.trackEvent)("fn","evalConsoleExpr"))},t.prototype.cssSettingsBtnClickHandler=function(){this.setState({isCssSettingsModalOpen:!0}),(0,m.trackEvent)("ui","cssSettingsBtnClick")},t.prototype.cssSettingsChangeHandler=function(e){this.props.onCodeSettingsChange("css",e),this.setPreviewContent(!0)},t.prototype.getDemoFrame=function(e){e(this.frame)},t.prototype.editorFocusHandler=function(e){this.props.onEditorFocus(e)},t.prototype.render=function(){var e=this;return(0,r.h)(u.SplitPane,{class:"content-wrap flex flex-grow",sizes:this.state.mainSplitSizes,minSize:150,style:"",direction:2===this.props.currentLayoutMode?"vertical":"horizontal",onDragEnd:this.mainSplitDragEndHandler.bind(this)},(0,r.h)(u.SplitPane,{class:"code-side",id:"js-code-side",sizes:this.state.codeSplitSizes,minSize:k,direction:2===this.props.currentLayoutMode||5===this.props.currentLayoutMode?"horizontal":"vertical",onDragStart:this.codeSplitDragStart.bind(this),onDragEnd:this.codeSplitDragEnd.bind(this),onSplit:function(t){return e.codeSplitInstance=t}},(0,r.h)("div",{"data-code-wrap-id":"0",id:"htmlCodeEl","data-type":"html",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",dropdow:!0,title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},c.modes[this.props.currentItem.htmlMode||"html"].label),S,(0,r.h)("select",{"data-type":"html",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.htmlMode},w,M,_)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"htmlmixed",profile:"xhtml",gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],noAutocomplete:!0,matchTags:{bothTags:!0},prettier:!0,prettierParser:"html",emmet:!0},prefs:this.props.prefs,onChange:this.onHtmlCodeChange.bind(this),onCreation:function(t){return e.cm.html=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"1",id:"cssCodeEl","data-type":"css",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},c.modes[this.props.currentItem.cssMode||"css"].label),x,(0,r.h)("select",{"data-type":"css",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.cssMode},H,I,L,j,E,A)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{href:"#",id:"cssSettingsBtn",title:"Atomic CSS configuration",onClick:this.cssSettingsBtnClickHandler.bind(this),class:"code-wrap__header-btn hide"},B),(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"css",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"],emmet:!0,prettier:!0,prettierParser:"css"},prefs:this.props.prefs,onChange:this.onCssCodeChange.bind(this),onCreation:function(t){return e.cm.css=t},onFocus:this.editorFocusHandler.bind(this)})),(0,r.h)("div",{"data-code-wrap-id":"2",id:"jsCodeEl","data-type":"js",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},(0,r.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},(0,r.h)("label",{class:"btn-group",title:"Click to change"},(0,r.h)("span",{class:"code-wrap__header-label"},c.modes[this.props.currentItem.jsMode||"js"].label),O,(0,r.h)("select",{"data-type":"js",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.jsMode},T,P,D,V)),(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),(0,r.h)(d.default,{options:{mode:"javascript",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"],prettier:!0,prettierParser:"js"},prefs:this.props.prefs,autoComplete:this.props.prefs.autoComplete,onChange:this.onJsCodeChange.bind(this),onCreation:function(t){return e.cm.js=t},onFocus:this.editorFocusHandler.bind(this)}))),(0,r.h)("div",{class:"demo-side",id:"js-demo-side",style:""},(0,r.h)("iframe",{ref:function(t){return e.frame=t},src:"about://blank",frameborder:"0",id:"demo-frame",allowfullscreen:!0}),(0,r.h)(b.Console,{isConsoleOpen:this.state.isConsoleOpen,onConsoleHeaderDblClick:this.consoleHeaderDblClickHandler.bind(this),onClearConsoleBtnClick:this.clearConsoleBtnClickHandler.bind(this),toggleConsole:this.toggleConsole.bind(this),onEvalInputKeyup:this.evalConsoleExpr.bind(this),onReady:function(t){return e.consoleCm=t}}),(0,r.h)(C.default,{show:this.state.isCssSettingsModalOpen,closeHandler:function(){return e.setState({isCssSettingsModalOpen:!1})},onChange:this.cssSettingsChangeHandler.bind(this),settings:this.props.currentItem.cssSettings,editorTheme:this.props.prefs.editorTheme})))},t}(r.Component);t.default=F},"9VU0":function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}t.__esModule=!0,t.LibraryAutoSuggest=void 0;var i=function(){function e(e,t){for(var o,n=0;n"+t[o].name+"";e.isShowingSuggestions=!0,e.textareaBounds||(e.textareaBounds=e.t.getBoundingClientRect(),e.list.style.top=e.textareaBounds.bottom+"px",e.list.style.left=e.textareaBounds.left+"px",e.list.style.width=e.textareaBounds.width+"px"),e.list.classList.add("is-open")})},500)}},t.prototype.onKeyDown=function(e){var t;this.isShowingSuggestions&&(27===e.keyCode&&(this.closeSuggestions(),e.stopPropagation()),40===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.nextElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):38===e.keyCode&&this.isShowingSuggestions?(t=this.list.querySelector(".selected"),t?(t.classList.remove("selected"),t.previousElementSibling.classList.add("selected")):this.list.querySelector("li:first-child").classList.add("selected"),this.list.querySelector(".selected").scrollIntoView(!1),e.preventDefault()):13===e.keyCode&&this.isShowingSuggestions&&(t=this.list.querySelector(".selected"),this.selectSuggestion(t.dataset.url),this.closeSuggestions()))},t.prototype.listMouseDownHandler=function(e){var t=e.target;t.parentElement.dataset.url&&this.selectSuggestion(t.parentElement.dataset.url)},t.prototype.selectSuggestion=function(e){this.t.focus(),(0,l.trackEvent)("ui","autoSuggestionLibSelected",e),this.selectedCallback?this.selectedCallback.call(null,e):this.replaceCurrentLine(e),this.closeSuggestions()},t.prototype.render=function(){var e=this;return(0,r.h)("div",{class:"btn-group "+(this.props.fullWidth?"flex-grow":""),ref:function(t){return e.wrap=t}},this.props.children,(0,r.h)("ul",{ref:function(t){return e.list=t},class:"dropdown__menu autocomplete-dropdown",onMouseDown:this.listMouseDownHandler.bind(this)}),(0,r.h)("div",{ref:function(t){return e.loader=t},class:"loader autocomplete__loader",style:"display:none"}))},i(t,[{key:"currentLineNumber",get:function(){return this.t.value.substr(0,this.t.selectionStart).split("\n").length}},{key:"currentLine",get:function(){var e=this.currentLineNumber;return this.t.value.split("\n")[e-1]}}]),t}(r.Component)},BcU7:function(e,t,o){"use strict";function n(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,o){function n(s,a){try{var i=t[s](a),r=i.value}catch(e){return void o(e)}return i.done?void e(r):Promise.resolve(r).then(function(e){n("next",e)},function(e){n("throw",e)})}return n("next")})}}var s=Object.assign||function(e){for(var t,o=1;o+l&&(a=Math.floor((r-l)/1e3/3600/24)),i.setState({daysLeft:a}),i}return a(t,e),t.prototype.render=function(){var e=this.props.codeSize?(this.props.codeSize/1024).toFixed(2):0;return(0,i.h)("div",{role:"button",class:"flex flex-v-center",tabIndex:"0",onClick:this.props.onClick,onBlur:this.props.onBlur},l," ",(0,i.h)("div",{class:"footer__js13k-days-left"},this.state.daysLeft," days to go"),(0,i.h)("div",{class:"footer__js13k-code-size",style:{color:10Hello, World!\"}"})),ne=(0,d.h)(S.default,null),se=(0,d.h)("p",null,"Web Maker app has a new home on"," ",(0,d.h)("a",{href:"https://webmaker.app/app",target:"_blank"},"https://webmaker.app/app"),". This deprecated version will be discontinued from 10 March 2020."),ae=(0,d.h)("p",null,"Migrating to new web app is simple! If you are logged in, all your creations are saved in your cloud account. So simply login in the new web app and you are good to go!"),ie=(0,d.h)("p",null,"If you save everything locally here, you can do following steps to migrate your creations:"),re=(0,d.h)("li",null,"Go to new web app -"," ",(0,d.h)("a",{href:"https://webmaker.app/app",target:"_blank"},"https://webmaker.app/app")),le=(0,d.h)("li",null,"Click on \"Open\" in the header and then \"Import\". And import the file created in above step. And done!"),de=(0,d.h)("p",null,"In case you face any issue, please"," ",(0,d.h)("a",{target:"_blank",href:"https://github.com/chinchang/web-maker/issues"},"open an issue")," ","or mail me at chinchang457@gmail.com"),pe=(0,d.h)(G.Icons,null),ce=(0,d.h)("form",{style:"display:none;",action:"https://codepen.io/pen/define",method:"POST",target:"_blank",id:"codepenForm"},(0,d.h)("input",{type:"hidden",name:"data",value:"{\"title\": \"New Pen!\", \"html\": \"
Hello, World!
\"}"})),he=function(e){function t(){a(this,t);var o=i(this,e.call(this));return o.AUTO_SAVE_INTERVAL=15000,o.modalDefaultStates={isModalOpen:!1,isAddLibraryModalOpen:!1,isSettingsModalOpen:!1,isHelpModalOpen:!1,isNotificationsModalOpen:!1,isLoginModalOpen:!1,isProfileModalOpen:!1,isSupportDeveloperModalOpen:!1,isKeyboardShortcutsModalOpen:!1,isAskToImportModalOpen:!1,isOnboardModalOpen:!1,isJs13KModalOpen:!1,isCreateNewModalOpen:!1},o.state=l({isSavedItemPaneOpen:!1},o.modalDefaultStates,{prefs:{},currentItem:{title:"",externalLibs:{js:"",css:""}}}),o.defaultSettings={preserveLastCode:!0,replaceNewTab:!1,htmlMode:"html",jsMode:"js",cssMode:"css",isCodeBlastOn:!1,indentWith:"spaces",indentSize:2,editorTheme:"monokai",keymap:"sublime",fontSize:16,refreshOnResize:!1,autoPreview:!0,editorFont:"FiraCode",editorCustomFont:"",autoSave:!0,autoComplete:!0,preserveConsoleLogs:!0,lightVersion:!1,lineWrap:!0,infiniteLoopTimeout:1e3,layoutMode:2,isJs13kModeOn:!1,autoCloseTags:!0},o.prefs={},O.default.auth().onAuthStateChanged(function(e){o.setState({isLoginModalOpen:!1}),e?((0,M.log)("You are -> ",e),A.alertsService.add("You are now logged in!"),o.setState({user:e}),window.user=e,!window.localStorage[Q.ASKED_TO_IMPORT_CREATIONS]&&o.fetchItems(!1,!0).then(function(e){e.length&&(o.oldSavedItems=e,o.oldSavedCreationsCount=e.length,o.setState({isAskToImportModalOpen:!0}),(0,j.trackEvent)("ui","askToImportModalSeen"))}),window.db.getUser(e.uid).then(function(t){if(t){var n=l({},o.state.prefs);l(n,e.settings),o.setState({prefs:n}),o.updateSetting()}})):(o.setState({user:void 0}),delete window.user),o.updateProfileUi()}),o}return r(t,e),t.prototype.componentWillMount=function(){var e,t=this;window.onunload=function(){t.saveCode("code"),t.detachedWindow&&t.detachedWindow.close()},db.local.get({layoutMode:1,code:""},function(o){t.toggleLayout(o.layoutMode),t.state.prefs.layoutMode=o.layoutMode,o.code&&(e=o.code)}),db.getSettings(this.defaultSettings).then(function(o){o.preserveLastCode&&e?(t.setState({unsavedEditCount:0}),e.id&&window.IS_EXTENSION?db.local.get(e.id,function(o){o[e.id]&&((0,M.log)("Load item ",e.id),t.setCurrentItem(o[e.id]).then(function(){return t.refreshEditor()}))}):((0,M.log)("Load last unsaved item",e),t.setCurrentItem(e).then(function(){return t.refreshEditor()}))):t.createNewItem(),l(t.state.prefs,o),t.setState({prefs:t.state.prefs}),t.updateSetting()}),db.getUserLastSeenVersion().then(function(e){e||(t.setState({isOnboardModalOpen:!0}),-1===document.cookie.indexOf("onboarded")&&((0,j.trackEvent)("ui","onboardModalSeen",ee),document.cookie="onboarded=1"),window.db.setUserLastSeenVersion(ee)),e&&-1===(0,M.semverCompare)(e,ee)&&!window.localStorage.pledgeModalSeen&&(t.openSupportDeveloperModal(),window.localStorage.pledgeModalSeen=!0),e&&-1!==(0,M.semverCompare)(e,ee)||(t.setState({hasUnseenChangelog:!0}),t.hasSeenNotifications=!1)})},t.prototype.updateProfileUi=function(){this.state.user?document.body.classList.add("is-logged-in"):document.body.classList.remove("is-logged-in")},t.prototype.refreshEditor=function(){this.toggleLayout(this.state.currentItem.layoutMode||this.state.prefs.layoutMode),this.updateExternalLibCount(),this.contentWrap.refreshEditor()},t.prototype.forkItem=function(e){var t=this;if(this.state.unsavedEditCount){var o=confirm("You have unsaved changes in your current work. Do you want to discard unsaved changes and continue?");if(!o)return}var n=JSON.parse(JSON.stringify(e));delete n.id,n.title="(Forked) "+e.title,n.updatedOn=Date.now(),this.setCurrentItem(n).then(function(){return t.refreshEditor()}),A.alertsService.add("\""+e.title+"\" was forked"),(0,j.trackEvent)("fn","itemForked")},t.prototype.createNewItem=function(){var e=this,t=new Date;this.setCurrentItem({title:"Untitled "+t.getDate()+"-"+(t.getMonth()+1)+"-"+t.getHours()+":"+t.getMinutes(),html:"",css:"",js:"",externalLibs:{js:"",css:""},layoutMode:this.state.currentLayoutMode}).then(function(){return e.refreshEditor()}),A.alertsService.add("New item created")},t.prototype.openItem=function(e){var t=this;this.setCurrentItem(e).then(function(){return t.refreshEditor()}),A.alertsService.add("Saved item loaded")},t.prototype.removeItem=function(e){var t=this,o=confirm("Are you sure you want to delete \""+e.title+"\"?");o&&(_.itemService.unsetItemForUser(e.id),_.itemService.removeItem(e.id).then(function(){A.alertsService.add("Item removed.",e),t.state.currentItem.id===e.id&&t.createNewItem()}),delete this.state.savedItems[e.id],this.setState({savedItems:l({},this.state.savedItems)}),(0,j.trackEvent)("fn","itemRemoved"))},t.prototype.setCurrentItem=function(e){var t=(0,E.deferred)();return e.htmlMode=e.htmlMode||this.state.prefs.htmlMode||L.HtmlModes.HTML,e.cssMode=e.cssMode||this.state.prefs.cssMode||L.CssModes.CSS,e.jsMode=e.jsMode||this.state.prefs.jsMode||L.JsModes.JS,this.setState({currentItem:e},t.resolve),this.isAutoSavingEnabled=!1,this.setState({unsavedEditCount:0}),t.promise},t.prototype.saveBtnClickHandler=function(){(0,j.trackEvent)("ui","saveBtnClick",this.state.currentItem.id?"saved":"new"),this.saveItem()},t.prototype.populateItemsInSavedPane=function(){this.setState({savedItems:l({},this.state.savedItems)}),this.toggleSavedItemsPane()},t.prototype.toggleSavedItemsPane=function(e){this.setState({isSavedItemPaneOpen:void 0===e?!this.state.isSavedItemPaneOpen:e}),this.state.isSavedItemPaneOpen?window.searchInput.focus():window.searchInput.value="",document.body.classList[this.state.isSavedItemPaneOpen?"add":"remove"]("overlay-visible")},t.prototype.fetchItems=function(){var e=s(function*(e,t){var o=this,n=(0,E.deferred)();this.state.savedItems={};var s=[];return window.user&&!t?(s=yield _.itemService.getAllItems(),(0,M.log)("got items"),e&&s.forEach(function(e){o.state.savedItems[e.id]=e}),n.resolve(s),n.promise):(db.local.get("items",function(t){var a=Object.getOwnPropertyNames(t.items||{});a.length||n.resolve([]),(0,j.trackEvent)("fn","fetchItems",a.length);for(var r=function(t){db.local.get(a[t],function(i){e&&(o.state.savedItems[a[t]]=i[a[t]]),s.push(i[a[t]]),a.length===s.length&&n.resolve(s)})},l=0;lwindow.innerWidth?2:e,this.state.currentLayoutMode===e?(this.contentWrap.resetSplitting(),void this.setState({currentLayoutMode:e})):void([1,2,3,4,5].forEach(function(e){window["layoutBtn"+e].classList.remove("selected"),document.body.classList.remove("layout-"+e)}),$("#layoutBtn"+e).classList.add("selected"),document.body.classList.add("layout-"+e),this.setState({currentLayoutMode:e},function(){t.contentWrap.resetSplitting(),t.contentWrap.setPreviewContent(!0)}))},t.prototype.layoutBtnClickHandler=function(e){this.saveSetting("layoutMode",e),(0,j.trackEvent)("ui","toggleLayoutClick",e),this.toggleLayout(e)},t.prototype.getCodePaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t||5===t?"width":"height";try{e=[htmlCodeEl.style[o],cssCodeEl.style[o],jsCodeEl.style[o]]}catch(t){e=[33.33,33.33,33.33]}finally{return e}},t.prototype.getMainPaneSizes=function(){var e,t=this.state.currentLayoutMode,o=2===t?"height":"width";try{e=[+$("#js-code-side").style[o].match(/([\d.]+)%/)[1],+$("#js-demo-side").style[o].match(/([\d.]+)%/)[1]]}catch(t){e=[50,50]}finally{return e}},t.prototype.saveSetting=function(e,t){var o,n=(0,E.deferred)(),s=(o={},o[e]=t,o);return db.local.set(s,n.resolve),n.promise},t.prototype.saveCode=function(e){return this.state.currentItem.updatedOn=Date.now(),this.state.currentItem.layoutMode=this.state.currentLayoutMode,this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes(),(0,M.log)("saving key",e||this.state.currentItem.id,this.state.currentItem),_.itemService.setItem(e||this.state.currentItem.id,this.state.currentItem).then(function(){window.user&&!navigator.onLine?A.alertsService.add("Item saved locally. Will save to account when you are online."):A.alertsService.add("Item saved."),this.setState({unsavedEditCount:0})}.bind(this))},t.prototype.saveItem=function(){var e=this;if(!window.user&&!window.localStorage[Q.LOGIN_AND_SAVE_MESSAGE_SEEN]){var t=confirm("Saving without signing in will save your work only on this machine and this browser. If you want it to be secure & available anywhere, please login in your account and then save.\n\nDo you still want to continue saving locally?");if(window.localStorage[Q.LOGIN_AND_SAVE_MESSAGE_SEEN]=!0,!t)return(0,j.trackEvent)("ui",Q.LOGIN_AND_SAVE_MESSAGE_SEEN,"login"),this.closeAllOverlays(),void this.setState({isLoginModalOpen:!0});(0,j.trackEvent)("ui",Q.LOGIN_AND_SAVE_MESSAGE_SEEN,"local")}var o=!this.state.currentItem.id;this.state.currentItem.id=this.state.currentItem.id||"item-"+(0,M.generateRandomId)(),this.setState({isSaving:!0}),this.saveCode().then(function(){e.setState({isSaving:!1}),!e.isAutoSavingEnabled&&e.state.prefs.autoSave&&(e.isAutoSavingEnabled=!0,A.alertsService.add("Auto-save enabled."))}),o&&_.itemService.setItemForUser(this.state.currentItem.id)},t.prototype.onCodeModeChange=function(e,t){var o=l({},this.state.currentItem);o[e+"Mode"]=t,this.setState({currentItem:o})},t.prototype.onCodeChange=function(e,t,o){var n=this;this.state.currentItem[e]=t,o&&(this.setState({unsavedEditCount:this.state.unsavedEditCount+1}),0==this.state.unsavedEditCount%X&&this.state.unsavedEditCount>=X&&(window.saveBtn.classList.add("animated"),window.saveBtn.classList.add("wobble"),window.saveBtn.addEventListener("animationend",function(){window.saveBtn.classList.remove("animated"),window.saveBtn.classList.remove("wobble")}))),this.state.prefs.isJs13kModeOn&&(this.codeSizeCalculationTimeout&&clearTimeout(this.codeSizeCalculationTimeout),this.codeSizeCalculationTimeout=setTimeout(function(){n.calculateCodeSize(),n.codeSizeCalculationTimeout=null},1e3))},t.prototype.onCodeSettingsChange=function(e,t){this.state.currentItem[e+"Settings"]={acssConfig:t}},t.prototype.titleInputBlurHandler=function(t){this.state.currentItem.title=t.target.value,this.state.currentItem.id&&(this.saveItem(),(0,j.trackEvent)("ui","titleChanged"))},t.prototype.updateSetting=function(t){var e=this;if(t){var o=t.target.dataset.setting,n={},s=t.target;(0,M.log)(o,"checkbox"===s.type?s.checked:s.value);var a=l({},this.state.prefs);a[o]="checkbox"===s.type?s.checked:s.value,n[o]=a[o],this.setState({prefs:a}),db.sync.set(n,function(){A.alertsService.add("Setting saved")}),window.user&&window.db.getDb().then(function(t){var n;t.collection("users").doc(window.user.uid).update((n={},n["settings."+o]=e.state.prefs[o],n)).then(function(e){(0,M.log)("Setting \""+o+"\" for user",e)}).catch(function(e){return(0,M.log)(e)})}),(0,j.trackEvent)("ui","updatePref-"+o,a[o])}var i=this.state.prefs;runBtn.classList[i.autoPreview?"add":"remove"]("hide"),this.contentWrap.applyCodemirrorSettings(this.state.prefs),i.autoSave?!this.autoSaveInterval&&(this.autoSaveInterval=setInterval(function(){e.autoSaveLoop()},this.AUTO_SAVE_INTERVAL)):(clearInterval(this.autoSaveInterval),this.autoSaveInterval=null),document.body.classList[i.lightVersion?"add":"remove"]("light-version")},t.prototype.autoSaveLoop=function(){this.isAutoSavingEnabled&&this.state.unsavedEditCount&&this.saveItem()},t.prototype.loginBtnClickHandler=function(){this.setState({isLoginModalOpen:!0})},t.prototype.profileBtnClickHandler=function(){this.setState({isProfileModalOpen:!0})},t.prototype.logout=function(){if(this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to logout?");if(!e)return}(0,j.trackEvent)("fn","loggedOut"),P.auth.logout(),this.setState({isProfileModalOpen:!1}),A.alertsService.add("Log out successfull")},t.prototype.itemClickHandler=function(e){var t=this;setTimeout(function(){t.openItem(e)},350),this.toggleSavedItemsPane()},t.prototype.itemRemoveBtnClickHandler=function(e){this.removeItem(e)},t.prototype.itemForkBtnClickHandler=function(e){var t=this;this.toggleSavedItemsPane(),setTimeout(function(){t.forkItem(e)},350)},t.prototype.newBtnClickHandler=function(){if((0,j.trackEvent)("ui","newBtnClick"),this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to create something new?");e&&this.setState({isCreateNewModalOpen:!0})}else this.setState({isCreateNewModalOpen:!0})},t.prototype.openBtnClickHandler=function(){(0,j.trackEvent)("ui","openBtnClick"),this.openSavedItemsPane()},t.prototype.detachedPreviewBtnHandler=function(){(0,j.trackEvent)("ui","detachPreviewBtnClick"),this.contentWrap.detachPreview()},t.prototype.notificationsBtnClickHandler=function(){return this.setState({isNotificationsModalOpen:!0}),this.state.isNotificationsModalOpen&&!this.hasSeenNotifications&&(this.hasSeenNotifications=!0,this.setState({hasUnseenChangelog:!1}),window.db.setUserLastSeenVersion(ee)),(0,j.trackEvent)("ui","notificationButtonClick",ee),!1},t.prototype.codepenBtnClickHandler=function(t){if(this.state.currentItem.cssMode===L.CssModes.ACSS)return alert("Oops! CodePen doesn't supports Atomic CSS currently. \nHere is something you can still do -> https://medium.com/web-maker/sharing-your-atomic-css-work-on-codepen-a402001b26ab"),void t.preventDefault();var e={title:"A Web Maker experiment",html:this.state.currentItem.html,css:this.state.currentItem.css,js:this.state.currentItem.js,html_pre_processor:L.modes[this.state.currentItem.htmlMode].codepenVal,css_pre_processor:L.modes[this.state.currentItem.cssMode].codepenVal,js_pre_processor:L.modes[this.state.currentItem.jsMode].codepenVal,css_external:this.state.currentItem.externalLibs.css.split("\n").join(";"),js_external:this.state.currentItem.externalLibs.js.split("\n").join(";")};this.state.currentItem.title.match(/Untitled\s\d\d*-\d/)||(e.title=this.state.currentItem.title),e=JSON.stringify(e),window.codepenForm.querySelector("input").value=e,window.codepenForm.submit(),(0,j.trackEvent)("ui","openInCodepen"),t.preventDefault()},t.prototype.saveHtmlBtnClickHandler=function(t){(0,M.saveAsHtml)(this.state.currentItem),(0,j.trackEvent)("ui","saveHtmlClick"),t.preventDefault()},t.prototype.runBtnClickHandler=function(){this.contentWrap.setPreviewContent(!0,!0),(0,j.trackEvent)("ui","runBtnClick")},t.prototype.exportItems=function(){var e=this;(0,M.handleDownloadsPermission)().then(function(){e.fetchItems().then(function(e){var t=new Date,o=["web-maker-export",t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].join("-");o+=".json";var n=new Blob([JSON.stringify(e,!1,2)],{type:"application/json;charset=UTF-8"});(0,M.downloadFile)(o,n),(0,j.trackEvent)("fn","exportItems")})})},t.prototype.exportBtnClickHandler=function(t){this.exportItems(),t.preventDefault(),(0,j.trackEvent)("ui","exportBtnClicked")},t.prototype.screenshotBtnClickHandler=function(t){this.contentWrap.getDemoFrame(function(e){(0,F.takeScreenshot)(e.getBoundingClientRect())}),t.preventDefault()},t.prototype.openSupportDeveloperModal=function(){this.closeAllOverlays(),this.setState({isSupportDeveloperModalOpen:!0})},t.prototype.supportDeveloperBtnClickHandler=function(t){this.openSupportDeveloperModal(t)},t.prototype.dontAskToImportAnymore=function(t){this.setState({isAskToImportModalOpen:!1}),window.localStorage[Q.ASKED_TO_IMPORT_CREATIONS]=!0,t&&(0,j.trackEvent)("ui","dontAskToImportBtnClick")},t.prototype.mergeImportedItems=function(e){var t=[],o={},n=(0,E.deferred)(),s=this.state.savedItems;e.forEach(function(e){s[e.id]?t.push(e.id):((0,M.log)("merging",e.id),o[e.id]=e)});var a=e.length-t.length;if(t.length){var i=confirm(t.length+" creations already exist. Do you want to replace them?");i&&((0,M.log)("shouldreplace",i),e.forEach(function(e){o[e.id]=e}),a=e.length)}return a?_.itemService.saveItems(o).then(function(){n.resolve(),A.alertsService.add(a+" creations imported successfully."),(0,j.trackEvent)("fn","itemsImported",a)}):n.resolve(),this.closeSavedItemsPane(),n.promise},t.prototype.importCreationsAndSettingsIntoApp=function(){var e=this;this.mergeImportedItems(this.oldSavedItems).then(function(){(0,j.trackEvent)("fn","oldItemsImported"),e.dontAskToImportAnymore()})},t.prototype.editorFocusHandler=function(e){this.editorWithFocus=e},t.prototype.modalOverlayClickHandler=function(){this.closeAllOverlays()},t.prototype.splitUpdateHandler=function(){this.state.currentItem.sizes=this.getCodePaneSizes(),this.state.currentItem.mainSizes=this.getMainPaneSizes()},t.prototype.calculateTextSize=function(e){if(!e)return 0;var t=/(\r?\n|\r)/g,o=/(\r?\n|\r|\s+)/g;return{count:function(e,n){n=n||{},n.lineBreaks=n.lineBreaks||1,n.ignoreWhitespace=n.ignoreWhitespace||!1;var s=e.length,a=s-e.replace(/[\u0100-\uFFFF]/g,"").length,i=s-e.replace(t,"").length;return n.ignoreWhitespace?(e=e.replace(o,""),e.length+a):s+a+Math.max(0,n.lineBreaks*(i-1))},format:function(e,t){for(var o=0;1024"+e+"")+" "+o+"B"}}.count(e)},t.prototype.getExternalLibCode=function(){var e=this.state.currentItem,t=e.externalLibs&&e.externalLibs.js||"";return t+="\n"+e.externalLibs&&e.externalLibs.css||"",t=t.split("\n").filter(function(e){return e}),t.map(function(e){return fetch(e).then(function(e){return e.text()}).then(function(t){return{code:t,fileName:(0,M.getFilenameFromUrl)(e)}})})},t.prototype.calculateCodeSize=function(){var e=this,t=this.state.currentItem,o=(0,w.computeHtml)(t.html,t.htmlMode),n=(0,w.computeCss)(t.css,t.cssMode),s=(0,w.computeJs)(t.js,t.jsMode,!1);Promise.all([o,n,s].concat(this.getExternalLibCode())).then(function(o){var n=o[0].code||"",s=o[1].code||"",a=o[2].code||"",r=(0,M.getCompleteHtml)(n,s,a,t,!0);r=r.replace(/