diff --git a/.babelrc b/.babelrc
new file mode 100644
index 0000000..53ba16a
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["env", "react"]
+}
\ No newline at end of file
diff --git a/.claspignore b/.claspignore
new file mode 100644
index 0000000..866740f
--- /dev/null
+++ b/.claspignore
@@ -0,0 +1 @@
+dist/main.js
\ No newline at end of file
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..e69de29
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..148fe23
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,16 @@
+{
+ "root": true,
+ "parser": "babel-eslint",
+ "extends": ["eslint:recommended", "google", "plugin:prettier/recommended"],
+ "plugins": ["prettier", "googleappsscript"],
+ "env": {
+ "googleappsscript/googleappsscript": true
+ },
+ "globals": {
+ },
+ "rules": {
+ "prettier/prettier": "error",
+ "import/prefer-default-export": 0,
+ "no-console": 0
+ }
+}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b512c09
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..3f584f6
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,4 @@
+{
+ "printWidth": 120,
+ "singleQuote": true
+}
diff --git a/appsscript.json b/appsscript.json
new file mode 100644
index 0000000..06ebce7
--- /dev/null
+++ b/appsscript.json
@@ -0,0 +1,9 @@
+{
+ "timeZone": "America/New_York",
+ "dependencies": {
+ },
+ "oauthScopes": [
+ "https://www.googleapis.com/auth/script.container.ui",
+ "https://www.googleapis.com/auth/spreadsheets"
+ ]
+}
\ No newline at end of file
diff --git a/dist/appsscript.json b/dist/appsscript.json
new file mode 100644
index 0000000..06ebce7
--- /dev/null
+++ b/dist/appsscript.json
@@ -0,0 +1,9 @@
+{
+ "timeZone": "America/New_York",
+ "dependencies": {
+ },
+ "oauthScopes": [
+ "https://www.googleapis.com/auth/script.container.ui",
+ "https://www.googleapis.com/auth/spreadsheets"
+ ]
+}
\ No newline at end of file
diff --git a/dist/code.js b/dist/code.js
new file mode 100644
index 0000000..bea9515
--- /dev/null
+++ b/dist/code.js
@@ -0,0 +1,181 @@
+function onOpen() {
+}
+function openDialog() {
+}
+function getSheetsData() {
+}
+function addSheet() {
+}
+function deleteSheet() {
+}/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ }
+/******/ };
+/******/
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {
+
+// Use ES6/7 code
+var onOpen = function onOpen() {
+ SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
+ .createMenu('Dialog').addItem('Add sheets', 'openDialog').addToUi();
+};
+
+var openDialog = function openDialog() {
+ var html = HtmlService.createHtmlOutputFromFile('dialog');
+ SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
+ .showModalDialog(html, 'Sheet Editor');
+};
+
+var getSheets = function getSheets() {
+ return SpreadsheetApp.getActive().getSheets();
+};
+
+var getActiveSheetName = function getActiveSheetName() {
+ return SpreadsheetApp.getActive().getSheetName();
+};
+
+var getSheetsData = function getSheetsData() {
+ var activeSheetName = getActiveSheetName();
+ return getSheets().map(function (sheet, index) {
+ var sheetName = sheet.getName();
+ return {
+ text: sheetName,
+ sheetIndex: index,
+ isActive: sheetName === activeSheetName
+ };
+ });
+};
+
+var addSheet = function addSheet(sheetTitle) {
+ SpreadsheetApp.getActive().insertSheet(sheetTitle);
+ return getSheetsData();
+};
+
+var deleteSheet = function deleteSheet(sheetIndex) {
+ var sheets = getSheets();
+ SpreadsheetApp.getActive().deleteSheet(sheets[sheetIndex]);
+ return getSheetsData();
+};
+
+//Must expose public functions
+global.onOpen = onOpen;
+global.openDialog = openDialog;
+global.getSheetsData = getSheetsData;
+global.addSheet = addSheet;
+global.deleteSheet = deleteSheet;
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(1)))
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+ return this;
+})();
+
+try {
+ // This works if eval is allowed (see CSP)
+ g = g || Function("return this")() || (1, eval)("this");
+} catch (e) {
+ // This works if the window reference is available
+ if (typeof window === "object") g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ })
+/******/ ]);
\ No newline at end of file
diff --git a/dist/dialog.html b/dist/dialog.html
new file mode 100644
index 0000000..d5b18d7
--- /dev/null
+++ b/dist/dialog.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dist/main.js b/dist/main.js
new file mode 100644
index 0000000..db619c5
--- /dev/null
+++ b/dist/main.js
@@ -0,0 +1,22 @@
+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){e.exports=n(20)()},function(e,t,n){"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;uO.length&&O.push(e)}function L(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+U(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;ithis.eventPool.length&&this.eventPool.push(e)}function Ee(e){e.eventPool=[],e.getPooled=ke,e.release=xe}i(we.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=Ne),Me=String.fromCharCode(32),Re={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Le=!1;function Ue(e,t){switch(e){case"keyup":return-1!==Ce.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function De(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Fe=!1;var Ie={eventTypes:Re,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(Se)e:{switch(e){case"compositionstart":o=Re.compositionStart;break e;case"compositionend":o=Re.compositionEnd;break e;case"compositionupdate":o=Re.compositionUpdate;break e}o=void 0}else Fe?Ue(e,n)&&(o=Re.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Re.compositionStart);return o?(Oe&&(Fe||o!==Re.compositionStart?o===Re.compositionEnd&&Fe&&(a=ve()):(me._root=r,me._startText=ye(),Fe=!0)),o=_e.getPooled(o,t,n,r),a?o.data=a:null!==(a=De(n))&&(o.data=a),ee(o),a=o):a=null,(e=Pe?function(e,t){switch(e){case"compositionend":return De(t);case"keypress":return 32!==t.which?null:(Le=!0,Me);case"textInput":return(e=t.data)===Me&&Le?null:e;default:return null}}(e,n):function(e,t){if(Fe)return"compositionend"===e||!Se&&Ue(e,t)?(e=ve(),me._root=null,me._startText=null,me._fallbackText=null,Fe=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!xt.call(_t,e)||!xt.call(Et,e)&&(kt.test(e)?_t[e]=!0:(Et[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function Ot(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Mt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Ft(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Rt(e,t){null!=(t=t.checked)&&Pt(e,"checked",t,!1)}function Lt(e,t){Rt(e,t);var n=Ft(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?Dt(e,t.type,n):t.hasOwnProperty("defaultValue")&&Dt(e,t.type,Ft(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ut(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){t=""+e._wrapperState.initialValue;var r=e.value;n||t===r||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==n&&(e.name=n)}function Dt(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Ft(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(St,Nt);Ct[t]=new Tt(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(St,Nt);Ct[t]=new Tt(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(St,Nt);Ct[t]=new Tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),Ct.tabIndex=new Tt("tabIndex",1,!1,"tabindex",null);var It={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function At(e,t,n){return(e=we.getPooled(It.change,e,t,n)).type="change",He(n),ee(e),e}var jt=null,zt=null;function Bt(e){I(e,!1)}function Wt(e){if(ot(V(e)))return e}function Ht(e,t){if("change"===e)return t}var Vt=!1;function $t(){jt&&(jt.detachEvent("onpropertychange",Kt),zt=jt=null)}function Kt(e){"value"===e.propertyName&&Wt(zt)&&Xe(Bt,e=At(zt,e,et(e)))}function Qt(e,t,n){"focus"===e?($t(),zt=n,(jt=t).attachEvent("onpropertychange",Kt)):"blur"===e&&$t()}function qt(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Wt(zt)}function Gt(e,t){if("click"===e)return Wt(t)}function Yt(e,t){if("input"===e||"change"===e)return Wt(t)}a.canUseDOM&&(Vt=tt("input")&&(!document.documentMode||9Nn.length&&Nn.push(e)}}}var Fn={get _enabled(){return On},setEnabled:Mn,isEnabled:function(){return On},trapBubbledEvent:Rn,trapCapturedEvent:Ln,dispatchEvent:Dn},In={},An=0,jn="_reactListenersID"+(""+Math.random()).slice(2);function zn(e){return Object.prototype.hasOwnProperty.call(e,jn)||(e[jn]=An++,In[e[jn]]={}),In[e[jn]]}function Bn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wn(e,t){var n,r=Bn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Bn(r)}}function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Vn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,$n={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Kn=null,Qn=null,qn=null,Gn=!1;function Yn(e,t){if(Gn||null==Kn||Kn!==u())return null;var n=Kn;return"selectionStart"in n&&Hn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,qn&&c(qn,n)?null:(qn=n,(e=we.getPooled($n.select,Qn,e,t)).type="select",e.target=Kn,ee(e),e)}var Xn={eventTypes:$n,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=zn(a),o=k.onSelect;for(var i=0;it)){e=-1;for(var n=[],r=lr;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||ot&&(t=8),hr=t=t.length||d("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Tr(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Cr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var Sr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Nr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Pr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Nr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Or=void 0,Mr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Sr.svg||"innerHTML"in e)e.innerHTML=t;else{for((Or=Or||document.createElement("div")).innerHTML="",t=Or.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Lr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ur=["Webkit","ms","Moz","O"];function Dr(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||Lr.hasOwnProperty(o)&&Lr[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Lr).forEach(function(e){Ur.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lr[t]=Lr[e]})});var Fr=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ir(e,t,n){t&&(Fr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&d("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&d("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||d("61")),null!=t.style&&"object"!=typeof t.style&&d("62",n()))}function Ar(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jr=l.thatReturns("");function zr(e,t){var n=zn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=k[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Wr(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function Hr(e,t,n,r){var o=Ar(t,n);switch(t){case"iframe":case"object":Rn("load",e);var a=n;break;case"video":case"audio":for(a=0;aao||(e.current=oo[ao],oo[ao]=null,ao--)}function uo(e,t){oo[++ao]=e.current,e.current=t}var co=io(f),so=io(!1),fo=f;function po(e){return mo(e)?fo:co.current}function ho(e,t){var n=e.type.contextTypes;if(!n)return f;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function mo(e){return 2===e.tag&&null!=e.type.childContextTypes}function vo(e){mo(e)&&(lo(so),lo(co))}function yo(e){lo(so),lo(co)}function go(e,t,n){co.current!==f&&d("168"),uo(co,t),uo(so,n)}function bo(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in r||d("108",bt(e)||"Unknown",o);return i({},t,n)}function wo(e){if(!mo(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||f,fo=co.current,uo(co,t),uo(so,so.current),!0}function ko(e,t){var n=e.stateNode;if(n||d("169"),t){var r=bo(e,fo);n.__reactInternalMemoizedMergedChildContext=r,lo(so),lo(co),uo(co,r)}else lo(so);uo(so,t)}function xo(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Eo(e,t,n){var r=e.alternate;return null===r?((r=new xo(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function _o(e,t,n){var r=e.type,o=e.key;if(e=e.props,"function"==typeof r)var a=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"==typeof r)a=5;else switch(r){case ct:return To(e.children,t,n,o);case ht:a=11,t|=3;break;case st:a=11,t|=2;break;case ft:return(r=new xo(15,e,o,4|t)).type=ft,r.expirationTime=n,r;case vt:a=16,t|=2;break;default:e:{switch("object"==typeof r&&null!==r?r.$$typeof:null){case dt:a=13;break e;case pt:a=12;break e;case mt:a=14;break e;default:d("130",null==r?r:typeof r,"")}a=void 0}}return(t=new xo(a,e,o,t)).type=r,t.expirationTime=n,t}function To(e,t,n,r){return(e=new xo(10,e,r,t)).expirationTime=n,e}function Co(e,t,n){return(e=new xo(6,e,null,t)).expirationTime=n,e}function So(e,t,n){return(t=new xo(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function No(e,t,n){return e={current:t=new xo(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}var Po=null,Oo=null;function Mo(e){return function(t){try{return e(t)}catch(e){}}}function Ro(e){"function"==typeof Po&&Po(e)}function Lo(e){"function"==typeof Oo&&Oo(e)}var Uo=!1;function Do(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Fo(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Io(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Ao(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function jo(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,a=null;null===o&&(o=e.updateQueue=Do(e.memoizedState))}else o=e.updateQueue,a=r.updateQueue,null===o?null===a?(o=e.updateQueue=Do(e.memoizedState),a=r.updateQueue=Do(r.memoizedState)):o=e.updateQueue=Fo(a):null===a&&(a=r.updateQueue=Fo(o));null===a||o===a?Ao(o,t,n):null===o.lastUpdate||null===a.lastUpdate?(Ao(o,t,n),Ao(a,t,n)):(Ao(o,t,n),a.lastUpdate=t)}function zo(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=Do(e.memoizedState):Bo(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Bo(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Fo(t)),t}function Wo(e,t,n,r,o,a){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(a,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(o="function"==typeof(e=n.payload)?e.call(a,r,o):e)||void 0===o)break;return i({},r,o);case 2:Uo=!0}return r}function Ho(e,t,n,r,o){if(Uo=!1,!(0===t.expirationTime||t.expirationTime>o)){for(var a=(t=Bo(e,t)).baseState,i=null,l=0,u=t.firstUpdate,c=a;null!==u;){var s=u.expirationTime;s>o?(null===i&&(i=u,a=c),(0===l||l>s)&&(l=s)):(c=Wo(e,0,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(s=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>o?(null===s&&(s=u,null===i&&(a=c)),(0===l||l>f)&&(l=f)):(c=Wo(e,0,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===i&&(t.lastUpdate=null),null===s?t.lastCapturedUpdate=null:e.effectTag|=32,null===i&&null===s&&(a=c),t.baseState=a,t.firstUpdate=i,t.firstCapturedUpdate=s,t.expirationTime=l,e.memoizedState=c}}function Vo(e,t){"function"!=typeof e&&d("191",e),e.call(t)}function $o(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,Vo(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)null!==(t=e.callback)&&(e.callback=null,Vo(t,n)),e=e.nextEffect}function Ko(e,t){return{value:e,source:t,stack:wt(t)}}var Qo=io(null),qo=io(null),Go=io(0);function Yo(e){var t=e.type._context;uo(Go,t._changedBits),uo(qo,t._currentValue),uo(Qo,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function Xo(e){var t=Go.current,n=qo.current;lo(Qo),lo(qo),lo(Go),(e=e.type._context)._currentValue=n,e._changedBits=t}var Jo={},Zo=io(Jo),ea=io(Jo),ta=io(Jo);function na(e){return e===Jo&&d("174"),e}function ra(e,t){uo(ta,t),uo(ea,e),uo(Zo,Jo);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pr(null,"");break;default:t=Pr(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}lo(Zo),uo(Zo,t)}function oa(e){lo(Zo),lo(ea),lo(ta)}function aa(e){ea.current===e&&(lo(Zo),lo(ea))}function ia(e,t,n){var r=e.memoizedState;r=null===(t=t(n,r))||void 0===t?r:i({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}var la={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===ln(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=bi(),o=Io(r=yi(r,e));o.payload=t,void 0!==n&&null!==n&&(o.callback=n),jo(e,o,r),gi(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=bi(),o=Io(r=yi(r,e));o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),jo(e,o,r),gi(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=bi(),r=Io(n=yi(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),jo(e,r,n),gi(e,n)}};function ua(e,t,n,r,o,a){var i=e.stateNode;return e=e.type,"function"==typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!c(t,n)||!c(r,o))}function ca(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&la.enqueueReplaceState(t,t.state,null)}function sa(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,a=po(e);r.props=o,r.state=e.memoizedState,r.refs=f,r.context=ho(e,a),null!==(a=e.updateQueue)&&(Ho(e,a,o,r,t),r.state=e.memoizedState),"function"==typeof(a=e.type.getDerivedStateFromProps)&&(ia(e,a,o),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&la.enqueueReplaceState(r,r.state,null),null!==(a=e.updateQueue)&&(Ho(e,a,o,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}var fa=Array.isArray;function da(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&d("110"),r=n.stateNode),r||d("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs===f?r.refs={}:r.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}"string"!=typeof e&&d("148"),n._owner||d("254",e)}return e}function pa(e,t){"textarea"!==e.type&&d("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function ha(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return(e=Eo(e,t,n)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)m?(v=d,d=null):v=d.sibling;var y=p(o,d,l[m],u);if(null===y){null===d&&(d=v);break}e&&d&&null===y.alternate&&t(o,d),i=a(y,i,m),null===s?c=y:s.sibling=y,s=y,d=v}if(m===l.length)return n(o,d),c;if(null===d){for(;mv?(y=m,m=null):y=m.sibling;var b=p(o,m,g.value,u);if(null===b){m||(m=y);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,v),null===s?c=b:s.sibling=b,s=b,m=y}if(g.done)return n(o,m),c;if(null===m){for(;!g.done;v++,g=l.next())null!==(g=f(o,g.value,u))&&(i=a(g,i,v),null===s?c=g:s.sibling=g,s=g);return c}for(m=r(o,m);!g.done;v++,g=l.next())null!==(g=h(m,o,v,g.value,u))&&(e&&null!==g.alternate&&m.delete(null===g.key?v:g.key),i=a(g,i,v),null===s?c=g:s.sibling=g,s=g);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,r,a,l){var u="object"==typeof a&&null!==a&&a.type===ct&&null===a.key;u&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case lt:e:{for(c=a.key,u=r;null!==u;){if(u.key===c){if(10===u.tag?a.type===ct:u.type===a.type){n(e,u.sibling),(r=o(u,a.type===ct?a.props.children:a.props,l)).ref=da(e,u,a),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===ct?((r=To(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=_o(a,e.mode,l)).ref=da(e,r,a),l.return=e,e=l)}return i(e);case ut:e:{for(u=a.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=o(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=So(a,e.mode,l)).return=e,e=r}return i(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,a,l)).return=e,e=r):(n(e,r),(r=Co(a,e.mode,l)).return=e,e=r),i(e);if(fa(a))return m(e,r,a,l);if(gt(a))return v(e,r,a,l);if(c&&pa(e,a),void 0===a&&!u)switch(e.tag){case 2:case 1:d("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var ma=ha(!0),va=ha(!1),ya=null,ga=null,ba=!1;function wa(e,t){var n=new xo(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ka(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function xa(e){if(ba){var t=ga;if(t){var n=t;if(!ka(e,t)){if(!(t=no(n))||!ka(e,t))return e.effectTag|=2,ba=!1,void(ya=e);wa(ya,n)}ya=e,ga=ro(t)}else e.effectTag|=2,ba=!1,ya=e}}function Ea(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;ya=e}function _a(e){if(e!==ya)return!1;if(!ba)return Ea(e),ba=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Jr(t,e.memoizedProps))for(t=ga;t;)wa(e,t),t=no(t);return Ea(e),ga=ya?no(e.stateNode):null,!0}function Ta(){ga=ya=null,ba=!1}function Ca(e,t,n){Sa(e,t,n,t.expirationTime)}function Sa(e,t,n,r){t.child=null===e?va(t,null,n,r):ma(t,e.child,n,r)}function Na(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Pa(e,t,n,r,o){Na(e,t);var a=0!=(64&t.effectTag);if(!n&&!a)return r&&ko(t,!1),Ra(e,t);n=t.stateNode,at.current=t;var i=a?null:n.render();return t.effectTag|=1,a&&(Sa(e,t,null,o),t.child=null),Sa(e,t,i,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ko(t,!0),t.child}function Oa(e){var t=e.stateNode;t.pendingContext?go(0,t.pendingContext,t.pendingContext!==t.context):t.context&&go(0,t.context,!1),ra(e,t.containerInfo)}function Ma(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var a=0|o.stateNode;if(o.type===t&&0!=(a&n)){for(a=o;null!==a;){var i=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==i&&(0===i.expirationTime||i.expirationTime>r)&&(i.expirationTime=r);else{if(null===i||!(0===i.expirationTime||i.expirationTime>r))break;i.expirationTime=r}a=a.return}a=null}else a=o.child;break;case 13:a=o.type===e.type?null:o.child;break;default:a=o.child}if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}}function Ra(e,t){if(null!==e&&t.child!==e.child&&d("153"),null!==t.child){var n=Eo(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Eo(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function La(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Oa(t);break;case 2:wo(t);break;case 4:ra(t,t.stateNode.containerInfo);break;case 13:Yo(t)}return null}switch(t.tag){case 0:null!==e&&d("155");var r=t.type,o=t.pendingProps,a=po(t);return r=r(o,a=ho(t,a)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof(a=a.getDerivedStateFromProps)&&ia(t,a,o),o=wo(t),r.updater=la,t.stateNode=r,r._reactInternalFiber=t,sa(t,n),e=Pa(e,t,!0,o,n)):(t.tag=1,Ca(e,t,r),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,so.current||t.memoizedProps!==n?(o=o(n,r=ho(t,r=po(t))),t.effectTag|=1,Ca(e,t,o),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 2:if(o=wo(t),null===e)if(null===t.stateNode){var i=t.pendingProps,l=t.type;r=po(t);var u=2===t.tag&&null!=t.type.contextTypes;i=new l(i,a=u?ho(t,r):f),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=la,t.stateNode=i,i._reactInternalFiber=t,u&&((u=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,u.__reactInternalMemoizedMaskedChildContext=a),sa(t,n),r=!0}else{l=t.type,r=t.stateNode,u=t.memoizedProps,a=t.pendingProps,r.props=u;var c=r.context;i=ho(t,i=po(t));var s=l.getDerivedStateFromProps;(l="function"==typeof s||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(u!==a||c!==i)&&ca(t,r,a,i),Uo=!1;var p=t.memoizedState;c=r.state=p;var h=t.updateQueue;null!==h&&(Ho(t,h,a,r,n),c=t.memoizedState),u!==a||p!==c||so.current||Uo?("function"==typeof s&&(ia(t,s,a),c=t.memoizedState),(u=Uo||ua(t,u,a,p,c,i))?(l||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(t.effectTag|=4)):("function"==typeof r.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),r.props=a,r.state=c,r.context=i,r=u):("function"==typeof r.componentDidMount&&(t.effectTag|=4),r=!1)}else l=t.type,r=t.stateNode,a=t.memoizedProps,u=t.pendingProps,r.props=a,c=r.context,i=ho(t,i=po(t)),(l="function"==typeof(s=l.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(a!==u||c!==i)&&ca(t,r,u,i),Uo=!1,c=t.memoizedState,p=r.state=c,null!==(h=t.updateQueue)&&(Ho(t,h,u,r,n),p=t.memoizedState),a!==u||c!==p||so.current||Uo?("function"==typeof s&&(ia(t,s,u),p=t.memoizedState),(s=Uo||ua(t,a,u,c,p,i))?(l||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(u,p,i),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(u,p,i)),"function"==typeof r.componentDidUpdate&&(t.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),r.props=u,r.state=p,r.context=i,r=s):("function"!=typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Pa(e,t,r,o,n);case 3:return Oa(t),null!==(o=t.updateQueue)?(r=null!==(r=t.memoizedState)?r.element:null,Ho(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===r?(Ta(),e=Ra(e,t)):(r=t.stateNode,(r=(null===e||null===e.child)&&r.hydrate)&&(ga=ro(t.stateNode.containerInfo),ya=t,r=ba=!0),r?(t.effectTag|=2,t.child=va(t,null,o,n)):(Ta(),Ca(e,t,o)),e=t.child)):(Ta(),e=Ra(e,t)),e;case 5:return na(ta.current),(o=na(Zo.current))!==(r=Pr(o,t.type))&&(uo(ea,t),uo(Zo,r)),null===e&&xa(t),o=t.type,u=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,so.current||u!==r||((u=1&t.mode&&!!r.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=r.children,Jr(o,r)?u=null:a&&Jr(o,a)&&(t.effectTag|=16),Na(e,t),1073741823!==n&&1&t.mode&&r.hidden?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(Ca(e,t,u),t.memoizedProps=r,e=t.child)):e=Ra(e,t),e;case 6:return null===e&&xa(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ra(t,t.stateNode.containerInfo),o=t.pendingProps,so.current||t.memoizedProps!==o?(null===e?t.child=ma(t,null,o,n):Ca(e,t,o),t.memoizedProps=o,e=t.child):e=Ra(e,t),e;case 14:return o=t.type.render,n=t.pendingProps,r=t.ref,so.current||t.memoizedProps!==n||r!==(null!==e?e.ref:null)?(Ca(e,t,o=o(n,r)),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 10:return n=t.pendingProps,so.current||t.memoizedProps!==n?(Ca(e,t,n),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 11:return n=t.pendingProps.children,so.current||null!==n&&t.memoizedProps!==n?(Ca(e,t,n),t.memoizedProps=n,e=t.child):e=Ra(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=Ra(e,t):(Ca(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=!0;if(so.current)i=!1;else if(a===o)return t.stateNode=0,Yo(t),Ra(e,t);var l=o.value;if(t.memoizedProps=o,null===a)l=1073741823;else if(a.value===o.value){if(a.children===o.children&&i)return t.stateNode=0,Yo(t),Ra(e,t);l=0}else{var u=a.value;if(u===l&&(0!==u||1/u==1/l)||u!=u&&l!=l){if(a.children===o.children&&i)return t.stateNode=0,Yo(t),Ra(e,t);l=0}else if(l="function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823,0==(l|=0)){if(a.children===o.children&&i)return t.stateNode=0,Yo(t),Ra(e,t)}else Ma(t,r,l,n)}return t.stateNode=l,Yo(t),Ca(e,t,o.children),t.child}(e,t,n);case 12:e:if(r=t.type,a=t.pendingProps,u=t.memoizedProps,o=r._currentValue,i=r._changedBits,so.current||0!==i||u!==a){if(t.memoizedProps=a,void 0!==(l=a.unstable_observedBits)&&null!==l||(l=1073741823),t.stateNode=l,0!=(i&l))Ma(t,r,i,n);else if(u===a){e=Ra(e,t);break e}n=(n=a.children)(o),t.effectTag|=1,Ca(e,t,n),e=t.child}else e=Ra(e,t);return e;default:d("156")}}function Ua(e){e.effectTag|=4}var Da=void 0,Fa=void 0,Ia=void 0;function Aa(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return vo(t),null;case 3:oa(),yo();var r=t.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(_a(t),t.effectTag&=-3),Da(t),null;case 5:aa(t),r=na(ta.current);var o=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,i=t.stateNode,l=na(Zo.current);i=Vr(i,o,a,n,r),Fa(e,t,i,o,a,n,r,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&d("166"),null;if(e=na(Zo.current),_a(t))n=t.stateNode,o=t.type,a=t.memoizedProps,n[B]=t,n[W]=a,r=Kr(n,o,a,e,r),t.updateQueue=r,null!==r&&Ua(t);else{(e=Br(o,n,r,e))[B]=t,e[W]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}Hr(e,o,n,r),Xr(o,n)&&Ua(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ia(e,t,e.memoizedProps,n);else{if("string"!=typeof n)return null===t.stateNode&&d("166"),null;r=na(ta.current),na(Zo.current),_a(t)?(r=t.stateNode,n=t.memoizedProps,r[B]=t,Qr(r,n)&&Ua(t)):((r=Wr(n,r))[B]=t,t.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return oa(),Da(t),null;case 13:return Xo(t),null;case 12:return null;case 0:d("167");default:d("156")}}function ja(e,t){var n=t.source;null===t.stack&&null!==n&&wt(n),null!==n&&bt(n),t=t.value,null!==e&&2===e.tag&&bt(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function za(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){mi(e,t)}else t.current=null}function Ba(e){switch(Lo(e),e.tag){case 2:za(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){mi(e,t)}break;case 5:za(e);break;case 4:Va(e)}}function Wa(e){return 5===e.tag||3===e.tag||4===e.tag}function Ha(e){e:{for(var t=e.return;null!==t;){if(Wa(t)){var n=t;break e}t=t.return}d("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:d("161")}16&n.effectTag&&(Rr(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Wa(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(r){var a=t,i=o.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(i,l):a.insertBefore(i,l)}else t.insertBefore(o.stateNode,n);else r?(a=t,i=o.stateNode,8===a.nodeType?a.parentNode.insertBefore(i,a):a.appendChild(i)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Va(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&d("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,i=a;;)if(Ba(i),null!==i.child&&4!==i.tag)i.child.return=i,i=i.child;else{if(i===a)break;for(;null===i.sibling;){if(null===i.return||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}o?(a=r,i=t.stateNode,8===a.nodeType?a.parentNode.removeChild(i):a.removeChild(i)):r.removeChild(t.stateNode)}else if(4===t.tag?r=t.stateNode.containerInfo:Ba(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function $a(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[W]=r,$r(n,a,o,e,r))}break;case 6:null===t.stateNode&&d("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:d("163")}}function Ka(e,t,n){(n=Io(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ji(r),ja(e,t)},n}function Qa(e,t,n){(n=Io(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===si?si=new Set([this]):si.add(this);var n=t.value,r=t.stack;ja(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function qa(e,t,n,r,o,a){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=Ko(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,void zo(e,r=Ka(e,r,a),a);case 2:if(t=r,n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===si||!si.has(n)))return e.effectTag|=1024,void zo(e,r=Qa(e,t,a),a)}e=e.return}while(null!==e)}function Ga(e){switch(e.tag){case 2:vo(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return oa(),yo(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return aa(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 4:return oa(),null;case 13:return Xo(e),null;default:return null}}Da=function(){},Fa=function(e,t,n){(t.updateQueue=n)&&Ua(t)},Ia=function(e,t,n,r){n!==r&&Ua(t)};var Ya=Zr(),Xa=2,Ja=Ya,Za=0,ei=0,ti=!1,ni=null,ri=null,oi=0,ai=-1,ii=!1,li=null,ui=!1,ci=!1,si=null;function fi(){if(null!==ni)for(var e=ni.return;null!==e;){var t=e;switch(t.tag){case 2:vo(t);break;case 3:oa(),yo();break;case 5:aa(t);break;case 4:oa();break;case 13:Xo(t)}e=e.return}ri=null,oi=0,ai=-1,ii=!1,ni=null,ci=!1}function di(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=Aa(t,e);var o=e;if(1073741823===oi||1073741823!==o.expirationTime){var a=0;switch(o.tag){case 3:case 2:var i=o.updateQueue;null!==i&&(a=i.expirationTime)}for(i=o.child;null!==i;)0!==i.expirationTime&&(0===a||a>i.expirationTime)&&(a=i.expirationTime),i=i.sibling;o.expirationTime=a}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1Pi)&&(Pi=e),e}function gi(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!ti&&0!==oi&&tAi&&d("185")}e=e.return}}function bi(){return Ja=Zr()-Ya,Xa=2+(Ja/10|0)}function wi(e){var t=ei;ei=2+25*(1+((bi()-2+500)/25|0));try{return e()}finally{ei=t}}function ki(e,t,n,r,o){var a=ei;ei=1;try{return e(t,n,r,o)}finally{ei=a}}var xi=null,Ei=null,_i=0,Ti=void 0,Ci=!1,Si=null,Ni=0,Pi=0,Oi=!1,Mi=!1,Ri=null,Li=null,Ui=!1,Di=!1,Fi=!1,Ii=null,Ai=1e3,ji=0,zi=1;function Bi(e){if(0!==_i){if(e>_i)return;null!==Ti&&to(Ti)}var t=Zr()-Ya;_i=e,Ti=eo(Vi,{timeout:10*(e-2)-t})}function Wi(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===Ei?(xi=Ei=e,e.nextScheduledRoot=e):(Ei=Ei.nextScheduledRoot=e).nextScheduledRoot=xi;else{var n=e.remainingExpirationTime;(0===n||t=Ni)&&(!Oi||bi()>=Ni);)bi(),Gi(Si,Ni,!Oi),Hi();else for(;null!==Si&&0!==Ni&&(0===e||e>=Ni);)Gi(Si,Ni,!1),Hi();null!==Li&&(_i=0,Ti=null),0!==Ni&&Bi(Ni),Li=null,Oi=!1,qi()}function Qi(e,t){Ci&&d("253"),Si=e,Ni=t,Gi(e,t,!1),$i(),qi()}function qi(){if(ji=0,null!==Ii){var e=Ii;Ii=null;for(var t=0;tk&&(x=k,k=N,N=x),x=Wn(C,N),E=Wn(C,k),x&&E&&(1!==S.rangeCount||S.anchorNode!==x.node||S.anchorOffset!==x.offset||S.focusNode!==E.node||S.focusOffset!==E.offset)&&((_=document.createRange()).setStart(x.node,x.offset),S.removeAllRanges(),N>k?(S.addRange(_),S.extend(E.node,E.offset)):(_.setEnd(E.node,E.offset),S.addRange(_))))),S=[];for(N=C;N=N.parentNode;)1===N.nodeType&&S.push({element:N,left:N.scrollLeft,top:N.scrollTop});for("function"==typeof C.focus&&C.focus(),C=0;Czi)&&(Oi=!0)}function Ji(e){null===Si&&d("246"),Si.remainingExpirationTime=0,Mi||(Mi=!0,Ri=e)}function Zi(e,t){var n=Ui;Ui=!0;try{return e(t)}finally{(Ui=n)||Ci||$i()}}function el(e,t){if(Ui&&!Di){Di=!0;try{return e(t)}finally{Di=!1}}return e(t)}function tl(e,t){Ci&&d("187");var n=Ui;Ui=!0;try{return ki(e,t)}finally{Ui=n,$i()}}function nl(e,t,n){if(Fi)return e(t,n);Ui||Ci||0===Pi||(Ki(Pi,!1,null),Pi=0);var r=Fi,o=Ui;Ui=Fi=!0;try{return e(t,n)}finally{Fi=r,(Ui=o)||Ci||$i()}}function rl(e){var t=Ui;Ui=!0;try{ki(e)}finally{(Ui=t)||Ci||Ki(1,!1,null)}}function ol(e,t,n,r,o){var a=t.current;if(n){var i;n=n._reactInternalFiber;e:{for(2===ln(n)&&2===n.tag||d("170"),i=n;3!==i.tag;){if(mo(i)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}(i=i.return)||d("171")}i=i.stateNode.context}n=mo(n)?bo(n,i):i}else n=f;return null===t.context?t.context=n:t.pendingContext=n,t=o,(o=Io(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(o.callback=t),jo(a,o,r),gi(a,r),r}function al(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?d("188"):d("268",Object.keys(e))),null===(e=sn(t))?null:e.stateNode}function il(e,t,n,r){var o=t.current;return ol(e,t,n,o=yi(bi(),o),r)}function ll(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function ul(e){var t=e.findFiberByHostInstance;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Po=Mo(function(e){return t.onCommitFiberRoot(n,e)}),Oo=Mo(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}(i({},e,{findHostInstanceByFiber:function(e){return null===(e=sn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}var cl=Zi,sl=nl,fl=function(){Ci||0===Pi||(Ki(Pi,!1,null),Pi=0)};function dl(e){this._expirationTime=vi(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function pl(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function hl(e,t,n){this._internalRoot=No(e,t,n)}function ml(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vl(e,t,n,r,o){ml(n)||d("200");var a=n._reactRootContainer;if(a){if("function"==typeof o){var i=o;o=function(){var e=ll(a._internalRoot);i.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new hl(e,!1,t)}(n,r),"function"==typeof o){var l=o;o=function(){var e=ll(a._internalRoot);l.call(e)}}el(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)})}return ll(a._internalRoot)}function yl(e,t){var n=2=0&&u.splice(t,1)}function h(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return m(t,e.attrs),d(e,t),t}function m(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var u=l++;n=i||(i=h(t)),r=g.bind(null,n,u,!1),o=g.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),d(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=c(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return s(n,t),function(e){for(var o=[],a=0;a {
+ SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
+ .createMenu('Dialog')
+ .addItem('Add sheets', 'openDialog')
+ .addToUi();
+}
+
+const openDialog = () => {
+ var html = HtmlService.createHtmlOutputFromFile('dialog');
+ SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
+ .showModalDialog(html, 'Sheet Editor');
+}
+
+const getSheets = () => SpreadsheetApp
+ .getActive()
+ .getSheets();
+
+const getActiveSheetName = () => SpreadsheetApp
+ .getActive()
+ .getSheetName();
+
+const getSheetsData = () => {
+ let activeSheetName = getActiveSheetName();
+ return getSheets()
+ .map((sheet,index) => {
+ let sheetName = sheet.getName();
+ return {
+ text: sheetName,
+ sheetIndex: index,
+ isActive: sheetName === activeSheetName
+ }
+ });
+}
+
+const addSheet = (sheetTitle) => {
+ SpreadsheetApp.getActive().insertSheet(sheetTitle);
+ return getSheetsData();
+}
+
+const deleteSheet = (sheetIndex) => {
+ var sheets = getSheets();
+ SpreadsheetApp.getActive().deleteSheet(sheets[sheetIndex]);
+ return getSheetsData();
+}
+
+//Must expose public functions
+global.onOpen = onOpen;
+global.openDialog = openDialog;
+global.getSheetsData = getSheetsData;
+global.addSheet = addSheet;
+global.deleteSheet = deleteSheet;
\ No newline at end of file
diff --git a/src/dialog.html b/src/dialog.html
new file mode 100644
index 0000000..a3e0153
--- /dev/null
+++ b/src/dialog.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/index.jsx b/src/index.jsx
new file mode 100644
index 0000000..1500458
--- /dev/null
+++ b/src/index.jsx
@@ -0,0 +1,121 @@
+import React from "react";
+import ReactDOM from "react-dom";
+import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
+
+import css from "./styles.css";
+
+
+class FormInput extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {text: ""};
+ this.handleChange = this.handleChange.bind(this);
+ this.handleSubmit = this.handleSubmit.bind(this);
+ }
+
+ handleChange(e) {
+ this.setState({ text: e.target.value });
+ }
+
+ handleSubmit(e) {
+ e.preventDefault();
+ if (!this.state.text.length) return;
+ this.props.newSheetFormHandler(e, this.state.text)
+ this.setState(prevState => ({
+ text: ""
+ }));
+ }
+
+ render() {
+ return (
+
+ Add a sheet:
+
+
+ );
+ }
+}
+
+class SheetEditor extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {names: []};
+ this.deleteButtonHandler = this.deleteButtonHandler.bind(this);
+ this.newSheetFormHandler = this.newSheetFormHandler.bind(this);
+ }
+
+ componentDidMount() {
+ google.script.run
+ .withSuccessHandler((data) => this.setState({names: data}))
+ .withFailureHandler((error) => alert(error))
+ .getSheetsData()
+ }
+
+ deleteButtonHandler(e, sheetIndex) {
+ return google.script.run
+ .withSuccessHandler((data) => this.setState({names: data}))
+ .withFailureHandler((error) => alert(error))
+ .deleteSheet(sheetIndex)
+ }
+
+ newSheetFormHandler(e, newSheetTitle) {
+ google.script.run
+ .withSuccessHandler((data) => this.setState({names: data}))
+ .withFailureHandler((error) => alert(error))
+ .addSheet(newSheetTitle);
+ }
+
+ render() {
+ let names = this.state.names
+ return (
+
+
+
+ {
+ names.length ?
+ names.map((name) => {
+ return (
+
+ )
+ })
+ : null
+ }
+
+
+ );
+ }
+}
+
+class SheetButton extends React.Component {
+ render() {
+ let sheetIndex = this.props.name.sheetIndex;
+ let sheetName = this.props.name.text;
+ let isActiveSheet = this.props.name.isActive;
+ return (
+
+
+
+ {sheetName}
+
+
+ )
+ }
+}
+
+ReactDOM.render(
+ ,
+ document.getElementById("index")
+);
\ No newline at end of file
diff --git a/src/styles.css b/src/styles.css
new file mode 100644
index 0000000..44a4479
--- /dev/null
+++ b/src/styles.css
@@ -0,0 +1,93 @@
+@import url('https://fonts.googleapis.com/css?family=Lora|Mukta');
+
+input {
+ width: 130px;
+ margin-left: 8px;
+}
+
+button {
+ -webkit-transition-duration: 0.4s; /* Safari */
+ background-color: #f44336;
+ border: 1px solid #f44336;
+ color: white;
+ display: inline-block;
+ font-family: 'Mukta', sans-serif;
+ font-size: 11px;
+ height: 20px;
+ line-height: 15px;
+ margin-left: 3px;
+ margin-right: 11px;
+ padding: 3px;
+ text-transform: uppercase;
+ transition-duration: 0.6s;
+ vertical-align: middle;
+ width: 20px;
+}
+
+button:hover {
+ background-color: white;
+ color: black;
+}
+
+button:active {
+ background-color: #fafafa;
+ transform: translateY(1px);
+ transition-duration: 0.3s;
+}
+
+button:focus {
+ outline: none;
+}
+
+.formBlock {
+ display: -webkit-box;
+ font-family: 'Lora', serif;
+ font-weight: 700;
+}
+
+
+.sheetLine {
+ line-height: 3;
+ height: 30px;
+}
+
+.sheetNameText {
+ font-size: 14px;
+ font-family: 'Lora', serif;
+}
+
+.sheetNameText.active-sheet {
+ border-bottom: 3px solid #338236;
+}
+
+
+
+/*
+ReactCSSTransitionGroup styling
+ */
+.sheetNames-enter {
+ opacity: 0.01;
+}
+
+.sheetNames-enter.sheetNames-enter-active {
+ opacity: 1;
+ transition: opacity 800ms ease-in;
+}
+
+.sheetNames-leave {
+ opacity: 1;
+}
+
+.sheetNames-leave.sheetNames-leave-active {
+ opacity: 0.01;
+ transition: opacity 100ms ease-in;
+}
+
+.sheetNames-appear {
+ opacity: 0.01;
+}
+
+.sheetNames-appear.sheetNames-appear-active {
+ opacity: 1;
+ transition: opacity .5s ease-in;
+}
\ No newline at end of file
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100755
index 0000000..2ae81dc
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,103 @@
+const path = require('path');
+const CopyWebpackPlugin = require('copy-webpack-plugin');
+const CleanWebpackPlugin = require('clean-webpack-plugin');
+const GasPlugin = require('gas-webpack-plugin');
+// const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
+
+const HtmlWebpackPlugin = require("html-webpack-plugin");
+const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
+
+const destination = 'dist';
+
+const htmlPlugin = new HtmlWebpackPlugin({
+ template: "./src/dialog.html",
+ filename: "./dialog.html",
+ inlineSource: '.(js|css)$' // embed all javascript and css inline
+});
+
+const htmlWebpackInlineSourcePlugin = new HtmlWebpackInlineSourcePlugin();
+
+const config = {
+ optimization: {
+ // Set to true to minimize code (e.g. for production).
+ minimize: true
+ },
+ module: {},
+};
+
+const appsscriptConfig = {
+ name: "appsscript copy json",
+ entry: "./appsscript.json",
+ plugins: [
+ new CleanWebpackPlugin([destination]),
+ new CopyWebpackPlugin([
+ {
+ from: './appsscript.json'
+ // to: path.resolve(__dirname, destination)
+ }
+ ])
+ ]
+};
+
+const clientConfig = Object.assign({}, config, {
+ name: "CLIENT",
+ entry: "./src/index.jsx",
+ output: {
+ path: path.resolve(__dirname, destination),
+ },
+ module: {
+ rules: [
+ {
+ test: /\.jsx$/,
+ exclude: /node_modules/,
+ use: {
+ loader: "babel-loader"
+ }
+ },
+ {
+ test: /\.css$/,
+ use: [ 'style-loader', 'css-loader' ]
+ }
+ ],
+ },
+ plugins: [
+ htmlPlugin,
+ new HtmlWebpackInlineSourcePlugin()
+ ]
+});
+
+const serverConfig = Object.assign({}, config, {
+ name: "SERVER",
+ entry: "./src/code.gs",
+ output: {
+ filename: 'code.gs',
+ path: path.resolve(__dirname, destination),
+ },
+ module: {
+ rules: [
+ {
+ test: /\.gs$/,
+ exclude: /node_modules/,
+ use: {
+ loader: "babel-loader"
+ }
+ },
+ ],
+ },
+ optimization: {
+ //don't minimize .gs server code
+ minimize: false
+ },
+ plugins: [
+ new GasPlugin()
+ ]
+});
+
+
+// Return Array of Configurations
+module.exports = [
+ // initialConfig,
+ appsscriptConfig,
+ clientConfig,
+ serverConfig,
+];
\ No newline at end of file