diff --git a/core/Api/FileAPI.class.php b/core/Api/FileAPI.class.php index aca5ab1..39a9ff2 100644 --- a/core/Api/FileAPI.class.php +++ b/core/Api/FileAPI.class.php @@ -181,7 +181,7 @@ namespace Api\File { $sql = $this->user->getSQL(); $token = $this->getParam("token"); $res = $sql->select("UserFile.uid", "valid_until", "token_type", - "maxFiles", "maxSize", "extensions", "name", "path", "directory", "parent_id as parentId") + "maxFiles", "maxSize", "extensions", "name", "path", "directory", "UserFile.parent_id as parentId") ->from("UserFileToken") ->leftJoin("UserFileTokenFile", "UserFileToken.uid", "token_id") ->leftJoin("UserFile", "UserFile.uid", "file_id") @@ -203,30 +203,12 @@ namespace Api\File { ); $this->result["files"] = $this->createFileList($res); - /*foreach ($res as $row) { - if ($row["uid"]) { - $file = array( - "isDirectory" => $row["directory"], - "name" => $row["name"], - "uid" => $row["uid"] - ); - - if ($file["isDirectory"]) { - $file["items"] = array(); - } else { - $file["size"] = @filesize($row["path"]); - $file["mimeType"] = @mime_content_type($row["path"]); - } - - $this->result["files"][] = $file; - } - }*/ - if ($row["token_type"] === "upload") { $this->result["restrictions"] = array( "maxFiles" => $row["maxFiles"] ?? 0, "maxSize" => $row["maxSize"] ?? 0, - "extensions" => $row["extensions"] ?? "" + "extensions" => $row["extensions"] ?? "", + "parentId" => $row["parentId"] ?? 0 ); } } @@ -441,7 +423,7 @@ namespace Api\File { if (!is_null($token)) { - $res = $sql->select("uid", "token_type", "maxFiles", "maxSize", "extensions", "user_id") + $res = $sql->select("uid", "token_type", "maxFiles", "maxSize", "extensions", "user_id", "parent_id") ->from("UserFileToken") ->where(new Compare("token", $token)) ->where(new CondNull("valid_until"), new Compare("valid_until", $sql->now(), ">=")) @@ -458,6 +440,7 @@ namespace Api\File { return $this->createError("Permission denied (token)"); } + $parentId = $res[0]["parent_id"]; $tokenId = $res[0]["uid"]; $maxFiles = $res[0]["maxFiles"] ?? 0; $maxSize = $res[0]["maxSize"] ?? 0; @@ -675,7 +658,8 @@ namespace Api\File { "maxFiles" => new Parameter("maxFiles", Parameter::TYPE_INT, true, 1), "maxSize" => new Parameter("maxSize", Parameter::TYPE_INT, true, null), "extensions" => new StringType("extensions", 64, true, null), - "durability" => new Parameter("durability", Parameter::TYPE_INT, true, 60*24*2) + "durability" => new Parameter("durability", Parameter::TYPE_INT, true, 60*24*2), + "parentId" => new Parameter("parentId", Parameter::TYPE_INT, true, null) )); $this->loginRequired = true; $this->csrfTokenRequired = false; @@ -690,6 +674,7 @@ namespace Api\File { $maxSize = $this->getParam("maxSize"); $extensions = $this->getParam("extensions"); $durability = $this->getParam("durability"); + $parentId = $this->getParam("parentId"); if (!is_null($maxFiles) && $maxFiles < 0) { return $this->createError("Invalid number of maximum files."); @@ -715,12 +700,16 @@ namespace Api\File { $extensions = implode(",", $extensions); } + if (!$this->checkDirectory($parentId)) { + return $this->success; + } + $sql = $this->user->getSQL(); $token = generateRandomString(36); $validUntil = $durability == 0 ? null : (new \DateTime())->modify("+$durability MINUTES"); $res = $sql->insert("UserFileToken", - array("token", "token_type", "maxSize", "maxFiles", "extensions", "valid_until", "user_id")) - ->addRow($token, "upload", $maxSize, $maxFiles, $extensions, $validUntil, $this->user->getId()) + array("token", "token_type", "maxSize", "maxFiles", "extensions", "valid_until", "user_id", "parent_id")) + ->addRow($token, "upload", $maxSize, $maxFiles, $extensions, $validUntil, $this->user->getId(), $parentId) ->returning("uid") ->execute(); diff --git a/core/Configuration/Patch/file_api.class.php b/core/Configuration/Patch/file_api.class.php index f97c1fa..21d1add 100644 --- a/core/Configuration/Patch/file_api.class.php +++ b/core/Configuration/Patch/file_api.class.php @@ -56,9 +56,11 @@ class file_api extends DatabaseScript { # upload only: ->addInt("maxFiles", true) ->addInt("maxSize", true) + ->addInt("parent_id", true) ->addString("extensions", 64, true) ->primaryKey("uid") - ->foreignKey("user_id", "User", "uid", new CascadeStrategy()); + ->foreignKey("user_id", "User", "uid", new CascadeStrategy()) + ->foreignKey("parent_id", "UserFile", "uid", new CascadeStrategy()); $queries[] = $sql->createTable("UserFileTokenFile") ->addInt("file_id") diff --git a/fileControlPanel/src/api.js b/fileControlPanel/src/api.js index b7033ab..beb2b01 100644 --- a/fileControlPanel/src/api.js +++ b/fileControlPanel/src/api.js @@ -8,6 +8,8 @@ export default class API { } csrfToken() { + console.log(this.loggedIn); + console.log(this.user); return this.loggedIn ? this.user.session.csrf_token : null; } diff --git a/fileControlPanel/src/elements/file-browser.js b/fileControlPanel/src/elements/file-browser.js index c573ca7..3c13ede 100644 --- a/fileControlPanel/src/elements/file-browser.js +++ b/fileControlPanel/src/elements/file-browser.js @@ -13,41 +13,46 @@ export function FileBrowser(props) { let tokenObj = props.token || { valid: false }; let onSelectFile = props.onSelectFile || function() { }; let onFetchFiles = props.onFetchFiles || function() { }; + let directories = props.directories || {}; - let [popup, setPopup] = useState({ visible: false, directoryName: "" }); + let [popup, setPopup] = useState({ visible: false, directoryName: "", directory: 0, type: "upload" }); let [alerts, setAlerts] = useState( []); let [filesToUpload, setFilesToUpload] = useState([]); - function svgMiddle(indentation, scale=1.0) { + + function svgMiddle(scale=1.0) { let width = 48 * scale; let height = 64 * scale; - let style = (indentation > 1 ? { marginLeft: ((indentation-1)*width) + "px" } : {}); - return + return - - + + ; } - function svgEnd(indentation, scale=1.0) { + function svgEnd(scale=1.0) { let width = 48 * scale; let height = 64 * scale; - let style = (indentation > 1 ? { marginLeft: ((indentation-1)*width) + "px" } : {}); - return + return { /* vertical line */} - + { /* horizontal line */} - + + + ; + } + + function svgLeft(scale=1.0) { + let width = 48 * scale; + let height = 64 * scale; + return + + { /* vertical line */} + ; } @@ -140,12 +145,16 @@ export function FileBrowser(props) { let size = (fileElement.isDirectory ? "" : formatSize(fileElement.size)); let mimeType = (fileElement.isDirectory ? "application/x-directory" : fileElement.mimeType); let token = (tokenObj && tokenObj.valid ? "&token=" + tokenObj.value : ""); - let svg = <>; + let svg = []; if (indentation > 0) { + for (let i = 0; i < indentation - 1; i++) { + svg.push(svgLeft(0.75)); + } + if (i === values.length - 1) { - svg = svgEnd(indentation, 0.75); + svg.push(svgEnd(0.75)); } else { - svg = svgMiddle(indentation, 0.75); + svg.push(svgMiddle(0.75)); } } @@ -193,6 +202,13 @@ export function FileBrowser(props) { ); } + let options = []; + for (const [uid, dir] of Object.entries(directories)) { + options.push( + + ); + } + if (writePermissions) { for(let i = 0; i < filesToUpload.length; i++) { @@ -255,7 +271,7 @@ export function FileBrowser(props) { Download Selected Files ({selectedCount}) { api.loggedIn ? -
- - onPopupChange(e, "directoryName")}/> + +
+ { popup.type !== "upload" ? +
+ + onPopupChange(e, "directoryName")}/> +
: <> + } ; - function onPopupOpen() { - setPopup({ ...popup, visible: true }); + function onPopupOpen(type) { + setPopup({ ...popup, visible: true, type: type }); } function onPopupClose() { @@ -306,13 +331,18 @@ export function FileBrowser(props) { function onPopupButton(btn) { if (btn === "Ok") { - api.createDirectory(popup.directoryName, null).then((res) => { - if (!res.success) { - pushAlert(res, "Error creating directory"); - } else { - fetchFiles(); - } - }) + let parentId = popup.directory === 0 ? null : popup.directory; + if (popup.type === "createDirectory") { + api.createDirectory(popup.directoryName, parentId).then((res) => { + if (!res.success) { + pushAlert(res, "Error creating directory"); + } else { + fetchFiles(); + } + }); + } else if (popup.type === "upload") { + onUpload(); + } } onPopupClose(); @@ -374,7 +404,8 @@ export function FileBrowser(props) { function onUpload() { let token = (api.loggedIn ? null : tokenObj.value); - api.upload(filesToUpload, token).then((res) => { + let parentId = ((!api.loggedIn || popup.directory === 0) ? null : popup.directory); + api.upload(filesToUpload, token, parentId).then((res) => { if (res.success) { setFilesToUpload([]); fetchFiles(); diff --git a/fileControlPanel/src/elements/token-list.js b/fileControlPanel/src/elements/token-list.js index 14c22e4..2f79507 100644 --- a/fileControlPanel/src/elements/token-list.js +++ b/fileControlPanel/src/elements/token-list.js @@ -9,6 +9,7 @@ export function TokenList(props) { let api = props.api; let selectedFiles = props.selectedFiles || []; + let directories = props.directories || {}; let [tokens, setTokens] = useState(null); let [alerts, setAlerts] = useState([]); @@ -19,7 +20,8 @@ export function TokenList(props) { maxSize: 0, extensions: "", durability: 24 * 60 * 2, - visible: false + visible: false, + directory: 0 }); function fetchTokens() { @@ -72,6 +74,13 @@ export function TokenList(props) { ); } + let options = []; + for (const [uid, dir] of Object.entries(directories)) { + options.push( + + ); + } + return <>

@@ -128,6 +137,13 @@ export function TokenList(props) { {popup.tokenType === "upload" ? <> +
+ + +
Upload Restrictions:
@@ -212,7 +228,8 @@ export function TokenList(props) { } }); } else if (popup.tokenType === "upload") { - api.createUploadToken(durability, null, popup.maxFiles, popup.maxSize, popup.extensions).then((res) => { + let parentId = popup.directory === 0 ? null : popup.directory; + api.createUploadToken(durability, parentId, popup.maxFiles, popup.maxSize, popup.extensions).then((res) => { if (!res.success) { pushAlert(res, "Error creating token"); } else { diff --git a/fileControlPanel/src/index.js b/fileControlPanel/src/index.js index 75deaf1..6d3f7b2 100644 --- a/fileControlPanel/src/index.js +++ b/fileControlPanel/src/index.js @@ -24,6 +24,24 @@ class FileControlPanel extends React.Component { this.setState({ ...this.state, files: files }); } + getDirectories(prefix = "/", items = null) { + let directories = { } + items = items || this.state.files; + + if (prefix === "/") { + directories[0] = "/"; + } + + for(const fileItem of Object.values(items)) { + if (fileItem.isDirectory) { + let path = prefix + (prefix.length > 1 ? "/" : "") + fileItem.name; + directories[fileItem.uid] = path; + directories = Object.assign(directories, {...this.getDirectories(path, fileItem.items)}); + } + } + return directories; + } + getSelectedIds(items = null, recursive = true) { let ids = []; items = items || this.state.files; @@ -90,6 +108,7 @@ class FileControlPanel extends React.Component { this.setState({ ...this.state, validatingToken: true, errorMessage: "" }); token = this.state.token.value; } + this.api.validateToken(token).then((res) => { let newState = { ...this.state, loaded: true, validatingToken: false }; if (res.success) { @@ -143,10 +162,11 @@ class FileControlPanel extends React.Component { return <>Loading… ; } else if (this.api.loggedIn || this.state.token.valid) { let selectedIds = this.getSelectedIds(); + let directories = this.getDirectories(); let tokenList = (this.api.loggedIn) ?
- +
: <>; @@ -156,7 +176,7 @@ class FileControlPanel extends React.Component {

File Control Panel

-
diff --git a/js/files.min.js b/js/files.min.js index 400cdbd..e12537a 100644 --- a/js/files.min.js +++ b/js/files.min.js @@ -299,4 +299,4 @@ e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r,a,i,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(d,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},a=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,_=window.Date,m=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=_.now();t.unstable_now=function(){return _.now()-y}}var M=!1,v=null,g=-1,L=5,k=0;o=function(){return t.unstable_now()>=k},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,a=e[r];if(!(void 0!==a&&0S(o,n))void 0!==u&&0>S(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],j=[],E=1,H=null,O=3,P=!1,F=!1,A=!1;function N(e){for(var t=D(j);null!==t;){if(null===t.callback)T(j);else{if(!(t.startTime<=e))break;T(j),t.sortIndex=t.expirationTime,w(x,t)}t=D(j)}}function C(e){if(A=!1,N(e),!F)if(null!==D(x))F=!0,r(W);else{var t=D(j);null!==t&&a(C,t.startTime-e)}}function W(e,n){F=!1,A&&(A=!1,i()),P=!0;var r=O;try{for(N(n),H=D(x);null!==H&&(!(H.expirationTime>n)||e&&!o());){var s=H.callback;if(null!==s){H.callback=null,O=H.priorityLevel;var u=s(H.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?H.callback=u:H===D(x)&&T(x),N(n)}else T(x);H=D(x)}if(null!==H)var l=!0;else{var d=D(j);null!==d&&a(C,d.startTime-n),l=!1}return l}finally{H=null,O=r,P=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var R=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){F||P||(F=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return D(x)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=R,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0s?(e.sortIndex=u,w(j,e),null===D(x)&&e===D(j)&&(A?i():A=!0,a(C,u-s))):(e.sortIndex=o,w(x,e),F||P||(F=!0,r(W))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=D(x);return n!==H&&null!==H&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimea;)K(e,n=r[a++],t[n]);return e},Q=function(e){var t=C.call(this,e=k(e,!0));return!(this===I&&a(z,e)&&!a(R,e))&&(!(t||!a(this,e)||!a(z,e)||a(this,A)&&this[A][e])||t)},Z=function(e,t){if(e=L(e),t=k(t,!0),e!==I||!a(z,t)||a(R,t)){var n=j(e,t);return!n||!a(z,t)||a(e,A)&&e[A][t]||(n.enumerable=!0),n}},X=function(e){for(var t,n=H(L(e)),r=[],i=0;n.length>i;)a(z,t=n[i++])||t==A||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===I,r=H(n?R:L(e)),i=[],o=0;r.length>o;)!a(z,t=r[o++])||n&&!a(I,t)||i.push(z[t]);return i};U||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(R,n),a(this,A)&&a(this[A],e)&&(this[A][e]=!1),B(this,e,b(1,n))};return i&&V&&B(I,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),D.f=Z,S.f=K,n(40).f=w.f=X,n(52).f=Q,T.f=ee,i&&!n(32)&&s(I,"propertyIsEnumerable",Q,!0),m.f=function(e){return G(_(e))}),o(o.G+o.W+o.F*!U,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)_(te[ne++]);for(var re=x(_.store),ae=0;re.length>ae;)h(re[ae++]);o(o.S+o.F*!U,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=O(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?Y(e):q(Y(e),t)},defineProperty:K,defineProperties:q,getOwnPropertyDescriptor:Z,getOwnPropertyNames:X,getOwnPropertySymbols:ee});var ie=l((function(){T.f(1)}));o(o.S+o.F*ie,"Object",{getOwnPropertySymbols:function(e){return T.f(g(e))}}),P&&o(o.S+o.F*(!U||l((function(){var e=O();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=t=r[1],(v(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,F.apply(P,r)}}),O.prototype[N]||n(14)(O.prototype,N,O.prototype.valueOf),c(O,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(50)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(37),a=n(56),i=n(52);e.exports=function(e){var t=r(e),n=a.f;if(n)for(var o,s=n(e),u=i.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,n){var r=n(2);r(r.S,"Object",{create:n(39)})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperty:n(11).f})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperties:n(101)})},function(e,t,n){var r=n(18),a=n(19).f;n(28)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(20);n(28)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(37);n(28)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(28)("getOwnPropertyNames",(function(){return n(102).f}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6);n(28)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(103)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(104)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){"use strict";var r=n(47),a={};a[n(7)("toStringTag")]="z",a+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(2);r(r.P,"Function",{bind:n(105)})},function(e,t,n){var r=n(11).f,a=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in a||n(10)&&r(a,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(6),a=n(20),i=n(7)("hasInstance"),o=Function.prototype;i in o||n(11).f(o,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(2),a=n(107);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(108);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(4),a=n(17),i=n(23),o=n(76),s=n(26),u=n(5),l=n(40).f,d=n(19).f,c=n(11).f,f=n(48).trim,_=r.Number,m=_,h=_.prototype,p="Number"==i(n(39)(h)),y="trim"in String.prototype,M=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,a,i=(t=y?t.trim():f(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+t}for(var o,u=t.slice(2),l=0,d=u.length;la)return NaN;return parseInt(u,r)}}return+t};if(!_(" 0o1")||!_("0b1")||_("+0x1")){_=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof _&&(p?u((function(){h.valueOf.call(n)})):"Number"!=i(n))?o(new m(M(t)),n,_):M(t)};for(var v,g=n(10)?l(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),L=0;g.length>L;L++)a(m,v=g[L])&&!a(_,v)&&c(_,v,d(m,v));_.prototype=h,h.constructor=_,n(15)(r,"Number",_)}},function(e,t,n){"use strict";var r=n(2),a=n(24),i=n(109),o=n(77),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],d="Number.toFixed: incorrect invocation!",c=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},_=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2==1?m(e,t-1,n*e):m(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(5)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,u=i(this,d),l=a(e),h="",p="0";if(l<0||l>20)throw RangeError(d);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*m(2,69,1))-69)<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c(0,n),r=l;r>=7;)c(1e7,0),r-=7;for(c(m(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<0?h+((s=p.length)<=l?"0."+o.call("0",l-s)+p:p.slice(0,s-l)+"."+p.slice(s-l)):h+p}})},function(e,t,n){"use strict";var r=n(2),a=n(5),i=n(109),o=1..toPrecision;r(r.P+r.F*(a((function(){return"1"!==o.call(1,void 0)}))||!a((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(2),a=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{isInteger:n(110)})},function(e,t,n){var r=n(2);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(2),a=n(110),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return a(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(2);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(2);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(2),a=n(108);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(107);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(111),i=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:a(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(2),a=Math.asinh;r(r.S+r.F*!(a&&1/a(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(2),a=Math.atanh;r(r.S+r.F*!(a&&1/a(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(2),a=n(78);r(r.S,"Math",{cbrt:function(e){return a(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(2),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},function(e,t,n){var r=n(2),a=n(79);r(r.S+r.F*(a!=Math.expm1),"Math",{expm1:a})},function(e,t,n){var r=n(2);r(r.S,"Math",{fround:n(112)})},function(e,t,n){var r=n(2),a=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,o=0,s=arguments.length,u=0;o0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(e,t,n){var r=n(2),a=Math.imul;r(r.S+r.F*n(5)((function(){return-5!=a(4294967295,5)||2!=a.length})),"Math",{imul:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r;return 0|a*i+((65535&n>>>16)*i+a*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log1p:n(111)})},function(e,t,n){var r=n(2);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(2);r(r.S,"Math",{sign:n(78)})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S+r.F*n(5)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(2),a=n(38),i=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(2),a=n(18),i=n(8);r(r.S,"String",{raw:function(e){for(var t=a(e.raw),n=i(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(2),a=n(58)(!1);r(r.P,"String",{codePointAt:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".endsWith;r(r.P+r.F*n(83)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=a(t.length),s=void 0===n?r:Math.min(a(n),r),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,n){"use strict";var r=n(2),a=n(82);r(r.P+r.F*n(83)("includes"),"String",{includes:function(e){return!!~a(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2);r(r.P,"String",{repeat:n(77)})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".startsWith;r(r.P+r.F*n(83)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=a(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(16)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(16)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(16)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(16)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(16)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(16)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(16)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(16)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(16)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(16)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(16)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(16)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(16)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(2);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26);r(r.P+r.F*n(5)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(2),a=n(356);r(r.P+r.F*(Date.prototype.toISOString!==a),"Date",{toISOString:a})},function(e,t,n){"use strict";var r=n(5),a=Date.prototype.getTime,i=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(a.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(15)(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){var r=n(7)("toPrimitive"),a=Date.prototype;r in a||n(14)(a,r,n(359))},function(e,t,n){"use strict";var r=n(3),a=n(26);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return a(r(this),"number"!=e)}},function(e,t,n){var r=n(2);r(r.S,"Array",{isArray:n(57)})},function(e,t,n){"use strict";var r=n(22),a=n(2),i=n(12),o=n(113),s=n(84),u=n(8),l=n(85),d=n(86);a(a.S+a.F*!n(60)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,a,c,f=i(e),_="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,p=void 0!==h,y=0,M=d(f);if(p&&(h=r(h,m>2?arguments[2]:void 0,2)),null==M||_==Array&&s(M))for(n=new _(t=u(f.length));t>y;y++)l(n,y,p?h(f[y],y):f[y]);else for(c=M.call(f),n=new _;!(a=c.next()).done;y++)l(n,y,p?o(c,h,[a.value,y],!0):a.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(2),a=n(85);r(r.S+r.F*n(5)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(2),a=n(18),i=[].join;r(r.P+r.F*(n(51)!=Object||!n(25)(i)),"Array",{join:function(e){return i.call(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(2),a=n(73),i=n(23),o=n(38),s=n(8),u=[].slice;r(r.P+r.F*n(5)((function(){a&&u.call(a)})),"Array",{slice:function(e,t){var n=s(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var a=o(e,n),l=o(t,n),d=s(l-a),c=new Array(d),f=0;f1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(2);r(r.P,"Array",{copyWithin:n(115)}),n(34)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(88)}),n(34)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(29)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("find")},function(e,t,n){"use strict";var r=n(2),a=n(29)(6),i="findIndex",o=!0;i in[]&&Array(1)[i]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)(i)},function(e,t,n){n(41)("Array")},function(e,t,n){var r=n(4),a=n(76),i=n(11).f,o=n(40).f,s=n(59),u=n(53),l=r.RegExp,d=l,c=l.prototype,f=/a/g,_=/a/g,m=new l(f)!==f;if(n(10)&&(!m||n(5)((function(){return _[n(7)("match")]=!1,l(f)!=f||l(_)==_||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:a(m?new d(r&&!i?e.source:e,t):d((r=e instanceof l)?e.source:e,r&&i?u.call(e):t),n?this:c,l)};for(var h=function(e){e in l||i(l,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},p=o(d),y=0;p.length>y;)h(p[y++]);c.constructor=l,l.prototype=c,n(15)(r,"RegExp",l)}n(41)("RegExp")},function(e,t,n){"use strict";n(118);var r=n(3),a=n(53),i=n(10),o=/./.toString,s=function(e){n(15)(RegExp.prototype,"toString",e,!0)};n(5)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?a.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(3),a=n(8),i=n(91),o=n(61);n(62)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return o(u,l);var d=u.unicode;u.lastIndex=0;for(var c,f=[],_=0;null!==(c=o(u,l));){var m=String(c[0]);f[_]=m,""===m&&(u.lastIndex=i(l,a(u.lastIndex),d)),_++}return 0===_?null:f}]}))},function(e,t,n){"use strict";var r=n(3),a=n(12),i=n(8),o=n(24),s=n(91),u=n(61),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,_=/\$([$&`']|\d\d?)/g;n(62)("replace",2,(function(e,t,n,m){return[function(r,a){var i=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,a):n.call(String(i),r,a)},function(e,t){var a=m(n,e,this,t);if(a.done)return a.value;var c=r(e),f=String(this),_="function"==typeof t;_||(t=String(t));var p=c.global;if(p){var y=c.unicode;c.lastIndex=0}for(var M=[];;){var v=u(c,f);if(null===v)break;if(M.push(v),!p)break;""===String(v[0])&&(c.lastIndex=s(f,i(c.lastIndex),y))}for(var g,L="",k=0,b=0;b=k&&(L+=f.slice(k,w)+j,k=w+Y.length)}return L+f.slice(k)}];function h(e,t,r,i,o,s){var u=r+e.length,l=i.length,d=_;return void 0!==o&&(o=a(o),d=f),n.call(s,d,(function(n,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=o[a.slice(1,-1)];break;default:var d=+a;if(0===d)return n;if(d>l){var f=c(d/10);return 0===f?n:f<=l?void 0===i[f-1]?a.charAt(1):i[f-1]+a.charAt(1):n}s=i[d-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(3),a=n(104),i=n(61);n(62)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;a(l,0)||(s.lastIndex=0);var d=i(s,u);return a(s.lastIndex,l)||(s.lastIndex=l),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var r=n(59),a=n(3),i=n(54),o=n(91),s=n(8),u=n(61),l=n(90),d=n(5),c=Math.min,f=[].push,_="length",m=!d((function(){RegExp(4294967295,"y")}));n(62)("split",2,(function(e,t,n,d){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[_]||2!="ab".split(/(?:ab)*/)[_]||4!=".".split(/(.?)(.?)/)[_]||".".split(/()()/)[_]>1||"".split(/.?/)[_]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var i,o,s,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,m=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,d+"g");(i=l.call(h,a))&&!((o=h.lastIndex)>c&&(u.push(a.slice(c,i.index)),i[_]>1&&i.index=m));)h.lastIndex===i.index&&h.lastIndex++;return c===a[_]?!s&&h.test("")||u.push(""):u.push(a.slice(c)),u[_]>m?u.slice(0,m):u}:"0".split(void 0,0)[_]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):h.call(String(a),n,r)},function(e,t){var r=d(h,e,this,t,h!==n);if(r.done)return r.value;var l=a(e),f=String(this),_=i(l,RegExp),p=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(m?"y":"g"),M=new _(m?l:"^(?:"+l.source+")",y),v=void 0===t?4294967295:t>>>0;if(0===v)return[];if(0===f.length)return null===u(M,f)?[f]:[];for(var g=0,L=0,k=[];Li;)o(n[i++]);e._c=[],e._n=!1,t&&!e._h&&P(e)}))}},P=function(e){y.call(u,(function(){var t,n,r,a=e._v,i=F(e);if(i&&(t=g((function(){S?Y.emit("unhandledRejection",a,e):(n=u.onunhandledrejection)?n({promise:e,reason:a}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",a)})),e._h=S||F(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},F=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){y.call(u,(function(){var t;S?Y.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},C=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw b("Promise can't be resolved itself");(t=H(e))?M((function(){var r={_w:n,_d:!1};try{t.call(e,l(C,r,1),l(N,r,1))}catch(e){N.call(r,e)}})):(n._v=e,n._s=1,O(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};E||(T=function(e){m(this,T,"Promise","_h"),_(e),r.call(this);try{e(l(C,this,1),l(N,this,1))}catch(e){N.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(44)(T.prototype,{then:function(e,t){var n=j(p(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?Y.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(C,e,1),this.reject=l(N,e,1)},v.f=j=function(e){return e===T||e===o?new i(e):a(e)}),c(c.G+c.W+c.F*!E,{Promise:T}),n(46)(T,"Promise"),n(41)("Promise"),o=n(21).Promise,c(c.S+c.F*!E,"Promise",{reject:function(e){var t=j(this);return(0,t.reject)(e),t.promise}}),c(c.S+c.F*(s||!E),"Promise",{resolve:function(e){return k(s&&this===o?T:this,e)}}),c(c.S+c.F*!(E&&n(60)((function(e){T.all(e).catch(x)}))),"Promise",{all:function(e){var t=this,n=j(t),r=n.resolve,a=n.reject,i=g((function(){var n=[],i=0,o=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),o++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--o||r(n))}),a)})),--o||r(n)}));return i.e&&a(i.v),n.promise},race:function(e){var t=this,n=j(t),r=n.reject,a=g((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return a.e&&r(a.v),n.promise}})},function(e,t,n){"use strict";var r=n(125),a=n(45);n(64)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(a(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(2),a=n(65),i=n(95),o=n(3),s=n(38),u=n(8),l=n(6),d=n(4).ArrayBuffer,c=n(54),f=i.ArrayBuffer,_=i.DataView,m=a.ABV&&d.isView,h=f.prototype.slice,p=a.VIEW;r(r.G+r.W+r.F*(d!==f),{ArrayBuffer:f}),r(r.S+r.F*!a.CONSTR,"ArrayBuffer",{isView:function(e){return m&&m(e)||l(e)&&p in e}}),r(r.P+r.U+r.F*n(5)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),a=s(void 0===t?n:t,n),i=new(c(this,f))(u(a-r)),l=new _(this),d=new _(i),m=0;r=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(19),a=n(20),i=n(17),o=n(2),s=n(6),u=n(3);o(o.S,"Reflect",{get:function e(t,n){var o,l,d=arguments.length<3?t:arguments[2];return u(t)===d?t[n]:(o=r.f(t,n))?i(o,"value")?o.value:void 0!==o.get?o.get.call(d):void 0:s(l=a(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(19),a=n(2),i=n(3);a(a.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(2),a=n(20),i=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(2),a=n(3),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return a(e),!i||i(e)}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{ownKeys:n(127)})},function(e,t,n){var r=n(2),a=n(3),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){a(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(11),a=n(19),i=n(20),o=n(17),s=n(2),u=n(35),l=n(3),d=n(6);s(s.S,"Reflect",{set:function e(t,n,s){var c,f,_=arguments.length<4?t:arguments[3],m=a.f(l(t),n);if(!m){if(d(f=i(t)))return e(f,n,s,_);m=u(0)}if(o(m,"value")){if(!1===m.writable||!d(_))return!1;if(c=a.f(_,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=s,r.f(_,n,c)}else r.f(_,n,u(0,s));return!0}return void 0!==m.set&&(m.set.call(_,s),!0)}})},function(e,t,n){var r=n(2),a=n(74);a&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){a.check(e,t);try{return a.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(2),a=n(55)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(13),u=n(87);r(r.P,"Array",{flatMap:function(e){var t,n,r=i(this);return s(e),t=o(r.length),n=u(r,0),a(n,r,r,t,0,1,e,arguments[1]),n}}),n(34)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(24),u=n(87);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=i(this),n=o(t.length),r=u(t,0);return a(r,t,t,n,0,void 0===e?1:s(e)),r}}),n(34)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(58)(!0),i=n(5)((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*i,"String",{at:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(48)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(48)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(27),i=n(8),o=n(59),s=n(53),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(81)(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(a(this),!o(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new l(r,t)}})},function(e,t,n){n(70)("asyncIterator")},function(e,t,n){n(70)("observable")},function(e,t,n){var r=n(2),a=n(127),i=n(18),o=n(19),s=n(85);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),u=o.f,l=a(r),d={},c=0;l.length>c;)void 0!==(n=u(r,t=l[c++]))&&s(d,t,n);return d}})},function(e,t,n){var r=n(2),a=n(130)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(130)(!0);r(r.S,"Object",{entries:function(e){return a(e)}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineGetter__:function(e,t){o.f(a(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineSetter__:function(e,t){o.f(a(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupGetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.get}while(n=o(n))}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupSetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.set}while(n=o(n))}})},function(e,t,n){var r=n(2);r(r.P+r.R,"Map",{toJSON:n(131)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(131)("Set")})},function(e,t,n){n(67)("Map")},function(e,t,n){n(67)("Set")},function(e,t,n){n(67)("WeakMap")},function(e,t,n){n(67)("WeakSet")},function(e,t,n){n(68)("Map")},function(e,t,n){n(68)("Set")},function(e,t,n){n(68)("WeakMap")},function(e,t,n){n(68)("WeakSet")},function(e,t,n){var r=n(2);r(r.G,{global:n(4)})},function(e,t,n){var r=n(2);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(2),a=n(23);r(r.S,"Error",{isError:function(e){return"Error"===a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(2),a=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*a}})},function(e,t,n){var r=n(2),a=n(133),i=n(112);r(r.S,"Math",{fscale:function(e,t,n,r,o){return i(a(e,t,n,r,o))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{iaddh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((a&i|(a|i)&~(a+i>>>0))>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{isubh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~a&i|~(a^i)&a-i>>>0)>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>16,s=r>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>16)+((a*s>>>0)+(65535&u)>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(2),a=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*a}})},function(e,t,n){var r=n(2);r(r.S,"Math",{scale:n(133)})},function(e,t,n){var r=n(2);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>>16,s=r>>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>>16)+((a*s>>>0)+(65535&u)>>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(2),a=n(21),i=n(4),o=n(54),s=n(120);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,a.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(2),a=n(94),i=n(119);r(r.S,"Promise",{try:function(e){var t=a.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.set;r.exp({defineMetadata:function(e,t,n,r){o(e,t,a(n),i(r))}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=o(a(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.get,u=r.key,l=function(e,t,n){if(o(e,t,n))return s(e,t,n);var r=i(t);return null!==r?l(e,r,n):void 0};r.exp({getMetadata:function(e,t){return l(e,a(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(123),a=n(132),i=n(31),o=n(3),s=n(20),u=i.keys,l=i.key,d=function(e,t){var n=u(e,t),i=s(e);if(null===i)return n;var o=d(i,t);return o.length?n.length?a(new r(n.concat(o))):o:n};i.exp({getMetadataKeys:function(e){return d(o(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.get,o=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return i(a(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.key,u=function(e,t,n){if(o(e,t,n))return!0;var r=i(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,a(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(13),o=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?a:i)(n),o(r))}}})},function(e,t,n){var r=n(2),a=n(93)(),i=n(4).process,o="process"==n(23)(i);r(r.G,{asap:function(e){var t=o&&i.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(2),a=n(4),i=n(21),o=n(93)(),s=n(7)("observable"),u=n(13),l=n(3),d=n(42),c=n(44),f=n(14),_=n(43),m=_.RETURN,h=function(e){return null==e?void 0:u(e)},p=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},M=function(e){y(e)||(e._o=void 0,p(e))},v=function(e,t){l(e),this._c=void 0,this._o=e,e=new g(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}y(this)&&p(this)};v.prototype=c({},{unsubscribe:function(){M(this)}});var g=function(e){this._s=e};g.prototype=c({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=h(n.next);if(r)return r.call(n,e)}catch(e){try{M(t)}finally{throw e}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=h(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{p(t)}finally{throw e}}return p(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=h(n.complete);e=r?r.call(n,e):void 0}catch(e){try{p(t)}finally{throw e}}return p(t),e}}});var L=function(e){d(this,L,"Observable","_f")._f=u(e)};c(L.prototype,{subscribe:function(e){return new v(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||a.Promise)((function(n,r){u(e);var a=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:n})}))}}),c(L,{from:function(e){var t="function"==typeof this?this:L,n=h(l(e)[s]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return o((function(){if(!n){try{if(_(e,!1,(function(e){if(t.next(e),n)return m}))===m)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e2,a=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,a)}:t,n)}};a(a.G+a.B+a.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){var r=n(2),a=n(92);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(89),a=n(37),i=n(15),o=n(4),s=n(14),u=n(49),l=n(7),d=l("iterator"),c=l("toStringTag"),f=u.Array,_={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(_),h=0;h=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),Y(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;Y(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}}}function h(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new w(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return T()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function M(){}function v(){}function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function L(e){function n(t,a,i,o){var s=p(e[t],e,a);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),o)}o(s.arg)}var a;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(r,a){n(e,t,r,a)}))}return a=a?a.then(r,r):r()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function b(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(b,this),this.reset(!0)}function D(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n button {\n margin: 15px;\n}\n\n.file-upload-container {\n border: dotted;\n margin: 18px;\n padding: 15px;\n min-height: 150px;\n text-align: center;\n cursor: pointer;\n}\n\n.file-upload-container > div > div {\n display: grid;\n grid-template-columns: auto auto auto auto;\n}\n\n.uploaded-file {\n max-width: 120px;\n position: relative;\n margin-bottom: 15px;\n}\n\n.uploaded-file > img {\n width: 50px;\n height: 56px;\n border: 1px solid black;\n}\n\n.uploaded-file > span {\n display: block;\n word-wrap: break-word;\n}\n\n.uploaded-file > i:nth-child(3) {\n color: red;\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\n}\n\n.clickable { cursor: pointer; }\n.token-revoked td { text-decoration: line-through; }\n\n.token-table td:not(:first-child), .token-table th:not(:first-child) {\n text-align: center;\n}\n\n.token-table td:nth-child(4) > i {\n padding-left: 10px;\n}\n\n.file-table td:nth-child(n+3), .file-table th:nth-child(n+3) {\n text-align: center;\n}\n\n.file-table tr, .file-table td {\n height: 40px;\n}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(u," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([a]).join("\n")}var o,s,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i=0&&c.splice(t,1)}function y(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),h(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,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=d++;n=l||(l=y(t)),r=k.bind(null,n,o,!1),a=k.bind(null,n,o,!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),h(e,t),t}(t),r=Y.bind(null,n,t),a=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=b.bind(null,n),a=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 a()}}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=m(e,t);return _(n,t),function(e){for(var r=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/delete",{id:e,token:t})}},{key:"revokeToken",value:function(e){return this.apiCall("file/revokeToken",{token:e})}},{key:"createDownloadToken",value:function(e,t){return this.apiCall("file/createDownloadToken",{files:t,durability:e})}},{key:"createUploadToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return this.apiCall("file/createUploadToken",{parentId:t,durability:e,maxFiles:n,maxSize:r,extensions:a})}},{key:"createDirectory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/createDirectory",{name:e,parentId:t})}},{key:"upload",value:(a=u(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,a=this.csrfToken(),i=new FormData,o=0;o0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}Object.create;var g=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function L(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=g.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var k=[".DS_Store","Thumbs.db"];function b(e){return(null!==e.target&&e.target.files?D(e.target.files):[]).map((function(e){return L(e)}))}function Y(e,t){return y(this,void 0,void 0,(function(){var n;return M(this,(function(r){switch(r.label){case 0:return e.items?(n=D(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(T))]):[3,2];case 1:return[2,w(S(r.sent()))];case 2:return[2,w(D(e.files).map((function(e){return L(e)})))]}}))}))}function w(e){return e.filter((function(e){return-1===k.indexOf(e.name)}))}function D(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,C(n)];if(e.sizen)return[!1,C(n)]}return[!0,null]}function U(e){return null!=e}function J(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=F(R(e,n),1)[0],i=F(I(e,r,a),1)[0];return t&&i}))}function V(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function B(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function G(e){e.preventDefault()}function $(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function K(e){return-1!==e.indexOf("Edge/")}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return $(e)||K(e)}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=re(re({},se),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,u=t.multiple,l=t.maxFiles,d=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,p=t.onFileDialogCancel,y=t.preventDropOnDocument,M=t.noClick,v=t.noKeyboard,g=t.noDrag,L=t.noDragEventsBubbling,k=Object(r.useRef)(null),b=Object(r.useRef)(null),Y=Object(r.useReducer)(de,le),w=X(Y,2),D=w[0],T=w[1],S=D.isFocused,x=D.isFileDialogActive,j=D.draggedFiles,E=Object(r.useCallback)((function(){b.current&&(T({type:"openDialog"}),b.current.value=null,b.current.click())}),[T]),H=function(){x&&setTimeout((function(){b.current&&(b.current.files.length||(T({type:"closeDialog"}),"function"==typeof p&&p()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",H,!1),function(){window.removeEventListener("focus",H,!1)}}),[b,x,p]);var O=Object(r.useCallback)((function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),E()))}),[k,b]),P=Object(r.useCallback)((function(){T({type:"focus"})}),[]),F=Object(r.useCallback)((function(){T({type:"blur"})}),[]),A=Object(r.useCallback)((function(){M||(q()?setTimeout(E,0):E())}),[b,M]),N=Object(r.useRef)([]),C=function(e){k.current&&k.current.contains(e.target)||(e.preventDefault(),N.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",G,!1),document.addEventListener("drop",C,!1)),function(){y&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",C))}}),[k,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[].concat(Z(N.current),[e.target]),B(e)&&Promise.resolve(i(e)).then((function(t){V(e)&&!L||(T({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),U=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),oe(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return B(e)&&f&&f(e),!1}),[f,L]),$=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e);var t=N.current.filter((function(e){return k.current&&k.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),N.current=t,t.length>0||(T({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),B(e)&&c&&c(e))}),[k,c,L]),K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[],B(e)&&Promise.resolve(i(e)).then((function(t){if(!V(e)||L){var r=[],a=[];t.forEach((function(e){var t=X(R(e,n),2),i=t[0],u=t[1],l=X(I(e,s,o),2),d=l[0],c=l[1];if(i&&d)r.push(e);else{var f=[u,c].filter((function(e){return e}));a.push({file:e,errors:f})}})),(!u&&r.length>1||u&&l>=1&&r.length>l)&&(r.forEach((function(e){a.push({file:e,errors:[z]})})),r.splice(0)),T({acceptedFiles:r,fileRejections:a,type:"setFiles"}),_&&_(r,a,e),a.length>0&&h&&h(a,e),r.length>0&&m&&m(r,e)}})),T({type:"reset"})}),[u,n,s,o,l,i,_,m,h,L]),ee=function(e){return a?null:e},te=function(e){return v?null:ee(e)},ne=function(e){return g?null:ee(e)},oe=function(e){L&&e.stopPropagation()},ue=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,o=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,c=e.onDrop,f=ie(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return re(re(ae({onKeyDown:te(Q(r,O)),onFocus:te(Q(i,P)),onBlur:te(Q(o,F)),onClick:ee(Q(s,A)),onDragEnter:ne(Q(u,W)),onDragOver:ne(Q(l,U)),onDragLeave:ne(Q(d,$)),onDrop:ne(Q(c,K))},n,k),a||v?{}:{tabIndex:0}),f)}}),[k,O,P,F,A,W,U,$,K,v,g,a]),ce=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),fe=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,a=e.onChange,i=e.onClick,o=ie(e,["refKey","onChange","onClick"]),s=ae({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:ee(Q(a,K)),onClick:ee(Q(i,ce)),autoComplete:"off",tabIndex:-1},r,b);return re(re({},s),o)}}),[b,n,u,K,a]),_e=j.length,me=_e>0&&J({files:j,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=_e>0&&!me;return re(re({},D),{},{isDragAccept:me,isDragReject:he,isFocused:S&&!a,getRootProps:ue,getInputProps:fe,rootRef:k,inputRef:b,open:ee(E)})}(ie(e,["children"])),o=i.open,s=ie(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(re(re({},s),{},{open:o})))}));oe.displayName="Dropzone";var se={disabled:!1,getFilesFromEvent:function(e){return y(this,void 0,void 0,(function(){return M(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?Y(e.dataTransfer,e.type):b(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};oe.defaultProps=se,oe.propTypes={children:p.a.func,accept:p.a.oneOfType([p.a.string,p.a.arrayOf(p.a.string)]),multiple:p.a.bool,preventDropOnDocument:p.a.bool,noClick:p.a.bool,noKeyboard:p.a.bool,noDrag:p.a.bool,noDragEventsBubbling:p.a.bool,minSize:p.a.number,maxSize:p.a.number,maxFiles:p.a.number,disabled:p.a.bool,getFilesFromEvent:p.a.func,onFileDialogCancel:p.a.func,onDragEnter:p.a.func,onDragLeave:p.a.func,onDragOver:p.a.func,onDrop:p.a.func,onDropAccepted:p.a.func,onDropRejected:p.a.func};var ue=oe,le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function de(e,t){switch(t.type){case"focus":return re(re({},e),{},{isFocused:!0});case"blur":return re(re({},e),{},{isFocused:!1});case"openDialog":return re(re({},e),{},{isFileDialogActive:!0});case"closeDialog":return re(re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return re(re({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return re(re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return re(re({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function ce(e){var t=e.onClose||null,n=e.title||"Untitled Alert",r=e.message||"Alert message",i=e.type||"danger",o="ban";return"warning"===i?o="exclamation-triangle":"success"===i&&(o="check"),a.a.createElement("div",{className:"alert alert-"+i+" alert-dismissible"},t?a.a.createElement("button",{type:"button",className:"close","data-dismiss":"alert","aria-hidden":"true",onClick:t},"×"):null,a.a.createElement("h5",null,a.a.createElement(m,{icon:o,className:"icon"})," ",n),r)}function fe(e){for(var t=e.buttons||["Ok","Cancel"],n=e.onClick||function(){},r=!!e.visible,i=e.title||"Popup Title",o=e.onClose||function(){},s=[],u=["primary","secondary","success","warning","danger"],l=function(e){var r=t[e],i=u[e%u.length];s.push(a.a.createElement("button",{key:"btn-"+e,type:"button",className:"btn btn-"+i,"data-dismiss":"modal",onClick:function(){return n(r)}},r))},d=0;de.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t,i=e>1?{marginLeft:(e-1)*n+"px"}:{};return r.createElement("svg",{width:n,height:a,xmlns:"http://www.w3.org/2000/svg",style:i},r.createElement("g",null,r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:"0",x2:n/2,y1:a,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:a/2,x2:n,y1:a/2,x1:n/2,fillOpacity:"null",strokeOpacity:"null",strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=48*t,a=64*t,i=e>1?{marginLeft:(e-1)*n+"px"}:{};return r.createElement("svg",{width:n,height:a,xmlns:"http://www.w3.org/2000/svg",style:i},r.createElement("g",null,r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:"0",x2:n/2,y1:a/2,x1:n/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{strokeLinecap:"undefined",strokeLinejoin:"undefined",y2:a/2,x2:n,y1:a/2,x1:n/2,fillOpacity:"null",strokeOpacity:"null",strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="";if(null!==e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=Me(s,2),l=u[0],d=u[1];"text"===l&&i.find((function(e){return d.includes(e)}))?n="code":"application"===l&&o.find((function(e){return d.includes(e)}))?n="archive":"application"===l&&"pdf"===d?n="pdf":"application"===l&&(d.indexOf("powerpoint")>-1||d.indexOf("presentation")>-1)?n="powerpoint":"application"===l&&(d.indexOf("word")>-1||d.indexOf("opendocument")>-1)?n="word":"application"===l&&(d.indexOf("excel")>-1||d.indexOf("sheet")>-1)?n="excel":"application"===l&&d.indexOf("directory")>-1?n="folder":a.indexOf(l)>-1&&(n="text"===l?"alt":l)}return"folder"!==n&&(n="file"+(n?"-"+n:n)),r.createElement(m,{icon:n,type:"far",className:"p-1 align-middle fa-"+t+"x"})}function g(e){for(var t=["B","KiB","MiB","GiB","TiB"],n=0;n=1024;n++)e/=1024;return 0===n||Math.round(e)===e?e+" "+t[n]:e.toFixed(1)+" "+t[n]}for(var L=function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],s=0,u=Object.values(t),l=function(){var t=c[d],l=t.name,f=t.uid,_=t.isDirectory?"Directory":t.mimeType,m=t.isDirectory?"":g(t.size),h=t.isDirectory?"application/x-directory":t.mimeType,p=a&&a.valid?"&token="+a.value:"",L=r.createElement(r.Fragment,null);n>0&&(L=s===u.length-1?M(n,.75):y(n,.75)),o.push(r.createElement("tr",{key:"file-"+f,"data-id":f,className:"file-row"},r.createElement("td",null,L,v(h)),r.createElement("td",null,t.isDirectory?l:r.createElement("a",{href:"/api/file/download?id="+f+p,download:!0},l)),r.createElement("td",null,_),r.createElement("td",null,m),r.createElement("td",null,r.createElement("input",{type:"checkbox",checked:!!t.selected,onChange:function(e){return i(e,f)}})))),t.isDirectory&&o.push.apply(o,ye(e(t.items,n+1))),s++},d=0,c=u;d0&&void 0!==arguments[0]?arguments[0]:null,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=[];n=n||t;for(var i=0,o=Object.values(n);i=0&&e0?L:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No files uploaded yet")))),r.createElement("div",{className:"file-control-buttons"},r.createElement("button",{type:"button",className:"btn btn-success",disabled:0===b,onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?"":"&token="+a.value,r=e.map((function(e){return"id[]="+e})).join("&");fetch("/api/file/download?"+r+t).then((function(e){var t=(e.headers.get("Content-Disposition")||"").split(";").filter((function(e){return e.trim().toLowerCase().startsWith("filename=")})),n=null;n=t.length>0?t[0].trim().substr("filename=".length):null,e.blob().then((function(e){var t=window.URL.createObjectURL(e),r=document.createElement("a");r.href=t,null!==n&&(r.download=n),r.click()}))}))}}(k)}},r.createElement(m,{icon:"download",className:"mr-1"}),"Download Selected Files (",b,")"),n.loggedIn?r.createElement("button",{type:"button",className:"btn btn-info",onClick:function(){l(he(he({},u),{},{visible:!0}))}},r.createElement(m,{icon:"plus",className:"mr-1"}),"Create Directory"):r.createElement(r.Fragment,null),w?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"btn btn-primary",disabled:0===D.length,onClick:function(){var e=n.loggedIn?null:a.value;n.upload(h,e).then((function(e){e.success?(p([]),O()):P(e)}))}},r.createElement(m,{icon:"upload",className:"mr-1"}),"Upload"),r.createElement("button",{type:"button",className:"btn btn-danger",disabled:0===b,onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?null:a.value;n.delete(e,t).then((function(e){e.success?O():P(e)}))}}(k)}},r.createElement(m,{icon:"trash",className:"mr-1"}),"Delete Selected Files (",b,")")):r.createElement(r.Fragment,null)),Y,r.createElement("div",null,T),r.createElement(fe,{title:"Create Directory",visible:u.visible,buttons:["Ok","Cancel"],onClose:H,onClick:function(e){"Ok"===e&&n.createDirectory(u.directoryName,null).then((function(e){e.success?O():P(e,"Error creating directory")}));H()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Directory Name"),r.createElement("input",{type:"text",className:"form-control",value:u.directoryName,maxLength:32,placeholder:"Enter name…",onChange:function(e){return function(e,t){l(he(he({},u),{},pe({},t,e.target.value)))}(e,"directoryName")}}))));function H(){l(he(he({},u),{},{visible:!1}))}function O(){a.valid?n.validateToken(a.value).then((function(e){e?o(e.files):P(e)})):n.loggedIn&&n.listFiles().then((function(e){e?o(e.files):P(e)}))}function P(e,t){var n=c.slice();n.push({type:"danger",message:e.msg,title:t}),f(n)}}var ke=n(1),be=n.n(ke);function Ye(){return(Ye=Object.assign||function(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||je(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){if(e){if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(e,t):void 0}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e0?M:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No active tokens connected with this account")))),r.createElement("div",null,r.createElement("button",{type:"button",className:"btn btn-success m-2",onClick:function(){p(De(De({},h),{},{visible:!0}))}},r.createElement(m,{icon:"plus",className:"mr-1"}),"Create Token")),r.createElement("div",null,k),r.createElement(fe,{title:"Create Token",visible:h.visible,buttons:["Ok","Cancel"],onClose:D,onClick:function(e){if("Ok"===e){var r=h.durability,a=0===r?null:be()().add(r,"hours").format("YYYY-MM-DD HH:mm:ss");"download"===h.tokenType?t.createDownloadToken(r,n).then((function(e){if(e.success){var t=i.slice();t.push({token:e.token,valid_until:a,type:"download"}),o(t)}else w(e,"Error creating token")})):"upload"===h.tokenType&&t.createUploadToken(r,null,h.maxFiles,h.maxSize,h.extensions).then((function(e){if(e.success){var t=i.slice();t.push({uid:e.tokenId,token:e.token,valid_until:a,type:"upload"}),o(t)}else w(e,"Error creating token")}))}D()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Durability in minutes (0 = forever):"),r.createElement("input",{type:"number",min:0,className:"form-control",value:h.durability,onChange:function(e){return T(e,"durability")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Type:"),r.createElement("select",{value:h.tokenType,className:"form-control",onChange:function(e){return T(e,"tokenType")}},r.createElement("option",{value:"upload"},"Upload"),r.createElement("option",{value:"download"},"Download"))),"upload"===h.tokenType?r.createElement(r.Fragment,null,r.createElement("b",null,"Upload Restrictions:"),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Files (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:25,className:"form-control",value:h.maxFiles,onChange:function(e){return T(e,"maxFiles")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Size per file in MB (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:10,className:"form-control",value:h.maxSize,onChange:function(e){return T(e,"maxSize")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Allowed Extensions:"),r.createElement("input",{type:"text",placeholder:"(no restrictions)",maxLength:256,className:"form-control",value:h.extensions,onChange:function(e){return T(e,"extensions")}}))):r.createElement(r.Fragment,null)));function w(e,t){var n=u.slice();n.push({type:"danger",message:e.msg,title:t}),l(n)}function D(){p(De(De({},h),{},{visible:!1}))}function T(e,t){p(De(De({},h),{},Te({},t,e.target.value)))}}function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];e=e||this.state.files;for(var r=0,a=Object.values(e);r2&&void 0!==arguments[2]?arguments[2]:null,r=!1,a=null===n?Ne({},this.state.files):n;if(a.hasOwnProperty(t)){var i=a[t];r=!0,i.selected=e.target.checked,i.isDirectory&&this.onSelectAll(i.selected,i.items)}else for(var o=0,s=Object.values(a);o0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(this.setState(Ne(Ne({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=Ne(Ne({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=Ne(Ne({},e.state.token),{},{valid:!0,validUntil:n.token.valid_until,type:n.token.type}),r.token.value||(r.token.value=t),r.files=n.files):r.errorMessage=n.msg,e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(Ne(Ne({},this.state),{},{token:Ne(Ne({},this.state.token),{},{value:e.target.value})}))}},{key:"render",value:function(){var e=this,t=this,n=!!this.state.errorMessage;if(this.state.loaded){if(this.api.loggedIn||this.state.token.valid){var r=this.getSelectedIds(),i=this.api.loggedIn?a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement(He,{api:this.api,selectedFiles:r}))):a.a.createElement(a.a.Fragment,null);return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement(Le,{files:this.state.files,token:this.state.token,api:this.api,onSelectFile:this.onSelectFile.bind(this),onFetchFiles:this.onFetchFiles.bind(this)}))),i))}return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement("form",{onSubmit:function(e){return e.preventDefault()}},a.a.createElement("label",{htmlFor:"token"},"Enter a file token to download or upload files"),a.a.createElement("input",{type:"text",className:"form-control",name:"token",placeholder:"Enter token…",maxLength:36,value:this.state.token.value,onChange:function(e){return t.onUpdateToken(e)}}),a.a.createElement("button",{className:"btn btn-success mt-2",onClick:function(){return e.onValidateToken()},disabled:this.state.validatingToken},this.state.validatingToken?a.a.createElement(a.a.Fragment,null,"Validating… ",a.a.createElement(m,{icon:"spinner"})):"Submit")),a.a.createElement("div",{className:"alert alert-danger mt-2",hidden:!n},this.state.errorMessage))))}var o=!0,s=window.location.pathname;if(s.length>1){var u=s.endsWith("/")?s.length-2:s.length-1,l=s.startsWith("/files/")?"/files/".length:1,d=s.substr(l,u);d&&(this.onValidateToken(d),o=!1)}return o&&this.api.fetchUser().then((function(t){t?e.api.listFiles().then((function(t){e.setState(Ne(Ne({},e.state),{},{loaded:!0,user:e.api.user,files:t.files}))})):e.setState(Ne(Ne({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(m,{icon:"spinner"}))}}])&&We(t.prototype,n),r&&We(t,r),o}(a.a.Component);o.a.render(a.a.createElement(Je,null),document.getElementById("root"))}]); \ No newline at end of file + */var r,a,i,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,l=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(d,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},a=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,_=window.Date,m=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var y=_.now();t.unstable_now=function(){return _.now()-y}}var M=!1,v=null,g=-1,L=5,k=0;o=function(){return t.unstable_now()>=k},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,a=e[r];if(!(void 0!==a&&0S(o,n))void 0!==u&&0>S(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var x=[],j=[],E=1,H=null,O=3,P=!1,F=!1,A=!1;function N(e){for(var t=D(j);null!==t;){if(null===t.callback)T(j);else{if(!(t.startTime<=e))break;T(j),t.sortIndex=t.expirationTime,w(x,t)}t=D(j)}}function C(e){if(A=!1,N(e),!F)if(null!==D(x))F=!0,r(W);else{var t=D(j);null!==t&&a(C,t.startTime-e)}}function W(e,n){F=!1,A&&(A=!1,i()),P=!0;var r=O;try{for(N(n),H=D(x);null!==H&&(!(H.expirationTime>n)||e&&!o());){var s=H.callback;if(null!==s){H.callback=null,O=H.priorityLevel;var u=s(H.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?H.callback=u:H===D(x)&&T(x),N(n)}else T(x);H=D(x)}if(null!==H)var l=!0;else{var d=D(j);null!==d&&a(C,d.startTime-n),l=!1}return l}finally{H=null,O=r,P=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var R=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){F||P||(F=!0,r(W))},t.unstable_getCurrentPriorityLevel=function(){return O},t.unstable_getFirstCallbackNode=function(){return D(x)},t.unstable_next=function(e){switch(O){case 1:case 2:case 3:var t=3;break;default:t=O}var n=O;O=t;try{return e()}finally{O=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=R,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=O;O=e;try{return t()}finally{O=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0s?(e.sortIndex=u,w(j,e),null===D(x)&&e===D(j)&&(A?i():A=!0,a(C,u-s))):(e.sortIndex=o,w(x,e),F||P||(F=!0,r(W))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();N(e);var n=D(x);return n!==H&&null!==H&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimea;)K(e,n=r[a++],t[n]);return e},Q=function(e){var t=C.call(this,e=k(e,!0));return!(this===I&&a(z,e)&&!a(R,e))&&(!(t||!a(this,e)||!a(z,e)||a(this,A)&&this[A][e])||t)},Z=function(e,t){if(e=L(e),t=k(t,!0),e!==I||!a(z,t)||a(R,t)){var n=j(e,t);return!n||!a(z,t)||a(e,A)&&e[A][t]||(n.enumerable=!0),n}},X=function(e){for(var t,n=H(L(e)),r=[],i=0;n.length>i;)a(z,t=n[i++])||t==A||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===I,r=H(n?R:L(e)),i=[],o=0;r.length>o;)!a(z,t=r[o++])||n&&!a(I,t)||i.push(z[t]);return i};U||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(R,n),a(this,A)&&a(this[A],e)&&(this[A][e]=!1),B(this,e,b(1,n))};return i&&V&&B(I,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),D.f=Z,S.f=K,n(40).f=w.f=X,n(52).f=Q,T.f=ee,i&&!n(32)&&s(I,"propertyIsEnumerable",Q,!0),m.f=function(e){return G(_(e))}),o(o.G+o.W+o.F*!U,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)_(te[ne++]);for(var re=x(_.store),ae=0;re.length>ae;)h(re[ae++]);o(o.S+o.F*!U,"Symbol",{for:function(e){return a(W,e+="")?W[e]:W[e]=O(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in W)if(W[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!U,"Object",{create:function(e,t){return void 0===t?Y(e):q(Y(e),t)},defineProperty:K,defineProperties:q,getOwnPropertyDescriptor:Z,getOwnPropertyNames:X,getOwnPropertySymbols:ee});var ie=l((function(){T.f(1)}));o(o.S+o.F*ie,"Object",{getOwnPropertySymbols:function(e){return T.f(g(e))}}),P&&o(o.S+o.F*(!U||l((function(){var e=O();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],a=1;arguments.length>a;)r.push(arguments[a++]);if(n=t=r[1],(v(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,F.apply(P,r)}}),O.prototype[N]||n(14)(O.prototype,N,O.prototype.valueOf),c(O,"Symbol"),c(Math,"Math",!0),c(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(50)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(37),a=n(56),i=n(52);e.exports=function(e){var t=r(e),n=a.f;if(n)for(var o,s=n(e),u=i.f,l=0;s.length>l;)u.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,n){var r=n(2);r(r.S,"Object",{create:n(39)})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperty:n(11).f})},function(e,t,n){var r=n(2);r(r.S+r.F*!n(10),"Object",{defineProperties:n(101)})},function(e,t,n){var r=n(18),a=n(19).f;n(28)("getOwnPropertyDescriptor",(function(){return function(e,t){return a(r(e),t)}}))},function(e,t,n){var r=n(12),a=n(20);n(28)("getPrototypeOf",(function(){return function(e){return a(r(e))}}))},function(e,t,n){var r=n(12),a=n(37);n(28)("keys",(function(){return function(e){return a(r(e))}}))},function(e,t,n){n(28)("getOwnPropertyNames",(function(){return n(102).f}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("freeze",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("seal",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6),a=n(33).onFreeze;n(28)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(a(t)):t}}))},function(e,t,n){var r=n(6);n(28)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(6);n(28)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(2);r(r.S+r.F,"Object",{assign:n(103)})},function(e,t,n){var r=n(2);r(r.S,"Object",{is:n(104)})},function(e,t,n){var r=n(2);r(r.S,"Object",{setPrototypeOf:n(74).set})},function(e,t,n){"use strict";var r=n(47),a={};a[n(7)("toStringTag")]="z",a+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(2);r(r.P,"Function",{bind:n(105)})},function(e,t,n){var r=n(11).f,a=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in a||n(10)&&r(a,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(6),a=n(20),i=n(7)("hasInstance"),o=Function.prototype;i in o||n(11).f(o,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=a(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(2),a=n(107);r(r.G+r.F*(parseInt!=a),{parseInt:a})},function(e,t,n){var r=n(2),a=n(108);r(r.G+r.F*(parseFloat!=a),{parseFloat:a})},function(e,t,n){"use strict";var r=n(4),a=n(17),i=n(23),o=n(76),s=n(26),u=n(5),l=n(40).f,d=n(19).f,c=n(11).f,f=n(48).trim,_=r.Number,m=_,h=_.prototype,p="Number"==i(n(39)(h)),y="trim"in String.prototype,M=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,a,i=(t=y?t.trim():f(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,a=49;break;case 79:case 111:r=8,a=55;break;default:return+t}for(var o,u=t.slice(2),l=0,d=u.length;la)return NaN;return parseInt(u,r)}}return+t};if(!_(" 0o1")||!_("0b1")||_("+0x1")){_=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof _&&(p?u((function(){h.valueOf.call(n)})):"Number"!=i(n))?o(new m(M(t)),n,_):M(t)};for(var v,g=n(10)?l(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),L=0;g.length>L;L++)a(m,v=g[L])&&!a(_,v)&&c(_,v,d(m,v));_.prototype=h,h.constructor=_,n(15)(r,"Number",_)}},function(e,t,n){"use strict";var r=n(2),a=n(24),i=n(109),o=n(77),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],d="Number.toFixed: incorrect invocation!",c=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},_=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2==1?m(e,t-1,n*e):m(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(5)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,u=i(this,d),l=a(e),h="",p="0";if(l<0||l>20)throw RangeError(d);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*m(2,69,1))-69)<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,(t=52-t)>0){for(c(0,n),r=l;r>=7;)c(1e7,0),r-=7;for(c(m(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<0?h+((s=p.length)<=l?"0."+o.call("0",l-s)+p:p.slice(0,s-l)+"."+p.slice(s-l)):h+p}})},function(e,t,n){"use strict";var r=n(2),a=n(5),i=n(109),o=1..toPrecision;r(r.P+r.F*(a((function(){return"1"!==o.call(1,void 0)}))||!a((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(2),a=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Number",{isInteger:n(110)})},function(e,t,n){var r=n(2);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(2),a=n(110),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return a(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(2);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(2);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(2),a=n(108);r(r.S+r.F*(Number.parseFloat!=a),"Number",{parseFloat:a})},function(e,t,n){var r=n(2),a=n(107);r(r.S+r.F*(Number.parseInt!=a),"Number",{parseInt:a})},function(e,t,n){var r=n(2),a=n(111),i=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:a(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var r=n(2),a=Math.asinh;r(r.S+r.F*!(a&&1/a(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(2),a=Math.atanh;r(r.S+r.F*!(a&&1/a(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(2),a=n(78);r(r.S,"Math",{cbrt:function(e){return a(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(2),a=Math.exp;r(r.S,"Math",{cosh:function(e){return(a(e=+e)+a(-e))/2}})},function(e,t,n){var r=n(2),a=n(79);r(r.S+r.F*(a!=Math.expm1),"Math",{expm1:a})},function(e,t,n){var r=n(2);r(r.S,"Math",{fround:n(112)})},function(e,t,n){var r=n(2),a=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,o=0,s=arguments.length,u=0;o0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(e,t,n){var r=n(2),a=Math.imul;r(r.S+r.F*n(5)((function(){return-5!=a(4294967295,5)||2!=a.length})),"Math",{imul:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r;return 0|a*i+((65535&n>>>16)*i+a*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(2);r(r.S,"Math",{log1p:n(111)})},function(e,t,n){var r=n(2);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(2);r(r.S,"Math",{sign:n(78)})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S+r.F*n(5)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(2),a=n(79),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=a(e=+e),n=a(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(2),a=n(38),i=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],a(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(2),a=n(18),i=n(8);r(r.S,"String",{raw:function(e){for(var t=a(e.raw),n=i(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(2),a=n(58)(!1);r(r.P,"String",{codePointAt:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".endsWith;r(r.P+r.F*n(83)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=a(t.length),s=void 0===n?r:Math.min(a(n),r),u=String(e);return o?o.call(t,u,s):t.slice(s-u.length,s)===u}})},function(e,t,n){"use strict";var r=n(2),a=n(82);r(r.P+r.F*n(83)("includes"),"String",{includes:function(e){return!!~a(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(2);r(r.P,"String",{repeat:n(77)})},function(e,t,n){"use strict";var r=n(2),a=n(8),i=n(82),o="".startsWith;r(r.P+r.F*n(83)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=a(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(16)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(16)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(16)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(16)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(16)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(16)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(16)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(16)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(16)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(16)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(16)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(16)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(16)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(2);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26);r(r.P+r.F*n(5)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=a(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(2),a=n(356);r(r.P+r.F*(Date.prototype.toISOString!==a),"Date",{toISOString:a})},function(e,t,n){"use strict";var r=n(5),a=Date.prototype.getTime,i=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(a.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:i},function(e,t,n){var r=Date.prototype,a=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(15)(r,"toString",(function(){var e=i.call(this);return e==e?a.call(this):"Invalid Date"}))},function(e,t,n){var r=n(7)("toPrimitive"),a=Date.prototype;r in a||n(14)(a,r,n(359))},function(e,t,n){"use strict";var r=n(3),a=n(26);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return a(r(this),"number"!=e)}},function(e,t,n){var r=n(2);r(r.S,"Array",{isArray:n(57)})},function(e,t,n){"use strict";var r=n(22),a=n(2),i=n(12),o=n(113),s=n(84),u=n(8),l=n(85),d=n(86);a(a.S+a.F*!n(60)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,a,c,f=i(e),_="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,p=void 0!==h,y=0,M=d(f);if(p&&(h=r(h,m>2?arguments[2]:void 0,2)),null==M||_==Array&&s(M))for(n=new _(t=u(f.length));t>y;y++)l(n,y,p?h(f[y],y):f[y]);else for(c=M.call(f),n=new _;!(a=c.next()).done;y++)l(n,y,p?o(c,h,[a.value,y],!0):a.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(2),a=n(85);r(r.S+r.F*n(5)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(2),a=n(18),i=[].join;r(r.P+r.F*(n(51)!=Object||!n(25)(i)),"Array",{join:function(e){return i.call(a(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(2),a=n(73),i=n(23),o=n(38),s=n(8),u=[].slice;r(r.P+r.F*n(5)((function(){a&&u.call(a)})),"Array",{slice:function(e,t){var n=s(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var a=o(e,n),l=o(t,n),d=s(l-a),c=new Array(d),f=0;f1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(2);r(r.P,"Array",{copyWithin:n(115)}),n(34)("copyWithin")},function(e,t,n){var r=n(2);r(r.P,"Array",{fill:n(88)}),n(34)("fill")},function(e,t,n){"use strict";var r=n(2),a=n(29)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("find")},function(e,t,n){"use strict";var r=n(2),a=n(29)(6),i="findIndex",o=!0;i in[]&&Array(1)[i]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)(i)},function(e,t,n){n(41)("Array")},function(e,t,n){var r=n(4),a=n(76),i=n(11).f,o=n(40).f,s=n(59),u=n(53),l=r.RegExp,d=l,c=l.prototype,f=/a/g,_=/a/g,m=new l(f)!==f;if(n(10)&&(!m||n(5)((function(){return _[n(7)("match")]=!1,l(f)!=f||l(_)==_||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:a(m?new d(r&&!i?e.source:e,t):d((r=e instanceof l)?e.source:e,r&&i?u.call(e):t),n?this:c,l)};for(var h=function(e){e in l||i(l,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},p=o(d),y=0;p.length>y;)h(p[y++]);c.constructor=l,l.prototype=c,n(15)(r,"RegExp",l)}n(41)("RegExp")},function(e,t,n){"use strict";n(118);var r=n(3),a=n(53),i=n(10),o=/./.toString,s=function(e){n(15)(RegExp.prototype,"toString",e,!0)};n(5)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?a.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(3),a=n(8),i=n(91),o=n(61);n(62)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return o(u,l);var d=u.unicode;u.lastIndex=0;for(var c,f=[],_=0;null!==(c=o(u,l));){var m=String(c[0]);f[_]=m,""===m&&(u.lastIndex=i(l,a(u.lastIndex),d)),_++}return 0===_?null:f}]}))},function(e,t,n){"use strict";var r=n(3),a=n(12),i=n(8),o=n(24),s=n(91),u=n(61),l=Math.max,d=Math.min,c=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,_=/\$([$&`']|\d\d?)/g;n(62)("replace",2,(function(e,t,n,m){return[function(r,a){var i=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,a):n.call(String(i),r,a)},function(e,t){var a=m(n,e,this,t);if(a.done)return a.value;var c=r(e),f=String(this),_="function"==typeof t;_||(t=String(t));var p=c.global;if(p){var y=c.unicode;c.lastIndex=0}for(var M=[];;){var v=u(c,f);if(null===v)break;if(M.push(v),!p)break;""===String(v[0])&&(c.lastIndex=s(f,i(c.lastIndex),y))}for(var g,L="",k=0,b=0;b=k&&(L+=f.slice(k,w)+j,k=w+Y.length)}return L+f.slice(k)}];function h(e,t,r,i,o,s){var u=r+e.length,l=i.length,d=_;return void 0!==o&&(o=a(o),d=f),n.call(s,d,(function(n,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=o[a.slice(1,-1)];break;default:var d=+a;if(0===d)return n;if(d>l){var f=c(d/10);return 0===f?n:f<=l?void 0===i[f-1]?a.charAt(1):i[f-1]+a.charAt(1):n}s=i[d-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(3),a=n(104),i=n(61);n(62)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;a(l,0)||(s.lastIndex=0);var d=i(s,u);return a(s.lastIndex,l)||(s.lastIndex=l),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var r=n(59),a=n(3),i=n(54),o=n(91),s=n(8),u=n(61),l=n(90),d=n(5),c=Math.min,f=[].push,_="length",m=!d((function(){RegExp(4294967295,"y")}));n(62)("split",2,(function(e,t,n,d){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[_]||2!="ab".split(/(?:ab)*/)[_]||4!=".".split(/(.?)(.?)/)[_]||".".split(/()()/)[_]>1||"".split(/.?/)[_]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var i,o,s,u=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,m=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,d+"g");(i=l.call(h,a))&&!((o=h.lastIndex)>c&&(u.push(a.slice(c,i.index)),i[_]>1&&i.index=m));)h.lastIndex===i.index&&h.lastIndex++;return c===a[_]?!s&&h.test("")||u.push(""):u.push(a.slice(c)),u[_]>m?u.slice(0,m):u}:"0".split(void 0,0)[_]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,a,r):h.call(String(a),n,r)},function(e,t){var r=d(h,e,this,t,h!==n);if(r.done)return r.value;var l=a(e),f=String(this),_=i(l,RegExp),p=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(m?"y":"g"),M=new _(m?l:"^(?:"+l.source+")",y),v=void 0===t?4294967295:t>>>0;if(0===v)return[];if(0===f.length)return null===u(M,f)?[f]:[];for(var g=0,L=0,k=[];Li;)o(n[i++]);e._c=[],e._n=!1,t&&!e._h&&P(e)}))}},P=function(e){y.call(u,(function(){var t,n,r,a=e._v,i=F(e);if(i&&(t=g((function(){S?Y.emit("unhandledRejection",a,e):(n=u.onunhandledrejection)?n({promise:e,reason:a}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",a)})),e._h=S||F(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},F=function(e){return 1!==e._h&&0===(e._a||e._c).length},A=function(e){y.call(u,(function(){var t;S?Y.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},C=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw b("Promise can't be resolved itself");(t=H(e))?M((function(){var r={_w:n,_d:!1};try{t.call(e,l(C,r,1),l(N,r,1))}catch(e){N.call(r,e)}})):(n._v=e,n._s=1,O(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};E||(T=function(e){m(this,T,"Promise","_h"),_(e),r.call(this);try{e(l(C,this,1),l(N,this,1))}catch(e){N.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(44)(T.prototype,{then:function(e,t){var n=j(p(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=S?Y.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(C,e,1),this.reject=l(N,e,1)},v.f=j=function(e){return e===T||e===o?new i(e):a(e)}),c(c.G+c.W+c.F*!E,{Promise:T}),n(46)(T,"Promise"),n(41)("Promise"),o=n(21).Promise,c(c.S+c.F*!E,"Promise",{reject:function(e){var t=j(this);return(0,t.reject)(e),t.promise}}),c(c.S+c.F*(s||!E),"Promise",{resolve:function(e){return k(s&&this===o?T:this,e)}}),c(c.S+c.F*!(E&&n(60)((function(e){T.all(e).catch(x)}))),"Promise",{all:function(e){var t=this,n=j(t),r=n.resolve,a=n.reject,i=g((function(){var n=[],i=0,o=1;h(e,!1,(function(e){var s=i++,u=!1;n.push(void 0),o++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--o||r(n))}),a)})),--o||r(n)}));return i.e&&a(i.v),n.promise},race:function(e){var t=this,n=j(t),r=n.reject,a=g((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return a.e&&r(a.v),n.promise}})},function(e,t,n){"use strict";var r=n(125),a=n(45);n(64)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(a(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(2),a=n(65),i=n(95),o=n(3),s=n(38),u=n(8),l=n(6),d=n(4).ArrayBuffer,c=n(54),f=i.ArrayBuffer,_=i.DataView,m=a.ABV&&d.isView,h=f.prototype.slice,p=a.VIEW;r(r.G+r.W+r.F*(d!==f),{ArrayBuffer:f}),r(r.S+r.F*!a.CONSTR,"ArrayBuffer",{isView:function(e){return m&&m(e)||l(e)&&p in e}}),r(r.P+r.U+r.F*n(5)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),a=s(void 0===t?n:t,n),i=new(c(this,f))(u(a-r)),l=new _(this),d=new _(i),m=0;r=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(19),a=n(20),i=n(17),o=n(2),s=n(6),u=n(3);o(o.S,"Reflect",{get:function e(t,n){var o,l,d=arguments.length<3?t:arguments[2];return u(t)===d?t[n]:(o=r.f(t,n))?i(o,"value")?o.value:void 0!==o.get?o.get.call(d):void 0:s(l=a(t))?e(l,n,d):void 0}})},function(e,t,n){var r=n(19),a=n(2),i=n(3);a(a.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(2),a=n(20),i=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(2),a=n(3),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return a(e),!i||i(e)}})},function(e,t,n){var r=n(2);r(r.S,"Reflect",{ownKeys:n(127)})},function(e,t,n){var r=n(2),a=n(3),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){a(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(11),a=n(19),i=n(20),o=n(17),s=n(2),u=n(35),l=n(3),d=n(6);s(s.S,"Reflect",{set:function e(t,n,s){var c,f,_=arguments.length<4?t:arguments[3],m=a.f(l(t),n);if(!m){if(d(f=i(t)))return e(f,n,s,_);m=u(0)}if(o(m,"value")){if(!1===m.writable||!d(_))return!1;if(c=a.f(_,n)){if(c.get||c.set||!1===c.writable)return!1;c.value=s,r.f(_,n,c)}else r.f(_,n,u(0,s));return!0}return void 0!==m.set&&(m.set.call(_,s),!0)}})},function(e,t,n){var r=n(2),a=n(74);a&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){a.check(e,t);try{return a.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(2),a=n(55)(!0);r(r.P,"Array",{includes:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(13),u=n(87);r(r.P,"Array",{flatMap:function(e){var t,n,r=i(this);return s(e),t=o(r.length),n=u(r,0),a(n,r,r,t,0,1,e,arguments[1]),n}}),n(34)("flatMap")},function(e,t,n){"use strict";var r=n(2),a=n(128),i=n(12),o=n(8),s=n(24),u=n(87);r(r.P,"Array",{flatten:function(){var e=arguments[0],t=i(this),n=o(t.length),r=u(t,0);return a(r,t,t,n,0,void 0===e?1:s(e)),r}}),n(34)("flatten")},function(e,t,n){"use strict";var r=n(2),a=n(58)(!0),i=n(5)((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*i,"String",{at:function(e){return a(this,e)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padStart:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";var r=n(2),a=n(129),i=n(63),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*o,"String",{padEnd:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(48)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){"use strict";n(48)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){"use strict";var r=n(2),a=n(27),i=n(8),o=n(59),s=n(53),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n(81)(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(a(this),!o(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new l(r,t)}})},function(e,t,n){n(70)("asyncIterator")},function(e,t,n){n(70)("observable")},function(e,t,n){var r=n(2),a=n(127),i=n(18),o=n(19),s=n(85);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),u=o.f,l=a(r),d={},c=0;l.length>c;)void 0!==(n=u(r,t=l[c++]))&&s(d,t,n);return d}})},function(e,t,n){var r=n(2),a=n(130)(!1);r(r.S,"Object",{values:function(e){return a(e)}})},function(e,t,n){var r=n(2),a=n(130)(!0);r(r.S,"Object",{entries:function(e){return a(e)}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineGetter__:function(e,t){o.f(a(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(13),o=n(11);n(10)&&r(r.P+n(66),"Object",{__defineSetter__:function(e,t){o.f(a(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupGetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.get}while(n=o(n))}})},function(e,t,n){"use strict";var r=n(2),a=n(12),i=n(26),o=n(20),s=n(19).f;n(10)&&r(r.P+n(66),"Object",{__lookupSetter__:function(e){var t,n=a(this),r=i(e,!0);do{if(t=s(n,r))return t.set}while(n=o(n))}})},function(e,t,n){var r=n(2);r(r.P+r.R,"Map",{toJSON:n(131)("Map")})},function(e,t,n){var r=n(2);r(r.P+r.R,"Set",{toJSON:n(131)("Set")})},function(e,t,n){n(67)("Map")},function(e,t,n){n(67)("Set")},function(e,t,n){n(67)("WeakMap")},function(e,t,n){n(67)("WeakSet")},function(e,t,n){n(68)("Map")},function(e,t,n){n(68)("Set")},function(e,t,n){n(68)("WeakMap")},function(e,t,n){n(68)("WeakSet")},function(e,t,n){var r=n(2);r(r.G,{global:n(4)})},function(e,t,n){var r=n(2);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(2),a=n(23);r(r.S,"Error",{isError:function(e){return"Error"===a(e)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(e,t,n){var r=n(2),a=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*a}})},function(e,t,n){var r=n(2),a=n(133),i=n(112);r(r.S,"Math",{fscale:function(e,t,n,r,o){return i(a(e,t,n,r,o))}})},function(e,t,n){var r=n(2);r(r.S,"Math",{iaddh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((a&i|(a|i)&~(a+i>>>0))>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{isubh:function(e,t,n,r){var a=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~a&i|~(a^i)&a-i>>>0)>>>31)|0}})},function(e,t,n){var r=n(2);r(r.S,"Math",{imulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>16,s=r>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>16)+((a*s>>>0)+(65535&u)>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(e,t,n){var r=n(2),a=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*a}})},function(e,t,n){var r=n(2);r(r.S,"Math",{scale:n(133)})},function(e,t,n){var r=n(2);r(r.S,"Math",{umulh:function(e,t){var n=+e,r=+t,a=65535&n,i=65535&r,o=n>>>16,s=r>>>16,u=(o*i>>>0)+(a*i>>>16);return o*s+(u>>>16)+((a*s>>>0)+(65535&u)>>>16)}})},function(e,t,n){var r=n(2);r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},function(e,t,n){"use strict";var r=n(2),a=n(21),i=n(4),o=n(54),s=n(120);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,a.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(2),a=n(94),i=n(119);r(r.S,"Promise",{try:function(e){var t=a.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.set;r.exp({defineMetadata:function(e,t,n,r){o(e,t,a(n),i(r))}})},function(e,t,n){var r=n(31),a=n(3),i=r.key,o=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=o(a(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.get,u=r.key,l=function(e,t,n){if(o(e,t,n))return s(e,t,n);var r=i(t);return null!==r?l(e,r,n):void 0};r.exp({getMetadata:function(e,t){return l(e,a(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(123),a=n(132),i=n(31),o=n(3),s=n(20),u=i.keys,l=i.key,d=function(e,t){var n=u(e,t),i=s(e);if(null===i)return n;var o=d(i,t);return o.length?n.length?a(new r(n.concat(o))):o:n};i.exp({getMetadataKeys:function(e){return d(o(e),arguments.length<2?void 0:l(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.get,o=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(e){return i(a(e),arguments.length<2?void 0:o(arguments[1]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(20),o=r.has,s=r.key,u=function(e,t,n){if(o(e,t,n))return!0;var r=i(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,a(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=r.has,o=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,a(t),arguments.length<3?void 0:o(arguments[2]))}})},function(e,t,n){var r=n(31),a=n(3),i=n(13),o=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?a:i)(n),o(r))}}})},function(e,t,n){var r=n(2),a=n(93)(),i=n(4).process,o="process"==n(23)(i);r(r.G,{asap:function(e){var t=o&&i.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(2),a=n(4),i=n(21),o=n(93)(),s=n(7)("observable"),u=n(13),l=n(3),d=n(42),c=n(44),f=n(14),_=n(43),m=_.RETURN,h=function(e){return null==e?void 0:u(e)},p=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},M=function(e){y(e)||(e._o=void 0,p(e))},v=function(e,t){l(e),this._c=void 0,this._o=e,e=new g(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}y(this)&&p(this)};v.prototype=c({},{unsubscribe:function(){M(this)}});var g=function(e){this._s=e};g.prototype=c({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=h(n.next);if(r)return r.call(n,e)}catch(e){try{M(t)}finally{throw e}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=h(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{p(t)}finally{throw e}}return p(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=h(n.complete);e=r?r.call(n,e):void 0}catch(e){try{p(t)}finally{throw e}}return p(t),e}}});var L=function(e){d(this,L,"Observable","_f")._f=u(e)};c(L.prototype,{subscribe:function(e){return new v(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||a.Promise)((function(n,r){u(e);var a=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),a.unsubscribe()}},error:r,complete:n})}))}}),c(L,{from:function(e){var t="function"==typeof this?this:L,n=h(l(e)[s]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return o((function(){if(!n){try{if(_(e,!1,(function(e){if(t.next(e),n)return m}))===m)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e2,a=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,a)}:t,n)}};a(a.G+a.B+a.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(e,t,n){var r=n(2),a=n(92);r(r.G+r.B,{setImmediate:a.set,clearImmediate:a.clear})},function(e,t,n){for(var r=n(89),a=n(37),i=n(15),o=n(4),s=n(14),u=n(49),l=n(7),d=l("iterator"),c=l("toStringTag"),f=u.Array,_={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(_),h=0;h=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),Y(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;Y(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:D(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}}}function h(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),o=new w(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return T()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function M(){}function v(){}function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function L(e){function n(t,a,i,o){var s=p(e[t],e,a);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),o)}o(s.arg)}var a;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function r(){return new Promise((function(r,a){n(e,t,r,a)}))}return a=a?a.then(r,r):r()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function b(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(b,this),this.reset(!0)}function D(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n button {\n margin: 15px;\n}\n\n.file-upload-container {\n border: dotted;\n margin: 18px;\n padding: 15px;\n min-height: 150px;\n text-align: center;\n cursor: pointer;\n}\n\n.file-upload-container > div > div {\n display: grid;\n grid-template-columns: auto auto auto auto;\n}\n\n.uploaded-file {\n max-width: 120px;\n position: relative;\n margin-bottom: 15px;\n}\n\n.uploaded-file > img {\n width: 50px;\n height: 56px;\n border: 1px solid black;\n}\n\n.uploaded-file > span {\n display: block;\n word-wrap: break-word;\n}\n\n.uploaded-file > i:nth-child(3) {\n color: red;\n position: absolute;\n top: -9px;\n right: 25px;\n cursor: pointer;\n}\n\n.clickable { cursor: pointer; }\n.token-revoked td { text-decoration: line-through; }\n\n.token-table td:not(:first-child), .token-table th:not(:first-child) {\n text-align: center;\n}\n\n.token-table td:nth-child(4) > i {\n padding-left: 10px;\n}\n\n.file-table td:nth-child(n+3), .file-table th:nth-child(n+3) {\n text-align: center;\n}\n\n.file-table tr, .file-table td {\n height: 40px;\n}",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(u," */")),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([a]).join("\n")}var o,s,u;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var i=0;i=0&&c.splice(t,1)}function y(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),h(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,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=d++;n=l||(l=y(t)),r=k.bind(null,n,o,!1),a=k.bind(null,n,o,!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),h(e,t),t}(t),r=Y.bind(null,n,t),a=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=b.bind(null,n),a=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 a()}}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=m(e,t);return _(n,t),function(e){for(var r=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/delete",{id:e,token:t})}},{key:"revokeToken",value:function(e){return this.apiCall("file/revokeToken",{token:e})}},{key:"createDownloadToken",value:function(e,t){return this.apiCall("file/createDownloadToken",{files:t,durability:e})}},{key:"createUploadToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return this.apiCall("file/createUploadToken",{parentId:t,durability:e,maxFiles:n,maxSize:r,extensions:a})}},{key:"createDirectory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.apiCall("file/createDirectory",{name:e,parentId:t})}},{key:"upload",value:(a=u(regeneratorRuntime.mark((function e(t){var n,r,a,i,o,s,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:null,a=this.csrfToken(),i=new FormData,o=0;o0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}Object.create;var g=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function L(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=g.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var k=[".DS_Store","Thumbs.db"];function b(e){return(null!==e.target&&e.target.files?D(e.target.files):[]).map((function(e){return L(e)}))}function Y(e,t){return y(this,void 0,void 0,(function(){var n;return M(this,(function(r){switch(r.label){case 0:return e.items?(n=D(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(T))]):[3,2];case 1:return[2,w(S(r.sent()))];case 2:return[2,w(D(e.files).map((function(e){return L(e)})))]}}))}))}function w(e){return e.filter((function(e){return-1===k.indexOf(e.name)}))}function D(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,C(n)];if(e.sizen)return[!1,C(n)]}return[!0,null]}function U(e){return null!=e}function J(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles;return!(!i&&t.length>1||i&&o>=1&&t.length>o)&&t.every((function(e){var t=F(R(e,n),1)[0],i=F(I(e,r,a),1)[0];return t&&i}))}function V(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function B(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function G(e){e.preventDefault()}function $(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function K(e){return-1!==e.indexOf("Edge/")}function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return $(e)||K(e)}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var oe=Object(r.forwardRef)((function(e,t){var n=e.children,i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=re(re({},se),e),n=t.accept,a=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,u=t.multiple,l=t.maxFiles,d=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,_=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,p=t.onFileDialogCancel,y=t.preventDropOnDocument,M=t.noClick,v=t.noKeyboard,g=t.noDrag,L=t.noDragEventsBubbling,k=Object(r.useRef)(null),b=Object(r.useRef)(null),Y=Object(r.useReducer)(de,le),w=X(Y,2),D=w[0],T=w[1],S=D.isFocused,x=D.isFileDialogActive,j=D.draggedFiles,E=Object(r.useCallback)((function(){b.current&&(T({type:"openDialog"}),b.current.value=null,b.current.click())}),[T]),H=function(){x&&setTimeout((function(){b.current&&(b.current.files.length||(T({type:"closeDialog"}),"function"==typeof p&&p()))}),300)};Object(r.useEffect)((function(){return window.addEventListener("focus",H,!1),function(){window.removeEventListener("focus",H,!1)}}),[b,x,p]);var O=Object(r.useCallback)((function(e){k.current&&k.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),E()))}),[k,b]),P=Object(r.useCallback)((function(){T({type:"focus"})}),[]),F=Object(r.useCallback)((function(){T({type:"blur"})}),[]),A=Object(r.useCallback)((function(){M||(q()?setTimeout(E,0):E())}),[b,M]),N=Object(r.useRef)([]),C=function(e){k.current&&k.current.contains(e.target)||(e.preventDefault(),N.current=[])};Object(r.useEffect)((function(){return y&&(document.addEventListener("dragover",G,!1),document.addEventListener("drop",C,!1)),function(){y&&(document.removeEventListener("dragover",G),document.removeEventListener("drop",C))}}),[k,y]);var W=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[].concat(Z(N.current),[e.target]),B(e)&&Promise.resolve(i(e)).then((function(t){V(e)&&!L||(T({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),d&&d(e))}))}),[i,d,L]),U=Object(r.useCallback)((function(e){if(e.preventDefault(),e.persist(),oe(e),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return B(e)&&f&&f(e),!1}),[f,L]),$=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e);var t=N.current.filter((function(e){return k.current&&k.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),N.current=t,t.length>0||(T({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),B(e)&&c&&c(e))}),[k,c,L]),K=Object(r.useCallback)((function(e){e.preventDefault(),e.persist(),oe(e),N.current=[],B(e)&&Promise.resolve(i(e)).then((function(t){if(!V(e)||L){var r=[],a=[];t.forEach((function(e){var t=X(R(e,n),2),i=t[0],u=t[1],l=X(I(e,s,o),2),d=l[0],c=l[1];if(i&&d)r.push(e);else{var f=[u,c].filter((function(e){return e}));a.push({file:e,errors:f})}})),(!u&&r.length>1||u&&l>=1&&r.length>l)&&(r.forEach((function(e){a.push({file:e,errors:[z]})})),r.splice(0)),T({acceptedFiles:r,fileRejections:a,type:"setFiles"}),_&&_(r,a,e),a.length>0&&h&&h(a,e),r.length>0&&m&&m(r,e)}})),T({type:"reset"})}),[u,n,s,o,l,i,_,m,h,L]),ee=function(e){return a?null:e},te=function(e){return v?null:ee(e)},ne=function(e){return g?null:ee(e)},oe=function(e){L&&e.stopPropagation()},ue=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onKeyDown,i=e.onFocus,o=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,d=e.onDragLeave,c=e.onDrop,f=ie(e,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return re(re(ae({onKeyDown:te(Q(r,O)),onFocus:te(Q(i,P)),onBlur:te(Q(o,F)),onClick:ee(Q(s,A)),onDragEnter:ne(Q(u,W)),onDragOver:ne(Q(l,U)),onDragLeave:ne(Q(d,$)),onDrop:ne(Q(c,K))},n,k),a||v?{}:{tabIndex:0}),f)}}),[k,O,P,F,A,W,U,$,K,v,g,a]),ce=Object(r.useCallback)((function(e){e.stopPropagation()}),[]),fe=Object(r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,a=e.onChange,i=e.onClick,o=ie(e,["refKey","onChange","onClick"]),s=ae({accept:n,multiple:u,type:"file",style:{display:"none"},onChange:ee(Q(a,K)),onClick:ee(Q(i,ce)),autoComplete:"off",tabIndex:-1},r,b);return re(re({},s),o)}}),[b,n,u,K,a]),_e=j.length,me=_e>0&&J({files:j,accept:n,minSize:s,maxSize:o,multiple:u,maxFiles:l}),he=_e>0&&!me;return re(re({},D),{},{isDragAccept:me,isDragReject:he,isFocused:S&&!a,getRootProps:ue,getInputProps:fe,rootRef:k,inputRef:b,open:ee(E)})}(ie(e,["children"])),o=i.open,s=ie(i,["open"]);return Object(r.useImperativeHandle)(t,(function(){return{open:o}}),[o]),a.a.createElement(r.Fragment,null,n(re(re({},s),{},{open:o})))}));oe.displayName="Dropzone";var se={disabled:!1,getFilesFromEvent:function(e){return y(this,void 0,void 0,(function(){return M(this,(function(t){return[2,(n=e,n.dataTransfer&&e.dataTransfer?Y(e.dataTransfer,e.type):b(e))];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};oe.defaultProps=se,oe.propTypes={children:p.a.func,accept:p.a.oneOfType([p.a.string,p.a.arrayOf(p.a.string)]),multiple:p.a.bool,preventDropOnDocument:p.a.bool,noClick:p.a.bool,noKeyboard:p.a.bool,noDrag:p.a.bool,noDragEventsBubbling:p.a.bool,minSize:p.a.number,maxSize:p.a.number,maxFiles:p.a.number,disabled:p.a.bool,getFilesFromEvent:p.a.func,onFileDialogCancel:p.a.func,onDragEnter:p.a.func,onDragLeave:p.a.func,onDragOver:p.a.func,onDrop:p.a.func,onDropAccepted:p.a.func,onDropRejected:p.a.func};var ue=oe,le={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function de(e,t){switch(t.type){case"focus":return re(re({},e),{},{isFocused:!0});case"blur":return re(re({},e),{},{isFocused:!1});case"openDialog":return re(re({},e),{},{isFileDialogActive:!0});case"closeDialog":return re(re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return re(re({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return re(re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return re(re({},e),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return e}}function ce(e){var t=e.onClose||null,n=e.title||"Untitled Alert",r=e.message||"Alert message",i=e.type||"danger",o="ban";return"warning"===i?o="exclamation-triangle":"success"===i&&(o="check"),a.a.createElement("div",{className:"alert alert-"+i+" alert-dismissible"},t?a.a.createElement("button",{type:"button",className:"close","data-dismiss":"alert","aria-hidden":"true",onClick:t},"×"):null,a.a.createElement("h5",null,a.a.createElement(m,{icon:o,className:"icon"})," ",n),r)}function fe(e){for(var t=e.buttons||["Ok","Cancel"],n=e.onClick||function(){},r=!!e.visible,i=e.title||"Popup Title",o=e.onClose||function(){},s=[],u=["primary","secondary","success","warning","danger"],l=function(e){var r=t[e],i=u[e%u.length];s.push(a.a.createElement("button",{key:"btn-"+e,type:"button",className:"btn btn-"+i,"data-dismiss":"modal",onClick:function(){return n(r)}},r))},d=0;de.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:n/2,x2:t,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function v(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"}),r.createElement("line",{y2:n/2,x2:t,y1:n/2,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=48*e,n=64*e;return r.createElement("svg",{width:t,height:n,xmlns:"http://www.w3.org/2000/svg",style:{}},r.createElement("g",null,r.createElement("line",{y2:"0",x2:t/2,y1:n,x1:t/2,strokeWidth:"1.5",stroke:"#000",fill:"none"})))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n="";if(null!==e){var a=["image","text","audio","video"],i=["php","java","python","cpp"],o=["zip","tar","archive"],s=(e=e.toLowerCase().trim()).split("/"),u=Me(s,2),l=u[0],d=u[1];"text"===l&&i.find((function(e){return d.includes(e)}))?n="code":"application"===l&&o.find((function(e){return d.includes(e)}))?n="archive":"application"===l&&"pdf"===d?n="pdf":"application"===l&&(d.indexOf("powerpoint")>-1||d.indexOf("presentation")>-1)?n="powerpoint":"application"===l&&(d.indexOf("word")>-1||d.indexOf("opendocument")>-1)?n="word":"application"===l&&(d.indexOf("excel")>-1||d.indexOf("sheet")>-1)?n="excel":"application"===l&&d.indexOf("directory")>-1?n="folder":a.indexOf(l)>-1&&(n="text"===l?"alt":l)}return"folder"!==n&&(n="file"+(n?"-"+n:n)),r.createElement(m,{icon:n,type:"far",className:"p-1 align-middle fa-"+t+"x"})}function k(e){for(var t=["B","KiB","MiB","GiB","TiB"],n=0;n=1024;n++)e/=1024;return 0===n||Math.round(e)===e?e+" "+t[n]:e.toFixed(1)+" "+t[n]}for(var b=function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],s=0,u=Object.values(t),l=function(){var t=c[d],l=t.name,f=t.uid,_=t.isDirectory?"Directory":t.mimeType,m=t.isDirectory?"":k(t.size),h=t.isDirectory?"application/x-directory":t.mimeType,p=a&&a.valid?"&token="+a.value:"",y=[];if(n>0){for(var b=0;b0&&void 0!==arguments[0]?arguments[0]:null,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=[];n=n||t;for(var i=0,o=Object.values(n);i=0&&e0?b:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No files uploaded yet")))),r.createElement("div",{className:"file-control-buttons"},r.createElement("button",{type:"button",className:"btn btn-success",disabled:0===w,onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?"":"&token="+a.value,r=e.map((function(e){return"id[]="+e})).join("&");fetch("/api/file/download?"+r+t).then((function(e){var t=(e.headers.get("Content-Disposition")||"").split(";").filter((function(e){return e.trim().toLowerCase().startsWith("filename=")})),n=null;n=t.length>0?t[0].trim().substr("filename=".length):null,e.blob().then((function(e){var t=window.URL.createObjectURL(e),r=document.createElement("a");r.href=t,null!==n&&(r.download=n),r.click()}))}))}}(Y)}},r.createElement(m,{icon:"download",className:"mr-1"}),"Download Selected Files (",w,")"),n.loggedIn?r.createElement("button",{type:"button",className:"btn btn-info",onClick:function(e){return z("createDirectory")}},r.createElement(m,{icon:"plus",className:"mr-1"}),"Create Directory"):r.createElement(r.Fragment,null),T?r.createElement(r.Fragment,null,r.createElement("button",{type:"button",className:"btn btn-primary",disabled:0===S.length,onClick:function(e){return n.loggedIn?z("upload"):V()}},r.createElement(m,{icon:"upload",className:"mr-1"}),"Upload"),r.createElement("button",{type:"button",className:"btn btn-danger",disabled:0===w,onClick:function(){return function(e){if(e&&e.length>0){var t=n.loggedIn?null:a.value;n.delete(e,t).then((function(e){e.success?U():J(e)}))}}(Y)}},r.createElement(m,{icon:"trash",className:"mr-1"}),"Delete Selected Files (",w,")")):r.createElement(r.Fragment,null)),D,r.createElement("div",null,x),r.createElement(fe,{title:"Create Directory",visible:l.visible,buttons:["Ok","Cancel"],onClose:R,onClick:function(e){if("Ok"===e){var t=0===l.directory?null:l.directory;"createDirectory"===l.type?n.createDirectory(l.directoryName,t).then((function(e){e.success?U():J(e,"Error creating directory")})):"upload"===l.type&&V()}R()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:l.directory,className:"form-control",onChange:function(e){return I(e,"directory")}},H)),"upload"!==l.type?r.createElement("div",{className:"form-group"},r.createElement("label",null,"Directory Name"),r.createElement("input",{type:"text",className:"form-control",value:l.directoryName,maxLength:32,placeholder:"Enter name…",onChange:function(e){return I(e,"directoryName")}})):r.createElement(r.Fragment,null)));function z(e){d(he(he({},l),{},{visible:!0,type:e}))}function R(){d(he(he({},l),{},{visible:!1}))}function I(e,t){d(he(he({},l),{},pe({},t,e.target.value)))}function U(){a.valid?n.validateToken(a.value).then((function(e){e?o(e.files):J(e)})):n.loggedIn&&n.listFiles().then((function(e){e?o(e.files):J(e)}))}function J(e,t){var n=f.slice();n.push({type:"danger",message:e.msg,title:t}),_(n)}function V(){var e=n.loggedIn?null:a.value,t=n.loggedIn&&0!==l.directory?l.directory:null;n.upload(p,e,t).then((function(e){e.success?(y([]),U()):J(e)}))}}var ke=n(1),be=n.n(ke);function Ye(){return(Ye=Object.assign||function(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||je(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){if(e){if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(e,t):void 0}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&e0?v:r.createElement("tr",null,r.createElement("td",{colSpan:4,className:"text-center text-black-50"},"No active tokens connected with this account")))),r.createElement("div",null,r.createElement("button",{type:"button",className:"btn btn-success m-2",onClick:function(){y(De(De({},p),{},{visible:!0}))}},r.createElement(m,{icon:"plus",className:"mr-1"}),"Create Token")),r.createElement("div",null,b),r.createElement(fe,{title:"Create Token",visible:p.visible,buttons:["Ok","Cancel"],onClose:O,onClick:function(e){if("Ok"===e){var r=p.durability,a=0===r?null:be()().add(r,"hours").format("YYYY-MM-DD HH:mm:ss");if("download"===p.tokenType)t.createDownloadToken(r,n).then((function(e){if(e.success){var t=o.slice();t.push({token:e.token,valid_until:a,type:"download"}),s(t)}else H(e,"Error creating token")}));else if("upload"===p.tokenType){var i=0===p.directory?null:p.directory;t.createUploadToken(r,i,p.maxFiles,p.maxSize,p.extensions).then((function(e){if(e.success){var t=o.slice();t.push({uid:e.tokenId,token:e.token,valid_until:a,type:"upload"}),s(t)}else H(e,"Error creating token")}))}}O()}},r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Durability in minutes (0 = forever):"),r.createElement("input",{type:"number",min:0,className:"form-control",value:p.durability,onChange:function(e){return P(e,"durability")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Token Type:"),r.createElement("select",{value:p.tokenType,className:"form-control",onChange:function(e){return P(e,"tokenType")}},r.createElement("option",{value:"upload"},"Upload"),r.createElement("option",{value:"download"},"Download"))),"upload"===p.tokenType?r.createElement(r.Fragment,null,r.createElement("div",{className:"form-group"},r.createElement("label",null,"Destination Directory:"),r.createElement("select",{value:p.directory,className:"form-control",onChange:function(e){return P(e,"directory")}},D)),r.createElement("b",null,"Upload Restrictions:"),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Files (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:25,className:"form-control",value:p.maxFiles,onChange:function(e){return P(e,"maxFiles")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Max. Size per file in MB (0 = unlimited):"),r.createElement("input",{type:"number",min:0,max:10,className:"form-control",value:p.maxSize,onChange:function(e){return P(e,"maxSize")}})),r.createElement("div",{className:"form-group"},r.createElement("label",null,"Allowed Extensions:"),r.createElement("input",{type:"text",placeholder:"(no restrictions)",maxLength:256,className:"form-control",value:p.extensions,onChange:function(e){return P(e,"extensions")}}))):r.createElement(r.Fragment,null)));function H(e,t){var n=l.slice();n.push({type:"danger",message:e.msg,title:t}),d(n)}function O(){y(De(De({},p),{},{visible:!1}))}function P(e,t){y(De(De({},p),{},Te({},t,e.target.value)))}}function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={};t=t||this.state.files,"/"===e&&(n[0]="/");for(var r=0,a=Object.values(t);r1?"/":"")+i.name;n[i.uid]=o,n=Object.assign(n,Ne({},this.getDirectories(o,i.items)))}}return n}},{key:"getSelectedIds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=[];e=e||this.state.files;for(var r=0,a=Object.values(e);r2&&void 0!==arguments[2]?arguments[2]:null,r=!1,a=null===n?Ne({},this.state.files):n;if(a.hasOwnProperty(t)){var i=a[t];r=!0,i.selected=e.target.checked,i.isDirectory&&this.onSelectAll(i.selected,i.items)}else for(var o=0,s=Object.values(a);o0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(this.setState(Ne(Ne({},this.state),{},{validatingToken:!0,errorMessage:""})),t=this.state.token.value),this.api.validateToken(t).then((function(n){var r=Ne(Ne({},e.state),{},{loaded:!0,validatingToken:!1});n.success?(r.token=Ne(Ne({},e.state.token),{},{valid:!0,validUntil:n.token.valid_until,type:n.token.type}),r.token.value||(r.token.value=t),r.files=n.files):r.errorMessage=n.msg,e.setState(r)}))}},{key:"onUpdateToken",value:function(e){this.setState(Ne(Ne({},this.state),{},{token:Ne(Ne({},this.state.token),{},{value:e.target.value})}))}},{key:"render",value:function(){var e=this,t=this,n=!!this.state.errorMessage;if(this.state.loaded){if(this.api.loggedIn||this.state.token.valid){var r=this.getSelectedIds(),i=this.getDirectories(),o=this.api.loggedIn?a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement(He,{api:this.api,selectedFiles:r,directories:i}))):a.a.createElement(a.a.Fragment,null);return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement(Le,{files:this.state.files,token:this.state.token,api:this.api,directories:i,onSelectFile:this.onSelectFile.bind(this),onFetchFiles:this.onFetchFiles.bind(this)}))),o))}return a.a.createElement("div",{className:"container mt-4"},a.a.createElement("div",{className:"row"},a.a.createElement("div",{className:"col-lg-8 col-md-10 col-sm-12 mx-auto"},a.a.createElement("h2",null,"File Control Panel"),a.a.createElement("form",{onSubmit:function(e){return e.preventDefault()}},a.a.createElement("label",{htmlFor:"token"},"Enter a file token to download or upload files"),a.a.createElement("input",{type:"text",className:"form-control",name:"token",placeholder:"Enter token…",maxLength:36,value:this.state.token.value,onChange:function(e){return t.onUpdateToken(e)}}),a.a.createElement("button",{className:"btn btn-success mt-2",onClick:function(){return e.onValidateToken()},disabled:this.state.validatingToken},this.state.validatingToken?a.a.createElement(a.a.Fragment,null,"Validating… ",a.a.createElement(m,{icon:"spinner"})):"Submit")),a.a.createElement("div",{className:"alert alert-danger mt-2",hidden:!n},this.state.errorMessage))))}var s=!0,u=window.location.pathname;if(u.length>1){var l=u.endsWith("/")?u.length-2:u.length-1,d=u.startsWith("/files/")?"/files/".length:1,c=u.substr(d,l);c&&(this.onValidateToken(c),s=!1)}return s&&this.api.fetchUser().then((function(t){t?e.api.listFiles().then((function(t){e.setState(Ne(Ne({},e.state),{},{loaded:!0,user:e.api.user,files:t.files}))})):e.setState(Ne(Ne({},e.state),{},{loaded:!0,user:e.api.user}))})),a.a.createElement(a.a.Fragment,null,"Loading… ",a.a.createElement(m,{icon:"spinner"}))}}])&&We(t.prototype,n),r&&We(t,r),o}(a.a.Component);o.a.render(a.a.createElement(Je,null),document.getElementById("root"))}]); \ No newline at end of file