text: !function(t){function e(e){for(var n,o,i=e[0],a=e[1],c=0,u=[];c<i.length;c++)o=i[c],r[o]&&u.push(r[o][0]),r[o]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);for(s&&s(e);u.length;)u.shift()()}var n={},r={0:0};function o(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(t){var e=[],n=r[t];if(0!==n)if(n)e.push(n[2]);else{var i=new Promise(function(e,o){n=r[t]=[e,o]});e.push(n[2]=i);var a,c=document.createElement("script");c.charset="utf-8",c.timeout=120,o.nc&&c.setAttribute("nonce",o.nc),c.src=function(t){return o.p+""+t+".main.js"}(t);var s=new Error;a=function(e){c.onerror=c.onload=null,clearTimeout(u);var n=r[t];if(0!==n){if(n){var o=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}r[t]=void 0}};var u=setTimeout(function(){a({type:"timeout",target:c})},12e4);c.onerror=c.onload=a,document.head.appendChild(c)}return Promise.all(e)},o.m=t,o.c=n,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="assets/",o.oe=function(t){throw console.error(t),t};var i=window.webpackJsonp=window.webpackJsonp||[],a=i.push.bind(i);i.push=e,i=i.slice();for(var c=0;c<i.length;c++)e(i[c]);var s=a;o(o.s=10)}([function(t,e,n){"use strict";var r={sets:[{name:"Daily",items:["https://mymorningroutine.com","https://www.nytimes.com","https://www.newyorker.com","https://news.ycombinator.com","https://reddit.com","https://macstories.net","https://brettterpstra.com"]},{name:"Travel",items:["https://michaelxander.com/misc/city-cams/","https://www.google.com/flights/","https://en.wikivoyage.org","https://wikitravel.org"]},{name:"Favorites",items:["https://michaelxander.com","https://mymorningroutine.com","https://mail.google.com","https://drive.google.com","https://app.asana.com","https://twitter.com","https://reddit.com","https://www.nytimes.com","https://news.ycombinator.com","https://devdocs.io"]}],options:{darkMode:!0,searchEngine:"https://www.google.com/search",faviconSize:16,faviconService:"https://www.google.com/s2/favicons?domain=",linkTarget:"_blank",keyboardShortcuts:!0},plugins:[{name:"weather",enabled:!1,corsProxy:"",apiKey:"",locationAlias:"",latitude:"",longitude:"",lang:"en",units:"si"},{name:"age",enabled:!1,birthday:"1970-06-21",goal:100}]},o=n(1);e.a=Object(o.c)("localStorage")?(localStorage.getItem("config")||localStorage.setItem("config",JSON.stringify(r)),JSON.parse(localStorage.getItem("config"))):(document.getElementById("js-settings-button").style.display="none",r)},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return i}),n.d(e,"c",function(){return a});var r=document.getElementById("js-plugins-default");function o(t,e){return'<li class="set-item">\n    <a\n      class="js-set-item-link"\n      href="'.concat(t,'"\n      title="').concat(t,'"\n      target="').concat(e.options.linkTarget,'"\n    >\n      <img\n        class="set-item__img"\n        src="').concat(e.options.faviconService+t,'"\n        alt="Icon for Launchbot set item"\n        width="').concat(e.options.faviconSize,'"\n        height="').concat(e.options.faviconSize,'">\n    </a>\n  </li>')}function i(t){var e=document.createElement("li");e.setAttribute("id",t),e.setAttribute("class","plugins__item"),r.appendChild(e)}function a(t){try{var e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==storage.length}}},function(t,e,n){t.exports=n(4)},function(t,e,n){"use strict";function r(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,s,"next",t)}function s(t){r(a,o,i,c,s,"throw",t)}c(void 0)})}}n.d(e,"a",function(){return o})},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=j(a,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=u(t,e,n);if("normal"===s.type){if(r=n.done?h:f,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",f="suspendedYield",d="executing",h="completed",p={};function m(){}function v(){}function y(){}var g={};g[i]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(S([])));w&&w!==n&&r.call(w,i)&&(g=w);var E=y.prototype=m.prototype=Object.create(g);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(n,o){function i(){return new Promise(function(e,i){!function e(n,o,i,a){var c=u(t[n],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(l).then(function(t){s.value=t,i(s)},function(t){return e("throw",t,i,a)})}a(c.arg)}(n,o,e,i)})}return e=e?e.then(i,i):i()}}function j(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=u(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:I}}function I(){return{value:e,done:!0}}return v.prototype=E.constructor=y,y.constructor=v,y[c]=v.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},x(L.prototype),L.prototype[a]=function(){return this},t.AsyncIterator=L,t.async=function(e,n,r,o){var i=new L(s(e,n,r,o));return t.isGeneratorFunction(n)?i:i.next().then(function(t){return t.done?t.value:i.next()})},x(E),E[c]="Generator",E[i]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:S(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){var r={"./age.js":[11,1],"./weather.js":[12,2]};function o(t){if(!n.o(r,t))return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e});var e=r[t],o=e[0];return n.e(e[1]).then(function(){return n(o)})}o.keys=function(){return Object.keys(r)},o.id=5,t.exports=o},function(t,e,n){var r=n(7);"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(8)(r,o);r.locals&&(t.exports=r.locals)},function(t,e,n){},function(t,e,n){var r,o,i={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),c=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),s=null,u=0,l=[],f=n(9);function d(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=i[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(g(r.parts[a],e))}else{var c=[];for(a=0;a<r.parts.length;a++)c.push(g(r.parts[a],e));i[r.id]={id:r.id,refs:1,parts:c}}}}function h(t,e){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=e.base?i[0]+e.base:i[0],c={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}function p(t,e){var n=c(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=c(t.insertAt.before,n);n.insertBefore(e,o)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return y(e,t.attrs),p(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var a=u++;n=s||(s=v(e)),r=E.bind(null,n,a,!1),o=E.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),p(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),c=t.href;t.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}.bind(null,n,e),o=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){m(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return d(n,e),function(t){for(var r=[],o=0;o<n.length;o++){var a=n[o];(c=i[a.id]).refs--,r.push(c)}t&&d(h(t,e),e);for(o=0;o<r.length;o++){var c;if(0===(c=r[o]).refs){for(var s=0;s<c.parts.length;s++)c.parts[s]();delete i[c.id]}}}};var b,w=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function E(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=w(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(t,e,n){"use strict";n.r(e);var r=n(0);function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e.options,this.sets=e.sets}var e,n,r;return e=t,(n=[{key:"getSet",value:function(t){var e=t.id,n=t.name;if(Number.isInteger(e)){var r=this.sets[e-1];if(r)return r;throw new Error('\n        No set with the id "'.concat(e,'" exists.\n        Id’s start at 1, you have ').concat(this.sets.length," configured.\n      "))}if(n){var o=this.sets.find(function(t){return t.name.toLowerCase()===n.toLowerCase()});if(o)return o;throw new Error('No set with the name "'.concat(n,'" exists.'))}throw new Error("\n      No set found. Required object format (one property is enough):\n      {id: 1, name: 'First Set Name'}\n    ")}},{key:"getAllSets",value:function(){return this.sets}},{key:"openSet",value:function(t){this.sets[t].items.forEach(function(t){return window.open(t)})}}])&&o(e.prototype,n),r&&o(e,r),t}(),a=document.getElementById("js-search-text"),c=document.getElementsByClassName("js-set-item-link"),s=document.getElementsByClassName("set"),u=document.getElementById("js-settings"),l=function(t){Array.from(s).forEach(function(e,n){e.addEventListener("click",function(){t.openSet(n)})}),!0===t.options.keyboardShortcuts&&(window.addEventListener("keydown",function(e){u.classList.contains("is-active")||("s"!==e.key&&"/"!==e.key||(a.focus(),e.preventDefault()),Number(e.key)>0&&Number(e.key)<=9&&Number(e.key)<=t.sets.length&&t.openSet(Number(e.key-1)))}),a.addEventListener("keydown",function(t){t.stopPropagation(),"Escape"===t.key&&a.blur()})),Array.from(c).forEach(function(t){t.addEventListener("click",function(t){t.stopPropagation()})})},f=n(1),d=document.getElementById("js-welcome-modal"),h=document.getElementById("js-welcome-dismiss"),p=function(){Object(f.c)("localStorage")&&!localStorage.getItem("launchbot__welcome")&&(d.style.display="block"),h.addEventListener("click",function(){d.style.display="none",localStorage.setItem("launchbot__welcome",!1)})},m=n(2),v=n.n(m),y=n(3);function g(){return(g=Object(y.a)(v.a.mark(function t(e){return v.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n(5)("./"+e.name+".js");case 3:t.sent.init(),t.next=10;break;case 7:throw t.prev=7,t.t0=t.catch(0),t.t0;case 10:case"end":return t.stop()}},t,null,[[0,7]])}))).apply(this,arguments)}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.a.plugins.filter(function(t){return!0===t.enabled}).forEach(function(t){return function(t){return g.apply(this,arguments)}(t)});var E=document.getElementById("js-settings-options"),x=document.getElementById("js-settings-plugins"),L=document.getElementById("js-settings-sets"),j=document.getElementById("js-settings-export"),k=document.getElementById("js-footer"),_=document.getElementById("js-settings"),O=document.getElementById("js-settings-add-set"),S=document.getElementById("js-settings-button"),I=document.getElementById("js-settings-cancel"),N=document.getElementById("js-settings-restore"),A=document.getElementById("js-settings-save");var T="";r.a.sets.forEach(function(t){var e=t.name,n=t.items;T+='<li class="settings-form-list__item">\n    <input class="input input--settings input--set" type="text" value="'.concat(e,'">\n    <textarea class="textarea">').concat(n.join("\n"),'</textarea>\n    <button class="button button--small" type="button">Remove</button>\n  </li>')}),L.innerHTML=T;var B="";Object.entries(r.a.options).forEach(function(t){var e=b(t,2),n=e[0],r=e[1],o="",i="input input--settings",a="text";"darkMode"!==n&&"keyboardShortcuts"!==n||(a="checkbox",i="",!0===r&&(o="checked")),B+='<li class="settings-form-list__item">\n    <label class="input-label" for="'.concat(n,'">').concat(n,':</label>\n    <input class="').concat(i,'" type="').concat(a,'" name="').concat(n,'" value="').concat(r,'" ').concat(o,">\n  </li>")}),E.innerHTML=B,r.a.plugins.forEach(function(t){var e=document.createElement("ul");e.setAttribute("class","settings-form-list settings-form-list--plugin"),Object.entries(t).forEach(function(t){var n=b(t,2),r=n[0],o=n[1],i="",a="input input--settings",c="text";"enabled"===r&&(c="checkbox",a="",!0===o&&(i="checked")),"name"===r&&(i="disabled"),e.innerHTML+='<li class="settings-form-list__item settings-form-list__item--plugin">\n      <label class="input-label" for="'.concat(r,'">').concat(r,':</label>\n      <input class="').concat(a,'" type="').concat(c,'" name="').concat(r,'" value="').concat(o,'" ').concat(i,">\n    </li>")}),x.appendChild(e)}),j.innerHTML="export default ".concat(JSON.stringify(r.a,null,2),";"),S.addEventListener("click",function(){k.style.position="relative",_.classList.add("is-active")}),I.addEventListener("click",function(t){t.preventDefault(),_.classList.remove("is-active"),k.style.position="fixed"}),A.addEventListener("click",function(t){var e;t.preventDefault(),e=function(){var t=[];L.childNodes.forEach(function(e){t.push({name:e.children[0].value,items:w(e.children[1].value.split("\n"))})});var e={};E.childNodes.forEach(function(t){var n=t.children[1],r=n.name,o=n.type,i=n.checked,a=t.children[1].value;"checkbox"===o&&(a=i),e[r]=a});var n=[];return x.childNodes.forEach(function(t){var e={};t.childNodes.forEach(function(t){var n=t.children[1],r=n.name,o=n.type,i=n.checked,a=t.children[1].value;"checkbox"===o&&(a=i),e[r]=a}),n.push(e)}),{sets:t,options:e,plugins:n}}(),localStorage.setItem("config",JSON.stringify(e)),window.location.reload(!0)}),N.addEventListener("click",function(t){t.preventDefault(),localStorage.removeItem("config"),window.location.reload(!0)});var C=function(t){var e=t.target;L.removeChild(e.parentNode)};function M(){L.childNodes.forEach(function(t){t.children[2].addEventListener("click",C)})}M(),O.addEventListener("click",function(){var t=document.createElement("li");t.setAttribute("class","settings-form-list__item"),t.innerHTML='\n    <input class="input input--settings input--set" type="text" placeholder="Enter set title">\n    <textarea class="textarea" placeholder="Enter one URL per line"></textarea>\n    <button class="button button--small" type="button">Remove</button>\n  ',L.appendChild(t),M()}),function(t){!1===t.options.darkMode&&document.documentElement.classList.add("theme-light");var e="";t.sets.forEach(function(t,n){var o=t.name,i=t.items,a="";i.forEach(function(t){a+=Object(f.b)(t,r.a)}),e+='<li class="grid__item">\n      <div class="set">\n        <h2 class="set__name">'.concat(o,'</h2>\n        <span class="set__id">').concat(n+1,"</span>\n        <ul>").concat(a,"</ul>\n      </div>\n    </li>")}),document.getElementById("js-sets").innerHTML=e,t.options.searchEngine&&(document.getElementById("js-search-form").action=t.options.searchEngine),p(),l(t)}(new i(r.a));n(6)}]);