diff --git a/app/script.js b/app/script.js
index 0aec897..46a4889 100644
--- a/app/script.js
+++ b/app/script.js
@@ -77,4 +77,4 @@ if (
});
}
-webpackJsonp([0],{JkW7:function(e,t,n){"use strict";function o(){var e={},t=new Promise(function(t,n){e.resolve=t,e.reject=n});return e.promise=t,z(e,t)}function s(e,t){var n=e,s=o();return t===R.HTML?s.resolve({code:n}):t===R.MARKDOWN?s.resolve(window.marked?{code:marked(n)}:{code:n}):t===R.JADE&&s.resolve(window.jade?{code:jade.render(n)}:{code:n}),s.promise}function i(e,t,n){var s,i=e,a=o();if(t===U.CSS)a.resolve({code:i});else if(t===U.SCSS||t===U.SASS)window.sass&&i?window.sass.compile(i,{indentedSyntax:t===U.SASS},function(e){e.line&&e.message&&(s={lang:"css",data:[{lineNumber:e.line-1,message:e.message}]}),a.resolve({code:e.text,errors:s})}):a.resolve({code:i});else if(t===U.LESS)less.render(i).then(function(e){a.resolve({code:e.css})},function(e){s={lang:"css",data:[{lineNumber:e.line,message:e.message}]},a.resolve({code:"",errors:s})});else if(t===U.STYLUS)stylus(i).render(function(e,t){if(e){window.err=e;var n=e.message.split("\n");n.pop(),s={lang:"css",data:[{lineNumber:+e.message.match(/stylus:(\d+):/)[1]-298,message:n.pop()}]}}a.resolve({code:t,errors:s})});else if(t===U.ACSS)if(!window.atomizer)a.resolve({code:""});else{const e=atomizer.findClassNames(i);var r;try{r=atomizer.getConfig(e,JSON.parse(n.acssConfig))}catch(t){r=atomizer.getConfig(e,{})}const t=atomizer.getCss(r);a.resolve({code:t})}return a.promise}function a(e,t,n,s){var i,a=e,r=o();if(!a)return r.resolve(""),r.promise;if(t===K.JS)try{G.parse(a,{tolerant:!0})}catch(t){i={lang:"js",data:[{lineNumber:t.lineNumber-1,message:t.description}]}}finally{!1!==n&&(a=i?a:h(a,{timeout:s})),r.resolve({code:a,errors:i})}else if(t===K.COFFEESCRIPT){if(!window.CoffeeScript)return r.resolve(""),r.promise;try{a=CoffeeScript.compile(a,{bare:!0})}catch(t){i={lang:"js",data:[{lineNumber:t.location.first_line,message:t.message}]}}finally{!1!==n&&(a=i?a:h(a,{timeout:s})),r.resolve({code:a,errors:i})}}else if(t===K.ES6){if(!window.Babel)return r.resolve(""),r.promise;try{G.parse(a,{tolerant:!0,jsx:!0})}catch(t){i={lang:"js",data:[{lineNumber:t.lineNumber-1,message:t.description}]}}finally{a=Babel.transform(a,{presets:["latest","stage-2","react"]}).code,!1!==n&&(a=i?a:h(a,{timeout:s})),r.resolve({code:a,errors:i})}}else if(t===K.TS)try{if(!window.ts)return r.resolve({code:""}),r.promise;a=ts.transpileModule(a,{reportDiagnostics:!0,compilerOptions:{noEmitOnError:!0,diagnostics:!0,module:ts.ModuleKind.ES2015}}),a.diagnostics.length&&(i={lang:"js",data:[{message:a.diagnostics[0].messageText,lineNumber:ts.getLineOfLocalPosition(a.diagnostics[0].file,a.diagnostics[0].start)-1}]}),a=a.outputText,!1===n||i||(a=h(a,{timeout:s})),r.resolve({code:a,errors:i})}catch(t){}return r.promise}function r(e,t){for(var n=e.split("."),o=t.split("."),s=0;3>s;s++){var i=+n[s],a=+o[s];if(i>a)return 1;if(a>i)return-1;if(!isNaN(i)&&isNaN(a))return 1;if(isNaN(i)&&!isNaN(a))return-1}return 0}function l(e){for(var t="",n=e||10;n--;)t+=Z[~~(Math.random()*Z.length)];return t}function c(){window.DEBUG&&console.log(Date.now(),...arguments)}function h(e,{timeout:t}){var n=1,o=[],s="_wmloopvar",i=`\nif (Date.now() - %d > ${t}) { window.top.previewException(new Error("Infinite loop")); break;}\n`;return J.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],a=e.body.range[1],r=i.replace("%d",s+n),l="";"BlockStatement"!==e.body.type&&(r="{"+r,l="}",--t),o.push({pos:t,str:r}),o.push({pos:a,str:l}),o.push({pos:e.range[0],str:"var %d = Date.now();\n".replace("%d",s+n)}),++n;break;default:}}),o.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}function d(e){var t=new Date(e),n=t.getDate()+" "+["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]+" "+t.getFullYear();return n}function p(e,t){function n(){var n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download=e,n.style.display="none",document.body.appendChild(n),n.click(),n.remove()}window.IS_EXTENSION?chrome.downloads.download({url:window.URL.createObjectURL(t),filename:e,saveAs:!0},()=>{chrome.runtime.lastError&&n()}):n()}function u(e,t,n){function o(e){return function(){c(arguments),v("fn","error",e),u.errorCount=(u.errorCount||0)+1,4===u.errorCount&&setTimeout(function(){alert("Oops! Seems like your preview isn't updating. It's recommended to switch to the web app: https://webmakerapp.com/app/.\n\n If you still want to get the extension working, please try the following steps until it fixes:\n - Refresh Web Maker\n - Restart browser\n - Update browser\n - Reinstall Web Maker (don't forget to export all your creations from saved items pane (click the OPEN button) before reinstalling)\n\nIf nothing works, please tweet out to @webmakerApp."),v("ui","writeFileMessageSeen")},1e3)}}var s=!1;window.webkitRequestFileSystem(window.TEMPORARY,5242880,function(i){i.root.getFile(e,{create:!0},function(e){e.createWriter((e)=>{e.onwriteend=function(){return s?n():(s=!0,e.seek(0),e.write(t),!1)},e.truncate(0)},o("createWriterFail"))},o("getFileFail"))},o("webkitRequestFileSystemFail"))}function m(e){var t=o(),n=window.document.getElementsByTagName("script")[0],s=window.document.createElement("script");return s.src=e,s.async=!0,n.parentNode.insertBefore(s,n),s.onload=function(){t.resolve()},t.promise}function g(e,t,n,o,s){if(!o)return"";var i="",a="";o.externalLibs&&(i=o.externalLibs.js.split("\n").reduce(function(e,t){return e+(t?"\n":"")},""),a=o.externalLibs.css.split("\n").reduce(function(e,t){return e+(t?"\n":"")},""));var r="\n\n
\n\n"+a+"\n\n\n\n"+e+"\n"+i+"\n";if(s||(r+=""),o.jsMode===K.ES6&&(r+=""),"string"==typeof n)r+="\n\n",r}function f(e){var t=s(e.html,e.htmlMode),n=i(e.css,e.cssMode),o=a(e.js,e.jsMode,!1);Promise.all([t,n,o]).then(function(t){var n=t[0].code,o=t[1].code,s=t[2].code,i=g(n,o,s,e,!0),a=new Date,r=["web-maker",a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()].join("-");e.title&&(r=e.title),r+=".html";var l=new Blob([i],{type:"text/html;charset=UTF-8"});p(r,l),v("fn","saveFileComplete")})}function b(){var e=o();return window.IS_EXTENSION?(chrome.permissions.contains({permissions:["downloads"]},function(t){t?e.resolve():chrome.permissions.request({permissions:["downloads"]},function(t){t?(v("fn","downloadsPermGiven"),e.resolve()):e.reject()})}),e.promise):(e.resolve(),e.promise)}function v(e,t,n,o){return window.DEBUG?void c("trackevent",e,t,n,o):void(window.ga&&ga("send","event",e,t,n,o))}function C(e,t){var n={};for(var o in e)0<=t.indexOf(o)||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function y(e){return Object(N.h)(Q,X({Tag:"a"},e))}function S(e){return Object(N.h)(Q,X({Tag:"button"},e))}function w(e){return Object(N.h)("div",{class:"main-header"},Object(N.h)("input",{type:"text",id:"titleInput",title:"Click to edit",class:"item-title-input",value:e.title,onBlur:e.titleInputBlurHandler}),Object(N.h)("div",{class:"main-header__btn-wrap flex flex-v-center"},Object(N.h)("a",{id:"runBtn",class:"hide flex flex-v-center hint--rounded hint--bottom-left","aria-label":"Run preview (Ctrl/\u2318 + Shift + 5)",onClick:e.runBtnClickHandler},te,"Run"),Object(N.h)(y,{onClick:e.addLibraryBtnHandler,"data-event-category":"ui","data-event-action":"addLibraryButtonClick",class:"flex-v-center hint--rounded hint--bottom-left","aria-label":"Add a JS/CSS library"},"Add library"," ",Object(N.h)("span",{id:"js-external-lib-count",style:`display:${e.externalLibCount?"inline":"none"}`,class:"count-label"},e.externalLibCount)),Object(N.h)("a",{class:"flex flex-v-center hint--rounded hint--bottom-left","aria-label":"Start a new creation",onClick:e.newBtnHandler},ne,"New"),Object(N.h)("a",{id:"saveBtn",class:`flex flex-v-center hint--rounded hint--bottom-left ${e.isSaving?"is-loading":""} ${e.unsavedEditCount?"is-marked":0}`,"aria-label":"Save current creation (Ctrl/\u2318 + S)",onClick:e.saveBtnHandler},oe,se,"Save"),Object(N.h)("a",{id:"openItemsBtn",class:`flex flex-v-center hint--rounded hint--bottom-left ${e.isFetchingItems?"is-loading":""}`,"aria-label":"Open a saved creation (Ctrl/\u2318 + O)",onClick:e.openBtnHandler},ie,ae,"Open"),Object(N.h)(y,{onClick:e.loginBtnHandler,"data-event-category":"ui","data-event-action":"loginButtonClick",class:"hide-on-login flex flex-v-center hint--rounded hint--bottom-left","aria-label":"Login/Signup"},"Login/Signup"),Object(N.h)(y,{onClick:e.profileBtnHandler,"data-event-category":"ui","data-event-action":"headerAvatarClick","aria-label":"See profile or Logout",class:"hide-on-logout hint--rounded hint--bottom-left"},Object(N.h)("img",{id:"headerAvatarImg",width:"20",src:e.user?e.user.photoURL||ee:"",class:"main-header__avatar-img"}))))}function k(e,t){var n=t;return function(){0==--n&&e()}}function x(e,t){var n=le.a.modes[e].dependencies;if(!n)return t();for(var o=[],s=0;s{e.root.getFile(d,{create:!0},(e)=>{e.createWriter((e)=>{e.onwriteend=t,e.write(i)},n)},n)},n)}function P(e){b().then(()=>{function t(n){var o=document.createElement("canvas"),s=e;o.width=s.width,o.height=s.height;var i=o.getContext("2d"),a=window.devicePixelRatio||1;i.drawImage(n,s.left*a,s.top*a,s.width*a,s.height*a,0,0,s.width,s.height),n.removeEventListener("load",t),T(o.toDataURL())}var n=document.createElement("style");n.textContent="[class*=\"hint\"]:after, [class*=\"hint\"]:before { display: none!important; }",document.body.appendChild(n),setTimeout(()=>{chrome.tabs.captureVisibleTab(null,{format:"png",quality:100},function(e){if(n.remove(),e){var o=new Image;o.src=e,o.addEventListener("load",()=>t(o,e))}})},50),v("ui","takeScreenshotBtnClick")})}function V({show:e,closeHandler:t,oldSavedCreationsCount:n,dontAskBtnClickHandler:o,importBtnClickHandler:s}){return Object(N.h)(St,{extraClasses:"ask-to-import-modal",show:e,closeHandler:t},Ls,Object(N.h)("div",null,Object(N.h)("p",null,"You have ",Object(N.h)("span",null,n)," creations saved in your local machine. Do you want to import those creations in your account so they are more secure and accessible anywhere?"),_s,Object(N.h)("div",{class:"flex flex-h-end"},Object(N.h)("button",{onClick:o,class:"btn"},"Don't ask me again"),Object(N.h)("button",{onClick:s,class:"btn btn--primary ml-1"},"Yes, please import"))))}function D(e){return Object(N.h)(St,{show:e.show,closeHandler:e.closeHandler},Object(N.h)("h1",null,As,Object(N.h)("small",{style:"font-size:14px;"},e.version)),Object(N.h)("div",null,js,Bs,Es,Os,Object(N.h)("p",null,Object(N.h)(S,{"aria-label":"Support the developer",onClick:e.onSupportBtnClick,"data-event-action":"supportDeveloperHelpBtnClick","data-event-category":"ui",class:"btn btn-icon"},Ts,"Support the developer")," ",Ps," ",Vs," ",Ds),Fs,Ns))}function F(e){return Object(N.h)(St,{show:e.show,closeHandler:e.closeHandler},Ws,zs,Rs,Object(N.h)("p",{class:"tac"},Object(N.h)("button",{class:"btn btn--primary",onClick:e.closeHandler},"Lets start!")))}Object.defineProperty(t,"__esModule",{value:!0});var N=n("KM04"),W=n.n(N),z=Object.assign||function(e){for(var t,n=1;n{}},window.$all=(e)=>[...document.querySelectorAll(e)],window.IS_EXTENSION=!!window.chrome.extension;const Y=window.chrome.extension||window.DEBUG?"/":"/app";var Z="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";Node.prototype.nextUntil=function(e){const t=Array.from(this.parentNode.querySelectorAll(e)),n=t.indexOf(this);return t[n+1]},Node.prototype.previousUntil=function(e){const t=Array.from(this.parentNode.querySelectorAll(e)),n=t.indexOf(this);return t[n-1]},window.requestIdleCallback=window.requestIdleCallback||function(e){setTimeout(e,10)},window.IS_EXTENSION?document.body.classList.add("is-extension"):document.body.classList.add("is-app"),navigator.onLine&&!window.DEBUG&&setTimeout(function(){(function(e,t,n,o,s,i,a){e.GoogleAnalyticsObject=s,e[s]=e[s]||function(){(e[s].q=e[s].q||[]).push(arguments)},e[s].l=1*new Date,i=t.createElement(n),a=t.getElementsByTagName(n)[0],i.async=1,i.src=o,a.parentNode.insertBefore(i,a)})(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),-1===location.href.indexOf("chrome-extension://")?ga("create","UA-87786708-1"):(ga("create","UA-87786708-1",{cookieDomain:"none"}),ga("set","checkProtocolTask",function(){})),ga("send","pageview")},100);var X=Object.assign||function(e){for(var t,n=1;n{"function"==typeof this.props.onFocus&&this.props.onFocus(e)}),this.cm.on("change",this.props.onChange),this.cm.addKeyMap({"Ctrl-Space":"autocomplete"}),e.noAutocomplete||this.cm.on("inputRead",(e,t)=>{this.props.autoComplete&&"+input"===t.origin&&";"!==t.text[0]&&","!==t.text[0]&&" "!==t.text[0]&&ce.commands.autocomplete(this.cm,null,{completeSingle:!1})}),this.props.onCreation(this.cm)}render(){return Object(N.h)("textarea",{ref:(e)=>this.textarea=e,name:"",id:"",cols:"30",rows:"10"})}};var gt=n("mSND"),ft=n.n(gt);let bt=class extends N.Component{componentDidMount(){this.updateSplit()}componentWillUpdate(){this.splitInstance&&this.splitInstance.destroy()}componentDidUpdate(){this.updateSplit()}updateSplit(){const e={direction:this.props.direction,minSize:this.props.minSize,gutterSize:6,sizes:this.props.sizes};this.props.onDragEnd&&(e.onDragEnd=this.props.onDragEnd),this.props.onDragStart&&(e.onDragStart=this.props.onDragStart),this.splitInstance=ft()(this.props.children.map((e)=>"#"+e.attributes.id),e),this.props.onSplit&&this.props.onSplit(this.splitInstance)}render(){const e=this.props,{children:t}=e,n=M(e,["children"]);return Object(N.h)("div",n,this.props.children)}},vt=class extends N.Component{componentDidMount(){this.initEditor()}shouldComponentUpdate(){return!1}initEditor(){this.cm=ce.fromTextArea(this.textarea,this.props.options),this.props.onChange&&this.cm.on("change",this.props.onChange),this.props.onBlur&&this.cm.on("blur",this.props.onBlur),this.props.onCreation(this.cm)}render(){return Object(N.h)("textarea",{ref:(e)=>this.textarea=e,name:"",id:"",cols:"30",rows:"10"})}};var Ct=n("q6qL"),yt=n.n(Ct);let St=class extends N.Component{componentDidMount(){window.addEventListener("keydown",this.onKeyDownHandler.bind(this))}componentWillUnmount(){window.removeEventListener("keydown",this.onKeyDownHandler.bind(this)),this.focusGrabber&&(this.focusGrabber.remove(),this.focusGrabber=null)}onKeyDownHandler(t){27===t.keyCode&&this.props.closeHandler()}onOverlayClick(t){t.target===this.overlayEl&&this.props.closeHandler()}componentDidUpdate(e){this.props.show!==e.show&&(document.body.classList[this.props.show?"add":"remove"]("overlay-visible"),this.props.show?(setTimeout(()=>{this.overlayEl.querySelector(".js-modal__close-btn").focus()},0),this.focusGrabber=document.createElement("input"),this.focusGrabber.setAttribute("style","height:0;opacity:0;overflow:hidden;width:0;"),setTimeout(()=>{document.body.appendChild(this.focusGrabber)},10)):(this.focusGrabber.remove(),this.focusGrabber=null))}render(){return this.props.show?Object(N.h)(yt.a,{into:"body"},Object(N.h)("div",{class:`${this.props.extraClasses||""} modal is-modal-visible`,ref:(e)=>this.overlayEl=e,onClick:this.onOverlayClick.bind(this)},Object(N.h)("div",{class:"modal__content"},Object(N.h)("button",{type:"button",onClick:this.props.closeHandler,"aria-label":"Close modal",title:"Close",class:"js-modal__close-btn modal__close-btn"},"Close"),this.props.children))):null}};var wt=Object(N.h)("h1",null,"Atomic CSS Settings"),kt=Object(N.h)("h3",null,"Configure Atomizer settings."," ",Object(N.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more")," ","about available settings.");let xt=class extends N.Component{componentDidUpdate(){this.props.show&&setTimeout(()=>{this.props.settings&&this.cm.setValue(this.props.settings.acssConfig),this.cm.refresh(),this.cm.focus()},500)}render(){return Object(N.h)(St,{show:this.props.show,closeHandler:this.props.closeHandler},wt,kt,Object(N.h)("div",{style:"height: calc(100vh - 350px);"},Object(N.h)(vt,{options:{mode:"application/ld+json",theme:this.props.editorTheme},onCreation:(e)=>this.cm=e,onBlur:(e)=>this.props.onChange(e.getValue())})),Object(N.h)("div",{class:"flex flex-h-end"},Object(N.h)("button",{class:"btn btn--primary",onClick:this.props.closeHandler},"Apply and Close")))}};const Mt=33;var Lt=Object(N.h)("span",{class:"caret"}),_t=Object(N.h)("option",{value:"html"},"HTML"),It=Object(N.h)("option",{value:"markdown"},"Markdown"),Ht=Object(N.h)("option",{value:"jade"},"Pug"),At=Object(N.h)("span",{class:"caret"}),jt=Object(N.h)("option",{value:"css"},"CSS"),Bt=Object(N.h)("option",{value:"scss"},"SCSS"),Et=Object(N.h)("option",{value:"sass"},"SASS"),Ot=Object(N.h)("option",{value:"less"},"LESS"),Tt=Object(N.h)("option",{value:"stylus"},"Stylus"),Pt=Object(N.h)("option",{value:"acss"},"Atomic CSS"),Vt=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#settings-icon"})),Dt=Object(N.h)("span",{class:"caret"}),Ft=Object(N.h)("option",{value:"js"},"JS"),Nt=Object(N.h)("option",{value:"coffee"},"CoffeeScript"),Wt=Object(N.h)("option",{value:"es6"},"ES6 (Babel)"),zt=Object(N.h)("option",{value:"typescript"},"TypeScript"),Rt=Object(N.h)("span",{class:"code-wrap__header-label"},"Console (",Object(N.h)("span",{id:"logCountEl"},"0"),")"),Ut=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#cancel-icon"})),Kt=Object(N.h)("svg",{width:"18",height:"18",fill:"#346fd2"},Object(N.h)("use",{xlinkHref:"#chevron-icon"}));let qt=class extends N.Component{constructor(e){super(e),this.state={isConsoleOpen:!1,isCssSettingsModalOpen:!1},this.updateTimer=null,this.updateDelay=500,this.htmlMode=R.HTML,this.jsMode=R.HTML,this.cssMode=U.CSS,this.jsMode=K.JS,this.prefs={},this.codeInPreview={html:null,css:null,js:null},this.cmCodes={html:e.currentItem.html,css:"",js:""},this.cm={},this.logCount=0,window.onMessageFromConsole=this.onMessageFromConsole.bind(this),window.previewException=this.previewException.bind(this),window.clearConsole=this.clearConsole.bind(this)}shouldComponentUpdate(e,t){return this.state.isConsoleOpen!==t.isConsoleOpen||this.state.isCssSettingsModalOpen!==t.isCssSettingsModalOpen||this.state.codeSplitSizes!==t.codeSplitSizes||this.state.mainSplitSizes!==t.mainSplitSizes||this.props.currentLayoutMode!==e.currentLayoutMode||this.props.currentItem!==e.currentItem}componentDidUpdate(){window.logCountEl.textContent=this.logCount}componentDidMount(){this.props.onRef(this)}onHtmlCodeChange(e,t){this.cmCodes.html=e.getValue(),this.props.onCodeChange("html",this.cmCodes.html,"setValue"!==t.origin),this.onCodeChange(e,t)}onCssCodeChange(e,t){this.cmCodes.css=e.getValue(),this.props.onCodeChange("css",this.cmCodes.css,"setValue"!==t.origin),this.onCodeChange(e,t)}onJsCodeChange(e,t){this.cmCodes.js=e.getValue(),this.props.onCodeChange("js",this.cmCodes.js,"setValue"!==t.origin),this.onCodeChange(e,t)}onCodeChange(e,t){clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>{"setValue"!==t.origin&&(!1!==this.prefs.autoPreview&&this.setPreviewContent(),v.previewCount=(v.previewCount||0)+1,4===v.previewCount&&v("fn","usingPreview"))},this.updateDelay)}createPreviewFile(e,t,n){const o=!window.webkitRequestFileSystem||!window.IS_EXTENSION;var s=g(e,t,o?n:null,this.props.currentItem),i=new Blob([s],{type:"text/plain;charset=UTF-8"}),a=new Blob([n],{type:"text/plain;charset=UTF-8"});!v.hasTrackedCode&&(e||t||n)&&(v("fn","hasCode"),v.hasTrackedCode=!0),o?this.detachedWindow?(c("\u2709\uFE0F Sending message to detached window"),this.detachedWindow.postMessage({contents:s},"*")):(this.frame.src=this.frame.src,setTimeout(()=>{this.frame.contentDocument.open(),this.frame.contentDocument.write(s),this.frame.contentDocument.close()},10)):u("script.js",a,()=>{u("preview.html",i,()=>{var e=chrome.i18n.getMessage()?`chrome-extension://${chrome.i18n.getMessage("@@extension_id")}`:`${location.origin}`,t=`filesystem:${e}/temporary/preview.html`;this.detachedWindow?this.detachedWindow.postMessage(t,"*"):this.frame.src=t})})}cleanupErrors(e){this.cm[e].clearGutter("error-gutter")}showErrors(e,t){var o=this.cm[e];t.forEach(function(t){o.operation(function(){var e=document.createElement("div");e.setAttribute("data-title",t.message),e.classList.add("gutter-error-marker"),o.setGutterMarker(t.lineNumber,"error-gutter",e)})})}setPreviewContent(e,t){if(!this.props.prefs.autoPreview&&!t)return;this.props.prefs.preserveConsoleLogs||this.clearConsole(),this.cleanupErrors("html"),this.cleanupErrors("css"),this.cleanupErrors("js");var n={html:this.cmCodes.html,css:this.cmCodes.css,js:this.cmCodes.js};c("\uD83D\uDD0E setPreviewContent",e);const o=this.detachedWindow?this.detachedWindow.document.querySelector("iframe"):this.frame,r=this.props.currentItem.cssMode;if(!e&&n.html===this.codeInPreview.html&&n.js===this.codeInPreview.js)i(r===U.ACSS?n.html:n.css,r,this.props.currentItem.cssSettings).then((e)=>{r===U.ACSS&&this.cm.css.setValue(e.code||""),o.contentDocument.querySelector("#webmakerstyle")&&(o.contentDocument.querySelector("#webmakerstyle").textContent=e.code||"")});else{var l=s(n.html,this.props.currentItem.htmlMode),d=i(r===U.ACSS?n.html:n.css,r,this.props.currentItem.cssSettings),h=a(n.js,this.props.currentItem.jsMode,!0,this.props.prefs.infiniteLoopTimeout);Promise.all([l,d,h]).then((e)=>{r===U.ACSS&&this.cm.css.setValue(e[1].code||""),this.createPreviewFile(e[0].code||"",e[1].code||"",e[2].code||""),e.forEach((e)=>{e.errors&&this.showErrors(e.errors.lang,e.errors.data)})})}this.codeInPreview.html=n.html,this.codeInPreview.css=n.css,this.codeInPreview.js=n.js}isValidItem(e){return!!e.title}refreshEditor(){this.cmCodes.html=this.props.currentItem.html,this.cmCodes.css=this.props.currentItem.css,this.cmCodes.js=this.props.currentItem.js,this.cm.html.setValue(this.cmCodes.html||""),this.cm.css.setValue(this.cmCodes.css||""),this.cm.js.setValue(this.cmCodes.js||""),this.cm.html.refresh(),this.cm.css.refresh(),this.cm.js.refresh(),this.clearConsole(),Promise.all([this.updateHtmlMode(this.props.currentItem.htmlMode),this.updateCssMode(this.props.currentItem.cssMode),this.updateJsMode(this.props.currentItem.jsMode)]).then(()=>this.setPreviewContent(!0))}applyCodemirrorSettings(e){this.cm&&(htmlCodeEl.querySelector(".CodeMirror").style.fontSize=cssCodeEl.querySelector(".CodeMirror").style.fontSize=jsCodeEl.querySelector(".CodeMirror").style.fontSize=`${parseInt(e.fontSize,10)}px`,window.consoleEl.querySelector(".CodeMirror").style.fontSize=`${parseInt(e.fontSize,10)}px`,window.editorThemeLinkTag.href=`lib/codemirror/theme/${e.editorTheme}.css`,window.fontStyleTag.textContent=window.fontStyleTemplate.textContent.replace(/fontname/g,("other"===e.editorFont?e.editorCustomFont:e.editorFont)||"FiraCode"),this.consoleCm.setOption("theme",e.editorTheme),["html","js","css"].forEach((t)=>{this.cm[t].setOption("indentWithTabs","spaces"!==e.indentWith),this.cm[t].setOption("blastCode",!!e.isCodeBlastOn&&{effect:2,shake:!1}),this.cm[t].setOption("indentUnit",+e.indentSize),this.cm[t].setOption("tabSize",+e.indentSize),this.cm[t].setOption("theme",e.editorTheme),this.cm[t].setOption("keyMap",e.keymap),this.cm[t].setOption("lineWrapping",e.lineWrap),this.cm[t].refresh()}))}updateCodeWrapCollapseStates(){clearTimeout(this.updateCodeWrapCollapseStates.timeout),this.updateCodeWrapCollapseStates.timeout=setTimeout(()=>{const{currentLayoutMode:e}=this.props,t=2===e||5===e?"width":"height";[htmlCodeEl,cssCodeEl,jsCodeEl].forEach(function(e){const n=e.getBoundingClientRect(),o=n[t];100>o?e.classList.add("is-minimized"):e.classList.remove("is-minimized"),-1===e.style[t].indexOf(`100% - ${2*Mt}px`)?e.classList.remove("is-maximized"):e.classList.add("is-maximized")})},50)}toggleCodeWrapCollapse(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{const n=parseInt(e.dataset.codeWrapId,10);var t=[`${Mt}px`,`${Mt}px`,`${Mt}px`];t[n]=`calc(100% - ${2*Mt}px)`,this.codeSplitInstance.setSizes(t),e.classList.add("is-maximized")}}collapseBtnHandler(t){var e=t.currentTarget.parentElement.parentElement.parentElement;this.toggleCodeWrapCollapse(e),v("ui","paneCollapseBtnClick",e.dataset.type)}codeWrapHeaderDblClickHandler(t){if(t.target.classList.contains("js-code-wrap__header")){const e=t.target.parentElement;this.toggleCodeWrapCollapse(e),v("ui","paneHeaderDblClick",e.dataset.type)}}resetSplitting(){this.setState({codeSplitSizes:this.getCodeSplitSizes(),mainSplitSizes:this.getMainSplitSizesToApply()})}getMainSplitSizesToApply(){var e;const{currentItem:t,currentLayoutMode:n}=this.props;return e=t&&t.mainSizes?3===n?[t.mainSizes[1],t.mainSizes[0]]:t.mainSizes:5===n?[75,25]:[50,50],e}getCodeSplitSizes(){return this.props.currentItem&&this.props.currentItem.sizes?this.props.currentItem.sizes:[33.33,33.33,33.33]}mainSplitDragEndHandler(){this.props.prefs.refreshOnResize&&setTimeout(()=>{this.setPreviewContent(!0)},1)}codeSplitDragStart(){document.body.classList.add("is-dragging")}codeSplitDragEnd(){this.updateCodeWrapCollapseStates(),document.body.classList.remove("is-dragging")}handleModeRequirements(e){function t(){q[e].hasLoaded=!0,s.resolve()}const n="lib/transpilers";var s=o();return q[e].hasLoaded?(s.resolve(),s.promise):(e===R.JADE?m(`${n}/jade.js`).then(t):e===R.MARKDOWN?m(`${n}/marked.js`).then(t):e===U.LESS?m(`${n}/less.min.js`).then(t):e===U.SCSS||e===U.SASS?m(`${n}/sass.js`).then(function(){window.sass=new Sass(`${n}/sass.worker.js`),t()}):e===U.STYLUS?m(`${n}/stylus.min.js`).then(t):e===U.ACSS?m(`${n}/atomizer.browser.js`).then(t):e===K.COFFEESCRIPT?m(`${n}/coffee-script.js`).then(t):e===K.ES6?m(`${n}/babel.min.js`).then(t):e===K.TS?m(`${n}/typescript.js`).then(t):s.resolve(),s.promise)}updateHtmlMode(e){return this.props.onCodeModeChange("html",e),this.props.currentItem.htmlMode=e,this.cm.html.setOption("mode",q[e].cmMode),ce.autoLoadMode(this.cm.html,q[e].cmPath||q[e].cmMode),this.handleModeRequirements(e)}updateCssMode(e){return this.props.onCodeModeChange("css",e),this.props.currentItem.cssMode=e,this.cm.css.setOption("mode",q[e].cmMode),this.cm.css.setOption("readOnly",q[e].cmDisable),window.cssSettingsBtn.classList[q[e].hasSettings?"remove":"add"]("hide"),ce.autoLoadMode(this.cm.css,q[e].cmPath||q[e].cmMode),this.handleModeRequirements(e)}updateJsMode(e){return this.props.onCodeModeChange("js",e),this.props.currentItem.jsMode=e,this.cm.js.setOption("mode",q[e].cmMode),ce.autoLoadMode(this.cm.js,q[e].cmPath||q[e].cmMode),this.handleModeRequirements(e)}codeModeChangeHandler(t){var e=t.target.value,n=t.target.dataset.type,o=this.props.currentItem["html"===n?"htmlMode":"css"===n?"cssMode":"jsMode"];o!==e&&("html"===n?this.updateHtmlMode(e).then(()=>this.setPreviewContent(!0)):"js"===n?this.updateJsMode(e).then(()=>this.setPreviewContent(!0)):"css"===n&&this.updateCssMode(e).then(()=>this.setPreviewContent(!0)),v("ui","updateCodeMode",e))}detachPreview(){if(this.detachedWindow)return void this.detachedWindow.focus();const e=this.frame.getBoundingClientRect(),t=e.width,n=e.height;document.body.classList.add("is-detached-mode"),window.globalConsoleContainerEl.insertBefore(window.consoleEl,null),this.detachedWindow=window.open("./preview.html","Web Maker",`width=${t},height=${n},resizable,scrollbars=yes,status=1`),setTimeout(()=>{this.setPreviewContent(!0)},1500);var o=window.setInterval(()=>{this.detachedWindow&&this.detachedWindow.closed&&(clearInterval(o),document.body.classList.remove("is-detached-mode"),$("#js-demo-side").insertBefore(window.consoleEl,null),this.detachedWindow=null,this.setPreviewContent(!0))},500)}onMessageFromConsole(){[...arguments].forEach((e)=>{e&&e.indexOf&&-1!==e.indexOf("filesystem:chrome-extension")&&(e=e.replace(/filesystem:chrome-extension.*\.js:(\d+):*(\d*)/g,"script $1:$2"));try{this.consoleCm.replaceRange(e+" "+((e+"").match(/\[object \w+]/)?JSON.stringify(e):"")+"\n",{line:Infinity})}catch(t){this.consoleCm.replaceRange("\uD83C\uDF00\n",{line:Infinity})}this.consoleCm.scrollTo(0,Infinity),this.logCount++}),logCountEl.textContent=this.logCount}previewException(e){console.error("Possible infinite loop detected.",e.stack),this.onMessageFromConsole("Possible infinite loop detected.",e.stack)}toggleConsole(){this.setState({isConsoleOpen:!this.state.isConsoleOpen}),v("ui","consoleToggle")}consoleHeaderDblClickHandler(t){t.target.classList.contains("js-console__header")&&(v("ui","consoleToggleDblClick"),this.toggleConsole())}clearConsole(){this.consoleCm.setValue(""),this.logCount=0,window.logCountEl.textContent=this.logCount}clearConsoleBtnClickHandler(){this.clearConsole(),v("ui","consoleClearBtnClick")}evalConsoleExpr(t){(76===t.which||12===t.which)&&t.ctrlKey?(this.clearConsole(),v("ui","consoleClearKeyboardShortcut")):13===t.which&&(this.onMessageFromConsole("> "+t.target.value),this.frame.contentWindow._wmEvaluate(t.target.value),t.target.value="",v("fn","evalConsoleExpr"))}cssSettingsBtnClickHandler(){this.setState({isCssSettingsModalOpen:!0}),v("ui","cssSettingsBtnClick")}cssSettingsChangeHandler(e){this.props.onCodeSettingsChange("css",e),this.setPreviewContent(!0)}getDemoFrame(e){e(this.frame)}editorFocusHandler(e){this.props.onEditorFocus(e)}render(){return Object(N.h)(bt,{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)},Object(N.h)(bt,{class:"code-side",id:"js-code-side",sizes:this.state.codeSplitSizes,minSize:Mt,direction:2===this.props.currentLayoutMode||5===this.props.currentLayoutMode?"horizontal":"vertical",onDragStart:this.codeSplitDragStart.bind(this),onDragEnd:this.codeSplitDragEnd.bind(this),onSplit:(e)=>this.codeSplitInstance=e},Object(N.h)("div",{"data-code-wrap-id":"0",id:"htmlCodeEl","data-type":"html",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},Object(N.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},Object(N.h)("label",{class:"btn-group",dropdow:!0,title:"Click to change"},Object(N.h)("span",{class:"code-wrap__header-label"},q[this.props.currentItem.htmlMode||"html"].label),Lt,Object(N.h)("select",{"data-type":"html",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.htmlMode},_t,It,Ht)),Object(N.h)("div",{class:"code-wrap__header-right-options"},Object(N.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),Object(N.h)(mt,{options:{mode:"htmlmixed",profile:"xhtml",gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],noAutocomplete:!0,matchTags:{bothTags:!0},emmet:!0},onChange:this.onHtmlCodeChange.bind(this),onCreation:(e)=>this.cm.html=e,onFocus:this.editorFocusHandler.bind(this)})),Object(N.h)("div",{"data-code-wrap-id":"1",id:"cssCodeEl","data-type":"css",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},Object(N.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},Object(N.h)("label",{class:"btn-group",title:"Click to change"},Object(N.h)("span",{class:"code-wrap__header-label"},q[this.props.currentItem.cssMode||"css"].label),At,Object(N.h)("select",{"data-type":"css",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.cssMode},jt,Bt,Et,Ot,Tt,Pt)),Object(N.h)("div",{class:"code-wrap__header-right-options"},Object(N.h)("a",{href:"#",id:"cssSettingsBtn",title:"Atomic CSS configuration",onClick:this.cssSettingsBtnClickHandler.bind(this),class:"code-wrap__header-btn hide"},Vt),Object(N.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),Object(N.h)(mt,{options:{mode:"css",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"],emmet:!0},onChange:this.onCssCodeChange.bind(this),onCreation:(e)=>this.cm.css=e,onFocus:this.editorFocusHandler.bind(this)})),Object(N.h)("div",{"data-code-wrap-id":"2",id:"jsCodeEl","data-type":"js",class:"code-wrap",onTransitionEnd:this.updateCodeWrapCollapseStates.bind(this)},Object(N.h)("div",{class:"js-code-wrap__header code-wrap__header",title:"Double click to toggle code pane",onDblClick:this.codeWrapHeaderDblClickHandler.bind(this)},Object(N.h)("label",{class:"btn-group",title:"Click to change"},Object(N.h)("span",{class:"code-wrap__header-label"},q[this.props.currentItem.jsMode||"js"].label),Dt,Object(N.h)("select",{"data-type":"js",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.jsMode},Ft,Nt,Wt,zt)),Object(N.h)("div",{class:"code-wrap__header-right-options"},Object(N.h)("a",{class:"js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle code pane",onClick:this.collapseBtnHandler.bind(this)}))),Object(N.h)(mt,{options:{mode:"javascript",gutters:["error-gutter","CodeMirror-linenumbers","CodeMirror-foldgutter"]},autoComplete:this.props.prefs.autoComplete,onChange:this.onJsCodeChange.bind(this),onCreation:(e)=>this.cm.js=e,onFocus:this.editorFocusHandler.bind(this)}))),Object(N.h)("div",{class:"demo-side",id:"js-demo-side",style:""},Object(N.h)("iframe",{ref:(e)=>this.frame=e,src:"about://blank",frameborder:"0",id:"demo-frame",allowfullscreen:!0}),Object(N.h)("div",{id:"consoleEl",class:`console ${this.state.isConsoleOpen?"":"is-minimized"}`},Object(N.h)("div",{id:"consoleLogEl",class:"console__log"},Object(N.h)("div",{class:"js-console__header code-wrap__header",title:"Double click to toggle console",onDblClick:this.toggleConsole.bind(this)},Rt,Object(N.h)("div",{class:"code-wrap__header-right-options"},Object(N.h)("a",{class:"code-wrap__header-btn",title:"Clear console (CTRL + L)",onClick:this.clearConsoleBtnClickHandler.bind(this)},Ut),Object(N.h)("a",{class:"code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle console",onClick:this.toggleConsole.bind(this)}))),Object(N.h)(vt,{options:{mode:"javascript",lineWrapping:!0,theme:"monokai",foldGutter:!0,readOnly:!0,gutters:["CodeMirror-foldgutter"]},onCreation:(e)=>this.consoleCm=e})),Object(N.h)("div",{id:"consolePromptEl",class:"console__prompt flex flex-v-center"},Kt,Object(N.h)("input",{onKeyUp:this.evalConsoleExpr.bind(this),class:"console-exec-input"}))),Object(N.h)(xt,{show:this.state.isCssSettingsModalOpen,closeHandler:()=>this.setState({isCssSettingsModalOpen:!1}),onChange:this.cssSettingsChangeHandler.bind(this),settings:this.props.currentItem.cssSettings,editorTheme:this.props.prefs.editorTheme})))}};var Gt=Object(N.h)("svg",{viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})),Jt=Object(N.h)("svg",{style:"display: none;",xmlns:"http://www.w3.org/2000/svg"},Object(N.h)("symbol",{id:"codepen-logo",viewBox:"0 0 120 120"},Object(N.h)("path",{class:"outer-ring",d:"M60.048 0C26.884 0 0 26.9 0 60.048s26.884 60 60 60.047c33.163 0 60.047-26.883 60.047-60.047 S93.211 0 60 0z M60.048 110.233c-27.673 0-50.186-22.514-50.186-50.186S32.375 9.9 60 9.9 c27.672 0 50.2 22.5 50.2 50.186S87.72 110.2 60 110.233z"}),Object(N.h)("path",{class:"inner-box",d:"M97.147 48.319c-0.007-0.047-0.019-0.092-0.026-0.139c-0.016-0.09-0.032-0.18-0.056-0.268 c-0.014-0.053-0.033-0.104-0.05-0.154c-0.025-0.078-0.051-0.156-0.082-0.232c-0.021-0.053-0.047-0.105-0.071-0.156 c-0.033-0.072-0.068-0.143-0.108-0.211c-0.029-0.051-0.061-0.1-0.091-0.148c-0.043-0.066-0.087-0.131-0.135-0.193 c-0.035-0.047-0.072-0.094-0.109-0.139c-0.051-0.059-0.104-0.117-0.159-0.172c-0.042-0.043-0.083-0.086-0.127-0.125 c-0.059-0.053-0.119-0.104-0.181-0.152c-0.048-0.037-0.095-0.074-0.145-0.109c-0.019-0.012-0.035-0.027-0.053-0.039L61.817 23.5 c-1.072-0.715-2.468-0.715-3.54 0L24.34 46.081c-0.018 0.012-0.034 0.027-0.053 0.039c-0.05 0.035-0.097 0.072-0.144 0.1 c-0.062 0.049-0.123 0.1-0.181 0.152c-0.045 0.039-0.086 0.082-0.128 0.125c-0.056 0.055-0.108 0.113-0.158 0.2 c-0.038 0.045-0.075 0.092-0.11 0.139c-0.047 0.062-0.092 0.127-0.134 0.193c-0.032 0.049-0.062 0.098-0.092 0.1 c-0.039 0.068-0.074 0.139-0.108 0.211c-0.024 0.051-0.05 0.104-0.071 0.156c-0.031 0.076-0.057 0.154-0.082 0.2 c-0.017 0.051-0.035 0.102-0.05 0.154c-0.023 0.088-0.039 0.178-0.056 0.268c-0.008 0.047-0.02 0.092-0.025 0.1 c-0.019 0.137-0.029 0.275-0.029 0.416V71.36c0 0.1 0 0.3 0 0.418c0.006 0 0 0.1 0 0.1 c0.017 0.1 0 0.2 0.1 0.268c0.015 0.1 0 0.1 0.1 0.154c0.025 0.1 0.1 0.2 0.1 0.2 c0.021 0.1 0 0.1 0.1 0.154c0.034 0.1 0.1 0.1 0.1 0.213c0.029 0 0.1 0.1 0.1 0.1 c0.042 0.1 0.1 0.1 0.1 0.193c0.035 0 0.1 0.1 0.1 0.139c0.05 0.1 0.1 0.1 0.2 0.2 c0.042 0 0.1 0.1 0.1 0.125c0.058 0.1 0.1 0.1 0.2 0.152c0.047 0 0.1 0.1 0.1 0.1 c0.019 0 0 0 0.1 0.039L58.277 96.64c0.536 0.4 1.2 0.5 1.8 0.537c0.616 0 1.233-0.18 1.77-0.537 l33.938-22.625c0.018-0.012 0.034-0.027 0.053-0.039c0.05-0.035 0.097-0.072 0.145-0.109c0.062-0.049 0.122-0.1 0.181-0.152 c0.044-0.039 0.085-0.082 0.127-0.125c0.056-0.055 0.108-0.113 0.159-0.172c0.037-0.045 0.074-0.09 0.109-0.139 c0.048-0.062 0.092-0.127 0.135-0.193c0.03-0.049 0.062-0.098 0.091-0.146c0.04-0.07 0.075-0.141 0.108-0.213 c0.024-0.051 0.05-0.102 0.071-0.154c0.031-0.078 0.057-0.156 0.082-0.234c0.017-0.051 0.036-0.102 0.05-0.154 c0.023-0.088 0.04-0.178 0.056-0.268c0.008-0.045 0.02-0.092 0.026-0.137c0.018-0.139 0.028-0.277 0.028-0.418V48.735 C97.176 48.6 97.2 48.5 97.1 48.319z M63.238 32.073l25.001 16.666L77.072 56.21l-13.834-9.254V32.073z M56.856 32.1 v14.883L43.023 56.21l-11.168-7.471L56.856 32.073z M29.301 54.708l7.983 5.34l-7.983 5.34V54.708z M56.856 88.022L31.855 71.4 l11.168-7.469l13.833 9.252V88.022z M60.048 67.597l-11.286-7.549l11.286-7.549l11.285 7.549L60.048 67.597z M63.238 88.022V73.14 l13.834-9.252l11.167 7.469L63.238 88.022z M90.794 65.388l-7.982-5.34l7.982-5.34V65.388z"}))),Yt=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#codepen-logo"})),Zt=Object(N.h)("svg",{style:"width:24px;height:24px",viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M4,4H7L9,2H15L17,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z"})),Xt=Object(N.h)("div",{class:"footer__separator hide-on-mobile"}),Qt=Object(N.h)("svg",{viewBox:"0 0 100 100",style:"transform:rotate(-90deg)"},Object(N.h)("use",{xlinkHref:"#mode-icon"})),$t=Object(N.h)("svg",{viewBox:"0 0 100 100"},Object(N.h)("use",{xlinkHref:"#mode-icon"})),en=Object(N.h)("svg",{viewBox:"0 0 100 100",style:"transform:rotate(90deg)"},Object(N.h)("use",{xlinkHref:"#mode-icon"})),tn=Object(N.h)("svg",{viewBox:"0 0 100 100"},Object(N.h)("use",{xlinkHref:"#vertical-mode-icon"})),nn=Object(N.h)("svg",{viewBox:"0 0 100 100"},Object(N.h)("rect",{x:"0",y:"0",width:"100",height:"100"})),on=Object(N.h)("svg",{viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M22,17V7H6V17H22M22,5A2,2 0 0,1 24,7V17C24,18.11 23.1,19 22,19H16V21H18V23H10V21H12V19H6C4.89,19 4,18.11 4,17V7A2,2 0 0,1 6,5H22M2,3V15H0V3A2,2 0 0,1 2,1H20V3H2Z"})),sn=Object(N.h)("div",{class:"footer__separator"}),an=Object(N.h)("svg",{viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M14,20A2,2 0 0,1 12,22A2,2 0 0,1 10,20H14M12,2A1,1 0 0,1 13,3V4.08C15.84,4.56 18,7.03 18,10V16L21,19H3L6,16V10C6,7.03 8.16,4.56 11,4.08V3A1,1 0 0,1 12,2Z"})),rn=Object(N.h)("span",{class:"notifications-btn__dot"}),ln=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#settings-icon"})),dn=Object(N.h)("a",{href:"https://webmakerapp.com/",target:"_blank",rel:"noopener noreferrer"},Object(N.h)("div",{class:"logo"})),cn=Object(N.h)("span",{class:"web-maker-with-tag"},"Web Maker"),hn=Object(N.h)("svg",{style:"width:20px; height:20px; vertical-align:text-bottom",viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,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"})),pn=Object(N.h)("use",{xlinkHref:"#keyboard-icon"}),un=Object(N.h)("use",{xlinkHref:"#twitter-icon"});let mn=class extends N.Component{constructor(e){super(e),this.state={isKeyboardShortcutsModalOpen:!1}}layoutBtnClickhandler(e){this.props.layoutBtnClickHandler(e)}render(){return Object(N.h)("div",{id:"footer",class:"footer"},Object(N.h)("div",{class:"footer__right fr"},Object(N.h)("a",{onClick:this.props.saveHtmlBtnClickHandler,id:"saveHtmlBtn",class:"mode-btn hint--rounded hint--top-left hide-on-mobile","data-hint":"Save as HTML file"},Gt),Jt,Object(N.h)("a",{href:"",onClick:this.props.codepenBtnClickHandler,id:"codepenBtn",class:"mode-btn hint--rounded hint--top-left hide-on-mobile","aria-label":"Edit on CodePen"},Yt),Object(N.h)("a",{href:"",id:"screenshotBtn",class:"mode-btn hint--rounded hint--top-left show-when-extension",onClick:this.props.screenshotBtnClickHandler,"aria-label":"Take screenshot of preview"},Zt),Xt,Object(N.h)("a",{onClick:this.layoutBtnClickhandler.bind(this,1),id:"layoutBtn1",class:"mode-btn hide-on-mobile"},Qt),Object(N.h)("a",{onClick:this.layoutBtnClickhandler.bind(this,2),id:"layoutBtn2",class:"mode-btn hide-on-mobile"},$t),Object(N.h)("a",{onClick:this.layoutBtnClickhandler.bind(this,3),id:"layoutBtn3",class:"mode-btn hide-on-mobile"},en),Object(N.h)("a",{onClick:this.layoutBtnClickhandler.bind(this,5),id:"layoutBtn5",class:"mode-btn hide-on-mobile"},tn),Object(N.h)("a",{onClick:this.layoutBtnClickhandler.bind(this,4),id:"layoutBtn4",class:"mode-btn hint--top-left hint--rounded hide-on-mobile","aria-label":"Full Screen"},nn),Object(N.h)("a",{class:"mode-btn hint--top-left hint--rounded hide-on-mobile","aria-label":"Detach Preview",onClick:this.props.detachedPreviewBtnHandler},on),sn,Object(N.h)("a",{onClick:this.props.notificationsBtnClickHandler,id:"notificationsBtn",class:`notifications-btn mode-btn hint--top-left hint--rounded ${this.props.hasUnseenChangelog?"has-new":""}`,"aria-label":"Notifications"},an,rn),Object(N.h)(y,{onClick:this.props.settingsBtnClickHandler,"data-event-category":"ui","data-event-action":"settingsBtnClick",class:"mode-btn hint--top-left hint--rounded","aria-label":"Settings"},ln)),dn,"\xA9",cn," \xA0\xA0",Object(N.h)(y,{onClick:this.props.helpBtnClickHandler,"data-event-category":"ui","data-event-action":"helpButtonClick",class:"footer__link hint--rounded hint--top-right","aria-label":"Help"},hn),Object(N.h)(y,{onClick:this.props.keyboardShortcutsBtnClickHandler,"data-event-category":"ui","data-event-action":"keyboardShortcutButtonClick",class:"footer__link hint--rounded hint--top-right hide-on-mobile","aria-label":"Keyboard shortcuts"},Object(N.h)("svg",{style:{width:"20px",height:"20px",verticalAlign:"text-bottom"}},pn)),Object(N.h)("a",{class:"footer__link hint--rounded hint--top-right","aria-label":"Tweet about 'Web Maker'",href:"http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,frontend,playground,offline",target:"_blank",rel:"noopener noreferrer"},Object(N.h)("svg",{style:{width:"20px",height:"20px",verticalAlign:"text-bottom"}},un)),Object(N.h)(y,{onClick:this.props.supportDeveloperBtnClickHandler,"data-event-category":"ui","data-event-action":"supportDeveloperFooterBtnClick",class:"footer__link ml-1 hint--rounded hint--top-right hide-on-mobile","aria-label":"Support the developer by pledging some amount",target:"_blank",rel:"noopener noreferrer"},"Support the developer"))}};var gn=n("gfUn"),fn=n.n(gn);const bn={async getItem(e){var t=await window.db.getDb();return t.doc(`items/${e}`).get().then((e)=>e.data())},async getUserItemIds(){if(window.user)return new Promise((e)=>{e(window.user.items||{})});var e=await window.db.getDb();return e.doc(`users/${window.user.uid}`).get().then((e)=>e.exists?e.data().items:{})},async getAllItems(){var e=Date.now(),t=o();let n=await this.getUserItemIds();n=Object.getOwnPropertyNames(n||{}),Object(gn.log)("itemids",n),n.length||t.resolve([]);var s=await window.db.getDb();const i=[];return s.collection("items").where("createdBy","==",window.user.uid).onSnapshot(function(n){n.forEach(function(e){i.push(e.data())}),Object(gn.log)("Items fetched in ",Date.now()-e,"ms"),t.resolve(i)},function(){t.resolve([])}),t.promise},async setUser(){const e=await window.db.getDb();return e.doc(`users/${window.user.uid}`).set({items:{}})},async setItem(e,t){const n=o();var s;if(db.local.set({[e]:t},()=>{!window.IS_EXTENSION&&window.user&&navigator.onLine||n.resolve()}),"code"===e)return!1;if(window.user){var i=await window.db.getDb();Object(gn.log)(`Starting to save item ${e}`),t.createdBy=window.user.uid,s=i.collection("items").doc(e).set(t,{merge:!0}).then((e)=>{Object(gn.log)("Document written",e),n.resolve()}).catch(n.reject)}return window.user&&navigator.onLine?s:n.promise},saveItems(e){var t=o();return window.user?window.db.getDb().then((n)=>{const o=n.batch();for(var s in e)e[s].createdBy=window.user.uid,o.set(n.doc(`items/${s}`),e[s]),o.update(n.doc(`users/${window.user.uid}`),{[`items.${s}`]:!0}),window.user.items=window.user.items||{},window.user.items[s]=!0;o.commit().then(t.resolve)}):(window.db.local.set(e,t.resolve),window.db.local.get({items:{}},function(t){for(var n in e)t.items[n]=!0;window.db.local.set({items:t.items})})),t.promise},async removeItem(e){if(!window.user){var t=o();return window.db.local.remove(e,t.resolve),t.promise}const n=await window.db.getDb();return Object(gn.log)(`Starting to save item ${e}`),n.collection("items").doc(e).delete().then((e)=>{Object(gn.log)("Document removed",e)}).catch((e)=>Object(gn.log)(e))},async setItemForUser(e){if(!window.user)return window.db.local.get({items:{}},function(t){t.items[e]=!0,window.db.local.set({items:t.items})});const t=await window.db.getDb();return t.collection("users").doc(window.user.uid).update({[`items.${e}`]:!0}).then((t)=>{Object(gn.log)(`Item ${e} set for user`,t),window.user.items=window.user.items||{},window.user.items[e]=!0}).catch((e)=>Object(gn.log)(e))},async unsetItemForUser(e){if(!window.user)return window.db.local.get({items:{}},function(t){delete t.items[e],window.db.local.set({items:t.items})});const t=await window.db.getDb();return t.collection("users").doc(window.user.uid).update({[`items.${e}`]:firebase.firestore.FieldValue.delete()}).then((t)=>{delete window.user.items[e],Object(gn.log)(`Item ${e} unset for user`,t)}).catch((e)=>Object(gn.log)(e))}};var vn;const Cn={add:function(e){const t=$("#js-alerts-container");t.textContent=e,t.classList.add("is-active"),clearTimeout(vn),vn=setTimeout(function(){t.classList.remove("is-active")},2e3)}};window.alertsService=Cn;var yn=Object(N.h)("div",{class:"mt-1"},"No match found."),Sn=Object(N.h)("span",{class:"show-when-selected"},"(Ctrl/\u2318 + F)"),wn=Object(N.h)("h2",{class:"opacity--30"},"Nothing saved here.");let kn=class extends N.Component{constructor(e){super(e),this.items=[],this.state={filteredItems:[]}}componentWillUpdate(e){this.props.items!==e.items&&(this.items=Object.values(e.items),this.items.sort(function(e,t){return t.updatedOn-e.updatedOn}),this.setState({filteredItems:this.items}))}componentDidUpdate(e){this.props.isOpen&&!e.isOpen&&(window.searchInput.value="")}onCloseIntent(){this.props.closeHandler()}itemClickHandler(e){this.props.itemClickHandler(e)}itemRemoveBtnClickHandler(t,n){n.stopPropagation(),this.props.itemRemoveBtnClickHandler(t)}itemForkBtnClickHandler(t,n){n.stopPropagation(),this.props.itemForkBtnClickHandler(t)}keyDownHandler(e){if(this.props.isOpen){const t=e.ctrlKey||e.metaKey,n=t&&70===e.keyCode,o=40===e.keyCode,s=38===e.keyCode,i=13===e.keyCode,a=$(".js-saved-item-tile.selected"),r=0!==$all(".js-saved-item-tile").length;if((o||s)&&r){const e=o?"nextUntil":"previousUntil";a?(a.classList.remove("selected"),a[e](".js-saved-item-tile:not(.hide)").classList.add("selected")):$(".js-saved-item-tile:not(.hide)").classList.add("selected"),$(".js-saved-item-tile.selected").scrollIntoView(!1)}if(i&&a){const e=this.props.items[a.dataset.itemId];console.log("opening",e),this.props.itemClickHandler(e),v("ui","openItemKeyboardShortcut")}if(n){e.preventDefault();const t=this.props.items[a.dataset.itemId];this.props.itemForkBtnClickHandler(t),v("ui","forkKeyboardShortcut")}}}mergeImportedItems(e){var t=[],n={};const s=o(),i={};this.items.forEach((e)=>i[e.id]=e),e.forEach((e)=>{i[e.id]?t.push(e.id):(c("merging",e.id),n[e.id]=e)});var a=e.length-t.length;if(t.length){var r=confirm(t.length+" creations already exist. Do you want to replace them?");r&&(c("shouldreplace",r),e.forEach((e)=>{n[e.id]=e}),a=e.length)}return a?bn.saveItems(n).then(()=>{s.resolve(),Cn.add(a+" creations imported successfully."),v("fn","itemsImported",a)}):s.resolve(),this.props.closeHandler(),s.promise}importFileChangeHandler(t){var e=t.target.files[0],n=new FileReader;n.addEventListener("load",(e)=>{var t;try{t=JSON.parse(e.target.result),c(t),this.mergeImportedItems(t)}catch(e){c(e),alert("Oops! Selected file is corrupted. Please select a file that was generated by clicking the \"Export\" button.")}}),n.readAsText(e,"utf-8")}importBtnClickHandler(t){var e=document.createElement("input");e.type="file",e.style.display="none",e.accept="accept=\"application/json",document.body.appendChild(e),e.addEventListener("change",this.importFileChangeHandler.bind(this)),e.click(),v("ui","importBtnClicked"),t.preventDefault()}searchInputHandler(t){const e=t.target.value;e?this.setState({filteredItems:this.items.filter((t)=>-1!==t.title.toLowerCase().indexOf(e))}):this.setState({filteredItems:this.items}),v("ui","searchInputType")}render(){return Object(N.h)("div",{id:"js-saved-items-pane",class:`saved-items-pane ${this.props.isOpen?"is-open":""}`,onKeyDown:this.keyDownHandler.bind(this)},Object(N.h)("button",{onClick:this.onCloseIntent.bind(this),class:"btn saved-items-pane__close-btn",id:"js-saved-items-pane-close-btn"},"X"),Object(N.h)("div",{class:"flex flex-v-center",style:"justify-content: space-between;"},Object(N.h)("h3",null,"My Library (",this.items.length,")"),Object(N.h)("div",{class:"main-header__btn-wrap"},Object(N.h)("a",{onClick:this.props.exportBtnClickHandler,href:"",class:"btn btn-icon hint--bottom-left hint--rounded hint--medium","aria-label":"Export all your creations into a single importable file."},"Export"),Object(N.h)("a",{onClick:this.importBtnClickHandler.bind(this),href:"",class:"btn btn-icon hint--bottom-left hint--rounded hint--medium","aria-label":"Only the file that you export through the 'Export' button can be imported."},"Import"))),Object(N.h)("input",{id:"searchInput",class:"search-input",onInput:this.searchInputHandler.bind(this),placeholder:"Search your creations here..."}),Object(N.h)("div",{id:"js-saved-items-wrap",class:"saved-items-pane__container"},!this.state.filteredItems.length&&this.items.length?yn:null,this.state.filteredItems.map((e)=>Object(N.h)("div",{class:"js-saved-item-tile saved-item-tile","data-item-id":e.id,onClick:this.itemClickHandler.bind(this,e)},Object(N.h)("div",{class:"saved-item-tile__btns"},Object(N.h)("a",{class:"js-saved-item-tile__fork-btn saved-item-tile__btn hint--left hint--medium","aria-label":"Creates a duplicate of this creation (Ctrl/\u2318 + F)",onClick:this.itemForkBtnClickHandler.bind(this,e)},"Fork",Sn),Object(N.h)("a",{class:"js-saved-item-tile__remove-btn saved-item-tile__btn hint--left","aria-label":"Remove",onClick:this.itemRemoveBtnClickHandler.bind(this,e)},"X")),Object(N.h)("h3",{class:"saved-item-tile__title"},e.title),Object(N.h)("span",{class:"saved-item-tile__meta"},"Last updated: ",d(e.updatedOn)))),this.items.length?null:wn))}};const xn=[{url:"https://code.jquery.com/jquery-3.2.1.min.js",label:"jQuery",type:"js"},{url:"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js",label:"Bootstrap 3",type:"js"},{url:"https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js",label:"Bootstrap 4",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/js/foundation.min.js",label:"Foundation",type:"js"},{url:"https://semantic-ui.com/dist/semantic.min.js",label:"Semantic UI",type:"js"},{url:"https://ajax.googleapis.com/ajax/libs/angularjs/1.6.5/angular.min.js",label:"Angular",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/react/16.2.0/umd/react.production.min.js",label:"React",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.2.0/umd/react-dom.production.min.js",label:"React DOM",type:"js"},{url:"https://unpkg.com/vue/dist/vue.min.js",label:"Vue.js",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/three.js/89/three.min.js",label:"Three.js",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/d3/4.13.0/d3.min.js",label:"D3",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js",label:"Underscore",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js",label:"Greensock TweenMax",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/js/uikit.min.js",label:"UIkit 2",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.42/js/uikit.min.js",label:"UIkit 3",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.min.js",label:"p5.js",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js",label:"p5.js DOM",type:"js"},{url:"https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.sound.min.js",label:"p5.js Sound",type:"js"}],Mn=[{url:"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css",label:"Bootstrap 3",type:"css"},{url:"https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css",label:"Bootstrap 4",type:"css"},{url:"https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/css/foundation.min.css",label:"Foundation",type:"css"},{url:"https://semantic-ui.com/dist/semantic.min.css",label:"Semantic UI",type:"css"},{url:"https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css",label:"Bulma",type:"css"},{url:"https://cdnjs.cloudflare.com/ajax/libs/hint.css/2.5.0/hint.min.css",label:"Hint.css",type:"css"},{url:"https://cdn.jsdelivr.net/npm/tailwindcss/dist/tailwind.min.css",label:"Tailwind.css",type:"css"},{url:"https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/uikit.min.css",label:"UIkit 2",type:"css"},{url:"https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.42/css/uikit.min.css",label:"UIkit 3",type:"css"},{url:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css",label:"Animate.css",type:"css"},{url:"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css",label:"FontAwesome 4",type:"css"},{url:"https://use.fontawesome.com/releases/v5.0.10/css/all.css",label:"FontAwesome 5",type:"css"}];let Ln=class extends N.Component{componentDidMount(){this.t=this.wrap.querySelector("input,textarea"),this.filter=this.props.filter,this.selectedCallback=this.props.onSelect,setTimeout(()=>{requestIdleCallback(()=>{document.body.appendChild(this.list),this.list.style.position="fixed"})},100),this.t.addEventListener("input",(t)=>this.onInput(t)),this.t.addEventListener("keydown",(t)=>this.onKeyDown(t)),this.t.addEventListener("blur",(t)=>this.closeSuggestions(t)),this.list.addEventListener("mousedown",(t)=>this.onListMouseDown(t))}componentWillUnmount(){this.t.removeEventListener("input",(t)=>this.onInput(t)),this.t.removeEventListener("keydown",(t)=>this.onKeyDown(t)),this.t.removeEventListener("blur",(t)=>this.closeSuggestions(t)),this.list.removeEventListener("mousedown",(t)=>this.onListMouseDown(t))}get currentLineNumber(){return this.t.value.substr(0,this.t.selectionStart).split("\n").length}get currentLine(){var e=this.currentLineNumber;return this.t.value.split("\n")[e-1]}closeSuggestions(){this.list.classList.remove("is-open"),this.isShowingSuggestions=!1}getList(e){return fetch("https://api.cdnjs.com/libraries?search="+e).then((e)=>e.json().then((e)=>e.results))}replaceCurrentLine(e){var t=this.t.value.split("\n");t.splice(this.currentLineNumber-1,1,e),this.t.value=t.join("\n")}onInput(){var e=this.currentLine;if(e){if(-1!==e.indexOf("/")||e.match(/https*:\/\//))return;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.loader.style.display="block",this.getList(e).then((e)=>{if(this.loader.style.display="none",!e.length)return void this.closeSuggestions();this.list.innerHTML="",this.filter&&(e=e.filter(this.filter));for(var t=0;t${e[t].name}`;this.isShowingSuggestions=!0,this.textareaBounds||(this.textareaBounds=this.t.getBoundingClientRect(),this.list.style.top=this.textareaBounds.bottom+"px",this.list.style.left=this.textareaBounds.left+"px",this.list.style.width=this.textareaBounds.width+"px"),this.list.classList.add("is-open")})},500)}}onKeyDown(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()))}onListMouseDown(e){var t=e.target;t.parentElement.dataset.url&&this.selectSuggestion(t.parentElement.dataset.url)}selectSuggestion(e){this.t.focus(),v("ui","autoSuggestionLibSelected",e),this.selectedCallback?this.selectedCallback.call(null,e):this.replaceCurrentLine(e),this.closeSuggestions()}render(){return Object(N.h)("div",{class:`btn-group ${this.props.fullWidth?"flex-grow":""}`,ref:(e)=>this.wrap=e},this.props.children,Object(N.h)("ul",{ref:(e)=>this.list=e,class:"dropdown__menu autocomplete-dropdown"}),Object(N.h)("div",{ref:(e)=>this.loader=e,class:"loader autocomplete__loader",style:"display:none"}))}};var _n=Object(N.h)("h1",null,"Add Library"),In=Object(N.h)("svg",{style:"width: 30px; height: 30px;fill:#999"},Object(N.h)("use",{xlinkHref:"#search"})),Hn=Object(N.h)("input",{type:"text",id:"externalLibrarySearchInput",class:"full-width",placeholder:"Type here to search libraries"}),An=Object(N.h)("div",{class:"tar opacity--70"},Object(N.h)("small",null,"Powered by cdnjs")),jn=Object(N.h)("option",{value:""},"-------"),Bn=Object(N.h)("h3",{class:"mb-0"},"JS"),En=Object(N.h)("p",{class:"mt-0 help-text"},"Put each library in new line"),On=Object(N.h)("p",{style:"font-size: 0.8em;",class:"show-when-extension opacity--70"},"Note: You can load external scripts from following 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/, https://rawgit.com, https://wzrd.in"),Tn=Object(N.h)("h3",{class:"mb-0"},"CSS"),Pn=Object(N.h)("p",{class:"mt-0 help-text"},"Put each library in new line");let Vn=class extends N.Component{constructor(e){super(e),this.state={css:e.css||"",js:e.js||""}}onSelectChange(t){const e=t.target;if(e.value){const t=e.selectedOptions[0].dataset.type;"js"===t?this.setState({js:`${this.state.js}\n${e.value}`}):this.setState({css:`${this.state.css}\n${e.value}`}),v("ui","addLibrarySelect",e.selectedOptions[0].label),this.props.onChange({js:this.state.js,css:this.state.css}),e.value=""}}textareaBlurHandler(t,e){const n=t?t.target:e,o=n.dataset.lang;"js"===o?this.setState({js:n.value||""}):this.setState({css:n.value||""}),this.props.onChange({js:this.state.js,css:this.state.css})}suggestionSelectHandler(e){const t=e.match(/\.js$/)?window.externalJsTextarea:window.externalCssTextarea;t.value=`${t.value}\n${e}`,window.externalLibrarySearchInput.value="",this.textareaBlurHandler(null,t)}render(){return Object(N.h)("div",null,_n,Object(N.h)("div",{class:"flex"},In,Object(N.h)(Ln,{fullWidth:!0,onSelect:this.suggestionSelectHandler.bind(this)},Hn)),An,Object(N.h)("div",{style:"margin:20px 0;"},"Choose from popular libraries:"," ",Object(N.h)("select",{name:"",id:"js-add-library-select",onChange:this.onSelectChange.bind(this)},jn,Object(N.h)("optgroup",{label:"JavaScript Libraries"},xn.map((e)=>Object(N.h)("option",{"data-type":e.type,value:e.url},e.label))),Object(N.h)("optgroup",{label:"CSS Libraries"},Mn.map((e)=>Object(N.h)("option",{"data-type":e.type,value:e.url},e.label))))),Bn,En,On,Object(N.h)("textarea",{onBlur:this.textareaBlurHandler.bind(this),"data-lang":"js",class:"full-width",id:"externalJsTextarea",cols:"30",rows:"5",placeholder:"Put each library in new line",value:this.state.js}),Tn,Pn,Object(N.h)("textarea",{onBlur:this.textareaBlurHandler.bind(this),"data-lang":"css",class:"full-width",id:"externalCssTextarea",cols:"30",rows:"5",placeholder:"Put each library in new line",value:this.state.css}))}};var Dn=n("ZUoI"),Fn=n.n(Dn);const Nn={logout(){Fn.a.auth().signOut()},login(e){var t;return"facebook"===e?t=new Fn.a.auth.FacebookAuthProvider:"twitter"===e?t=new Fn.a.auth.TwitterAuthProvider:"google"===e?(t=new Fn.a.auth.GoogleAuthProvider,t.addScope("https://www.googleapis.com/auth/userinfo.profile")):t=new Fn.a.auth.GithubAuthProvider,Fn.a.auth().signInWithPopup(t).then(function(){v("fn","loggedIn",e),window.db.local.set({lastAuthProvider:e})}).catch(function(e){c(e),"auth/account-exists-with-different-credential"===e.code&&alert("You have already signed up with the same email using different social login")})}};var Wn=Object(N.h)("h2",null,"Login / Signup"),zn=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#github-icon"})),Rn=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#google-icon"})),Un=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#fb-icon"})),Kn=Object(N.h)("p",null,"Join a community of 50,000+ Developers");let qn=class extends N.Component{login(t){const e=t.target.dataset.authProvider;v("ui","loginProviderClick",e),Nn.login(e)}componentDidMount(){window.db.local.get({lastAuthProvider:""},(e)=>{e.lastAuthProvider&&document.body.classList.add(`last-login-${e.lastAuthProvider}`)})}render(){return Object(N.h)("div",null,Wn,Object(N.h)("div",null,Object(N.h)("p",null,Object(N.h)("button",{type:"button",onClick:this.login.bind(this),class:"social-login-btn social-login-btn--github btn btn-icon btn--big full-width hint--right hint--always","data-auth-provider":"github","data-hint":"You logged in with Github last time"},zn,"Login with Github")),Object(N.h)("p",null,Object(N.h)("button",{type:"button",onClick:this.login.bind(this),class:"social-login-btn social-login-btn--google btn btn-icon btn--big full-width hint--right hint--always","data-auth-provider":"google","data-hint":"You logged in with Google last time"},Rn,"Login with Google")),Object(N.h)("p",{class:"mb-2"},Object(N.h)("button",{type:"button",onClick:this.login.bind(this),class:"social-login-btn social-login-btn--facebook btn btn-icon btn--big full-width hint--right hint--always","data-auth-provider":"facebook","data-hint":"You logged in with Facebook last time"},Un,"Login with Facebook")),Kn))}};Fn.a.initializeApp({apiKey:"AIzaSyBl8Dz7ZOE7aP75mipYl2zKdLSRzBU2fFc",authDomain:"web-maker-app.firebaseapp.com",databaseURL:"https://web-maker-app.firebaseio.com",projectId:"web-maker-app",storageBucket:"web-maker-app.appspot.com",messagingSenderId:"560473480645"});var Gn=n("7vHL"),Jn=Object.assign||function(e){for(var t,n=1;n{async function e(){return s?s:(c("Initializing firestore"),s=new Promise((e,t)=>n?e(n):Fn.a.firestore().enablePersistence().then(function(){n=Fn.a.firestore(),c("firebase db ready",n),e(n)}).catch(function(e){t(e.code),"failed-precondition"===e.code?(alert("Opening Web Maker web app in multiple tabs isn't supported at present and it seems like you already have it opened in another tab. Please use in one tab."),v("fn","multiTabError")):"unimplemented"===e.code})),s)}const t=1;var n,s,i={get:(e,n)=>{const o={};"string"==typeof e?(o[e]=JSON.parse(window.localStorage.getItem(e)),setTimeout(()=>n(o),t)):(Object.keys(e).forEach((t)=>{const n=window.localStorage.getItem(t);o[t]=void 0===n||null===n?e[t]:JSON.parse(n)}),setTimeout(()=>n(o),t))},set:(e,n)=>{Object.keys(e).forEach((t)=>{window.localStorage.setItem(t,JSON.stringify(e[t]))}),setTimeout(()=>{if(n)return n()},t)},remove:(e,n)=>{window.localStorage.removeItem(e),setTimeout(()=>n(),t)}};const a=chrome&&chrome.storage?chrome.storage.local:i,r=chrome&&chrome.storage?chrome.storage.sync:i;window.db={getDb:e,getUser:async function(t){const n=await e();return n.doc(`users/${t}`).get().then((e)=>{if(!e.exists)return n.doc(`users/${t}`).set({},{merge:!0});const o=e.data();return Jn(window.user,o),o})},getUserLastSeenVersion:async function(){const e=o();return r.get({lastSeenVersion:""},(t)=>{e.resolve(t.lastSeenVersion)}),e.promise},setUserLastSeenVersion:async function(t){if(r.set({lastSeenVersion:t},function(){}),window.user){const n=await e();n.doc(`users/${window.user.uid}`).update({lastSeenVersion:t})}},getSettings:function(e){const t=o();return r.get(e,(e)=>{t.resolve(e)}),t.promise},local:a,sync:r}})();var Yn=Object.assign||function(e){for(var t,n=1;n",Object(N.h)("a",{href:"https://webmakerapp.com/app/",target:"_blank",rel:"noopener noreferrer"},"https://webmakerapp.com/app/"),"."),Object(N.h)("li",null,"Now use Web Maker web app on any modern browser (tested with Chrome and Firefox)."),Object(N.h)("li",null,Object(N.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."),Object(N.h)("li",null,Object(N.h)("strong",null,"New layout mode")," - One more layout mode, that lets you align all the panes vertically."),Object(N.h)("li",null,Object(N.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!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Inline scripts (Web app only)")," - The restriction of writing JavaScript only in JS pane is also removed."))),bo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.7"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("a",{href:"https://tailwindcss.com/",target:"_blank",rel:"noopener noreferrer"},"Tailwind CSS")," ","added to popular CSS libraries list. Thanks"," ",Object(N.h)(I,{url:"https://github.com/diomed",name:"diomed"}),"."),Object(N.h)("li",null,"Popular libraries list updated. Thanks"," ",Object(N.h)(I,{url:"https://github.com/diomed",name:"diomed"}),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Dev"),": Bug fixes and code refactoring to make things simple."," ",Object(N.h)(I,{url:"https://github.com/iamandrewluca",name:"iamandrewluca"})," ","."))),vo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.6"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": Fix close buttons not working in notifications and keyboard shortcuts modal."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": Fix keyboard shortcut to see keyboard shortcuts :) Thanks",Object(N.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."))),Co=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.5"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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.")),Object(N.h)("li",null,Object(N.h)("strong",null,"Keyboard shortcuts panel"),": Add a list of all keyboard shotcuts. Access with",Object(N.h)("code",null," Ctrl/\u2318 + Shift + ?")," or click keyboard button in footer."),Object(N.h)("li",null,Object(N.h)("strong",null,"Add external library"),": Better UX for searching third party libraries."),Object(N.h)("li",null,Object(N.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."),Object(N.h)("li",null,Object(N.h)("strong",null,"Improvement"),": Add",Object(N.h)("code",null,"allowfullscreen")," attribute on iframes. Thanks",Object(N.h)("a",{href:"https://github.com/ClassicOldSong",target:"_blank",rel:"noopener noreferrer"},"ClassicOldSong"),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Stop screenlog.js from showing up in the exported HTML."),Object(N.h)("li",null,"Popular external libraries list updated. Thanks",Object(N.h)("a",{href:"https://github.com/jlapitan",target:"_blank",rel:"noopener noreferrer"},"jlapitan"),"."))),yo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.4"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Improvement"),": Atomic CSS (Atomizer) has been updated to latest version. Now you can do things like psuedo elements. Learn More."),Object(N.h)("li",null,Object(N.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."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Console's z-index issue has been fixed."))),So=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.3"),Object(N.h)("ul",null,Object(N.h)("li",null,"Choose the save location while exporting your saved creations. Now easily sync them to your Dropbox or any cloud storage."),Object(N.h)("li",null,"All modals inside the app now have a close button."),Object(N.h)("li",null,"Checkbox that showed on clicking a boolean value is now removed. Thanks",Object(N.h)("a",{href:"https://github.com/gauravmuk",target:"_blank",rel:"noopener noreferrer"},"Gaurav Nanda"),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Screenshots on retina device are now correct. Thanks",Object(N.h)("a",{href:"https://github.com/AshBardhan",target:"_blank",rel:"noopener noreferrer"},"Ashish Bardhan"),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Double console log in detached mode fixed."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Console.clear now works in detached mode too."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - DOCTYPE added in preview."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Typo correction in README. Thanks",Object(N.h)("a",{href:"https://github.com/AdilMah",target:"_blank",rel:"noopener noreferrer"},"Adil Mahmood"),"."),Object(N.h)("li",null,"gstatic.com is available to load external JavaScripts from."),Object(N.h)("li",null,"Popular libraries list updated. Thanks",Object(N.h)("a",{href:"https://github.com/diomed",target:"_blank",rel:"noopener noreferrer"},"diomed"),"."),Object(N.h)("li",null,"Added",Object(N.h)("a",{href:"https://github.com/chinchang/web-maker/blob/master/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"},"contribution guidelines")," ","in the Github repository."))),wo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.2"),Object(N.h)("ul",null,Object(N.h)("li",null,"Minor bug fixes."))),ko=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.1"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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.")),Object(N.h)("li",null,"Use Ctrl/Cmd+D to select next occurence of matching selection."),Object(N.h)("li",null,"Improve onboard experience."))),xo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.9.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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.")),Object(N.h)("li",null,Object(N.h)("strong",null,"Detached Preview")," - Yes, you read that correct! You can now detach your preview and send it to your secondary monitor."),Object(N.h)("li",null,Object(N.h)("strong",null,"Find & Replace")," - Long awaited, now its there. Ctrl/Cmd+f to find and add Alt to replace."),Object(N.h)("li",null,Object(N.h)("strong",null,"Atomic CSS (Atomizer) configurations")," - Add custom config for Atomic CSS.",Object(N.h)("a",{href:"https://github.com/acss-io/atomizer#api",target:"_blank",rel:"noopener noreferrer"},"Read more"),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Light mode")," - This new setting makes Web Maker drop some heavy effects like blur etc to gain more performance. Thanks",Object(N.h)("a",{href:"https://github.com/iamandrewluca",target:"_blank",rel:"noopener noreferrer"},"Andrew"),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Preserve logs setting")," - Choose whether or not to preserve logs across preview refreshes. Thanks",Object(N.h)("a",{href:"https://github.com/BasitAli",target:"_blank",rel:"noopener noreferrer"},"Basit"),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Line wrap setting")," - As the name says."),Object(N.h)("li",null,"Semantic UI added to popular libraries."),Object(N.h)("li",null,"Bootstrap, Vue, UI-Kit and more updated to latest versions in popular libraries."),Object(N.h)("li",null,"UX improvements in settings UI"),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Trigger preview refresh anytime with Ctrl/\u2318 + Shift + 5. Even with auto-preview on."))),Mo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.8.1"),Object(N.h)("ul",null,Object(N.h)("li",null,"Vue.js & UIKit version updated to latest version in 'Add Library' list."),Object(N.h)("li",null,"UTF-8 charset added to preview HTML to support universal characters."))),Lo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.8.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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.")),Object(N.h)("li",null,Object(N.h)("strong",null,"Auto Save")," - Your creations now auto-save after your first manual save. This is configurable from settings."),Object(N.h)("li",null,Object(N.h)("strong",null,"Base2Tone-Meadow Editor Theme")," - First user contributed theme. Thanks to Diomed."),Object(N.h)("li",null,Object(N.h)("strong",null,"Use System Fonts")," - You can now use any of your existing system fonts in the editor!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Matching Tag Highlight")," - Cursor over any HTML tag would highlight the matching pair tag."),Object(N.h)("li",null,"Auto-completion suggestion can now be switched off from settings."),Object(N.h)("li",null,Object(N.h)("strong",null,"Improvement")," - Stop white flicker in editor when the app opens."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Add Babel Polyfill to enable use of next-gen built-ins like Promise or WeakMap."),Object(N.h)("li",null,"Vue.js version updated to 2.4.0 in popular library list."),Object(N.h)("li",null,"Downloads permission is optional. Asked only when you take screenshot."))),_o=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.7.2"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"External Libraries")," - Add Foundation.js and update UIKit 3 to latest beta."),Object(N.h)("li",null,Object(N.h)("strong",null,"rawgit.com")," &",Object(N.h)("strong",null,"wzrd.in")," domains are now allowed for loading external libraries from."),Object(N.h)("li",null,"Minor booting speed improvements"))),Io=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.7.1"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Framer.js support")," - You can now load the latest framer.js library from",Object(N.h)("a",{href:"https://builds.framerjs.com/",target:"_blank",rel:"noopener noreferrer"},"framer builds page")," ","and start coding framer prototypes."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": Edit on CodePen is back in action."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": Autocompletion menu doesn't show on cut and paste now."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": Updated & fixed urls of some common external libraries to latest versions. UIKit3 & Bootstrap 4\u03B1 are now in the list."),Object(N.h)("li",null,"Preprocessor selector are now more accessible."))),Ho=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.7.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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\"!",Object(N.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"),"."),Object(N.h)("li",null,Object(N.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."),Object(N.h)("li",null,"Updated most used external libraries to latest versions."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": Add missing Bootstrap JS file to most used external libraries list."),Object(N.h)("li",null,"Several other minor bugfixes and improvements to make Web Maker awesome!"),Object(N.h)("li",null,"Great news to share with you - Web Maker has been featured on the Chrome Webstore homepage! Thanks for all the love :)"))),Ao=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.6.1"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": Emojis vanishing while exporting to Codepen has been fixed."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),":",Object(N.h)("code",null,"console.clear()")," now doesn't error and clears the inbuilt console."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix"),": External libraries added to the creation are exported as well to Codepen."))),jo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.6.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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",Object(N.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"),"."),Object(N.h)("li",null,"Number slider which popped on clicking any number in the code has been removed due to poor user experience."),Object(N.h)("li",null,"Minor usability improvements."))),Bo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.5.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Atomic CSS"),": Use can now use Atomic CSS(ACSS) in your work!",Object(N.h)("a",{href:"https://acss.io/",target:"_blank",rel:"noopener noreferrer"},"Read more about it here"),"."),Object(N.h)("li",null,Object(N.h)("strong",null,"Search your saved creations"),": Easily search through all your saved creations by title."),Object(N.h)("li",null,Object(N.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."),Object(N.h)("li",null,Object(N.h)("strong",null,"Configurable refresh on resize")," - You can configure whether you want the preview to refresh when you resize the preview panel."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Fix indentation",Object(N.h)("a",{href:"https://github.com/chinchang/web-maker/issues/104",target:"_blank",rel:"noopener noreferrer"},"issue")," ","with custom indentation size."))),Eo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.4.2"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Default parameters not working in JavaScript is fixed."))),Oo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.4.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.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."),Object(N.h)("li",null,Object(N.h)("strong",null,"Editor themes"),": You have been heard. Now you can choose from a huge list of wonderful editor themes!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Identation settings"),": Not a spaces fan? Switch to tabs and set your indentation size."),Object(N.h)("li",null,Object(N.h)("strong",null,"Vim key bindings"),": Rejoice Vim lovers!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Code blast"),": Why don't you try coding with this switched on from the settings? Go on..."),Object(N.h)("li",null,Object(N.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/)"),Object(N.h)("li",null,"Save button now highlights when you have unsaved changes."),Object(N.h)("li",null,"Jade is now called Pug. Just a name change."))),To=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.3.2"),Object(N.h)("ul",null,Object(N.h)("li",null,"Update Babel to support latest and coolest ES6 features."),Object(N.h)("li",null,"Improve onboarding experience at first install."))),Po=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.3.1"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Splitting of code and preview panes is remembered by the editor."),Object(N.h)("li",null,"Title of the creation is used for the file name when saving as HTML."))),Vo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.3.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Add Library Autocompletion")," - Just start typing the name of library and you'll be shown matching libraries from cdnjs."),Object(N.h)("li",null,Object(N.h)("strong",null,"Preview Screenshot Capture")," - Want to grab a nice screenshot of your creation. You have it! Click and capture."),Object(N.h)("li",null,Object(N.h)("strong",null,"Auto Indent Code")," - Select your code and hit Shift-Tab to auto-indent it!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Keyboard Navigation in Saved List")," - Now select your creation using arrow keys and hit ENTER to open it."),Object(N.h)("li",null,"Highlight active line in code panes."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Fix in generated title of new creation."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - HTML autocompletion is manual triggered now with Ctrl+Space."))),Do=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.2.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Code Autocompletion")," - See code suggestions while you type!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Full Screen Preview")," - Checkout your creation in a full-screen layout."),Object(N.h)("li",null,Object(N.h)("strong",null,"SASS")," - SASS support added for CSS."),Object(N.h)("li",null,Object(N.h)("strong",null,"Faster CSS update")," - Preview updates instantly without refresh when just CSS is changed."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Indentation fixed while going on new line."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Works even in Chrome Canary now. Though libraries can be added only through CDNs."))),Fo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.1.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"TypeScript")," - Now you can code in TypeScript too!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Stylus Preprocessor")," - Stylus supported adding for CSS."),Object(N.h)("li",null,Object(N.h)("strong",null,"Code Folding")," - Collapse large code blocks for easy editing."),Object(N.h)("li",null,Object(N.h)("strong",null,"Bugfix")," - Support JSX in JavaScript."),Object(N.h)("li",null,"Better onboarding for first time users."))),No=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"2.0.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Save and Load")," - Long pending and super-useful, now you can save your creations and resume them anytime later."),Object(N.h)("li",null,Object(N.h)("strong",null,"Insert JS & CSS")," - Load popular JavaScript & CSS libraries in your work without writing any code."),Object(N.h)("li",null,Object(N.h)("strong",null,"Collapsed Panes")," - Collapse/uncollapse code panes with a single click. Your pane configuration is even saved with every creation!"),Object(N.h)("li",null,Object(N.h)("strong",null,"Quick color & number change")," - Click on any color or number and experiment with quick values using a slider."),Object(N.h)("li",null,Object(N.h)("strong",null,"Linting")," - See your code errors right where you are coding."),Object(N.h)("li",null,"No more browser hang due to infinite loops!"))),Wo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"1.7.0"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("strong",null,"Preprocessors!")," - Enjoy a whole list of preprocessors for HTML(Jade & markdown), CSS(SCSS & LESS) and JavaScript(CoffeeScript & Babel)."),Object(N.h)("li",null,"More awesome font for code."))),zo=Object(N.h)("div",{class:"notification"},Object(N.h)("span",{class:"notification__version"},"1.6.0"),Object(N.h)("ul",null,Object(N.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."),Object(N.h)("li",null,"Download current code as HTML file with Ctrl/\u2318 + S keyboard shortcut."),Object(N.h)("li",null,"New notifications panel added so you are always aware of the new changes in Web-Maker.")));const Ro=["3024-day","3024-night","abcdef","ambiance","base2tone-meadow-dark","base16-dark","base16-light","bespin","blackboard","cobalt","colorforth","dracula","duotone-dark","duotone-light","eclipse","elegant","erlang-dark","hopscotch","icecoder","isotope","lesser-dark","liquibyte","material","mbo","mdn-like","midnight","monokai","neat","neo","night","panda-syntax","paraiso-dark","paraiso-light","pastel-on-dark","railscasts","rubyblue","seti","solarized dark","solarized light","the-matrix","tomorrow-night-bright","tomorrow-night-eighties","ttcn","twilight","vibrant-ink","xq-dark","xq-light","yeti","zenburn"];var Uo=Object(N.h)("h1",null,"Settings"),Ko=Object(N.h)("h3",null,"Indentation"),qo=Object(N.h)("datalist",{id:"indentationSizeList"},Object(N.h)("option",null,"1"),Object(N.h)("option",null,"2"),Object(N.h)("option",null,"3"),Object(N.h)("option",null,"4"),Object(N.h)("option",null,"5"),Object(N.h)("option",null,"6"),Object(N.h)("option",null,"7")),Go=Object(N.h)("hr",null),Jo=Object(N.h)("h3",null,"Editor"),Yo=Object(N.h)("label",{class:"line"},"Default Preprocessors"),Zo=Object(N.h)("option",{value:"html"},"HTML"),Xo=Object(N.h)("option",{value:"markdown"},"Markdown"),Qo=Object(N.h)("option",{value:"jade"},"Pug"),$o=Object(N.h)("option",{value:"css"},"CSS"),es=Object(N.h)("option",{value:"scss"},"SCSS"),ns=Object(N.h)("option",{value:"sass"},"SASS"),os=Object(N.h)("option",{value:"less"},"LESS"),ss=Object(N.h)("option",{value:"stylus"},"Stylus"),is=Object(N.h)("option",{value:"acss"},"Atomic CSS"),as=Object(N.h)("option",{value:"js"},"JS"),rs=Object(N.h)("option",{value:"coffee"},"CoffeeScript"),ls=Object(N.h)("option",{value:"es6"},"ES6 (Babel)"),ds=Object(N.h)("option",{value:"typescript"},"TypeScript"),cs=Object(N.h)("option",{value:"FiraCode"},"Fira Code"),hs=Object(N.h)("option",{value:"Inconsolata"},"Inconsolata"),ps=Object(N.h)("option",{value:"Monoid"},"Monoid"),us=Object(N.h)("option",{value:"FixedSys"},"FixedSys"),ms=Object(N.h)("option",{disabled:"disabled"},"----"),gs=Object(N.h)("option",{value:"other"},"Other font from system"),fs=Object(N.h)("hr",null),bs=Object(N.h)("h3",null,"Fun"),vs=Object(N.h)("hr",null),Cs=Object(N.h)("h3",null,"Advanced"),ys=Object(N.h)("div",{class:"help-text"},"If any loop iteration takes more than the defined time, it is detected as a potential infinite loop and further iterations are stopped.");let Ss=class extends N.Component{updateSetting(t){this.props.onChange(t)}shouldComponentUpdate(){return!0}render(){return Object(N.h)("div",null,Uo,Ko,Object(N.h)("div",{class:"line",title:"I know this is tough, but you have to decide one!"},Object(N.h)("label",null,Object(N.h)("input",{type:"radio",name:"indentation",value:"spaces",checked:"spaces"===this.props.prefs.indentation,onChange:this.updateSetting.bind(this),"data-setting":"indentWith"})," ","Spaces"),Object(N.h)("label",{class:"ml-1"},Object(N.h)("input",{type:"radio",name:"indentation",value:"tabs",checked:"tabs"===this.props.prefs.indentation,onChange:this.updateSetting.bind(this),"data-setting":"indentWith"})," ","Tabs")),Object(N.h)("label",{class:"line",title:""},"Indentation Size"," ",Object(N.h)("input",{type:"range",class:"va-m ml-1",value:this.props.prefs.indentSize,min:"1",max:"7",list:"indentationSizeList","data-setting":"indentSize",onChange:this.updateSetting.bind(this)}),Object(N.h)("span",{id:"indentationSizeValueEl"},this.props.prefs.indentSize),qo),Go,Jo,Object(N.h)("div",{class:"flex block--mobile"},Object(N.h)("div",null,Yo,Object(N.h)("div",{class:"flex line"},Object(N.h)("select",{style:"flex:1;margin-left:20px","data-setting":"htmlMode",value:this.props.prefs.htmlMode,onChange:this.updateSetting.bind(this)},Zo,Xo,Qo),Object(N.h)("select",{style:"flex:1;margin-left:20px","data-setting":"cssMode",value:this.props.prefs.cssMode,onChange:this.updateSetting.bind(this)},$o,es,ns,os,ss,is),Object(N.h)("select",{style:"flex:1;margin-left:20px","data-setting":"jsMode",value:this.props.prefs.jsMode,onChange:this.updateSetting.bind(this)},as,rs,ls,ds)),Object(N.h)("label",{class:"line"},"Theme",Object(N.h)("select",{style:"flex:1;margin:0 20px","data-setting":"editorTheme",value:this.props.prefs.editorTheme,onChange:this.updateSetting.bind(this)},Ro.map((e)=>Object(N.h)("option",{value:e},e)))),Object(N.h)("label",{class:"line"},"Font",Object(N.h)("select",{style:"flex:1;margin:0 20px","data-setting":"editorFont",value:this.props.prefs.editorFont,onChange:this.updateSetting.bind(this)},cs,hs,ps,us,ms,gs),"other"===this.props.prefs.editorFont&&Object(N.h)("input",{id:"customEditorFontInput",type:"text",value:this.props.prefs.editorCustomFont,placeholder:"Custom font name here","data-setting":"editorCustomFont",onChange:this.updateSetting.bind(this)})),Object(N.h)("label",{class:"line"},"Font Size"," ",Object(N.h)("input",{style:"width:70px",type:"number",value:this.props.prefs.fontSize,"data-setting":"fontSize",onChange:this.updateSetting.bind(this)})," ","px"),Object(N.h)("div",{class:"line"},"Key bindings",Object(N.h)("label",{class:"ml-1"},Object(N.h)("input",{type:"radio",name:"keymap",value:"sublime",checked:"sublime"===this.props.prefs.keymap,"data-setting":"keymap",onChange:this.updateSetting.bind(this)})," ","Sublime"),Object(N.h)("label",{class:"ml-1"},Object(N.h)("input",{type:"radio",name:"keymap",value:"vim",checked:"vim"===this.props.prefs.keymap,"data-setting":"keymap",onChange:this.updateSetting.bind(this)})," ","Vim"))),Object(N.h)("div",{class:"ml-2 ml-0--mobile"},Object(N.h)(j,{name:"lineWrap",title:"Toggle wrapping of long sentences onto new line",label:"Line wrap",pref:this.props.prefs.lineWrap,onChange:this.updateSetting.bind(this)}),Object(N.h)(j,{name:"refreshOnResize",title:"Your Preview will refresh when you resize the preview split",label:"Refresh preview on resize",pref:this.props.prefs.refreshOnResize,onChange:this.updateSetting.bind(this)}),Object(N.h)(j,{name:"autoComplete",title:"Turns on the auto-completion suggestions as you type",label:"Auto-complete suggestions",pref:this.props.prefs.autoComplete,onChange:this.updateSetting.bind(this)}),Object(N.h)(j,{name:"autoPreview",title:"Refreshes the preview as you code. Otherwise use the Run button",label:"Auto-preview",pref:this.props.prefs.autoPreview,onChange:this.updateSetting.bind(this)}),Object(N.h)(j,{name:"autoSave",title:"Auto-save keeps saving your code at regular intervals after you hit the first save manually",label:"Auto-save",pref:this.props.prefs.autoSave,onChange:this.updateSetting.bind(this)}),Object(N.h)(j,{name:"preserveLastCode",title:"Loads the last open creation when app starts",label:"Preserve last written code",pref:this.props.prefs.preserveLastCode,onChange:this.updateSetting.bind(this)}),Object(N.h)(j,{name:"replaceNewTab",title:"Turning this on will start showing Web Maker in every new tab you open",label:"Replace new tab page",pref:this.props.prefs.replaceNewTab,onChange:this.updateSetting.bind(this),showWhenExtension:!0}),Object(N.h)(j,{name:"preserveConsoleLogs",title:"Preserves the console logs across your preview refreshes",label:"Preserve console logs",pref:this.props.prefs.preserveConsoleLogs,onChange:this.updateSetting.bind(this)}),Object(N.h)(j,{name:"lightVersion",title:"Switch to lighter version for better performance. Removes things like blur etc.",label:"Fast/light version",pref:this.props.prefs.lightVersion,onChange:this.updateSetting.bind(this)}))),fs,bs,Object(N.h)("p",null,Object(N.h)(j,{title:"Enjoy wonderful particle blasts while you type",label:"Code blast!",name:"isCodeBlastOn",pref:this.props.prefs.isCodeBlastOn,onChange:this.updateSetting.bind(this)})),vs,Cs,Object(N.h)("p",null,Object(N.h)("label",{class:"line",title:"This timeout is used to indentify a possible infinite loop and prevent it."},"Maximum time allowed in a loop iteration",Object(N.h)("input",{type:"number",value:this.props.prefs.infiniteLoopTimeout,"data-setting":"infiniteLoopTimeout",onChange:this.updateSetting.bind(this)})," ","ms"),ys))}};n("zKjx");const ws="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";var ks=Object(N.h)("div",{class:"tac"},Object(N.h)("h1",null,"Support the Developer"),Object(N.h)("p",null,"Hi,"," ",Object(N.h)("a",{href:"https://kushagragour.in",target:"_blank",rel:"noopener noreferrer"},"Kushagra")," ","here! Web Maker is a free and open-source project. To keep myself motivated for working on such open-source and free"," ",Object(N.h)("a",{href:"https://kushagragour.in/lab/",target:"_blank",rel:"noopener noreferrer"},"side projects"),", I am accepting donations. Your pledge, no matter how small, will act as an appreciation towards my work and keep me going forward making Web Maker more awesome\uD83D\uDD25. So please consider donating. \uD83D\uDE4F\uD83C\uDFFC (could be as small as $1/month)."),Object(N.h)("div",{class:"flex flex-h-center",id:"onboardDontShowInTabOptionBtn","d-click":"onDontShowInTabClicked"},Object(N.h)("a",{class:"onboard-selection",href:"https://patreon.com/kushagra",target:"_blank",rel:"noopener noreferrer","aria-label":"Make a monthly pledge on Patreon"},Object(N.h)("img",{src:"patreon.png",height:"60",alt:"Become a patron image"}),Object(N.h)("h3",{class:"onboard-selection-text"},"Make a monthly pledge on Patreon"))),Object(N.h)("a",{href:"https://www.paypal.me/kushagragour",target:"_blank",rel:"noopener noreferrer","aria-label":"Make a one time donation on Paypal"},"Or, make a one time donation")),xs=Object(N.h)("h1",null,"Keyboard Shortcuts"),Ms=Object(N.h)("div",{class:"flex"},Object(N.h)("div",null,Object(N.h)("h2",null,"Global"),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + ?"),Object(N.h)("span",{class:"kbd-shortcut__details"},"See keyboard shortcuts")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + 5"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Refresh preview")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + S"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Save current creations")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + O"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Open list of saved creations")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl + L"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Clear console (works when console input is focused)")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Esc"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Close saved creations panel & modals"))),Object(N.h)("div",{class:"ml-2"},Object(N.h)("h2",null,"Editor"),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + F"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Find")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + G"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Select next match")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Shift + G"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Select previous match")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + Opt/Alt + F"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Find & replace")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Shift + Tab"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Realign code")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ]"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Indent code right")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + ["),Object(N.h)("span",{class:"kbd-shortcut__details"},"Indent code left")),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Tab"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Emmet code completion"," ",Object(N.h)("a",{href:"https://emmet.io/",target:"_blank",rel:"noopener noreferrer"},"Read more"))),Object(N.h)("p",null,Object(N.h)("span",{class:"kbd-shortcut__keys"},"Ctrl/\u2318 + /"),Object(N.h)("span",{class:"kbd-shortcut__details"},"Single line comment")))),Ls=Object(N.h)("h2",null,"Import your creations in your account"),_s=Object(N.h)("p",null,"It's okay if you don't want to. You can simply logout and access them anytime on this browser."),Is=Object(N.h)("div",{class:"alerts-container",id:"js-alerts-container"});let Hs=class extends N.Component{shouldComponentUpdate(){return!1}render(){return Is}};var As=Object(N.h)("div",{class:"web-maker-with-tag"},"Web Maker"),js=Object(N.h)("p",null,"Made with ",Object(N.h)("span",{style:"margin-right: 8px;"},"\uD83D\uDC96")," &"," ",Object(N.h)("span",{style:"margin-right: 8px;"},"\uD83D\uDE4C")," by"," ",Object(N.h)("a",{href:"https://twitter.com/chinchang457",target:"_blank",rel:"noopener noreferrer"},"Kushagra Gour")),Bs=Object(N.h)("p",null,Object(N.h)("a",{href:"/docs",target:"_blank",rel:"noopener noreferrer"},"Read the documentation"),"."),Es=Object(N.h)("p",null,"Tweet out your feature requests, comments & suggestions to"," ",Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://twitter.com/webmakerApp"},"@webmakerApp"),"."),Os=Object(N.h)("p",null,"Like this extension? Please"," ",Object(N.h)("a",{href:"https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews",target:"_blank",rel:"noopener noreferrer"},"rate it here"),"."),Ts=Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#gift-icon"})),Ps=Object(N.h)("a",{"aria-label":"Rate Web Maker",href:"https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews",target:"_blank",rel:"noopener noreferrer",class:"btn btn-icon"},Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#heart-icon"})),"Share Web Maker"),Vs=Object(N.h)("a",{"aria-label":"Chat",href:"https://web-maker.slack.com",target:"_blank",rel:"noopener noreferrer",class:"btn btn-icon"},Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#chat-icon"})),"Chat"),Ds=Object(N.h)("a",{"aria-label":"Report a Bug",href:"https://github.com/chinchang/web-maker/issues",target:"_blank",rel:"noopener noreferrer",class:"btn btn-icon"},Object(N.h)("svg",null,Object(N.h)("use",{xlinkHref:"#bug-icon"})),"Report a bug"),Fs=Object(N.h)("p",null,Object(N.h)("h3",null,"Awesome libraries used"),Object(N.h)("ul",null,Object(N.h)("li",null,Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://kushagragour.in/lab/hint/"},"Hint.css")," ","&",Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/chinchang/screenlog.js"},"Screenlog.js")," ","- By me :)"),Object(N.h)("li",null,Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://nathancahill.github.io/Split.js/"},"Split.js")," ","- Nathan Cahill"),Object(N.h)("li",null,Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://codemirror.net/"},"Codemirror")," ","- Marijn Haverbeke"),Object(N.h)("li",null,Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://emmet.io/"},"Emmet")," ","- Sergey Chikuyonok"),Object(N.h)("li",null,Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"http://esprima.org/"},"Esprima")," ","- Ariya Hidayat"),Object(N.h)("li",null,Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/enjalot/Inlet"},"Inlet")," ","- Ian Johnson"),Object(N.h)("li",null,Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://webmakerapp.com/"},"Web Maker!")," ","- whhat!"))),Ns=Object(N.h)("p",null,Object(N.h)("h3",null,"License"),"\"Web Maker\" is"," ",Object(N.h)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/chinchang/web-maker"},"open-source")," ","under the"," ",Object(N.h)("a",{href:"https://opensource.org/licenses/MIT",target:"_blank",rel:"noopener noreferrer"},"MIT License"),"."),Ws=Object(N.h)("div",{class:"tac"},Object(N.h)("svg",{width:"130px",height:"50px","aria-hidden":"true"},Object(N.h)("use",{xlinkHref:"#logo"})),Object(N.h)("h1",{style:"margin-top:20px"},"Welcome to Web Maker")),zs=Object(N.h)("div",{class:"flex--desk",style:"margin-top:40px;"},Object(N.h)("div",{class:"onboard-step show-when-app hide-on-mobile"},Object(N.h)("div",{class:"tac"},Object(N.h)("svg",{class:"onboard-step__icon",viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z"}))),Object(N.h)("p",null,"Open Web Maker anytime by visiting"," ",Object(N.h)("a",null,"https://webmakerapp.com/app/")," - Even when you are offline! It just works! \uD83D\uDE31 ",Object(N.h)("strong",null,"Drag the following bookmarklet")," on your bookmark bar to create a quick access shortcut:",Object(N.h)("a",{class:"ml-1 bookmarklet",href:"https://webmakerapp.com/app/"},Object(N.h)("svg",{width:"20",height:"20","aria-hidden":"true"},Object(N.h)("use",{xlinkHref:"#logo"})),"Web Maker"))),Object(N.h)("div",{class:"onboard-step show-when-extension"},Object(N.h)("div",{class:"tac"},Object(N.h)("svg",{class:"onboard-step__icon",viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z"}))),Object(N.h)("p",null,"Open Web Maker anytime by clicking the",Object(N.h)("svg",{class:"relative",style:"top:5px;",width:"40",height:"30"},Object(N.h)("use",{xlinkHref:"#logo"}))," ","button in top-right side of your browser.")),Object(N.h)("div",{class:"onboard-step"},Object(N.h)("div",{class:"tac"},Object(N.h)("svg",{class:"onboard-step__icon",viewBox:"0 0 24 24"},Object(N.h)("use",{xlinkHref:"#settings-icon"}))),Object(N.h)("p",null,"Configure and customize settings by clicking the gear icon (",Object(N.h)("svg",{style:"width:18px;height:18px;position:relative;top:3px;fill:#888",viewBox:"0 0 24 24"},Object(N.h)("use",{xlinkHref:"#settings-icon"})),") in bottom right of the app.")),Object(N.h)("div",{class:"onboard-step"},Object(N.h)("div",{class:"tac"},Object(N.h)("svg",{class:"onboard-step__icon",style:"stroke-width:0.3px;"},Object(N.h)("use",{xlinkHref:"#twitter-icon"}))),Object(N.h)("p",null,"Follow"," ",Object(N.h)("a",{href:"https://twitter.com/intent/follow?screen_name=webmakerApp",targe:"_blank",rel:"noopener noreferrer"},"@webmakerApp")," ","to know about the new upcoming features!"))),Rs=Object(N.h)("p",{class:"tac show-when-app"},"If you are an existing Chrome extension user, you can import your creations from there to here."," ",Object(N.h)("a",{href:"https://medium.com/web-maker/importing-exporting-your-creations-d92e7de5c3dc",target:"_blank",rel:"noopener noreferrer"},"Learn how to export/import"),"."),Us=Object(N.h)("symbol",{id:"logo",viewBox:"-145 -2 372 175"},Object(N.h)("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",transform:"translate(-145.000000, -1.000000)"},Object(N.h)("polygon",{id:"Path-1",fill:"#FF4600",points:"31 0 232 0 132 173.310547"}),Object(N.h)("polygon",{id:"Path-1",fill:"#FF6C00",points:"0 0 201 0 101 173.310547"}),Object(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"}),Object(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"}))),Ks=Object(N.h)("symbol",{id:"bug-icon",viewBox:"0 0 24 24"},Object(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"})),qs=Object(N.h)("symbol",{id:"google-icon",viewBox:"0 0 24 24"},Object(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"})),Gs=Object(N.h)("symbol",{id:"fb-icon",viewBox:"0 0 24 24"},Object(N.h)("path",{d:"M17,2V2H17V6H15C14.31,6 14,6.81 14,7.5V10H14L17,10V14H14V22H10V14H7V10H10V6A4,4 0 0,1 14,2H17Z"})),Js=Object(N.h)("symbol",{id:"github-icon",viewBox:"0 0 24 24"},Object(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"})),Ys=Object(N.h)("symbol",{id:"settings-icon",viewBox:"0 0 24 24"},Object(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"})),Zs=Object(N.h)("symbol",{id:"twitter-icon",viewBox:"0 0 16 16"},Object(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"})),Xs=Object(N.h)("symbol",{id:"heart-icon",viewBox:"0 0 24 24"},Object(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"})),Qs=Object(N.h)("symbol",{id:"play-icon",viewBox:"0 0 24 24"},Object(N.h)("svg",null,Object(N.h)("path",{d:"M8,5.14V19.14L19,12.14L8,5.14Z"}))),$s=Object(N.h)("symbol",{id:"cancel-icon",viewBox:"0 0 24 24"},Object(N.h)("svg",null,Object(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"}))),ei=Object(N.h)("symbol",{id:"chevron-icon",viewBox:"0 0 24 24"},Object(N.h)("svg",null,Object(N.h)("path",{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"}))),ti=Object(N.h)("symbol",{id:"chat-icon",viewBox:"0 0 24 24"},Object(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"})),ni=Object(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"}),oi=Object(N.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"}),si=Object(N.h)("symbol",{id:"cross-icon",viewBox:"0 0 24 24"},Object(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"})),ii=Object(N.h)("symbol",{id:"keyboard-icon",viewBox:"0 0 24 24"},Object(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"})),ai=Object(N.h)("symbol",{id:"mode-icon",viewBox:"0 0 100 100"},Object(N.h)("g",null,Object(N.h)("rect",{x:0,y:0,width:28,height:47}),Object(N.h)("rect",{x:36,y:0,width:28,height:47}),Object(N.h)("rect",{x:72,y:0,width:28,height:47}),Object(N.h)("rect",{x:0,y:53,width:100,height:47}))),ri=Object(N.h)("symbol",{id:"vertical-mode-icon",viewBox:"0 0 100 100"},Object(N.h)("g",null,Object(N.h)("rect",{x:0,y:0,width:20,height:100}),Object(N.h)("rect",{x:23,y:0,width:20,height:100}),Object(N.h)("rect",{x:46,y:0,width:20,height:100}),Object(N.h)("rect",{x:69,y:0,width:32,height:100}))),li=Object(N.h)("symbol",{id:"search",viewBox:"0 0 24 24"},Object(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"})),di=Object(N.h)("g",{fill:"none",fillRule:"evenodd",strokeWidth:10},Object(N.h)("circle",{cx:22,cy:22,r:1},Object(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"}),Object(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"})),Object(N.h)("circle",{cx:22,cy:22,r:1},Object(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"}),Object(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"}))),ci=Object.assign||function(e){for(var t,n=1;nHello, World!\"}"})),bi=Object(N.h)(qn,null),vi=Object(N.h)(function(){return Object(N.h)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",style:{display:"none"}},Us,Ks,qs,Gs,Js,Ys,Zs,Xs,Qs,$s,ei,ti,Object(N.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"},ni,oi,si,ii,ai,ri,li,Object(N.h)("symbol",{id:"loader-icon",viewBox:"0 0 44 44"},di)))},null),Ci=Object(N.h)("form",{style:"display:none;",action:"https://codepen.io/pen/define",method:"POST",target:"_blank",id:"codepenForm"},Object(N.h)("input",{type:"hidden",name:"data",value:"{\"title\": \"New Pen!\", \"html\": \"
Hello, World!
\"}"}));let yi=class extends N.Component{constructor(){super(),this.AUTO_SAVE_INTERVAL=15000,this.state={isSavedItemPaneOpen:!1,isModalOpen:!1,isAddLibraryModalOpen:!1,isSettingsModalOpen:!1,isHelpModalOpen:!1,isNotificationsModalOpen:!1,isLoginModalOpen:!1,isProfileModalOpen:!1,isSupportDeveloperModalOpen:!1,isKeyboardShortcutsModalOpen:!1,isAskToImportModalOpen:!1,isOnboardModalOpen:!1,prefs:{},currentItem:{title:"",externalLibs:{js:"",css:""}}},this.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},this.prefs={},Fn.a.auth().onAuthStateChanged((e)=>{this.setState({isLoginModalOpen:!1}),e?(c("You are -> ",e),Cn.add("You are now logged in!"),this.setState({user:e}),window.user=e,!window.localStorage[hi.ASKED_TO_IMPORT_CREATIONS]&&this.fetchItems(!1,!0).then((e)=>{e.length&&(this.oldSavedItems=e,this.oldSavedCreationsCount=e.length,this.setState({isAskToImportModalOpen:!0}),v("ui","askToImportModalSeen"))}),window.db.getUser(e.uid).then((t)=>{if(t){const t=ci({},this.state.prefs);ci(t,e.settings),this.setState({prefs:t}),this.updateSetting()}})):(this.setState({user:void 0}),delete window.user),this.updateProfileUi()})}componentWillMount(){var e;window.onunload=()=>{this.saveCode("code"),this.detachedWindow&&this.detachedWindow.close()},db.local.get({layoutMode:1,code:""},(t)=>{this.toggleLayout(t.layoutMode),this.state.prefs.layoutMode=t.layoutMode,t.code&&(e=t.code)}),db.getSettings(this.defaultSettings).then((t)=>{t.preserveLastCode&&e?(this.setState({unsavedEditCount:0}),e.id&&window.IS_EXTENSION?db.local.get(e.id,(t)=>{t[e.id]&&(c("Load item ",e.id),this.setCurrentItem(t[e.id]).then(()=>this.refreshEditor()))}):(c("Load last unsaved item",e),this.setCurrentItem(e).then(()=>this.refreshEditor()))):this.createNewItem(),ci(this.state.prefs,t),this.setState({prefs:this.state.prefs}),this.updateSetting()}),db.getUserLastSeenVersion().then((e)=>{e||(this.setState({isOnboardModalOpen:!0}),-1===document.cookie.indexOf("onboarded")&&(v("ui","onboardModalSeen",ui),document.cookie="onboarded=1"),window.db.setUserLastSeenVersion(ui)),e&&-1===r(e,ui)&&!window.localStorage.pledgeModalSeen&&(this.openSupportDeveloperModal(),window.localStorage.pledgeModalSeen=!0),e&&-1!==r(e,ui)||(this.setState({hasUnseenChangelog:!0}),this.hasSeenNotifications=!1)})}updateProfileUi(){this.state.user?document.body.classList.add("is-logged-in"):document.body.classList.remove("is-logged-in")}refreshEditor(){this.toggleLayout(this.state.currentItem.layoutMode||this.state.prefs.layoutMode),this.updateExternalLibCount(),this.contentWrap.refreshEditor()}forkItem(e){if(this.state.unsavedEditCount){var t=confirm("You have unsaved changes in your current work. Do you want to discard unsaved changes and continue?");if(!t)return}const n=JSON.parse(JSON.stringify(e));delete n.id,n.title="(Forked) "+e.title,n.updatedOn=Date.now(),this.setCurrentItem(n).then(()=>this.refreshEditor()),Cn.add(`"${e.title}" was forked`),v("fn","itemForked")}createNewItem(){var e=new Date;this.setCurrentItem({title:"Untitled "+e.getDate()+"-"+(e.getMonth()+1)+"-"+e.getHours()+":"+e.getMinutes(),html:"",css:"",js:"",externalLibs:{js:"",css:""},layoutMode:this.state.currentLayoutMode}).then(()=>this.refreshEditor()),Cn.add("New item created")}openItem(e){this.setCurrentItem(e).then(()=>this.refreshEditor()),Cn.add("Saved item loaded")}removeItem(e){var t=confirm(`Are you sure you want to delete "${e.title}"?`);t&&(bn.unsetItemForUser(e.id),bn.removeItem(e.id).then(()=>{Cn.add("Item removed.",e),this.state.currentItem.id===e.id&&this.createNewItem()}),delete this.state.savedItems[e.id],this.setState({savedItems:ci({},this.state.savedItems)}),v("fn","itemRemoved"))}setCurrentItem(e){const t=o();return e.htmlMode=e.htmlMode||this.state.prefs.htmlMode||R.HTML,e.cssMode=e.cssMode||this.state.prefs.cssMode||U.CSS,e.jsMode=e.jsMode||this.state.prefs.jsMode||K.JS,this.setState({currentItem:e},t.resolve),this.isAutoSavingEnabled=!1,this.setState({unsavedEditCount:0}),t.promise}saveBtnClickHandler(){v("ui","saveBtnClick",this.state.currentItem.id?"saved":"new"),this.saveItem()}populateItemsInSavedPane(){this.setState({savedItems:ci({},this.state.savedItems)}),this.toggleSavedItemsPane()}toggleSavedItemsPane(){this.setState({isSavedItemPaneOpen:!this.state.isSavedItemPaneOpen}),this.state.isSavedItemPaneOpen?window.searchInput.focus():window.searchInput.value="",document.body.classList[this.state.isSavedItemPaneOpen?"add":"remove"]("overlay-visible")}async fetchItems(e,t){var n=o();this.state.savedItems={};var s=[];return window.user&&!t?(s=await bn.getAllItems(),c("got items"),e&&s.forEach((e)=>{this.state.savedItems[e.id]=e}),n.resolve(s),n.promise):(db.local.get("items",(t)=>{var o=Object.getOwnPropertyNames(t.items||{});o.length||n.resolve([]),v("fn","fetchItems",o.length);for(let a=0;a{e&&(this.state.savedItems[o[a]]=t[o[a]]),s.push(t[o[a]]),o.length===s.length&&n.resolve(s)})}),n.promise)}openSavedItemsPane(){this.setState({isFetchingItems:!0}),this.fetchItems(!0).then((e)=>{this.setState({isFetchingItems:!1}),this.populateItemsInSavedPane(e)})}openAddLibrary(){this.setState({isAddLibraryModalOpen:!0})}closeSavedItemsPane(){this.setState({isSavedItemPaneOpen:!1}),document.body.classList.remove("overlay-visible"),this.editorWithFocus&&this.editorWithFocus.focus()}componentDidMount(){document.body.style.height=`${window.innerHeight}px`,window.addEventListener("keydown",(e)=>{(e.ctrlKey||e.metaKey)&&83===e.keyCode&&(e.preventDefault(),this.saveItem(),v("ui","saveItemKeyboardShortcut")),(e.ctrlKey||e.metaKey)&&e.shiftKey&&53===e.keyCode?(e.preventDefault(),this.contentWrap.setPreviewContent(!0,!0),v("ui","previewKeyboardShortcut")):(e.ctrlKey||e.metaKey)&&79===e.keyCode?(e.preventDefault(),this.openSavedItemsPane(),v("ui","openCreationKeyboardShortcut")):(e.ctrlKey||e.metaKey)&&e.shiftKey&&191===e.keyCode?(e.preventDefault(),this.setState({isKeyboardShortcutsModalOpen:!this.state.isKeyboardShortcutsModalOpen}),v("ui","showKeyboardShortcutsShortcut")):27===e.keyCode&&this.closeSavedItemsPane()}),window.addEventListener("focusin",(t)=>{if(document.body.classList.contains("overlay-visible")){const e=$(".is-modal-visible");if(!e)return;e.contains(t.target)||(t.preventDefault(),e.querySelector(".js-modal__close-btn").focus())}})}closeAllOverlays(){this.state.isSavedItemPaneOpen&&this.closeSavedItemsPane(),this.setState({isAddLibraryModalOpen:!1,isSettingsModalOpen:!1,isHelpModalOpen:!1,isNotificationsModalOpen:!1,isLoginModalOpen:!1,isProfileModalOpen:!1,isSupportDeveloperModalOpen:!1,isKeyboardShortcutsModalOpen:!1,isAskToImportModalOpen:!1,isOnboardModalOpen:!1})}onExternalLibChange(e){c("onExternalLibChange"),this.state.currentItem.externalLibs={js:e.js,css:e.css},this.updateExternalLibCount(),this.setState({currentItem:ci({},this.state.currentItem)}),this.contentWrap.setPreviewContent(!0),Cn.add("Libraries updated.")}updateExternalLibCount(){var e=0;this.state.currentItem.externalLibs&&(e+=this.state.currentItem.externalLibs.js.split("\n").filter((e)=>!!e).length,e+=this.state.currentItem.externalLibs.css.split("\n").filter((e)=>!!e).length,this.setState({externalLibCount:e}))}toggleLayout(e){return e=600>window.innerWidth?2:e,this.state.currentLayoutMode===e?(this.contentWrap.resetSplitting(),void this.setState({currentLayoutMode:e})):void([1,2,3,4,5].forEach((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},()=>{this.contentWrap.resetSplitting(),this.contentWrap.setPreviewContent(!0)}))}layoutBtnClickHandler(e){this.saveSetting("layoutMode",e),v("ui","toggleLayoutClick",e),this.toggleLayout(e)}getCodePaneSizes(){var e;const t=this.state.currentLayoutMode;var n=2===t||5===t?"width":"height";try{e=[htmlCodeEl.style[n],cssCodeEl.style[n],jsCodeEl.style[n]]}catch(t){e=[33.33,33.33,33.33]}finally{return e}}getMainPaneSizes(){var e;const t=this.state.currentLayoutMode;var n=2===t?"height":"width";try{e=[+$("#js-code-side").style[n].match(/([\d.]+)%/)[1],+$("#js-demo-side").style[n].match(/([\d.]+)%/)[1]]}catch(t){e=[50,50]}finally{return e}}saveSetting(e,t){const n=o();return db.local.set({[e]:t},n.resolve),n.promise}saveCode(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(),c("saving key",e||this.state.currentItem.id,this.state.currentItem),bn.setItem(e||this.state.currentItem.id,this.state.currentItem).then(function(){window.user&&!navigator.onLine?Cn.add("Item saved locally. Will save to account when you are online."):Cn.add("Item saved."),this.setState({unsavedEditCount:0})}.bind(this))}saveItem(){if(!window.user&&!window.localStorage[hi.LOGIN_AND_SAVE_MESSAGE_SEEN]){const e=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[hi.LOGIN_AND_SAVE_MESSAGE_SEEN]=!0,!e)return v("ui",hi.LOGIN_AND_SAVE_MESSAGE_SEEN,"login"),this.closeAllOverlays(),void this.setState({isLoginModalOpen:!0});v("ui",hi.LOGIN_AND_SAVE_MESSAGE_SEEN,"local")}var e=!this.state.currentItem.id;this.state.currentItem.id=this.state.currentItem.id||"item-"+l(),this.setState({isSaving:!0}),this.saveCode().then(()=>{this.setState({isSaving:!1}),!this.isAutoSavingEnabled&&this.state.prefs.autoSave&&(this.isAutoSavingEnabled=!0,Cn.add("Auto-save enabled."))}),e&&bn.setItemForUser(this.state.currentItem.id)}onCodeModeChange(e,t){const n=ci({},this.state.currentItem);n[`${e}Mode`]=t,this.setState({currentItem:n})}onCodeChange(e,t,n){this.state.currentItem[e]=t,n&&(this.setState({unsavedEditCount:this.state.unsavedEditCount+1}),0==this.state.unsavedEditCount%pi&&this.state.unsavedEditCount>=pi&&(window.saveBtn.classList.add("animated"),window.saveBtn.classList.add("wobble"),window.saveBtn.addEventListener("animationend",()=>{window.saveBtn.classList.remove("animated"),window.saveBtn.classList.remove("wobble")})))}onCodeSettingsChange(e,t){this.state.currentItem[`${e}Settings`]={acssConfig:t}}titleInputBlurHandler(t){this.state.currentItem.title=t.target.value,this.state.currentItem.id&&(this.saveItem(),v("ui","titleChanged"))}updateSetting(t){if(t){var e=t.target.dataset.setting,n={},o=t.target;c(e,"checkbox"===o.type?o.checked:o.value);const s=ci({},this.state.prefs);s[e]="checkbox"===o.type?o.checked:o.value,n[e]=s[e],this.setState({prefs:s}),db.sync.set(n,function(){Cn.add("Setting saved")}),window.user&&window.db.getDb().then((t)=>{t.collection("users").doc(window.user.uid).update({[`settings.${e}`]:this.state.prefs[e]}).then((t)=>{c(`Setting "${e}" for user`,t)}).catch((e)=>c(e))}),v("ui","updatePref-"+e,s[e])}const s=this.state.prefs;runBtn.classList[s.autoPreview?"add":"remove"]("hide"),this.contentWrap.applyCodemirrorSettings(this.state.prefs),s.autoSave?!this.autoSaveInterval&&(this.autoSaveInterval=setInterval(()=>{this.autoSaveLoop()},this.AUTO_SAVE_INTERVAL)):(clearInterval(this.autoSaveInterval),this.autoSaveInterval=null),document.body.classList[s.lightVersion?"add":"remove"]("light-version")}autoSaveLoop(){this.isAutoSavingEnabled&&this.state.unsavedEditCount&&this.saveItem()}loginBtnClickHandler(){this.setState({isLoginModalOpen:!0})}profileBtnClickHandler(){this.setState({isProfileModalOpen:!0})}logout(){if(this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to logout?");if(!e)return}v("fn","loggedOut"),Nn.logout(),this.setState({isProfileModalOpen:!1}),Cn.add("Log out successfull")}itemClickHandler(e){setTimeout(()=>{this.openItem(e)},350),this.toggleSavedItemsPane()}itemRemoveBtnClickHandler(e){this.removeItem(e)}itemForkBtnClickHandler(e){this.toggleSavedItemsPane(),setTimeout(()=>{this.forkItem(e)},350)}newBtnClickHandler(){if(v("ui","newBtnClick"),this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to create something new?");e&&this.createNewItem()}else this.createNewItem()}openBtnClickHandler(){v("ui","openBtnClick"),this.openSavedItemsPane()}detachedPreviewBtnHandler(){v("ui","detachPreviewBtnClick"),this.contentWrap.detachPreview()}notificationsBtnClickHandler(){return this.setState({isNotificationsModalOpen:!0}),this.state.isNotificationsModalOpen&&!this.hasSeenNotifications&&(this.hasSeenNotifications=!0,this.setState({hasUnseenChangelog:!1}),window.db.setUserLastSeenVersion(ui)),v("ui","notificationButtonClick",ui),!1}codepenBtnClickHandler(t){if(this.state.currentItem.cssMode===U.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:q[this.state.currentItem.htmlMode].codepenVal,css_pre_processor:q[this.state.currentItem.cssMode].codepenVal,js_pre_processor:q[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(),v("ui","openInCodepen"),t.preventDefault()}saveHtmlBtnClickHandler(t){f(this.state.currentItem),v("ui","saveHtmlClick"),t.preventDefault()}runBtnClickHandler(){this.contentWrap.setPreviewContent(!0,!0),v("ui","runBtnClick")}exportItems(){b().then(()=>{this.fetchItems().then((e)=>{var t=new Date,n=["web-maker-export",t.getFullYear(),t.getMonth()+1,t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()].join("-");n+=".json";var o=new Blob([JSON.stringify(e,!1,2)],{type:"application/json;charset=UTF-8"});p(n,o),v("fn","exportItems")})})}exportBtnClickHandler(t){this.exportItems(),t.preventDefault(),v("ui","exportBtnClicked")}screenshotBtnClickHandler(t){this.contentWrap.getDemoFrame((e)=>{P(e.getBoundingClientRect())}),t.preventDefault()}openSupportDeveloperModal(){this.closeAllOverlays(),this.setState({isSupportDeveloperModalOpen:!0})}supportDeveloperBtnClickHandler(t){this.openSupportDeveloperModal(t)}dontAskToImportAnymore(t){this.setState({isAskToImportModalOpen:!1}),window.localStorage[hi.ASKED_TO_IMPORT_CREATIONS]=!0,t&&v("ui","dontAskToImportBtnClick")}importCreationsAndSettingsIntoApp(){this.mergeImportedItems(this.oldSavedItems).then(()=>{v("fn","oldItemsImported"),this.dontAskToImportAnymore()})}editorFocusHandler(e){this.editorWithFocus=e}modalOverlayClickHandler(){this.closeAllOverlays()}render(){return Object(N.h)("div",null,Object(N.h)("div",{class:"main-container"},Object(N.h)(w,{externalLibCount:this.state.externalLibCount,openBtnHandler:this.openBtnClickHandler.bind(this),newBtnHandler:this.newBtnClickHandler.bind(this),saveBtnHandler:this.saveBtnClickHandler.bind(this),loginBtnHandler:this.loginBtnClickHandler.bind(this),profileBtnHandler:this.profileBtnClickHandler.bind(this),addLibraryBtnHandler:this.openAddLibrary.bind(this),runBtnClickHandler:this.runBtnClickHandler.bind(this),isFetchingItems:this.state.isFetchingItems,isSaving:this.state.isSaving,title:this.state.currentItem.title,titleInputBlurHandler:this.titleInputBlurHandler.bind(this),user:this.state.user,unsavedEditCount:this.state.unsavedEditCount}),Object(N.h)(qt,{currentLayoutMode:this.state.currentLayoutMode,currentItem:this.state.currentItem,onCodeChange:this.onCodeChange.bind(this),onCodeSettingsChange:this.onCodeSettingsChange.bind(this),onCodeModeChange:this.onCodeModeChange.bind(this),onRef:(e)=>this.contentWrap=e,prefs:this.state.prefs,onEditorFocus:this.editorFocusHandler.bind(this)}),mi,Object(N.h)(mn,{layoutBtnClickHandler:this.layoutBtnClickHandler.bind(this),helpBtnClickHandler:()=>this.setState({isHelpModalOpen:!0}),settingsBtnClickHandler:()=>this.setState({isSettingsModalOpen:!0}),notificationsBtnClickHandler:this.notificationsBtnClickHandler.bind(this),supportDeveloperBtnClickHandler:this.supportDeveloperBtnClickHandler.bind(this),detachedPreviewBtnHandler:this.detachedPreviewBtnHandler.bind(this),codepenBtnClickHandler:this.codepenBtnClickHandler.bind(this),saveHtmlBtnClickHandler:this.saveHtmlBtnClickHandler.bind(this),keyboardShortcutsBtnClickHandler:()=>this.setState({isKeyboardShortcutsModalOpen:!0}),screenshotBtnClickHandler:this.screenshotBtnClickHandler.bind(this),hasUnseenChangelog:this.state.hasUnseenChangelog})),Object(N.h)(kn,{items:this.state.savedItems,isOpen:this.state.isSavedItemPaneOpen,closeHandler:this.closeSavedItemsPane.bind(this),itemClickHandler:this.itemClickHandler.bind(this),itemRemoveBtnClickHandler:this.itemRemoveBtnClickHandler.bind(this),itemForkBtnClickHandler:this.itemForkBtnClickHandler.bind(this),exportBtnClickHandler:this.exportBtnClickHandler.bind(this)}),gi,fi,Object(N.h)(St,{show:this.state.isAddLibraryModalOpen,closeHandler:()=>this.setState({isAddLibraryModalOpen:!1})},Object(N.h)(Vn,{js:this.state.currentItem.externalLibs?this.state.currentItem.externalLibs.js:"",css:this.state.currentItem.externalLibs?this.state.currentItem.externalLibs.css:"",onChange:this.onExternalLibChange.bind(this)})),Object(N.h)(St,{show:this.state.isNotificationsModalOpen,closeHandler:()=>this.setState({isNotificationsModalOpen:!1})},Object(N.h)(A,{onSupportBtnClick:this.openSupportDeveloperModal.bind(this)})),Object(N.h)(St,{extraClasses:"modal--settings",show:this.state.isSettingsModalOpen,closeHandler:()=>this.setState({isSettingsModalOpen:!1})},Object(N.h)(Ss,{prefs:this.state.prefs,onChange:this.updateSetting.bind(this)})),Object(N.h)(St,{extraClasses:"login-modal",show:this.state.isLoginModalOpen,closeHandler:()=>this.setState({isLoginModalOpen:!1})},bi),Object(N.h)(St,{show:this.state.isProfileModalOpen,closeHandler:()=>this.setState({isProfileModalOpen:!1})},Object(N.h)(B,{user:this.state.user,logoutBtnHandler:this.logout.bind(this)})),Object(N.h)(D,{show:this.state.isHelpModalOpen,closeHandler:()=>this.setState({isHelpModalOpen:!1}),onSupportBtnClick:this.openSupportDeveloperModal.bind(this),version:"3.3.1"}),Object(N.h)(E,{show:this.state.isSupportDeveloperModalOpen,closeHandler:()=>this.setState({isSupportDeveloperModalOpen:!1})}),Object(N.h)(O,{show:this.state.isKeyboardShortcutsModalOpen,closeHandler:()=>this.setState({isKeyboardShortcutsModalOpen:!1})}),Object(N.h)(V,{show:this.state.isAskToImportModalOpen,closeHandler:()=>this.setState({isAskToImportModalOpen:!1}),oldSavedCreationsCount:this.oldSavedCreationsCount,importBtnClickHandler:this.importCreationsAndSettingsIntoApp.bind(this),dontAskBtnClickHandler:this.dontAskToImportAnymore.bind(this)}),Object(N.h)(F,{show:this.state.isOnboardModalOpen,closeHandler:()=>this.setState({isOnboardModalOpen:!1})}),Object(N.h)(yt.a,{into:"body"},Object(N.h)("div",{class:"modal-overlay",onClick:this.modalOverlayClickHandler.bind(this)})),vi,Ci)}};t["default"]=yi}},["pwNi"]);
\ No newline at end of file
+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),c=o("CIHI"),p=n(c),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)(p.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},"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,c,p,h,u,m,f,(0,n.h)("symbol",{id:"gift-icon",viewBox:"0 0 24 24"},g,b,y,v,C,S,k,(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"})),c=(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"})),p=(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}))),S=(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}))),k=(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=c:"a11y"===o&&(t=p),(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"},h,u,(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,"," ",m,"\xA0",f,"\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."))),O=(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"})," ","."))),P=(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"),"."))),T=(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"),"."))),V=(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."))),D=(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."))),F=(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."))),W=(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."))),N=(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."))),z=(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."))),U=(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."))),R=(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"))),K=(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."))),J=(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 :)"))),q=(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."))),G=(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."))),Z=(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."))),Y=(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."))),Q=(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."))),X=(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."))),ee=(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."))),te=(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."))),oe=(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."))),ne=(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."))),se=(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!"))),ae=(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."))),ie=(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.")))},"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"))))},"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 p.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,c.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),c=new Date,d=["web-maker",c.getFullYear(),c.getMonth()+1,c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds()].join("-");e.title&&(d=e.title),d+=".html";var p=new Blob([l],{type:"text/html;charset=UTF-8"});s(d,p),(0,r.trackEvent)("fn","saveFileComplete")})},t.handleDownloadsPermission=function(){var e=(0,c.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)};var r=o("qV3Q"),l=o("E5zE"),d=o("y5h4"),c=o("3Z4F"),p=o("4E2n");window.DEBUG=-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(){p.modes[e].hasLoaded=!0,n.resolve()}var o="lib/transpilers",n=(0,v.deferred)();return p.modes[e].hasLoaded?(n.resolve(),n.promise):(e===p.HtmlModes.JADE?(0,h.loadJS)(o+"/jade.js").then(t):e===p.HtmlModes.MARKDOWN?(0,h.loadJS)(o+"/marked.js").then(t):e===p.CssModes.LESS?(0,h.loadJS)(o+"/less.min.js").then(t):e===p.CssModes.SCSS||e===p.CssModes.SASS?(0,h.loadJS)(o+"/sass.js").then(function(){window.sass=new Sass(o+"/sass.worker.js"),t()}):e===p.CssModes.STYLUS?(0,h.loadJS)(o+"/stylus.min.js").then(t):e===p.CssModes.ACSS?(0,h.loadJS)(o+"/atomizer.browser.js").then(t):e===p.JsModes.COFFEESCRIPT?(0,h.loadJS)(o+"/coffee-script.js").then(t):e===p.JsModes.ES6?(0,h.loadJS)(o+"/babel.min.js").then(t):e===p.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",p.modes[e].cmMode),g.default.autoLoadMode(this.cm.html,p.modes[e].cmPath||p.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",p.modes[e].cmMode),this.cm.css.setOption("readOnly",p.modes[e].cmDisable),window.cssSettingsBtn.classList[p.modes[e].hasSettings?"remove":"add"]("hide"),g.default.autoLoadMode(this.cm.css,p.modes[e].cmPath||p.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",p.modes[e].cmMode),g.default.autoLoadMode(this.cm.js,p.modes[e].cmPath||p.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"),window.globalConsoleContainerEl.insertBefore(window.consoleEl,null),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"),$("#js-demo-side").insertBefore(window.consoleEl,null),e.detachedWindow=null,e.setPreviewContent(!0))},500)},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++}),logCountEl.textContent=this.logCount},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,window.logCountEl.textContent=this.logCount},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"},p.modes[this.props.currentItem.htmlMode||"html"].label),w,(0,r.h)("select",{"data-type":"html",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.htmlMode},M,_,x)),(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},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"},p.modes[this.props.currentItem.cssMode||"css"].label),H,(0,r.h)("select",{"data-type":"css",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.cssMode},L,I,E,j,A,B)),(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"},O),(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},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"},p.modes[this.props.currentItem.jsMode||"js"].label),P,(0,r.h)("select",{"data-type":"js",class:"js-mode-select hidden-select",onChange:this.codeModeChangeHandler.bind(this),value:this.props.currentItem.jsMode},T,V,D,F)),(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"]},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)("div",{id:"consoleEl",class:"console "+(this.state.isConsoleOpen?"":"is-minimized")},(0,r.h)("div",{id:"consoleLogEl",class:"console__log"},(0,r.h)("div",{class:"js-console__header code-wrap__header",title:"Double click to toggle console",onDblClick:this.consoleHeaderDblClickHandler.bind(this)},W,(0,r.h)("div",{class:"code-wrap__header-right-options"},(0,r.h)("a",{class:"code-wrap__header-btn",title:"Clear console (CTRL + L)",onClick:this.clearConsoleBtnClickHandler.bind(this)},N),(0,r.h)("a",{class:"code-wrap__header-btn code-wrap__collapse-btn",title:"Toggle console",onClick:this.toggleConsole.bind(this)}))),(0,r.h)(y.default,{options:{mode:"javascript",lineWrapping:!0,theme:"monokai",foldGutter:!0,readOnly:!0,gutters:["CodeMirror-foldgutter"]},onCreation:function(t){return e.consoleCm=t}})),(0,r.h)("div",{id:"consolePromptEl",class:"console__prompt flex flex-v-center"},z,(0,r.h)("input",{onKeyUp:this.evalConsoleExpr.bind(this),class:"console-exec-input"}))),(0,r.h)(S.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=U},"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.onListMouseDown=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"}),(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;oHello, World!\"}"})),X=(0,d.h)(k.default,null),ee=(0,d.h)(K.Icons,null),te=(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!
\"}"})),oe=function(e){function t(){a(this,t);var o=i(this,e.call(this));return o.AUTO_SAVE_INTERVAL=15000,o.state={isSavedItemPaneOpen:!1,isModalOpen:!1,isAddLibraryModalOpen:!1,isSettingsModalOpen:!1,isHelpModalOpen:!1,isNotificationsModalOpen:!1,isLoginModalOpen:!1,isProfileModalOpen:!1,isSupportDeveloperModalOpen:!1,isKeyboardShortcutsModalOpen:!1,isAskToImportModalOpen:!1,isOnboardModalOpen:!1,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},o.prefs={},B.default.auth().onAuthStateChanged(function(e){o.setState({isLoginModalOpen:!1}),e?((0,w.log)("You are -> ",e),j.alertsService.add("You are now logged in!"),o.setState({user:e}),window.user=e,!window.localStorage[J.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,I.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,w.log)("Load item ",e.id),t.setCurrentItem(o[e.id]).then(function(){return t.refreshEditor()}))}):((0,w.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,I.trackEvent)("ui","onboardModalSeen",G),document.cookie="onboarded=1"),window.db.setUserLastSeenVersion(G)),e&&-1===(0,w.semverCompare)(e,G)&&!window.localStorage.pledgeModalSeen&&(t.openSupportDeveloperModal(),window.localStorage.pledgeModalSeen=!0),e&&-1!==(0,w.semverCompare)(e,G)||(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()}),j.alertsService.add("\""+e.title+"\" was forked"),(0,I.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()}),j.alertsService.add("New item created")},t.prototype.openItem=function(e){var t=this;this.setCurrentItem(e).then(function(){return t.refreshEditor()}),j.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&&(M.itemService.unsetItemForUser(e.id),M.itemService.removeItem(e.id).then(function(){j.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,I.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,I.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(){this.setState({isSavedItemPaneOpen:!this.state.isSavedItemPaneOpen}),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 M.itemService.getAllItems(),(0,w.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,I.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,I.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,w.log)("saving key",e||this.state.currentItem.id,this.state.currentItem),M.itemService.setItem(e||this.state.currentItem.id,this.state.currentItem).then(function(){window.user&&!navigator.onLine?j.alertsService.add("Item saved locally. Will save to account when you are online."):j.alertsService.add("Item saved."),this.setState({unsavedEditCount:0})}.bind(this))},t.prototype.saveItem=function(){var e=this;if(!window.user&&!window.localStorage[J.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[J.LOGIN_AND_SAVE_MESSAGE_SEEN]=!0,!t)return(0,I.trackEvent)("ui",J.LOGIN_AND_SAVE_MESSAGE_SEEN,"login"),this.closeAllOverlays(),void this.setState({isLoginModalOpen:!0});(0,I.trackEvent)("ui",J.LOGIN_AND_SAVE_MESSAGE_SEEN,"local")}var o=!this.state.currentItem.id;this.state.currentItem.id=this.state.currentItem.id||"item-"+(0,w.generateRandomId)(),this.setState({isSaving:!0}),this.saveCode().then(function(){e.setState({isSaving:!1}),!e.isAutoSavingEnabled&&e.state.prefs.autoSave&&(e.isAutoSavingEnabled=!0,j.alertsService.add("Auto-save enabled."))}),o&&M.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){this.state.currentItem[e]=t,o&&(this.setState({unsavedEditCount:this.state.unsavedEditCount+1}),0==this.state.unsavedEditCount%q&&this.state.unsavedEditCount>=q&&(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")})))},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,I.trackEvent)("ui","titleChanged"))},t.prototype.updateSetting=function(t){var e=this;if(t){var o=t.target.dataset.setting,n={},s=t.target;(0,w.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(){j.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,w.log)("Setting \""+o+"\" for user",e)}).catch(function(e){return(0,w.log)(e)})}),(0,I.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,I.trackEvent)("fn","loggedOut"),P.auth.logout(),this.setState({isProfileModalOpen:!1}),j.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,I.trackEvent)("ui","newBtnClick"),this.state.unsavedEditCount){var e=confirm("You have unsaved changes. Do you still want to create something new?");e&&this.createNewItem()}else this.createNewItem()},t.prototype.openBtnClickHandler=function(){(0,I.trackEvent)("ui","openBtnClick"),this.openSavedItemsPane()},t.prototype.detachedPreviewBtnHandler=function(){(0,I.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(G)),(0,I.trackEvent)("ui","notificationButtonClick",G),!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,I.trackEvent)("ui","openInCodepen"),t.preventDefault()},t.prototype.saveHtmlBtnClickHandler=function(t){(0,w.saveAsHtml)(this.state.currentItem),(0,I.trackEvent)("ui","saveHtmlClick"),t.preventDefault()},t.prototype.runBtnClickHandler=function(){this.contentWrap.setPreviewContent(!0,!0),(0,I.trackEvent)("ui","runBtnClick")},t.prototype.exportItems=function(){var e=this;(0,w.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,w.downloadFile)(o,n),(0,I.trackEvent)("fn","exportItems")})})},t.prototype.exportBtnClickHandler=function(t){this.exportItems(),t.preventDefault(),(0,I.trackEvent)("ui","exportBtnClicked")},t.prototype.screenshotBtnClickHandler=function(t){this.contentWrap.getDemoFrame(function(e){(0,D.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[J.ASKED_TO_IMPORT_CREATIONS]=!0,t&&(0,I.trackEvent)("ui","dontAskToImportBtnClick")},t.prototype.importCreationsAndSettingsIntoApp=function(){var e=this;this.mergeImportedItems(this.oldSavedItems).then(function(){(0,I.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.render=function(){var e=this;return(0,d.h)("div",null,(0,d.h)("div",{class:"main-container"},(0,d.h)(c.MainHeader,{externalLibCount:this.state.externalLibCount,openBtnHandler:this.openBtnClickHandler.bind(this),newBtnHandler:this.newBtnClickHandler.bind(this),saveBtnHandler:this.saveBtnClickHandler.bind(this),loginBtnHandler:this.loginBtnClickHandler.bind(this),profileBtnHandler:this.profileBtnClickHandler.bind(this),addLibraryBtnHandler:this.openAddLibrary.bind(this),runBtnClickHandler:this.runBtnClickHandler.bind(this),isFetchingItems:this.state.isFetchingItems,isSaving:this.state.isSaving,title:this.state.currentItem.title,titleInputBlurHandler:this.titleInputBlurHandler.bind(this),user:this.state.user,unsavedEditCount:this.state.unsavedEditCount}),(0,d.h)(h.default,{currentLayoutMode:this.state.currentLayoutMode,currentItem:this.state.currentItem,onCodeChange:this.onCodeChange.bind(this),onCodeSettingsChange:this.onCodeSettingsChange.bind(this),onCodeModeChange:this.onCodeModeChange.bind(this),onRef:function(t){return e.contentWrap=t},prefs:this.state.prefs,onEditorFocus:this.editorFocusHandler.bind(this),onSplitUpdate:this.splitUpdateHandler.bind(this)}),Z,(0,d.h)(m.default,{layoutBtnClickHandler:this.layoutBtnClickHandler.bind(this),helpBtnClickHandler:function(){return e.setState({isHelpModalOpen:!0})},settingsBtnClickHandler:function(){return e.setState({isSettingsModalOpen:!0})},notificationsBtnClickHandler:this.notificationsBtnClickHandler.bind(this),supportDeveloperBtnClickHandler:this.supportDeveloperBtnClickHandler.bind(this),detachedPreviewBtnHandler:this.detachedPreviewBtnHandler.bind(this),codepenBtnClickHandler:this.codepenBtnClickHandler.bind(this),saveHtmlBtnClickHandler:this.saveHtmlBtnClickHandler.bind(this),keyboardShortcutsBtnClickHandler:function(){return e.setState({isKeyboardShortcutsModalOpen:!0})},screenshotBtnClickHandler:this.screenshotBtnClickHandler.bind(this),hasUnseenChangelog:this.state.hasUnseenChangelog})),(0,d.h)(g.default,{items:this.state.savedItems,isOpen:this.state.isSavedItemPaneOpen,closeHandler:this.closeSavedItemsPane.bind(this),itemClickHandler:this.itemClickHandler.bind(this),itemRemoveBtnClickHandler:this.itemRemoveBtnClickHandler.bind(this),itemForkBtnClickHandler:this.itemForkBtnClickHandler.bind(this),exportBtnClickHandler:this.exportBtnClickHandler.bind(this)}),Y,Q,(0,d.h)(C.default,{show:this.state.isAddLibraryModalOpen,closeHandler:function(){return e.setState({isAddLibraryModalOpen:!1})}},(0,d.h)(y.default,{js:this.state.currentItem.externalLibs?this.state.currentItem.externalLibs.js:"",css:this.state.currentItem.externalLibs?this.state.currentItem.externalLibs.css:"",onChange:this.onExternalLibChange.bind(this)})),(0,d.h)(C.default,{show:this.state.isNotificationsModalOpen,closeHandler:function(){return e.setState({isNotificationsModalOpen:!1})}},(0,d.h)(_.Notifications,{onSupportBtnClick:this.openSupportDeveloperModal.bind(this)})),(0,d.h)(C.default,{extraClasses:"modal--settings",show:this.state.isSettingsModalOpen,closeHandler:function(){return e.setState({isSettingsModalOpen:!1})}},(0,d.h)(H.default,{prefs:this.state.prefs,onChange:this.updateSetting.bind(this)})),(0,d.h)(C.default,{extraClasses:"login-modal",show:this.state.isLoginModalOpen,closeHandler:function(){return e.setState({isLoginModalOpen:!1})}},X),(0,d.h)(C.default,{show:this.state.isProfileModalOpen,closeHandler:function(){return e.setState({isProfileModalOpen:!1})}},(0,d.h)(O.Profile,{user:this.state.user,logoutBtnHandler:this.logout.bind(this)})),(0,d.h)(U.HelpModal,{show:this.state.isHelpModalOpen,closeHandler:function(){return e.setState({isHelpModalOpen:!1})},onSupportBtnClick:this.openSupportDeveloperModal.bind(this),version:"3.3.1"}),(0,d.h)(T.SupportDeveloperModal,{show:this.state.isSupportDeveloperModalOpen,closeHandler:function(){return e.setState({isSupportDeveloperModalOpen:!1})}}),(0,d.h)(V.KeyboardShortcutsModal,{show:this.state.isKeyboardShortcutsModalOpen,closeHandler:function(){return e.setState({isKeyboardShortcutsModalOpen:!1})}}),(0,d.h)(F.AskToImportModal,{show:this.state.isAskToImportModalOpen,closeHandler:function(){return e.setState({isAskToImportModalOpen:!1})},oldSavedCreationsCount:this.oldSavedCreationsCount,importBtnClickHandler:this.importCreationsAndSettingsIntoApp.bind(this),dontAskBtnClickHandler:this.dontAskToImportAnymore.bind(this)}),(0,d.h)(R.OnboardingModal,{show:this.state.isOnboardModalOpen,closeHandler:function(){return e.setState({isOnboardModalOpen:!1})}}),(0,d.h)(z.default,{into:"body"},(0,d.h)("div",{class:"modal-overlay",onClick:this.modalOverlayClickHandler.bind(this)})),ee,te)},t}(d.Component);t.default=oe},y5h4:function(e,t){"use strict";t.__esModule=!0;var o=t.HtmlModes={HTML:"html",MARKDOWN:"markdown",JADE:"jade"},n=t.CssModes={CSS:"css",SCSS:"scss",SASS:"sass",LESS:"less",STYLUS:"stylus",ACSS:"acss"},s=t.JsModes={JS:"js",ES6:"es6",COFFEESCRIPT:"coffee",TS:"typescript"},a=t.modes={};a[o.HTML]={label:"HTML",cmMode:"htmlmixed",codepenVal:"none"},a[o.MARKDOWN]={label:"Markdown",cmMode:"markdown",codepenVal:"markdown"},a[o.JADE]={label:"Pug",cmMode:"pug",codepenVal:"pug"},a[s.JS]={label:"JS",cmMode:"javascript",codepenVal:"none"},a[s.COFFEESCRIPT]={label:"CoffeeScript",cmMode:"coffeescript",codepenVal:"coffeescript"},a[s.ES6]={label:"ES6 (Babel)",cmMode:"jsx",codepenVal:"babel"},a[s.TS]={label:"TypeScript",cmPath:"jsx",cmMode:"text/typescript-jsx",codepenVal:"typescript"},a[n.CSS]={label:"CSS",cmPath:"css",cmMode:"css",codepenVal:"none"},a[n.SCSS]={label:"SCSS",cmPath:"css",cmMode:"text/x-scss",codepenVal:"scss"},a[n.SASS]={label:"SASS",cmMode:"sass",codepenVal:"sass"},a[n.LESS]={label:"LESS",cmPath:"css",cmMode:"text/x-less",codepenVal:"less"},a[n.STYLUS]={label:"Stylus",cmMode:"stylus",codepenVal:"stylus"},a[n.ACSS]={label:"Atomic CSS",cmPath:"css",cmMode:"css",codepenVal:"notsupported",cmDisable:!0,hasSettings:!0}}},["pwNi"]);
\ No newline at end of file
diff --git a/app/service-worker.js b/app/service-worker.js
index d533a69..02d7fb5 100644
--- a/app/service-worker.js
+++ b/app/service-worker.js
@@ -37,7 +37,7 @@
/* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */
'use strict';
-var precacheConfig = [["FiraCode.ttf","fa1f8c8961adca519738d9518139579c"],["FixedSys.ttf","43cc87e8f9adba81b9d63b6e2d15db57"],["Inconsolata.ttf","b0639eb725c0df94f68b779889679457"],["Monoid.ttf","9b27db986ad2a74c522e9d3b6f7e2a63"],["detached-window.js","f05b0a0f2a8cc967028fb4f95f4a9614"],["icon-128.png","cf558ed413851d046b9dcc84c1d57543"],["icon-48.png","ca68956f464ed4fd2e09c66d5edaed5f"],["icons/icon-128x128.png","bfdc132184384bf5bf6cf34835cbce20"],["icons/icon-144x144.png","252be3837441f79208237747f9174af2"],["icons/icon-152x152.png","d1767dc31f2185979739273633468373"],["icons/icon-192x192.png","e6150ca4a84d684e02ee60cc2708131f"],["icons/icon-384x384.png","056a746d18fa943ea1a773325559d671"],["icons/icon-512x512.png","13e470b61e539649e0567687c597c792"],["icons/icon-72x72.png","f336e8ae87d17759eb3235a9186e6e7b"],["icons/icon-96x96.png","259cc1f173cf5e8bdbff4b84e1193b89"],["index.html","e358200100ad389b1407f3e31e662127"],["lib/codemirror/mode/coffeescript/coffeescript.js","dea87b9f4c669789c4760605d947f1a9"],["lib/codemirror/mode/css/css.js","6c9ca32a78c120340e588ed3df734138"],["lib/codemirror/mode/css/gss.html","9afa6e2f3a7daa6127a3f26e2e68005c"],["lib/codemirror/mode/css/gss_test.js","e40c6fd9abdc6edc2b29e521bda726e1"],["lib/codemirror/mode/css/less.html","a35ff50857d48bb2f4df8ac737f35d64"],["lib/codemirror/mode/css/scss.html","8c96251f27727a9b23b45c41511e23a0"],["lib/codemirror/mode/haml/haml.js","9abc1679e0f54dcdd62d2326ed6133f5"],["lib/codemirror/mode/htmlembedded/htmlembedded.js","67f745ab3879bf7bc3029ac75ea3e181"],["lib/codemirror/mode/htmlmixed/htmlmixed.js","2d6915b576f267e93f0e1cf72f31af37"],["lib/codemirror/mode/javascript/javascript.js","3b2f1591e3175a24846cb182943f2a40"],["lib/codemirror/mode/javascript/json-ld.html","a2a5069194b78b6b5523cace263cab06"],["lib/codemirror/mode/javascript/typescript.html","76c2ffb883a133aa0fc5cc75ec0c56f5"],["lib/codemirror/mode/jsx/jsx.js","7bee6944931c2cc6ccd99b50fca637db"],["lib/codemirror/mode/markdown/markdown.js","30dd4984e2e929429d70cf5174b35c5d"],["lib/codemirror/mode/meta.js","6e456ea5fd8920c85d5281bd1efecb4c"],["lib/codemirror/mode/pug/pug.js","e988fd72c82f3b11836f6a06f7452436"],["lib/codemirror/mode/sass/sass.js","bd31ac70e9a457abc2789c2b83a21984"],["lib/codemirror/mode/stylus/stylus.js","81e2d281ecbb1dcf5c86857097ae60a7"],["lib/codemirror/mode/xml/xml.js","80f64aaafa6af7844d14f32f3219bb26"],["lib/codemirror/theme/3024-day.css","73c8f41583b4b71dbe1e5eac5c96f1a9"],["lib/codemirror/theme/3024-night.css","745180be9a932f24c6c0dd4ebdf5a0ed"],["lib/codemirror/theme/abcdef.css","8004cb71fd65e58bdfa64fdd55241315"],["lib/codemirror/theme/ambiance-mobile.css","256f2dd130b80c6afaa40fddf700d12a"],["lib/codemirror/theme/ambiance.css","6a200e1f3976929816cf3ac4675c810a"],["lib/codemirror/theme/base16-dark.css","84b6347918411d58d7f9b65a7ee87f65"],["lib/codemirror/theme/base16-light.css","037c7f3d16fe6d5ae2baa532e334172b"],["lib/codemirror/theme/base2tone-meadow-dark.css","f9dd12e2e51fc1575c57f3e5edc2232f"],["lib/codemirror/theme/bespin.css","cc414e4ec18bc89b3c79935b0e27fc20"],["lib/codemirror/theme/blackboard.css","cf9366960ff65c8101793bc64fe13e88"],["lib/codemirror/theme/cobalt.css","3488b576456693fd7ced2da0e10c8a16"],["lib/codemirror/theme/colorforth.css","b2ee8d2296277fc2811a7473ee4e9977"],["lib/codemirror/theme/dracula.css","e514d652ae86bfeaed34237b7d3afe44"],["lib/codemirror/theme/duotone-dark.css","02ec891b23125aaf625d978a39fd24ca"],["lib/codemirror/theme/duotone-light.css","608d11459665117d708651ce7f803fde"],["lib/codemirror/theme/eclipse.css","194369eec66630cfaf662ce5f0a193be"],["lib/codemirror/theme/elegant.css","0a4227e805a9d5f73a55dd248c1b052d"],["lib/codemirror/theme/erlang-dark.css","b5543f5273c968449760ab0d6a2af6dc"],["lib/codemirror/theme/hopscotch.css","b924ed31af30b1c68e5a01fc3c9b0553"],["lib/codemirror/theme/icecoder.css","576d776abdf7e28ea9f84e2eb161a20d"],["lib/codemirror/theme/isotope.css","7bb44bff5190c427de5ae750d6369633"],["lib/codemirror/theme/lesser-dark.css","da2c896bff035cec86fa98b6dc13f7cc"],["lib/codemirror/theme/liquibyte.css","9f37e7a4f3c02bec9bb735b78ed082d6"],["lib/codemirror/theme/material.css","11e812a3688805b5c187a6e6852bafe1"],["lib/codemirror/theme/mbo.css","55ff4bdd8a92c3dcbfd5421c532b3059"],["lib/codemirror/theme/mdn-like.css","79f8dabc5593d01d27bc824b801f9f05"],["lib/codemirror/theme/midnight.css","950e76dca6461ee1a2eac39f2d886613"],["lib/codemirror/theme/monokai.css","31c75ebee6311d49c046ffbbb91028f4"],["lib/codemirror/theme/neat.css","6b19894b9787c6791c250a95d0d4f8d6"],["lib/codemirror/theme/neo.css","2886072b53043c167e6f8765606c705c"],["lib/codemirror/theme/night.css","fe3ce7650a77e7e3887816dd7b6d880d"],["lib/codemirror/theme/panda-syntax.css","acbf94261e43c1f29c2252eb445de032"],["lib/codemirror/theme/paraiso-dark.css","3c24cee0dfac767713840b24e8359c99"],["lib/codemirror/theme/paraiso-light.css","e245bbfd22b4f61efe526ff13903f19e"],["lib/codemirror/theme/pastel-on-dark.css","48aae1a42733db57bd0a260ce0d83975"],["lib/codemirror/theme/railscasts.css","a5e7682d89da46244e5464d9572e24d8"],["lib/codemirror/theme/rubyblue.css","52bb601017a90bca522d66f6e82e73aa"],["lib/codemirror/theme/seti.css","f71668880eb1625f420ceaad670436f0"],["lib/codemirror/theme/solarized dark.css","4d05a166d713bb1ac24833061c1522d7"],["lib/codemirror/theme/solarized light.css","4d05a166d713bb1ac24833061c1522d7"],["lib/codemirror/theme/the-matrix.css","33c49ceeedafd0a08e712e465e3ad3ce"],["lib/codemirror/theme/tomorrow-night-bright.css","777d36e1c5bbfeb3bf2ca8dd607eee93"],["lib/codemirror/theme/tomorrow-night-eighties.css","5ceb5531fbe074d5190b55e8c725051e"],["lib/codemirror/theme/ttcn.css","d2cb74dfae563a10e9c286357429ea8b"],["lib/codemirror/theme/twilight.css","684040adf66ef89355cb7ebc6b54b00b"],["lib/codemirror/theme/vibrant-ink.css","f10004836fb29cc9a08c987d3e18938a"],["lib/codemirror/theme/xq-dark.css","60f162f0c4240e7352364d436b5598fa"],["lib/codemirror/theme/xq-light.css","447e80da7fe8c5c2bcf39127200cead2"],["lib/codemirror/theme/yeti.css","623dc805bc84dd6d25deef376593354e"],["lib/codemirror/theme/zenburn.css","94ad50bf3d048ed92cc513cd901dc685"],["lib/screenlog.js","974cb1ec0473b11ae4834028c1820816"],["lib/transpilers/atomizer.browser.js","c2925b84a627b017797664530f284618"],["lib/transpilers/babel-polyfill.min.js","6fef55c62df380d41c8f42f8b0c1f4da"],["lib/transpilers/babel.min.js","77a1a84bbc2661db874c738f9b3ba375"],["lib/transpilers/coffee-script.js","df68698ca5d438d7fb70c3c259155a37"],["lib/transpilers/jade.js","529e365c68f8d5efc4cea18be310bd76"],["lib/transpilers/less.min.js","6fd457ee80aaf9aa8758fe8a2345c970"],["lib/transpilers/marked.js","93163e72d380637970dc957c6cf75a77"],["lib/transpilers/sass.js","1263518af3f8b2090c9b08d195bd20d9"],["lib/transpilers/sass.worker.js","0d6c944b36008580fbedc09642f7f656"],["lib/transpilers/stylus.min.js","58f6030903ab52f596fb407dcd3df34f"],["lib/transpilers/typescript.js","cc0882a3185037052e21fa06a38ef077"],["partials/ask-to-import-modal.html","4c41c4fe11e4812ba6258d8e04d27d40"],["partials/changelog.html","d07acae211850ce1db53678b6258f9e5"],["partials/help-modal.html","c43bfe929337f371221503e83c62bdb8"],["partials/keyboard-shortcuts.html","d7c4124380a4eeb18968d55276d19591"],["partials/login-modal.html","7bb43bece90a93308919fb00162ee669"],["partials/onboard-modal.html","e9597ff891a70080a418e98abf198a5d"],["partials/pledge-modal.html","13f16984222c6447fb830250a818b763"],["patreon.png","8b4321f782e84764e556af3dee32a131"],["preview.html","ad041893596a3a2045aeab80feb24532"],["script.js","4f7f8e540e59ef48cda0e2408f359085"],["style.css","523ca7da3c7fbdbda99fd00af073653c"],["vendor.css","6ed94306315b8aaf789c53091c23bb4b"],["vendor.js","c1ad8d50ffcd47e8044d7a720c98a300"]];
+var precacheConfig = [["FiraCode.ttf","fa1f8c8961adca519738d9518139579c"],["FixedSys.ttf","43cc87e8f9adba81b9d63b6e2d15db57"],["Inconsolata.ttf","b0639eb725c0df94f68b779889679457"],["Monoid.ttf","9b27db986ad2a74c522e9d3b6f7e2a63"],["detached-window.js","f05b0a0f2a8cc967028fb4f95f4a9614"],["icon-128.png","cf558ed413851d046b9dcc84c1d57543"],["icon-48.png","ca68956f464ed4fd2e09c66d5edaed5f"],["icons/icon-128x128.png","bfdc132184384bf5bf6cf34835cbce20"],["icons/icon-144x144.png","252be3837441f79208237747f9174af2"],["icons/icon-152x152.png","d1767dc31f2185979739273633468373"],["icons/icon-192x192.png","e6150ca4a84d684e02ee60cc2708131f"],["icons/icon-384x384.png","056a746d18fa943ea1a773325559d671"],["icons/icon-512x512.png","13e470b61e539649e0567687c597c792"],["icons/icon-72x72.png","f336e8ae87d17759eb3235a9186e6e7b"],["icons/icon-96x96.png","259cc1f173cf5e8bdbff4b84e1193b89"],["index.html","e358200100ad389b1407f3e31e662127"],["lib/codemirror/mode/coffeescript/coffeescript.js","dea87b9f4c669789c4760605d947f1a9"],["lib/codemirror/mode/css/css.js","6c9ca32a78c120340e588ed3df734138"],["lib/codemirror/mode/css/gss.html","9afa6e2f3a7daa6127a3f26e2e68005c"],["lib/codemirror/mode/css/gss_test.js","e40c6fd9abdc6edc2b29e521bda726e1"],["lib/codemirror/mode/css/less.html","a35ff50857d48bb2f4df8ac737f35d64"],["lib/codemirror/mode/css/scss.html","8c96251f27727a9b23b45c41511e23a0"],["lib/codemirror/mode/haml/haml.js","9abc1679e0f54dcdd62d2326ed6133f5"],["lib/codemirror/mode/htmlembedded/htmlembedded.js","67f745ab3879bf7bc3029ac75ea3e181"],["lib/codemirror/mode/htmlmixed/htmlmixed.js","2d6915b576f267e93f0e1cf72f31af37"],["lib/codemirror/mode/javascript/javascript.js","3b2f1591e3175a24846cb182943f2a40"],["lib/codemirror/mode/javascript/json-ld.html","a2a5069194b78b6b5523cace263cab06"],["lib/codemirror/mode/javascript/typescript.html","76c2ffb883a133aa0fc5cc75ec0c56f5"],["lib/codemirror/mode/jsx/jsx.js","7bee6944931c2cc6ccd99b50fca637db"],["lib/codemirror/mode/markdown/markdown.js","30dd4984e2e929429d70cf5174b35c5d"],["lib/codemirror/mode/meta.js","6e456ea5fd8920c85d5281bd1efecb4c"],["lib/codemirror/mode/pug/pug.js","e988fd72c82f3b11836f6a06f7452436"],["lib/codemirror/mode/sass/sass.js","bd31ac70e9a457abc2789c2b83a21984"],["lib/codemirror/mode/stylus/stylus.js","81e2d281ecbb1dcf5c86857097ae60a7"],["lib/codemirror/mode/xml/xml.js","80f64aaafa6af7844d14f32f3219bb26"],["lib/codemirror/theme/3024-day.css","73c8f41583b4b71dbe1e5eac5c96f1a9"],["lib/codemirror/theme/3024-night.css","745180be9a932f24c6c0dd4ebdf5a0ed"],["lib/codemirror/theme/abcdef.css","8004cb71fd65e58bdfa64fdd55241315"],["lib/codemirror/theme/ambiance-mobile.css","256f2dd130b80c6afaa40fddf700d12a"],["lib/codemirror/theme/ambiance.css","6a200e1f3976929816cf3ac4675c810a"],["lib/codemirror/theme/base16-dark.css","84b6347918411d58d7f9b65a7ee87f65"],["lib/codemirror/theme/base16-light.css","037c7f3d16fe6d5ae2baa532e334172b"],["lib/codemirror/theme/base2tone-meadow-dark.css","f9dd12e2e51fc1575c57f3e5edc2232f"],["lib/codemirror/theme/bespin.css","cc414e4ec18bc89b3c79935b0e27fc20"],["lib/codemirror/theme/blackboard.css","cf9366960ff65c8101793bc64fe13e88"],["lib/codemirror/theme/cobalt.css","3488b576456693fd7ced2da0e10c8a16"],["lib/codemirror/theme/colorforth.css","b2ee8d2296277fc2811a7473ee4e9977"],["lib/codemirror/theme/dracula.css","e514d652ae86bfeaed34237b7d3afe44"],["lib/codemirror/theme/duotone-dark.css","02ec891b23125aaf625d978a39fd24ca"],["lib/codemirror/theme/duotone-light.css","608d11459665117d708651ce7f803fde"],["lib/codemirror/theme/eclipse.css","194369eec66630cfaf662ce5f0a193be"],["lib/codemirror/theme/elegant.css","0a4227e805a9d5f73a55dd248c1b052d"],["lib/codemirror/theme/erlang-dark.css","b5543f5273c968449760ab0d6a2af6dc"],["lib/codemirror/theme/hopscotch.css","b924ed31af30b1c68e5a01fc3c9b0553"],["lib/codemirror/theme/icecoder.css","576d776abdf7e28ea9f84e2eb161a20d"],["lib/codemirror/theme/isotope.css","7bb44bff5190c427de5ae750d6369633"],["lib/codemirror/theme/lesser-dark.css","da2c896bff035cec86fa98b6dc13f7cc"],["lib/codemirror/theme/liquibyte.css","9f37e7a4f3c02bec9bb735b78ed082d6"],["lib/codemirror/theme/material.css","11e812a3688805b5c187a6e6852bafe1"],["lib/codemirror/theme/mbo.css","55ff4bdd8a92c3dcbfd5421c532b3059"],["lib/codemirror/theme/mdn-like.css","79f8dabc5593d01d27bc824b801f9f05"],["lib/codemirror/theme/midnight.css","950e76dca6461ee1a2eac39f2d886613"],["lib/codemirror/theme/monokai.css","31c75ebee6311d49c046ffbbb91028f4"],["lib/codemirror/theme/neat.css","6b19894b9787c6791c250a95d0d4f8d6"],["lib/codemirror/theme/neo.css","2886072b53043c167e6f8765606c705c"],["lib/codemirror/theme/night.css","fe3ce7650a77e7e3887816dd7b6d880d"],["lib/codemirror/theme/panda-syntax.css","acbf94261e43c1f29c2252eb445de032"],["lib/codemirror/theme/paraiso-dark.css","3c24cee0dfac767713840b24e8359c99"],["lib/codemirror/theme/paraiso-light.css","e245bbfd22b4f61efe526ff13903f19e"],["lib/codemirror/theme/pastel-on-dark.css","48aae1a42733db57bd0a260ce0d83975"],["lib/codemirror/theme/railscasts.css","a5e7682d89da46244e5464d9572e24d8"],["lib/codemirror/theme/rubyblue.css","52bb601017a90bca522d66f6e82e73aa"],["lib/codemirror/theme/seti.css","f71668880eb1625f420ceaad670436f0"],["lib/codemirror/theme/solarized dark.css","4d05a166d713bb1ac24833061c1522d7"],["lib/codemirror/theme/solarized light.css","4d05a166d713bb1ac24833061c1522d7"],["lib/codemirror/theme/the-matrix.css","33c49ceeedafd0a08e712e465e3ad3ce"],["lib/codemirror/theme/tomorrow-night-bright.css","777d36e1c5bbfeb3bf2ca8dd607eee93"],["lib/codemirror/theme/tomorrow-night-eighties.css","5ceb5531fbe074d5190b55e8c725051e"],["lib/codemirror/theme/ttcn.css","d2cb74dfae563a10e9c286357429ea8b"],["lib/codemirror/theme/twilight.css","684040adf66ef89355cb7ebc6b54b00b"],["lib/codemirror/theme/vibrant-ink.css","f10004836fb29cc9a08c987d3e18938a"],["lib/codemirror/theme/xq-dark.css","60f162f0c4240e7352364d436b5598fa"],["lib/codemirror/theme/xq-light.css","447e80da7fe8c5c2bcf39127200cead2"],["lib/codemirror/theme/yeti.css","623dc805bc84dd6d25deef376593354e"],["lib/codemirror/theme/zenburn.css","94ad50bf3d048ed92cc513cd901dc685"],["lib/screenlog.js","974cb1ec0473b11ae4834028c1820816"],["lib/transpilers/atomizer.browser.js","c2925b84a627b017797664530f284618"],["lib/transpilers/babel-polyfill.min.js","6fef55c62df380d41c8f42f8b0c1f4da"],["lib/transpilers/babel.min.js","77a1a84bbc2661db874c738f9b3ba375"],["lib/transpilers/coffee-script.js","df68698ca5d438d7fb70c3c259155a37"],["lib/transpilers/jade.js","529e365c68f8d5efc4cea18be310bd76"],["lib/transpilers/less.min.js","6fd457ee80aaf9aa8758fe8a2345c970"],["lib/transpilers/marked.js","93163e72d380637970dc957c6cf75a77"],["lib/transpilers/sass.js","1263518af3f8b2090c9b08d195bd20d9"],["lib/transpilers/sass.worker.js","0d6c944b36008580fbedc09642f7f656"],["lib/transpilers/stylus.min.js","58f6030903ab52f596fb407dcd3df34f"],["lib/transpilers/typescript.js","cc0882a3185037052e21fa06a38ef077"],["partials/ask-to-import-modal.html","4c41c4fe11e4812ba6258d8e04d27d40"],["partials/changelog.html","d07acae211850ce1db53678b6258f9e5"],["partials/help-modal.html","c43bfe929337f371221503e83c62bdb8"],["partials/keyboard-shortcuts.html","d7c4124380a4eeb18968d55276d19591"],["partials/login-modal.html","7bb43bece90a93308919fb00162ee669"],["partials/onboard-modal.html","e9597ff891a70080a418e98abf198a5d"],["partials/pledge-modal.html","13f16984222c6447fb830250a818b763"],["patreon.png","8b4321f782e84764e556af3dee32a131"],["preview.html","ad041893596a3a2045aeab80feb24532"],["script.js","f970e9115e0807e5c6fcb9b636404264"],["style.css","42be400f864f620da89f91a0cb15faaa"],["vendor.css","6ed94306315b8aaf789c53091c23bb4b"],["vendor.js","c28e9cbdd6d92b9a8653faea362b5bf4"]];
var cacheName = 'sw-precache-v3--' + (self.registration ? self.registration.scope : '');
diff --git a/app/style.css b/app/style.css
index 5495b26..8676755 100644
--- a/app/style.css
+++ b/app/style.css
@@ -1 +1 @@
-:root{--color-bg:#252637;--color-sidebar:#3a2b63;--code-font-size:16px;--color-button:#0074d9}body{margin:0;padding:0;background:rgba(0,0,0,.5);background:var(--color-bg);color:rgba(255,255,255,.9);min-height:100vh;font-size:87.5%;position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif,'Segoe UI Emoji','Segoe UI Symbol'}h1{margin-top:0}a{text-decoration:none;color:#d61237;cursor:pointer}p{line-height:1.65}.hide{display:none!important}.flex{display:flex}.flex-grow{flex-grow:1}.flex-v-center{align-items:center}.flex-h-center{justify-content:center}.flex-h-end{justify-content:flex-end}.fr{float:right}.relative{position:relative}.tac{text-align:center}.tar{text-align:right}.va-m{vertical-align:middle}.full-width{width:100%}.opacity--30{opacity:.3}.opacity--70{opacity:.7}.pointer-none{pointer-events:none}.ml-1{margin-left:1rem}.ml-2{margin-left:2rem}.mb-1{margin-bottom:1rem}.mb-2{margin-bottom:2rem}.mt-1{margin-top:1rem}.mt-2{margin-top:2rem}.mb-0{margin-bottom:0}.mt-0{margin-top:0}@media screen and (max-width:600px){.block--mobile{display:block}.ml-0--mobile{margin-left:0}.hide-on-mobile{display:none!important}}@media screen and (min-width:601px){.show-on-mobile{display:none}.flex--desk{display:flex}}hr{background:0;border:0;border-bottom:1px solid #dedede}label{cursor:pointer}[class*=hint--]:after{text-transform:none;font-weight:400;letter-spacing:.5px;font-size:14px}.line{display:block;margin-bottom:1em}.caret{display:inline-block;width:0;height:0;border:6px solid transparent;border-top-color:currentColor;position:relative;top:5px;margin-left:8px}a>svg{fill:rgba(255,255,255,.2)}input[type=number],input[type=text],select,textarea{padding:3px 5px;font-size:inherit}.hidden-select{opacity:0;position:absolute;left:0;right:0;top:0;bottom:0}.btn{display:inline-block;color:var(--color-button);font-size:inherit;border:3px solid var(--color-button);border-radius:5px;padding:9px 15px;cursor:pointer;letter-spacing:.2px;line-height:1;white-space:nowrap;transition:box-shadow .2s ease}.btn--primary{background:var(--color-button) linear-gradient(180deg,rgba(0,0,0,.5) 0,transparent);color:#fff}.btn--big{padding:15px 30px;border-radius:3px}.btn-icon{display:inline-flex;align-items:center}.btn:hover{text-decoration:none;box-shadow:0 5px 5px 0 rgba(0,0,0,.25)}.btn:focus{outline-width:4px;outline-color:#b76b29;outline-style:solid;outline-offset:1px}.btn-icon>svg{width:20px;height:20px;fill:currentColor;vertical-align:middle;margin-right:8px}.btn--big>svg{width:25px;height:25px;margin-right:12px}.btn-loader{display:none}.is-loading>svg{display:none}.is-loading .btn-loader{display:block}.star:after{content:'★';color:currentColor}.show-when-selected{display:none}.selected .show-when-selected{display:inline-block}.main-container{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;transition:.1s ease .2s;will-change:filter}body:not(.light-version).overlay-visible .main-container{transition-duration:.5s;transition-delay:.4s;filter:blur(3px)}.content-wrap{height:1px;max-height:calc(100% - 70px)}.code-side,.demo-side{flex-basis:inherit;position:relative;width:50%}.layout-3 .content-wrap{flex-direction:row-reverse}.code-side{display:flex;flex-direction:column}.layout-2 .content-wrap{flex-direction:column}.layout-2 .code-side{flex-direction:row;width:auto}.layout-2 .demo-side{width:auto}.layout-5 .code-side{flex-direction:row;width:auto}.layout-5 .code-wrap{height:auto}.layout-4 .code-side{display:none}.layout-4 .code-side+.gutter{display:none}.layout-4 .demo-side{width:100%!important}.is-detached-mode .demo-side{display:none}.is-detached-mode .code-side{width:100%!important}.is-detached-mode.layout-2 .code-side{height:auto!important}.code-wrap{display:flex;flex-direction:column;flex-basis:inherit;height:33%;overflow:hidden;position:relative;background:var(--color-bg);transition:height .3s ease,width .3s ease;will-change:height}.layout-2 .code-wrap.is-minimized,.layout-5 .code-wrap.is-minimized{flex-direction:row}.is-dragging .code-wrap{transition:none}.layout-2 .code-wrap{height:auto;width:33%}.code-wrap__header{display:flex;flex-shrink:0;justify-content:space-between;align-items:center;padding:5px 10px;background:rgba(0,0,0,.2);color:#888;border-bottom:1px solid rgba(0,0,0,.3);font-weight:700;user-select:none}.code-wrap__header-label{display:inline-block;font-size:1.1em}.layout-2 .code-side .is-minimized .code-wrap__header,.layout-5 .code-side .is-minimized .code-wrap__header{writing-mode:vertical-lr;padding:10px 5px}.code-wrap__header .caret{transition:.2s ease}.is-minimized .code-wrap__header .caret{opacity:0}.code-wrap__header-btn{display:inline-block;vertical-align:top;margin-left:8px}.code-wrap__header-btn,.code-wrap__header-btn>svg{width:18px;height:18px}.code-wrap__header-right-options{position:relative;z-index:1}.code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}.is-maximized .code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}@keyframes pop-in{from{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.CodeMirror{width:100%;height:calc(100% - 25px);font-size:var(--code-font-size)}.layout-2 .is-minimized .Codemirror,.layout-5 .is-minimized .Codemirror{height:calc(100%)}.CodeMirror pre{font-variant-ligatures:contextual}.cm-s-monokai .CodeMirror-linenumber{color:rgba(255,255,255,.2)}.cm-s-monokai .CodeMirror-gutters,.cm-s-monokai.CodeMirror{background:var(--color-bg)}.cm-s-monokai .CodeMirror-guttermarker-subtle{opacity:.4}.cm-s-monokai .CodeMirror-activeline-background,.cm-s-monokai .CodeMirror-activeline-gutter{background:rgba(0,0,0,.1)!important}.CodeMirror-hints{font-size:var(--code-font-size);border:0;background:#1e1e2c}.CodeMirror-hint{color:#bbb;padding:2px 4px}li.CodeMirror-hint-active{background:#5b429d}#demo-frame{border:0;width:100%;height:calc(100% - 29px);position:absolute;z-index:1;background:#fff}body>#demo-frame{height:100%}.footer,.main-header{padding:5px 10px;background-color:#12131b;color:rgba(255,255,255,.45);border-top:1px solid rgba(255,255,255,.14)}.footer{z-index:6}.main-header{display:flex;flex-wrap:nowrap;border:0;border-bottom:1px solid rgba(255,255,255,.14)}.main-header__btn-wrap>a{font-size:.8em;font-weight:700;line-height:20px;height:20px;letter-spacing:.6px;white-space:nowrap;color:#9297b3;border-radius:3px;margin-left:10px;padding:0 8px;border:1px solid rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.5) 0,rgba(255,255,255,.1) 100%);box-shadow:0 -1px 0 0 rgba(255,255,255,.15);text-transform:uppercase}.main-header__btn-wrap>a>svg{fill:#9297b3;margin-right:4px}.main-header__btn-wrap>a.is-marked>svg{fill:#dc143c}.main-header__btn-wrap>a:hover{border-color:rgba(146,151,179,.5)}.main-header__btn-wrap>a.is-loading{pointer-events:none;opacity:.4}.main-header__avatar-img,.profile-modal__avatar-img{border-radius:50%}.logo{display:inline-block;height:25px;width:48px;margin-right:5px;background:url(icon-48.png) 0 -12px;background-repeat:no-repeat;vertical-align:middle;-webkit-filter:grayscale(.9);filter:grayscale(.9);transition:.4s ease;opacity:.3;will-change:opacity,filter}.footer:hover .logo{-webkit-filter:grayscale(0);filter:grayscale(0);opacity:1}.footer__right{font-size:0;line-height:0}.footer__separator{display:inline-block;height:24px;margin:0 10px 0 20px;border-left:1px solid rgba(255,255,255,.2)}.mode-btn{margin-left:10px;display:inline-block}.footer__link:first-of-type{margin-left:5px}.footer__link{display:inline-block;margin-right:5px;position:relative;top:2px}.footer a>svg{transition:.3s ease;fill:rgba(255,255,255,.2)}.footer a:hover svg{fill:rgba(255,255,255,.45)}.mode-btn svg{width:24px;height:24px}.mode-btn.selected svg{fill:rgba(255,255,255,.45)}.gutter{background:rgba(255,255,255,.05);flex-shrink:0}.gutter-horizontal{cursor:ew-resize}.gutter-vertical{cursor:ns-resize}.item-title-input{background:0 0;border:0;color:rgba(255,255,255,.6);flex:1}.search-input{background:rgba(255,255,255,.1);padding:10px 20px;border:0;width:100%;font-size:16px;color:#fff;border-radius:4px}.modal{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow-y:auto;align-items:center;display:flex;align-items:baseline;justify-content:center;z-index:2000;visibility:hidden;will-change:transform}@keyframes anim-modal-overlay{to{opacity:1;transform:translateY(0) scale(1)}}.modal__close-btn{position:absolute;right:10px;top:10px;text-transform:uppercase;font-weight:700;opacity:.8;transition:.25s ease}.modal__close-btn>svg{fill:#000;width:30px;height:30px}.modal__close-btn:hover{opacity:.7}.modal__content{background:#fdfdfd;color:#444;position:relative;border-radius:8px;opacity:0;padding:3em;font-size:1.1em;line-height:1.4;max-width:85vw;margin:2rem auto;box-sizing:border-box;overflow-y:auto;pointer-events:auto;transform:translateY(50px) scale(.95);animation:anim-modal .3s ease forwards;animation-delay:150ms}@keyframes anim-modal{to{opacity:1;transform:translateY(0) scale(1)}}@media screen and (max-width:900px){.modal__content{max-width:95vw}}.is-modal-visible{visibility:visible}.modal-overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:5;opacity:0;will-change:opacity;background:rgba(0,0,0,.6);transition:opacity .3s}.ask-to-import-modal .modal__content,.pledge-modal .modal__content{max-width:800px}.login-modal .modal__content{overflow-y:initial}.saved-items-pane{position:fixed;right:0;top:0;bottom:0;width:450px;padding:20px 30px;z-index:6;background-color:var(--color-sidebar);transition:.3s cubic-bezier(1,.13,.21,.87);transition-property:transform;will-change:transform;transform:translateX(100%)}.saved-items-pane.is-open{transition-duration:.4s;transform:translateX(0)}.is-modal-visible~.modal-overlay,.overlay-visible .modal-overlay,.saved-items-pane.is-open~.modal-overlay{opacity:1;visibility:visible}.saved-items-pane__close-btn{position:absolute;left:-18px;top:24px;opacity:0;visibility:hidden;border-radius:50%;padding:10px 14px;background:#dc143c;color:#fff;border:0;transform:scale(0);will-change:transform,opacity;transition:.3s ease;transition-delay:0}.saved-items-pane.is-open .saved-items-pane__close-btn{opacity:1;transition-delay:.4s;transform:scale(1);visibility:visible}.saved-item-tile{padding:20px;background-color:rgba(255,255,255,.06);position:relative;margin:20px 0;display:block;border-radius:4px;cursor:pointer;opacity:0;transform:translateX(50px);will-change:opacity,transform;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);animation:slide-left .35s ease forwards}.saved-item-tile:nth-child(1){animation-delay:.2s}.saved-item-tile:nth-child(2){animation-delay:.25s}.saved-item-tile:nth-child(3){animation-delay:.3s}.saved-item-tile:nth-child(4){animation-delay:.35s}.saved-item-tile:nth-child(5){animation-delay:.4s}.saved-item-tile:nth-child(6){animation-delay:.45s}.saved-item-tile:nth-child(7){animation-delay:.5s}.saved-item-tile:nth-child(8){animation-delay:.55s}.saved-item-tile:nth-child(9){animation-delay:.6s}.saved-item-tile:nth-child(10){animation-delay:.65s}.saved-item-tile:nth-child(11){animation-delay:.7s}.saved-item-tile:nth-child(12){animation-delay:.75s}.saved-item-tile:nth-child(n+12){animation-delay:.8s}@keyframes slide-left{from{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}.saved-item-tile.selected,.saved-item-tile:hover{background:rgba(255,255,255,.1)}.saved-item-tile__btns{position:absolute;top:6px;z-index:1;right:8px;opacity:0;pointer-events:none;transition:.25s ease}.saved-item-tile.selected .saved-item-tile__btns,.saved-item-tile:hover .saved-item-tile__btns{opacity:1;pointer-events:auto}.saved-item-tile__btn{padding:7px 10px;color:rgba(255,255,255,.3);border-radius:20px;margin-left:2px;background:rgba(255,255,255,.05);text-transform:uppercase}.saved-item-tile__btn:hover{background:rgba(255,255,255,.8);color:#555}.saved-item-tile__title{pointer-events:none;font-size:1.4em;margin:0 0 1em 0;opacity:.8}.saved-item-tile__meta{pointer-events:none;opacity:.3}.saved-items-pane__container{overflow-y:scroll;max-height:calc(100vh - 90px)}.notifications-btn{position:relative}@keyframes shake{2%,22%{transform:translate3d(-1px,0,0)}20%,5%{transform:translate3d(2px,0,0)}12%,17%,7%{transform:translate3d(-4px,0,0)}10%,15%{transform:translate3d(4px,0,0)}}.notifications-btn.has-new{animation:shake 7s linear infinite;transform-origin:50% 10px}.notifications-btn__dot{position:absolute;right:1;top:-2px;background:#31fe45;border-radius:50%;width:12px;height:12px;display:none}.has-new .notifications-btn__dot{display:block}.notification{border:1px solid #f1f1f1;border-radius:5px;padding:20px;background:#f8f6f9;position:relative}.notification:not(:last-child){margin-bottom:10px}.notification li:not(:last-child){margin-bottom:10px}.notification__version{background:#ff8c00;color:#fff;padding:3px;border-radius:5px;position:absolute;top:2px;left:2px}.loader,.loader:after{border-radius:50%;width:3em;height:3em}.loader{font-size:5px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(118,57,229,.2);border-right:1.1em solid rgba(118,57,229,.2);border-bottom:1.1em solid rgba(118,57,229,.2);border-left:1.1em solid #7639e5;transform:translateZ(0);animation:load8 1.1s infinite linear}@keyframes load8{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.btn-group{position:relative;cursor:pointer}.dropdown__menu{position:absolute;top:100%;left:0;padding:0;margin:0;min-width:200px;display:block;font-size:.88rem;list-style:none;border-radius:4px;overflow:hidden;opacity:0;visibility:hidden;transition:transform .25s ease;transform:translateY(10px);z-index:5;background:#fff}.dropdown__menu>li>a{display:block;padding:6px 15px;color:#333;cursor:pointer}.dropdown__menu>li.selected>a,.dropdown__menu>li>a:hover{background:var(--color-sidebar);color:#fff}.dropdown__menu>li:not(:last-child){border-bottom:1px solid rgba(0,0,0,.05)}.dropdown__menu.is-open,.open>.dropdown__menu{opacity:1;visibility:visible;transform:translateY(0)}.alerts-container{position:fixed;will-change:transform;left:50%;top:-5px;padding:10px;background:#fff;border:1px solid #eee;color:#333;box-shadow:0 3px 5px rgba(0,0,0,.2);font-size:1rem;border-radius:3px;z-index:6;transform:translateX(-50%) translateY(-100%);transition:.3s ease}.alerts-container.is-active{transform:translateX(-50%) translateY(0)}.error-gutter{width:8px}.gutter-error-marker{width:8px;height:20px;background:red;border-radius:0;position:relative;top:0;left:1px}.gutter-error-marker:after{content:attr(data-title);background:red;color:#fff;padding:4px;opacity:0;visibility:hidden;position:absolute;top:14px;left:0;width:300px;transform:translateX(-10px);will-change:transform;transition:.2s ease}.gutter-error-marker:hover:after{opacity:1;visibility:visible;transform:translateX(0)}.count-label{color:rgba(0,0,0,.8);background:rgba(255,255,255,.53);border-radius:5px;padding:1px 6px;font-weight:700}.onboard-step{background:#f7f2f1;border:1px solid #ecdede;margin:15px;padding:20px 30px;background-color:#fff;border-radius:10px;box-shadow:0 16px 22px rgba(0,0,0,.1);flex:1}.onboard-step__icon{fill:#fff2ed;stroke-width:.5px;stroke:#e79f80;width:80px;height:80px}.autocomplete-dropdown{border-top-left-radius:0;border-top-right-radius:0;right:0;max-height:200px;overflow-y:auto;border:1px solid rgba(0,0,0,.5);z-index:2001}.autocomplete__loader{position:absolute;right:3px;bottom:1px}@keyframes wobble{from{transform:none}15%{transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{transform:none}}.animated{animation-duration:1s;animation-fill-mode:both}.wobble{animation-name:wobble}.console{background:var(--color-bg);z-index:6;position:absolute;bottom:0;min-height:80px;height:35vh;left:0;right:0;display:flex;flex-direction:column;transform:translateY(0);transition:transform .4s cubic-bezier(.76,.01,.13,.9)}.console.is-minimized{transform:translateY(calc(100% - 29px))}.console .CodeMirror{height:calc(100% - 30px)}.console__log{flex:1}.console-exec-input{padding:5px;font-size:1.3em;flex:1;background:rgba(0,0,0,.3);color:#fff;border:0;outline:0}.console:not(.is-minimized) .code-wrap__header{cursor:ns-resize}.global-console-container{display:none;position:relative;height:35px}.is-detached-mode .console,.is-detached-mode .footer{z-index:4}.is-detached-mode .global-console-container{display:block}.kbd-shortcut__keys{background:rgba(0,0,0,.1);border-radius:3px;padding:3px 8px;margin-right:5px;display:inline-block;font-size:.9rem;font-weight:700}.kbd-shortcut__details{display:inline-block}.web-maker-with-tag{position:relative;display:inline-block}.is-extension .web-maker-with-tag:after{display:none}.social-login-btn--github{color:#fff;background:#656b6f;border-color:#656b6f}.social-login-btn--facebook{color:#fff;background:#4e62c0;border-color:#4e62c0}.social-login-btn--google{background:#fff;border:2px solid currentColor;color:inherit}body.is-logged-in .hide-on-login,body:not(.is-app) .show-when-app,body:not(.is-extension) .show-when-extension,body:not(.is-logged-in) .hide-on-logout{display:none}.onboard-selection{padding:10px;margin:0 40px;border-radius:5px;transition:.25s ease;position:relative;border:1px solid transparent}.onboard-selection:hover{cursor:pointer;transform:scale(1.15)}.onboard-selection.selected:after{content:'';position:absolute;right:-20px;bottom:40px;width:80px;height:80px;border-radius:50%;background:#fff url('data:image/svg+xml;charset=UTF-8,')}.bookmarklet{display:inline-flex;align-items:center;border:1px #aaa solid;padding:0 5px;border-style:dashed;color:#333}.help-text{font-size:.9em;color:#616465}.social-login-btn:after,.social-login-btn:before,.social-login-btn:hover:after,.social-login-btn:hover:before{visibility:hidden}.last-login-github .social-login-btn--github:after,.last-login-github .social-login-btn--github:before{visibility:visible}.last-login-facebook .social-login-btn--facebook:after,.last-login-facebook .social-login-btn--facebook:before{visibility:visible}.last-login-google .social-login-btn--google:after,.last-login-google .social-login-btn--google:before{visibility:visible}@media screen and (max-width:600px){body{font-size:70%}.main-header{overflow-x:auto}.main-header__btn-wrap{flex-shrink:0}.modal__content{padding:1em}.saved-items-pane{width:77vw;padding:10px 20px}}.cm-s-paraiso-dark.CodeMirror{background:#2f1e2e;color:#b9b6b0}.cm-s-paraiso-dark .CodeMirror-gutters{background:#2f1e2e;border-right:0}.cm-s-paraiso-dark .CodeMirror-activeline-background{background:#4d344a}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-3024-day.CodeMirror{background:#f7f7f7;color:#3a3432}.cm-s-3024-day .CodeMirror-gutters{background:#f7f7f7;border-right:0}.cm-s-3024-day .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-material.CodeMirror{background-color:#263238;color:rgba(233,237,237,1)}.cm-s-material .CodeMirror-gutters{background:#263238;color:#537f7e}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,0)}.cm-s-dracula .CodeMirror-gutters,.cm-s-dracula.CodeMirror{background-color:#282a36!important;color:#f8f8f2!important}.cm-s-dracula .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-blackboard.CodeMirror{background:#0c1021;color:#f8f8f8}.cm-s-blackboard .CodeMirror-gutters{background:#0c1021;border-right:0}.cm-s-blackboard .CodeMirror-activeline-background{background:#3c3636}.cm-s-midnight.CodeMirror{background:#0f192a;color:#d1edff}.cm-s-midnight .CodeMirror-gutters{background:#0f192a;border-right:1px solid}.cm-s-midnight .CodeMirror-activeline-background{background:#253540}
\ No newline at end of file
+:root{--color-bg:#252637;--color-sidebar:#3a2b63;--code-font-size:16px;--color-button:#0074d9}body{margin:0;padding:0;background:rgba(0,0,0,.5);background:var(--color-bg);color:rgba(255,255,255,.9);min-height:100vh;font-size:87.5%;position:relative;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif,'Segoe UI Emoji','Segoe UI Symbol'}h1{margin-top:0}a{text-decoration:none;color:#d61237;cursor:pointer}p{line-height:1.65}button{font-family:inherit;font-size:100%}.hide{display:none!important}.flex{display:flex}.flex-grow{flex-grow:1}.flex-v-center{align-items:center}.flex-h-center{justify-content:center}.flex-h-end{justify-content:flex-end}.fr{float:right}.relative{position:relative}.tac{text-align:center}.tar{text-align:right}.va-m{vertical-align:middle}.full-width{width:100%}.opacity--30{opacity:.3}.opacity--70{opacity:.7}.pointer-none{pointer-events:none}.ml-1{margin-left:1rem}.ml-2{margin-left:2rem}.mb-1{margin-bottom:1rem}.mb-2{margin-bottom:2rem}.mt-1{margin-top:1rem}.mt-2{margin-top:2rem}.mb-0{margin-bottom:0}.mt-0{margin-top:0}.support-link{color:#d61237}@media screen and (max-width:600px){.block--mobile{display:block}.ml-0--mobile{margin-left:0}.hide-on-mobile{display:none!important}}@media screen and (min-width:601px){.show-on-mobile{display:none}.flex--desk{display:flex}}hr{background:0;border:0;border-bottom:1px solid #dedede}label{cursor:pointer}[class*=hint--]:after{text-transform:none;font-weight:400;letter-spacing:.5px;font-size:14px}.line{display:block;margin-bottom:1em}.caret{display:inline-block;width:0;height:0;border:6px solid transparent;border-top-color:currentColor;position:relative;top:5px;margin-left:8px}a>svg{fill:rgba(255,255,255,.2)}input[type=number],input[type=text],select,textarea{padding:3px 5px;font-size:inherit}.hidden-select{opacity:0;position:absolute;left:0;right:0;top:0;bottom:0}.btn{display:inline-block;color:var(--color-button);font-size:inherit;border:3px solid var(--color-button);border-radius:5px;padding:9px 15px;cursor:pointer;letter-spacing:.2px;line-height:1;white-space:nowrap;transition:box-shadow .2s ease}.btn--primary{background:var(--color-button) linear-gradient(180deg,rgba(0,0,0,.5) 0,transparent);color:#fff}.btn--big{padding:15px 30px;border-radius:3px}.btn-icon{display:inline-flex;align-items:center}.btn:hover{text-decoration:none;box-shadow:0 5px 5px 0 rgba(0,0,0,.25)}[class*=btn]:focus{outline-width:4px;outline-color:#b76b29;outline-style:solid;outline-offset:1px}.btn-icon>svg{width:20px;height:20px;fill:currentColor;vertical-align:middle;margin-right:8px}.btn--big>svg{width:25px;height:25px;margin-right:12px}.btn-loader{display:none}.is-loading>svg{display:none}.is-loading .btn-loader{display:block}.star:after{content:'★';color:currentColor}.show-when-selected{display:none}.selected .show-when-selected{display:inline-block}.main-container{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;transition:.1s ease .2s;will-change:filter}body:not(.light-version).overlay-visible .main-container{transition-duration:.5s;transition-delay:.4s;filter:blur(3px)}.content-wrap{height:1px;max-height:calc(100% - 70px)}.code-side,.demo-side{flex-basis:inherit;position:relative;width:50%}.layout-3 .content-wrap{flex-direction:row-reverse}.code-side{display:flex;flex-direction:column}.layout-2 .content-wrap{flex-direction:column}.layout-2 .code-side{flex-direction:row;width:auto}.layout-2 .demo-side{width:auto}.layout-5 .code-side{flex-direction:row;width:auto}.layout-5 .code-wrap{height:auto}.layout-4 .code-side{display:none}.layout-4 .code-side+.gutter{display:none}.layout-4 .demo-side{width:100%!important}.is-detached-mode .demo-side{display:none}.is-detached-mode .code-side{width:100%!important}.is-detached-mode.layout-2 .code-side{height:auto!important}.code-wrap{display:flex;flex-direction:column;flex-basis:inherit;height:33%;overflow:hidden;position:relative;background:var(--color-bg);transition:height .3s ease,width .3s ease;will-change:height}.layout-2 .code-wrap.is-minimized,.layout-5 .code-wrap.is-minimized{flex-direction:row}.is-dragging .code-wrap{transition:none}.layout-2 .code-wrap{height:auto;width:33%}.code-wrap__header{display:flex;flex-shrink:0;justify-content:space-between;align-items:center;padding:5px 10px;background:rgba(0,0,0,.2);color:#888;border-bottom:1px solid rgba(0,0,0,.3);font-weight:700;user-select:none}.code-wrap__header-label{display:inline-block;font-size:1.1em}.layout-2 .code-side .is-minimized .code-wrap__header,.layout-5 .code-side .is-minimized .code-wrap__header{writing-mode:vertical-lr;padding:10px 5px}.code-wrap__header .caret{transition:.2s ease}.is-minimized .code-wrap__header .caret{opacity:0}.code-wrap__header-btn{display:inline-block;vertical-align:top;margin-left:8px}.code-wrap__header-btn,.code-wrap__header-btn>svg{width:18px;height:18px}.code-wrap__header-right-options{position:relative;z-index:1}.code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}.is-maximized .code-wrap__collapse-btn:before{content:url('data:image/svg+xml;utf8,')}@keyframes pop-in{from{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.CodeMirror{width:100%;height:calc(100% - 25px);font-size:var(--code-font-size)}.layout-2 .is-minimized .Codemirror,.layout-5 .is-minimized .Codemirror{height:calc(100%)}.CodeMirror pre{font-variant-ligatures:contextual}.cm-s-monokai .CodeMirror-linenumber{color:rgba(255,255,255,.2)}.cm-s-monokai .CodeMirror-gutters,.cm-s-monokai.CodeMirror{background:var(--color-bg)}.cm-s-monokai .CodeMirror-guttermarker-subtle{opacity:.4}.cm-s-monokai .CodeMirror-activeline-background,.cm-s-monokai .CodeMirror-activeline-gutter{background:rgba(0,0,0,.1)!important}.CodeMirror-hints{font-size:var(--code-font-size);border:0;background:#1e1e2c}.CodeMirror-hint{color:#bbb;padding:2px 4px}li.CodeMirror-hint-active{background:#5b429d}#demo-frame{border:0;width:100%;height:calc(100% - 29px);position:absolute;z-index:1;background:#fff}body>#demo-frame{height:100%}.footer,.main-header{padding:5px 10px;background-color:#12131b;color:rgba(255,255,255,.45);border-top:1px solid rgba(255,255,255,.14)}.footer{z-index:6}.main-header{display:flex;flex-wrap:nowrap;border:0;border-bottom:1px solid rgba(255,255,255,.14)}.btn--dark,.main-header__btn-wrap>button{box-sizing:content-box;font-size:.8em;font-weight:700;line-height:20px;height:20px;letter-spacing:.6px;white-space:nowrap;color:#9297b3;border-radius:3px;margin-left:10px;padding:0 8px;border:1px solid rgba(0,0,0,.9);background:linear-gradient(180deg,rgba(0,0,0,.5) 0,rgba(255,255,255,.1) 100%);box-shadow:0 -1px 0 0 rgba(255,255,255,.15);text-transform:uppercase}.btn--dark>svg{fill:#9297b3;margin-right:4px}.main-header__btn-wrap>.is-marked>svg{fill:#dc143c}.btn--dark:hover{border-color:rgba(146,151,179,.5)}.main-header__btn-wrap>.is-loading{pointer-events:none;opacity:.4}.main-header__avatar-img,.profile-modal__avatar-img{border-radius:50%}.logo{display:inline-block;height:25px;width:48px;margin-right:5px;background:url(icon-48.png) 0 -12px;background-repeat:no-repeat;vertical-align:middle;-webkit-filter:grayscale(.9);filter:grayscale(.9);transition:.4s ease;opacity:.3;will-change:opacity,filter}.footer:hover .logo{-webkit-filter:grayscale(0);filter:grayscale(0);opacity:1}.footer__right{font-size:0;line-height:0}.footer__separator{display:inline-block;height:24px;margin:0 10px 0 20px;border-left:1px solid rgba(255,255,255,.2)}.mode-btn{background:0 0;border:0;padding:0;margin-left:10px;display:inline-block}.footer__link:first-of-type{margin-left:5px}.footer__link{display:inline-block;background:0 0;border:0;padding:0;margin-right:5px;position:relative;top:2px}.footer a>svg,.footer button>svg{transition:.3s ease;fill:rgba(255,255,255,.2)}.footer a:hover svg,.footer button:hover svg{fill:rgba(255,255,255,.45)}.mode-btn svg{width:24px;height:24px}.mode-btn.selected svg{fill:rgba(255,255,255,.45)}.gutter{background:rgba(255,255,255,.05);flex-shrink:0}.gutter-horizontal{cursor:ew-resize}.gutter-vertical{cursor:ns-resize}.item-title-input{background:0 0;border:0;color:rgba(255,255,255,.6);flex:1}.search-input{background:rgba(255,255,255,.1);padding:10px 20px;border:0;width:100%;font-size:16px;color:#fff;border-radius:4px}.modal{position:fixed;top:0;left:0;width:100vw;height:100vh;overflow-y:auto;align-items:center;display:flex;align-items:baseline;justify-content:center;z-index:2000;visibility:hidden;will-change:transform}@keyframes anim-modal-overlay{to{opacity:1;transform:translateY(0) scale(1)}}.modal__close-btn{position:absolute;right:1rem;top:1rem;text-transform:uppercase;font-weight:700;font-size:.8rem;opacity:.8;transition:.25s ease;border:1px solid #000;border-radius:2px;padding:.2rem .5rem}.modal__close-btn>svg{fill:#000;width:30px;height:30px}.modal__close-btn:hover{opacity:.7}.modal__content{background:#fdfdfd;color:#444;position:relative;border-radius:8px;opacity:0;padding:3em;font-size:1.1em;line-height:1.4;max-width:85vw;margin:2rem auto;box-sizing:border-box;overflow-y:auto;pointer-events:auto;transform:translateY(50px) scale(.95);animation:anim-modal .3s ease forwards;animation-delay:150ms}@keyframes anim-modal{to{opacity:1;transform:translateY(0) scale(1)}}@media screen and (max-width:900px){.modal__content{max-width:95vw}}.is-modal-visible{visibility:visible}.modal-overlay{position:fixed;width:100%;height:100%;visibility:hidden;top:0;left:0;z-index:5;opacity:0;will-change:opacity;background:rgba(0,0,0,.6);transition:opacity .3s}.ask-to-import-modal .modal__content,.pledge-modal .modal__content{max-width:800px}.login-modal .modal__content{overflow-y:initial}.saved-items-pane{position:fixed;right:0;top:0;bottom:0;width:450px;padding:20px 30px;z-index:6;background-color:var(--color-sidebar);transition:.3s cubic-bezier(1,.13,.21,.87);transition-property:transform;will-change:transform;transform:translateX(100%)}.saved-items-pane.is-open{transition-duration:.4s;transform:translateX(0)}.is-modal-visible~.modal-overlay,.overlay-visible .modal-overlay,.saved-items-pane.is-open~.modal-overlay{opacity:1;visibility:visible}.saved-items-pane__close-btn{position:absolute;left:-18px;top:24px;opacity:0;visibility:hidden;border-radius:50%;padding:10px 14px;background:#dc143c;color:#fff;border:0;transform:scale(0);will-change:transform,opacity;transition:.3s ease;transition-delay:0}.saved-items-pane.is-open .saved-items-pane__close-btn{opacity:1;transition-delay:.4s;transform:scale(1);visibility:visible}.saved-item-tile{padding:20px;background-color:rgba(255,255,255,.06);position:relative;margin:20px 0;display:block;border-radius:4px;cursor:pointer;opacity:0;transform:translateX(50px);will-change:opacity,transform;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);animation:slide-left .35s ease forwards}.saved-item-tile:nth-child(1){animation-delay:.2s}.saved-item-tile:nth-child(2){animation-delay:.25s}.saved-item-tile:nth-child(3){animation-delay:.3s}.saved-item-tile:nth-child(4){animation-delay:.35s}.saved-item-tile:nth-child(5){animation-delay:.4s}.saved-item-tile:nth-child(6){animation-delay:.45s}.saved-item-tile:nth-child(7){animation-delay:.5s}.saved-item-tile:nth-child(8){animation-delay:.55s}.saved-item-tile:nth-child(9){animation-delay:.6s}.saved-item-tile:nth-child(10){animation-delay:.65s}.saved-item-tile:nth-child(11){animation-delay:.7s}.saved-item-tile:nth-child(12){animation-delay:.75s}.saved-item-tile:nth-child(n+12){animation-delay:.8s}@keyframes slide-left{from{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}.saved-item-tile.selected,.saved-item-tile:hover{background:rgba(255,255,255,.1)}.saved-item-tile__btns{position:absolute;top:6px;z-index:1;right:8px;opacity:0;pointer-events:none;transition:.25s ease}.saved-item-tile.selected .saved-item-tile__btns,.saved-item-tile:hover .saved-item-tile__btns{opacity:1;pointer-events:auto}.saved-item-tile__btn{padding:7px 10px;color:rgba(255,255,255,.3);border-radius:20px;margin-left:2px;background:rgba(255,255,255,.05);text-transform:uppercase}.saved-item-tile__btn:hover{background:rgba(255,255,255,.8);color:#555}.saved-item-tile__title{pointer-events:none;font-size:1.4em;margin:0 0 1em 0;opacity:.8}.saved-item-tile__meta{pointer-events:none;opacity:.3}.saved-items-pane__container{overflow-y:scroll;max-height:calc(100vh - 90px)}.notifications-btn{position:relative}@keyframes shake{2%,22%{transform:translate3d(-1px,0,0)}20%,5%{transform:translate3d(2px,0,0)}12%,17%,7%{transform:translate3d(-4px,0,0)}10%,15%{transform:translate3d(4px,0,0)}}.notifications-btn.has-new{animation:shake 7s linear infinite;transform-origin:50% 10px}.notifications-btn__dot{position:absolute;right:1;top:-2px;background:#31fe45;border-radius:50%;width:12px;height:12px;display:none}.has-new .notifications-btn__dot{display:block}.notification{border:1px solid #f1f1f1;border-radius:5px;padding:20px;background:#f8f6f9;position:relative}.notification:not(:last-child){margin-bottom:10px}.notification li:not(:last-child){margin-bottom:10px}.notification__version{background:#ff8c00;color:#fff;padding:3px;border-radius:5px;position:absolute;top:2px;left:2px}.loader,.loader:after{border-radius:50%;width:3em;height:3em}.loader{font-size:5px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(118,57,229,.2);border-right:1.1em solid rgba(118,57,229,.2);border-bottom:1.1em solid rgba(118,57,229,.2);border-left:1.1em solid #7639e5;transform:translateZ(0);animation:load8 1.1s infinite linear}@keyframes load8{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.btn-group{position:relative;cursor:pointer}.dropdown__menu{position:absolute;top:100%;left:0;padding:0;margin:0;min-width:200px;display:block;font-size:.88rem;list-style:none;border-radius:4px;overflow:hidden;opacity:0;visibility:hidden;transition:transform .25s ease;transform:translateY(10px);z-index:5;background:#fff}.dropdown__menu>li>a{display:block;padding:6px 15px;color:#333;cursor:pointer}.dropdown__menu>li.selected>a,.dropdown__menu>li>a:hover{background:var(--color-sidebar);color:#fff}.dropdown__menu>li:not(:last-child){border-bottom:1px solid rgba(0,0,0,.05)}.dropdown__menu.is-open,.open>.dropdown__menu{opacity:1;visibility:visible;transform:translateY(0)}.alerts-container{position:fixed;will-change:transform;left:50%;top:-5px;padding:10px;background:#fff;border:1px solid #eee;color:#333;box-shadow:0 3px 5px rgba(0,0,0,.2);font-size:1rem;border-radius:3px;z-index:6;transform:translateX(-50%) translateY(-100%);transition:.3s ease}.alerts-container.is-active{transform:translateX(-50%) translateY(0)}.error-gutter{width:8px}.gutter-error-marker{width:8px;height:20px;background:red;border-radius:0;position:relative;top:0;left:1px}.gutter-error-marker:after{content:attr(data-title);background:red;color:#fff;padding:4px;opacity:0;visibility:hidden;position:absolute;top:14px;left:0;width:300px;transform:translateX(-10px);will-change:transform;transition:.2s ease}.gutter-error-marker:hover:after{opacity:1;visibility:visible;transform:translateX(0)}.count-label{color:rgba(0,0,0,.8);background:rgba(255,255,255,.53);border-radius:5px;padding:1px 6px;font-weight:700}.onboard-step{background:#f7f2f1;border:1px solid #ecdede;margin:15px;padding:20px 30px;background-color:#fff;border-radius:10px;box-shadow:0 16px 22px rgba(0,0,0,.1);flex:1}.onboard-step__icon{fill:#fff2ed;stroke-width:.5px;stroke:#e79f80;width:80px;height:80px}.autocomplete-dropdown{border-top-left-radius:0;border-top-right-radius:0;right:0;max-height:200px;overflow-y:auto;border:1px solid rgba(0,0,0,.5);z-index:2001}.autocomplete__loader{position:absolute;right:3px;bottom:1px}@keyframes wobble{from{transform:none}15%{transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{transform:none}}.animated{animation-duration:1s;animation-fill-mode:both}.wobble{animation-name:wobble}.console{background:var(--color-bg);z-index:6;position:absolute;bottom:0;min-height:80px;height:35vh;left:0;right:0;display:flex;flex-direction:column;transform:translateY(0);transition:transform .4s cubic-bezier(.76,.01,.13,.9)}.console.is-minimized{transform:translateY(calc(100% - 29px))}.console .CodeMirror{height:calc(100% - 30px)}.console__log{flex:1}.console-exec-input{padding:5px;font-size:1.3em;flex:1;background:rgba(0,0,0,.3);color:#fff;border:0}.console:not(.is-minimized) .code-wrap__header{cursor:ns-resize}.global-console-container{display:none;position:relative;height:35px}.is-detached-mode .console,.is-detached-mode .footer{z-index:4}.is-detached-mode .global-console-container{display:block}.kbd-shortcut__keys{background:rgba(0,0,0,.1);border-radius:3px;padding:3px 8px;margin-right:5px;display:inline-block;font-size:.9rem;font-weight:700}.kbd-shortcut__details{display:inline-block}.web-maker-with-tag{position:relative;display:inline-block}.is-extension .web-maker-with-tag:after{display:none}.social-login-btn--github{color:#fff;background:#656b6f;border-color:#656b6f}.social-login-btn--facebook{color:#fff;background:#4e62c0;border-color:#4e62c0}.social-login-btn--google{background:#fff;border:2px solid currentColor;color:inherit}body.is-logged-in .hide-on-login,body:not(.is-app) .show-when-app,body:not(.is-extension) .show-when-extension,body:not(.is-logged-in) .hide-on-logout{display:none}.onboard-selection{padding:10px;margin:0 40px;border-radius:5px;transition:.25s ease;position:relative;border:1px solid transparent}.onboard-selection:hover{cursor:pointer;transform:scale(1.15)}.onboard-selection.selected:after{content:'';position:absolute;right:-20px;bottom:40px;width:80px;height:80px;border-radius:50%;background:#fff url('data:image/svg+xml;charset=UTF-8,')}.bookmarklet{display:inline-flex;align-items:center;border:1px #aaa solid;padding:0 5px;border-style:dashed;color:#333}.help-text{font-size:.9em;color:#616465}.social-login-btn:after,.social-login-btn:before,.social-login-btn:hover:after,.social-login-btn:hover:before{visibility:hidden}.last-login-github .social-login-btn--github:after,.last-login-github .social-login-btn--github:before{visibility:visible}.last-login-facebook .social-login-btn--facebook:after,.last-login-facebook .social-login-btn--facebook:before{visibility:visible}.last-login-google .social-login-btn--google:after,.last-login-google .social-login-btn--google:before{visibility:visible}@media screen and (max-width:600px){body{font-size:70%}.main-header{overflow-x:auto}.main-header__btn-wrap{flex-shrink:0}.modal__content{padding:1em}.saved-items-pane{width:77vw;padding:10px 20px}}.cm-s-paraiso-dark.CodeMirror{background:#2f1e2e;color:#b9b6b0}.cm-s-paraiso-dark .CodeMirror-gutters{background:#2f1e2e;border-right:0}.cm-s-paraiso-dark .CodeMirror-activeline-background{background:#4d344a}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-3024-day.CodeMirror{background:#f7f7f7;color:#3a3432}.cm-s-3024-day .CodeMirror-gutters{background:#f7f7f7;border-right:0}.cm-s-3024-day .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-material.CodeMirror{background-color:#263238;color:rgba(233,237,237,1)}.cm-s-material .CodeMirror-gutters{background:#263238;color:#537f7e}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,0)}.cm-s-dracula .CodeMirror-gutters,.cm-s-dracula.CodeMirror{background-color:#282a36!important;color:#f8f8f2!important}.cm-s-dracula .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-blackboard.CodeMirror{background:#0c1021;color:#f8f8f8}.cm-s-blackboard .CodeMirror-gutters{background:#0c1021;border-right:0}.cm-s-blackboard .CodeMirror-activeline-background{background:#3c3636}.cm-s-midnight.CodeMirror{background:#0f192a;color:#d1edff}.cm-s-midnight .CodeMirror-gutters{background:#0f192a;border-right:1px solid}.cm-s-midnight .CodeMirror-activeline-background{background:#253540}
\ No newline at end of file
diff --git a/app/vendor.js b/app/vendor.js
index bf11733..beb5321 100644
--- a/app/vendor.js
+++ b/app/vendor.js
@@ -1 +1 @@
-(function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n=window.webpackJsonp;window.webpackJsonp=function(o,s,l){for(var d=0,i=[],c,p,u;de}function c(e,t,n){return t=t||65,n=n||90,e&=-33,e>=t&&e<=n}function p(e){return d(e)||c(e)}function u(e){return 32===e||9===e||160===e}function m(e){return u(e)||10===e||13===e}function h(e,t,n,o){o=o?fr({},kr,o):kr;const r=e.pos;if(e.eat(t)){for(let i=1,s;!e.eof();)if(!vr(e,o))if(s=e.next(),s===t)i++;else if(s!==n)s===o.escape&&e.next();else if(i--,!i)return e.start=r,!0;if(e.pos=r,o.throws)throw e.error(`Unable to find matching pair for ${cr(t)}`)}return!1}function g(e,t,n){n=n||f;const o=t.map((e,t)=>({order:t,field:e,end:e.location+e.length})).sort((e,t)=>e.end-t.end||e.order-t.order);let r=0;const i=o.map((t)=>{const o=e.substr(t.field.location,t.field.length),i=e.slice(r,t.field.location);return r=t.end,i+n(t.field.index,o)});return i.join("")+e.slice(r)}function f(e,t){return t?`\${${e}:${t}}`:`\${${e}}`}function y(e,t){const n=e.pos;if(e.eat(Sr)){let n=x(e),o="";if(null!=n)return new Er(n,o,t);if(e.eat(wr)&&(n=x(e),null!=n&&(e.eat(Cr)&&(o=b(e)),e.eat(Tr))))return new Er(n,o,t)}e.pos=n}function b(e){let t;const n=[];for(e.start=e.pos;!e.eof();){if(t=e.peek(),t===wr)n.push(e.pos);else if(t===Tr){if(!n.length)break;n.pop()}e.next()}if(n.length)throw e.error("Unable to find matching \"}\" for curly brace at "+n.pop());return e.current()}function x(e){if(e.start=e.pos,e.eatWhile(d))return+e.current()}function v(e){return e===_r||e===Or}function k(e){const t=e.pos,n=e.prev();if(v(n))for(;!e.sol();)if(e.prev()===n&&e.peek()!==Mr)return!0;return e.pos=t,!1}function S(e){return C(e)||w(e)}function C(e){const t=e.pos;return k(e)&&e.eat(Ur)&&T(e)||(e.pos=t,!1)}function w(e){const t=e.pos;return e.eatWhile(L)&&e.eat(Ur)&&T(e)||(e.pos=t,!1)}function T(e){return e.eatWhile(E)}function E(e){return e===Br||e===Pr||A(e)||I(e)}function A(e){return e&=-33,65<=e&&90>=e}function I(e){return 47e}function N(e){return e===Rr||e===Dr}function L(e){return e&&e!==Ur&&!N(e)&&!v(e)}function _(e,t,n){for(v(e.charCodeAt(t))&&t++;B(e.charCodeAt(t),n.syntax);)t++;return t}function O(e,t,n){if(!n)return 0;const o=new Lr(e),r=(n+"").split("").map(jr);o.pos=t;for(let i;!o.sol();)if(!(M(o,zr,Wr)||M(o,Xr,Gr))){if(i=o.pos,D(o,r))return i;o.pos--}return-1}function M(e,t,n){const o=e.pos;if(e.eat(t))for(;!e.sol();){if(e.eat(n))return!0;e.pos--}return e.pos=o,!1}function D(e,t){const n=e.pos;let o=!1;for(let n=t.length-1;0<=n&&!e.sol()&&!!e.eat(t[n]);n--)o=0===n;return o||(e.pos=n),o}function R(e,t){return-1!==e.indexOf(t)}function P(e){return 64e||96e||47e||Qr.has(e)}function F(e,t){return e===Hr||"markup"===t&&(e===Wr||e===Gr)}function B(e,t){return e===Kr||"markup"===t&&(e===zr||e===Xr)}function U(e,t){return e instanceof ea?e:"string"==typeof e?new ea(e,t):e&&"object"==typeof e?new ea(e.name,e.value,e.options):void 0}function V(e){return(e+"").trim()}function q(e,t,n){return e&&n.indexOf(e)===t}function j(e){if(e.eat(oa))return e.start=e.pos,{count:e.eatWhile(d)?+e.current():null}}function W(e){if(vr(e,ra))return e.current().slice(1,-1)}function z(e){const t=e.pos;if(e.eat(aa)){for(let n=1,o="",r=e.pos,i;!e.eof();)if(i=e.next(),i===aa)n++;else if(i!==ia)i===sa&&(i=e.next(),(i===aa||i===ia)&&(o+=e.substring(r,e.pos-2)+cr(i),r=e.pos));else if(n--,!n)return e.start=t,o+e.substring(r,e.pos-1);throw e.pos=t,e.error(`Unable to find closing ${"}"} for text start`)}return null}function H(e){if(!e.eat(pa))return null;const t=[];for(let n,o;!e.eof();){if(e.eatWhile(u),e.eat(ua))return t;if(null!=(n=W(e)))t.push({name:null,value:n});else if(G(e))n=e.current(),ma.test(n)?(o=K(n),t.push(o),e.eat(ca)&&(null==(n=W(e))?null==(n=z(e))?G(e)&&(o.value=e.current()):(o.value=n,o.options={before:"{",after:"}"}):o.value=n)):t.push({name:null,value:n});else throw e.error("Expected attribute name")}throw e.error("Expected closing \"]\" brace")}function K(e){const t={};e.charCodeAt(0)===la&&(e=e.slice(1),t.implied=!0),e.charCodeAt(e.length-1)===da&&(e=e.slice(0,e.length-1),t.boolean=!0);const n={name:e};return Object.keys(t).length&&(n.options=t),n}function G(e){const t=e.pos;if(e.eatWhile(X))return e.start=t,!0}function X(e){return!m(e)&&!l(e)&&e!==pa&&e!==ua&&e!==ca}function Q(e){const t=e.pos,n=new na(J(e));for(let t;!e.eof();)if(e.eat(ga))n.addClass(J(e));else if(e.eat(ha))n.setAttribute("id",J(e));else if(e.eat(fa)){if(n.isGroup)throw e.backUp(1),e.error("Unexpected self-closing indicator");n.selfClosing=!0,(t=j(e))&&(n.repeat=t);break}else if(t=H(e))for(let e=0,o=t.length;e{const r=t.resolve(e.name);if(r&&!n.has(r)){if("function"==typeof r.value)return r.value(e,t,o);const i=Sa(r.value);n.add(r),i.walk(o),n.delete(r);const s=re(i);for(te(s,e);i.firstChild;)e.parent.insertBefore(i.firstChild,e);s.parent.insertBefore(e,s),s.remove()}};o(e)}function te(e,t){return t.name=e.name,e.selfClosing&&(t.selfClosing=!0),null!=e.value&&(t.value=e.value),e.repeat&&(t.repeat=Ca({},e.repeat)),ne(e,t)}function ne(e,t){oe(e,t);const n=new Map;let o=e.attributes;for(let r=0;rse(e,o))}function ie(e,t,n){for(let o=t.length-1;0<=o;o--){const i=t[o];let r=0,s=0,l=!1;if("@"===e.substr(i[0]+i[1],1)){"-"===e.substr(i[0]+i[1]+1,1)&&(l=!0);const t=e.substr(i[0]+i[1]+1+ +l).match(/^(\d+)/);t?(s=t[1].length+1+ +l,r=parseInt(t[1])-1):s=2}e=e.substring(0,i[0])+("function"==typeof n?n(e.substr(i[0],i[1]),r,l):n)+e.substring(i[0]+i[1]+s)}return e}function se(e,t){return[e,t]}function le(e){const t=de(e);if(t&&null!=t.value){const n=t.value,o=t.count;e.name=ce(e.name,n,o),e.value=ce(e.value,n,o),e.attributes.forEach((t)=>{const r=e.getAttribute(t.name).clone();r.name=ce(t.name,n,o),r.value=ce(t.value,n,o),e.replaceAttribute(t.name,r)})}return e}function de(e){for(;e;){if(e.repeat)return e.repeat;e=e.parent}}function ce(e,t,n){if("string"==typeof e){const o=pe(e);return ue(e,o,t,n)}return e}function pe(e){return ae(e||"",La).reduce((t,n)=>{if(!/[#{]/.test(e[n[0]+1]||"")){const e=t[t.length-1];e&&e[0]+e[1]===n[0]?e[1]+=n[1]:t.push(n)}return t},[])}function ue(e,t,n,o){const r=ie(e,t,(e,t,r)=>{let i=r?t+o-n+1+"":n+t+"";for(;i.length{if(e.repeat&&null===e.repeat.count){for(let n=0;n{e.repeat&&e.repeat.implicit&&(n=!0,fe(e,t[e.repeat.index]))}),n||ve(xe(e),t.join("\n"))}return e}function fe(e,t){let n=ye(e,t);return e.walk((e)=>n|=ye(e,t)),n||ve(xe(e),t),e}function ye(e,t){const n={replaced:!1};return e.value=be(e.value,t,n),e.attributes.forEach((o)=>{o.value&&e.setAttribute(o.name,be(o.value,t,n))}),n.replaced}function be(e,t,n){if("string"==typeof e){const o=ae(e,Oa);o.length&&(n&&(n.replaced=!0),e=ie(e,o,t))}return e}function xe(e){for(;e.children.length;)e=e.children[e.children.length-1];return e}function ve(e,t){if(e.value){const n=ae(e.value,Ma);if(n.length)return void(e.value=ie(e.value,n,t))}("a"===e.name.toLowerCase()||e.hasAttribute("href"))&&(Da.test(t)?e.setAttribute("href",(Pa.test(t)?"":"http://")+t):Ra.test(t)&&e.setAttribute("href","mailto:"+t)),e.value=t}function ke(e){const t=e.classList.reduce((e,t)=>{const n=t.indexOf("_");return 0{let i,s;const l=r;return(s=r.match(Ba))&&(i=we(e,t,s[1])+n.element+s[2],o.add(i),r=r.slice(s[0].length)),(s=r.match(Ua))&&(!i&&(i=we(e,t,s[1]),o.add(i)),o.add(`${i}${n.modifier}${s[2]}`),r=r.slice(s[0].length)),r===l&&o.add(l),o},new Set),r=Array.from(o).filter(Boolean);r.length&&e.setAttribute("class",r.join(" "))}function Ce(e){const t=new Map;return e.walk((e)=>{const n=e.classList;n.length&&t.set(e,Te(n,Va)||Te(n,qa)||t.get(e.parent))}),t}function we(e,t,n){for(let o=1{const o=t(new Qa(e,n));return o?o.toString(_e(e.children,t,n)):""}).join("")}function Oe(e,t){const n="object"==typeof e?e:Ir(e);let o=-1;return n.fields.forEach((e)=>{e.index+=t.index,e.index>o&&(o=e.index)}),-1!==o&&(t.index=o+1),n}function Me(e,t){if(null==e)return e;const n=[],o=(e,n,o,r)=>null==t[o]?"":n+t[o]+r;let r="",s=0,l=0,i,d;for(;l!e||t.index=t.get("inlineBreak"))return!0}for(let n=0,o=e.children.length;n{if(n.options.implied&&null==n.value)return null;const o=t.attribute(n.name);let r=null;if(n.options.boolean||-1!==t.get("booleanAttributes").indexOf(o.toLowerCase())){if(t.get("compactBooleanAttributes")&&null==n.value)return` ${o}`;null==n.value&&(r=o)}return null==r&&(r=e.renderFields(n.value)),` ${o}=${t.quote(r)}`}).join("")}function Ke(e,t){return e&&e.isTextOnly||Ge(e,t)}function Ge(e,t){return e&&t.isInline(e)}function Xe(e,t){const n=t.get("formatSkip")||[];let o=e.parent.isTextOnly?-2:-1,r=e;for(;r=r.parent;)-1===n.indexOf((r.name||"").toLowerCase())&&o++;return 0>o?0:o}function Qe(e,t){const n=e.node;if(t.enabled&&t.trigger&&n.name){const n=e.node.attributes.reduce((e,t)=>(t.name&&null!=t.value&&(e[t.name.toUpperCase().replace(/-/g,"_")]=t.value),e),{});for(let o=0,r=t.trigger.length;o{if(n.options.implied&&null==n.value)return null;const i=t.attribute(n.name),s=e.renderFields(n.value);if(oi.test(i))s&&o.push(`#${s}`);else if(ri.test(i))s&&o.push(`.${s.replace(/\s+/g,".")}`);else{const e=null==n.value&&(n.options.boolean||-1!==t.get("booleanAttributes").indexOf(i.toLowerCase()));r.push({name:i,value:s,isBoolean:e})}}),{PRIMARY_ATTRS:n.primary(o)||null,SECONDARY_ATTRS:n.secondary(r)||null}}function Ze(e){let t=e.parent.isTextOnly?-2:-1,n=e;for(;n=n.parent;)t++;return 0>t?0:t}function et(e,t){const n=e.node;return!n.isTextOnly&&n.value&&(e.beforeText=si.test(n.value)?e.newline+e.indent+t.indent(1):" "),e}function tt(e,t){if(null!=e.value&&si.test(e.value)){const n=De(e.value),o=t.indent(1),r=n.reduce((e,t)=>dr(e,t.length),0);return n.map((e,t)=>`${t?o:""}${nt(e,r)} |`).join("\n")}return e.value}function nt(e,t){for(;e.length`${n}${t?" ":"|"} ${e}`).join("\n")}return e.value}function at(e,t){return e&&(e.isTextOnly||t.isInline(e))}function it(e,t){const n=e.node;return!n.isTextOnly&&n.value&&(e.beforeText=ci.test(n.value)?e.newline+e.indent+t.indent(1):" "),e}function st(e,t){if(null!=e.value&&ci.test(e.value)){const n=t.indent(1);return De(e.value).map((e)=>`${n}| ${e}`).join("\n")}return e.value}function lt(e){return!!e&&e in pi}function dt(e){if(e.peek()===hi){e.start=e.pos,e.next(),e.eat(116)||e.eatWhile(ct);const t=e.current();if(e.start=e.pos,e.eat(gi)&&!e.eatWhile(d))throw e.error("Unexpected character for alpha value of color");return new fi(t,e.current())}}function ct(e){return d(e)||c(e,65,70)}function pt(e){return!(e%17)}function ut(e){return(e>>4).toString(16)}function mt(e){return ht(e.toString(16),2)}function ht(e,t){for(;e.lengthnew qi(e.key,e.value)))}function Mt(e){e=e.sort(Dt);const t=[];for(let n=0,o,r;ne.property===n.property),n);const o=Wt(e.name,t,"key",n.fuzzySearchMinScore);return o?o.property?Ut(e,o,n):Vt(e,o):"!"===e.name?jt(e,"!important"):e}function Ut(e,t,n){const o=e.name;if(e.name=t.property,e.value&&"object"==typeof e.value){const r=t.keywords();if(!e.value.size){let n=Wt(Ht(o,t.key),r);n||(n=t.defaultValue,n&&-1===n.indexOf("${")&&(n=`\${1:${n}}`)),n&&e.value.add(n)}else for(let t=0,o;t"string"==typeof e||"keyword"===e.type?(e+="",Wt(e,o,null,n.fuzzySearchMinScore)||e):e);return e.name=null,e.value.value=r,e}function jt(e,t){return e.name=null,e.value=t,e}function Wt(e,t,n,o){if(!e)return null;let r=null,s=0;o=o||0;for(let l=0,i;l=s&&(s=o,r=i)}return s>=o?r:null}function zt(e,t){const n=e&&"object"==typeof e?e[t]:e,o=(n||"").match(/^[\w-@]+/);return o?o[0]:n}function Ht(e,t){for(let n=0,o=0;n{const r=n.node;let i=Yt(r,o);if(r.attributes.length){const e=r.attributes.map((e)=>Yt(e,o));i=$t(i,e)}return n.open=r.name&&t.name(r.name),n.afterOpen=o.between,n.text=n.renderFields(i||null),!n.open||n.text&&n.text.endsWith(";")||(n.afterText=o.after),t.get("format")&&(n.newline="\n",e.lastChild!==r&&(n.afterText+=n.newline)),n})}function $t(e,t){const n=Ir(e),o=n.fields.length;if(o)for(t=t.slice(),t.length>o&&(t=t.slice(0,o-1).concat(t.slice(o-1).join(", ")));t.length;){const e=t.shift(),o=n.fields.shift(),r=e.length-o.length;n.string=n.string.slice(0,o.location)+e+n.string.slice(o.location+o.length);for(let e=0,t=n.fields.length;ee&&"object"==typeof e?"color"===e.type?e.toString(t.shortHex):e.toString():e+"").join(" "):null==e.value?"":e.value+""}function Zt(e){return!!e&&e in Xi}function en(e,t){let n=Xi[e];return"string"==typeof n&&(n=Xi[n]),Ki({},n,t&&t.format)}function tn(e){return!e.parent}function nn(e,t){return Math.floor(Math.random()*(t-e)+e)}function on(e,t){const n=e.length,o=lr(n,t),r=new Set;for(;r.sizee.length)return e;e=e.slice();const t=e.length,n=/,$/;let o=0;o=3=t?nn(0,1):6=t?nn(0,2):nn(1,4);for(let r=0,i;r{o.push("string"==typeof e?Ji[e]:e)}):"object"==typeof n&&o.push(n);const r=new os(o.filter(Boolean));return"stylesheet"!==e&&r.get(0).set(ls,yn),r}function yn(e){const t={},n=e.name.match(ls);return n[1]&&(t.lang=n[1]),n[2]&&(t.wordCount=+n[2]),es(e,t)}function bn(e,t){return t=kn(t),"stylesheet"===wn(t.type,t.syntax)?hn(e,t):un(e,t)}function xn(e,t){return t=kn(t),"stylesheet"===wn(t.type,t.syntax)?gn(e,t):mn(e,t)}function vn(e,t,n){return e&&"markup"!==e&&"stylesheet"!==e&&(n=t,t=e,e="markup"),n instanceof os?n:fn(e,t,n)}function kn(e){return"string"==typeof e&&(e={syntax:e}),e=ss({},ps,e),null==e.type&&e.syntax&&(e.type=Sn(e.syntax)?"stylesheet":"markup"),e.format=ss({field:e.field},e.format),e.profile=Cn(e),e.variables=ss({},ds,e.variables),e.snippets=vn(e.type,e.syntax,e.snippets),e}function Sn(e){return-1!==cs.indexOf(e)}function Cn(e){return e.profile instanceof is?e.profile:new is(e.profile)}function wn(e,t){return e?"stylesheet"===e?"stylesheet":"markup":Sn(t)?"stylesheet":"markup"}function Tn(e,t){if(e=e.toLowerCase(),t=t.toLowerCase(),e===t)return 1;if(!t||e.charCodeAt(0)!==t.charCodeAt(0))return 0;const n=e.length,o=t.length;let r=1,i=1,s=o,l,d,c,p;for(;rnew fs(e.key,e.value)))}function In(e){e=e.sort(Nn);const t=[];for(let n=0,o,r;n=s&&(s=o,r=i)}return s>=o?r:null}function Bn(e,t){const n=e&&"object"==typeof e?e[t]:e,o=(n||"").match(/^[\w-@]+/);return o?o[0]:n}function Un(e,t){for(let n=0,o=0;ne.charCodeAt(0))}function no(e){if(60===e.peek())return Bs(e)||qs(e)||Rs(e)}function oo(e,t){const n=e.pos;for(;!e.eof();){if(Zn(e,t))return e.pos=e.start,Rs(e);e.next()}return e.pos=n,null}function ro(e){return e.name?e.name.value.toLowerCase():`#${e.type}`}function ao(e){return e[e.length-1]}function io(e,t,n){t=t||e.getCursor();const o=so(e,t),r=hr(zs({field:Hs},e.getOption("emmet"),n),{syntax:o}),i=e.getModeAt(t);return"jsx"===o?(r.profile=zs({selfClosingStyle:"xml"},r.profile),r.options=zs({jsx:!0},r.options)):"xml"===i.name&&(r.profile=zs({selfClosingStyle:i.configuration},r.profile)),r}function so(e,t){const n=e.getMode();if("jsx"===n.name||"javascript"===n.name)return n.name;const o=e.getModeAt(t);return"xml"===o.name?"html":o.name}function lo(e,t){return e.line-t.line||e.ch-t.ch}function co(e){return e.getOption("indentWithTabs")?"\t":mo(" ",e.getOption("indentUnit"))}function po(e,t,n){let o=uo(t);const r=co(e);return"\t"!==r&&(o=o.map((e)=>e.replace(/^\t+/,(e)=>mo(r,e.length)))),n&&(o=o.map((e,t)=>t?n+e:e)),o.join("\n")}function uo(e){return Array.isArray(e)?e:e.split(/\r\n|\r|\n/g)}function mo(e,t){let n="";for(;0fo(t,e.to):0<=fo(t,e.from)&&0>=fo(t,e.to)}function fo(e,t){return e.line-t.line||e.ch-t.ch}function yo(e){return{from:e.start,to:e.end}}function bo(e,t,n){const o=new Ks(e,t);if(o.eatWhile(m),t=o.pos,n){for(o.pos=n,o.backUp();!o.sof()&&m(o.peek());)o.backUp();o.next(),n=o.pos}else n=t;return{from:t,to:n}}function xo(e,t){const n=t.line;for(let o=t.ch,r;0<=o;){if(r=e.getTokenAt({line:n,ch:o}),"property"===r.type)return r.string;if(r.start!==o)o=r.start;else break}}function vo(e,t){const n=e.getModeAt(t);if(n&&"css"===n.name){const n=e.getTokenAt(t),o=n.state&&n.state.localState||n.state;return o&&o.context&&"prop"===o.context.type}return!1}function ko(e,t,n){const o=io(e,t);if(n&&!So(e,t,o))return null;const r=Yr(e.getLine(t.line),t.ch,{lookAhead:!0,syntax:o.type,prefix:"jsx"===o.syntax&&e.getOption("jsxBracket")?"<":""});if(r){const i={line:t.line,ch:r.start},s={line:t.line,ch:r.end};return"stylesheet"===o.type&&n&&vo(e,t)&&(o.options=zs({property:xo(e,t)},o.options)),{abbreviation:r.abbreviation,range:{from:i,to:s},config:o}}}function So(e,t,n){const o=e.getTokenTypeAt(t);return"stylesheet"===n.type?"comment"!==o&&"string"!==o:"html"===n.syntax?null===o:"slim"===n.syntax||"pug"===n.syntax?null===o||"tag"===o||o&&/attribute/.test(o):"haml"===n.syntax?null===o||"attribute"===o:"jsx"===n.syntax}function Co(e,t,n){const o=e.getLine(t.from.line),r=o.match(/^\s+/);let i=po(e,n,r&&r[0]);const s=Ir(i);return e.operation(()=>{e.replaceRange(s.string,t.from,t.to);const n=e.indexFromPos(t.from);if(s.fields.length){const t=s.fields[0],o=e.posFromIndex(t.location+n),r=e.posFromIndex(t.location+t.length+n);e.setSelection(o,r)}else e.setCursor(e.posFromIndex(n+s.string.length));return!0})}function wo(e,t,n){const o=To(e,t);if(o&&o.model)return o.model;const r=ko(e,t,n);if(r)try{const t=new Xs(r.abbreviation,r.range,r.config);return t.valid(e,n)?t:null}catch(e){}}function To(e,t){const n=e.findMarksAt(t);for(let o=0,r;o_o(e,t));return t.some(Boolean)?void e.operation(()=>{let n=e.listSelections();const o=e.doc.lineSeparator();for(let r=n.length-1;0<=r;r--)e.replaceRange(t[r]?o+o:o,n[r].anchor,n[r].head,"+newline");n=e.listSelections();for(let o=0;o{if(t[o]){const t=n.from().line-1,o={line:t,ch:e.getLine(t).length};return{anchor:o,head:o}}return n}))}):e.constructor.Pass}function _o(e,t){if(Mo(t.anchor,t.head)){const n=t.anchor,o=e.getModeAt(n);if("xml"===o.name){const t=e.getTokenAt(n),o=e.getTokenAt(zs({},n,{ch:n.ch+1}));return"tag bracket"===t.type&&">"===t.string&&"tag bracket"===o.type&&""===o.string}}}function Oo(e,t){return e.line-t.line||e.ch-t.ch}function Mo(e,t){return e.sticky===t.sticky&&0===Oo(e,t)}function Do(e){const t=Ro(e);if(t){const n=e.getOption("emmetPrompt")||Bo,o=e.getRange(t.from,t.to,"\n").split("\n").map((e)=>e.trim());n(e,"Enter abbreviation to wrap with:",(n)=>{if(n){const r=new Xs(n,t,io(e,t.from,{text:o}));r.insert(e)}})}else console.warn("Nothing to wrap")}function Ro(e){if(e.somethingSelected()){const t=e.listSelections().filter((e)=>e.anchor!==e.head)[0];if(t)return 0>fo(t.anchor,t.head)?{from:t.anchor,to:t.head}:{from:t.head,to:t.anchor}}return Po(e,e.getCursor())}function Po(e,t){const n=e.getEmmetDocumentModel(),o=n&&n.nodeForPoint(t);if(!o)return null;if(Fo(o.open,t)||Fo(o.close,t))return yo(o);const r=o.open.end,i=o.close?o.close.start:o.open.end;return bo(e,r,i)}function Fo(e,t){return e&&go(yo(e),t)}function Bo(e,t,n){n(window.prompt(t))}function Uo(e,t){const n=To(e,t);if(n)return n;Eo(e);const o=wo(e,t,!0);if(o)return Ao(e,o)}function Vo(e,t){t=t||e.getCursor();let n=[];const o=wo(e,t,!0);o&&o.abbreviation!==o.snippet&&n.push(Ko(e,t,o));const r=o?o.config:io(e,t);return n="stylesheet"===r.type?n.concat(jo(e,t,r)):n.concat(qo(e,t,r)),{type:r.type,syntax:r.syntax,abbreviation:o,completions:n.filter(Boolean)}}function qo(e,t,n){const o=e.getLine(t.line).slice(0,t.ch),r=Go(o,/[\w:\-$@]/);if(r){const o={from:{line:t.line,ch:t.ch-r.length},to:t};return Wo(e,t,n).filter((e)=>e.key!==r&&0===e.key.indexOf(r)).map((t)=>new Qs("snippet",e,o,t.key,t.preview,t.snippet))}return[]}function jo(e,t,n){const o=e.getLine(t.line).slice(0,t.ch),r=Go(o,/[\w-@$]/);if(r){const o={from:{line:t.line,ch:t.ch-r.length},to:t};if(n.options&&n.options.property){const i=n.options.property.toLowerCase(),s=Wo(e,t,n).find((e)=>e.property&&e.property===i);if(s&&s.keywords.length)return s.keywords.map((t)=>0===t.key.indexOf(r)&&new Qs("value",e,o,t.key,t.preview,t.snippet)).filter(Boolean)}else return Wo(e,t,n).filter((e)=>e.key!==r&&0===e.key.indexOf(r)).map((t)=>new Qs("snippet",e,o,t.key,t.preview,t.snippet))}return[]}function Wo(e,t,n){const{type:o,syntax:r}=n;e.state.emmetCompletions||(e.state.emmetCompletions={});const i=e.state.emmetCompletions;if(!(r in i)){const e=vn(o,r,n.snippets);i[r]="stylesheet"===o?zo(e,n):Ho(e,n)}return i[r]}function zo(e){return On(e).map((e)=>{let t=e.property;const n=e.keywords();return n.length?t+=`: ${ho(n.join(" | "))}`:e.value&&(t+=`: ${ho(e.value)}`),{key:e.key,value:e.value,snippet:e.key,property:e.property,keywords:n.map((e)=>{const t=e.match(/^[\w-]+/);return t&&{key:t[0],preview:ho(e),snippet:e}}).filter(Boolean),preview:t}})}function Ho(e,t){return e.all({type:"string"}).map((e)=>({key:e.key,value:e.value,preview:ho(bn(e.value,t)),snippet:e.key}))}function Ko(e,t,n){let o=n.preview;return 500n.insert(e,t))}function Go(e,t){let n=e.length;for(;0{e.className===$s?t=e:e.className===Ys&&(n=e)}),t?{open:t,close:n}:null}function tr(e){e.getAllMarks().forEach((e)=>{(e.className===$s||e.className===Ys)&&e.clear()})}function nr(e,t){const n=e.getEmmetDocumentModel();return n&&n.nodeForPoint(t||e.getCursor())}function or(e,t,n){return e.markText(t.start,t.end,{className:n,inclusiveLeft:!0,inclusiveRight:!0,clearWhenEmpty:!1})}function rr(e,t){const n=t.find();return n?e.getRange(n.from,n.to):""}function ar(e,t){const n=er(e),o=t.from;n&&(go(n.open.find(),o)&&n.close?ir(e,n.open,n.close):n.close&&go(n.close.find(),o)&&ir(e,n.close,n.open))}function ir(e,t,n){const o=sr(e,t),r=n.find(),i=o.match(/[\w:.-]+/),s=o?i&&i[0]:"";null==s?tr(e):e.getRange(r.from,r.to)!==s&&e.replaceRange(s,r.from,r.to)}function sr(e,t){const n=t.find();return n?e.getRange(n.from,n.to):""}var lr=Math.min,dr=Math.max,cr=String.fromCharCode,pr=Object.assign||function(e){for(var t=1,n;t=this.end}limit(e,t){return new this.constructor(this.string,e,t)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pose.charCodeAt(0),Wr=jr("["),zr=jr("]"),Hr=jr("("),Kr=jr(")"),Gr=jr("{"),Xr=jr("}"),Qr=new Set(["#",".","*",":","$","-","_","!","@","%","^","+",">","/"].map(jr)),Jr=new Map().set(Wr,zr).set(Hr,Kr).set(Gr,Xr),$r={syntax:"markup",lookAhead:null,prefix:""};var Yr=function(e,t,n){t=lr(e.length,dr(0,null==t?e.length:t)),n="boolean"==typeof n?Nr({},$r,{lookAhead:n}):Nr({},$r,n),(null==n.lookAhead||!0===n.lookAhead)&&(t=_(e,t,n));let o;const r=O(e,t,n.prefix);if(-1===r)return null;const i=new Lr(e,r);i.pos=t;const s=[];for(;!i.sol();){if(o=i.peek(),B(o,n.syntax))s.push(o);else if(F(o,n.syntax)){if(s.pop()!==Jr.get(o))break;}else if(R(s,zr)||R(s,Xr)){i.pos--;continue}else if(qr(i)||!P(o))break;i.pos--}if(!s.length&&i.pos!==t){const o=e.slice(i.pos,t).replace(/^[*+>^]+/,"");return{abbreviation:o,location:t-o.length,start:n.prefix?r-n.prefix.length:t-o.length,end:t}}},Zr=Object.assign||function(e){for(var t=1,n;tthis.setAttribute(e))}get attributes(){return this._attributes}get attributesMap(){return this.attributes.reduce((e,t)=>(e[t.name]=t.options.boolean?t.name:t.value,e),{})}get isGroup(){return!this.name&&!this.value&&!this._attributes.length}get isTextOnly(){return!this.name&&!!this.value&&!this._attributes.length}get firstChild(){return this.children[0]}get lastChild(){return this.children[this.children.length-1]}get childIndex(){return this.parent?this.parent.children.indexOf(this):-1}get nextSibling(){return this.next}get previousSibling(){return this.previous}get classList(){const e=this.getAttribute("class");return e&&e.value?e.value.split(/\s+/g).filter(q):[]}create(t,n){return new e(t,n)}setAttribute(e,t){const n=U(e,t),o=this.getAttribute(e);o?this.replaceAttribute(o,n):this._attributes.push(n)}hasAttribute(e){return!!this.getAttribute(e)}getAttribute(e){"object"==typeof e&&(e=e.name);for(var t=0;tt!==e).join(" "))}appendChild(e){this.insertAt(e,this.children.length)}insertBefore(e,t){this.insertAt(e,this.children.indexOf(t))}insertAt(e,t){if(0>t||t>this.children.length)throw new Error("Unable to insert node: position is out of child list range");const n=this.children[t-1],o=this.children[t];e.remove(),e.parent=this,this.children.splice(t,0,e),n&&(e.previous=n,n.next=e),o&&(e.next=o,o.previous=e)}removeChild(e){const t=this.children.indexOf(e);-1!==t&&(this.children.splice(t,1),e.previous&&(e.previous.next=e.next),e.next&&(e.next.previous=e.previous),e.parent=e.next=e.previous=null)}remove(){this.parent&&this.parent.removeChild(this)}clone(t){const n=new e(this.name);return n.value=this.value,n.selfClosing=this.selfClosing,this.repeat&&(n.repeat=Zr({},this.repeat)),this._attributes.forEach((e)=>n.setAttribute(e.clone())),t&&this.children.forEach((e)=>n.appendChild(e.clone(!0))),n}walk(e,t){t=t||0;for(let n=this.firstChild;n;){const o=n.next;if(!1===e(n,t)||!1===n.walk(e,t+1))return!1;n=o}}use(e){const t=[this];for(var n=1;n{e=this.getAttribute(e.name);const t=e.options;let n=`${t&&t.implied?"!":""}${e.name||""}`;return t&&t.boolean?n+=".":null!=e.value&&(n+=`="${e.value}"`),n});let t=`${this.name||""}`;return e.length&&(t+=`[${e.join(" ")}]`),null!=this.value&&(t+=`{${this.value}}`),this.selfClosing&&(t+="/"),this.repeat&&(t+=`*${this.repeat.count?this.repeat.count:""}`,null!=this.repeat.value&&(t+=`@${this.repeat.value}`)),t}};var na=ta;const oa=42,ra={throws:!0},aa=123,ia=125,sa=92,la=33,da=46,ca=61,pa=91,ua=93,ma=/^\!?[\w\-:\$@]+\.?$/,ha=35,ga=46,fa=47,ya=40,ba=41,xa=43,va=62,ka=94;var Sa=function(e){const t=Y(e);return t.walk(Z),t},Ca=Object.assign||function(e){for(var t=1,n;tee(e,t)),e};const Ta=new Set(["a","abbr","acronym","applet","b","basefont","bdo","big","br","button","cite","code","del","dfn","em","font","i","iframe","img","input","ins","kbd","label","map","object","q","s","samp","select","small","span","strike","strong","sub","sup","textarea","tt","u","var"]),Ea={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};var Aa=function(e){return e=(e||"").toLowerCase(),Ea[e]||(Ta.has(e)?"span":"div")},Ia=Object.assign||function(e){for(var t=1,n;t{null==e.name&&e.attributes.length&&(e.name=Aa(e.parent.name))}),e};const La="$";var _a=function(e){return e.walk(le),e};const Oa="$#",Ma="|",Da=/^((?:https?|ftp|file):\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,Ra=/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/,Pa=/^([a-z]+:)?\/\//i,Fa={element:"__",modifier:"_"},Ba=/^(-+)([a-z0-9]+[a-z0-9-]*)/i,Ua=/^(_+)([a-z0-9]+[a-z0-9-_]*)/i,Va=(e)=>/^[a-z]\-/i.test(e),qa=(e)=>/^[a-z]/i.test(e);const ja=/^xsl:(variable|with\-param)$/i;const Wa={bem:function(e,t){t=Ia({},Fa,t),e.walk((e)=>ke(e,t));const n=Ce(e);return e.walk((e)=>Se(e,n,t)),e},jsx:function(e){return e.walk((e)=>{Ee(e,"class","className"),Ee(e,"for","htmlFor")}),e},xsl:function(e){return e.walk((e)=>{ja.test(e.name||"")&&(e.children.length||e.value)&&e.removeAttribute("select")}),e}};var za=function(e,t){return Object.keys(t||{}).forEach((n)=>{if(n in Wa){const o="object"==typeof t[n]?t[n]:null;e=e.use(Wa[n],o)}}),e},Ha=function(e,t,n){return"string"==typeof t?t=[t]:t&&"object"==typeof t&&!Array.isArray(t)&&(n=t,t=null),e.use(Na).use(he,Array.isArray(t)?t.length:null).use(_a).use(ge,t).use(za,n)},Ka=function(e,t){return t=t||{},e.walk((e)=>Ae(e,t)),e},Ga=Object.assign||function(e){for(var t=1,n;te;let Qa=class{constructor(e,t,n){"object"==typeof t&&(n=t,t=null),this.node=e,this._fieldsRenderer=t||Xa,this.open=null,this.beforeOpen="",this.afterOpen="",this.close=null,this.beforeClose="",this.afterClose="",this.text=null,this.beforeText="",this.afterText="",this.indent="",this.newline="",n&&Ga(this,n)}clone(){return new this.constructor(this.node,this)}indentText(e){const t=Le(e);if(1===t.length)return e;const n=this.newline||this.indent?this.newline:" ";return t.map((e,t)=>t?this.indent+e:e).join(n)}renderFields(e){return this._fieldsRenderer(e)}toString(e){const t=this._wrap(this.open,this.beforeOpen,this.afterOpen),n=this._wrap(this.close,this.beforeClose,this.afterClose),o=this._wrap(this.text,this.beforeText,this.afterText);return t+o+(null==e?"":e)+n}_wrap(e,t,n){return t=null==t?"":t,n=null==n?"":n,null==e?"":(e=t?e.replace(/^\s+/,""):e,e=n?e.replace(/\s+$/,""):e,t+this.indentText(e)+n)}};const Ja=(e,t)=>t||"";var $a=function(e,t,n){"undefined"==typeof n&&(n=t,t=null),t=t||Ja;const o={index:1};return _e(e.children,n,(e)=>null==e?t(o.index++):Oe(e,o).mark(t))},Ya=Object.assign||function(e){for(var t=1,n;t"},oi=/^id$/i,ri=/^class$/i,ai={primary:(e)=>e.join(""),secondary:(e)=>e.map((e)=>e.isBoolean?e.name:`${e.name}=${e.value}`).join(", ")},ii={open:null,close:null,omitName:/^div$/i,attributes:ai},si=/\n|\r/,li=/\n|\r/,di={none:"[ SECONDARY_ATTRS]",round:"[(SECONDARY_ATTRS)]",curly:"[{SECONDARY_ATTRS}]",square:"[[SECONDARY_ATTRS]"},ci=/\n|\r/,pi={html:function(e,t,n){n=Ya({},n);const o=Je(n);return $a(e,n.field,(e)=>{if(e=qe(e,t),!Be(e)){const n=e.node;if(n.name){const r=t.name(n.name),i=He(e,t);e.open=`<${r}${i}${n.selfClosing?t.selfClose():""}>`,n.selfClosing||(e.close=`${r}>`),Qe(e,o.comment)}!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(n.value))}return e})},haml:function(e,t,n){n=n||{};const o={open:"[%NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)][SELF_CLOSE]",selfClose:"/",attributes:{secondary(e){return e.map((e)=>e.isBoolean?`${e.name}${t.get("compactBooleanAttributes")?"":"=true"}`:`${e.name}=${t.quote(e.value)}`).join(" ")}}};return $a(e,n.field,(e)=>{if(e=$e(e,t,o),e=et(e,t),!Be(e)){const n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(tt(n,t)))}return e})},slim:function(e,t,n){n=n||{};const o=n.attributeWrap&&di[n.attributeWrap]||di.none,r=o===di.none?(e)=>`${e.name}=true`:(e)=>e.name,i={open:`[NAME][PRIMARY_ATTRS]${o}[SELF_CLOSE]`,selfClose:"/",attributes:{secondary(e){return e.map((e)=>e.isBoolean?r(e):`${e.name}=${t.quote(e.value)}`).join(" ")}}};return $a(e,n.field,(e)=>{if(e=$e(e,t,i),e=ot(e,t),!Be(e)){const n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(rt(n,t)))}return e})},pug:function(e,t,n){n=n||{};const o={open:"[NAME][PRIMARY_ATTRS][(SECONDARY_ATTRS)]",attributes:{secondary(e){return e.map((e)=>e.isBoolean?e.name:`${e.name}=${t.quote(e.value)}`).join(", ")}}};return $a(e,n.field,(e)=>{if(e=$e(e,t,o),e=it(e,t),!Be(e)){const n=e.node;!n.value&&(n.children.length||n.selfClosing)||(e.text=e.renderFields(st(n,t)))}return e})}};var ui=function(e,t,n,o){return"object"==typeof n&&(o=n,n=null),lt(n)||(n="html"),pi[n](e,t,o)};let mi=class{constructor(){this.type="css-value",this.value=[]}get size(){return this.value.length}add(e){this.value.push(e)}has(e){return-1!==this.value.indexOf(e)}toString(){return this.value.join(" ")}};const hi=35,gi=46;let fi=class{constructor(e,t){this.type="color",this.raw=e,this.alpha=+(null!=t&&""!==t?t:1),e=e.slice(1);let n=0,o=0,r=0;if("t"===e)this.alpha=0;else switch(e.length){case 0:break;case 1:n=o=r=e+e;break;case 2:n=o=r=e;break;case 3:n=e[0]+e[0],o=e[1]+e[1],r=e[2]+e[2];break;default:e+=e,n=e.slice(0,2),o=e.slice(2,4),r=e.slice(4,6);}this.r=parseInt(n,16),this.g=parseInt(o,16),this.b=parseInt(r,16)}toHex(e){const t=e&&pt(this.r)&&pt(this.g)&&pt(this.b)?ut:mt;return"#"+t(this.r)+t(this.g)+t(this.b)}toRGB(){const e=[this.r,this.g,this.b];return 1!==this.alpha&&e.push(this.alpha.toFixed(8).replace(/\.?0+$/,"")),`${3===e.length?"rgb":"rgba"}(${e.join(", ")})`}toString(e){return this.r||this.g||this.b||this.alpha?1===this.alpha?this.toHex(e):this.toRGB():"transparent"}};const yi=37,bi=46,xi=45;let vi=class{constructor(e,t){this.type="numeric",this.value=+e,this.unit=t||""}toString(){return`${this.value}${this.unit}`}};const ki=36,Si=45,Ci=64;let wi=class{constructor(e){this.type="keyword",this.value=e}toString(){return this.value}};const Ti={throws:!0};let Ei=class{constructor(e){this.type="string",this.value=e}toString(){return this.value}};const Ai=40,Ii=41,Ni=44;let Li=class{constructor(e,t){this.type="function",this.name=e,this.args=t||[]}toString(){return`${this.name}(${this.args.join(", ")})`}};const _i=33,Oi=36,Mi=45,Di=58,Ri=64;var Pi=function(e){const t=new na,n=new gr(e);for(;!n.eof();){let e=new na(Et(n));e.value=At(n);const o=Ct(n);if(o)for(let t=0;tBt(e,o,n)),e},Ki=Object.assign||function(e){for(var t=1,n;tsrc:m+img","ri:t|ri:type":"pic>src:t+img","!!!":"{}",doc:"html[lang=${lang}]>(head>meta[charset=${charset}]+meta:vp+meta:edge+title{${1:Document}})+body","!|html:5":"!!!+doc",c:"{}","cc:ie":"{}","cc:noie":"{${0}}"},css:{"@f":"@font-face {\n\tfont-family: ${1};\n\tsrc: url(${1});\n}","@ff":"@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}","@i|@import":"@import url(${0});","@kf":"@keyframes ${1:identifier} {\n\t${2}\n}","@m|@media":"@media ${1:screen} {\n\t${0}\n}",ac:"align-content:flex-start|flex-end|center|space-between|space-around|stretch",ai:"align-items:flex-start|flex-end|center|baseline|stretch",anim:"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",animdel:"animation-delay:${1:time}",animdir:"animation-direction:normal|reverse|alternate|alternate-reverse",animdur:"animation-duration:${1:0}s",animfm:"animation-fill-mode:both|forwards|backwards",animic:"animation-iteration-count:1|infinite",animn:"animation-name",animps:"animation-play-state:running|paused",animtf:"animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",ap:"appearance:none",as:"align-self:auto|flex-start|flex-end|center|baseline|stretch",b:"bottom",bd:"border:${1:1px} ${2:solid} ${3:#000}",bdb:"border-bottom:${1:1px} ${2:solid} ${3:#000}",bdbc:"border-bottom-color:#${1:000}",bdbi:"border-bottom-image:url(${0})",bdbk:"border-break:close",bdbli:"border-bottom-left-image:url(${0})|continue",bdblrs:"border-bottom-left-radius",bdbri:"border-bottom-right-image:url(${0})|continue",bdbrrs:"border-bottom-right-radius",bdbs:"border-bottom-style",bdbw:"border-bottom-width",bdc:"border-color:#${1:000}",bdci:"border-corner-image:url(${0})|continue",bdcl:"border-collapse:collapse|separate",bdf:"border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",bdi:"border-image:url(${0})",bdl:"border-left:${1:1px} ${2:solid} ${3:#000}",bdlc:"border-left-color:#${1:000}",bdlen:"border-length",bdli:"border-left-image:url(${0})",bdls:"border-left-style",bdlw:"border-left-width",bdr:"border-right:${1:1px} ${2:solid} ${3:#000}",bdrc:"border-right-color:#${1:000}",bdri:"border-right-image:url(${0})",bdrs:"border-radius",bdrst:"border-right-style",bdrw:"border-right-width",bds:"border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",bdsp:"border-spacing",bdt:"border-top:${1:1px} ${2:solid} ${3:#000}",bdtc:"border-top-color:#${1:000}",bdti:"border-top-image:url(${0})",bdtli:"border-top-left-image:url(${0})|continue",bdtlrs:"border-top-left-radius",bdtri:"border-top-right-image:url(${0})|continue",bdtrrs:"border-top-right-radius",bdts:"border-top-style",bdtw:"border-top-width",bdw:"border-width",bfv:"backface-visibility:hidden|visible",bg:"background:#${1:000}",bga:"background-attachment:fixed|scroll",bgbk:"background-break:bounding-box|each-box|continuous",bgc:"background-color:#${1:fff}",bgcp:"background-clip:padding-box|border-box|content-box|no-clip",bgi:"background-image:url(${0})",bgo:"background-origin:padding-box|border-box|content-box",bgp:"background-position:${1:0} ${2:0}",bgpx:"background-position-x",bgpy:"background-position-y",bgr:"background-repeat:no-repeat|repeat-x|repeat-y|space|round",bgsz:"background-size:contain|cover",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} #${5:000}|none",bxsz:"box-sizing:border-box|content-box|border-box",c:"color:#${1:000}",cl:"clear:both|left|right|none",cm:"/* ${0} */",cnt:"content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters({$0})",coi:"counter-increment",colm:"columns",colmc:"column-count",colmf:"column-fill",colmg:"column-gap",colmr:"column-rule",colmrc:"column-rule-color",colmrs:"column-rule-style",colmrw:"column-rule-width",colms:"column-span",colmw:"column-width",cor:"counter-reset",cp:"clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",cps:"caption-side:top|bottom",cur:"cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",d:"display:block|none|flex|inline-flex|inline|inline-block|list-item|run-in|compact|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",ec:"empty-cells:show|hide",f:"font:${1:1em} ${2:sans-serif}",fef:"font-effect:none|engrave|emboss|outline",fem:"font-emphasize",femp:"font-emphasize-position:before|after",fems:"font-emphasize-style:none|accent|dot|circle|disc",ff:"font-family:serif|sans-serif|cursive|fantasy|monospace",fl:"float:left|right|none",fs:"font-style:italic|normal|oblique",fsm:"font-smoothing:antialiased|subpixel-antialiased|none",fst:"font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",fv:"font-variant:normal|small-caps",fw:"font-weight:normal|bold|bolder|lighter",fx:"flex",fxb:"flex-basis:fill|max-content|min-content|fit-content|content",fxd:"flex-direction:row|row-reverse|column|column-reverse",fxf:"flex-flow",fxg:"flex-grow",fxsh:"flex-shrink",fxw:"flex-wrap:nowrap|wrap|wrap-reverse",fz:"font-size",fza:"font-size-adjust",h:"height",jc:"justify-content:flex-start|flex-end|center|space-between|space-around",l:"left",lg:"background-image:linear-gradient(${1})",lh:"line-height",lis:"list-style",lisi:"list-style-image",lisp:"list-style-position:inside|outside",list:"list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",lts:"letter-spacing:normal",m:"margin",mah:"max-height",mar:"max-resolution",maw:"max-width",mb:"margin-bottom",mih:"min-height",mir:"min-resolution",miw:"min-width",ml:"margin-left",mr:"margin-right",mt:"margin-top",ol:"outline",olc:"outline-color:#${1:000}|invert",olo:"outline-offset",ols:"outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",olw:"outline-width|thin|medium|thick",op:"opacity",ord:"order",ori:"orientation:landscape|portrait",orp:"orphans",ov:"overflow:hidden|visible|hidden|scroll|auto",ovs:"overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",ovx:"overflow-x:hidden|visible|hidden|scroll|auto",ovy:"overflow-y:hidden|visible|hidden|scroll|auto",p:"padding",pb:"padding-bottom",pgba:"page-break-after:auto|always|left|right",pgbb:"page-break-before:auto|always|left|right",pgbi:"page-break-inside:auto|avoid",pl:"padding-left",pos:"position:relative|absolute|relative|fixed|static",pr:"padding-right",pt:"padding-top",q:"quotes",qen:"quotes:'\\201C' '\\201D' '\\2018' '\\2019'",qru:"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",r:"right",rsz:"resize:none|both|horizontal|vertical",t:"top",ta:"text-align:left|center|right|justify",tal:"text-align-last:left|center|right",tbl:"table-layout:fixed",td:"text-decoration:none|underline|overline|line-through",te:"text-emphasis:none|accent|dot|circle|disc|before|after",th:"text-height:auto|font-size|text-size|max-size",ti:"text-indent",tj:"text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",to:"text-outline:${1:0} ${2:0} ${3:#000}",tov:"text-overflow:ellipsis|clip",tr:"text-replace",trf:"transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",trfo:"transform-origin",trfs:"transform-style:preserve-3d",trs:"transition:${1:prop} ${2:time}",trsde:"transition-delay:${1:time}",trsdu:"transition-duration:${1:time}",trsp:"transition-property:${1:prop}",trstf:"transition-timing-function:${1:fn}",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",tt:"text-transform:uppercase|lowercase|capitalize|none",tw:"text-wrap:none|normal|unrestricted|suppress",us:"user-select:none",v:"visibility:hidden|visible|collapse",va:"vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",w:"width",whs:"white-space:nowrap|pre|pre-wrap|pre-line|normal",whsc:"white-space-collapse:normal|keep-all|loose|break-strict|break-all",wid:"widows",wm:"writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",wob:"word-break:normal|keep-all|break-all",wos:"word-spacing",wow:"word-wrap:none|unrestricted|suppress|break-word|normal",z:"z-index",zom:"zoom:1"},xsl:{"tm|tmatch":"xsl:template[match mode]","tn|tname":"xsl:template[name]",call:"xsl:call-template[name]",ap:"xsl:apply-templates[select mode]",api:"xsl:apply-imports",imp:"xsl:import[href]",inc:"xsl:include[href]",ch:"xsl:choose","wh|xsl:when":"xsl:when[test]",ot:"xsl:otherwise",if:"xsl:if[test]",par:"xsl:param[name]",pare:"xsl:param[name select]",var:"xsl:variable[name]",vare:"xsl:variable[name select]",wp:"xsl:with-param[name select]",key:"xsl:key[name match use]",elem:"xsl:element[name]",attr:"xsl:attribute[name]",attrs:"xsl:attribute-set[name]",cp:"xsl:copy[select]",co:"xsl:copy-of[select]",val:"xsl:value-of[select]","for|each":"xsl:for-each[select]",tex:"xsl:text",com:"xsl:comment",msg:"xsl:message[terminate=no]",fall:"xsl:fallback",num:"xsl:number[value]",nam:"namespace-alias[stylesheet-prefix result-prefix]",pres:"xsl:preserve-space[elements]",strip:"xsl:strip-space[elements]",proc:"xsl:processing-instruction[name]",sort:"xsl:sort[select order]",choose:"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}","!!!":"{}"}},$i=Object.assign||function(e){for(var t=1,n;tthis._string.set(e,new ts(e,t)));else if(e instanceof RegExp)this._regexp.set(e,new ts(e,t));else throw new Error("Unknow snippet key: "+e);return this}get(e){if(!this.disabled){if(this._string.has(e))return this._string.get(e);const t=Array.from(this._regexp.keys());for(let n=0,o=t.length;nthis.set(t,e)):e&&"object"==typeof e&&Object.keys(e).forEach((t)=>this.set(t,e[t]))}reset(){this._string.clear(),this._regexp.clear()}values(){if(this.disabled)return[];const e=Array.from(this._string.values()),t=Array.from(this._regexp.values());return e.concat(t)}};var os=class{constructor(e){this._registry=[],Array.isArray(e)?e.forEach((e,t)=>this.add(t,e)):"object"==typeof e&&this.add(e)}get(e){for(let t=0;tt.level-e.level),n}remove(e){this._registry=this._registry.filter((t)=>t.level!==e&&t.store!==e)}resolve(e){for(let t=0;t{const o=n.key instanceof RegExp?"regexp":"string";e.type&&e.type!==o||t.has(n.key)||t.set(n.key,n)};return this._registry.forEach((e)=>{e.store.values().forEach(n)}),Array.from(t.values())}clear(){this._registry.length=0}},rs=Object.assign||function(e){for(var t=1,n;tt||"",text:null,profile:null,variables:{},snippets:{},options:null,format:null};var us=Object.assign||function(e){for(var t=1,n;t");var Bs=function(e){const t=e.pos;if(eo(e,Ps,Fs,!0)){const n=Ss(e,t);return n.type="comment",n}return null};const Us=to("");var qs=function(e){const t=e.pos;if(eo(e,Us,Vs,!0)){const n=Ss(e,t);return n.type="cdata",n}return null};const js={xml:!1,special:["script","style"],empty:["img","meta","link","br","base","hr","area","wbr","col","embed","input","param","source","track"]};var Ws=function(e,t){t=vs({},js,t);const n="string"==typeof e?new gr(e):e,o=new ks(n,"root"),r=new Set(t.empty),i=t.special.reduce((e,t)=>e.set(t,to(`${t}>`)),new Map),s=(e,n)=>e.selfClosing||!t.xml&&r.has(n);for(let r=[o],l,d,c;!n.eof();)if(!(l=no(n)))n.next();else if(c=ro(l),"open"===l.type)d=new ks(n,"tag",l),ao(r).addChild(d),i.has(c)?d.close=oo(n,i.get(c)):!s(l,c)&&r.push(d);else if("close"===l.type){for(let e=r.length-1;0`\${${e}${t?":"+t:""}}`;let Ks=class extends gr{constructor(e,t,n){super();const o=e.constructor;this.editor=e,this.start=this.pos=t||o.Pos(0,0);const r=e.lastLine();this._eof=n?n.to:o.Pos(r,this._lineLength(r)),this._sof=n?n.from:o.Pos(0,0)}sof(){return 0>=lo(this.pos,this._sof)}eof(){return 0<=lo(this.pos,this._eof)}limit(e,t){return new this.constructor(this.editor,e,{from:e,to:t})}peek(){const{line:e,ch:t}=this.pos,n=this.editor.getLine(e);return t=this._lineLength(this.pos.line)&&(this.pos.line++,this.pos.ch=0),this.eof()&&(this.pos=zs({},this._eof)),e}return NaN}backUp(e){const t=this.editor.constructor;let{line:n,ch:o}=this.pos;for(o-=e||1;0<=n&&0>o;)n--,o+=this._lineLength(n);return this.pos=0>n||0>o?t.Pos(0,0):t.Pos(n,o),this.peek()}current(){return this.substring(this.start,this.pos)}substring(e,t){return this.editor.getRange(e,t)}error(e){const t=new Error(`${e} at line ${this.pos.line}, column ${this.pos.ch}`);return t.originalMessage=e,t.pos=this.pos,t.string=this.string,t}_lineLength(e){const t=e===this.editor.lastLine();return this.editor.getLine(e).length+(t?0:1)}};const Gs="emmet-abbreviation";let Xs=class{constructor(e,t,n){this.abbreviation=e,this.range=t,this.config=n,this.ast=xn(e,n),this.snippet=bn(this.ast,n),this.preview=ho(this.snippet)}insert(e,t){return Co(e,t||this.range,this.snippet)}valid(e,t){return this.preview&&this.abbreviation!==this.preview&&(t&&"stylesheet"===this.config.type?this._isValidForStylesheet(e):!0)}_isValidForStylesheet(e){const t=this.range.from,n=e.getTokenAt(t);if(/^[#!]/.test(this.abbreviation))return vo(e,t);const o=this.ast.children.every((e)=>e.name),r=n.state&&n.state.localState||n.state;return!o||"sass"===this.config.syntax||r&&r.context&&"block"===r.context.type}},Qs=class{constructor(e,t,n,o,r,i){this.type=e,this.editor=t,this.range=n,this.name=o,this.preview=r,this.snippet=i,this._inserted=!1}insert(){this._inserted||(this._inserted=!0,"function"==typeof this.snippet?this.snippet(this.editor,this.range):Co(this.editor,this.range,this.snippet),Eo(this.editor))}},Js=class{constructor(e,t,n){this.dom=e,this.type=t,this.syntax=n}nodeForPoint(e,t){let n=this.dom.firstChild,o=null;for(;n;)go(yo(n),e,t)?(o=n,n=n.firstChild):n=n.nextSibling;return o}};const $s="emmet-open-tag",Ys="emmet-close-tag";t.a=function(e){zs(e.commands,{emmetExpandAbbreviation:(e)=>No(e,!0),emmetExpandAbbreviationAll:(e)=>No(e,!1),emmetInsertLineBreak:Lo,emmetWrapWithAbbreviation:Do});const t=(e)=>Uo(e,e.getCursor());e.defineOption("markEmmetAbbreviation",!0,(e,n)=>{n?e.on("change",t):(e.off("change",t),Eo(e))}),e.defineOption("autoRenameTags",!0,(e,t)=>{t?e.on("change",ar):e.off("change",ar)}),e.defineOption("jsxBracket",!0),e.defineOption("markTagPairs",!1,(e,t)=>{t?(e.on("cursorActivity",Zo),e.on("change",$o)):(e.off("cursorActivity",Zo),e.off("change",$o),$o(e),tr(e))}),e.defineOption("emmet",{}),e.defineExtension("getEmmetCompletions",function(e,t){const n=this;"boolean"==typeof e&&(t=e,e=null),e=e||n.getCursor();const o=Vo(n,e);if(o&&o.completions.length)return n.getOption("markEmmetAbbreviation")&&!To(n,e)&&t&&(Eo(n),Ao(o.model)),{from:o.abbreviation.range.from,to:o.abbreviation.range.to,list:o.completions}}),e.defineExtension("getEmmetAbbreviation",function(e,t){return wo(this,e||this.getCursor(),t)}),e.defineExtension("findEmmetMarker",function(e){return To(this,e||this.getCursor())}),e.defineExtension("getEmmetDocumentModel",function(){const e=this;return e.getOption("markTagPairs")?Jo(e):Qo(e)})}},"1JcR":function(e,t,n){(function(e){e(n("tQq4"))})(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,o){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=o?Math.max(o.from,e.firstLine()):e.firstLine(),this.max=o?Math.min(o.to-1,e.lastLine()):e.lastLine()}function o(e,t){var n=e.cm.getTokenTypeAt(m(e.line,t));return n&&/\btag\b/.test(n)}function r(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function i(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t)if(r(e))continue;else return;if(!o(e,t+1)){e.ch=t+1;continue}var n=e.text.lastIndexOf("/",t),i=-1",e.ch-1):-1;if(-1==t)if(i(e))continue;else return;if(!o(e,t+1)){e.ch=t;continue}var n=e.text.lastIndexOf("/",t),r=-1p&&(!t||t==o[2]))return{tag:o[2],from:m(r,l),to:m(e.line,e.ch)}}else n.push(o[2])}}function u(e,t){for(var n=[],o;;){if(o=c(e),!o)return;if("selfClose"==o){l(e);continue}var r=e.line,s=e.ch,d=l(e);if(!d)return;if(d[1])n.push(d[2]);else{for(var p=n.length-1;0<=p;--p)if(n[p]==d[2]){n.length=p;break}if(0>p&&(!t||t==d[2]))return{tag:d[2],from:m(e.line,e.ch),to:m(r,s)}}}}var m=e.Pos,h=/<(\/?)([A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD-:.0-9\u00B7\u0300-\u036F\u203F-\u2040]*)/g;e.registerHelper("fold","xml",function(e,o){for(var r=new n(e,o.line,0),i;;){if(i=d(r),!i||r.line!=o.line)return;var l=s(r);if(!l)return;if(!i[1]&&"selfClose"!=l){var c=m(r.line,r.ch),u=p(r,i[2]);return u&&0")||-1!=i.text.indexOf("<")){var d=s(i),c=d&&m(i.line,i.ch),h=d&&l(i);if(d&&h&&!(0c);u++)i=e.getLine(d++),p=null==p?i:p+"\n"+i;l*=2,t.lastIndex=s.ch;var m=t.exec(p);if(m){var g=p.slice(0,m.index).split("\n"),f=m[0].split("\n"),y=s.line+g.length-1,b=g[g.length-1].length;return{from:h(y,b),to:h(y+f.length-1,1==f.length?b+f[0].length:f[f.length-1].length),match:m}}}}function s(e,t){for(var n=0,o;;){t.lastIndex=n;var r=t.exec(e);if(!r)return o;if(o=r,n=o.index+(o[0].length||1),n==e.length)return o}}function l(e,t,o){t=n(t,"g");for(var r=o.line,i=o.ch,l=e.firstLine(),d;r>=l;r--,i=-1){d=e.getLine(r),-1=d;){for(var p=0,i;p>1,l=o(e.slice(0,s)).length;if(l==n)return s;l>n?i=s:r=s+1}}function p(e,t,n,o){if(!t.length)return null;var r=o?g:f,s=r(t).split(/\r|\n\r?/);search:for(var l=n.line,d=n.ch,p=e.lastLine()+1-s.length;l<=p;l++,d=0){var u=e.getLine(l).slice(d),m=r(u);if(1==s.length){var y=m.indexOf(s[0]);if(-1==y)continue search;var n=c(u,m,y,r)+d;return{from:h(l,c(u,m,y,r)+d),to:h(l,c(u,m,y+s[0].length,r)+d)}}var b=m.length-s[0].length;if(m.slice(b)!=s[0])continue search;for(var x=1;x=p;l--,d=-1){u=e.getLine(l),-1=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1));n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(0=e.end.offset&&t.unshift(o.comment);return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var i=r.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t=[],n,o;0=e.start.offset);)n=o.node,this.stack.pop();if(n){for(var r=n.leadingComments?n.leadingComments.length:0,s=r-1,i;0<=s;--s)i=n.leadingComments[s],i.range[1]<=e.start.offset&&(t.unshift(i),n.leadingComments.splice(s,1));return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,t}for(var s=this.leading.length-1,o;0<=s;--s)o=this.leading[s],o.start<=e.start.offset&&(t.unshift(o.comment),this.leading.splice(s,1));return t},e.prototype.visitNode=function(e,t){if(!(e.type===o.Syntax.Program&&0");)t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute(),e.push(t);return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),o=this.matchJSX("/");return o&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(t,o,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new l.JSXClosingElement(t))}var n=this.parseJSXElementName(),o=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new l.JSXOpeningElement(n,r,o))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new l.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new l.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.starte?n(e):n(55296+(e-65536>>10))+n(56320+(1023&e-65536))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||5760<=e&&0<=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||92===e||128<=e&&o.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||65<=e&&90>=e||97<=e&&122>=e||48<=e&&57>=e||92===e||128<=e&&o.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return 48<=e&&57>=e},isHexDigit:function(e){return 48<=e&&57>=e||65<=e&&70>=e||97<=e&&102>=e},isOctalDigit:function(e){return 48<=e&&55>=e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=function(){return function(e){this.type=o.JSXSyntax.JSXClosingElement,this.name=e}}();t.JSXClosingElement=r;var i=function(){return function(e,t,n){this.type=o.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}}();t.JSXElement=i;var s=function(){return function(){this.type=o.JSXSyntax.JSXEmptyExpression}}();t.JSXEmptyExpression=s;var l=function(){return function(e){this.type=o.JSXSyntax.JSXExpressionContainer,this.expression=e}}();t.JSXExpressionContainer=l;var d=function(){return function(e){this.type=o.JSXSyntax.JSXIdentifier,this.name=e}}();t.JSXIdentifier=d;var c=function(){return function(e,t){this.type=o.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}}();t.JSXMemberExpression=c;var p=function(){return function(e,t){this.type=o.JSXSyntax.JSXAttribute,this.name=e,this.value=t}}();t.JSXAttribute=p;var u=function(){return function(e,t){this.type=o.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}}();t.JSXNamespacedName=u;var m=function(){return function(e,t,n){this.type=o.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}}();t.JSXOpeningElement=m;var h=function(){return function(e){this.type=o.JSXSyntax.JSXSpreadAttribute,this.argument=e}}();t.JSXSpreadAttribute=h;var g=function(){return function(e,t){this.type=o.JSXSyntax.JSXText,this.value=e,this.raw=t}}();t.JSXText=g},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=function(){return function(e){this.type=o.Syntax.ArrayExpression,this.elements=e}}();t.ArrayExpression=r;var i=function(){return function(e){this.type=o.Syntax.ArrayPattern,this.elements=e}}();t.ArrayPattern=i;var s=function(){return function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1}}();t.ArrowFunctionExpression=s;var l=function(){return function(e,t,n){this.type=o.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}}();t.AssignmentExpression=l;var d=function(){return function(e,t){this.type=o.Syntax.AssignmentPattern,this.left=e,this.right=t}}();t.AssignmentPattern=d;var c=function(){return function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0}}();t.AsyncArrowFunctionExpression=c;var p=function(){return function(e,t,n){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionDeclaration=p;var u=function(){return function(e,t,n){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0}}();t.AsyncFunctionExpression=u;var m=function(){return function(e){this.type=o.Syntax.AwaitExpression,this.argument=e}}();t.AwaitExpression=m;var h=function(){return function(e,t,n){this.type="||"===e||"&&"===e?o.Syntax.LogicalExpression:o.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}}();t.BinaryExpression=h;var g=function(){return function(e){this.type=o.Syntax.BlockStatement,this.body=e}}();t.BlockStatement=g;var f=function(){return function(e){this.type=o.Syntax.BreakStatement,this.label=e}}();t.BreakStatement=f;var y=function(){return function(e,t){this.type=o.Syntax.CallExpression,this.callee=e,this.arguments=t}}();t.CallExpression=y;var b=function(){return function(e,t){this.type=o.Syntax.CatchClause,this.param=e,this.body=t}}();t.CatchClause=b;var x=function(){return function(e){this.type=o.Syntax.ClassBody,this.body=e}}();t.ClassBody=x;var v=function(){return function(e,t,n){this.type=o.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}}();t.ClassDeclaration=v;var k=function(){return function(e,t,n){this.type=o.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}}();t.ClassExpression=k;var S=function(){return function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}}();t.ComputedMemberExpression=S;var C=function(){return function(e,t,n){this.type=o.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n}}();t.ConditionalExpression=C;var w=function(){return function(e){this.type=o.Syntax.ContinueStatement,this.label=e}}();t.ContinueStatement=w;var T=function(){return function(){this.type=o.Syntax.DebuggerStatement}}();t.DebuggerStatement=T;var E=function(){return function(e,t){this.type=o.Syntax.ExpressionStatement,this.expression=e,this.directive=t}}();t.Directive=E;var A=function(){return function(e,t){this.type=o.Syntax.DoWhileStatement,this.body=e,this.test=t}}();t.DoWhileStatement=A;var I=function(){return function(){this.type=o.Syntax.EmptyStatement}}();t.EmptyStatement=I;var N=function(){return function(e){this.type=o.Syntax.ExportAllDeclaration,this.source=e}}();t.ExportAllDeclaration=N;var L=function(){return function(e){this.type=o.Syntax.ExportDefaultDeclaration,this.declaration=e}}();t.ExportDefaultDeclaration=L;var _=function(){return function(e,t,n){this.type=o.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}}();t.ExportNamedDeclaration=_;var O=function(){return function(e,t){this.type=o.Syntax.ExportSpecifier,this.exported=t,this.local=e}}();t.ExportSpecifier=O;var M=function(){return function(e){this.type=o.Syntax.ExpressionStatement,this.expression=e}}();t.ExpressionStatement=M;var D=function(){return function(e,t,n){this.type=o.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}}();t.ForInStatement=D;var R=function(){return function(e,t,n){this.type=o.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}}();t.ForOfStatement=R;var P=function(){return function(e,t,n,r){this.type=o.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r}}();t.ForStatement=P;var F=function(){return function(e,t,n,r){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1}}();t.FunctionDeclaration=F;var B=function(){return function(e,t,n,r){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1}}();t.FunctionExpression=B;var U=function(){return function(e){this.type=o.Syntax.Identifier,this.name=e}}();t.Identifier=U;var V=function(){return function(e,t,n){this.type=o.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}}();t.IfStatement=V;var q=function(){return function(e,t){this.type=o.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}}();t.ImportDeclaration=q;var j=function(){return function(e){this.type=o.Syntax.ImportDefaultSpecifier,this.local=e}}();t.ImportDefaultSpecifier=j;var W=function(){return function(e){this.type=o.Syntax.ImportNamespaceSpecifier,this.local=e}}();t.ImportNamespaceSpecifier=W;var z=function(){return function(e,t){this.type=o.Syntax.ImportSpecifier,this.local=e,this.imported=t}}();t.ImportSpecifier=z;var H=function(){return function(e,t){this.type=o.Syntax.LabeledStatement,this.label=e,this.body=t}}();t.LabeledStatement=H;var K=function(){return function(e,t){this.type=o.Syntax.Literal,this.value=e,this.raw=t}}();t.Literal=K;var G=function(){return function(e,t){this.type=o.Syntax.MetaProperty,this.meta=e,this.property=t}}();t.MetaProperty=G;var X=function(){return function(e,t,n,r,i){this.type=o.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this.static=i}}();t.MethodDefinition=X;var Q=function(){return function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="module"}}();t.Module=Q;var J=function(){return function(e,t){this.type=o.Syntax.NewExpression,this.callee=e,this.arguments=t}}();t.NewExpression=J;var $=function(){return function(e){this.type=o.Syntax.ObjectExpression,this.properties=e}}();t.ObjectExpression=$;var Y=function(){return function(e){this.type=o.Syntax.ObjectPattern,this.properties=e}}();t.ObjectPattern=Y;var Z=function(){return function(e,t,n,r,i,s){this.type=o.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=i,this.shorthand=s}}();t.Property=Z;var ee=function(){return function(e,t,n,r){this.type=o.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}}}();t.RegexLiteral=ee;var te=function(){return function(e){this.type=o.Syntax.RestElement,this.argument=e}}();t.RestElement=te;var ne=function(){return function(e){this.type=o.Syntax.ReturnStatement,this.argument=e}}();t.ReturnStatement=ne;var oe=function(){return function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="script"}}();t.Script=oe;var re=function(){return function(e){this.type=o.Syntax.SequenceExpression,this.expressions=e}}();t.SequenceExpression=re;var ae=function(){return function(e){this.type=o.Syntax.SpreadElement,this.argument=e}}();t.SpreadElement=ae;var ie=function(){return function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}}();t.StaticMemberExpression=ie;var se=function(){return function(){this.type=o.Syntax.Super}}();t.Super=se;var le=function(){return function(e,t){this.type=o.Syntax.SwitchCase,this.test=e,this.consequent=t}}();t.SwitchCase=le;var de=function(){return function(e,t){this.type=o.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}}();t.SwitchStatement=de;var ce=function(){return function(e,t){this.type=o.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}}();t.TaggedTemplateExpression=ce;var pe=function(){return function(e,t){this.type=o.Syntax.TemplateElement,this.value=e,this.tail=t}}();t.TemplateElement=pe;var ue=function(){return function(e,t){this.type=o.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}}();t.TemplateLiteral=ue;var me=function(){return function(){this.type=o.Syntax.ThisExpression}}();t.ThisExpression=me;var he=function(){return function(e){this.type=o.Syntax.ThrowStatement,this.argument=e}}();t.ThrowStatement=he;var ge=function(){return function(e,t,n){this.type=o.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}}();t.TryStatement=ge;var fe=function(){return function(e,t){this.type=o.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}();t.UnaryExpression=fe;var ye=function(){return function(e,t,n){this.type=o.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}}();t.UpdateExpression=ye;var be=function(){return function(e,t){this.type=o.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}}();t.VariableDeclaration=be;var xe=function(){return function(e,t){this.type=o.Syntax.VariableDeclarator,this.id=e,this.init=t}}();t.VariableDeclarator=xe;var ve=function(){return function(e,t){this.type=o.Syntax.WhileStatement,this.test=e,this.body=t}}();t.WhileStatement=ve;var ke=function(){return function(e,t){this.type=o.Syntax.WithStatement,this.object=e,this.body=t}}();t.WithStatement=ke;var Se=function(){return function(e,t){this.type=o.Syntax.YieldExpression,this.argument=e,this.delegate=t}}();t.YieldExpression=Se},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),r=n(10),s=n(11),l=n(7),i=n(12),d=n(2),c=n(13),p="ArrowParameterPlaceHolder",u=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=t.source+""),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=o,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=o||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():!this.hasLineTerminator&&(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e=this.createNode(),t,n,o;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new l.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(n.value,o));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.Literal("true"===n.value,o));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.Literal(null,o));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),o=this.getTokenRaw(n),t=this.finalize(e,new l.RegexLiteral(n.regex,o,n.pattern,n.flags));break;default:t=this.throwUnexpectedToken(this.nextToken());}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(e,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(e,new l.ThisExpression)):this.matchKeyword("class")?t=this.parseClassExpression():t=this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken());}return t},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var o=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,o},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var n=this.parseFormalParameters(),o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,n.params,o,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var o=this.parseFormalParameters(),r=this.parsePropertyMethod(o);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new l.AsyncFunctionExpression(null,o.params,r))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n;switch(t.type){case 8:case 6:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,s.Messages.StrictOctalLiteral);var o=this.getTokenRaw(t);n=this.finalize(e,new l.Literal(t.value,o));break;case 3:case 1:case 5:case 4:n=this.finalize(e,new l.Identifier(t.value));break;case 7:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(t);break;default:n=this.throwUnexpectedToken(t);}return n},e.prototype.isPropertyKey=function(e,t){return e.type===d.Syntax.Identifier&&e.name===t||e.type===d.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t=this.createNode(),n=this.lookahead,o=null,r=null,i=!1,d=!1,c=!1,p=!1,u;if(3===n.type){var m=n.value;this.nextToken(),i=this.match("["),p=!this.hasLineTerminator&&"async"===m&&!this.match(":")&&!this.match("(")&&!this.match("*"),o=p?this.parseObjectPropertyKey():this.finalize(t,new l.Identifier(m))}else this.match("*")?this.nextToken():(i=this.match("["),o=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(3===n.type&&!p&&"get"===n.value&&h)u="get",i=this.match("["),o=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(3===n.type&&!p&&"set"===n.value&&h)u="set",i=this.match("["),o=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(7===n.type&&"*"===n.value&&h)u="init",i=this.match("["),o=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(),d=!0;else if(o||this.throwUnexpectedToken(this.lookahead),u="init",this.match(":")&&!p)!i&&this.isPropertyKey(o,"__proto__")&&(e.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=p?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),d=!0;else if(3===n.type){var m=this.finalize(t,new l.Identifier(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(t,new l.AssignmentPattern(m,g))}else c=!0,r=m}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new l.Property(u,o,i,r,d,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){o.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,o=t.cooked;return this.finalize(e,new l.TemplateElement({raw:n,cooked:o},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],o=this.parseTemplateHead();for(n.push(o);!o.tail;)t.push(this.parseExpression()),o=this.parseTemplateElement(),n.push(o);return this.finalize(e,new l.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case d.Syntax.Identifier:case d.Syntax.MemberExpression:case d.Syntax.RestElement:case d.Syntax.AssignmentPattern:break;case d.Syntax.SpreadElement:e.type=d.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case d.Syntax.ArrayExpression:e.type=d.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:p,params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:p,params:[e],async:!1};else{var o=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&!!this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s")&&(e.type===d.Syntax.Identifier&&"yield"===e.name&&(o=!0,e={type:p,params:[e],async:!1}),!o)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===d.Syntax.SequenceExpression)for(var s=0;s")){for(var c=0;c=o);){for(;2")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,u=this.context.allowStrictDirective;this.context.allowStrictDirective=i.simple;var m=this.context.allowYield,h=this.context.await;this.context.allowYield=!0,this.context.await=r;var g=this.startNode(t);this.expect("=>");var f;if(this.match("{")){var y=this.context.allowIn;this.context.allowIn=!0,f=this.parseFunctionSourceElements(),this.context.allowIn=y}else f=this.isolateCoverGrammar(this.parseAssignmentExpression);var b=f.type!==d.Syntax.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=r?this.finalize(g,new l.AsyncArrowFunctionExpression(i.params,f,b)):this.finalize(g,new l.ArrowFunctionExpression(i.params,f,b)),this.context.strict=c,this.context.allowStrictDirective=u,this.context.allowYield=m,this.context.await=h}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===d.Syntax.Identifier){var x=e;this.scanner.isRestrictedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(x.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var v=n.value,k=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(v,e,k)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){for(var n=[t];2!==this.lookahead.type&&!!this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new l.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement();}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new l.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),o=this.parsePattern([],e);this.context.strict&&o.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(o.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===e?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&o.type!==d.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new l.VariableDeclarator(o,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;o.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new l.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var o=this.parsePattern(e,t);return this.finalize(n,new l.RestElement(o))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var o=[];!this.match("]");)if(this.match(","))this.nextToken(),o.push(null);else{if(this.match("...")){o.push(this.parseBindingRestElement(e,t));break}else o.push(this.parsePatternWithDefault(e,t));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new l.ArrayPattern(o))},e.prototype.parsePropertyPattern=function(e,t){var n=this.createNode(),o=!1,r=!1,i,s;if(3===this.lookahead.type){var d=this.lookahead;i=this.parseVariableIdentifier();var c=this.finalize(n,new l.Identifier(d.value));if(this.match("=")){e.push(d),r=!0,this.nextToken();var p=this.parseAssignmentExpression();s=this.finalize(this.startNode(d),new l.AssignmentPattern(c,p))}else this.match(":")?(this.expect(":"),s=this.parsePatternWithDefault(e,t)):(e.push(d),r=!0,s=c)}else o=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),s=this.parsePatternWithDefault(e,t);return this.finalize(n,new l.Property("init",i,o,s,!1,r))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),o=[];for(this.expect("{");!this.match("}");)o.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new l.ObjectPattern(o))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(this.matchKeyword("let")&&("const"===t||"let"===t)&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,o=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,o=this.finalize(this.startNode(n),new l.AssignmentPattern(o,i))}return o},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):!this.context.allowYield&&this.throwUnexpectedToken(n):3===n.type?(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n):this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n),this.finalize(t,new l.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===d.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var o=null;return this.match("=")?(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type!==d.Syntax.Identifier&&!e.inFor&&this.expect("="),this.finalize(t,new l.VariableDeclarator(n,o))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new l.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new l.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e=this.createNode(),t=null,n;this.expectKeyword("if"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),n=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),t=this.parseIfClause())),this.finalize(e,new l.IfStatement(o,n,t))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new l.DoWhileStatement(n,o))},e.prototype.parseWhileStatement=function(){var e=this.createNode(),t;this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var o=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=o}return this.finalize(e,new l.WhileStatement(n,t))},e.prototype.parseForStatement=function(){var e=null,t=null,n=null,o=!0,r=this.createNode(),i,c;if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){e=this.createNode(),this.nextToken();var p=this.context.allowIn;this.context.allowIn=!1;var u=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=p,1===u.length&&this.matchKeyword("in")){var m=u[0];m.init&&(m.id.type===d.Syntax.ArrayPattern||m.id.type===d.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,c=this.parseExpression(),e=null}else 1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.nextToken(),i=e,c=this.parseAssignmentExpression(),e=null,o=!1):(e=this.finalize(e,new l.VariableDeclaration(u,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();var h=this.nextToken().value;if(!this.context.strict&&"in"===this.lookahead.value)e=this.finalize(e,new l.Identifier(h)),this.nextToken(),i=e,c=this.parseExpression(),e=null;else{var p=this.context.allowIn;this.context.allowIn=!1;var u=this.parseBindingList(h,{inFor:!0});this.context.allowIn=p,1===u.length&&null===u[0].init&&this.matchKeyword("in")?(e=this.finalize(e,new l.VariableDeclaration(u,h)),this.nextToken(),i=e,c=this.parseExpression(),e=null):1===u.length&&null===u[0].init&&this.matchContextualKeyword("of")?(e=this.finalize(e,new l.VariableDeclaration(u,h)),this.nextToken(),i=e,c=this.parseAssignmentExpression(),e=null,o=!1):(this.consumeSemicolon(),e=this.finalize(e,new l.VariableDeclaration(u,h)))}}else{var g=this.lookahead,p=this.context.allowIn;if(this.context.allowIn=!1,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=p,this.matchKeyword("in"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,c=this.parseExpression(),e=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&e.type!==d.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(e),i=e,c=this.parseAssignmentExpression(),e=null,o=!1;else{if(this.match(",")){for(var f=[e];this.match(",");)this.nextToken(),f.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(g),new l.SequenceExpression(f))}this.expect(";")}}"undefined"==typeof i&&(!this.match(";")&&(t=this.parseExpression()),this.expect(";"),!this.match(")")&&(n=this.parseExpression()));var y;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),y=this.finalize(this.createNode(),new l.EmptyStatement);else{this.expect(")");var b=this.context.inIteration;this.context.inIteration=!0,y=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=b}return"undefined"==typeof i?this.finalize(r,new l.ForStatement(e,t,n,y)):o?this.finalize(r,new l.ForInStatement(i,c,y)):this.finalize(r,new l.ForOfStatement(i,c,y))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(e,new l.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(s.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(e,new l.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type,n=t?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new l.ReturnStatement(n))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var e=this.createNode(),t;this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new l.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new l.WithStatement(n,t))},e.prototype.parseSwitchCase=function(){var e=this.createNode(),t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(e,new l.SwitchCase(t,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var o=[],r=!1;for(this.expect("{");!this.match("}");){var i=this.parseSwitchCase();null===i.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),o.push(i)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new l.SwitchStatement(t,o))},e.prototype.parseLabelledStatement=function(){var e=this.createNode(),t=this.parseExpression(),n;if(t.type===d.Syntax.Identifier&&this.match(":")){this.nextToken();var o=t,r="$"+o.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",o.name),this.context.labelSet[r]=!0;var i;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),i=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,p=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,s.Messages.StrictFunction):p.generator&&this.tolerateUnexpectedToken(c,s.Messages.GeneratorInLegacyContext),i=p}else i=this.parseStatement();delete this.context.labelSet[r],n=new l.LabeledStatement(o,i)}else this.consumeSemicolon(),n=new l.ExpressionStatement(t);return this.finalize(e,n)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new l.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),o={},r=0,i;r=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=d.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t=[],n,o;for(this.trackComment&&(t=[],n=this.index-e,o={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(++this.index,l.Character.isLineTerminator(r)){if(this.trackComment){o.end={line:this.lineNumber,column:this.index-this.lineStart-1};var i={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:o};t.push(i)}return 13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){o.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:o};t.push(i)}return t},e.prototype.skipMultiLineComment=function(){var e=[],t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(l.Character.isLineTerminator(o))13===o&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===o){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var r={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(r)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var r={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(r)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index,n;!this.eof();)if(n=this.source.charCodeAt(this.index),l.Character.isWhiteSpace(n))++this.index;else if(l.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n){if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var o=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(o)),t=!0}else if(42===n){this.index+=2;var o=this.skipMultiLineComment();this.trackComment&&(e=e.concat(o))}else break;}else if(t&&45===n){if(45===this.source.charCodeAt(this.index+1)&&62===this.source.charCodeAt(this.index+2)){this.index+=3;var o=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(o))}else break;}else if(60!==n)break;else if("!--"===this.source.slice(this.index+1,this.index+4)){this.index+=4;var o=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(o))}else break;return e},e.prototype.isFutureReservedWord=function(e){return"enum"===e||"export"===e||"import"===e||"super"===e},e.prototype.isStrictModeReservedWord=function(e){return"implements"===e||"interface"===e||"package"===e||"private"===e||"protected"===e||"public"===e||"static"===e||"yield"===e||"let"===e},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1;}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(55296<=t&&56319>=t){var n=this.source.charCodeAt(e+1);if(56320<=n&&57343>=n){var o=t;t=1024*(o-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,o=0,s=0;st)return this.index=e,this.getComplexIdentifier();if(l.Character.isIdentifierPart(t))++this.index;else break}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=l.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierStart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),!!l.Character.isIdentifierPart(e));)n=l.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),(null===n||"\\"===n||!l.Character.isIdentifierPart(n.charCodeAt(0)))&&this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),0<="0123".indexOf(e)&&!this.eof()&&l.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e=this.index,t=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier(),n;if(n=1===t.length?3:this.isKeyword(t)?4:"null"===t?5:"true"===t||"false"===t?1:3,3!==n&&e+t.length!==this.index){var o=this.index;this.index=e,this.tolerateUnexpectedToken(d.Messages.InvalidEscapedReservedWord),this.index=o}return{type:n,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];return"("===t||"{"===t?("{"===t&&this.curlyStack.push("{"),++this.index):"."===t?(++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...")):"}"===t?(++this.index,this.curlyStack.pop()):")"===t||";"===t||","===t||"["===t||"]"===t||":"===t||"?"===t||"~"===t?++this.index:(t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],0<="<>=!+-*%&|^/".indexOf(t)&&++this.index)))),this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&!!l.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),l.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t="",n;!this.eof()&&(n=this.source[this.index],"0"===n||"1"===n);)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),this.eof()||(n=this.source.charCodeAt(this.index),(l.Character.isIdentifierStart(n)||l.Character.isDecimalDigit(n))&&this.throwUnexpectedToken()),{type:6,value:parseInt(t,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",o=!1;for(l.Character.isOctalDigit(e.charCodeAt(0))?(o=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&!!l.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return o||0!==n.length||this.throwUnexpectedToken(),(l.Character.isIdentifierStart(this.source.charCodeAt(this.index))||l.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1,t;e=s?n(s):o}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,o));try{RegExp(r)}catch(t){this.throwUnexpectedToken(d.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,o=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],l.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t+=e;else if(l.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(d.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else if("/"===e){o=!0;break}else"["===e&&(n=!0);return o||this.throwUnexpectedToken(d.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="",t="",n;!this.eof()&&(n=this.source[this.index],!!l.Character.isIdentifierPart(n.charCodeAt(0)));)if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var o=this.index,r=this.scanHexEscape("u");if(null!==r)for(t+=r,e+="\\u";oe&&l.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:"\"",amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),r=n(12),i=n(13),s=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return 0<=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var o=this.values[this.curly-4];t=!!o&&!this.beforeFunctionExpression(o)}else if("function"===this.values[this.curly-4]){var o=this.values[this.curly-5];t=!o||!this.beforeFunctionExpression(o)}break;default:}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),l=function(){function e(e,t){this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new s}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var n=0;n=m&&l()},200)}),t.on(i,"focus",function(){++m})}),t.defineExtension("openNotification",function(o,r){function i(){l||(l=!0,clearTimeout(c),t.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}n(this,i);var s=e(this,o,r&&r.bottom),l=!1,d=r&&"undefined"!=typeof r.duration?r.duration:5e3,c;return t.on(s,"click",function(n){t.e_preventDefault(n),i()}),d&&(c=setTimeout(i,d)),i})})},"58xA":function(e,t,n){"use strict";function o(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t;}for(var n in t)t.hasOwnProperty(n)&&(e[n]=o(e[n],t[n]));return e}function r(e){return JSON.parse(e)}function i(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,o=t,r;n 4. Need to update it?");}var r=e+" failed: ";return r+=o+" argument ",r}var d=String.fromCharCode;Object.defineProperty(t,"__esModule",{value:!0});var c=n("vCxL"),p={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},u=function(e,t){if(!e)throw m(t)},m=function(e){return new Error("Firebase Database ("+p.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},h=function(e){for(var t=[],n=0,o=0,r;or?t[n++]=r:2048>r?(t[n++]=192|r>>6,t[n++]=128|63&r):55296==(64512&r)&&o+1>18,t[n++]=128|63&r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r):(t[n++]=224|r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r);return t},g=function(e){for(var t=[],n=0,o=0,r;nr)t[o++]=d(r);else if(191r){var i=e[n++];t[o++]=d((31&r)<<6|63&i)}else if(239r){var i=e[n++],s=e[n++],l=e[n++],c=((7&r)<<18|(63&i)<<12|(63&s)<<6|63&l)-65536;t[o++]=d(55296+(c>>10)),t[o++]=d(56320+(1023&c))}else{var i=e[n++],s=e[n++];t[o++]=d((15&r)<<12|(63&i)<<6|63&s)}return t.join("")},f={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,o=[],r=0;r>6,u=63&c;d||(u=64,!s&&(p=64)),o.push(n[i>>2],n[(3&i)<<4|l>>4],n[p],n[u])}return o.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(h(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):g(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,o=[],r=0;r>4),64!=c){if(o.push(240&l<<4|c>>2),64!=u){o.push(192&c<<6|u)}}}return o},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},y=function(e){try{return f.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null},b=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e.prototype.wrapCallback=function(e){var t=this;return function(n,o){n?t.reject(n):t.resolve(o),"function"==typeof e&&(t.promise.catch(function(){}),1===e.length?e(n):e(n,o))}},e}(),x=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},v="FirebaseError",k=Error.captureStackTrace,S=function(){return function(e,t){if(this.code=e,this.message=t,k)k(this,C.prototype.create);else try{throw Error.apply(this,arguments)}catch(e){this.name=v,Object.defineProperty(this,"stack",{get:function(){return e.stack}})}}}();S.prototype=Object.create(Error.prototype),S.prototype.constructor=S,S.prototype.name=v;var C=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return e.prototype.create=function(e,t){void 0===t&&(t={});var n=this.errors[e],o=this.service+"/"+e,r;r=void 0===n?"Error":n.replace(this.pattern,function(e,n){var o=t[n];return void 0===o?"<"+n+"?>":o.toString()}),r=this.serviceName+": "+r+" ("+o+").";var i=new S(o,r);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),w=function(e){var t={},n={},o={},i="";try{var s=e.split(".");t=r(y(s[0])||""),n=r(y(s[1])||""),i=s[2],o=n.d||{},delete n.d}catch(t){}return{header:t,claims:n,data:o,signature:i}},T=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},E=function(e,t){return T(t,function(t,n){e[t]=n}),e},A=function(e,t,n){for(var o in e)if(t.call(n,e[o],o,e))return o},I=function(){return function(){this.blockSize=-1}}(),N=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;ns;s++)r[s]=n.charCodeAt(o)<<24|n.charCodeAt(o+1)<<16|n.charCodeAt(o+2)<<8|n.charCodeAt(o+3),o+=4;else for(var s=0;16>s;s++)r[s]=n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3],o+=4;for(var s=16,i;80>s;s++)i=r[s-3]^r[s-8]^r[s-14]^r[s-16],r[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+r[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var o=t-this.blockSize,r=0,n=this.buf_,i=this.inbuf_;rthis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var o=this.blockSize-1;56<=o;o--)this.buf_[o]=255&t,t/=256;this.compress_(this.buf_);for(var r=0,o=0;5>o;o++)for(var n=24;0<=n;n-=8)e[r]=255&this.chain_[o]>>n,++r;return e},t}(I),L=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(t){n.error(t)})}return e.prototype.next=function(e){this.forEachObserver(function(t){t.next(e)})},e.prototype.error=function(e){this.forEachObserver(function(t){t.error(e)}),this.close(e)},e.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},e.prototype.subscribe=function(e,t,n){var o=this,r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=i(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=s),void 0===r.error&&(r.error=s),void 0===r.complete&&(r.complete=s);var l=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{o.finalError?r.error(o.finalError):r.complete()}catch(t){}}),this.observers.push(r),l},e.prototype.unsubscribeOne=function(e){void 0===this.observers||void 0===this.observers[e]||(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t=o&&n<=r},t.clone=function(e){return E({},e)},t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0},t.extend=E,t.findKey=A,t.findValue=function(e,t,n){var o=A(e,t,n);return o&&e[o]},t.forEach=T,t.getAnyKey=function(e){for(var t in e)return t},t.getCount=function(e){var t=0;for(var n in e)t++;return t},t.getValues=function(e){var t=[],n=0;for(var o in e)t[n++]=e[o];return t},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.isNonNullObject=function(e){return"object"==typeof e&&null!==e},t.map=function(e,t,n){var o={};for(var r in e)o[r]=t.call(n,e[r],r,e);return o},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.querystring=function(e){var t=[];return T(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={},n=e.replace(/^\?/,"").split("&");return n.forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t},t.Sha1=N,t.async=function(e,t){return function(){for(var n=[],o=0;on&&(r=0===n?"none":"no more than "+n),r){var i=e+" failed: Was called with "+o+(1===o?" argument.":" arguments.")+" Expects "+r+".";throw new Error(i)}},t.validateCallback=function(e,t,n,o){if((!o||n)&&"function"!=typeof n)throw new Error(l(e,t,o)+"must be a valid function.")},t.validateContextObject=function(e,t,n,o){if((!o||n)&&("object"!=typeof n||null===n))throw new Error(l(e,t,o)+"must be a valid context object.")},t.validateNamespace=function(e,t,n,o){if((!o||n)&&"string"!=typeof n)throw new Error(l(e,t,o)+"must be a valid firebase namespace.")},t.stringLength=function(e){for(var t=0,n=0,o;no?t++:2048>o?t+=2:55296<=o&&56319>=o?(t+=4,n++):t+=3;return t},t.stringToByteArray=function(e){for(var t=[],n=0,o=0,r;o=r){var i=r-55296;o++,u(or?t[n++]=r:2048>r?(t[n++]=192|r>>6,t[n++]=128|63&r):65536>r?(t[n++]=224|r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r):(t[n++]=240|r>>18,t[n++]=128|63&r>>12,t[n++]=128|63&r>>6,t[n++]=128|63&r)}return t}},"5gBI":function(e,t,n){(function(e){e(n("tQq4"))})(function(e){"use strict";function t(t,n){var o=t.getLine(n),r=o.search(/\S/);return-1==r||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(n,r+1)))?-1:e.countColumn(o,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",function(n,o){var r=t(n,o.line);if(!(0>r)){for(var s=null,l=o.line+1,i=n.lastLine(),d;l<=i;++l)if(d=t(n,l),-1==d);else if(d>r)s=l;else break;if(s)return{from:e.Pos(o.line,n.getLine(o.line).length),to:e.Pos(s,n.getLine(s).length)}}})})},"6r0S":function(e,t,n){(function(e){e(n("tQq4"))})(function(e){function t(t,n){for(var o=0,r=t.length;oi.ch&&(d.end=i.ch,d.string=d.string.slice(0,i.ch-d.start)):d={start:i.ch,end:i.ch,string:"",state:d.state,type:"."==d.string?"property":null};for(var p=d;"property"==p.type;){if(p=o(t,l(i.line,p.start)),"."!=p.string)return;if(p=o(t,l(i.line,p.start)),!u)var u=[];u.push(p)}return{list:s(d,u,n,r),from:l(i.line,d.start),to:l(i.line,d.end)}}}}function r(e,t){var n=e.getTokenAt(t);return t.ch==n.start+1&&"."==n.string.charAt(0)?(n.end=n.start,n.string=".",n.type="property"):/^\.[\w$_]*$/.test(n.string)&&(n.type="property",n.start++,n.string=n.string.replace(/\./,"")),n}function i(e,t){if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)for(var n in e)t(n);else for(var r=e;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(t)}function s(e,o,r,s){function l(e){0!=e.lastIndexOf(h,0)||n(m,e)||m.push(e)}function u(e){"string"==typeof e?t(d,l):e instanceof Array?t(c,l):e instanceof Function&&t(p,l),i(e,l)}var m=[],h=e.string,g=s&&s.globalScope||window;if(o&&o.length){var f=o.pop(),y;for(f.type&&0===f.type.indexOf("variable")?(s&&s.additionalContext&&(y=s.additionalContext[f.string]),(!s||!1!==s.useGlobalScope)&&(y=y||g[f.string])):"string"==f.type?y="":"atom"==f.type?y=1:"function"==f.type&&(null!=g.jQuery&&("$"==f.string||"jQuery"==f.string)&&"function"==typeof g.jQuery?y=g.jQuery():null!=g._&&"_"==f.string&&"function"==typeof g._&&(y=g._()));null!=y&&o.length;)y=y[o.pop().string];null!=y&&u(y)}else{for(var b=e.state.localVars;b;b=b.next)l(b.name);for(var b=e.state.globalVars;b;b=b.next)l(b.name);s&&!1===s.useGlobalScope||u(g),t(r,l)}return m}var l=e.Pos;e.registerHelper("hint","javascript",function(e,t){return o(e,u,function(t,e){return t.getTokenAt(e)},t)}),e.registerHelper("hint","coffeescript",function(e,t){return o(e,m,r,t)});var d=["charAt","charCodeAt","indexOf","lastIndexOf","substring","substr","slice","trim","trimLeft","trimRight","toUpperCase","toLowerCase","split","concat","match","replace","search"],c=["length","concat","join","splice","push","pop","shift","unshift","slice","reverse","sort","indexOf","lastIndexOf","every","some","filter","forEach","map","reduce","reduceRight",""],p=["prototype","apply","call","bind"],u=["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","function","if","in","import","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield"],m=["and","break","catch","class","continue","delete","do","else","extends","false","finally","for","if","in","instanceof","isnt","new","no","not","null","of","off","on","or","return","switch","then","throw","true","try","typeof","until","void","while","with","yes"]})},"7vHL":function(e,t,n){"use strict";var o=n("eA7g"),r=n.n(o)},AIXc:function(e,t,n){(function(e){e(n("tQq4"),n("HeB0"),n("qqFR"),n("ggoL"))})(function(e){"use strict";function t(e,t,n){var o=e.current(),r=o.search(t);return-1","i")}function s(e,t){for(var n in e)for(var o=t[n]||(t[n]=[]),r=e[n],s=r.length-1;0<=s;s--)o.unshift(r[s])}function i(e,t){for(var n=0,r;n\s\/]/.test(o.current())&&(m=s.htmlState.tagName&&s.htmlState.tagName.toLowerCase())&&p.hasOwnProperty(m))s.inTag=m+" ";else if(s.inTag&&u&&/>$/.test(o.current())){var h=/^([\S]+) (.*)/.exec(s.inTag);s.inTag=null;var g=">"==o.current()&&i(p[h[1]],h[2]),f=e.getMode(n,g),y=r(h[1],!0),b=r(h[1],!1);s.token=function(e,n){return e.match(y,!1)?(n.token=d,n.localState=n.localMode=null,null):t(e,b,n.localMode.token(e,n.localState))},s.localMode=f,s.localState=e.startState(f,c.indent(s.htmlState,""))}else s.inTag&&(s.inTag+=o.current(),o.eol()&&(s.inTag+=" "));return l}var c=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag}),p={},u=o&&o.tags,m=o&&o.scriptTypes;if(s(l,p),u&&s(u,p),m)for(var h=m.length-1;0<=h;h--)p.script.unshift(["type",m[h].matches,m[h].mode]);return{startState:function(){var t=e.startState(c);return{token:d,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,o){return!t.localMode||/^\s*<\//.test(n)?c.indent(t.htmlState,n):t.localMode.indent?t.localMode.indent(t.localState,n,o):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},AhD2:function(){var e=Math.round;(function(){function t(e){var t=getComputedStyle(e).color;if(t)try{return t.match(/(\d+), (\d+), (\d+)/).slice(1)}catch(t){return[255,255,255]}else return[255,255,255]}function n(e,t,n){var o={x:e,y:t+10,alpha:1,color:n};return 1===L?(o.size=s(2,4),o.vx=T.x[0]+Math.random()*(T.x[1]-T.x[0]),o.vy=T.y[0]+Math.random()*(T.y[1]-T.y[0])):2===L&&(o.size=s(2,8),o.drag=0.92,o.vx=s(-3,3),o.vy=s(-3,3),o.wander=0.15,o.theta=s(0,360)*m/180),o}function o(t){t.vy+=S,t.x+=t.vx,t.y+=t.vy,t.alpha*=C,M.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",M.fillRect(e(t.x-1),e(t.y-1),t.size,t.size)}function r(t){t.x+=t.vx,t.y+=t.vy,t.vx*=t.drag,t.vy*=t.drag,t.theta+=s(-0.5,0.5),t.vx+=0.1*Math.sin(t.theta),t.vy+=0.1*Math.cos(t.theta),t.size*=0.96,M.fillStyle="rgba("+t.color[0]+","+t.color[1]+","+t.color[2]+","+t.alpha+")",M.beginPath(),M.arc(e(t.x-1),e(t.y-1),t.size,0,2*m),M.fill()}function i(){for(var e=x.length,t;e--;)(t=x[e],!(!t||0.01>t.alpha||0.5>=t.size))&&(1===L?o(t):2===L&&r(t))}function s(e,t){return t||(t=e,e=0),e+~~(Math.random()*(t-e+1))}function l(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout(function(){n=!1},t))}}function d(){h&&(M.clearRect(0,0,E,w),D=new Date().getTime(),!b&&(b=D),R=(D-b)/1e3,b=D,0i.ch&&(b=b.slice(0,b.length-u.end+i.ch));var x=b.toLowerCase();if(!b||"string"==u.type&&(u.end!=i.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==h.type||u.string.indexOf("/")==u.string.length-1||f&&-1"+(v?"\n\n":"")+""+b+">",newPos:v?e.Pos(i.line+1,0):e.Pos(i.line,i.ch+1)}}for(var k="object"==typeof c&&c.dontIndentOnAutoClose,p=n.length-1,S;0<=p;p--){S=o[p],t.replaceRange(S.text,n[p].head,n[p].anchor,"+insert");var C=t.listSelections().slice(0);C[p]={head:S.newPos,anchor:S.newPos},t.setSelections(C),!k&&S.indent&&(t.indentLine(S.newPos.line,null,!0),t.indentLine(S.newPos.line+1,null,!0))}}function n(t,n){for(var o=t.listSelections(),r=[],l=n?"/":"",d=t.getOption("autoCloseTags"),c="object"==typeof d&&d.dontIndentOnSlash,p=0;p"!=t.getLine(i.line).charAt(u.end)&&(g+=">"),r[p]=g}if(t.replaceSelections(r),o=t.listSelections(),!c)for(var p=0;p'"]=function(e){return t(e)}),n.addKeyMap(s)}});var l=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],d=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}})},BtxX:function(e){(function(t){function n(){}function o(e,t){return function(){e.apply(t,arguments)}}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,t){for(;3===e._state;)e=e._value;return 0===e._state?void e._deferreds.push(t):void(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?i:l)(t.promise,e._value);var o;try{o=n(e._value)}catch(n){return void l(t.promise,n)}i(t.promise,o)}))}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof r)return t._state=3,t._value=e,void d(t);if("function"==typeof n)return void p(o(n,e),t)}t._state=1,t._value=e,d(t)}catch(n){l(t,n)}}function l(e,t){e._state=2,e._value=t,d(e)}function d(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;te.firstLine();)r=t.Pos(r.line-1,0),p=l(!1);if(p&&!p.cleared&&"unfold"!==s){var u=n(e,i);t.on(u,"mousedown",function(n){m.clear(),t.e_preventDefault(n)});var m=e.markText(p.from,p.to,{replacedWith:u,clearOnEnter:o(e,i,"clearOnEnter"),__isFold:!0});m.on("clear",function(n,o){t.signal(e,"unfold",e,n,o)}),t.signal(e,"fold",e,p.from,p.to)}}function n(e,t){var n=o(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span"),n.appendChild(r),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}function o(e,t,n){if(t&&void 0!==t[n])return t[n];var o=e.options.foldOptions;return o&&void 0!==o[n]?o[n]:r[n]}t.newFoldFunction=function(t,n){return function(o,r){e(o,r,{rangeFinder:t,widget:n})}},t.defineExtension("foldCode",function(t,n,o){e(this,t,n,o)}),t.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n")):null:e.match("--")?n(d("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(A=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==o){var r;return r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),r?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=i,A=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return A="equals",null;if("<"==n){t.tokenize=i,t.state=h,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return /[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function d(e,t){return function(n,o){for(;!n.eol();){if(n.match(t)){o.tokenize=i;break}n.next()}return e}}function c(e){return function(t,n){for(var o;null!=(o=t.next());){if("<"==o)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==o)if(1==e){n.tokenize=i;break}else return n.tokenize=c(e-1),n.tokenize(t,n)}return"meta"}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(w.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function m(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!w.contextGrabbers.hasOwnProperty(n)||!w.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function h(e,t,n){return"openTag"==e?(n.tagStart=t.column(),g):"closeTag"==e?f:h}function g(e,t,n){return"word"==e?(n.tagName=t.current(),I="tag",x):w.allowMissingTagName&&"endTag"==e?(I="tag bracket",x(e,t,n)):(I="error",g)}function f(e,t,n){if("word"==e){var o=t.current();return n.context&&n.context.tagName!=o&&w.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==o||!1===w.matchClosing?(I="tag",y):(I="tag error",b)}return w.allowMissingTagName&&"endTag"==e?(I="tag bracket",y(e,t,n)):(I="error",b)}function y(e,t,n){return"endTag"==e?(u(n),h):(I="error",y)}function b(e,t,n){return I="error",y(e,t,n)}function x(e,t,n){if("word"==e)return I="attribute",v;if("endTag"==e||"selfcloseTag"==e){var o=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||w.autoSelfClosers.hasOwnProperty(o)?m(n,o):(m(n,o),n.context=new p(n,o,r==n.indented)),h}return I="error",x}function v(e,t,n){return"equals"==e?k:(w.allowMissing||(I="error"),x(e,t,n))}function k(e,t,n){return"string"==e?S:"word"==e&&w.allowUnquoted?(I="string",x):(I="error",x(e,t,n))}function S(e,t,n){return"string"==e?S:x(e,t,n)}var C=o.indentUnit,w={},T=r.htmlMode?t:n;for(var E in T)w[E]=T[E];for(var E in r)w[E]=r[E];var A,I;return i.isInText=!0,{startState:function(e){var t={tokenize:i,state:h,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;A=null;var n=t.tokenize(e,t);return(n||A)&&"comment"!=n&&(I=null,t.state=t.state(A||n,e,t),I&&(n="error"==I?n+" error":I)),n},indent:function(t,n,o){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+C;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=i)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1===w.multilineTagIndentPastTag?t.tagStart+C*(w.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(w.alignCDATA&&/$/,blockCommentStart:"",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=x)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},IIoC:function(e,t,n){var o=Math.round,r=Math.floor,i=Math.max;(function(t){(function(){function s(e){return"string"==typeof e}function l(e,t){e=e.split("."),t=t||Do;for(var n=0;nn?null:s(t)?t.charAt(n):t[n]}function _e(e){if(!v(e))for(var t=e.length-1;0<=t;t--)delete e[t];e.length=0}function et(){return Array.prototype.concat.apply([],arguments)}function tt(e){var t=e.length;if(0t?1:0}function rt(e){return-1!=Vo.indexOf(e)}function y(e,t,n){for(var o in e)t.call(n,e[o],o,e)}function at(e){var t=[],n=0,o;for(o in e)t[n++]=e[o];return t}function it(e){var t=[],n=0,o;for(o in e)t[n++]=o;return t}function st(e){var t={},n;for(n in e)t[n]=e[n];return t}function lt(t){for(var n=1,e,o;no.keyCode||void 0!=o.returnValue)){a:{var i=!1;if(0==o.keyCode)try{o.keyCode=-1;break a}catch(e){i=!0}(i||void 0==o.returnValue)&&(o.returnValue=!0)}for(o=[],i=n.a;i;i=i.parentNode)o.push(i);for(t=t.type,i=o.length-1;0<=i;i--){n.a=o[i];var e=Et(o[i],t,!0,n);r=r&&e}for(i=0;it.b&&(t.b++,e.next=t.a,t.a=e)}fr=!1}function Kt(e,t){_t.call(this),this.b=e||1,this.a=t||Do,this.c=_(this.qb,this),this.g=Ro()}function Gt(e){e.ea=!1,e.O&&(e.a.clearTimeout(e.O),e.O=null)}function Xt(e,t,n){if(m(e))n&&(e=_(e,n));else if(e&&"function"==typeof e.handleEvent)e=_(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<+t?-1:Do.setTimeout(e,t||0)}function Qt(e,t,n){$.call(this),this.f=null==n?e:_(e,n),this.c=t,this.b=_(this.kb,this),this.a=[]}function Jt(e){e.Y=Xt(e.b,e.c),e.f.apply(null,e.a)}function $t(e){$.call(this),this.b=e,this.a={}}function Yt(t,n,o,r){v(o)||(o&&(vr[0]=o.toString()),o=vr);for(var i=0,e;ii.length)){var e=i[1];if(v(e)&&!(1>e.length)){var s=e[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var l=1;ln)&&(3!=n||Ko||t.a.V())){t.B||4!=n||7==o||(8==o||0>=r?mn(3):mn(2)),Fn(t);var i=t.a.W();t.C=i,(o=t.a.V())||cn(t.b,function(){return"No response text for uri "+t.g+" status "+i}),t.f=200==i,ln(t.b,t.o,t.g,t.c,t.T,n,i),t.f?((r=_n(t))&&(dn(t.b,t.c,r,"Initial handshake response via X-HTTP-Initial-Response"),t.v=!0,Vn(t,r)),t.K?(On(t,n,o),Ko&&t.f&&3==n&&Mn(t)):(dn(t.b,t.c,o,null),Vn(t,o)),4==n&&Un(t),t.f&&!t.B&&(4==n?t.i.ta(t):(t.f=!1,Rn(t)))):(400==i&&0t.length)?Pr:(t=t.substr(o,n),e.G=o+n,t)}function Rn(e){e.U=Ro()+e.R,Pn(e,e.R)}function Pn(e,t){if(null!=e.s)throw Error("WatchDog timer not null");e.s=yn(_(e.lb,e),t)}function Fn(e){e.s&&(Do.clearTimeout(e.s),e.s=null)}function Bn(e){e.i.La()||e.B||e.i.ta(e)}function Un(e){Fn(e);var t=e.I;t&&"function"==typeof t.$&&t.$(),e.I=null,Gt(e.S),Zt(e.L),e.a&&(t=e.a,e.a=null,t.abort(),t.$())}function Vn(e,t){try{e.i.Oa(e,t),mn(4)}catch(t){H(e.b,t,"Error in httprequest callback")}}function qn(e){if(e.A&&"function"==typeof e.A)return e.A();if(s(e))return e.split("");if(p(e)){for(var t=[],n=e.length,o=0;o2*e.c&&Hn(e),!0)}function Hn(t){if(t.c!=t.a.length){for(var n=0,o=0,r;nt)throw Error("Bad port number "+t);e.i=t}else e.i=null}function Jn(e,t,n){t instanceof ro?(e.c=t,po(e.c,e.h)):(n||(t=no(t,qr)),e.c=new ro(t,e.h))}function $n(e,t,n){e.c.set(t,n)}function R(e,t,n){v(n)||(n=[n+""]),so(e.c,t,n)}function Yn(e){return $n(e,"zx",r(2147483648*Math.random()).toString(36)+Math.abs(r(2147483648*Math.random())^Ro()).toString(36)),e}function Zn(e){return e instanceof Gn?Q(e):new Gn(e,void 0)}function eo(t,n,o,r){var i=new Gn(null,void 0);return t&&M(i,t),n&&Xn(i,n),o&&Qn(i,o),r&&(i.a=r),i}function to(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function no(e,t,n){return s(e)?(e=encodeURI(e).replace(t,oo),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function oo(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function ro(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function ao(e){e.a||(e.a=new Wn,e.b=0,e.c&&P(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function S(e,t){ao(e),t=co(e,t),Kn(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,zn(e.a,t))}function io(e,t){return ao(e),t=co(e,t),Kn(e.a.b,t)}function so(e,t,n){S(e,t),0=e.f}function de(e,t){return e.b?e=e.b==t:e.a?(t=xo(t),e=Kn(e.a.a.b,t)):e=!1,e}function ee(e,t){e.a?e.a.add(t):e.b=t}function ce(e,t){if(e.b&&e.b==t)e.b=null;else{var n;(n=e.a)&&(n=xo(t),n=Kn(e.a.a.b,n)),n&&zn(e.a.a,xo(t))}}function fe(e){if(null!=e.b)return e.c.concat(e.b.u);if(null!=e.a&&0!=e.a.a.c){var t=e.c;return Bo(e.a.A(),function(e){t=t.concat(e.u)}),t}return tt(e.c)}function ge(e,t){e.c=e.c.concat(t)}function he(){}function ie(){this.a=new he}function je(e,t,n){var o=n||"";try{jn(e,function(n,r){var i=n;I(n)&&(i=Dt(n)),t.push(o+r+"="+encodeURIComponent(i))})}catch(n){throw t.push(o+"type="+encodeURIComponent("_badmap")),n}}function ke(e,t){var n=new E;cn(n,"TestLoadImage: loading "+e);var o=new Image;o.onload=f(le,n,o,"TestLoadImage: loaded",!0,t),o.onerror=f(le,n,o,"TestLoadImage: error",!1,t),o.onabort=f(le,n,o,"TestLoadImage: abort",!1,t),o.ontimeout=f(le,n,o,"TestLoadImage: timeout",!1,t),Do.setTimeout(function(){o.ontimeout&&o.ontimeout()},1E4),o.src=e}function le(t,n,o,r,i){try{cn(t,o),n.onload=null,n.onerror=null,n.onabort=null,n.ontimeout=null,i(r)}catch(e){H(t,e)}}function me(e){_t.call(this),this.headers=new Wn,this.s=e||null,this.c=!1,this.D=this.a=null,this.K=this.B="",this.j=0,this.g="",this.h=this.I=this.u=this.G=!1,this.l=0,this.C=null,this.L=ae,this.v=this.o=!1}function T(e){return zo&&ut(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function se(e){return"content-type"==e.toLowerCase()}function Co(e,t){e.c=!1,e.a&&(e.h=!0,e.a.abort(),e.h=!1),e.g=t,e.j=5,qe(e),ve(e)}function qe(e){e.G||(e.G=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function te(t){if(t.c&&"undefined"!=typeof Mo)if(t.D[1]&&4==re(t)&&2==t.W())an(t.b,wo(t,"Local request error detected and ignored"));else if(t.u&&4==re(t))Xt(t.Na,0,t);else if(t.dispatchEvent("readystatechange"),4==re(t)){an(t.b,wo(t,"Request complete")),t.c=!1;try{var n=t.W();a:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var o=!0;break a;default:o=!1;}var r;if(!(r=o)){var i;if(i=0===n){var e=(t.B+"").match(Fr)[1]||null;if(!e&&Do.self&&Do.self.location){var s=Do.self.location.protocol;e=s.substr(0,s.length-1)}i=!ne.test(e?e.toLowerCase():"")}r=i}r?(t.dispatchEvent("complete"),t.dispatchEvent("success")):(t.j=6,t.g=t.Ha()+" ["+t.W()+"]",qe(t))}finally{ve(t)}}}function ve(t,e){if(t.a){ue(t);var o=t.a,r=t.D[0]?n:null;t.a=null,t.D=null,e||t.dispatchEvent("ready");try{o.onreadystatechange=r}catch(n){(t=t.b)&&t.log(Sr,"Problem encountered resetting onreadystatechange: "+n.message,void 0)}}}function ue(e){e.a&&e.v&&(e.a.ontimeout=null),e.C&&(Do.clearTimeout(e.C),e.C=null)}function re(e){return e.a?e.a.readyState:0}function N(e,t){return e.a?e.a.getResponseHeader(t):null}function wo(e,t){return t+" ["+e.K+" "+e.B+" "+e.W()+"]"}function U(e){var t="";return y(e,function(e,n){t+=n,t+=":",t+=e,t+="\r\n"}),t}function we(t,n,o){a:{for(r in o){var r=!1;break a}r=!0}if(r)return t;if(o=U(o),s(t)){if(n=encodeURIComponent(n+""),o=null==o?"":"="+encodeURIComponent(o+""),n+=o){if(o=t.indexOf("#"),0>o&&(o=t.length),r=t.indexOf("?"),0>r||r>o){r=o;var i=""}else i=t.substring(r+1,o);t=[t.substr(0,r),i,t.substr(o)],o=t[1],t[1]=n?o?o+"&"+n:n:o,t=t[0]+(t[1]?"?"+t[1]:"")+t[2]}return t}return $n(t,n,o),t}function xe(e){this.ya=0,this.g=[],this.a=new E,this.I=new yo,this.X=this.ua=this.D=this.ja=this.b=this.K=this.j=this.U=this.h=this.L=this.i=null,this.Za=this.R=0,this.Xa=!!l("internalChannelParams.failFast",e),this.ka=this.C=this.s=this.l=this.m=this.f=null,this.u=this.xa=this.N=-1,this.T=this.B=this.v=0,this.Wa=l("internalChannelParams.baseRetryDelayMs",e)||5E3,this.$a=l("internalChannelParams.retryDelaySeedMs",e)||1E4,this.Ya=l("internalChannelParams.forwardChannelMaxRetries",e)||2,this.wa=l("internalChannelParams.forwardChannelRequestTimeoutMs",e)||2E4,this.Ta=e&&e.Kb||void 0,this.G=void 0,this.S=e&&e.supportsCrossDomainXhr||!1,this.J="",this.c=new ko(e&&e.concurrentRequestLimit),this.la=new ie,this.o=e&&void 0!==e.backgroundChannelTest?e.backgroundChannelTest:!0,(this.va=e&&e.fastHandshake||!1)&&!this.o&&(rn(this.a.a,"Force backgroundChannelTest when fastHandshake is enabled."),this.o=!0),e&&e.Fa&&this.a.Fa()}function ye(e){if(cn(e.a,"disconnect()"),ze(e),3==e.F){var t=e.R++,n=Q(e.D);$n(n,"SID",e.J),$n(n,"RID",t),$n(n,"TYPE","terminate"),Je(e,n),t=new En(e,e.a,t,void 0),t.J=2,t.h=Yn(Q(n)),n=!1,Do.navigator&&Do.navigator.sendBeacon&&(n=Do.navigator.sendBeacon(t.h.toString(),"")),!n&&Do.Image&&(new Image().src=t.h,n=!0),n||(t.a=t.i.ca(null),t.a.fa(t.h)),t.D=Ro(),Rn(t)}V(e)}function ze(e){e.C&&(e.C.abort(),e.C=null),e.b&&(e.b.cancel(),e.b=null),e.l&&(Do.clearTimeout(e.l),e.l=null),Eo(e),e.c.cancel(),e.m&&(Do.clearTimeout(e.m),e.m=null)}function Ae(e,t){1E3==e.g.length&&F(e.a,function(){return"Already have 1000 queued maps upon queueing "+Dt(t)}),e.g.push(new vo(e.Za++,t)),3==e.F&&Ee(e)}function Ee(e){be(e.c)||e.m||(e.m=yn(_(e.Qa,e),0),e.v=0)}function Fe(e,t){var n=e.c;return(n.b?1:n.a?n.a.a.c:0)>=e.c.f-(e.m?1:0)?(F(e.a,"Unexpected retry request is scheduled."),!1):e.m?(cn(e.a,"Use the retry request that is already scheduled."),e.g=t.u.concat(e.g),!0):1==e.F||2==e.F||e.v>=(e.Xa?0:e.Ya)?!1:(cn(e.a,"Going to retry POST"),e.m=yn(_(e.Qa,e,t),De(e,e.v)),e.v++,!0)}function Ge(e,t){var n=t?t.c:e.R++;var r=Q(e.D);$n(r,"SID",e.J),$n(r,"RID",n),$n(r,"AID",e.N),Je(e,r),e.h&&e.i&&we(r,e.h,e.i),n=new En(e,e.a,n,e.v+1),null===e.h&&(n.j=e.i),t&&(e.g=t.u.concat(e.g)),t=Be(e,n),n.setTimeout(o(.5*e.wa)+o(.5*e.wa*Math.random())),ee(e.c,n),An(n,r,t)}function Je(e,t){e.f&&jn({},function(e,n){$n(t,n,e)})}function Be(t,n){var o=Math.min(t.g.length,1E3),r=t.f?_(t.f.ab,t.f,t):null;a:for(var s=t.g,e=-1,l;;){l=["count="+o],-1==e?0p)e=i(0,s[c].a-100),d=!1;else try{je(u,l,"req"+p+"_")}catch(e){r&&r(u)}}if(d){r=l.join("&");break a}}return t=t.g.splice(0,o),n.u=t,r}function Ie(e){if(!e.b&&!e.l){e.T=1;var t=e.Pa;xr||zt(),fr||(xr(),fr=!0),yr.add(t,e),e.B=0}}function Ke(e){return e.b||e.l?(F(e.a,"Request already in progress"),!1):!(3<=e.B)&&(cn(e.a,"Going to retry GET"),e.T++,e.l=yn(_(e.Pa,e),De(e,e.B)),e.B++,!0)}function Le(e,t,n){cn(e.a,"Test Connection Finished");var o=t.l;o&&So(e.c,o),e.ka=n,e.u=t.f,cn(e.a,"connectChannel_()"),e.D=Ce(e,e.ja),Ee(e)}function To(e,t){cn(e.a,"Test Connection Failed"),e.u=t.f,He(e,2)}function Eo(e){null!=e.s&&(Do.clearTimeout(e.s),e.s=null)}function De(e,t){var n=e.Wa+r(Math.random()*e.$a);return e.qa()||(cn(e.a,"Inactive channel"),n*=2),n*t}function He(e,t){if(pn(e.a,"Error code "+t),2==t){var n=null;e.f&&(n=null);var o=_(e.pb,e);n||(n=new Gn("//www.google.com/images/cleardot.gif"),Do.location&&"http"==Do.location.protocol||M(n,"https"),Yn(n)),ke(n.toString(),o)}else gn(2);cn(e.a,"HttpChannel: error - "+t),e.F=0,e.f&&e.f.Ba(t),V(e),ze(e)}function V(e){if(e.F=0,e.u=-1,e.f){var t=fe(e.c);(0!=t.length||0!=e.g.length)&&(cn(e.a,function(){return"Number of undelivered maps, pending: "+t.length+", outgoing: "+e.g.length}),e.c.c.length=0,tt(e.g),e.g.length=0),e.f.Aa()}}function Ce(e,t){return t=Ao(e,null,t),cn(e.a,"GetForwardChannelUri: "+t),t}function Me(e,t,n){return t=Ao(e,e.ia()?t:null,n),cn(e.a,"GetBackChannelUri: "+t),t}function Ao(t,n,o){var r=Zn(o);if(""!=r.b)n&&Xn(r,n+"."+r.b),Qn(r,r.i);else{var i=Do.location,e;e=n?n+"."+i.hostname:i.hostname,r=eo(i.protocol,e,i.port,o)}return t.U&&y(t.U,function(e,t){$n(r,t,e)}),n=t.j,o=t.K,n&&o&&$n(r,n,o),$n(r,"VER",t.na),Je(t,r),r}function Ne(){}function Oe(){for(var t=arguments[0],n=1,o;nthis.c)throw Error(Hr);this.a=new Re,this.b=new bo,this.g=null,this.aa()}function Ye(e){if("function"==typeof e.$)e.$();else for(var t in e)e[t]=null}function Io(e){return We(e.a)+e.b.a.c}function $e(e,t){this.a=e,this.b=t}function No(e){if(this.a=[],e)a:{if(e instanceof No){var t=e.M();if(e=e.A(),0>=this.a.length){for(var n=this.a,o=0;o>1,e[o].a>n.a);)e[t]=e[o],t=o;e[t]=n}function _o(){No.call(this)}function Oo(e,t){this.f=new _o,Xe.call(this,e,t)}function Y(e,t,n,o){this.l=e,this.j=!!o,Oo.call(this,t,n)}var Mo=Mo||{},Do=this,k="closure_uid_"+(1E9*Math.random()>>>0),q=0,Ro=Date.now||function(){return+new Date},t;b(u,Error),u.prototype.name="CustomError",b(j,u),j.prototype.name="AssertionError";var g=0,Po={};$.prototype.i=!1,$.prototype.$=function(){},$.prototype.w=function(){if(this.m)for(;this.m.length;)this.m.shift()()};var Fo=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(s(e))return s(t)&&1==t.length?e.indexOf(t,0):-1;for(var n=0;nparseFloat(Jo)){Qo=Yo+"";break a}}Qo=Jo}var Zo={},er=Do.document,tr;tr=er&&zo?pt()||("CSS1Compat"==er.compatMode?parseInt(Qo,10):5):void 0;var nr=Object.freeze||function(e){return e},or=!zo||9<=+tr,rr=zo&&!ut("9"),ar=function(){if(!Do.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return Do.addEventListener("test",n,t),Do.removeEventListener("test",n,t),e}();mt.prototype.b=function(){this.Ra=!1},b(A,mt);var ir=nr({2:"touch",3:"pen",4:"mouse"});A.prototype.b=function(){A.H.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,rr)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var sr="closure_listenable_"+(0|1E6*Math.random()),lr=0;ft.prototype.add=function(t,n,o,r,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=bt(t,n,r,i);return-1>>0);b(_t,$),_t.prototype[sr]=!0,t=_t.prototype,t.addEventListener=function(e,t,n,o){xt(this,e,t,n,o)},t.removeEventListener=function(e,t,n,o){Ct(this,e,t,n,o)},t.dispatchEvent=function(t){var n=this.J,o;if(n)for(o=[];n;n=n.J)o.push(n);n=this.N;var r=t.type||t;if(s(t))t=new mt(t,n);else if(t instanceof mt)t.target=t.target||n;else{var i=t;t=new mt(r,n),lt(t,i)}if(i=!0,o)for(var e=o.length-1,l;0<=e;e--)l=t.a=o[e],i=B(l,r,!0,t)&&i;if(l=t.a=n,i=B(l,r,!0,t)&&i,i=B(l,r,!1,t)&&i,o)for(e=0;e=C(this).value)for(m(t)&&(t=t()),e=new en(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var Ar={},Ir=null;E.prototype.Fa=function(){this.b=!1};var Nr=new _t;b(un,mt),b(hn,mt),b(K,mt);var Lr={NO_ERROR:0,rb:1,yb:2,xb:3,ub:4,wb:5,zb:6,Ua:7,TIMEOUT:8,Cb:9},_r={tb:"complete",Gb:"success",Va:"error",Ua:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",vb:"downloadprogress",Hb:"uploadprogress"};bn.prototype.a=null;var Or={OPEN:"a",sb:"b",Va:"c",Bb:"d"};b(kn,mt),b(Sn,mt);var Mr;b(Cn,bn),Mr=new Cn;var Dr=45E3,Rr={},Pr={};t=En.prototype,t.setTimeout=function(e){this.R=e},t.nb=function(e){e=e.target;var t=this.I;t&&3==re(e)?(cn(this.b,"Throttling readystatechange."),t.cb()):this.Sa(e)},t.Sa=function(e){try{e==this.a?Ln(this):rn(this.b.a,"Called back with an unexpected xmlhttp")}catch(e){if(cn(this.b,"Failed call to OnXmlHttpReadyStateChanged_"),this.a&&this.a.V()){var t=this;H(this.b,e,function(){return"ResponseText: "+t.a.V()})}else H(this.b,e,"No response text")}finally{}},t.mb=function(){if(this.a){var e=re(this.a),t=this.a.V();this.Gn&&this.ka&&0==this.B&&!this.s&&(this.s=yn(_(this.ib,this),6E3)))}else if((t.v||this.b==t)&&Eo(this),!nt(n))for(n=o=this.la.a.parse(n),o=0;oe-this.g)){for(var t;0this.c&&0=i)e=void 0;else{if(1==i)_e(r);else{r[0]=r.pop(),r=0,o=o.a,i=o.length;for(var s=o[r];r>1;){var l=2*r+1,d=2*r+2;if(l=ds.a)break;o[r]=o[l],r=l}o[r]=s}e=e.b}e.apply(this,[n])}},t.ma=function(e){Oo.H.ma.call(this,e),this.ra()},t.aa=function(){Oo.H.aa.call(this),this.ra()},t.w=function(){Oo.H.w.call(this),Do.clearTimeout(void 0),_e(this.f.a),this.f=null},b(Y,Oo),Y.prototype.pa=function(){var e=new me,t=this.l;return t&&t.forEach(function(t,n){e.headers.set(n,t)}),this.j&&(e.o=!0),e},Y.prototype.sa=function(e){return!e.i&&!e.a},Pe.prototype.createWebChannel=Pe.prototype.a,Qe.prototype.send=Qe.prototype.gb,Qe.prototype.open=Qe.prototype.fb,Qe.prototype.close=Qe.prototype.close,Lr.NO_ERROR=0,Lr.TIMEOUT=8,Lr.HTTP_ERROR=6,_r.COMPLETE="complete",vn.EventType=Or,Or.OPEN="a",Or.CLOSE="b",Or.ERROR="c",Or.MESSAGE="d",_t.prototype.listen=_t.prototype.Ia,Y.prototype.getObject=Y.prototype.da,Y.prototype.releaseObject=Y.prototype.ob,me.prototype.listenOnce=me.prototype.Ja,me.prototype.getLastError=me.prototype.hb,me.prototype.getLastErrorCode=me.prototype.Ga,me.prototype.getStatus=me.prototype.W,me.prototype.getStatusText=me.prototype.Ha,me.prototype.getResponseJson=me.prototype.eb,me.prototype.getResponseText=me.prototype.V,me.prototype.getResponseText=me.prototype.V,me.prototype.send=me.prototype.fa,e.exports={createWebChannelTransport:pe,ErrorCode:Lr,EventType:_r,WebChannel:vn,XhrIoPool:Y}}).call("undefined"==typeof t?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:t)}).call(t,n("h6ac"))},IYZm:function(e,t,n){(function(e){e(n("tQq4"),n("LiPu"))})(function(e){"use strict";function t(e){for(var t in u)u.hasOwnProperty(t)&&(e.attrs[t]=u[t])}var n=["ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","bm","ba","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ny","zh","cv","kw","co","cr","hr","cs","da","dv","nl","dz","en","eo","et","ee","fo","fj","fi","fr","ff","gl","ka","de","el","gn","gu","ht","ha","he","hz","hi","ho","hu","ia","id","ie","ga","ig","ik","io","is","it","iu","ja","jv","kl","kn","kr","ks","kk","km","ki","rw","ky","kv","kg","ko","ku","kj","la","lb","lg","li","ln","lo","lt","lu","lv","gv","mk","mg","ms","ml","mt","mi","mr","mh","mn","na","nv","nb","nd","ne","ng","nn","no","ii","nr","oc","oj","cu","om","or","os","pa","pi","fa","pl","ps","pt","qu","rm","rn","ro","ru","sa","sc","sd","se","sm","sg","sr","gd","sn","si","sk","sl","so","st","es","su","sw","ss","sv","ta","te","tg","th","ti","bo","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","fy","xh","yi","yo","za","zu"],o=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],l=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],d=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],c={attrs:{}},p={a:{attrs:{href:null,ping:null,type:null,media:d,target:o,hreflang:n}},abbr:c,acronym:c,address:c,applet:c,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:d,hreflang:n,type:null,shape:["default","rect","circle","poly"]}},article:c,aside:c,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:c,base:{attrs:{href:null,target:o}},basefont:c,bdi:c,bdo:c,big:c,blockquote:{attrs:{cite:null}},body:c,br:c,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:o,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:c,center:c,cite:c,code:c,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:c,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:c,dir:c,div:c,dl:c,dt:c,em:c,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:c,figure:c,font:c,footer:c,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:l,method:i,novalidate:["","novalidate"],target:o}},frame:c,frameset:c,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:c,hgroup:c,hr:c,html:{attrs:{manifest:null},children:["head","body"]},i:c,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:l,formmethod:i,formnovalidate:["","novalidate"],formtarget:o,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:c,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:c,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:n,media:d,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:c,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:c,noframes:c,noscript:c,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:c,param:{attrs:{name:null,value:null}},pre:c,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:c,rt:c,ruby:c,s:c,samp:c,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:c,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:c,source:{attrs:{src:null,type:null,media:null}},span:c,strike:c,strong:c,style:{attrs:{type:["text/css"],media:d,scoped:null}},sub:c,summary:c,sup:c,table:c,tbody:c,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:c,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:c,time:{attrs:{datetime:null}},title:c,tr:c,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:n}},tt:c,u:c,ul:c,var:c,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:c},u={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};for(var m in t(c),p)p.hasOwnProperty(m)&&p[m]!=c&&t(p[m]);e.htmlSchema=p,e.registerHelper("hint","html",function(t,n){var o={schemaInfo:p};if(n)for(var r in n)o[r]=n[r];return e.hint.xml(t,o)})})},"Jo/m":function(e,t,n){(function(e){e(n("tQq4"),n("29F7"),n("4e7A"))})(function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):!e.global&&(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);return n&&n.index==t.pos?(t.pos+=n[0].length||1,"searching"):void(n?t.pos=n.index:t.skipToEnd())}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function o(e){return e.state.search||(e.state.search=new n)}function r(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,n){return e.getSearchCursor(t,n,{caseFold:r(t),multiline:!0})}function s(e,t,n,o,r){e.openDialog(t,o,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){g(e)},onKeyDown:r})}function l(e,t,n,o,r){e.openDialog?e.openDialog(t,r,{value:o,selectValueOnOpen:!0}):r(prompt(n,o))}function d(e,t,n,o){e.openConfirm?e.openConfirm(t,o):confirm(n)&&o[0]()}function c(e){return e.replace(/\\(.)/g,function(e,t){return"n"==t?"\n":"r"==t?"\r":t})}function p(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(t){}else e=c(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function u(e,n,o){n.queryText=o,n.query=p(o),e.removeOverlay(n.overlay,r(n.query)),n.overlay=t(n.query,r(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&(n.annotate.clear(),n.annotate=null),n.annotate=e.showMatchesOnScrollbar(n.query,r(n.query)))}function m(t,n,r,i){var d=o(t);if(d.query)return h(t,n);var c=t.getSelection()||d.lastQuery;if(c instanceof RegExp&&"x^"==c.source&&(c=null),r&&t.openDialog){var p=null,m=function(n,o){e.e_stop(o),n&&(n!=d.queryText&&(u(t,d,n),d.posFrom=d.posTo=t.getCursor()),p&&(p.style.opacity=1),h(t,o.shiftKey,function(e,n){var o;3>n.line&&document.querySelector&&(o=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&o.getBoundingClientRect().bottom-4>t.cursorCoords(n,"window").top&&((p=o).style.opacity=.4)}))};s(t,b,c,m,function(n,r){var i=e.keyName(n),s=t.getOption("extraKeys"),l=s&&s[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(n),u(t,o(t),r),t.execCommand(l)):("find"==l||"findPersistent"==l)&&(e.e_stop(n),m(r,n))}),i&&c&&(u(t,d,c),h(t,n))}else l(t,b,"Search for:",c,function(e){e&&!d.query&&t.operation(function(){u(t,d,e),d.posFrom=d.posTo=t.getCursor(),h(t,n)})})}function h(t,n,r){t.operation(function(){var s=o(t),l=i(t,s.query,n?s.posFrom:s.posTo);!l.find(n)&&(l=i(t,s.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!l.find(n))||(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),s.posFrom=l.from(),s.posTo=l.to(),r&&r(l.from(),l.to()))})}function g(e){e.operation(function(){var t=o(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}function f(e,t,n){e.operation(function(){for(var o=i(e,t);o.findNext();)if("string"!=typeof t){var r=e.getRange(o.from(),o.to()).match(t);o.replace(n.replace(/\$(\d)/g,function(e,t){return r[t]}))}else o.replace(n)})}function y(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||o(e).lastQuery,r=""+(t?"Replace all:":"Replace:")+"";l(e,r+x,r,n,function(n){n&&(n=p(n),l(e,v,"Replace with:","",function(o){if(o=c(o),t)f(e,n,o);else{g(e);var r=i(e,n,e.getCursor("from")),s=function(){var t=r.from(),c;!(c=r.findNext())&&(r=i(e,n),!(c=r.findNext())||t&&r.from().line==t.line&&r.from().ch==t.ch)||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()}),d(e,k,"Replace?",[function(){l(c)},s,function(){f(e,n,o)}]))},l=function(e){r.replace("string"==typeof n?o:o.replace(/\$(\d)/g,function(t,n){return e[n]})),s()};s()}}))})}}var b="Search:(Use /re/ syntax for regexp search)",x=" (Use /re/ syntax for regexp search)",v="With: ",k="Replace? ";e.commands.find=function(e){g(e),m(e)},e.commands.findPersistent=function(e){g(e),m(e,!1,!0)},e.commands.findPersistentNext=function(e){m(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){m(e,!0,!0,!0)},e.commands.findNext=m,e.commands.findPrev=function(e){m(e,!0)},e.commands.clearSearch=g,e.commands.replace=y,e.commands.replaceAll=function(e){y(e,!0)}})},KM04:function(O){!function(){"use strict";function M(){}function F(e,s){var n=U,d,o,c,i;for(i=arguments.length;2c.ch&&(p.end=c.ch,p.string=p.string.slice(0,c.ch-p.start));var u=e.innerMode(r.getMode(),p.state);if("xml"==u.mode.name){var m=[],h=!1,g=/\btag\b/.test(p.type)&&!/>$/.test(p.string),f=g&&/^\w/.test(p.string),y,b;if(f){var x=r.getLine(c.line).slice(o(0,p.start-2),p.start),v=/<\/$/.test(x)?"close":/<$/.test(x)?"open":null;v&&(b=p.start-("close"==v?2:1))}else g&&"<"==p.string?v="open":g&&""==p.string&&(v="close");if(!g&&!u.state.tagName||v){f&&(y=p.string),h=v;var k=u.state.context,S=k&&l[k.tagName],C=k?S&&S.children:l["!top"];if(C&&"close"!=v)for(var w=0;w")}else{var S=l[u.state.tagName],T=S&&S.attrs,E=l["!attrs"];if(!T&&!E)return;if(!T)T=E;else if(E){var A={};for(var I in E)E.hasOwnProperty(I)&&(A[I]=E[I]);for(var I in T)T.hasOwnProperty(I)&&(A[I]=T[I]);T=A}if("string"==p.type||"="==p.string){var x=r.getRange(t(c.line,o(0,c.ch-60)),t(c.line,"string"==p.type?p.start:p.end)),N=x.match(/([^\s\u00a0=<>\"\']+)=$/),L;if(!N||!T.hasOwnProperty(N[1])||!(L=T[N[1]]))return;if("function"==typeof L&&(L=L.call(this,r)),"string"==p.type){y=p.string;var _=0;/['"]/.test(p.string.charAt(0))&&(d=p.string.charAt(0),y=p.string.slice(1),_++);var n=p.string.length;/['"]/.test(p.string.charAt(n-1))&&(d=p.string.charAt(n-1),y=p.string.substr(_,n-2)),h=!0}for(var w=0;wthis.status,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=function(e){return e&&DataView.prototype.isPrototypeOf(e)},k=ArrayBuffer.isView||function(e){return e&&-1e.b&&(e.b++,t.next=e.a,e.a=t)}function rt(){this.b=this.a=null}function at(){var e=vc,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function it(){this.next=this.b=this.a=null}function st(e,t){var n=e.length,o=s(e)?e.split(""):e;for(--n;0<=n;--n)n in o&&t.call(void 0,o[n],n,e)}function lt(t){a:{for(var n=Lr,o=t.length,r=s(t)?t.split(""):t,i=0;in?null:s(t)?t.charAt(n):t[n]}function dt(e,t){return 0<=wa(e,t)}function ct(e,t){t=wa(e,t);var n;return(n=0<=t)&&Array.prototype.splice.call(e,t,1),n}function pt(t,n){var o=0;st(t,function(r,i){n.call(void 0,r,i,t)&&1==Array.prototype.splice.call(t,i,1).length&&o++})}function ut(){return Array.prototype.concat.apply([],arguments)}function mt(e){var t=e.length;if(0")&&(e=e.replace(Pa,">")),-1!=e.indexOf("\"")&&(e=e.replace(Qa,""")),-1!=e.indexOf("'")&&(e=e.replace(Ra,"'")),-1!=e.indexOf("\0")&&(e=e.replace(Sa,"")),e):e}function ft(e,t){return-1!=e.indexOf(t)}function w(e,t){return et?1:0}function yt(e){return ft(Na,e)}function x(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function bt(e){for(var t in e)return!1;return!0}function xt(e){var t={},n;for(n in e)t[n]=e[n];return t}function vt(t){for(var n=1,e,o;nr.keyCode||void 0!=r.returnValue)){a:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break a}catch(e){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=n.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){n.b=r[i];var e=ln(r[i],t,!0,n);o=o&&e}for(i=0;it)throw Error("Bad port number "+t);e.i=t}else e.i=null}function In(e,t,n){t instanceof Rn?(e.a=t,jn(e.a,e.f)):(n||(t=Mn(t,Qc)),e.a=new Rn(t,e.f))}function Nn(e,t,n){e.a.set(t,n)}function F(e,t){return e.a.get(t)}function Ln(e){return e instanceof Tn?new Tn(e):new Tn(e,void 0)}function _n(e,t){var n=new Tn(null,void 0);return En(n,"https"),e&&(n.b=e),t&&(n.g=t),n}function On(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Mn(e,t,n){return s(e)?(e=encodeURI(e).replace(t,Dn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Dn(e){return e=e.charCodeAt(0),"%"+(15&e>>4).toString(16)+(15&e).toString(16)}function Rn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Pn(e){e.a||(e.a=new kn,e.b=0,e.c&&wn(e.c,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function Fn(t){var n=xn(t);if("undefined"==typeof n)throw Error("Keys are undefined");var o=new Rn(null,void 0);t=bn(t);for(var r=0;r2*e.c&&Sn(e)))}function Un(e,t){return Pn(e),t=qn(e,t),Cn(e.a.b,t)}function Vn(e,t,n){Bn(e,t),0"),e=e.join("")}return e=n.createElement(e),o&&(s(o)?e.className=o:_(o)?e.className=o.join(" "):ro(e,o)),2e?!1:!_c||!zc||9",t=no(t),l.document.write(to(t)),l.document.close())):(l=r.open($n(n),o,l))&&t.noopener&&(l.opener=null),l)try{l.focus()}catch(e){}return l}function de(e){return new Et(function(t){function n(){yn(2E3).then(function(){return!e||e.closed?void t():n()})}return n()})}function fe(){var e=null;return new Et(function(t){"complete"==yc.document.readyState?t():(e=function(){t()},rn(window,"load",e))}).s(function(t){throw an(window,"load",e),t})}function he(){return ie(void 0)?fe().then(function(){return new Et(function(e,t){var n=yc.document,o=setTimeout(function(){t(Error("Cordova framework is not ready."))},1E3);n.addEventListener("deviceready",function(){clearTimeout(o),e()},!1)})}):A(Error("Cordova must run in an Android or iOS file scheme."))}function ie(e){return e=e||re(),"file:"===ve()&&e.toLowerCase().match(/iphone|ipad|ipod|android/)}function je(){var e=yc.window;try{return e&&e!=e.top}catch(e){return!1}}function le(){return"object"!=typeof yc.window&&"function"==typeof yc.importScripts}function me(){return uc.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":uc.INTERNAL.hasOwnProperty("node")?"Node":le()?"Worker":"Browser"}function ne(){var e=me();return"ReactNative"===e||"Node"===e}function oe(){for(var e=50,t=[];0t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=re(),t=me(),this.b=bo(e)||"ReactNative"===t}function Ce(){var e=yc.document;return e&&"undefined"!=typeof e.visibilityState?"visible"==e.visibilityState:!0}function De(){var e=yc.document,t=null;return Ce()||!e?It():new Et(function(n){t=function(){Ce()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)}).s(function(n){throw e.removeEventListener("visibilitychange",t,!1),n})}function Ee(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(e){}return null}function Fe(){return G("fireauth.oauthhelper",yc)||G("fireauth.iframe",yc)}function Ge(e){qe[e]||(qe[e]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e))}function Ie(e,t,n){He?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function I(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Ie(e,n,t[n])}function J(e){var t={};return I(t,e),t}function Le(e){var t={},n;for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Me(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0,o;n>4),64!=s&&(n(240&e<<4|s>>2),64!=l&&n(192&s<<6|l))}}function To(){if(!rp){rp={},ap={};for(var e=0;65>e;e++)rp[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e),ap[rp[e]]=e,62<=e&&(ap["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(e)]=e)}}function Eo(e){this.c=e.sub,ja(),this.a=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.b=!!e.is_anonymous||"anonymous"==this.a}function Ao(e){return(e=Io(e))&&e.sub&&e.iss&&e.aud&&e.exp?new Eo(e):null}function Io(e){if(!e)return null;if(e=e.split("."),3!=e.length)return null;e=e[1];for(var t=(4-e.length%4)%4,n=0;n Auth section -> Sign in method tab.",e):"http"==n||"https"==n?o=ht("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):t="operation-not-supported-in-this-environment",Pe.call(this,t,o)}function cr(e,t,n){Pe.call(this,e,n),e=t||{},e.wb&&Ie(this,"email",e.wb),e.$&&Ie(this,"phoneNumber",e.$),e.credential&&Ie(this,"credential",e.credential)}function pr(e){if(e.code){var t=e.code||"";0==t.indexOf(We)&&(t=t.substring(We.length));var n={credential:rr(e)};if(e.email)n.wb=e.email;else if(e.phoneNumber)n.$=e.phoneNumber;else return new Pe(t,e.message||void 0);return new cr(t,n,e.message)}return null}function ur(){}function mr(e){return e.c||(e.c=e.b())}function hr(){}function gr(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0,o;nn;n++){i=0|o[n-15],r=0|o[n-2];var e=0|(0|o[n-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3),s=0|(0|o[n-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10);o[n]=0|e+s}r=0|t.a[0],i=0|t.a[1];var l=0|t.a[2],d=0|t.a[3],c=0|t.a[4],p=0|t.a[5],u=0|t.a[6];for(e=0|t.a[7],n=0;64>n;n++){var m=0|((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&l^i&l);s=c&p^~c&u,e=0|e+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7)),s=0|s+(0|eu[n]),s=0|e+(0|s+(0|o[n])),e=u,u=p,p=c,c=0|d+s,d=l,l=i,i=r,r=0|s+m}t.a[0]=0|t.a[0]+r,t.a[1]=0|t.a[1]+i,t.a[2]=0|t.a[2]+l,t.a[3]=0|t.a[3]+d,t.a[4]=0|t.a[4]+c,t.a[5]=0|t.a[5]+p,t.a[6]=0|t.a[6]+u,t.a[7]=0|t.a[7]+e}function bs(t,n,o){void 0===o&&(o=n.length);var r=0,i=t.c;if(s(n))for(;r=e&&e==(0|e)))throw Error("message must be a byte array");t.f[i++]=e,i==t.b&&(ys(t),i=0)}else throw Error("message must be string or array");t.c=i,t.g+=o}function xs(){fs.call(this,8,iu)}function vs(t,n,o,r,i){this.l=t,this.i=n,this.m=o,this.o=r||null,this.u=i||null,this.h=n+":"+o,this.v=new gs,this.g=new ms(this.h),this.f=null,this.b=[],this.a=this.c=null}function ks(e){return new Pe("invalid-cordova-configuration",e)}function Ss(){for(var e=20,t=[];0n.c?bs(n,ru,56-n.c):bs(n,ru,n.b-(n.c-56));for(var r=63;56<=r;r--)n.f[r]=255&o,o/=256;for(ys(n),r=o=0;r>i;return So(t)}function ws(t,n,o,r){var i=Ss(),e=new ir(n,r,null,i,new Pe("no-auth-event")),s=G("BuildInfo.packageName",yc);if("string"!=typeof s)throw new Pe("invalid-cordova-configuration");var l=G("BuildInfo.displayName",yc),d={};if(re().toLowerCase().match(/iphone|ipad|ipod/))d.ibi=s;else if(re().toLowerCase().match(/android/))d.apn=s;else return A(new Pe("operation-not-supported-in-this-environment"));l&&(d.appDisplayName=l),i=Cs(i),d.sessionId=i;var p=_i(t.l,t.i,t.m,n,o,null,r,t.o,d,t.u);return t.ga().then(function(){var n=t.h;return t.v.a.set(Zp,e.D(),n)}).then(function(){var e=G("cordova.plugins.browsertab.isAvailable",yc);if("function"!=typeof e)throw new Pe("invalid-cordova-configuration");var n=null;e(function(e){if(e){if(n=G("cordova.plugins.browsertab.openUrl",yc),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");n(p)}else{if(n=G("cordova.InAppBrowser.open",yc),"function"!=typeof n)throw new Pe("invalid-cordova-configuration");e=re(),e=e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i),t.a=n(p,e?"_blank":"_system","location=yes")}})})}function Ts(e,t){for(var n=0;ne.f&&(e.a=e.f),t)}function Rl(e,t){e.stop(),e.b=yn(_l(e,t)).then(function(){return De()}).then(function(){return e.h()}).then(function(){Rl(e,!0)}).s(function(t){e.i(t)&&Rl(e,!1)})}function ed(e){this.f=e,this.b=this.a=null,this.c=0}function od(e,t){var n=t[Ip],o=t.refreshToken;t=id(t.expiresIn),e.b=n,e.c=t,e.a=o}function rd(e,t){e.b=t.b,e.a=t.a,e.c=t.c}function id(e){return ja()+1E3*parseInt(e,10)}function sd(e,t){return pa(e.f,t).then(function(t){return e.b=t.access_token,e.c=id(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function ld(e,t){this.a=e||null,this.b=t||null,I(this,{lastSignInTime:Ee(t||null),creationTime:Ee(e||null)})}function dd(e){return new ld(e.a,e.b)}function ud(t,n,o,r,i,e){I(this,{uid:t,displayName:r||null,photoURL:i||null,email:o||null,phoneNumber:e||null,providerId:n})}function md(e,t){for(var n in Qt.call(this,e),t)this[n]=t[n]}function hd(e,t,n){this.G=[],this.l=e.apiKey,this.o=e.appName,this.u=e.authDomain||null,e=uc.SDK_VERSION?xo(uc.SDK_VERSION):null,this.b=new ra(this.l,Ka(wi),e),this.h=new ed(this.b),Ed(this,t[Ip]),od(this.h,t),Ie(this,"refreshToken",this.h.a),al(this,n||{}),mn.call(this),this.I=!1,this.u&&se()&&(this.a=Us(this.u,this.l,this.o)),this.N=[],this.i=null,this.w=vd(this),this.V=z(this.Ha,this);var o=this;this.ka=null,this.sa=function(e){o.oa(e.g)},this.X=null,this.O=[],this.ra=function(e){fd(o,e.c)},this.W=null}function gd(e,t){e.X&&an(e.X,"languageCodeChanged",e.sa),(e.X=t)&&tn(t,"languageCodeChanged",e.sa)}function fd(e,t){e.O=t,la(e.b,uc.SDK_VERSION?xo(uc.SDK_VERSION,e.O):null)}function yd(e,t){e.W&&an(e.W,"frameworkChanged",e.ra),(e.W=t)&&tn(t,"frameworkChanged",e.ra)}function bd(e){try{return uc.app(e.o).auth()}catch(t){throw new Pe("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.o+"'!")}}function vd(e){return new Zs(function(){return e.F(!0)},function(e){return e&&"auth/network-request-failed"==e.code},function(){var t=e.h.c-ja()-3E5;return 0i||i>=vu.length)throw new Pe("internal-error","Argument validator received an unsupported number of arguments.");o=vu[i],r=(r?"":o+" argument ")+(n.name?"\""+n.name+"\" ":"")+"must be "+n.K+".";break a}r=null}}if(r)throw new Pe("argument-error",t+" failed: "+r)}function Qd(e,t){return{name:e||"",K:"a valid string",optional:!!t,M:s}}function V(t,n){return{name:t||"",K:"a boolean",optional:!!n,M:e}}function Jd(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:j}}function W(e,t){return{name:e||"",K:"a function",optional:!!t,M:h}}function $d(e,t){return{name:e||"",K:"null",optional:!!t,M:c}}function Yd(){return{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}}}function Zd(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof Dl)}}}function ec(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof uc.app.App)}}}function tc(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return t.ya&&n}}}function rc(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}}function ic(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!!(e&&s(e.type)&&h(e.verify))}}}function sc(e,t,n,o){return{name:n||"",K:e.K+" or "+t.K,optional:!!o,M:function(n){return e.M(n)||t.M(n)}}}function X(e,t){for(var n in t){var o=t[n].name;e[o]=Z(o,e[n],t[n].j)}}function Y(t,n){for(var o in n){var r=n[o].name;if(r!==o){var i=n[o].qb;Object.defineProperty(t,r,{get:function(){return this[o]},set:function(e){Xd(r,[i],[e],!0),this[o]=e},enumerable:!0})}}}function lc(e,t,n,o){e[t]=Z(t,n,o)}function Z(t,n,o){function r(){var e=Array.prototype.slice.call(arguments);return Xd(i,o,e),n.apply(this,e)}if(!o)return n;var i=pc(t),e;for(e in n)r[e]=n[e];for(e in n.prototype)r.prototype[e]=n.prototype[e];return r}function pc(e){return e=e.split("."),e[e.length-1]}var uc=o("dP58").default,mc=mc||{},yc=this,k="closure_uid_"+(1E9*Math.random()>>>0),ia=0,ja=Date.now||function(){return+new Date},na;$(et,Error),et.prototype.name="CustomError",$(u,et),u.prototype.name="AssertionError",nt.prototype.get=function(){if(0/g,Qa=/"/g,Ra=/'/g,Sa=/\x00/g,Ta=/[\x00&<>"']/,Na;a:{var Va=yc.navigator;if(Va){var Wa=Va.userAgent;if(Wa){Na=Wa;break a}}Na=""}var Xa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xc=!1,vc=new rt,ya=0,kc=2,Sc=3,Cc,wc;y.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Tc=new nt(function(){return new y},function(e){e.reset()});Et.prototype.then=function(e,t,n){return Mt(this,h(e)?e:null,h(t)?t:null,n)},t(Et),na=Et.prototype,na.ia=function(e,t){return e=At(e,e,t),e.c=!0,Ot(this,e),this},na.s=function(e,t){return Mt(this,null,e,t)},na.cancel=function(e){this.a==ya&&Ct(function(){var t=new jt(e);_t(this,t)},this)},na.Lc=function(e){this.a=ya,Dt(this,kc,e)},na.Mc=function(e){this.a=ya,Dt(this,Sc,e)},na.Ub=function(){for(var e;e=Bt(this);)Ut(this,e,this.a,this.i);this.h=!1};var Ac=kt;$(jt,et),jt.prototype.name="cancel";var Ic=0,Nc={};Wt.prototype.pa=!1,Wt.prototype.ua=function(){if(this.ja)for(;this.ja.length;)this.ja.shift()()},Ht[" "]=p;var Lc=yt("Opera"),_c=yt("Trident")||yt("MSIE"),Mc=yt("Edge"),Dc=Mc||_c,Rc=yt("Gecko")&&(!ft(Na.toLowerCase(),"webkit")||yt("Edge"))&&!(yt("Trident")||yt("MSIE"))&&!yt("Edge"),Pc=ft(Na.toLowerCase(),"webkit")&&!yt("Edge"),Fc;a:{var Bc="",Uc=function(){var e=Na;return Rc?/rv:([^\);]+)(\)|;)/.exec(e):Mc?/Edge\/([\d\.]+)/.exec(e):_c?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Pc?/WebKit\/(\S+)/.exec(e):Lc?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Uc&&(Bc=Uc?Uc[1]:""),_c){var Vc=Gt();if(null!=Vc&&Vc>parseFloat(Bc)){Fc=Vc+"";break a}}Fc=Bc}var jc={},Wc=yc.document,zc;zc=Wc&&_c?Gt()||("CSS1Compat"==Wc.compatMode?parseInt(Fc,10):5):void 0;var Hc=Object.freeze||function(e){return e},ac=!_c||9<=+zc,Kc=_c&&!Xt("9"),cc=function(){if(!yc.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return yc.addEventListener("test",p,t),yc.removeEventListener("test",p,t),e}();Qt.prototype.preventDefault=function(){this.Gb=!1},$(C,Qt);var dc=Hc({2:"touch",3:"pen",4:"mouse"});C.prototype.preventDefault=function(){C.lb.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,Kc)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},C.prototype.f=function(){return this.a};var fc="closure_listenable_"+(0|1E6*Math.random()),gc=0;Yt.prototype.add=function(t,n,o,r,i){var e=t.toString();t=this.a[e],t||(t=this.a[e]=[],this.b++);var s=en(t,n,r,i);return-1>>0);$(mn,Wt),mn.prototype[fc]=!0,mn.prototype.addEventListener=function(e,t,n,o){tn(this,e,t,n,o)},mn.prototype.removeEventListener=function(e,t,n,o){an(this,e,t,n,o)},mn.prototype.dispatchEvent=function(t){var n=this.Ua,o;if(n)for(o=[];n;n=n.Ua)o.push(n);n=this.Nb;var r=t.type||t;if(s(t))t=new Qt(t,n);else if(t instanceof Qt)t.target=t.target||n;else{var i=t;t=new Qt(r,n),vt(t,i)}if(i=!0,o)for(var e=o.length-1,l;0<=e;e--)l=t.b=o[e],i=gn(l,r,!0,t)&&i;if(l=t.b=n,i=gn(l,r,!0,t)&&i,i=gn(l,r,!1,t)&&i,o)for(e=0;e"),no(""),no(" ");var Gd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Ld={'"':"\\\"","\\":"\\\\","/":"\\/","":"\\b","":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","":"\\u000b"},Td=/\uffff/.test("\uFFFF")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Ud=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ge="Firefox",ee="Chrome",ae={Sc:"FirebaseCore-web",Uc:"FirebaseUI-web"};Be.prototype.get=function(){var e=yc.navigator;return(e&&"boolean"==typeof e.onLine&&(ue()||"chrome-extension:"===ve()||"undefined"!=typeof e.connection)?e.onLine:1)?this.b?this.c:this.a:Math.min(5E3,this.a)};var qe={},He;try{var Je={};Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Je,"abcd",{configurable:!0,enumerable:!0,value:2}),He=2==Je.abcd}catch(e){He=!1}var Ke="EMAIL_SIGNIN",Te="email",Qe="newEmail",Re="requestType",Se="email",Ve="fromEmail",Ue="data",Xe="operation";$(Pe,Error),Pe.prototype.D=function(){return{code:this.code,message:this.message}},Pe.prototype.toJSON=function(){return this.D()};var We="auth/",Ye={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":"This operation is not supported in the environment this application is running on. \"location.protocol\" must be http, https or chrome-extension and web storage must be enabled.","popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},Ze="android",$c="handleCodeInApp",Yc="iOS",Zc="url",ep="installApp",tp="minimumVersion",np="packageName",op="bundleId",rp=null,ap=null;Eo.prototype.f=function(){return this.b};var ip=["oauth_consumer_key","oauth_nonce","oauth_signature","oauth_signature_method","oauth_timestamp","oauth_token","oauth_version"],sp=["client_id","response_type","scope","redirect_uri","state"],lp={Tc:{Ma:"locale",Ba:500,Aa:600,Na:"facebook.com",eb:sp},Vc:{Ma:null,Ba:500,Aa:620,Na:"github.com",eb:sp},Wc:{Ma:"hl",Ba:515,Aa:680,Na:"google.com",eb:sp},bd:{Ma:"lang",Ba:485,Aa:705,Na:"twitter.com",eb:ip}},dp="idToken",cp="providerId";$(Oo,_o),$(Mo,Oo),$(Do,Oo),$(Ro,Oo),$(Po,Oo),Vo.prototype.ya=function(e){return Ma(e,qo(this))},Vo.prototype.c=function(e,t){var n=qo(this);return n.idToken=t,Da(e,n)},Vo.prototype.f=function(e,t){var n=qo(this);return Uo(Fa(e,n),t)},Vo.prototype.D=function(){var e={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),e},jo.prototype.Da=function(e){return this.vb=xt(e),this},$(Wo,jo),Wo.prototype.ta=function(e){return dt(this.a,e)||this.a.push(e),this},Wo.prototype.Ab=function(){return mt(this.a)},Wo.prototype.credential=function(e,t){if(!e&&!t)throw new Pe("argument-error","credential failed: must provide the ID token and/or the access token.");return new Vo(this.providerId,{idToken:e||null,accessToken:t||null},this.providerId)},$(M,Wo),Ie(M,"PROVIDER_ID","facebook.com"),Ie(M,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),$(Ho,Wo),Ie(Ho,"PROVIDER_ID","github.com"),Ie(Ho,"GITHUB_SIGN_IN_METHOD","github.com"),$(Go,Wo),Ie(Go,"PROVIDER_ID","google.com"),Ie(Go,"GOOGLE_SIGN_IN_METHOD","google.com"),$(Qo,jo),Ie(Qo,"PROVIDER_ID","twitter.com"),Ie(Qo,"TWITTER_SIGN_IN_METHOD","twitter.com"),$o.prototype.ya=function(e){return this.signInMethod==Yo.EMAIL_LINK_SIGN_IN_METHOD?qa(e,gi,{email:this.a,oobCode:this.b}):qa(e,vi,{email:this.a,password:this.b})},$o.prototype.c=function(e,t){return this.signInMethod==Yo.EMAIL_LINK_SIGN_IN_METHOD?qa(e,Bp,{idToken:t,email:this.a,oobCode:this.b}):qa(e,qp,{idToken:t,email:this.a,password:this.b})},$o.prototype.f=function(e,t){return Uo(this.ya(e),t)},$o.prototype.D=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},I(Yo,{PROVIDER_ID:"password"}),I(Yo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),I(Yo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),er.prototype.ya=function(e){return e.Ta(tr(this))},er.prototype.c=function(e,t){var n=tr(this);return n.idToken=t,qa(e,ei,n)},er.prototype.f=function(e,t){var n=tr(this);return n.operation="REAUTH",e=qa(e,Hp,n),Uo(e,t)},er.prototype.D=function(){var e={providerId:"phone"};return this.a.Sa&&(e.verificationId=this.a.Sa),this.a.Ra&&(e.verificationCode=this.a.Ra),this.a.Fa&&(e.temporaryProof=this.a.Fa),this.a.$&&(e.phoneNumber=this.a.$),e},nr.prototype.Ta=function(e,t){var n=this.a.b;return It(t.verify()).then(function(o){if(!s(o))throw new Pe("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":return Ea(n,{phoneNumber:e,recaptchaToken:o}).then(function(e){return"function"==typeof t.reset&&t.reset(),e},function(e){throw"function"==typeof t.reset&&t.reset(),e});default:throw new Pe("argument-error","Only firebase.auth.ApplicationVerifiers with type=\"recaptcha\" are currently supported.");}})},I(nr,{PROVIDER_ID:"phone"}),I(nr,{PHONE_SIGN_IN_METHOD:"phone"}),ir.prototype.D=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.D()}};var pp=null;lr.prototype.subscribe=function(e){var t=this;this.a.push(e),this.b||(this.b=function(e){for(var n=0;n=Sr(this).value)for(h(t)&&(t=t()),e=new xr(e,t+"",this.f),n&&(e.a=n),n=this;n;)n=n.a};var xp={},vp=null;$(P,ur),P.prototype.a=function(){return new Tr(this.f)},P.prototype.b=function(e){return function(){return e}}({}),$(Tr,mn);var kp=0;na=Tr.prototype,na.open=function(e,t){if(this.readyState!=kp)throw this.abort(),Error("Error reopening a connection");this.h=e,this.c=t,this.readyState=1,Er(this)},na.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.g,method:this.h,credentials:void 0,cache:void 0};e&&(t.body=e),this.i.fetch(new Request(this.c,t)).then(this.ec.bind(this),this.Cb.bind(this))},na.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,Er(this)),this.readyState=kp},na.ec=function(e){this.a&&(this.b||(this.b=e.headers,this.readyState=2,Er(this)),this.a&&(this.readyState=3,Er(this),this.a&&e.text().then(this.dc.bind(this,e),this.Cb.bind(this))))},na.dc=function(e,t){this.a&&(this.status=e.status,this.statusText=e.statusText,this.responseText=t,this.readyState=4,Er(this))},na.Cb=function(e){var t=this.f;t&&t.log(fp,"Failed to fetch url "+this.c,e instanceof Error?e:Error(e)),this.a&&(this.readyState=4,Er(this))},na.setRequestHeader=function(e,t){this.g.append(e,t)},na.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.f)&&e.log(fp,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},na.getAllResponseHeaders=function(){if(!this.b){var e=this.f;return e&&e.log(fp,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},$(Ar,mn);var Sp="";Ar.prototype.b=Cr("goog.net.XhrIo");var Cp=/^https?$/i,wp=["POST","PUT"];na=Ar.prototype,na.Ga=function(){"undefined"!=typeof mc&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",wr(this.b,Ur(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},na.abort=function(){this.a&&this.c&&(wr(this.b,Ur(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Dr(this))},na.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Dr(this,!0)),Ar.lb.ua.call(this)},na.Fb=function(){this.pa||(this.I||this.i||this.f?Mr(this):this.tc())},na.tc=function(){Mr(this)},na.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.o){case Sp:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer;}var e=this.b;return e&&e.log(gp,"Response type "+this.o+" is not supported on this browser",void 0),null}catch(e){return wr(this.b,"Can not get response: "+e.message),null}},Vr.prototype.cancel=function(e){if(this.a)this.c instanceof Vr&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.m--,0>=t.m&&t.cancel())}this.v?this.v.call(this.u,this):this.l=!0,this.a||(e=new Xr(this),jr(this),qr(this,!1,e))}},Vr.prototype.o=function(e,t){this.i=!1,qr(this,e,t)},Vr.prototype.C=function(){jr(this),qr(this,!0,null)},Vr.prototype.then=function(t,n,o){var r=new Et(function(e,t){i=e,s=t}),i,s;return zr(this,i,function(e){e instanceof Xr?r.cancel():s(e)}),r.then(t,n,o)},t(Vr),$(Gr,et),Gr.prototype.message="Deferred has already fired",Gr.prototype.name="AlreadyCalledError",$(Xr,et),Xr.prototype.message="Deferred was canceled",Xr.prototype.name="CanceledError",Qr.prototype.c=function(){throw delete Tp[this.a],this.b};var Tp={},Ep=0,Ap=1;$(ta,et),$(oa,ur),oa.prototype.a=function(){return new this.f},oa.prototype.b=function(){return{}};var Ip="idToken",L=new Be(3E4,6E4),Np={"Content-Type":"application/x-www-form-urlencoded"},Lp=new Be(3E4,6E4),_p={"Content-Type":"application/json"},Op;ra.prototype.o=function(t,o,r,i,s,e){if(le()&&("undefined"==typeof yc.fetch||"undefined"==typeof yc.Headers||"undefined"==typeof yc.Request))throw new Pe("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var l=new Ar(this.c);if(e){l.g=n(0,e);var d=setTimeout(function(){l.dispatchEvent("timeout")},e)}E(l,"complete",function(){d&&clearTimeout(d);var e=null;try{e=JSON.parse(Br(this))||null}catch(t){e=null}o&&o(e)}),hn(l,"ready",function(){d&&clearTimeout(d),zt(this)}),hn(l,"timeout",function(){d&&clearTimeout(d),zt(this),o&&o(null)}),Ir(l,t,r,i,s)};var Mp=Hn("https://apis.google.com/js/client.js?onload=%{onload}"),Dp="__fcb"+i(1E6*Math.random()).toString();ra.prototype.l=function(t,n,o,r,i){var s=this;Op.then(function(){window.gapi.client.setApiKey(s.b);var l=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:o,body:r,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(l),n&&n(e)}})}).s(function(e){n&&n({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})})},ra.prototype.Pa=function(){return qa(this,jp,{})},ra.prototype.mb=function(e,t){return qa(this,di,{idToken:e,email:t})},ra.prototype.nb=function(e,t){return qa(this,qp,{idToken:e,password:t})};var Rp={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};na=ra.prototype,na.ob=function(e,t){var n={idToken:e},o=[];return x(Rp,function(r,i){var s=t[i];null===s?o.push(r):i in t&&(n[i]=s)}),o.length&&(n.deleteAttribute=o),qa(this,di,n)},na.hb=function(e,t){return e={requestType:"PASSWORD_RESET",email:e},vt(e,t),qa(this,ci,e)},na.ib=function(e,t){return e={requestType:"EMAIL_SIGNIN",email:e},vt(e,t),qa(this,ti,e)},na.gb=function(e,t){return e={requestType:"VERIFY_EMAIL",idToken:e},vt(e,t),qa(this,bi,e)},na.Ta=function(e){return qa(this,zp,e)},na.Xa=function(e,t){return qa(this,ui,{oobCode:e,newPassword:t})},na.Ja=function(e){return qa(this,qi,{oobCode:e})},na.Va=function(e){return qa(this,Pp,{oobCode:e})};var Pp={endpoint:"setAccountInfo",B:Ua,da:"email"},qi={endpoint:"resetPassword",B:Ua,J:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t)throw new Pe("internal-error")}},pi={endpoint:"signupNewUser",B:function(e){if(ma(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},ri={endpoint:"createAuthUri"},Fp={endpoint:"deleteAccount",T:["idToken"]},si={endpoint:"setAccountInfo",T:["idToken","deleteProvider"],B:function(e){if(!_(e.deleteProvider))throw new Pe("internal-error")}},gi={endpoint:"emailLinkSignin",T:["email","oobCode"],B:ma,J:va,R:!0},Bp={endpoint:"emailLinkSignin",T:["idToken","email","oobCode"],B:ma,J:va,R:!0},Up={endpoint:"getAccountInfo"},ti={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new Pe("internal-error");ma(e)},da:"email"},bi={endpoint:"getOobConfirmationCode",T:["idToken","requestType"],B:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new Pe("internal-error")},da:"email"},ci={endpoint:"getOobConfirmationCode",T:["requestType"],B:function(e){if("PASSWORD_RESET"!=e.requestType)throw new Pe("internal-error");ma(e)},da:"email"},ai={rb:!0,endpoint:"getProjectConfig",Eb:"GET"},Vp={rb:!0,endpoint:"getRecaptchaParam",Eb:"GET",J:function(e){if(!e.recaptchaSiteKey)throw new Pe("internal-error")}},ui={endpoint:"resetPassword",B:Ua,da:"email"},oi={endpoint:"sendVerificationCode",T:["phoneNumber","recaptchaToken"],da:"sessionInfo"},di={endpoint:"setAccountInfo",T:["idToken"],B:ha,R:!0},qp={endpoint:"setAccountInfo",T:["idToken"],B:function(e){if(ha(e),!e.password)throw new Pe("weak-password")},J:va,R:!0},jp={endpoint:"signupNewUser",J:va,R:!0},Wp={endpoint:"verifyAssertion",B:Ia,J:_a,R:!0},ki={endpoint:"verifyAssertion",B:Ia,J:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new Pe("user-not-found");if(e.errorMessage)throw O(e.errorMessage);if(!e[Ip])throw new Pe("internal-error")},R:!0},mi={endpoint:"verifyAssertion",B:function(e){if(Ia(e),!e.idToken)throw new Pe("internal-error")},J:_a,R:!0},li={endpoint:"verifyCustomToken",B:function(e){if(!e.token)throw new Pe("invalid-custom-token")},J:va,R:!0},vi={endpoint:"verifyPassword",B:function(e){if(ma(e),!e.password)throw new Pe("wrong-password")},J:va,R:!0},zp={endpoint:"verifyPhoneNumber",B:ka,J:va},ei={endpoint:"verifyPhoneNumber",B:function(e){if(!e.idToken)throw new Pe("internal-error");ka(e)},J:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",pr(e);va(e)}},Hp={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:ka,J:va},Kp={Yc:{Za:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://securetoken.googleapis.com/v1/token",id:"p"},$c:{Za:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",fb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},ad:{Za:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",fb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}},wi;wi=Ka("__EID__")?"__EID__":void 0;var yi=Hn("https://apis.google.com/js/api.js?onload=%{onload}"),Fi=new Be(3E4,6E4),Gi=new Be(5E3,15E3),Ci=null;fi.prototype.toString=function(){return this.f?Nn(this.a,"v",this.f):Bn(this.a.a,"v"),this.b?Nn(this.a,"eid",this.b):Bn(this.a.a,"eid"),this.c.length?Nn(this.a,"fw",this.c.join(",")):Bn(this.a.a,"fw"),this.a.toString()},xi.prototype.toString=function(){var t=_n(this.o,"/__/auth/handler");if(Nn(t,"apiKey",this.l),Nn(t,"appName",this.c),Nn(t,"authType",this.m),this.a.isOAuthProvider){var n=this.a;try{var o=uc.app(this.c).auth().ea()}catch(e){o=null}for(var r in n.Ya=o,Nn(t,"providerId",this.a.providerId),n=this.a,o=xe(n.vb),o)o[r]=o[r].toString();r=n.Ac,o=xt(o);for(var i=0,e;ithis.c-3E4?this.a?sd(this,{grant_type:"refresh_token",refresh_token:this.a}):It(null):It({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},ld.prototype.D=function(){return{lastLoginAt:this.b,createdAt:this.a}},$(md,Qt),$(hd,mn),hd.prototype.oa=function(e){this.ka=e,sa(this.b,e)},hd.prototype.ea=function(){return this.ka},hd.prototype.xa=function(){return mt(this.O)},hd.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},Ie(hd.prototype,"providerId","firebase"),na=hd.prototype,na.reload=function(){var e=this;return ql(this,bl(this).then(function(){return hl(e).then(function(){return Nd(e)}).then(Od)}))},na.ac=function(e){return this.F(e).then(function(e){return new Ys(e)})},na.F=function(e){var t=this;return ql(this,bl(this).then(function(){return t.h.getToken(e)}).then(function(e){if(!e)throw new Pe("internal-error");return e.accessToken!=t.qa&&(Ed(t,e.accessToken),t.dispatchEvent(new md("tokenChanged"))),fl(t,"refreshToken",e.refreshToken),e.accessToken}))},na.uc=function(e){if(e=e.users,!e||!e.length)throw new Pe("internal-error");e=e[0],al(this,{uid:e.localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt});for(var t=jl(e),n=0;nthis.u&&(this.u=0),0==this.u&&S(this)&&Sd(S(this)),this.removeAuthTokenListener(e)},na.addAuthTokenListener=function(e){var t=this;this.o.push(e),Yl(this,this.i.then(function(){t.l||dt(t.o,e)&&e(U(t))}))},na.removeAuthTokenListener=function(e){pt(this.o,function(t){return t==e})},na.delete=function(){this.l=!0;for(var e=0;e=n||(c.line>=n&&(c=d(n,0)),n=i.line,null==r?t.uncomment(i,c,e)?r="un":(t.lineComment(i,c,e),r="line"):"un"==r?t.uncomment(i,c,e):t.lineComment(i,c,e))}}),e.defineExtension("lineComment",function(e,i,c){c||(c=s);var p=this,u=r(p,e),m=p.getLine(e.line);if(!(null==m||n(p,e,m))){var h=c.lineComment||u.lineComment;if(!h)return void((c.blockCommentStart||u.blockCommentStart)&&(c.fullLines=!0,p.blockComment(e,i,c)));var g=o(0!=i.ch||i.line==e.line?i.line+1:i.line,p.lastLine()+1),f=null==c.padding?" ":c.padding,y=c.commentBlankLines||e.line==i.line;p.operation(function(){if(c.indent){for(var n=null,o=e.line;oi.length)&&(n=i)}for(var o=e.line;oh||c.operation(function(){if(!1!=n.fullLines){var o=l.test(c.getLine(h));c.replaceRange(g+m,d(h)),c.replaceRange(u+g,d(e.line,0));var r=n.blockCommentLead||p.blockCommentLead;if(null!=r)for(var s=e.line+1;s<=h;++s)(s!=h||o)&&c.replaceRange(r+g,d(s,0))}else c.replaceRange(m,t),c.replaceRange(u,e)})}}),e.defineExtension("uncomment",function(e,t,n){n||(n=s);var c=this,p=r(c,e),u=o(0!=t.ch||t.line==e.line?t.line:t.line-1,c.lastLine()),m=o(e.line,u),h=n.lineComment||p.lineComment,g=[],f=null==n.padding?" ":n.padding,y;lineComment:{if(!h)break lineComment;for(var b=m;b<=u;++b){var i=c.getLine(b),x=i.indexOf(h);if(-1n||(t.slice(o,o+f.length)==f&&(o+=f.length),y=!0,c.replaceRange("",d(e,n),d(e,o)))}}),y)return!0}var v=n.blockCommentStart||p.blockCommentStart,k=n.blockCommentEnd||p.blockCommentEnd;if(!v||!k)return!1;var S=n.blockCommentLead||p.blockCommentLead,C=c.getLine(m),w=C.indexOf(v);if(-1==w)return!1;var T=u==m?C:c.getLine(u),E=T.indexOf(k,u==m?w+v.length:0),A=d(m,w+1),I=d(u,E+1);if(-1==E||!/comment/.test(c.getTokenTypeAt(A))||!/comment/.test(c.getTokenTypeAt(I))||-1o&&0==n.ch)return t.clipPos(h(n.line-1));var r=t.getLine(n.line);if(0=r.length)return t.clipPos(h(n.line+1,0));for(var s="start",l=n.ch,d=0>o?0:r.length,c=0,i;l!=d;l+=o,c++){var p=r.charAt(0>o?l-1:l),u="_"!=p&&e.isWordChar(p)?"w":"o";if("w"==u&&p.toUpperCase()==p&&(u="W"),"start"==s)"o"!=u&&(s="in",i=u);else if("in"==s&&i!=u){if("w"==i&&"W"==u&&0>o&&l--,"W"==i&&"w"==u&&0n?o.from():o.to()})}function o(t,n){return t.isReadOnly()?e.Pass:void(t.operation(function(){for(var e=t.listSelections().length,o=[],r=-1,s=0,i;s=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},m.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},m.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],o=0;or.line&&s==i.line&&0==i.ch||n.push({anchor:s==r.line?r:h(s,0),head:s==i.line?i:h(s)});e.setSelections(n,0)},m.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},m.selectLine=function(e){for(var t=e.listSelections(),n=[],o=0,r;or?o.push(d,c):o.length&&(o[o.length-1]=c),r=c}t.operation(function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+i,h(t.lastLine()),null,"+swapLine"):t.replaceRange(i+"\n",h(r,0),null,"+swapLine")}t.setSelections(s),t.scrollIntoView()})},m.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),o=[],r=t.lastLine()+1,s=n.length-1;0<=s;s--){var i=n[s],l=i.to().line+1,d=i.from().line;0!=i.to().ch||i.empty()||l--,l=c?-1:d.lastIndexOf(r,c-1),-1==m){if(1==p)return;p=1,c=d.length;continue}if(1==p&&mv&&(v=i.length),0>k&&(k=i.length),x=Math.min(v,k),x==i.length)break;if(x==v)++h;else if(! --h){f=b,y=x;break outer}++x}return null==f||l==f&&y==u?void 0:{from:e.Pos(l,u),to:e.Pos(f,y)}}})})},dP58:function(e,t,n){"use strict";function o(){function e(e){return e=e||l,s(p,e)||r("no-app",{name:e}),p[e]}function t(){return Object.keys(p).map(function(e){return p[e]})}function n(e,t){Object.keys(u).forEach(function(n){var o=d(e,n);null===o||m[o]&&m[o](t,e)})}function d(e,t){if("serverAuth"===t)return null;e.options;return t}var p={},u={},m={},h={__esModule:!0,initializeApp:function(e,t){if(void 0===t&&(t={}),"object"!=typeof t||null===t){var o=t;t={name:o}}var i=t;void 0===i.name&&(i.name=l);var d=i.name;"string"==typeof d&&d||r("bad-app-name",{name:d+""}),s(p,d)&&r("duplicate-app",{name:d});var u=new c(e,i,h);return p[d]=u,n(u,"create"),u},app:e,apps:null,Promise:Promise,SDK_VERSION:"5.0.4",INTERNAL:{registerService:function(n,o,s,l,d){u[n]&&r("duplicate-service",{name:n}),u[n]=o,l&&(m[n]=l,t().forEach(function(e){l("create",e)}));var p=function(t){return void 0===t&&(t=e()),"function"!=typeof t[n]&&r("invalid-app-argument",{name:n}),t[n]()};return void 0!==s&&i.deepExtend(p,s),h[n]=p,c.prototype[n]=function(){for(var e=[],t=0;to)throw new gt(ht.INVALID_ARGUMENT,"Function "+e+"() requires between "+n+" and "+(o+" arguments, but was called with ")+U(t.length,"argument")+".")}function S(e,t,n,o){if(!(t instanceof Array)||t.lengthn.indexOf(t))throw new gt(ht.INVALID_ARGUMENT,"Unknown option '"+t+"' passed to function "+e+"(). Available options: "+n.join(", "))})}function F(e,t,n,o){var r=M(o);return new gt(ht.INVALID_ARGUMENT,"Function "+e+"() requires its "+B(n)+" "+("argument to be a "+t+", but it was: "+r))}function B(e){return 1===e?"first":2===e?"second":3===e?"third":e+"th"}function U(e,t){return e+" "+t+(1===e?"":"s")}function V(e,t){return et?1:0}function q(e,t){return null!==e&&void 0!==e?!!(t&&e.isEqual(t)):e===t}function j(e,t){if(e.length!==t.length)return!1;for(var n=0;nt?1:e===t?0:isNaN(e)?isNaN(t)?0:-1:1}function X(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function Q(e){return null===e||void 0===e}function J(e){return nn(e)&&e<=tn&&e>=en}function $(e,t,n){if(n.isEqual(Vt.INSTANCE)){if(t!==rn.EQUAL)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on null.");return new sn(e)}if(n.isEqual(zt.NAN)){if(t!==rn.EQUAL)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You can only perform equals comparisons on NaN.");return new ln(e)}return new an(e,t,n)}function Y(e){return e===ht.OK?d("Treated status OK as error"):e===ht.CANCELLED||e===ht.UNKNOWN||e===ht.DEADLINE_EXCEEDED||e===ht.RESOURCE_EXHAUSTED||e===ht.INTERNAL||e===ht.UNAVAILABLE||e===ht.UNAUTHENTICATED?!1:e===ht.INVALID_ARGUMENT||e===ht.NOT_FOUND||e===ht.ALREADY_EXISTS||e===ht.PERMISSION_DENIED||e===ht.FAILED_PRECONDITION||e===ht.ABORTED||e===ht.OUT_OF_RANGE||e===ht.UNIMPLEMENTED||e===ht.DATA_LOSS||d("Unknown status code: "+e)}function Z(e){var t=In[e];return void 0===t?void 0:ee(t)}function ee(e){return void 0===e?(s("GRPC error has no .code"),ht.UNKNOWN):e===In.OK?ht.OK:e===In.CANCELLED?ht.CANCELLED:e===In.UNKNOWN?ht.UNKNOWN:e===In.DEADLINE_EXCEEDED?ht.DEADLINE_EXCEEDED:e===In.RESOURCE_EXHAUSTED?ht.RESOURCE_EXHAUSTED:e===In.INTERNAL?ht.INTERNAL:e===In.UNAVAILABLE?ht.UNAVAILABLE:e===In.UNAUTHENTICATED?ht.UNAUTHENTICATED:e===In.INVALID_ARGUMENT?ht.INVALID_ARGUMENT:e===In.NOT_FOUND?ht.NOT_FOUND:e===In.ALREADY_EXISTS?ht.ALREADY_EXISTS:e===In.PERMISSION_DENIED?ht.PERMISSION_DENIED:e===In.FAILED_PRECONDITION?ht.FAILED_PRECONDITION:e===In.ABORTED?ht.ABORTED:e===In.OUT_OF_RANGE?ht.OUT_OF_RANGE:e===In.UNIMPLEMENTED?ht.UNIMPLEMENTED:e===In.DATA_LOSS?ht.DATA_LOSS:d("Unknown status code: "+e)}function te(e){return void 0===e?In.OK:e===ht.OK?In.OK:e===ht.CANCELLED?In.CANCELLED:e===ht.UNKNOWN?In.UNKNOWN:e===ht.DEADLINE_EXCEEDED?In.DEADLINE_EXCEEDED:e===ht.RESOURCE_EXHAUSTED?In.RESOURCE_EXHAUSTED:e===ht.INTERNAL?In.INTERNAL:e===ht.UNAVAILABLE?In.UNAVAILABLE:e===ht.UNAUTHENTICATED?In.UNAUTHENTICATED:e===ht.INVALID_ARGUMENT?In.INVALID_ARGUMENT:e===ht.NOT_FOUND?In.NOT_FOUND:e===ht.ALREADY_EXISTS?In.ALREADY_EXISTS:e===ht.PERMISSION_DENIED?In.PERMISSION_DENIED:e===ht.FAILED_PRECONDITION?In.FAILED_PRECONDITION:e===ht.ABORTED?In.ABORTED:e===ht.OUT_OF_RANGE?In.OUT_OF_RANGE:e===ht.UNIMPLEMENTED?In.UNIMPLEMENTED:e===ht.DATA_LOSS?In.DATA_LOSS:d("Unknown status code: "+e)}function ne(e){return 200===e?ht.OK:400===e?ht.INVALID_ARGUMENT:401===e?ht.UNAUTHENTICATED:403===e?ht.PERMISSION_DENIED:404===e?ht.NOT_FOUND:409===e?ht.ABORTED:416===e?ht.OUT_OF_RANGE:429===e?ht.RESOURCE_EXHAUSTED:499===e?ht.CANCELLED:500===e?ht.UNKNOWN:501===e?ht.UNIMPLEMENTED:503===e?ht.UNAVAILABLE:504===e?ht.DEADLINE_EXCEEDED:200<=e&&300>e?ht.OK:400<=e&&500>e?ht.FAILED_PRECONDITION:500<=e&&600>e?ht.INTERNAL:ht.UNKNOWN}function oe(){return Ln}function re(){return _n}function ae(){return On}function ie(){return Mn}function se(e,t){0i||i>t-2)&&d("Invalid encoded resource path: \""+e+"\"");var s=e.charAt(i+1);switch(s){case Vo:var l=e.substring(r,i),p=void 0;0===o.length?p=l:(o+=l,p=o,o=""),n.push(p);break;case qo:o+=e.substring(r,i),o+="\0";break;case jo:o+=e.substring(r,i+1);break;default:d("Invalid encoded resource path: \""+e+"\"");}r=i+2}return new Et(n)}function be(e,t,n,o){c(n=o,"Unexpected schema upgrade from v${fromVersion} to v{toVersion}."),1>n&&1<=o&&(xe(e),ve(e),Se(e),ke(e));var r=So.resolve();return 2>n&&2<=o&&(r=we(t).next(function(e){return Ce(t,e)})),r}function xe(e){e.createObjectStore(Ho.store)}function ve(e){e.createObjectStore(Ko.store,{keyPath:Ko.keyPath}),e.createObjectStore(Go.store,{keyPath:Go.keyPath}),e.createObjectStore(Xo.store)}function ke(e){e.createObjectStore(Jo.store)}function Se(e){var t=e.createObjectStore(Yo.store,{keyPath:Yo.keyPath});t.createIndex(Yo.documentTargetsIndex,Yo.documentTargetsKeyPath,{unique:!0});var n=e.createObjectStore($o.store,{keyPath:$o.keyPath});n.createIndex($o.queryTargetsIndexName,$o.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(Zo.store)}function Ce(e,t){var n=e.store(Zo.store),o=e.store($o.store);return o.count().next(function(e){return t.targetCount=e,n.put(Zo.key,t)})}function we(e){var t=e.store(Zo.store);return t.get(Zo.key).next(function(e){return null==e?(e=new Zo(0,0,hn.MIN.toTimestamp(),0),t.put(Zo.key,e).next(function(){return e})):So.resolve(e)})}function Te(e){return new So(function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){n(e.target.error)}})}function Ee(e){return e instanceof Uint8Array?(c("YES"===process.env.USE_MOCK_PERSISTENCE,"Persisting non-string stream tokens is only supported with mock persistence ."),e.toString()):e}function Ae(e){return Le(e,Go.store)}function Ie(e){return Le(e,Xo.store)}function Ne(e){return Le(e,Ko.store)}function Le(e,t){return e instanceof ar?e.store(t):d("Invalid transaction object provided!")}function _e(e){return De(e,$o.store)}function Oe(e){return De(e,Zo.store)}function Me(e){return De(e,Yo.store)}function De(e,t){return e instanceof ar?e.store(t):d("Invalid transaction object provided!")}function Re(e){return e instanceof ar?e.store(Jo.store):d("Invalid transaction object provided!")}function Pe(e){return e.path.toArray()}function Fe(e){return void 0!==e.documents}function Be(e){if(!e)return new jr;switch(e.type){case"gapi":return new Hr(e.client,e.sessionIndex||"0");case"provider":return e.client;default:throw new gt(ht.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type");}}function Ue(e){return Ve(e,["next","error","complete"])}function Ve(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,o=0,r=t,i;on.query.docComparator(r,t.doc),"Got added events in wrong order"),r=t.doc,{type:"added",doc:i,oldIndex:-1,newIndex:o++}})}var i=n.oldDocs;return n.docChanges.filter(function(e){return t||e.type!==mo.Metadata}).map(function(t){var o=new ha(e,t.doc.key,t.doc,n.fromCache),r=-1,s=-1;return t.type!==mo.Added&&(r=i.indexOf(t.doc.key),c(0<=r,"Index for document not found"),i=i.delete(t.doc.key)),t.type!==mo.Removed&&(i=i.add(t.doc),s=i.indexOf(t.doc.key)),{type:Ye(t.type),doc:o,oldIndex:r,newIndex:s}})}function Ye(e){return e===mo.Added?"added":e===mo.Modified||e===mo.Metadata?"modified":e===mo.Removed?"removed":d("Unknown change type: "+e)}function Ze(e){e.INTERNAL.registerService("firestore",function(e){return new la(e)},b(Ia))}function et(e){Ze(e)}var tt=Number.POSITIVE_INFINITY,nt=Math.floor,ot=Math.min,rt=Math.max,at=String.fromCharCode;Object.defineProperty(t,"__esModule",{value:!0});var it=function(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}(n("dP58")),st=n("TUpU"),lt=n("vCxL"),dt=n("IIoC"),ct=it.SDK_VERSION,pt=new st.Logger("@firebase/firestore"),ut;(function(e){e[e.DEBUG=0]="DEBUG",e[e.ERROR=1]="ERROR",e[e.SILENT=2]="SILENT"})(ut||(ut={}));var mt=function(){function e(){}return e.setPlatform=function(t){e.platform&&d("Platform already defined"),e.platform=t},e.getPlatform=function(){return e.platform||d("Platform not set"),e.platform},e}(),ht={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},gt=function(e){function t(t,n){var o=e.call(this,n)||this;return o.code=t,o.message=n,o.name="FirebaseError",o.toString=function(){return o.name+": [code="+o.code+"]: "+o.message},o}return lt.__extends(t,e),t}(Error),ft=function(){function e(){}return e.newId=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="",n=0;20>n;n++)t+=e.charAt(nt(Math.random()*e.length));return c(20===t.length,"Invalid auto ID: "+t),t},e}(),yt=function(){function e(e){K(),this._binaryString=e}return e.fromBase64String=function(t){x("Blob.fromBase64String",arguments,1),C("Blob.fromBase64String","string",1,t),K();try{var n=mt.getPlatform().atob(t);return new e(n)}catch(t){throw new gt(ht.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+t)}},e.fromUint8Array=function(t){if(x("Blob.fromUint8Array",arguments,1),H(),!(t instanceof Uint8Array))throw F("Blob.fromUint8Array","Uint8Array",1,t);var n=Array.prototype.map.call(t,function(e){return at(e)}).join("");return new e(n)},e.prototype.toBase64=function(){return x("Blob.toBase64",arguments,0),K(),mt.getPlatform().btoa(this._binaryString)},e.prototype.toUint8Array=function(){x("Blob.toUint8Array",arguments,0),H();for(var e=new Uint8Array(this._binaryString.length),t=0;te||90t||180t)throw new gt(ht.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(1e9<=t)throw new gt(ht.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(-62135596800>e)throw new gt(ht.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(253402300800<=e)throw new gt(ht.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=nt(t/1e3);return new e(n,1e6*(t-1e3*n))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(e){return this.seconds===e.seconds?V(this.nanoseconds,e.nanoseconds):V(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e}(),kt=function(){return function(e,t,n,o){this.databaseId=e,this.persistenceKey=t,this.host=n,this.ssl=o}}(),St="(default)",Ct=function(){function e(e,t){this.projectId=e,this.database=t?t:St}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return this.database===St},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e.prototype.compareTo=function(e){return V(this.projectId,e.projectId)||V(this.database,e.database)},e}(),wt="__name__",Tt=function(){function e(e,t,n){this.init(e,t,n)}return e.prototype.init=function(e,t,n){void 0===t?t=0:t>e.length&&d("offset "+t+" out of range "+e.length),void 0===n?n=e.length-t:n>e.length-t&&d("length "+n+" out of range "+(e.length-t)),this.segments=e,this.offset=t,this.len=n},e.prototype.construct=function(e,t,n){var o=Object.create(Object.getPrototypeOf(this));return o.init(e,t,n),o},Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.comparator(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach(function(e){n.push(e)}):"string"==typeof t?n.push(t):d("Unknown parameter type for Path.child(): "+t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(e){return e=void 0===e?1:e,c(this.length>=e,"Can't call popFirst() with less segments"),this.construct(this.segments,this.offset+e,this.length-e)},e.prototype.popLast=function(){return c(!this.isEmpty(),"Can't call popLast() on empty path"),this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return c(!this.isEmpty(),"Can't call firstSegment() on empty path"),this.segments[this.offset]},e.prototype.lastSegment=function(){return c(!this.isEmpty(),"Can't call lastSegment() on empty path"),this.segments[this.limit()-1]},e.prototype.get=function(e){return c(ei)return 1}return e.lengtht.length?1:0},e}(),Et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lt.__extends(t,e),t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(e){if(0<=e.indexOf("//"))throw new gt(ht.INVALID_ARGUMENT,"Invalid path ("+e+"). Paths must not contain // in them.");var n=e.split("/").filter(function(e){return 0n?t=t.left:0o?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!0,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(e){return this.root.inorderTraversal(e)},e.prototype.forEach=function(e){this.inorderTraversal(function(t,n){return e(t,n),!1})},e.prototype.reverseTraversal=function(e){return this.root.reverseTraversal(e)},e.prototype.getIterator=function(){return new Mt(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(e){return new Mt(this.root,e,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new Mt(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(e){return new Mt(this.root,e,this.comparator,!0)},e}(),Mt=function(){function e(e,t,n,o){this.isReverse=o,this.nodeStack=[];for(var r=1;!e.isEmpty();)if(r=t?n(e.key,t):1,o&&(r*=-1),0>r)e=this.isReverse?e.left:e.right;else if(0===r){this.nodeStack.push(e);break}else this.nodeStack.push(e),e=this.isReverse?e.right:e.left}return e.prototype.getNext=function(){c(0n?r.copy(null,null,null,r.left.insert(e,t,o),null):0===n?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,o)),r.fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),t=t.copy(null,null,null,t.left.removeMin(),null),t.fixUp()},e.prototype.remove=function(t,o){var r=this,n;if(0>o(t,r.key))r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(t,o),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===o(t,r.key)){if(r.right.isEmpty())return e.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(t,o))}return r.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e},e.prototype.moveRedLeft=function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e},e.prototype.moveRedRight=function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth=function(){var e=this.check();return!!(Math.pow(2,e)<=this.size+1)},e.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw d("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed())throw d("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check();if(e!==this.right.check())throw d("Black depths differ");else return e+(this.isRed()?0:1)},e.EMPTY=null,e.RED=!0,e.BLACK=!1,e}(),Rt=function(){function e(){this.size=0}return e.prototype.copy=function(){return this},e.prototype.insert=function(e,t){return new Dt(e,t)},e.prototype.remove=function(){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(){return!1},e.prototype.reverseTraversal=function(){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}();Dt.EMPTY=new Rt;var Pt;(function(e){e[e.NullValue=0]="NullValue",e[e.BooleanValue=1]="BooleanValue",e[e.NumberValue=2]="NumberValue",e[e.TimestampValue=3]="TimestampValue",e[e.StringValue=4]="StringValue",e[e.BlobValue=5]="BlobValue",e[e.RefValue=6]="RefValue",e[e.GeoPointValue=7]="GeoPointValue",e[e.ArrayValue=8]="ArrayValue",e[e.ObjectValue=9]="ObjectValue"})(Pt||(Pt={}));var Ft;(function(e){e[e.Default=0]="Default",e[e.Estimate=1]="Estimate",e[e.Previous=2]="Previous"})(Ft||(Ft={}));var Bt=function(){function e(e,t){this.serverTimestampBehavior=e,this.timestampsInSnapshots=t}return e.fromSnapshotOptions=function(t,n){switch(t.serverTimestamps){case"estimate":return new e(Ft.Estimate,n);case"previous":return new e(Ft.Previous,n);case"none":case void 0:return new e(Ft.Default,n);default:return d("fromSnapshotOptions() called with invalid options.");}},e}(),Ut=function(){function e(){}return e.prototype.toString=function(){var e=this.value();return null===e?"null":e.toString()},e.prototype.defaultCompareTo=function(e){c(this.typeOrder!==e.typeOrder,"Default compareTo should not be used for values of same type.");var t=V(this.typeOrder,e.typeOrder);return t},e}(),Vt=function(e){function t(){var t=e.call(this)||this;return t.typeOrder=Pt.NullValue,t.internalValue=null,t}return lt.__extends(t,e),t.prototype.value=function(){return null},t.prototype.isEqual=function(e){return e instanceof t},t.prototype.compareTo=function(e){return e instanceof t?0:this.defaultCompareTo(e)},t.INSTANCE=new t,t}(Ut),qt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BooleanValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?V(this,e):this.defaultCompareTo(e)},t.of=function(e){return e?t.TRUE:t.FALSE},t.TRUE=new t(!0),t.FALSE=new t(!1),t}(Ut),jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.NumberValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.compareTo=function(e){return e instanceof t?G(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Wt=function(e){function t(t){return e.call(this,t)||this}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t}(jt),zt=function(e){function t(t){var n=e.call(this,t)||this;return n.internalValue=t,n}return lt.__extends(t,e),t.prototype.isEqual=function(e){return!!(e instanceof t)&&X(this.internalValue,e.internalValue)},t.NAN=new t(NaN),t.POSITIVE_INFINITY=new t(Infinity),t.NEGATIVE_INFINITY=new t(-Infinity),t}(jt),Ht=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.StringValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue===e.internalValue},t.prototype.compareTo=function(e){return e instanceof t?V(this.internalValue,e.internalValue):this.defaultCompareTo(e)},t}(Ut),Kt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.TimestampValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.timestampsInSnapshots?this.internalValue:this.internalValue.toDate()},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):e instanceof Gt?-1:this.defaultCompareTo(e)},t}(Ut),Gt=function(e){function t(t,n){var o=e.call(this)||this;return o.localWriteTime=t,o.previousValue=n,o.typeOrder=Pt.TimestampValue,o}return lt.__extends(t,e),t.prototype.value=function(e){return e&&e.serverTimestampBehavior===Ft.Estimate?new Kt(this.localWriteTime).value(e):e&&e.serverTimestampBehavior===Ft.Previous?this.previousValue?this.previousValue.value(e):null:null},t.prototype.isEqual=function(e){return e instanceof t&&this.localWriteTime.isEqual(e.localWriteTime)},t.prototype.compareTo=function(e){return e instanceof t?this.localWriteTime._compareTo(e.localWriteTime):e instanceof Kt?1:this.defaultCompareTo(e)},t.prototype.toString=function(){return""},t}(Ut),Xt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.BlobValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),Qt=function(e){function t(t,n){var o=e.call(this)||this;return o.databaseId=t,o.key=n,o.typeOrder=Pt.RefValue,o}return lt.__extends(t,e),t.prototype.value=function(){return this.key},t.prototype.isEqual=function(e){return!!(e instanceof t)&&this.key.isEqual(e.key)&&this.databaseId.isEqual(e.databaseId)},t.prototype.compareTo=function(e){if(e instanceof t){var n=this.databaseId.compareTo(e.databaseId);return 0===n?Nt.comparator(this.key,e.key):n}return this.defaultCompareTo(e)},t}(Ut),Jt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.GeoPointValue,n}return lt.__extends(t,e),t.prototype.value=function(){return this.internalValue},t.prototype.isEqual=function(e){return e instanceof t&&this.internalValue.isEqual(e.internalValue)},t.prototype.compareTo=function(e){return e instanceof t?this.internalValue._compareTo(e.internalValue):this.defaultCompareTo(e)},t}(Ut),$t=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ObjectValue,n}return lt.__extends(t,e),t.prototype.value=function(e){var t={};return this.internalValue.inorderTraversal(function(n,o){t[n]=o.value(e)}),t},t.prototype.forEach=function(e){this.internalValue.inorderTraversal(e)},t.prototype.isEqual=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),o=e.internalValue.getIterator();n.hasNext()&&o.hasNext();){var r=n.getNext(),i=o.getNext();if(r.key!==i.key||!r.value.isEqual(i.value))return!1}return!n.hasNext()&&!o.hasNext()}return!1},t.prototype.compareTo=function(e){if(e instanceof t){for(var n=this.internalValue.getIterator(),o=e.internalValue.getIterator();n.hasNext()&&o.hasNext();){var r=n.getNext(),i=o.getNext(),s=V(r.key,i.key)||r.value.compareTo(i.value);if(s)return s}return V(n.hasNext(),o.hasNext())}return this.defaultCompareTo(e)},t.prototype.set=function(e,n){if(c(!e.isEmpty(),"Cannot set field for empty path on ObjectValue"),1===e.length)return this.setChild(e.firstSegment(),n);var o=this.child(e.firstSegment());o instanceof t||(o=t.EMPTY);var r=o.set(e.popFirst(),n);return this.setChild(e.firstSegment(),r)},t.prototype.delete=function(e){if(c(!e.isEmpty(),"Cannot delete field for empty path on ObjectValue"),1===e.length)return new t(this.internalValue.remove(e.firstSegment()));var n=this.child(e.firstSegment());if(n instanceof t){var o=n.delete(e.popFirst());return new t(this.internalValue.insert(e.firstSegment(),o))}return this},t.prototype.contains=function(e){return void 0!==this.field(e)},t.prototype.field=function(e){c(!e.isEmpty(),"Can't get field of empty path");var n=this;return e.forEach(function(e){n=n instanceof t?n.internalValue.get(e)||void 0:void 0}),n},t.prototype.toString=function(){return JSON.stringify(this.value())},t.prototype.child=function(e){return this.internalValue.get(e)||void 0},t.prototype.setChild=function(e,n){return new t(this.internalValue.insert(e,n))},t.EMPTY=new t(new Ot(V)),t}(Ut),Yt=function(e){function t(t){var n=e.call(this)||this;return n.internalValue=t,n.typeOrder=Pt.ArrayValue,n}return lt.__extends(t,e),t.prototype.value=function(e){return this.internalValue.map(function(t){return t.value(e)})},t.prototype.forEach=function(e){this.internalValue.forEach(e)},t.prototype.isEqual=function(e){if(e instanceof t){if(this.internalValue.length!==e.internalValue.length)return!1;for(var n=0;n="===t?e.GREATER_THAN_OR_EQUAL:">"===t?e.GREATER_THAN:"array-contains"===t?e.ARRAY_CONTAINS:d("Unknown relation: "+t)},e.prototype.toString=function(){return this.name},e.prototype.isEqual=function(e){return this.name===e.name},e.LESS_THAN=new e("<"),e.LESS_THAN_OR_EQUAL=new e("<="),e.EQUAL=new e("=="),e.GREATER_THAN=new e(">"),e.GREATER_THAN_OR_EQUAL=new e(">="),e.ARRAY_CONTAINS=new e("array-contains"),e}(),an=function(){function e(e,t,n){this.field=e,this.op=t,this.value=n}return e.prototype.matches=function(e){if(this.field.isKeyField()){c(this.value instanceof Qt,"Comparing on key, but filter value not a RefValue"),c(this.op!==rn.ARRAY_CONTAINS,"array-contains queries don't make sense on document keys.");var t=this.value,n=Nt.comparator(e.key,t.key);return this.matchesComparison(n)}var o=e.field(this.field);return void 0!==o&&this.matchesValue(o)},e.prototype.matchesValue=function(e){var t=this;return this.op===rn.ARRAY_CONTAINS?e instanceof Yt&&void 0!==e.internalValue.find(function(e){return e.isEqual(t.value)}):this.value.typeOrder===e.typeOrder&&this.matchesComparison(e.compareTo(this.value))},e.prototype.matchesComparison=function(e){switch(this.op){case rn.LESS_THAN:return 0>e;case rn.LESS_THAN_OR_EQUAL:return 0>=e;case rn.EQUAL:return 0===e;case rn.GREATER_THAN:return 0=n:0>n},e.prototype.isEqual=function(e){if(null===e)return!1;if(this.before!==e.before||this.position.length!==e.position.length)return!1;for(var t=0;t":o.toString()}),r=this.serviceName+": "+r+" ("+o+").";var i=new eo(o,r);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}(),no=function(){return function(){this.blockSize=-1}}(),oo=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;ns;s++)r[s]=n.charCodeAt(o)<<24|n.charCodeAt(o+1)<<16|n.charCodeAt(o+2)<<8|n.charCodeAt(o+3),o+=4;else for(var s=0;16>s;s++)r[s]=n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3],o+=4;for(var s=16,i;80>s;s++)i=r[s-3]^r[s-8]^r[s-14]^r[s-16],r[s]=4294967295&(i<<1|i>>>31);for(var t=this.chain_[0],l=this.chain_[1],p=this.chain_[2],c=this.chain_[3],d=this.chain_[4],s=0,e,u;80>s;s++){40>s?20>s?(e=c^l&(p^c),u=1518500249):(e=l^p^c,u=1859775393):60>s?(e=l&p|c&(l|p),u=2400959708):(e=l^p^c,u=3395469782);var i=4294967295&(t<<5|t>>>27)+e+d+u+r[s];d=c,c=p,p=4294967295&(l<<30|l>>>2),l=t,t=i}this.chain_[0]=4294967295&this.chain_[0]+t,this.chain_[1]=4294967295&this.chain_[1]+l,this.chain_[2]=4294967295&this.chain_[2]+p,this.chain_[3]=4294967295&this.chain_[3]+c,this.chain_[4]=4294967295&this.chain_[4]+d},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var o=t-this.blockSize,r=0,n=this.buf_,i=this.inbuf_;rthis.inbuf_?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var o=this.blockSize-1;56<=o;o--)this.buf_[o]=255&t,t/=256;this.compress_(this.buf_);for(var r=0,o=0;5>o;o++)for(var n=24;0<=n;n-=8)e[r]=255&this.chain_[o]>>n,++r;return e},t}(no),ro=function(){function e(e){this.sendFn=e.sendFn,this.closeFn=e.closeFn}return e.prototype.onOpen=function(e){c(!this.wrappedOnOpen,"Called onOpen on stream twice!"),this.wrappedOnOpen=e},e.prototype.onClose=function(e){c(!this.wrappedOnClose,"Called onClose on stream twice!"),this.wrappedOnClose=e},e.prototype.onMessage=function(e){c(!this.wrappedOnMessage,"Called onMessage on stream twice!"),this.wrappedOnMessage=e},e.prototype.close=function(){this.closeFn()},e.prototype.send=function(e){this.sendFn(e)},e.prototype.callOnOpen=function(){c(void 0!==this.wrappedOnOpen,"Cannot call onOpen because no callback was set"),this.wrappedOnOpen()},e.prototype.callOnClose=function(e){c(void 0!==this.wrappedOnClose,"Cannot call onClose because no callback was set"),this.wrappedOnClose(e)},e.prototype.callOnMessage=function(e){c(void 0!==this.wrappedOnMessage,"Cannot call onMessage because no callback was set"),this.wrappedOnMessage(e)},e}(),ao="Connection",io={BatchGetDocuments:"batchGet",Commit:"commit"},so=function(){function e(e){this.databaseId=e.databaseId,this.pool=new dt.XhrIoPool;var t=e.ssl?"https":"http";this.baseUrl=t+"://"+e.host}return e.prototype.modifyHeadersForRequest=function(e,t){if(t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n]);e["X-Goog-Api-Client"]="gl-js/ fire/"+ct},e.prototype.invokeRPC=function(e,t,n){var o=this,r=this.makeUrl(e);return new Promise(function(s,l){o.pool.getObject(function(c){c.listenOnce(dt.EventType.COMPLETE,function(){try{switch(c.getLastErrorCode()){case dt.ErrorCode.NO_ERROR:var t=c.getResponseJson();i(ao,"XHR received:",JSON.stringify(t)),s(t);break;case dt.ErrorCode.TIMEOUT:i(ao,"RPC \""+e+"\" timed out"),l(new gt(ht.DEADLINE_EXCEEDED,"Request time out"));break;case dt.ErrorCode.HTTP_ERROR:var n=c.getStatus();i(ao,"RPC \""+e+"\" failed with status:",n,"response text:",c.getResponseText()),0>Ao<=e?n|this.generatorId:(n|this.generatorId)-(1<this.query.limit;){var p=s.last();s=s.delete(p.key),o.track({type:mo.Removed,doc:p})}return c(!l||!t,"View was refilled using docs that themselves needed refilling."),{documentSet:s,changeSet:o,needsRefill:l,mutatedKeys:i}},e.prototype.applyChanges=function(e,t){var n=this;c(!e.needsRefill,"Cannot apply changes that need a refill");var o=this.documentSet;this.documentSet=e.documentSet,this.mutatedKeys=e.mutatedKeys;var r=e.changeSet.getChanges();r.sort(function(e,t){return me(e.type,t.type)||n.query.docComparator(e.doc,t.doc)}),this.applyTargetChange(t);var i=this.updateLimboDocuments(),s=0===this.limboDocuments.size&&this.current,l=s?ho.Synced:ho.Local,d=l!==this.syncState;if(this.syncState=l,0===r.length&&!d)return{limboChanges:i};var p=new fo(this.query,e.documentSet,o,r,l===ho.Local,!e.mutatedKeys.isEmpty(),d,!1);return{snapshot:p,limboChanges:i}},e.prototype.applyOnlineStateChange=function(e){return this.current&&e===uo.Offline?(this.current=!1,this.applyChanges({documentSet:this.documentSet,changeSet:new go,mutatedKeys:this.mutatedKeys,needsRefill:!1})):{limboChanges:[]}},e.prototype.shouldBeInLimbo=function(e){return!this._syncedDocuments.has(e)&&!!this.documentSet.has(e)&&!this.documentSet.get(e).hasLocalMutations},e.prototype.applyTargetChange=function(e){if(e){var t=e.mapping;switch(t instanceof Fn?this._syncedDocuments=t.documents:t instanceof Bn&&(this._syncedDocuments=t.applyToKeySet(this._syncedDocuments)),e.currentStatusUpdate){case Rn.MarkCurrent:this.current=!0;break;case Rn.MarkNotCurrent:this.current=!1;break;case Rn.None:break;default:d("Unknown current status update: "+e.currentStatusUpdate);}}},e.prototype.updateLimboDocuments=function(){var e=this;if(!this.current)return[];var t=this.limboDocuments;this.limboDocuments=ie(),this.documentSet.forEach(function(t){e.shouldBeInLimbo(t.key)&&(e.limboDocuments=e.limboDocuments.add(t.key))});var n=[];return t.forEach(function(t){e.limboDocuments.has(t)||n.push(new _o(t))}),this.limboDocuments.forEach(function(e){t.has(e)||n.push(new Lo(e))}),n},e}(),Mo="SyncEngine",Do=function(){return function(e,t,n,o){this.query=e,this.targetId=t,this.resumeToken=n,this.view=o}}(),Ro=function(){function e(e,t,n){this.localStore=e,this.remoteStore=t,this.currentUser=n,this.viewHandler=null,this.errorHandler=null,this.queryViewsByQuery=new bo(function(e){return e.canonicalId()}),this.queryViewsByTarget={},this.limboTargetsByKey=new Ot(Nt.comparator),this.limboKeysByTarget={},this.limboDocumentRefs=new To,this.limboCollector=new Co,this.mutationUserCallbacks={},this.targetIdGenerator=No.forSyncEngine()}return e.prototype.subscribe=function(e,t){c(null!==e&&null!==t,"View and error handlers cannot be null"),c(null===this.viewHandler&&null===this.errorHandler,"SyncEngine already has a subscriber."),this.viewHandler=e,this.errorHandler=t,this.limboCollector.addGarbageSource(this.limboDocumentRefs)},e.prototype.listen=function(e){var t=this;return this.assertSubscribed("listen()"),c(!this.queryViewsByQuery.has(e),"We already listen to the query: "+e),this.localStore.allocateQuery(e).then(function(n){return t.localStore.executeQuery(e).then(function(o){return t.localStore.remoteDocumentKeys(n.targetId).then(function(r){var i=new Oo(e,r),s=i.computeDocChanges(o),l=i.applyChanges(s);c(0===l.limboChanges.length,"View returned limbo docs before target ack from the server."),c(!!l.snapshot,"applyChanges for new view should always return a snapshot");var d=new Do(e,n.targetId,n.resumeToken,i);t.queryViewsByQuery.set(e,d),t.queryViewsByTarget[n.targetId]=d,t.viewHandler([l.snapshot]),t.remoteStore.listen(n)})}).then(function(){return n.targetId})})},e.prototype.unlisten=function(e){var t=this;this.assertSubscribed("unlisten()");var n=this.queryViewsByQuery.get(e);return c(!!n,"Trying to unlisten on query not found:"+e),this.localStore.releaseQuery(e).then(function(){return t.remoteStore.unlisten(n.targetId),t.removeAndCleanupQuery(n).then(function(){return t.localStore.collectGarbage()})})},e.prototype.write=function(e,t){var n=this;return this.assertSubscribed("write()"),this.localStore.localWrite(e).then(function(e){return n.addMutationCallback(e.batchId,t),n.emitNewSnapsAndNotifyLocalStore(e.changes)}).then(function(){return n.remoteStore.fillWritePipeline()})},e.prototype.wrapUpdateFunctionError=function(e){return e},e.prototype.runTransaction=function(e,t){var n=this;void 0===t&&(t=5),c(0<=t,"Got negative number of retries for transaction.");var o=this.remoteStore.createTransaction();return function(){try{var t=e(o);return!Q(t)&&t.catch&&t.then?t.catch(function(t){return Promise.reject(n.wrapUpdateFunctionError(t))}):Promise.reject(Error("Transaction callback must return a Promise"))}catch(t){return Promise.reject(n.wrapUpdateFunctionError(t))}}().then(function(r){return o.commit().then(function(){return r}).catch(function(o){return 0===t?Promise.reject(o):n.runTransaction(e,t-1)})})},e.prototype.applyRemoteEvent=function(e){var t=this;return this.assertSubscribed("applyRemoteEvent()"),g(e.targetChanges,function(n,o){var r=t.limboKeysByTarget[n];if(!r){var i=t.queryViewsByTarget[n];c(!!i,"Missing QueryView for non-limbo query: "+n),o.mapping.filterUpdates(i.view.syncedDocuments)}else e.synthesizeDeleteForLimboTargetChange(o,r)}),this.localStore.applyRemoteEvent(e).then(function(n){return t.emitNewSnapsAndNotifyLocalStore(n,e)})},e.prototype.applyOnlineStateChange=function(e){var t=[];this.queryViewsByQuery.forEach(function(n,o){var r=o.view.applyOnlineStateChange(e);c(0===r.limboChanges.length,"OnlineState should not affect limbo documents."),r.snapshot&&t.push(r.snapshot)}),this.viewHandler(t)},e.prototype.rejectListen=function(e,t){var n=this;this.assertSubscribed("rejectListens()");var o=this.limboKeysByTarget[e];if(o){this.limboTargetsByKey=this.limboTargetsByKey.remove(o),delete this.limboKeysByTarget[e];var r=new Ot(Nt.comparator);r=r.insert(o,new _t(o,hn.forDeletedDoc()));var i=ie().add(o),s=new Dn(hn.MIN,{},r,i);return this.applyRemoteEvent(s)}var l=this.queryViewsByTarget[e];return c(!!l,"Unknown targetId: "+e),this.localStore.releaseQuery(l.query).then(function(){return n.removeAndCleanupQuery(l).then(function(){n.errorHandler(l.query,t)})})},e.prototype.applySuccessfulWrite=function(e){var t=this;return this.assertSubscribed("applySuccessfulWrite()"),this.processUserCallback(e.batch.batchId,null),this.localStore.acknowledgeBatch(e).then(function(e){return t.emitNewSnapsAndNotifyLocalStore(e)})},e.prototype.rejectFailedWrite=function(e,t){var n=this;return this.assertSubscribed("rejectFailedWrite()"),this.processUserCallback(e,t),this.localStore.rejectBatch(e).then(function(e){return n.emitNewSnapsAndNotifyLocalStore(e)})},e.prototype.addMutationCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];n||(n=new Ot(V)),n=n.insert(e,t),this.mutationUserCallbacks[this.currentUser.toKey()]=n},e.prototype.processUserCallback=function(e,t){var n=this.mutationUserCallbacks[this.currentUser.toKey()];if(n){var o=n.get(e);o&&(c(e===n.minKey(),"Mutation callbacks processed out-of-order?"),t?o.reject(t):o.resolve(),n=n.remove(e)),this.mutationUserCallbacks[this.currentUser.toKey()]=n}},e.prototype.removeAndCleanupQuery=function(e){return this.queryViewsByQuery.delete(e.query),delete this.queryViewsByTarget[e.targetId],this.limboDocumentRefs.removeReferencesForId(e.targetId),this.gcLimboDocuments()},e.prototype.updateTrackedLimbos=function(e,t){for(var n=0,o=t,r;n",e),n=this.store.put(e)):(i(nr,"PUT",this.store.name,e,t),n=this.store.put(t,e)),Te(n)},e.prototype.get=function(e){var t=this,n=this.store.get(e);return Te(n).next(function(n){return void 0===n&&(n=null),i(nr,"GET",t.store.name,e,n),n})},e.prototype.delete=function(e){i(nr,"DELETE",this.store.name,e);var t=this.store.delete(e);return Te(t)},e.prototype.count=function(){i(nr,"COUNT",this.store.name);var e=this.store.count();return Te(e)},e.prototype.loadAll=function(e,t){var n=this.cursor(this.options(e,t)),o=[];return this.iterateCursor(n,function(e,t){o.push(t)}).next(function(){return o})},e.prototype.deleteAll=function(e,t){i(nr,"DELETE ALL",this.store.name);var n=this.options(e,t);n.keysOnly=!1;var o=this.cursor(n);return this.iterateCursor(o,function(e,t,n){return n.delete()})},e.prototype.iterate=function(e,t){var n;t?n=e:(n={},t=e);var o=this.cursor(n);return this.iterateCursor(o,t)},e.prototype.iterateCursor=function(e,t){var n=[];return new So(function(o,r){e.onerror=function(e){r(e.target.error)},e.onsuccess=function(e){var r=e.target.result;if(!r)return void o();var i=new rr(r),s=t(r.primaryKey,r.value,i);s instanceof So&&n.push(s),i.isDone?o():null===i.skipToKey?r.continue():r.continue(i.skipToKey)}}).next(function(){return So.waitFor(n)})},e.prototype.options=function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:(c(void 0===t,"3rd argument must not be defined if 2nd is a range."),t=e)),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.keysOnly?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}(),sr=function(){function e(e,t){this.userId=e,this.serializer=t,this.garbageCollector=null}return e.forUser=function(t,n){c(""!==t.uid,"UserID must not be an empty string.");var o=t.isAuthenticated()?t.uid:"";return new e(o,n)},e.prototype.start=function(t){var n=this;return e.loadNextBatchIdFromDb(t).next(function(e){return n.nextBatchId=e,Ne(t).get(n.userId)}).next(function(e){return e||(e=new Ko(n.userId,Po,"")),n.metadata=e,n.metadata.lastAcknowledgedBatchId>=n.nextBatchId?n.checkEmpty(t).next(function(e){return c(e,"Reset nextBatchID is only possible when the queue is empty"),n.metadata.lastAcknowledgedBatchId=Po,Ne(t).put(n.metadata)}):So.resolve()})},e.loadNextBatchIdFromDb=function(e){var t=Po;return Ae(e).iterate({reverse:!0},function(e,n,o){var r=e[0],i=e[1];if(i>t&&(t=n.batchId),""===r)o.done();else{var s=W(r);o.skip([s])}}).next(function(){return t+1})},e.prototype.checkEmpty=function(e){var t=!0,n=IDBKeyRange.bound(this.keyForBatchId(Number.NEGATIVE_INFINITY),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ae(e).iterate({range:n},function(e,n,o){t=!1,o.done()}).next(function(){return t})},e.prototype.getNextBatchId=function(){return So.resolve(this.nextBatchId)},e.prototype.getHighestAcknowledgedBatchId=function(){return So.resolve(this.metadata.lastAcknowledgedBatchId)},e.prototype.acknowledgeBatch=function(e,t,n){var o=t.batchId;return c(o>this.metadata.lastAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order"),this.metadata.lastAcknowledgedBatchId=o,this.metadata.lastStreamToken=Ee(n),Ne(e).put(this.metadata)},e.prototype.getLastStreamToken=function(){return So.resolve(this.metadata.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.metadata.lastStreamToken=Ee(t),Ne(e).put(this.metadata)},e.prototype.addMutationBatch=function(e,t,n){var o=this,r=this.nextBatchId;this.nextBatchId++;var i=new Fo(r,t,n),s=this.serializer.toDbMutationBatch(this.userId,i);return Ae(e).put(s).next(function(){for(var t=[],i=0,s=n;i=o,"Should have found mutation after "+o),i=n.serializer.fromDbMutationBatch(t)),r.done()}).next(function(){return i})},e.prototype.getAllMutationBatches=function(e){var t=this,n=IDBKeyRange.bound(this.keyForBatchId(Po),this.keyForBatchId(Number.POSITIVE_INFINITY));return Ae(e).loadAll(n).next(function(e){return e.map(function(e){return t.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesThroughBatchId=function(e,t){var n=this,o=IDBKeyRange.bound(this.keyForBatchId(Po),this.keyForBatchId(t));return Ae(e).loadAll(o).next(function(e){return e.map(function(e){return n.serializer.fromDbMutationBatch(e)})})},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,o=Xo.prefixForPath(this.userId,t.path),r=IDBKeyRange.lowerBound(o),i=[];return Ie(e).iterate({range:r},function(o,r,s){var l=o[0],c=o[1],p=o[2],u=ye(c);if(l!==n.userId||!t.path.isEqual(u))return void s.done();var m=n.keyForBatchId(p);return Ae(e).get(m).next(function(e){null===e&&d("Dangling document-mutation reference found: "+o+" which points to "+m),i.push(n.serializer.fromDbMutationBatch(e))})}).next(function(){return i})},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this;c(!t.isDocumentQuery(),"Document queries shouldn't go down this path");var o=t.path,r=o.length+1,i=Xo.prefixForPath(this.userId,o),s=IDBKeyRange.lowerBound(i),l=new Nn(V);return Ie(e).iterate({range:s},function(e,t,i){var s=e[0],d=e[1],c=e[2],p=ye(d);return s===n.userId&&o.isPrefixOf(p)?void(p.length!==r||(l=l.add(c))):void i.done()}).next(function(){var t=[],o=[];return l.forEach(function(r){var i=n.keyForBatchId(r);o.push(Ae(e).get(i).next(function(e){null===e&&d("Dangling document-mutation reference found, which points to "+i),t.push(n.serializer.fromDbMutationBatch(e))}))}),So.waitFor(o).next(function(){return t})})},e.prototype.removeMutationBatches=function(e,t){for(var n=Ae(e),o=Ie(e),r=[],i=function(e){var t=IDBKeyRange.only(s.keyForBatchId(e.batchId)),i=0,l=n.iterate({range:t},function(e,t,n){return i++,n.delete()});r.push(l.next(function(){c(1==i,"Dangling document-mutation reference found: Missing batch "+e.batchId)}));for(var d=0,p=e.mutations;dthis.metadata.highestTargetId&&(this.metadata.highestTargetId=e.targetId,t=!0),t},Object.defineProperty(e.prototype,"count",{get:function(){return this.metadata.targetCount},enumerable:!0,configurable:!0}),e.prototype.getQueryData=function(e,t){var n=this,o=t.canonicalId(),r=IDBKeyRange.bound([o,Number.NEGATIVE_INFINITY],[o,tt]),i=null;return _e(e).iterate({range:r,index:$o.queryTargetsIndexName},function(e,o,r){var s=n.serializer.fromDbTarget(o);t.isEqual(s.query)&&(i=s,r.done())}).next(function(){return i})},e.prototype.addMatchingKeys=function(e,t,n){var o=[],r=Me(e);return t.forEach(function(e){var t=he(e.path);o.push(r.put(new Yo(n,t)))}),So.waitFor(o)},e.prototype.removeMatchingKeys=function(e,t,n){var o=this,r=[],i=Me(e);return t.forEach(function(e){var t=he(e.path);r.push(i.delete([n,t])),null!==o.garbageCollector&&o.garbageCollector.addPotentialGarbageKey(e)}),So.waitFor(r)},e.prototype.removeMatchingKeysForTargetId=function(e,t){var n=Me(e),o=IDBKeyRange.bound([t],[t+1],!1,!0);return this.notifyGCForRemovedKeys(e,o).next(function(){return n.delete(o)})},e.prototype.notifyGCForRemovedKeys=function(e,t){var n=this,o=Me(e);return null!==this.garbageCollector&&this.garbageCollector.isEager?o.iterate({range:t,keysOnly:!0},function(e){var t=ye(e[1]),o=new Nt(t);c(null!==n.garbageCollector,"GarbageCollector for query cache set to null during key removal."),n.garbageCollector.addPotentialGarbageKey(o)}):So.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),o=Me(e),r=ie();return o.iterate({range:n,keysOnly:!0},function(e){var t=ye(e[1]),n=new Nt(t);r=r.add(n)}).next(function(){return r})},e.prototype.setGarbageCollector=function(e){this.garbageCollector=e},e.prototype.containsKey=function(e,t){c(null!==e,"Persistence Transaction cannot be null for query cache containsKey");var n=he(t.path),o=IDBKeyRange.bound([n],[z(n)],!1,!0),r=0;return Me(e).iterate({index:Yo.documentTargetsIndex,keysOnly:!0,range:o},function(e,t,n){r++,n.done()}).next(function(){return 0t?(s("Persistence owner-lease is in the future. Discarding.",e),!1):e.ownerId!==this.getZombiedOwnerId())},e.prototype.scheduleOwnerLeaseRefreshes=function(){var e=this;this.ownerLeaseRefreshHandle=setInterval(function(){var t=e.runTransaction("Refresh owner timestamp",function(t){var n=t.store(Ho.store);return n.put("owner",new Ho(e.ownerId,Date.now()))});t.catch(function(t){s(t),e.stopOwnerLeaseRefreshes()})},4e3)},e.prototype.stopOwnerLeaseRefreshes=function(){this.ownerLeaseRefreshHandle&&(clearInterval(this.ownerLeaseRefreshHandle),this.ownerLeaseRefreshHandle=null)},e.prototype.attachWindowUnloadHook=function(){var e=this;"object"==typeof window&&"function"==typeof window.addEventListener&&(this.windowUnloadHandler=function(){e.setZombiedOwnerId(e.ownerId),e.shutdown()},window.addEventListener("unload",this.windowUnloadHandler))},e.prototype.detachWindowUnloadHook=function(){this.windowUnloadHandler&&(c("object"==typeof window&&"function"==typeof window.removeEventListener,"Expected 'window.removeEventListener' to be a function"),window.removeEventListener("unload",this.windowUnloadHandler),this.windowUnloadHandler=null)},e.prototype.getZombiedOwnerId=function(){try{var e=window.localStorage.getItem(this.zombiedOwnerLocalStorageKey());return i(pr,"Zombied ownerID from LocalStorage:",e),e}catch(t){return s("Failed to get zombie owner id.",t),null}},e.prototype.setZombiedOwnerId=function(e){try{null===e?window.localStorage.removeItem(this.zombiedOwnerLocalStorageKey()):window.localStorage.setItem(this.zombiedOwnerLocalStorageKey(),e)}catch(t){s("Failed to set zombie owner id.",t)}},e.prototype.zombiedOwnerLocalStorageKey=function(){return this.localStoragePrefix+"zombiedOwnerId"},e.prototype.generateOwnerId=function(){return ft.newId()},e.MAIN_DATABASE="main",e}(),hr=function(){function e(e,t){this.remoteDocumentCache=e,this.mutationQueue=t}return e.prototype.getDocument=function(e,t){var n=this;return this.remoteDocumentCache.getEntry(e,t).next(function(o){return n.computeLocalDocument(e,t,o)})},e.prototype.getDocuments=function(e,t){var n=this,o=[],r=oe();return t.forEach(function(t){o.push(n.getDocument(e,t).next(function(e){e||(e=new _t(t,hn.forDeletedDoc())),r=r.insert(t,e)}))}),So.waitFor(o).next(function(){return r})},e.prototype.getDocumentsMatchingQuery=function(e,t){return Nt.isDocumentKey(t.path)?this.getDocumentsMatchingDocumentQuery(e,t.path):this.getDocumentsMatchingCollectionQuery(e,t)},e.prototype.getDocumentsMatchingDocumentQuery=function(e,t){return this.getDocument(e,new Nt(t)).next(function(e){var t=re();return e instanceof Lt&&(t=t.insert(e.key,e)),t})},e.prototype.getDocumentsMatchingCollectionQuery=function(e,t){var n=this,o;return this.remoteDocumentCache.getDocumentsMatchingQuery(e,t).next(function(t){return n.computeLocalDocuments(e,t)}).next(function(r){return o=r,n.mutationQueue.getAllMutationBatchesAffectingQuery(e,t)}).next(function(t){for(var r=ie(),i=0,s=t,l;it,"Acknowledged batches can't be rejected."),o})}).next(function(){return t.removeMutationBatch(n,o)}).next(function(e){return r=e,t.mutationQueue.performConsistencyCheck(n)}).next(function(){return t.localDocuments.getDocuments(n,r)})})},e.prototype.getLastStreamToken=function(){var e=this;return this.persistence.runTransaction("Get last stream token",function(t){return e.mutationQueue.getLastStreamToken(t)})},e.prototype.setLastStreamToken=function(e){var t=this;return this.persistence.runTransaction("Set last stream token",function(n){return t.mutationQueue.setLastStreamToken(n,e)})},e.prototype.getLastRemoteSnapshotVersion=function(){return this.queryCache.getLastRemoteSnapshotVersion()},e.prototype.applyRemoteEvent=function(e){var t=this,n=new gr(this.remoteDocuments);return this.persistence.runTransaction("Apply remote event",function(o){var r=[];g(e.targetChanges,function(e,n){var i=t.targetIds[e];if(i){var s=n.mapping;if(s)if(s instanceof Fn)r.push(t.queryCache.removeMatchingKeysForTargetId(o,e).next(function(){return t.queryCache.addMatchingKeys(o,s.documents,e)}));else if(s instanceof Bn)r.push(t.queryCache.removeMatchingKeys(o,s.removedDocuments,e).next(function(){return t.queryCache.addMatchingKeys(o,s.addedDocuments,e)}));else return d("Unknown mapping type: "+JSON.stringify(s));var l=n.resumeToken;0=e.compareTo(t)||y(this.targetIds)},e.prototype.shouldHoldBatchResult=function(e){return!this.isRemoteUpToVersion(e)||0i.version.compareTo(s))&&(i=o.applyToRemoteDocument(r,i,t),i?n.addEntry(i):c(!e,"Mutation batch "+o+" applied to document "+e+" resulted in null"))})}),i},e}(),yr=function(){function e(){this.mutationQueue=[],this.nextBatchId=1,this.highestAcknowledgedBatchId=Po,this.lastStreamToken=p(),this.garbageCollector=null,this.batchesByDocumentKey=new Nn(Eo.compareByKey)}return e.prototype.start=function(){return 0===this.mutationQueue.length&&(this.nextBatchId=1,this.highestAcknowledgedBatchId=Po),c(this.highestAcknowledgedBatchIdthis.highestAcknowledgedBatchId,"Mutation batchIDs must be acknowledged in order");var r=this.indexOfExistingBatchId(o,"acknowledged"),i=this.mutationQueue[r];return c(o===i.batchId,"Queue ordering failure: expected batch "+o+", got batch "+i.batchId),c(!i.isTombstone(),"Can't acknowledge a previously removed batch"),this.highestAcknowledgedBatchId=o,this.lastStreamToken=n,So.resolve()},e.prototype.getLastStreamToken=function(){return So.resolve(this.lastStreamToken)},e.prototype.setLastStreamToken=function(e,t){return this.lastStreamToken=t,So.resolve()},e.prototype.addMutationBatch=function(e,t,n){c(0!==n.length,"Mutation batches should not be empty");var o=this.nextBatchId;if(this.nextBatchId++,0r?0:r,s;io?o=0:o>=n?o=n:o++,So.resolve(this.getAllLiveMutationBatchesBeforeIndex(o))},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,o=new Eo(t,0),r=new Eo(t,tt),i=[];return this.batchesByDocumentKey.forEachInRange([o,r],function(e){c(t.isEqual(e.key),"Should only iterate over a single key's batches");var o=n.findMutationBatch(e.targetOrBatchId);c(null!==o,"Batches in the index must exist in the main table"),i.push(o)}),So.resolve(i)},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this,o=t.path,r=o.length+1,i=o;Nt.isDocumentKey(i)||(i=i.child(""));var s=new Eo(new Nt(i),0),l=new Nn(V);this.batchesByDocumentKey.forEachWhile(function(e){var t=e.key.path;return!!o.isPrefixOf(t)&&(t.length===r&&(l=l.add(e.targetOrBatchId)),!0)},s);var d=[];return l.forEach(function(e){var t=n.findMutationBatch(e);null!==t&&d.push(t)}),So.resolve(d)},e.prototype.removeMutationBatches=function(e,t){var n=t.length;c(0t||t>=this.mutationQueue.length)return null;var n=this.mutationQueue[t];return c(n.batchId===e,"If found batch must match"),n.isTombstone()?null:n},e}(),br=function(){function e(){this.queries=new bo(function(e){return e.canonicalId()}),this.lastRemoteSnapshotVersion=hn.MIN,this.highestTargetId=0,this.references=new To,this.targetCount=0}return e.prototype.start=function(){return So.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(){return this.lastRemoteSnapshotVersion},e.prototype.getHighestTargetId=function(){return this.highestTargetId},e.prototype.setLastRemoteSnapshotVersion=function(e,t){return this.lastRemoteSnapshotVersion=t,So.resolve()},e.prototype.saveQueryData=function(e){this.queries.set(e.query,e);var t=e.targetId;t>this.highestTargetId&&(this.highestTargetId=t)},e.prototype.addQueryData=function(e,t){return c(!this.queries.has(t.query),"Adding a query that already exists"),this.saveQueryData(t),this.targetCount+=1,So.resolve()},e.prototype.updateQueryData=function(e,t){return c(this.queries.has(t.query),"Updating a non-existent query"),this.saveQueryData(t),So.resolve()},e.prototype.removeQueryData=function(e,t){return c(0n.indexOf("Firestore Test Simulated Error")&&setTimeout(function(){throw e},0),e}).then(function(e){return t.operationInProgress=!1,e})});return this.tail=n,n},e.prototype.enqueueAfterDelay=function(e,t,n){var o=this;this.verifyNotFailed(),c(!this.containsDelayedOperation(e),"Attempted to schedule multiple operations with timer id "+e+".");var r=wr.createAndSchedule(this,e,t,n,function(e){return o.removeDelayedOperation(e)});return this.delayedOperations.push(r),r},e.prototype.verifyNotFailed=function(){this.failure&&d("AsyncQueue is already failed: "+(this.failure.stack||this.failure.message))},e.prototype.verifyOperationInProgress=function(){c(this.operationInProgress,"verifyOpInProgress() called when no op in progress on this queue.")},e.prototype.drain=function(){return this.enqueue(function(){return Promise.resolve()})},e.prototype.containsDelayedOperation=function(e){return 0<=this.delayedOperations.findIndex(function(t){return t.timerId===e})},e.prototype.runDelayedOperationsEarly=function(e){var t=this;return this.drain().then(function(){c(e===Cr.All||t.containsDelayedOperation(e),"Attempted to drain to missing operation "+e),t.delayedOperations.sort(function(e,t){return e.targetTimeMs-t.targetTimeMs});for(var n=0,o=t.delayedOperations,r;nthis.maxDelayMs&&(this.currentBaseMs=this.maxDelayMs)},e.prototype.cancel=function(){null!==this.timerPromise&&(this.timerPromise.cancel(),this.timerPromise=null)},e.prototype.jitterDelayMs=function(){return(Math.random()-0.5)*this.currentBaseMs},e}(),Ar;(function(e){e[e.Initial=0]="Initial",e[e.Auth=1]="Auth",e[e.Open=2]="Open",e[e.Error=3]="Error",e[e.Backoff=4]="Backoff",e[e.Stopped=5]="Stopped"})(Ar||(Ar={}));var Ir=function(){function e(e,t,n,o,r){this.queue=e,this.idleTimerId=n,this.connection=o,this.credentialsProvider=r,this.inactivityTimerPromise=null,this.stream=null,this.listener=null,this.backoff=new Er(e,t,1e3,1.5,60000),this.state=Ar.Initial}return e.prototype.isStarted=function(){return this.state===Ar.Backoff||this.state===Ar.Auth||this.state===Ar.Open},e.prototype.isOpen=function(){return this.state===Ar.Open},e.prototype.start=function(e){return this.state===Ar.Error?void this.performBackoff(e):void(c(this.state===Ar.Initial,"Already started"),this.listener=e,this.auth())},e.prototype.stop=function(){this.isStarted()&&this.close(Ar.Stopped)},e.prototype.inhibitBackoff=function(){c(!this.isStarted(),"Can only inhibit backoff in a stopped state"),this.state=Ar.Initial,this.backoff.reset()},e.prototype.markIdle=function(){var e=this;this.isOpen()&&null===this.inactivityTimerPromise&&(this.inactivityTimerPromise=this.queue.enqueueAfterDelay(this.idleTimerId,60000,function(){return e.handleIdleCloseTimer()}))},e.prototype.sendRequest=function(e){this.cancelIdleCheck(),this.stream.send(e)},e.prototype.handleIdleCloseTimer=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.isOpen()?[2,this.close(Ar.Initial)]:[2]})})},e.prototype.cancelIdleCheck=function(){this.inactivityTimerPromise&&(this.inactivityTimerPromise.cancel(),this.inactivityTimerPromise=null)},e.prototype.close=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return c(e===Ar.Error||Q(t),"Can't provide an error when not in an error state."),this.cancelIdleCheck(),this.backoff.cancel(),e===Ar.Error?t&&t.code===ht.RESOURCE_EXHAUSTED&&(s(t.toString()),s("Using maximum backoff delay to prevent overloading the backend."),this.backoff.resetToMax()):this.backoff.reset(),null!==this.stream&&(this.tearDown(),this.stream.close(),this.stream=null),this.state=e,n=this.listener,this.listener=null,e===Ar.Stopped?[2]:[2,n.onClose(t)]})})},e.prototype.tearDown=function(){},e.prototype.auth=function(){var e=this;c(this.state===Ar.Initial,"Must be in initial state to auth"),this.state=Ar.Auth,this.credentialsProvider.getToken(!1).then(function(t){e.startStream(t)},function(t){e.queue.enqueue(function(){return lt.__awaiter(e,void 0,void 0,function(){var e;return lt.__generator(this,function(){return this.state===Ar.Stopped?[2]:(e=new gt(ht.UNKNOWN,"Fetching auth token failed: "+t.message),[2,this.handleStreamClose(e)])})})})})},e.prototype.startStream=function(e){var t=this;if(this.state!==Ar.Stopped){c(this.state===Ar.Auth,"Trying to start stream in a non-auth state");var n=function(e,n){t.queue.enqueue(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.stream===e?[2,n()]:[2]})})})};if(null!==this.listener){var o=this.startRpc(e);this.stream=o,this.stream.onOpen(function(){n(o,function(){return c(t.state===Ar.Auth,"Expected stream to be in state auth, but was "+t.state),t.state=Ar.Open,t.listener.onOpen()})}),this.stream.onClose(function(e){n(o,function(){return t.handleStreamClose(e)})}),this.stream.onMessage(function(e){n(o,function(){return t.onMessage(e)})})}}},e.prototype.performBackoff=function(e){var t=this;c(this.state===Ar.Error,"Should only perform backoff in an error case"),this.state=Ar.Backoff,this.backoff.backoffAndRun(function(){return lt.__awaiter(t,void 0,void 0,function(){return lt.__generator(this,function(){return this.state===Ar.Stopped?[2]:(this.state=Ar.Initial,this.start(e),c(this.isStarted(),"PersistentStream should have started"),[2])})})})},e.prototype.handleStreamClose=function(e){return c(this.isStarted(),"Can't handle server close on non-started stream"),i("PersistentStream","close with error: "+e),this.stream=null,this.close(Ar.Error,e)},e}(),Nr=function(e){function t(t,n,o,r){var i=e.call(this,t,Cr.ListenStreamConnectionBackoff,Cr.ListenStreamIdle,n,o)||this;return i.serializer=r,i}return lt.__extends(t,e),t.prototype.startRpc=function(e){return this.connection.openStream("Listen",e)},t.prototype.onMessage=function(e){this.backoff.reset();var t=this.serializer.fromWatchChange(e),n=this.serializer.versionFromListenResponse(e);return this.listener.onWatchChange(t,n)},t.prototype.watch=function(e){var t={database:this.serializer.encodedDatabaseId,addTarget:this.serializer.toTarget(e)},n=this.serializer.toListenRequestLabels(e);n&&(t.labels=n),this.sendRequest(t)},t.prototype.unwatch=function(e){var t={};t.database=this.serializer.encodedDatabaseId,t.removeTarget=e,this.sendRequest(t)},t}(Ir),Lr=function(e){function t(t,n,o,r){var i=e.call(this,t,Cr.WriteStreamConnectionBackoff,Cr.WriteStreamIdle,n,o)||this;return i.serializer=r,i.handshakeComplete_=!1,i}return lt.__extends(t,e),Object.defineProperty(t.prototype,"handshakeComplete",{get:function(){return this.handshakeComplete_},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.handshakeComplete_=!1,e.prototype.start.call(this,t)},t.prototype.tearDown=function(){this.handshakeComplete_&&this.writeMutations([])},t.prototype.startRpc=function(e){return this.connection.openStream("Write",e)},t.prototype.onMessage=function(e){if(c(!!e.streamToken,"Got a write response without a stream token"),this.lastStreamToken=e.streamToken,!this.handshakeComplete_)return c(!e.writeResults||0===e.writeResults.length,"Got mutation results for handshake"),this.handshakeComplete_=!0,this.listener.onHandshakeComplete();this.backoff.reset();var t=this.serializer.fromWriteResults(e.writeResults),n=this.serializer.fromVersion(e.commitTime);return this.listener.onMutationResult(n,t)},t.prototype.writeHandshake=function(){c(this.isOpen(),"Writing handshake requires an opened stream"),c(!this.handshakeComplete_,"Handshake already completed");var e={};e.database=this.serializer.encodedDatabaseId,this.sendRequest(e)},t.prototype.writeMutations=function(e){var t=this;c(this.isOpen(),"Writing mutations requires an opened stream"),c(this.handshakeComplete_,"Handshake must be complete before writing mutations"),c(0=Mr&&(this.clearOnlineStateTimer(),this.logClientOfflineWarningIfNecessary("Connection failed "+Mr+" "+("times. Most recent error: "+e.toString())),this.setAndBroadcast(uo.Offline)))},e.prototype.set=function(e){this.clearOnlineStateTimer(),this.watchStreamFailures=0,e===uo.Online&&(this.shouldWarnClientIsOffline=!1),this.setAndBroadcast(e)},e.prototype.setAndBroadcast=function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))},e.prototype.logClientOfflineWarningIfNecessary=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.shouldWarnClientIsOffline?(s(t),this.shouldWarnClientIsOffline=!1):i("OnlineStateTracker",t)},e.prototype.clearOnlineStateTimer=function(){null!==this.onlineStateTimer&&(this.onlineStateTimer.cancel(),this.onlineStateTimer=null)},e}(),Pr="RemoteStore",Fr=function(){function e(e,t,n,o){this.localStore=e,this.datastore=t,this.pendingWrites=[],this.lastBatchSeen=Po,this.listenTargets={},this.pendingTargetResponses={},this.accumulatedWatchChanges=[],this.watchStream=null,this.writeStream=null,this.onlineStateTracker=new Rr(n,o)}return e.prototype.start=function(){return this.enableNetwork()},e.prototype.isNetworkEnabled=function(){return c(null==this.watchStream==(null==this.writeStream),"WatchStream and WriteStream should both be null or non-null"),null!=this.watchStream},e.prototype.enableNetwork=function(){var e=this;return this.isNetworkEnabled()?Promise.resolve():(this.watchStream=this.datastore.newPersistentWatchStream(),this.writeStream=this.datastore.newPersistentWriteStream(),this.localStore.getLastStreamToken().then(function(t){return e.writeStream.lastStreamToken=t,e.shouldStartWatchStream()?e.startWatchStream():e.onlineStateTracker.set(uo.Unknown),e.fillWritePipeline()}))},e.prototype.disableNetwork=function(){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return this.disableNetworkInternal(),this.onlineStateTracker.set(uo.Offline),[2]})})},e.prototype.disableNetworkInternal=function(){this.isNetworkEnabled()&&(this.watchStream.stop(),this.writeStream.stop(),this.cleanUpWatchStreamState(),this.cleanUpWriteStreamState(),this.writeStream=null,this.watchStream=null)},e.prototype.shutdown=function(){return i(Pr,"RemoteStore shutting down."),this.disableNetworkInternal(),this.onlineStateTracker.set(uo.Unknown),Promise.resolve()},e.prototype.listen=function(e){c(!m(this.listenTargets,e.targetId),"listen called with duplicate targetId!"),this.listenTargets[e.targetId]=e,this.shouldStartWatchStream()?this.startWatchStream():this.isNetworkEnabled()&&this.watchStream.isOpen()&&this.sendWatchRequest(e)},e.prototype.unlisten=function(e){c(m(this.listenTargets,e),"unlisten called without assigned target ID!"),delete this.listenTargets[e],this.isNetworkEnabled()&&this.watchStream.isOpen()&&(this.sendUnwatchRequest(e),y(this.listenTargets)&&this.watchStream.markIdle())},e.prototype.sendWatchRequest=function(e){this.recordPendingTargetRequest(e.targetId),this.watchStream.watch(e)},e.prototype.sendUnwatchRequest=function(e){this.recordPendingTargetRequest(e),this.watchStream.unwatch(e)},e.prototype.recordPendingTargetRequest=function(e){this.pendingTargetResponses[e]=(this.pendingTargetResponses[e]||0)+1},e.prototype.startWatchStream=function(){c(this.shouldStartWatchStream(),"startWriteStream() called when shouldStartWatchStream() is false."),this.watchStream.start({onOpen:this.onWatchStreamOpen.bind(this),onClose:this.onWatchStreamClose.bind(this),onWatchChange:this.onWatchStreamChange.bind(this)}),this.onlineStateTracker.handleWatchStreamStart()},e.prototype.shouldStartWatchStream=function(){return this.isNetworkEnabled()&&!this.watchStream.isStarted()&&!y(this.listenTargets)},e.prototype.cleanUpWatchStreamState=function(){this.accumulatedWatchChanges=[],this.pendingTargetResponses={}},e.prototype.onWatchStreamOpen=function(){return lt.__awaiter(this,void 0,void 0,function(){var e=this;return lt.__generator(this,function(){return g(this.listenTargets,function(t,n){e.sendWatchRequest(n)}),[2]})})},e.prototype.onWatchStreamClose=function(e){return lt.__awaiter(this,void 0,void 0,function(){return lt.__generator(this,function(){return c(this.isNetworkEnabled(),"onWatchStreamClose() should only be called when the network is enabled"),this.cleanUpWatchStreamState(),this.shouldStartWatchStream()?(e&&this.onlineStateTracker.handleWatchStreamFailure(e),this.startWatchStream()):this.onlineStateTracker.set(uo.Unknown),[2]})})},e.prototype.onWatchStreamChange=function(e,t){return lt.__awaiter(this,void 0,void 0,function(){var n;return lt.__generator(this,function(){return(this.onlineStateTracker.set(uo.Online),e instanceof jn&&e.state===qn.Removed&&e.cause)?[2,this.handleTargetError(e)]:(this.accumulatedWatchChanges.push(e),!t.isEqual(hn.MIN)&&0<=t.compareTo(this.localStore.getLastRemoteSnapshotVersion())?(n=this.accumulatedWatchChanges,this.accumulatedWatchChanges=[],[2,this.handleWatchChangeBatch(t,n)]):[2])})})},e.prototype.handleWatchChangeBatch=function(e,t){var n=this,o=new Wn(e,this.listenTargets,this.pendingTargetResponses);o.addChanges(t);var r=o.createRemoteEvent();this.pendingTargetResponses=o.pendingTargetResponses;var i=[];return g(o.existenceFilters,function(t,o){var s=n.listenTargets[t];if(s){var l=s.query;if(!l.isDocumentQuery()){var d=n.localStore.remoteDocumentKeys(t).then(function(e){if(r.targetChanges[t]){var i=r.targetChanges[t].mapping;null!==i&&(i instanceof Bn?e=i.applyToKeySet(e):(c(i instanceof Fn,"Expected either reset or update mapping but got something else: "+i),e=i.documents))}if(e.size!==o.count){r.handleExistenceFilterMismatch(t);var d=new fn(l,t,s.purpose);n.listenTargets[t]=d,n.sendUnwatchRequest(t);var p=new fn(l,t,gn.ExistenceFilterMismatch);n.sendWatchRequest(p)}});i.push(d)}else if(0===o.count){var p=new Nt(l.path),u=new _t(p,e);r.addDocumentUpdate(u)}else c(1===o.count,"Single document existence filter with count: "+o.count)}}),Promise.all(i).then(function(){return g(r.targetChanges,function(e,t){if(0() instead."),Yr=/^__.*__$/,Zr=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutations=function(e,t){var n=[];return null===this.fieldMask?n.push(new Cn(e,this.data,t)):n.push(new wn(e,this.data,this.fieldMask,t)),0=e.docs.size,"Too many documents returned on a document query");var o=e.docs.get(n._key);t.next(new ma(n.firestore,n._key,o,e.fromCache))}},error:o}),i=this._firestoreClient.listen(on.atPath(this._key.path),r,e);return function(){r.mute(),n._firestoreClient.unlisten(i)}},e.prototype.get=function(e){var t=this;return P("DocumentReference.get",e,["source"]),e&&L("DocumentReference.get","options","source",e.source,["default","server","cache"]),new Promise(function(n,o){e&&"cache"===e.source?t.firestore.ensureClientConfigured().getDocumentFromLocalCache(t._key).then(function(e){n(new ma(t.firestore,t._key,e,!0))},o):t.getViaSnapshotListener(n,o,e)})},e.prototype.getViaSnapshotListener=function(e,t,n){var o=this.onSnapshotInternal({includeMetadataChanges:!0,waitForSyncWhenOnline:!0},{next:function(r){o(),!r.exists&&r.metadata.fromCache?t(new gt(ht.UNAVAILABLE,"Failed to get document because the client is offline.")):r.exists&&r.metadata.fromCache&&n&&"server"===n.source?t(new gt(ht.UNAVAILABLE,"Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to \"server\" to retrieve the cached document.)")):e(r)},error:t})},e}(),ua=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),ma=function(){function e(e,t,n,o){this._firestore=e,this._key=t,this._document=n,this._fromCache=o}return e.prototype.data=function(e){return k("DocumentSnapshot.data",arguments,0,1),e=Qe("DocumentSnapshot.data",e),this._document?this.convertObject(this._document.data,Bt.fromSnapshotOptions(e,this._firestore._areTimestampsInSnapshotsEnabled())):void 0},e.prototype.get=function(e,t){if(k("DocumentSnapshot.get",arguments,1,2),t=Qe("DocumentSnapshot.get",t),this._document){var n=this._document.data.field(ze("DocumentSnapshot.get",e));if(void 0!==n)return this.convertValue(n,Bt.fromSnapshotOptions(t,this._firestore._areTimestampsInSnapshotsEnabled()))}},Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new pa(this._key,this._firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return null!==this._document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return new ua(null!==this._document&&this._document.hasLocalMutations,this._fromCache)},enumerable:!0,configurable:!0}),e.prototype.isEqual=function(t){if(!(t instanceof e))throw F("isEqual","DocumentSnapshot",1,t);return this._firestore===t._firestore&&this._fromCache===t._fromCache&&this._key.isEqual(t._key)&&(null===this._document?null===t._document:this._document.isEqual(t._document))},e.prototype.convertObject=function(e,t){var n=this,o={};return e.forEach(function(e,r){o[e]=n.convertValue(r,t)}),o},e.prototype.convertValue=function(e,t){if(e instanceof $t)return this.convertObject(e,t);if(e instanceof Yt)return this.convertArray(e,t);if(e instanceof Qt){var n=e.value(t),o=this._firestore.ensureClientConfigured().databaseId();return e.databaseId.isEqual(o)||s("Document "+this._key.path+" contains a document reference within a different database ("+(e.databaseId.projectId+"/"+e.databaseId.database+") which is not supported. It will be treated as a reference in the current ")+("database ("+o.projectId+"/"+o.database+") instead.")),new pa(n,this._firestore)}return e.value(t)},e.prototype.convertArray=function(e,t){var n=this;return e.internalValue.map(function(e){return n.convertValue(e,t)})},e}(),ha=function(e){function t(t,n,o,r){return e.call(this,t,n,o,r)||this}return lt.__extends(t,e),t.prototype.data=function(t){var n=e.prototype.data.call(this,t);return c("object"==typeof n,"Document in a QueryDocumentSnapshot should exist"),n},t}(ma),ga=function(){function e(e,t){this._query=e,this.firestore=t}return e.prototype.where=function(t,n,o){x("Query.where",arguments,3),C("Query.where","string",2,n),R("Query.where",3,o);var r=ze("Query.where",t),i=rn.fromString(n),s;if(r.isKeyField()){if(i===rn.ARRAY_CONTAINS)throw new gt(ht.INVALID_ARGUMENT,"Invalid Query. You can't perform array-contains queries on FieldPath.documentId() since document IDs are not arrays.");if("string"==typeof o){if(-1!==o.indexOf("/"))throw new gt(ht.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it contains a slash.");if(""===o)throw new gt(ht.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a valid document ID if the first parameter is FieldPath.documentId(), but it was an empty string.");var l=this._query.path.child(new Et([o]));c(0==l.length%2,"Path should be a document key"),s=new Qt(this.firestore._databaseId,new Nt(l))}else if(o instanceof pa){s=new Qt(this.firestore._databaseId,o._key)}else throw new gt(ht.INVALID_ARGUMENT,"Function Query.where() requires its third parameter to be a string or a DocumentReference if the first parameter is FieldPath.documentId(), but it was: "+(M(o)+"."))}else s=this.firestore._dataConverter.parseQueryValue("Query.where",o);var d=$(r,i,s);return this.validateNewFilter(d),new e(this._query.addFilter(d),this.firestore)},e.prototype.orderBy=function(t,n){k("Query.orderBy",arguments,1,2),w("Query.orderBy","string",2,n);var o;if(void 0===n||"asc"===n)o=dn.ASCENDING;else if("desc"===n)o=dn.DESCENDING;else throw new gt(ht.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");if(null!==this._query.startAt)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this._query.endAt)throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var r=ze("Query.orderBy",t),i=new pn(r,o);return this.validateNewOrderBy(i),new e(this._query.addOrderBy(i),this.firestore)},e.prototype.limit=function(t){if(x("Query.limit",arguments,1),C("Query.limit","number",1,t),0>=t)throw new gt(ht.INVALID_ARGUMENT,"Invalid Query. Query limit ("+t+") is invalid. Limit must be positive.");return new e(this._query.withLimit(t),this.firestore)},e.prototype.startAt=function(t){for(var n=[],o=1;oo.length)throw new gt(ht.INVALID_ARGUMENT,"Too many arguments provided to "+e+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var r=[],s=0;s, or >=) must be on the same field. But you have inequality filters on '"+t.toString()+"'"+(" and '"+e.field.toString()+"'"));var n=this._query.getFirstOrderByField();null!==n&&this.validateOrderByAndInequalityMatch(e.field,n)}else if(e.op===rn.ARRAY_CONTAINS&&this._query.hasArrayContainsFilter())throw new gt(ht.INVALID_ARGUMENT,"Invalid query. Queries only support a single array-contains filter.")},e.prototype.validateNewOrderBy=function(e){if(null===this._query.getFirstOrderByField()){var t=this._query.getInequalityFilterField();null!==t&&this.validateOrderByAndInequalityMatch(t,e.field)}},e.prototype.validateOrderByAndInequalityMatch=function(e,t){if(!t.isEqual(e))throw new gt(ht.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+e.toString()+"' "+("and so you must also use '"+e.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() ")+("is on field '"+t.toString()+"' instead."))},e}(),fa=function(){function e(e,t,n){this._firestore=e,this._originalQuery=t,this._snapshot=n,this._cachedChanges=null,this._cachedChangesIncludeMetadataChanges=null,this.metadata=new ua(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach(function(t){return e.push(t)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._snapshot.docs.isEmpty()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;k("QuerySnapshot.forEach",arguments,1,2),C("QuerySnapshot.forEach","function",1,e),this._snapshot.docs.forEach(function(o){e.call(t,n.convertToDocumentImpl(o))})},Object.defineProperty(e.prototype,"query",{get:function(){return new ga(this._originalQuery,this._firestore)},enumerable:!0,configurable:!0}),e.prototype.docChanges=function(e){P("QuerySnapshot.docChanges",e,["includeMetadataChanges"]),e&&E("QuerySnapshot.docChanges","boolean","includeMetadataChanges",e.includeMetadataChanges);var t=e&&e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new gt(ht.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=$e(this._firestore,t,this._snapshot),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges},e.prototype.isEqual=function(t){if(!(t instanceof e))throw F("isEqual","QuerySnapshot",1,t);return this._firestore===t._firestore&&this._originalQuery.isEqual(t._originalQuery)&&this._snapshot.isEqual(t._snapshot)},e.prototype.convertToDocumentImpl=function(e){return new ha(this._firestore,e.key,e,this.metadata.fromCache)},e}(),ya=["length","forEach","map"].concat("undefined"==typeof Symbol?[]:[Symbol.iterator]);ya.forEach(function(e){try{Object.defineProperty(fa.prototype.docChanges,e,{get:function(){return Ge()}})}catch(e){}});var ba=function(e){function t(t,n){var o=e.call(this,on.atPath(t),n)||this;if(1!=t.length%2)throw new gt(ht.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+(t.canonicalString()+" has "+t.length));return o}return lt.__extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._query.path.popLast();return e.isEmpty()?null:new pa(new Nt(e),this.firestore)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!0,configurable:!0}),t.prototype.doc=function(e){if(k("CollectionReference.doc",arguments,0,1),0===arguments.length&&(e=ft.newId()),C("CollectionReference.doc","string",1,e),""===e)throw new gt(ht.INVALID_ARGUMENT,"Document path must be a non-empty string");var t=Et.fromString(e);return pa.forPath(this._query.path.child(t),this.firestore)},t.prototype.add=function(e){x("CollectionReference.add",arguments,1),C("CollectionReference.add","object",1,e);var t=this.doc();return t.set(e).then(function(){return t})},t}(ga),xa=u(la,"Use firebase.firestore() instead."),va=u(da,"Use firebase.firestore().runTransaction() instead."),ka=u(ca,"Use firebase.firestore().batch() instead."),Sa=u(pa,"Use firebase.firestore().doc() instead."),Ca=u(ma),wa=u(ha),Ta=u(ga),Ea=u(fa),Aa=u(ba,"Use firebase.firestore().collection() instead."),Ia={Firestore:xa,GeoPoint:xt,Timestamp:vt,Blob:bt,Transaction:va,WriteBatch:ka,DocumentReference:Sa,DocumentSnapshot:Ca,Query:Ta,QueryDocumentSnapshot:wa,QuerySnapshot:Ea,CollectionReference:Aa,FieldPath:co,FieldValue:$r,setLogLevel:la.setLogLevel};et(it),t.registerFirestore=et},"ew/s":function(e,t,n){(function(e){e(n("tQq4"),n("4e7A"))})(function(e){"use strict";function t(e,t,n,o,r){e.openDialog?e.openDialog(t,r,{value:o,selectValueOnOpen:!0}):r(prompt(n,o))}function n(e,t){var n=+t;return /^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var o=e.getCursor();t(e,"Jump to line: (Use line:column or scroll% syntax)","Jump to line:",o.line+1+":"+o.ch,function(t){if(t){var r;if(r=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(n(e,r[1]),+r[2]);else if(r=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var i=Math.round(e.lineCount()*+r[1]/100);/^[-+]/.test(r[1])&&(i=o.line+i+1),e.setCursor(i-1,o.ch)}else(r=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(n(e,r[1]),o.ch)}})},e.keyMap["default"]["Alt-G"]="jumpToLine"})},gPKv:function(e,t,n){(function(e){e(n("tQq4"))})(function(e){"use strict";function t(e){for(var t=0;tr)return v(o)?e.stylize(RegExp.prototype.toString.call(o),"regexp"):e.stylize("[Object]","special");e.seen.push(o);var n;return n=T?p(e,o,r,y,f):f.map(function(t){return u(e,o,r,y,t,T)}),e.seen.pop(),m(n,k,E)}function d(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,"\"")+"'";return e.stylize(n,"string")}return f(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,o,r){for(var s=[],d=0,i=t.length;de.seen.indexOf(c.value)?(d=y(n)?l(e,c.value,null):l(e,c.value,n-1),-1e?"0"+e.toString(10):e.toString(10)}function A(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),O[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var N=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n=i)return e;switch(e){case"%s":return r[n++]+"";case"%d":return+r[n++];case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e;}}),l=r[n];n*\/]/.test(n)?o(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?o("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?o(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=s,o("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),o("property","word")):o(null,null)}function i(e){return function(t,n){for(var r=!1,i;null!=(i=t.next());){if(i==e&&!r){")"==e&&t.backUp(1);break}r=!r&&"\\"==i}return i!=e&&(r||")"==e)||(n.tokenize=null),o("string","string")}}function s(e,t){return e.next(),t.tokenize=e.match(/\s*[\"\')]/,!1)?null:i(")"),o(null,"(")}function l(e,t,n){this.type=e,this.indent=t,this.prev=n}function d(e,t,n,o){return e.context=new l(n,t.indentation()+(!1===o?0:g),e.context),n}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function p(e,t,n){return L[n.context.type](e,t,n)}function u(e,t,o,r){for(var n=r||1;0=this.size-(this.bMin+I+this.bGutterSize)&&(e=this.size-(this.bMin+this.bGutterSize)),g.call(this,e),u.onDrag&&u.onDrag())}function y(){var e=t.getComputedStyle(this.parent),n=this.parent[R]-parseFloat(e[B]||0)-parseFloat(e[U]||0);this.size=this.a[r]()[D]+this.b[r]()[D]+this.aGutterSize+this.bGutterSize,this.percentage=Math.min(100*(this.size/n),100),this.start=this.a[r]()[F]}function x(){var e=this,n=e.a,r=e.b;e.dragging&&u.onDragEnd&&u.onDragEnd(),e.dragging=!1,t[o]("mouseup",e.stop),t[o]("touchend",e.stop),t[o]("touchcancel",e.stop),e.parent[o]("mousemove",e.move),e.parent[o]("touchmove",e.move),delete e.stop,delete e.move,n[o]("selectstart",i),n[o]("dragstart",i),r[o]("selectstart",i),r[o]("dragstart",i),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor=""}function b(o){var e=this,r=e.a,s=e.b;!e.dragging&&u.onDragStart&&u.onDragStart(),o.preventDefault(),e.dragging=!0,e.move=f.bind(e),e.stop=x.bind(e),t[n]("mouseup",e.stop),t[n]("touchend",e.stop),t[n]("touchcancel",e.stop),e.parent[n]("mousemove",e.move),e.parent[n]("touchmove",e.move),r[n]("selectstart",i),r[n]("dragstart",i),s[n]("selectstart",i),s[n]("dragstart",i),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",s.style.userSelect="none",s.style.webkitUserSelect="none",s.style.MozUserSelect="none",s.style.pointerEvents="none",e.gutter.style.cursor=L,e.parent.style.cursor=L,y.call(e)}function v(e){e.forEach(function(t,n){if(0e;e++)n.execCommand("goCharRight");else if("surround"==x){for(var t=n.getSelections(),e=0;ee&&e.default?e.default:e;let i=r(n("JkW7"));if("function"==typeof i){let e=document.body.firstElementChild;!1,(()=>{let t=r(n("JkW7"));e=(0,o.render)((0,o.h)(t),document.body,e)})()}},q6qL:function(e,t,n){(function(t,o){e.exports=o(n("KM04"))})(this,function(e){"use strict";var t=function(){function e(e){this.value=e}function t(t){function n(r,i){try{var s=t[r](i),l=s.value;l instanceof e?Promise.resolve(l.value).then(function(e){n("next",e)},function(e){n("throw",e)}):o(s.done?"return":"normal",s.value)}catch(e){o("throw",e)}}function o(e,t){"return"===e?r.resolve({value:t,done:!0}):"throw"===e?r.reject(t):r.resolve({value:t,done:!1}),r=r.next,r?n(r.key,r.arg):i=null}var r,i;this._invoke=function(e,t){return new Promise(function(o,s){var l={key:e,arg:t,resolve:o,reject:s,next:null};i?i=i.next=l:(r=i=l,n(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)},{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}(),n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(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)},r=function(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},i=function(t){function i(){return n(this,i),r(this,t.apply(this,arguments))}return o(i,t),i.prototype.componentDidUpdate=function(e){for(var t in e)if(e[t]!==this.props[t])return setTimeout(this.renderLayer)},i.prototype.componentDidMount=function(){this.isMounted=!0,this.renderLayer=this.renderLayer.bind(this),this.renderLayer()},i.prototype.componentWillUnmount=function(){this.renderLayer(!1),this.isMounted=!1,this.remote&&this.remote.parentNode.removeChild(this.remote)},i.prototype.findNode=function(e){return"string"==typeof e?document.querySelector(e):e},i.prototype.renderLayer=function(){var t=0"))return r("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return r("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),r("number","number");if("/"==n)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),r("comment","comment")):Be(e,t,1)?(o(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),r("regexp","string-2")):(e.eat("="),r("operator","operator",e.current()));if("`"==n)return t.tokenize=d,d(e,t);if("#"==n)return e.skipToEnd(),r("error","error");if(Ke.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?("!"==n||"="==n)&&e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),r("operator","operator",e.current());if(ze.test(n)){e.eatWhile(ze);var s=e.current();if("."!=t.lastType){if(He.propertyIsEnumerable(s)){var c=He[s];return r(c.type,c.style,s)}if("async"==s&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return r("async","keyword",s)}return r("variable","variable",s)}}function i(e){return function(t,n){var o=!1,i;if(qe&&"@"==t.peek()&&t.match(Ge))return n.tokenize=s,r("jsonld-keyword","meta");for(;null!=(i=t.next())&&(i!=e||o);)o=!o&&"\\"==i;return o||(n.tokenize=s),r("string","string")}}function l(e,t){for(var n=!1,o;o=e.next();){if("/"==o&&n){t.tokenize=s;break}n="*"==o}return r("comment","comment")}function d(e,t){for(var n=!1,o;null!=(o=e.next());){if(!n&&("`"==o||"$"==o&&e.eat("{"))){t.tokenize=s;break}n=!n&&"\\"==o}return r("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){if(We){var o=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));o&&(n=o.index)}for(var r=0,i=!1,s=n-1;0<=s;--s){var l=e.string.charAt(s),d=Xe.indexOf(l);if(0<=d&&3>d){if(!r){++s;break}if(0==--r){"("==l&&(i=!0);break}}else if(3<=d&&6>d)++r;else if(ze.test(l))i=!0;else{if(/["'\/]/.test(l))return;if(i&&!r){++s;break}}}i&&!r&&(t.fatArrowAt=s)}}function p(e,t,n,o,r,i){this.indented=e,this.column=t,this.type=n,this.prev=r,this.info=i,null!=o&&(this.align=o)}function u(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var o=e.context;o;o=o.prev)for(var n=o.vars;n;n=n.next)if(n.name==t)return!0}function m(e,t,n,o,r){var i=e.cc;for(Je.state=e,Je.stream=r,Je.marked=null,Je.cc=i,Je.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var s=i.length?i.pop():je?L:I;if(s(n,o)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Je.marked?Je.marked:"variable"==n&&u(e,o)?"variable-2":t}}}function h(){for(var e=arguments.length-1;0<=e;e--)Je.cc.push(arguments[e])}function g(){return h.apply(null,arguments),!0}function f(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function y(e){var t=Je.state;if(Je.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var o=b(e,t.context);if(null!=o)return void(t.context=o)}else if(!f(e,t.localVars))return void(t.localVars=new k(e,t.localVars));n.globalVars&&!f(e,t.globalVars)&&(t.globalVars=new k(e,t.globalVars))}function b(e,t){if(!t)return null;if(t.block){var n=b(e,t.prev);return n?n==t.prev?t:new v(n,t.vars,!0):null}return f(e,t.vars)?t:new v(t.prev,new k(e,t.vars),!1)}function x(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function v(e,t,n){this.prev=e,this.vars=t,this.block=n}function k(e,t){this.name=e,this.next=t}function S(){Je.state.context=new v(Je.state.context,Je.state.localVars,!1),Je.state.localVars=$e}function C(){Je.state.context=new v(Je.state.context,Je.state.localVars,!0),Je.state.localVars=null}function w(){Je.state.localVars=Je.state.context.vars,Je.state.context=Je.state.context.prev}function T(e,t){var n=function(){var n=Je.state,o=n.indented;if("stat"==n.lexical.type)o=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)o=r.indented;n.lexical=new p(o,Je.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function E(){var e=Je.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function A(e){function t(n){return n==e?g():";"==e?h():g(t)}return t}function I(e,t){return"var"==e?g(T("vardef",t),de,A(";"),E):"keyword a"==e?g(T("form"),O,I,E):"keyword b"==e?g(T("form"),I,E):"keyword d"==e?Je.stream.match(/^\s*$/,!1)?g():g(T("stat"),D,A(";"),E):"debugger"==e?g(A(";")):"{"==e?g(T("}"),C,$,E,w):";"==e?g():"if"==e?("else"==Je.state.lexical.info&&Je.state.cc[Je.state.cc.length-1]==E&&Je.state.cc.pop()(),g(T("form"),O,I,E,he)):"function"==e?g(ve):"for"==e?g(T("form"),ge,I,E):"class"==e||We&&"interface"==t?(Je.marked="keyword",g(T("form"),Ce,E)):"variable"==e?We&&"declare"==t?(Je.marked="keyword",g(I)):We&&("module"==t||"enum"==t||"type"==t)&&Je.stream.match(/^\s*\w/,!1)?(Je.marked="keyword","enum"==t?g(Re):"type"==t?g(te,A("operator"),te,A(";")):g(T("form"),ce,A("{"),T("}"),$,E,E)):We&&"namespace"==t?(Je.marked="keyword",g(T("form"),L,$,E)):We&&"abstract"==t?(Je.marked="keyword",g(I)):g(T("stat"),z):"switch"==e?g(T("form"),O,A("{"),T("}","switch"),C,$,E,E,w):"case"==e?g(L,A(":")):"default"==e?g(A(":")):"catch"==e?g(T("form"),S,N,I,E,w):"export"==e?g(T("stat"),Ae,E):"import"==e?g(T("stat"),Ne,E):"async"==e?g(I):"@"==t?g(L,I):h(T("stat"),L,A(";"),E)}function N(e){if("("==e)return g(ke,A(")"))}function L(e,t){return M(e,t,!1)}function _(e,t){return M(e,t,!0)}function O(e){return"("==e?g(T(")"),L,A(")"),E):h()}function M(e,t,n){if(Je.state.fatArrowAt==Je.stream.start){var o=n?V:U;if("("==e)return g(S,T(")"),Q(ke,")"),E,A("=>"),o,w);if("variable"==e)return h(S,ce,A("=>"),o,w)}var r=n?P:R;return Qe.hasOwnProperty(e)?g(r):"function"==e?g(ve,r):"class"==e||We&&"interface"==t?(Je.marked="keyword",g(T("form"),Se,E)):"keyword c"==e||"async"==e?g(n?_:L):"("==e?g(T(")"),D,A(")"),E,r):"operator"==e||"spread"==e?g(n?_:L):"["==e?g(T("]"),De,E,r):"{"==e?J(K,"}",null,r):"quasi"==e?h(F,r):"new"==e?g(q(n)):"import"==e?g(L):g()}function D(e){return e.match(/[;\}\)\],]/)?h():h(L)}function R(e,t){return","==e?g(L):P(e,t,!1)}function P(e,t,n){var o=!1==n?R:P,r=!1==n?L:_;return"=>"==e?g(S,n?V:U,w):"operator"==e?/\+\+|--/.test(t)||We&&"!"==t?g(o):We&&"<"==t&&Je.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?g(T(">"),Q(te,">"),E,o):"?"==t?g(L,A(":"),r):g(r):"quasi"==e?h(F,o):";"==e?void 0:"("==e?J(_,")","call",o):"."==e?g(H,o):"["==e?g(T("]"),D,A("]"),E,o):We&&"as"==t?(Je.marked="keyword",g(te,o)):"regexp"==e?(Je.state.lastType=Je.marked="operator",Je.stream.backUp(Je.stream.pos-Je.stream.start-1),g(r)):void 0}function F(e,t){return"quasi"==e?"${"==t.slice(t.length-2)?g(L,B):g(F):h()}function B(e){if("}"==e)return Je.marked="string-2",Je.state.tokenize=d,g(F)}function U(e){return c(Je.stream,Je.state),h("{"==e?I:L)}function V(e){return c(Je.stream,Je.state),h("{"==e?I:_)}function q(e){return function(t){return"."==t?g(e?W:j):"variable"==t&&We?g(ie,e?P:R):h(e?_:L)}}function j(e,t){if("target"==t)return Je.marked="keyword",g(R)}function W(e,t){if("target"==t)return Je.marked="keyword",g(P)}function z(e){return":"==e?g(E,I):h(R,A(";"),E)}function H(e){if("variable"==e)return Je.marked="property",g()}function K(e,t){if("async"==e)return Je.marked="property",g(K);if("variable"==e||"keyword"==Je.style){if(Je.marked="property","get"==t||"set"==t)return g(G);var n;return We&&Je.state.fatArrowAt==Je.stream.start&&(n=Je.stream.match(/^\s*:\s*/,!1))&&(Je.state.fatArrowAt=Je.stream.pos+n[0].length),g(X)}return"number"==e||"string"==e?(Je.marked=qe?"property":Je.style+" property",g(X)):"jsonld-keyword"==e?g(X):We&&x(t)?(Je.marked="keyword",g(K)):"["==e?g(L,Y,A("]"),X):"spread"==e?g(_,X):"*"==t?(Je.marked="keyword",g(K)):":"==e?h(X):void 0}function G(e){return"variable"==e?(Je.marked="property",g(ve)):h(X)}function X(e){return":"==e?g(_):"("==e?h(ve):void 0}function Q(e,t,n){function o(r,i){if(n?-1"),te):void 0}function ne(e){if("=>"==e)return g(te)}function oe(e,t){return"variable"==e||"keyword"==Je.style?(Je.marked="property",g(oe)):"?"==t?g(oe):":"==e?g(te):"["==e?g(L,Y,A("]"),oe):void 0}function re(e,t){return"variable"==e&&Je.stream.match(/^\s*[?:]/,!1)||"?"==t?g(re):":"==e?g(te):h(te)}function ae(e,t){return"<"==t?g(T(">"),Q(te,">"),E,ae):"|"==t||"."==e||"&"==t?g(te):"["==e?g(A("]"),ae):"extends"==t||"implements"==t?(Je.marked="keyword",g(te)):void 0}function ie(e,t){if("<"==t)return g(T(">"),Q(te,">"),E,ae)}function se(){return h(te,le)}function le(e,t){if("="==t)return g(te)}function de(e,t){return"enum"==t?(Je.marked="keyword",g(Re)):h(ce,Y,ue,me)}function ce(e,t){return We&&x(t)?(Je.marked="keyword",g(ce)):"variable"==e?(y(t),g()):"spread"==e?g(ce):"["==e?J(ce,"]"):"{"==e?J(pe,"}"):void 0}function pe(e,t){return"variable"!=e||Je.stream.match(/^\s*:/,!1)?("variable"==e&&(Je.marked="property"),"spread"==e?g(ce):"}"==e?h():g(A(":"),ce,ue)):(y(t),g(ue))}function ue(e,t){if("="==t)return g(_)}function me(e){if(","==e)return g(de)}function he(e,t){if("keyword b"==e&&"else"==t)return g(T("form","else"),I,E)}function ge(e,t){return"await"==t?g(ge):"("==e?g(T(")"),fe,A(")"),E):void 0}function fe(e){return"var"==e?g(de,A(";"),be):";"==e?g(be):"variable"==e?g(ye):h(L,A(";"),be)}function ye(e,t){return"in"==t||"of"==t?(Je.marked="keyword",g(L)):g(R,be)}function be(e,t){return";"==e?g(xe):"in"==t||"of"==t?(Je.marked="keyword",g(L)):h(L,A(";"),xe)}function xe(e){")"!=e&&g(L)}function ve(e,t){return"*"==t?(Je.marked="keyword",g(ve)):"variable"==e?(y(t),g(ve)):"("==e?g(S,T(")"),Q(ke,")"),E,Z,I,w):We&&"<"==t?g(T(">"),Q(se,">"),E,ve):void 0}function ke(e,t){return"@"==t&&g(L,ke),"spread"==e?g(ke):We&&x(t)?(Je.marked="keyword",g(ke)):h(ce,Y,ue)}function Se(e,t){return"variable"==e?Ce(e,t):we(e,t)}function Ce(e,t){if("variable"==e)return y(t),g(we)}function we(e,t){return"<"==t?g(T(">"),Q(se,">"),E,we):"extends"==t||"implements"==t||We&&","==e?("implements"==t&&(Je.marked="keyword"),g(We?te:L,we)):"{"==e?g(T("}"),Te,E):void 0}function Te(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||We&&x(t))&&Je.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Je.marked="keyword",g(Te)):"variable"==e||"keyword"==Je.style?(Je.marked="property",g(We?Ee:ve,Te)):"["==e?g(L,Y,A("]"),We?Ee:ve,Te):"*"==t?(Je.marked="keyword",g(Te)):";"==e?g(Te):"}"==e?g():"@"==t?g(L,Te):void 0}function Ee(e,t){return"?"==t?g(Ee):":"==e?g(te,ue):"="==t?g(_):h(ve)}function Ae(e,t){return"*"==t?(Je.marked="keyword",g(Me,A(";"))):"default"==t?(Je.marked="keyword",g(L,A(";"))):"{"==e?g(Q(Ie,"}"),Me,A(";")):h(I)}function Ie(e,t){return"as"==t?(Je.marked="keyword",g(A("variable"))):"variable"==e?h(_,Ie):void 0}function Ne(e){return"string"==e?g():"("==e?h(L):h(Le,_e,Me)}function Le(e,t){return"{"==e?J(Le,"}"):("variable"==e&&y(t),"*"==t&&(Je.marked="keyword"),g(Oe))}function _e(e){if(","==e)return g(Le,_e)}function Oe(e,t){if("as"==t)return Je.marked="keyword",g(Le)}function Me(e,t){if("from"==t)return Je.marked="keyword",g(L)}function De(e){return"]"==e?g():h(Q(_,"]"))}function Re(){return h(T("form"),ce,A("{"),T("}"),Q(Pe,"}"),E,E)}function Pe(){return h(ce,ue)}function Fe(e,t){return"operator"==e.lastType||","==e.lastType||Ke.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function Be(e,t,n){return t.tokenize==s&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}var Ue=t.indentUnit,Ve=n.statementIndent,qe=n.jsonld,je=n.json||qe,We=n.typescript,ze=n.wordCharacters||/[\w$\xa1-\uffff]/,He=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),o=e("keyword c"),r=e("keyword d"),i=e("operator"),s={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:e("new"),delete:o,void:o,throw:o,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:e("this"),class:e("class"),super:e("atom"),yield:o,export:e("export"),import:e("import"),extends:o,await:o}}(),Ke=/[+\-*&%=<>!?|~^@]/,Ge=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Xe="([{}])",Qe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Je={state:null,column:null,marked:null,cc:null},$e=new k("this",new k("arguments",null)),Ye,Ze;return w.lex=!0,E.lex=!0,{startState:function(e){var t={tokenize:s,lastType:"sof",cc:[],lexical:new p((e||0)-Ue,0,"block",!1),localVars:n.localVars,context:n.localVars&&new v(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(!t.lexical.hasOwnProperty("align")&&(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==Ye?n:(t.lastType="operator"==Ye&&("++"==Ze||"--"==Ze)?"incdec":Ye,m(t,n,Ye,Ze,e))},indent:function(t,o){if(t.tokenize==l)return e.Pass;if(t.tokenize!=s)return 0;var r=o&&o.charAt(0),d=t.lexical,p;if(!/^\s*else\b/.test(o))for(var u=t.cc.length-1,i;0<=u;--u)if(i=t.cc[u],i==E)d=d.prev;else if(i!=he)break;for(;("stat"==d.type||"form"==d.type)&&("}"==r||(p=t.cc[t.cc.length-1])&&(p==R||p==P)&&!/^[,\.=+\-*:?[\(]/.test(o));)d=d.prev;Ve&&")"==d.type&&"stat"==d.prev.type&&(d=d.prev);var c=d.type,m=r==c;return"vardef"==c?d.indented+("operator"==t.lastType||","==t.lastType?d.info.length+1:0):"form"==c&&"{"==r?d.indented:"form"==c?d.indented+Ue:"stat"==c?d.indented+(Fe(t,o)?Ve||Ue:0):"switch"!=d.info||m||!1==n.doubleIndentSwitch?d.align?d.column+(m?0:1):d.indented+(m?0:Ue):d.indented+(/^(?:case|default)\b/.test(o)?Ue:2*Ue)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:je?null:"/*",blockCommentEnd:je?null:"*/",blockCommentContinue:je?null:" * ",lineComment:je?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:je?"json":"javascript",jsonldMode:qe,jsonMode:je,expressionAllowed:Be,skipExpression:function(e){var t=e.cc[e.cc.length-1];(t==L||t==_)&&e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},rbVD:function(e,t,n){var o=Math.max;(function(e){e(n("tQq4"))})(function(e){"use strict";function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(e,t,n){var o=e.options.hintOptions,r={};for(var i in g)r[i]=g[i];if(o)for(var i in o)void 0!==o[i]&&(r[i]=o[i]);if(n)for(var i in n)void 0!==n[i]&&(r[i]=n[i]);return r.hint.resolve&&(r.hint=r.hint.resolve(e,t)),r}function r(e){return"string"==typeof e?e:e.text}function s(e,t){function n(e,n){var r;r="string"==typeof n?o.hasOwnProperty(n)?o[n]:n:function(e){return n(e,t)},i[e]=r}var o={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},r=e.options.customKeys,i=r?{}:o;if(r)for(var s in r)r.hasOwnProperty(s)&&n(s,r[s]);var l=e.options.extraKeys;if(l)for(var s in l)l.hasOwnProperty(s)&&n(s,l[s]);return i}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function l(n,t){this.completion=n,this.data=t,this.picked=!1;var l=this,d=n.cm,c=this.hints=document.createElement("ul");c.className="CodeMirror-hints",this.selectedHint=t.selectedHint||0;for(var m=t.list,h=0;hc.clientHeight+1,A=d.getScrollInfo();if(0C){c.style.height=C-5+"px",c.style.top=(v=b.bottom-w.top)+"px";var L=d.getCursor();t.from.ch!=L.ch&&(b=d.cursorCoords(L),c.style.left=(x=b.left)+"px",w=c.getBoundingClientRect())}}var _=w.right-S;if(0<_&&(w.right-w.left>S&&(c.style.width=S-5+"px",_-=w.right-w.left-S),c.style.left=(x=b.left-_)+"px"),E)for(var O=c.firstChild;O;O=O.nextSibling)O.style.paddingRight=d.display.nativeBarWidth+"px";if(d.addKeyMap(this.keyMap=s(n,{moveFocus:function(e,t){l.changeActive(l.selectedHint+e,t)},setFocus:function(e){l.changeActive(e)},menuSize:function(){return l.screenAmount()},length:m.length,close:function(){n.close()},pick:function(){l.pick()},data:t})),n.options.closeOnUnfocus){var M;d.on("blur",this.onBlur=function(){M=setTimeout(function(){n.close()},100)}),d.on("focus",this.onFocus=function(){clearTimeout(M)})}return d.on("scroll",this.onScroll=function(){var e=d.getScrollInfo(),t=d.getWrapperElement().getBoundingClientRect(),o=v+A.top-e.top,r=o-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return k||(r+=c.offsetHeight),r<=t.top||r>=t.bottom?n.close():void(c.style.top=o+"px",c.style.left=x+A.left-e.left+"px")}),e.on(c,"dblclick",function(n){var e=i(c,n.target||n.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),l.pick())}),e.on(c,"click",function(o){var e=i(c,o.target||o.srcElement);e&&null!=e.hintId&&(l.changeActive(e.hintId),n.options.completeOnSingleClick&&l.pick())}),e.on(c,"mousedown",function(){setTimeout(function(){d.focus()},20)}),e.signal(t,"select",m[this.selectedHint],c.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],o=0;o=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+u,"")),o=this.hints.childNodes[this.selectedHint=t],o.className+=" "+u,o.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=o.offsetTop+o.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var o=t.getHelpers(n,"hint"),r;if(o.length){var i=function(e,t,n){function r(o){return o==s.length?t(null):void c(s[o],e,n,function(e){e&&0,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},tMLt:function(e,t,n){(function(e){e(n("tQq4"),n("H+g/"))})(function(e){"use strict";function t(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function o(e,t){for(var n=e.findMarks(u(t,0),u(t+1,0)),o=0;o=l&&(n=r(i.indicatorOpen))}e.setGutterMarker(t,i.gutter,n),++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation(function(){i(e,t.from,t.to)}),n.from=t.from,n.to=t.to)}function l(e,t,n){var r=e.state.foldGutter;if(r){var i=r.options;if(n==i.gutter){var s=o(e,t);s?s.clear():e.foldCode(u(t,0),i.rangeFinder)}}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||20t.to&&(i(e,t.to,n.to),t.to=n.to)})},n.updateViewportTimeSpan||400)}}function p(e,t){var n=e.state.foldGutter;if(n){var o=t.line;o>=n.from&&on||n>=t)return i+(t-l);i+=n-l,i+=o-i%o,l=n+1}}function x(e,t){for(var n=0;n=t)return o+s(l,t-r);if(r+=i-o,r+=n-r%n,o=i+1,r>=t)return o}}function S(e){for(;es.length<=e;)es.push(C(es)+" ");return es[e]}function C(e){return e[e.length-1]}function w(e,t){for(var n=[],o=0;on?0o?-1:1;;){if(n==o)return n;var s=(n+o)/2,l=0>i?t(s):r(s);if(l==n)return e(l)?n:o;e(l)?o=l:n=l+i}}function D(e,t,n){var o=this;this.input=n,o.scrollbarFiller=p("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=p("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=u("div",null,"CodeMirror-code"),o.selectionDiv=p("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=p("div",null,"CodeMirror-cursors"),o.measure=p("div",null,"CodeMirror-measure"),o.lineMeasure=p("div",null,"CodeMirror-measure"),o.lineSpace=u("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var r=u("div",[o.lineSpace],"CodeMirror-lines");o.mover=p("div",[r],null,"position: relative"),o.sizer=p("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=p("div",null,null,"position: absolute; height: "+Qi+"px; width: 1px;"),o.gutters=p("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=p("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=p("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),Ai&&8>Ii&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),Ni||Ci&&Bi||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function R(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var o=0;;++o){var r=n.children[o],i=r.chunkSize();if(t=e.first&&tz(e,t)?t:e}function X(e,t){return 0>z(e,t)?e:t}function Q(e,t){return l(e.first,s(t,e.first+e.size-1))}function J(e,t){if(t.linen?W(n,R(e,n).text.length):$(t,R(e,t.line).text.length)}function $(e,t){var n=e.ch;return null==n||n>t?W(e.line,t):0>n?W(e.line,0):e}function Y(e,t){for(var n=[],o=0;o=t:i.to>t);(o||(o=[])).push(new te(s,i.from,d?null:i.to))}}return o}function se(e,t,n){var o;if(e)for(var r=0;r=t:i.to>t);if(l||i.from==t&&"bookmark"==s.type&&(!n||i.marker.insertLeft)){var d=null==i.from||(s.inclusiveLeft?i.from<=t:i.fromz(c.to,l.from)||0u)&&(i.inclusiveLeft||u)||p.push({from:c.from,to:l.from}),!(0ge(o,r.marker))&&(o=r.marker);return o}function ye(e){return fe(e,!0)}function be(e){return fe(e,!1)}function xe(e,t){var n=rs&&e.markedSpans,o;if(n)for(var r=0,i;rt)&&(!o||0>ge(o,i.marker))&&(o=i.marker);return o}function ve(e,t,n,o,r){var s=R(e,t),l=rs&&s.markedSpans;if(l)for(var d=0,i;d=u||0>=p&&0<=u)&&(0>=p&&(i.marker.inclusiveRight&&r.inclusiveLeft?0<=z(c.to,n):0=z(c.from,o):0>z(c.from,o))))return!0}}function ke(e){for(var t;t=ye(e);)e=t.find(-1,!0).line;return e}function Se(e){for(var t;t=be(e);)e=t.find(1,!0).line;return e}function Ce(e){for(var t,n;t=be(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function we(e,t){var n=R(e,t),o=ke(n);return n==o?t:U(o)}function Te(e,t){if(t>e.lastLine())return t;var n=R(e,t),o;if(!Ee(e,n))return t;for(;o=be(n);)n=o.find(1,!0).line;return U(n)+1}function Ee(e,t){var n=rs&&t.markedSpans;if(n)for(var o=void 0,r=0;rt.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function _e(e,t,n,o){if(!e)return o(t,n,"ltr",0);for(var r=!1,d=0,i;dt||t==n&&i.to==t)&&(o(l(i.from,t),s(i.to,n),1==i.level?"rtl":"ltr",d),r=!0);r||o(t,n,"ltr")}function Oe(e,t,n){var o;as=null;for(var r=0,i;r