1// Shinylive 0.9.1 2// Copyright 2024 Posit, PBC 3import { 4 __commonJS, 5 __toESM 6} from "./chunk-O5P2LFOG.js"; 7
vendor: 18,255 bytes, lines 8-474
8// node_modules/lz-string/libs/lz-string.js 9var require_lz_string = __commonJS({ 10 "node_modules/lz-string/libs/lz-string.js"(exports, module) { 11 var LZString2 = function() { 12 var f = String.fromCharCode; 13 var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 14 var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$"; 15 var baseReverseDic = {}; 16 function getBaseValue(alphabet, character) { 17 if (!baseReverseDic[alphabet]) { 18 baseReverseDic[alphabet] = {}; 19 for (var i = 0; i < alphabet.length; i++) { 20 baseReverseDic[alphabet][alphabet.charAt(i)] = i; 21 } 22 } 23 return baseReverseDic[alphabet][character]; 24 } 25 var LZString3 = { 26 compressToBase64: function(input) { 27 if (input == null) 28 return ""; 29 var res = LZString3._compress(input, 6, function(a) { 30 return keyStrBase64.charAt(a); 31 }); 32 switch (res.length % 4) { 33 default: 34 case 0: 35 return res; 36 case 1: 37 return res + "==="; 38 case 2: 39 return res + "=="; 40 case 3: 41 return res + "="; 42 } 43 }, 44 decompressFromBase64: function(input) { 45 if (input == null) 46 return ""; 47 if (input == "") 48 return null; 49 return LZString3._decompress(input.length, 32, function(index) { 50 return getBaseValue(keyStrBase64, input.charAt(index)); 51 }); 52 }, 53 compressToUTF16: function(input) { 54 if (input == null) 55 return ""; 56 return LZString3._compress(input, 15, function(a) { 57 return f(a + 32); 58 }) + " "; 59 }, 60 decompressFromUTF16: function(compressed) { 61 if (compressed == null) 62 return ""; 63 if (compressed == "") 64 return null; 65 return LZString3._decompress(compressed.length, 16384, function(index) { 66 return compressed.charCodeAt(index) - 32; 67 }); 68 }, 69 //compress into uint8array (UCS-2 big endian format) 70 compressToUint8Array: function(uncompressed) { 71 var compressed = LZString3.compress(uncompressed); 72 var buf = new Uint8Array(compressed.length * 2); 73 for (var i = 0, TotalLen = compressed.length; i < TotalLen; i++) { 74 var current_value = compressed.charCodeAt(i); 75 buf[i * 2] = current_value >>> 8; 76 buf[i * 2 + 1] = current_value % 256; 77 } 78 return buf; 79 }, 80 //decompress from uint8array (UCS-2 big endian format) 81 decompressFromUint8Array: function(compressed) { 82 if (compressed === null || compressed === void 0) { 83 return LZString3.decompress(compressed); 84 } else { 85 var buf = new Array(compressed.length / 2); 86 for (var i = 0, TotalLen = buf.length; i < TotalLen; i++) { 87 buf[i] = compressed[i * 2] * 256 + compressed[i * 2 + 1]; 88 } 89 var result = []; 90 buf.forEach(function(c) { 91 result.push(f(c)); 92 }); 93 return LZString3.decompress(result.join("")); 94 } 95 }, 96 //compress into a string that is already URI encoded 97 compressToEncodedURIComponent: function(input) { 98 if (input == null) 99 return ""; 100 return LZString3._compress(input, 6, function(a) { 101 return keyStrUriSafe.charAt(a); 102 }); 103 }, 104 //decompress from an output of compressToEncodedURIComponent 105 decompressFromEncodedURIComponent: function(input) { 106 if (input == null) 107 return ""; 108 if (input == "") 109 return null; 110 input = input.replace(/ /g, "+"); 111 return LZString3._decompress(input.length, 32, function(index) { 112 return getBaseValue(keyStrUriSafe, input.charAt(index)); 113 }); 114 }, 115 compress: function(uncompressed) { 116 return LZString3._compress(uncompressed, 16, function(a) { 117 return f(a); 118 }); 119 }, 120 _compress: function(uncompressed, bitsPerChar, getCharFromInt) { 121 if (uncompressed == null) 122 return ""; 123 var i, value, context_dictionary = {}, context_dictionaryToCreate = {}, context_c = "", context_wc = "", context_w = "", context_enlargeIn = 2, context_dictSize = 3, context_numBits = 2, context_data = [], context_data_val = 0, context_data_position = 0, ii; 124 for (ii = 0; ii < uncompressed.length; ii += 1) { 125 context_c = uncompressed.charAt(ii); 126 if (!Object.prototype.hasOwnProperty.call(context_dictionary, context_c)) { 127 context_dictionary[context_c] = context_dictSize++; 128 context_dictionaryToCreate[context_c] = true; 129 } 130 context_wc = context_w + context_c; 131 if (Object.prototype.hasOwnProperty.call(context_dictionary, context_wc)) { 132 context_w = context_wc; 133 } else { 134 if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) { 135 if (context_w.charCodeAt(0) < 256) { 136 for (i = 0; i < context_numBits; i++) { 137 context_data_val = context_data_val << 1; 138 if (context_data_position == bitsPerChar - 1) { 139 context_data_position = 0; 140 context_data.push(getCharFromInt(context_data_val)); 141 context_data_val = 0; 142 } else { 143 context_data_position++; 144 } 145 } 146 value = context_w.charCodeAt(0); 147 for (i = 0; i < 8; i++) { 148 context_data_val = context_data_val << 1 | value & 1; 149 if (context_data_position == bitsPerChar - 1) { 150 context_data_position = 0; 151 context_data.push(getCharFromInt(context_data_val)); 152 context_data_val = 0; 153 } else { 154 context_data_position++; 155 } 156 value = value >> 1; 157 } 158 } else { 159 value = 1; 160 for (i = 0; i < context_numBits; i++) { 161 context_data_val = context_data_val << 1 | value; 162 if (context_data_position == bitsPerChar - 1) { 163 context_data_position = 0; 164 context_data.push(getCharFromInt(context_data_val)); 165 context_data_val = 0; 166 } else { 167 context_data_position++; 168 } 169 value = 0; 170 } 171 value = context_w.charCodeAt(0); 172 for (i = 0; i < 16; i++) { 173 context_data_val = context_data_val << 1 | value & 1; 174 if (context_data_position == bitsPerChar - 1) { 175 context_data_position = 0; 176 context_data.push(getCharFromInt(context_data_val)); 177 context_data_val = 0; 178 } else { 179 context_data_position++; 180 } 181 value = value >> 1; 182 } 183 } 184 context_enlargeIn--; 185 if (context_enlargeIn == 0) { 186 context_enlargeIn = Math.pow(2, context_numBits); 187 context_numBits++; 188 } 189 delete context_dictionaryToCreate[context_w]; 190 } else { 191 value = context_dictionary[context_w]; 192 for (i = 0; i < context_numBits; i++) { 193 context_data_val = context_data_val << 1 | value & 1; 194 if (context_data_position == bitsPerChar - 1) { 195 context_data_position = 0; 196 context_data.push(getCharFromInt(context_data_val)); 197 context_data_val = 0; 198 } else { 199 context_data_position++; 200 } 201 value = value >> 1; 202 } 203 } 204 context_enlargeIn--; 205 if (context_enlargeIn == 0) { 206 context_enlargeIn = Math.pow(2, context_numBits); 207 context_numBits++; 208 } 209 context_dictionary[context_wc] = context_dictSize++; 210 context_w = String(context_c); 211 } 212 } 213 if (context_w !== "") { 214 if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) { 215 if (context_w.charCodeAt(0) < 256) { 216 for (i = 0; i < context_numBits; i++) { 217 context_data_val = context_data_val << 1; 218 if (context_data_position == bitsPerChar - 1) { 219 context_data_position = 0; 220 context_data.push(getCharFromInt(context_data_val)); 221 context_data_val = 0; 222 } else { 223 context_data_position++; 224 } 225 } 226 value = context_w.charCodeAt(0); 227 for (i = 0; i < 8; i++) { 228 context_data_val = context_data_val << 1 | value & 1; 229 if (context_data_position == bitsPerChar - 1) { 230 context_data_position = 0; 231 context_data.push(getCharFromInt(context_data_val)); 232 context_data_val = 0; 233 } else { 234 context_data_position++; 235 } 236 value = value >> 1; 237 } 238 } else { 239 value = 1; 240 for (i = 0; i < context_numBits; i++) { 241 context_data_val = context_data_val << 1 | value; 242 if (context_data_position == bitsPerChar - 1) { 243 context_data_position = 0; 244 context_data.push(getCharFromInt(context_data_val)); 245 context_data_val = 0; 246 } else { 247 context_data_position++; 248 } 249 value = 0; 250 } 251 value = context_w.charCodeAt(0); 252 for (i = 0; i < 16; i++) { 253 context_data_val = context_data_val << 1 | value & 1; 254 if (context_data_position == bitsPerChar - 1) { 255 context_data_position = 0; 256 context_data.push(getCharFromInt(context_data_val)); 257 context_data_val = 0; 258 } else { 259 context_data_position++; 260 } 261 value = value >> 1; 262 } 263 } 264 context_enlargeIn--; 265 if (context_enlargeIn == 0) { 266 context_enlargeIn = Math.pow(2, context_numBits); 267 context_numBits++; 268 } 269 delete context_dictionaryToCreate[context_w]; 270 } else { 271 value = context_dictionary[context_w]; 272 for (i = 0; i < context_numBits; i++) { 273 context_data_val = context_data_val << 1 | value & 1; 274 if (context_data_position == bitsPerChar - 1) { 275 context_data_position = 0; 276 context_data.push(getCharFromInt(context_data_val)); 277 context_data_val = 0; 278 } else { 279 context_data_position++; 280 } 281 value = value >> 1; 282 } 283 } 284 context_enlargeIn--; 285 if (context_enlargeIn == 0) { 286 context_enlargeIn = Math.pow(2, context_numBits); 287 context_numBits++; 288 } 289 } 290 value = 2; 291 for (i = 0; i < context_numBits; i++) { 292 context_data_val = context_data_val << 1 | value & 1; 293 if (context_data_position == bitsPerChar - 1) { 294 context_data_position = 0; 295 context_data.push(getCharFromInt(context_data_val)); 296 context_data_val = 0; 297 } else { 298 context_data_position++; 299 } 300 value = value >> 1; 301 } 302 while (true) { 303 context_data_val = context_data_val << 1; 304 if (context_data_position == bitsPerChar - 1) { 305 context_data.push(getCharFromInt(context_data_val)); 306 break; 307 } else 308 context_data_position++; 309 } 310 return context_data.join(""); 311 }, 312 decompress: function(compressed) { 313 if (compressed == null) 314 return ""; 315 if (compressed == "") 316 return null; 317 return LZString3._decompress(compressed.length, 32768, function(index) { 318 return compressed.charCodeAt(index); 319 }); 320 }, 321 _decompress: function(length, resetValue, getNextValue) { 322 var dictionary = [], next, enlargeIn = 4, dictSize = 4, numBits = 3, entry = "", result = [], i, w, bits, resb, maxpower, power, c, data = { val: getNextValue(0), position: resetValue, index: 1 }; 323 for (i = 0; i < 3; i += 1) { 324 dictionary[i] = i; 325 } 326 bits = 0; 327 maxpower = Math.pow(2, 2); 328 power = 1; 329 while (power != maxpower) { 330 resb = data.val & data.position; 331 data.position >>= 1; 332 if (data.position == 0) { 333 data.position = resetValue; 334 data.val = getNextValue(data.index++); 335 } 336 bits |= (resb > 0 ? 1 : 0) * power; 337 power <<= 1; 338 } 339 switch (next = bits) { 340 case 0: 341 bits = 0; 342 maxpower = Math.pow(2, 8); 343 power = 1; 344 while (power != maxpower) { 345 resb = data.val & data.position; 346 data.position >>= 1; 347 if (data.position == 0) { 348 data.position = resetValue; 349 data.val = getNextValue(data.index++); 350 } 351 bits |= (resb > 0 ? 1 : 0) * power; 352 power <<= 1; 353 } 354 c = f(bits); 355 break; 356 case 1: 357 bits = 0; 358 maxpower = Math.pow(2, 16); 359 power = 1; 360 while (power != maxpower) { 361 resb = data.val & data.position; 362 data.position >>= 1; 363 if (data.position == 0) { 364 data.position = resetValue; 365 data.val = getNextValue(data.index++); 366 } 367 bits |= (resb > 0 ? 1 : 0) * power; 368 power <<= 1; 369 } 370 c = f(bits); 371 break; 372 case 2: 373 return ""; 374 } 375 dictionary[3] = c; 376 w = c; 377 result.push(c); 378 while (true) { 379 if (data.index > length) { 380 return ""; 381 } 382 bits = 0; 383 maxpower = Math.pow(2, numBits); 384 power = 1; 385 while (power != maxpower) { 386 resb = data.val & data.position; 387 data.position >>= 1; 388 if (data.position == 0) { 389 data.position = resetValue; 390 data.val = getNextValue(data.index++); 391 } 392 bits |= (resb > 0 ? 1 : 0) * power; 393 power <<= 1; 394 } 395 switch (c = bits) { 396 case 0: 397 bits = 0; 398 maxpower = Math.pow(2, 8); 399 power = 1; 400 while (power != maxpower) { 401 resb = data.val & data.position; 402 data.position >>= 1; 403 if (data.position == 0) { 404 data.position = resetValue; 405 data.val = getNextValue(data.index++); 406 } 407 bits |= (resb > 0 ? 1 : 0) * power; 408 power <<= 1; 409 } 410 dictionary[dictSize++] = f(bits); 411 c = dictSize - 1; 412 enlargeIn--; 413 break; 414 case 1: 415 bits = 0; 416 maxpower = Math.pow(2, 16); 417 power = 1; 418 while (power != maxpower) { 419 resb = data.val & data.position; 420 data.position >>= 1; 421 if (data.position == 0) { 422 data.position = resetValue; 423 data.val = getNextValue(data.index++); 424 } 425 bits |= (resb > 0 ? 1 : 0) * power; 426 power <<= 1; 427 } 428 dictionary[dictSize++] = f(bits); 429 c = dictSize - 1; 430 enlargeIn--; 431 break; 432 case 2: 433 return result.join(""); 434 } 435 if (enlargeIn == 0) { 436 enlargeIn = Math.pow(2, numBits); 437 numBits++; 438 } 439 if (dictionary[c]) { 440 entry = dictionary[c]; 441 } else { 442 if (c === dictSize) { 443 entry = w + w.charAt(0); 444 } else { 445 return null; 446 } 447 } 448 result.push(entry); 449 dictionary[dictSize++] = w + entry.charAt(0); 450 enlargeIn--; 451 w = entry; 452 if (enlargeIn == 0) { 453 enlargeIn = Math.pow(2, numBits); 454 numBits++; 455 } 456 } 457 } 458 }; 459 return LZString3; 460 }(); 461 if (typeof define === "function" && define.amd) { 462 define(function() { 463 return LZString2; 464 }); 465 } else if (typeof module !== "undefined" && module != null) { 466 module.exports = LZString2; 467 } else if (typeof angular !== "undefined" && angular != null) { 468 angular.module("LZString", []).factory("LZString", function() { 469 return LZString2; 470 }); 471 } 472 } 473}); 474
vendor: 77,071 bytes, lines 475-2347
475// node_modules/react/cjs/react.development.js 476var require_react_development = __commonJS({ 477 "node_modules/react/cjs/react.development.js"(exports, module) { 478 "use strict"; 479 if (true) { 480 (function() { 481 "use strict"; 482 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { 483 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); 484 } 485 var ReactVersion = "18.2.0"; 486 var REACT_ELEMENT_TYPE = Symbol.for("react.element"); 487 var REACT_PORTAL_TYPE = Symbol.for("react.portal"); 488 var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); 489 var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); 490 var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); 491 var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); 492 var REACT_CONTEXT_TYPE = Symbol.for("react.context"); 493 var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); 494 var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); 495 var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); 496 var REACT_MEMO_TYPE = Symbol.for("react.memo"); 497 var REACT_LAZY_TYPE = Symbol.for("react.lazy"); 498 var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); 499 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; 500 var FAUX_ITERATOR_SYMBOL = "@@iterator"; 501 function getIteratorFn(maybeIterable) { 502 if (maybeIterable === null || typeof maybeIterable !== "object") { 503 return null; 504 } 505 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; 506 if (typeof maybeIterator === "function") { 507 return maybeIterator; 508 } 509 return null; 510 } 511 var ReactCurrentDispatcher = { 512 /** 513 * @internal 514 * @type {ReactComponent} 515 */ 516 current: null 517 }; 518 var ReactCurrentBatchConfig = { 519 transition: null 520 }; 521 var ReactCurrentActQueue = { 522 current: null, 523 // Used to reproduce behavior of `batchedUpdates` in legacy mode. 524 isBatchingLegacy: false, 525 didScheduleLegacyUpdate: false 526 }; 527 var ReactCurrentOwner = { 528 /** 529 * @internal 530 * @type {ReactComponent} 531 */ 532 current: null 533 }; 534 var ReactDebugCurrentFrame = {}; 535 var currentExtraStackFrame = null; 536 function setExtraStackFrame(stack) { 537 { 538 currentExtraStackFrame = stack; 539 } 540 } 541 { 542 ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { 543 { 544 currentExtraStackFrame = stack; 545 } 546 }; 547 ReactDebugCurrentFrame.getCurrentStack = null; 548 ReactDebugCurrentFrame.getStackAddendum = function() { 549 var stack = ""; 550 if (currentExtraStackFrame) { 551 stack += currentExtraStackFrame; 552 } 553 var impl = ReactDebugCurrentFrame.getCurrentStack; 554 if (impl) { 555 stack += impl() || ""; 556 } 557 return stack; 558 }; 559 } 560 var enableScopeAPI = false; 561 var enableCacheElement = false; 562 var enableTransitionTracing = false; 563 var enableLegacyHidden = false; 564 var enableDebugTracing = false; 565 var ReactSharedInternals = { 566 ReactCurrentDispatcher, 567 ReactCurrentBatchConfig, 568 ReactCurrentOwner 569 }; 570 { 571 ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; 572 ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; 573 } 574 function warn(format) { 575 { 576 { 577 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 578 args[_key - 1] = arguments[_key]; 579 } 580 printWarning("warn", format, args); 581 } 582 } 583 } 584 function error(format) { 585 { 586 { 587 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 588 args[_key2 - 1] = arguments[_key2]; 589 } 590 printWarning("error", format, args); 591 } 592 } 593 } 594 function printWarning(level, format, args) { 595 { 596 var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; 597 var stack = ReactDebugCurrentFrame2.getStackAddendum(); 598 if (stack !== "") { 599 format += "%s"; 600 args = args.concat([stack]); 601 } 602 var argsWithFormat = args.map(function(item) { 603 return String(item); 604 }); 605 argsWithFormat.unshift("Warning: " + format); 606 Function.prototype.apply.call(console[level], console, argsWithFormat); 607 } 608 } 609 var didWarnStateUpdateForUnmountedComponent = {}; 610 function warnNoop(publicInstance, callerName) { 611 { 612 var _constructor = publicInstance.constructor; 613 var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; 614 var warningKey = componentName + "." + callerName; 615 if (didWarnStateUpdateForUnmountedComponent[warningKey]) { 616 return; 617 } 618 error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); 619 didWarnStateUpdateForUnmountedComponent[warningKey] = true; 620 } 621 } 622 var ReactNoopUpdateQueue = { 623 /** 624 * Checks whether or not this composite component is mounted. 625 * @param {ReactClass} publicInstance The instance we want to test. 626 * @return {boolean} True if mounted, false otherwise. 627 * @protected 628 * @final 629 */ 630 isMounted: function(publicInstance) { 631 return false; 632 }, 633 /** 634 * Forces an update. This should only be invoked when it is known with 635 * certainty that we are **not** in a DOM transaction. 636 * 637 * You may want to call this when you know that some deeper aspect of the 638 * component's state has changed but `setState` was not called. 639 * 640 * This will not invoke `shouldComponentUpdate`, but it will invoke 641 * `componentWillUpdate` and `componentDidUpdate`. 642 * 643 * @param {ReactClass} publicInstance The instance that should rerender. 644 * @param {?function} callback Called after component is updated. 645 * @param {?string} callerName name of the calling function in the public API. 646 * @internal 647 */ 648 enqueueForceUpdate: function(publicInstance, callback, callerName) { 649 warnNoop(publicInstance, "forceUpdate"); 650 }, 651 /** 652 * Replaces all of the state. Always use this or `setState` to mutate state. 653 * You should treat `this.state` as immutable. 654 * 655 * There is no guarantee that `this.state` will be immediately updated, so 656 * accessing `this.state` after calling this method may return the old value. 657 * 658 * @param {ReactClass} publicInstance The instance that should rerender. 659 * @param {object} completeState Next state. 660 * @param {?function} callback Called after component is updated. 661 * @param {?string} callerName name of the calling function in the public API. 662 * @internal 663 */ 664 enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { 665 warnNoop(publicInstance, "replaceState"); 666 }, 667 /** 668 * Sets a subset of the state. This only exists because _pendingState is 669 * internal. This provides a merging strategy that is not available to deep 670 * properties which is confusing. TODO: Expose pendingState or don't use it 671 * during the merge. 672 * 673 * @param {ReactClass} publicInstance The instance that should rerender. 674 * @param {object} partialState Next partial state to be merged with state. 675 * @param {?function} callback Called after component is updated. 676 * @param {?string} Name of the calling function in the public API. 677 * @internal 678 */ 679 enqueueSetState: function(publicInstance, partialState, callback, callerName) { 680 warnNoop(publicInstance, "setState"); 681 } 682 }; 683 var assign = Object.assign; 684 var emptyObject = {}; 685 { 686 Object.freeze(emptyObject); 687 } 688 function Component(props, context, updater) { 689 this.props = props; 690 this.context = context; 691 this.refs = emptyObject; 692 this.updater = updater || ReactNoopUpdateQueue; 693 } 694 Component.prototype.isReactComponent = {}; 695 Component.prototype.setState = function(partialState, callback) { 696 if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) { 697 throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); 698 } 699 this.updater.enqueueSetState(this, partialState, callback, "setState"); 700 }; 701 Component.prototype.forceUpdate = function(callback) { 702 this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); 703 }; 704 { 705 var deprecatedAPIs = { 706 isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], 707 replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] 708 }; 709 var defineDeprecationWarning = function(methodName, info) { 710 Object.defineProperty(Component.prototype, methodName, { 711 get: function() { 712 warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); 713 return void 0; 714 } 715 }); 716 }; 717 for (var fnName in deprecatedAPIs) { 718 if (deprecatedAPIs.hasOwnProperty(fnName)) { 719 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); 720 } 721 } 722 } 723 function ComponentDummy() { 724 } 725 ComponentDummy.prototype = Component.prototype; 726 function PureComponent(props, context, updater) { 727 this.props = props; 728 this.context = context; 729 this.refs = emptyObject; 730 this.updater = updater || ReactNoopUpdateQueue; 731 } 732 var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); 733 pureComponentPrototype.constructor = PureComponent; 734 assign(pureComponentPrototype, Component.prototype); 735 pureComponentPrototype.isPureReactComponent = true; 736 function createRef() { 737 var refObject = { 738 current: null 739 }; 740 { 741 Object.seal(refObject); 742 } 743 return refObject; 744 } 745 var isArrayImpl = Array.isArray; 746 function isArray(a) { 747 return isArrayImpl(a); 748 } 749 function typeName(value) { 750 { 751 var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; 752 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; 753 return type; 754 } 755 } 756 function willCoercionThrow(value) { 757 { 758 try { 759 testStringCoercion(value); 760 return false; 761 } catch (e) { 762 return true; 763 } 764 } 765 } 766 function testStringCoercion(value) { 767 return "" + value; 768 } 769 function checkKeyStringCoercion(value) { 770 { 771 if (willCoercionThrow(value)) { 772 error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); 773 return testStringCoercion(value); 774 } 775 } 776 } 777 function getWrappedName(outerType, innerType, wrapperName) { 778 var displayName = outerType.displayName; 779 if (displayName) { 780 return displayName; 781 } 782 var functionName = innerType.displayName || innerType.name || ""; 783 return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; 784 } 785 function getContextName(type) { 786 return type.displayName || "Context"; 787 } 788 function getComponentNameFromType(type) { 789 if (type == null) { 790 return null; 791 } 792 { 793 if (typeof type.tag === "number") { 794 error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); 795 } 796 } 797 if (typeof type === "function") { 798 return type.displayName || type.name || null; 799 } 800 if (typeof type === "string") { 801 return type; 802 } 803 switch (type) { 804 case REACT_FRAGMENT_TYPE: 805 return "Fragment"; 806 case REACT_PORTAL_TYPE: 807 return "Portal"; 808 case REACT_PROFILER_TYPE: 809 return "Profiler"; 810 case REACT_STRICT_MODE_TYPE: 811 return "StrictMode"; 812 case REACT_SUSPENSE_TYPE: 813 return "Suspense"; 814 case REACT_SUSPENSE_LIST_TYPE: 815 return "SuspenseList"; 816 } 817 if (typeof type === "object") { 818 switch (type.$$typeof) { 819 case REACT_CONTEXT_TYPE: 820 var context = type; 821 return getContextName(context) + ".Consumer"; 822 case REACT_PROVIDER_TYPE: 823 var provider = type; 824 return getContextName(provider._context) + ".Provider"; 825 case REACT_FORWARD_REF_TYPE: 826 return getWrappedName(type, type.render, "ForwardRef"); 827 case REACT_MEMO_TYPE: 828 var outerName = type.displayName || null; 829 if (outerName !== null) { 830 return outerName; 831 } 832 return getComponentNameFromType(type.type) || "Memo"; 833 case REACT_LAZY_TYPE: { 834 var lazyComponent = type; 835 var payload = lazyComponent._payload; 836 var init = lazyComponent._init; 837 try { 838 return getComponentNameFromType(init(payload)); 839 } catch (x) { 840 return null; 841 } 842 } 843 } 844 } 845 return null; 846 } 847 var hasOwnProperty = Object.prototype.hasOwnProperty; 848 var RESERVED_PROPS = { 849 key: true, 850 ref: true, 851 __self: true, 852 __source: true 853 }; 854 var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; 855 { 856 didWarnAboutStringRefs = {}; 857 } 858 function hasValidRef(config) { 859 { 860 if (hasOwnProperty.call(config, "ref")) { 861 var getter = Object.getOwnPropertyDescriptor(config, "ref").get; 862 if (getter && getter.isReactWarning) { 863 return false; 864 } 865 } 866 } 867 return config.ref !== void 0; 868 } 869 function hasValidKey(config) { 870 { 871 if (hasOwnProperty.call(config, "key")) { 872 var getter = Object.getOwnPropertyDescriptor(config, "key").get; 873 if (getter && getter.isReactWarning) { 874 return false; 875 } 876 } 877 } 878 return config.key !== void 0; 879 } 880 function defineKeyPropWarningGetter(props, displayName) { 881 var warnAboutAccessingKey = function() { 882 { 883 if (!specialPropKeyWarningShown) { 884 specialPropKeyWarningShown = true; 885 error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); 886 } 887 } 888 }; 889 warnAboutAccessingKey.isReactWarning = true; 890 Object.defineProperty(props, "key", { 891 get: warnAboutAccessingKey, 892 configurable: true 893 }); 894 } 895 function defineRefPropWarningGetter(props, displayName) { 896 var warnAboutAccessingRef = function() { 897 { 898 if (!specialPropRefWarningShown) { 899 specialPropRefWarningShown = true; 900 error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); 901 } 902 } 903 }; 904 warnAboutAccessingRef.isReactWarning = true; 905 Object.defineProperty(props, "ref", { 906 get: warnAboutAccessingRef, 907 configurable: true 908 }); 909 } 910 function warnIfStringRefCannotBeAutoConverted(config) { 911 { 912 if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { 913 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); 914 if (!didWarnAboutStringRefs[componentName]) { 915 error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); 916 didWarnAboutStringRefs[componentName] = true; 917 } 918 } 919 } 920 } 921 var ReactElement = function(type, key, ref, self, source, owner, props) { 922 var element = { 923 // This tag allows us to uniquely identify this as a React Element 924 $$typeof: REACT_ELEMENT_TYPE, 925 // Built-in properties that belong on the element 926 type, 927 key, 928 ref, 929 props, 930 // Record the component responsible for creating this element. 931 _owner: owner 932 }; 933 { 934 element._store = {}; 935 Object.defineProperty(element._store, "validated", { 936 configurable: false, 937 enumerable: false, 938 writable: true, 939 value: false 940 }); 941 Object.defineProperty(element, "_self", { 942 configurable: false, 943 enumerable: false, 944 writable: false, 945 value: self 946 }); 947 Object.defineProperty(element, "_source", { 948 configurable: false, 949 enumerable: false, 950 writable: false, 951 value: source 952 }); 953 if (Object.freeze) { 954 Object.freeze(element.props); 955 Object.freeze(element); 956 } 957 } 958 return element; 959 }; 960 function createElement(type, config, children) { 961 var propName; 962 var props = {}; 963 var key = null; 964 var ref = null; 965 var self = null; 966 var source = null; 967 if (config != null) { 968 if (hasValidRef(config)) { 969 ref = config.ref; 970 { 971 warnIfStringRefCannotBeAutoConverted(config); 972 } 973 } 974 if (hasValidKey(config)) { 975 { 976 checkKeyStringCoercion(config.key); 977 } 978 key = "" + config.key; 979 } 980 self = config.__self === void 0 ? null : config.__self; 981 source = config.__source === void 0 ? null : config.__source; 982 for (propName in config) { 983 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { 984 props[propName] = config[propName]; 985 } 986 } 987 } 988 var childrenLength = arguments.length - 2; 989 if (childrenLength === 1) { 990 props.children = children; 991 } else if (childrenLength > 1) { 992 var childArray = Array(childrenLength); 993 for (var i = 0; i < childrenLength; i++) { 994 childArray[i] = arguments[i + 2]; 995 } 996 { 997 if (Object.freeze) { 998 Object.freeze(childArray); 999 } 1000 } 1001 props.children = childArray; 1002 } 1003 if (type && type.defaultProps) { 1004 var defaultProps = type.defaultProps; 1005 for (propName in defaultProps) { 1006 if (props[propName] === void 0) { 1007 props[propName] = defaultProps[propName]; 1008 } 1009 } 1010 } 1011 { 1012 if (key || ref) { 1013 var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; 1014 if (key) { 1015 defineKeyPropWarningGetter(props, displayName); 1016 } 1017 if (ref) { 1018 defineRefPropWarningGetter(props, displayName); 1019 } 1020 } 1021 } 1022 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); 1023 } 1024 function cloneAndReplaceKey(oldElement, newKey) { 1025 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); 1026 return newElement; 1027 } 1028 function cloneElement(element, config, children) { 1029 if (element === null || element === void 0) { 1030 throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); 1031 } 1032 var propName; 1033 var props = assign({}, element.props); 1034 var key = element.key; 1035 var ref = element.ref; 1036 var self = element._self; 1037 var source = element._source; 1038 var owner = element._owner; 1039 if (config != null) { 1040 if (hasValidRef(config)) { 1041 ref = config.ref; 1042 owner = ReactCurrentOwner.current; 1043 } 1044 if (hasValidKey(config)) { 1045 { 1046 checkKeyStringCoercion(config.key); 1047 } 1048 key = "" + config.key; 1049 } 1050 var defaultProps; 1051 if (element.type && element.type.defaultProps) { 1052 defaultProps = element.type.defaultProps; 1053 } 1054 for (propName in config) { 1055 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { 1056 if (config[propName] === void 0 && defaultProps !== void 0) { 1057 props[propName] = defaultProps[propName]; 1058 } else { 1059 props[propName] = config[propName]; 1060 } 1061 } 1062 } 1063 } 1064 var childrenLength = arguments.length - 2; 1065 if (childrenLength === 1) { 1066 props.children = children; 1067 } else if (childrenLength > 1) { 1068 var childArray = Array(childrenLength); 1069 for (var i = 0; i < childrenLength; i++) { 1070 childArray[i] = arguments[i + 2]; 1071 } 1072 props.children = childArray; 1073 } 1074 return ReactElement(element.type, key, ref, self, source, owner, props); 1075 } 1076 function isValidElement(object) { 1077 return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; 1078 } 1079 var SEPARATOR = "."; 1080 var SUBSEPARATOR = ":"; 1081 function escape(key) { 1082 var escapeRegex = /[=:]/g; 1083 var escaperLookup = { 1084 "=": "=0", 1085 ":": "=2" 1086 }; 1087 var escapedString = key.replace(escapeRegex, function(match) { 1088 return escaperLookup[match]; 1089 }); 1090 return "$" + escapedString; 1091 } 1092 var didWarnAboutMaps = false; 1093 var userProvidedKeyEscapeRegex = /\/+/g; 1094 function escapeUserProvidedKey(text) { 1095 return text.replace(userProvidedKeyEscapeRegex, "$&/"); 1096 } 1097 function getElementKey(element, index) { 1098 if (typeof element === "object" && element !== null && element.key != null) { 1099 { 1100 checkKeyStringCoercion(element.key); 1101 } 1102 return escape("" + element.key); 1103 } 1104 return index.toString(36); 1105 } 1106 function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { 1107 var type = typeof children; 1108 if (type === "undefined" || type === "boolean") { 1109 children = null; 1110 } 1111 var invokeCallback = false; 1112 if (children === null) { 1113 invokeCallback = true; 1114 } else { 1115 switch (type) { 1116 case "string": 1117 case "number": 1118 invokeCallback = true; 1119 break; 1120 case "object": 1121 switch (children.$$typeof) { 1122 case REACT_ELEMENT_TYPE: 1123 case REACT_PORTAL_TYPE: 1124 invokeCallback = true; 1125 } 1126 } 1127 } 1128 if (invokeCallback) { 1129 var _child = children; 1130 var mappedChild = callback(_child); 1131 var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; 1132 if (isArray(mappedChild)) { 1133 var escapedChildKey = ""; 1134 if (childKey != null) { 1135 escapedChildKey = escapeUserProvidedKey(childKey) + "/"; 1136 } 1137 mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { 1138 return c; 1139 }); 1140 } else if (mappedChild != null) { 1141 if (isValidElement(mappedChild)) { 1142 { 1143 if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) { 1144 checkKeyStringCoercion(mappedChild.key); 1145 } 1146 } 1147 mappedChild = cloneAndReplaceKey( 1148 mappedChild, 1149 // Keep both the (mapped) and old keys if they differ, just as 1150 // traverseAllChildren used to do for objects as children 1151 escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key 1152 (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? ( 1153 // $FlowFixMe Flow incorrectly thinks existing element's key can be a number 1154 // eslint-disable-next-line react-internal/safe-string-coercion 1155 escapeUserProvidedKey("" + mappedChild.key) + "/" 1156 ) : "") + childKey 1157 ); 1158 } 1159 array.push(mappedChild); 1160 } 1161 return 1; 1162 } 1163 var child; 1164 var nextName; 1165 var subtreeCount = 0; 1166 var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; 1167 if (isArray(children)) { 1168 for (var i = 0; i < children.length; i++) { 1169 child = children[i]; 1170 nextName = nextNamePrefix + getElementKey(child, i); 1171 subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); 1172 } 1173 } else { 1174 var iteratorFn = getIteratorFn(children); 1175 if (typeof iteratorFn === "function") { 1176 var iterableChildren = children; 1177 { 1178 if (iteratorFn === iterableChildren.entries) { 1179 if (!didWarnAboutMaps) { 1180 warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); 1181 } 1182 didWarnAboutMaps = true; 1183 } 1184 } 1185 var iterator = iteratorFn.call(iterableChildren); 1186 var step; 1187 var ii = 0; 1188 while (!(step = iterator.next()).done) { 1189 child = step.value; 1190 nextName = nextNamePrefix + getElementKey(child, ii++); 1191 subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); 1192 } 1193 } else if (type === "object") { 1194 var childrenString = String(children); 1195 throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); 1196 } 1197 } 1198 return subtreeCount; 1199 } 1200 function mapChildren(children, func, context) { 1201 if (children == null) { 1202 return children; 1203 } 1204 var result = []; 1205 var count = 0; 1206 mapIntoArray(children, result, "", "", function(child) { 1207 return func.call(context, child, count++); 1208 }); 1209 return result; 1210 } 1211 function countChildren(children) { 1212 var n = 0; 1213 mapChildren(children, function() { 1214 n++; 1215 }); 1216 return n; 1217 } 1218 function forEachChildren(children, forEachFunc, forEachContext) { 1219 mapChildren(children, function() { 1220 forEachFunc.apply(this, arguments); 1221 }, forEachContext); 1222 } 1223 function toArray(children) { 1224 return mapChildren(children, function(child) { 1225 return child; 1226 }) || []; 1227 } 1228 function onlyChild(children) { 1229 if (!isValidElement(children)) { 1230 throw new Error("React.Children.only expected to receive a single React element child."); 1231 } 1232 return children; 1233 } 1234 function createContext(defaultValue) { 1235 var context = { 1236 $$typeof: REACT_CONTEXT_TYPE, 1237 // As a workaround to support multiple concurrent renderers, we categorize 1238 // some renderers as primary and others as secondary. We only expect 1239 // there to be two concurrent renderers at most: React Native (primary) and 1240 // Fabric (secondary); React DOM (primary) and React ART (secondary). 1241 // Secondary renderers store their context values on separate fields. 1242 _currentValue: defaultValue, 1243 _currentValue2: defaultValue, 1244 // Used to track how many concurrent renderers this context currently 1245 // supports within in a single renderer. Such as parallel server rendering. 1246 _threadCount: 0, 1247 // These are circular 1248 Provider: null, 1249 Consumer: null, 1250 // Add these to use same hidden class in VM as ServerContext 1251 _defaultValue: null, 1252 _globalName: null 1253 }; 1254 context.Provider = { 1255 $$typeof: REACT_PROVIDER_TYPE, 1256 _context: context 1257 }; 1258 var hasWarnedAboutUsingNestedContextConsumers = false; 1259 var hasWarnedAboutUsingConsumerProvider = false; 1260 var hasWarnedAboutDisplayNameOnConsumer = false; 1261 { 1262 var Consumer = { 1263 $$typeof: REACT_CONTEXT_TYPE, 1264 _context: context 1265 }; 1266 Object.defineProperties(Consumer, { 1267 Provider: { 1268 get: function() { 1269 if (!hasWarnedAboutUsingConsumerProvider) { 1270 hasWarnedAboutUsingConsumerProvider = true; 1271 error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?"); 1272 } 1273 return context.Provider; 1274 }, 1275 set: function(_Provider) { 1276 context.Provider = _Provider; 1277 } 1278 }, 1279 _currentValue: { 1280 get: function() { 1281 return context._currentValue; 1282 }, 1283 set: function(_currentValue) { 1284 context._currentValue = _currentValue; 1285 } 1286 }, 1287 _currentValue2: { 1288 get: function() { 1289 return context._currentValue2; 1290 }, 1291 set: function(_currentValue2) { 1292 context._currentValue2 = _currentValue2; 1293 } 1294 }, 1295 _threadCount: { 1296 get: function() { 1297 return context._threadCount; 1298 }, 1299 set: function(_threadCount) { 1300 context._threadCount = _threadCount; 1301 } 1302 }, 1303 Consumer: { 1304 get: function() { 1305 if (!hasWarnedAboutUsingNestedContextConsumers) { 1306 hasWarnedAboutUsingNestedContextConsumers = true; 1307 error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"); 1308 } 1309 return context.Consumer; 1310 } 1311 }, 1312 displayName: { 1313 get: function() { 1314 return context.displayName; 1315 }, 1316 set: function(displayName) { 1317 if (!hasWarnedAboutDisplayNameOnConsumer) { 1318 warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); 1319 hasWarnedAboutDisplayNameOnConsumer = true; 1320 } 1321 } 1322 } 1323 }); 1324 context.Consumer = Consumer; 1325 } 1326 { 1327 context._currentRenderer = null; 1328 context._currentRenderer2 = null; 1329 } 1330 return context; 1331 } 1332 var Uninitialized = -1; 1333 var Pending = 0; 1334 var Resolved = 1; 1335 var Rejected = 2; 1336 function lazyInitializer(payload) { 1337 if (payload._status === Uninitialized) { 1338 var ctor = payload._result; 1339 var thenable = ctor(); 1340 thenable.then(function(moduleObject2) { 1341 if (payload._status === Pending || payload._status === Uninitialized) { 1342 var resolved = payload; 1343 resolved._status = Resolved; 1344 resolved._result = moduleObject2; 1345 } 1346 }, function(error2) { 1347 if (payload._status === Pending || payload._status === Uninitialized) { 1348 var rejected = payload; 1349 rejected._status = Rejected; 1350 rejected._result = error2; 1351 } 1352 }); 1353 if (payload._status === Uninitialized) { 1354 var pending = payload; 1355 pending._status = Pending; 1356 pending._result = thenable; 1357 } 1358 } 1359 if (payload._status === Resolved) { 1360 var moduleObject = payload._result; 1361 { 1362 if (moduleObject === void 0) { 1363 error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject); 1364 } 1365 } 1366 { 1367 if (!("default" in moduleObject)) { 1368 error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); 1369 } 1370 } 1371 return moduleObject.default; 1372 } else { 1373 throw payload._result; 1374 } 1375 } 1376 function lazy(ctor) { 1377 var payload = { 1378 // We use these fields to store the result. 1379 _status: Uninitialized, 1380 _result: ctor 1381 }; 1382 var lazyType = { 1383 $$typeof: REACT_LAZY_TYPE, 1384 _payload: payload, 1385 _init: lazyInitializer 1386 }; 1387 { 1388 var defaultProps; 1389 var propTypes; 1390 Object.defineProperties(lazyType, { 1391 defaultProps: { 1392 configurable: true, 1393 get: function() { 1394 return defaultProps; 1395 }, 1396 set: function(newDefaultProps) { 1397 error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); 1398 defaultProps = newDefaultProps; 1399 Object.defineProperty(lazyType, "defaultProps", { 1400 enumerable: true 1401 }); 1402 } 1403 }, 1404 propTypes: { 1405 configurable: true, 1406 get: function() { 1407 return propTypes; 1408 }, 1409 set: function(newPropTypes) { 1410 error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); 1411 propTypes = newPropTypes; 1412 Object.defineProperty(lazyType, "propTypes", { 1413 enumerable: true 1414 }); 1415 } 1416 } 1417 }); 1418 } 1419 return lazyType; 1420 } 1421 function forwardRef(render) { 1422 { 1423 if (render != null && render.$$typeof === REACT_MEMO_TYPE) { 1424 error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); 1425 } else if (typeof render !== "function") { 1426 error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render); 1427 } else { 1428 if (render.length !== 0 && render.length !== 2) { 1429 error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); 1430 } 1431 } 1432 if (render != null) { 1433 if (render.defaultProps != null || render.propTypes != null) { 1434 error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); 1435 } 1436 } 1437 } 1438 var elementType = { 1439 $$typeof: REACT_FORWARD_REF_TYPE, 1440 render 1441 }; 1442 { 1443 var ownName; 1444 Object.defineProperty(elementType, "displayName", { 1445 enumerable: false, 1446 configurable: true, 1447 get: function() { 1448 return ownName; 1449 }, 1450 set: function(name) { 1451 ownName = name; 1452 if (!render.name && !render.displayName) { 1453 render.displayName = name; 1454 } 1455 } 1456 }); 1457 } 1458 return elementType; 1459 } 1460 var REACT_MODULE_REFERENCE; 1461 { 1462 REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); 1463 } 1464 function isValidElementType(type) { 1465 if (typeof type === "string" || typeof type === "function") { 1466 return true; 1467 } 1468 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { 1469 return true; 1470 } 1471 if (typeof type === "object" && type !== null) { 1472 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object 1473 // types supported by any Flight configuration anywhere since 1474 // we don't know which Flight build this will end up being used 1475 // with. 1476 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { 1477 return true; 1478 } 1479 } 1480 return false; 1481 } 1482 function memo(type, compare) { 1483 { 1484 if (!isValidElementType(type)) { 1485 error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); 1486 } 1487 } 1488 var elementType = { 1489 $$typeof: REACT_MEMO_TYPE, 1490 type, 1491 compare: compare === void 0 ? null : compare 1492 }; 1493 { 1494 var ownName; 1495 Object.defineProperty(elementType, "displayName", { 1496 enumerable: false, 1497 configurable: true, 1498 get: function() { 1499 return ownName; 1500 }, 1501 set: function(name) { 1502 ownName = name; 1503 if (!type.name && !type.displayName) { 1504 type.displayName = name; 1505 } 1506 } 1507 }); 1508 } 1509 return elementType; 1510 } 1511 function resolveDispatcher() { 1512 var dispatcher = ReactCurrentDispatcher.current; 1513 { 1514 if (dispatcher === null) { 1515 error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); 1516 } 1517 } 1518 return dispatcher; 1519 } 1520 function useContext(Context) { 1521 var dispatcher = resolveDispatcher(); 1522 { 1523 if (Context._context !== void 0) { 1524 var realContext = Context._context; 1525 if (realContext.Consumer === Context) { 1526 error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); 1527 } else if (realContext.Provider === Context) { 1528 error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); 1529 } 1530 } 1531 } 1532 return dispatcher.useContext(Context); 1533 } 1534 function useState(initialState) { 1535 var dispatcher = resolveDispatcher(); 1536 return dispatcher.useState(initialState); 1537 } 1538 function useReducer(reducer, initialArg, init) { 1539 var dispatcher = resolveDispatcher(); 1540 return dispatcher.useReducer(reducer, initialArg, init); 1541 } 1542 function useRef(initialValue) { 1543 var dispatcher = resolveDispatcher(); 1544 return dispatcher.useRef(initialValue); 1545 } 1546 function useEffect(create, deps) { 1547 var dispatcher = resolveDispatcher(); 1548 return dispatcher.useEffect(create, deps); 1549 } 1550 function useInsertionEffect(create, deps) { 1551 var dispatcher = resolveDispatcher(); 1552 return dispatcher.useInsertionEffect(create, deps); 1553 } 1554 function useLayoutEffect(create, deps) { 1555 var dispatcher = resolveDispatcher(); 1556 return dispatcher.useLayoutEffect(create, deps); 1557 } 1558 function useCallback(callback, deps) { 1559 var dispatcher = resolveDispatcher(); 1560 return dispatcher.useCallback(callback, deps); 1561 } 1562 function useMemo(create, deps) { 1563 var dispatcher = resolveDispatcher(); 1564 return dispatcher.useMemo(create, deps); 1565 } 1566 function useImperativeHandle(ref, create, deps) { 1567 var dispatcher = resolveDispatcher(); 1568 return dispatcher.useImperativeHandle(ref, create, deps); 1569 } 1570 function useDebugValue(value, formatterFn) { 1571 { 1572 var dispatcher = resolveDispatcher(); 1573 return dispatcher.useDebugValue(value, formatterFn); 1574 } 1575 } 1576 function useTransition() { 1577 var dispatcher = resolveDispatcher(); 1578 return dispatcher.useTransition(); 1579 } 1580 function useDeferredValue(value) { 1581 var dispatcher = resolveDispatcher(); 1582 return dispatcher.useDeferredValue(value); 1583 } 1584 function useId() { 1585 var dispatcher = resolveDispatcher(); 1586 return dispatcher.useId(); 1587 } 1588 function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { 1589 var dispatcher = resolveDispatcher(); 1590 return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); 1591 } 1592 var disabledDepth = 0; 1593 var prevLog; 1594 var prevInfo; 1595 var prevWarn; 1596 var prevError; 1597 var prevGroup; 1598 var prevGroupCollapsed; 1599 var prevGroupEnd; 1600 function disabledLog() { 1601 } 1602 disabledLog.__reactDisabledLog = true; 1603 function disableLogs() { 1604 { 1605 if (disabledDepth === 0) { 1606 prevLog = console.log; 1607 prevInfo = console.info; 1608 prevWarn = console.warn; 1609 prevError = console.error; 1610 prevGroup = console.group; 1611 prevGroupCollapsed = console.groupCollapsed; 1612 prevGroupEnd = console.groupEnd; 1613 var props = { 1614 configurable: true, 1615 enumerable: true, 1616 value: disabledLog, 1617 writable: true 1618 }; 1619 Object.defineProperties(console, { 1620 info: props, 1621 log: props, 1622 warn: props, 1623 error: props, 1624 group: props, 1625 groupCollapsed: props, 1626 groupEnd: props 1627 }); 1628 } 1629 disabledDepth++; 1630 } 1631 } 1632 function reenableLogs() { 1633 { 1634 disabledDepth--; 1635 if (disabledDepth === 0) { 1636 var props = { 1637 configurable: true, 1638 enumerable: true, 1639 writable: true 1640 }; 1641 Object.defineProperties(console, { 1642 log: assign({}, props, { 1643 value: prevLog 1644 }), 1645 info: assign({}, props, { 1646 value: prevInfo 1647 }), 1648 warn: assign({}, props, { 1649 value: prevWarn 1650 }), 1651 error: assign({}, props, { 1652 value: prevError 1653 }), 1654 group: assign({}, props, { 1655 value: prevGroup 1656 }), 1657 groupCollapsed: assign({}, props, { 1658 value: prevGroupCollapsed 1659 }), 1660 groupEnd: assign({}, props, { 1661 value: prevGroupEnd 1662 }) 1663 }); 1664 } 1665 if (disabledDepth < 0) { 1666 error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); 1667 } 1668 } 1669 } 1670 var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; 1671 var prefix; 1672 function describeBuiltInComponentFrame(name, source, ownerFn) { 1673 { 1674 if (prefix === void 0) { 1675 try { 1676 throw Error(); 1677 } catch (x) { 1678 var match = x.stack.trim().match(/\n( *(at )?)/); 1679 prefix = match && match[1] || ""; 1680 } 1681 } 1682 return "\n" + prefix + name; 1683 } 1684 } 1685 var reentry = false; 1686 var componentFrameCache; 1687 { 1688 var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; 1689 componentFrameCache = new PossiblyWeakMap(); 1690 } 1691 function describeNativeComponentFrame(fn, construct) { 1692 if (!fn || reentry) { 1693 return ""; 1694 } 1695 { 1696 var frame = componentFrameCache.get(fn); 1697 if (frame !== void 0) { 1698 return frame; 1699 } 1700 } 1701 var control; 1702 reentry = true; 1703 var previousPrepareStackTrace = Error.prepareStackTrace; 1704 Error.prepareStackTrace = void 0; 1705 var previousDispatcher; 1706 { 1707 previousDispatcher = ReactCurrentDispatcher$1.current; 1708 ReactCurrentDispatcher$1.current = null; 1709 disableLogs(); 1710 } 1711 try { 1712 if (construct) { 1713 var Fake = function() { 1714 throw Error(); 1715 }; 1716 Object.defineProperty(Fake.prototype, "props", { 1717 set: function() { 1718 throw Error(); 1719 } 1720 }); 1721 if (typeof Reflect === "object" && Reflect.construct) { 1722 try { 1723 Reflect.construct(Fake, []); 1724 } catch (x) { 1725 control = x; 1726 } 1727 Reflect.construct(fn, [], Fake); 1728 } else { 1729 try { 1730 Fake.call(); 1731 } catch (x) { 1732 control = x; 1733 } 1734 fn.call(Fake.prototype); 1735 } 1736 } else { 1737 try { 1738 throw Error(); 1739 } catch (x) { 1740 control = x; 1741 } 1742 fn(); 1743 } 1744 } catch (sample) { 1745 if (sample && control && typeof sample.stack === "string") { 1746 var sampleLines = sample.stack.split("\n"); 1747 var controlLines = control.stack.split("\n"); 1748 var s = sampleLines.length - 1; 1749 var c = controlLines.length - 1; 1750 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { 1751 c--; 1752 } 1753 for (; s >= 1 && c >= 0; s--, c--) { 1754 if (sampleLines[s] !== controlLines[c]) { 1755 if (s !== 1 || c !== 1) { 1756 do { 1757 s--; 1758 c--; 1759 if (c < 0 || sampleLines[s] !== controlLines[c]) { 1760 var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); 1761 if (fn.displayName && _frame.includes("<anonymous>")) { 1762 _frame = _frame.replace("<anonymous>", fn.displayName); 1763 } 1764 { 1765 if (typeof fn === "function") { 1766 componentFrameCache.set(fn, _frame); 1767 } 1768 } 1769 return _frame; 1770 } 1771 } while (s >= 1 && c >= 0); 1772 } 1773 break; 1774 } 1775 } 1776 } 1777 } finally { 1778 reentry = false; 1779 { 1780 ReactCurrentDispatcher$1.current = previousDispatcher; 1781 reenableLogs(); 1782 } 1783 Error.prepareStackTrace = previousPrepareStackTrace; 1784 } 1785 var name = fn ? fn.displayName || fn.name : ""; 1786 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; 1787 { 1788 if (typeof fn === "function") { 1789 componentFrameCache.set(fn, syntheticFrame); 1790 } 1791 } 1792 return syntheticFrame; 1793 } 1794 function describeFunctionComponentFrame(fn, source, ownerFn) { 1795 { 1796 return describeNativeComponentFrame(fn, false); 1797 } 1798 } 1799 function shouldConstruct(Component2) { 1800 var prototype = Component2.prototype; 1801 return !!(prototype && prototype.isReactComponent); 1802 } 1803 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { 1804 if (type == null) { 1805 return ""; 1806 } 1807 if (typeof type === "function") { 1808 { 1809 return describeNativeComponentFrame(type, shouldConstruct(type)); 1810 } 1811 } 1812 if (typeof type === "string") { 1813 return describeBuiltInComponentFrame(type); 1814 } 1815 switch (type) { 1816 case REACT_SUSPENSE_TYPE: 1817 return describeBuiltInComponentFrame("Suspense"); 1818 case REACT_SUSPENSE_LIST_TYPE: 1819 return describeBuiltInComponentFrame("SuspenseList"); 1820 } 1821 if (typeof type === "object") { 1822 switch (type.$$typeof) { 1823 case REACT_FORWARD_REF_TYPE: 1824 return describeFunctionComponentFrame(type.render); 1825 case REACT_MEMO_TYPE: 1826 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); 1827 case REACT_LAZY_TYPE: { 1828 var lazyComponent = type; 1829 var payload = lazyComponent._payload; 1830 var init = lazyComponent._init; 1831 try { 1832 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); 1833 } catch (x) { 1834 } 1835 } 1836 } 1837 } 1838 return ""; 1839 } 1840 var loggedTypeFailures = {}; 1841 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; 1842 function setCurrentlyValidatingElement(element) { 1843 { 1844 if (element) { 1845 var owner = element._owner; 1846 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); 1847 ReactDebugCurrentFrame$1.setExtraStackFrame(stack); 1848 } else { 1849 ReactDebugCurrentFrame$1.setExtraStackFrame(null); 1850 } 1851 } 1852 } 1853 function checkPropTypes(typeSpecs, values, location, componentName, element) { 1854 { 1855 var has = Function.call.bind(hasOwnProperty); 1856 for (var typeSpecName in typeSpecs) { 1857 if (has(typeSpecs, typeSpecName)) { 1858 var error$1 = void 0; 1859 try { 1860 if (typeof typeSpecs[typeSpecName] !== "function") { 1861 var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); 1862 err.name = "Invariant Violation"; 1863 throw err; 1864 } 1865 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); 1866 } catch (ex) { 1867 error$1 = ex; 1868 } 1869 if (error$1 && !(error$1 instanceof Error)) { 1870 setCurrentlyValidatingElement(element); 1871 error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); 1872 setCurrentlyValidatingElement(null); 1873 } 1874 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { 1875 loggedTypeFailures[error$1.message] = true; 1876 setCurrentlyValidatingElement(element); 1877 error("Failed %s type: %s", location, error$1.message); 1878 setCurrentlyValidatingElement(null); 1879 } 1880 } 1881 } 1882 } 1883 } 1884 function setCurrentlyValidatingElement$1(element) { 1885 { 1886 if (element) { 1887 var owner = element._owner; 1888 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); 1889 setExtraStackFrame(stack); 1890 } else { 1891 setExtraStackFrame(null); 1892 } 1893 } 1894 } 1895 var propTypesMisspellWarningShown; 1896 { 1897 propTypesMisspellWarningShown = false; 1898 } 1899 function getDeclarationErrorAddendum() { 1900 if (ReactCurrentOwner.current) { 1901 var name = getComponentNameFromType(ReactCurrentOwner.current.type); 1902 if (name) { 1903 return "\n\nCheck the render method of `" + name + "`."; 1904 } 1905 } 1906 return ""; 1907 } 1908 function getSourceInfoErrorAddendum(source) { 1909 if (source !== void 0) { 1910 var fileName = source.fileName.replace(/^.*[\\\/]/, ""); 1911 var lineNumber = source.lineNumber; 1912 return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; 1913 } 1914 return ""; 1915 } 1916 function getSourceInfoErrorAddendumForProps(elementProps) { 1917 if (elementProps !== null && elementProps !== void 0) { 1918 return getSourceInfoErrorAddendum(elementProps.__source); 1919 } 1920 return ""; 1921 } 1922 var ownerHasKeyUseWarning = {}; 1923 function getCurrentComponentErrorInfo(parentType) { 1924 var info = getDeclarationErrorAddendum(); 1925 if (!info) { 1926 var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; 1927 if (parentName) { 1928 info = "\n\nCheck the top-level render call using <" + parentName + ">."; 1929 } 1930 } 1931 return info; 1932 } 1933 function validateExplicitKey(element, parentType) { 1934 if (!element._store || element._store.validated || element.key != null) { 1935 return; 1936 } 1937 element._store.validated = true; 1938 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); 1939 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { 1940 return; 1941 } 1942 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; 1943 var childOwner = ""; 1944 if (element && element._owner && element._owner !== ReactCurrentOwner.current) { 1945 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; 1946 } 1947 { 1948 setCurrentlyValidatingElement$1(element); 1949 error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); 1950 setCurrentlyValidatingElement$1(null); 1951 } 1952 } 1953 function validateChildKeys(node, parentType) { 1954 if (typeof node !== "object") { 1955 return; 1956 } 1957 if (isArray(node)) { 1958 for (var i = 0; i < node.length; i++) { 1959 var child = node[i]; 1960 if (isValidElement(child)) { 1961 validateExplicitKey(child, parentType); 1962 } 1963 } 1964 } else if (isValidElement(node)) { 1965 if (node._store) { 1966 node._store.validated = true; 1967 } 1968 } else if (node) { 1969 var iteratorFn = getIteratorFn(node); 1970 if (typeof iteratorFn === "function") { 1971 if (iteratorFn !== node.entries) { 1972 var iterator = iteratorFn.call(node); 1973 var step; 1974 while (!(step = iterator.next()).done) { 1975 if (isValidElement(step.value)) { 1976 validateExplicitKey(step.value, parentType); 1977 } 1978 } 1979 } 1980 } 1981 } 1982 } 1983 function validatePropTypes(element) { 1984 { 1985 var type = element.type; 1986 if (type === null || type === void 0 || typeof type === "string") { 1987 return; 1988 } 1989 var propTypes; 1990 if (typeof type === "function") { 1991 propTypes = type.propTypes; 1992 } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. 1993 // Inner props are checked in the reconciler. 1994 type.$$typeof === REACT_MEMO_TYPE)) { 1995 propTypes = type.propTypes; 1996 } else { 1997 return; 1998 } 1999 if (propTypes) { 2000 var name = getComponentNameFromType(type); 2001 checkPropTypes(propTypes, element.props, "prop", name, element); 2002 } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { 2003 propTypesMisspellWarningShown = true; 2004 var _name = getComponentNameFromType(type); 2005 error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); 2006 } 2007 if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { 2008 error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); 2009 } 2010 } 2011 } 2012 function validateFragmentProps(fragment) { 2013 { 2014 var keys = Object.keys(fragment.props); 2015 for (var i = 0; i < keys.length; i++) { 2016 var key = keys[i]; 2017 if (key !== "children" && key !== "key") { 2018 setCurrentlyValidatingElement$1(fragment); 2019 error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); 2020 setCurrentlyValidatingElement$1(null); 2021 break; 2022 } 2023 } 2024 if (fragment.ref !== null) { 2025 setCurrentlyValidatingElement$1(fragment); 2026 error("Invalid attribute `ref` supplied to `React.Fragment`."); 2027 setCurrentlyValidatingElement$1(null); 2028 } 2029 } 2030 } 2031 function createElementWithValidation(type, props, children) { 2032 var validType = isValidElementType(type); 2033 if (!validType) { 2034 var info = ""; 2035 if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { 2036 info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; 2037 } 2038 var sourceInfo = getSourceInfoErrorAddendumForProps(props); 2039 if (sourceInfo) { 2040 info += sourceInfo; 2041 } else { 2042 info += getDeclarationErrorAddendum(); 2043 } 2044 var typeString; 2045 if (type === null) { 2046 typeString = "null"; 2047 } else if (isArray(type)) { 2048 typeString = "array"; 2049 } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { 2050 typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; 2051 info = " Did you accidentally export a JSX literal instead of a component?"; 2052 } else { 2053 typeString = typeof type; 2054 } 2055 { 2056 error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); 2057 } 2058 } 2059 var element = createElement.apply(this, arguments); 2060 if (element == null) { 2061 return element; 2062 } 2063 if (validType) { 2064 for (var i = 2; i < arguments.length; i++) { 2065 validateChildKeys(arguments[i], type); 2066 } 2067 } 2068 if (type === REACT_FRAGMENT_TYPE) { 2069 validateFragmentProps(element); 2070 } else { 2071 validatePropTypes(element); 2072 } 2073 return element; 2074 } 2075 var didWarnAboutDeprecatedCreateFactory = false; 2076 function createFactoryWithValidation(type) { 2077 var validatedFactory = createElementWithValidation.bind(null, type); 2078 validatedFactory.type = type; 2079 { 2080 if (!didWarnAboutDeprecatedCreateFactory) { 2081 didWarnAboutDeprecatedCreateFactory = true; 2082 warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); 2083 } 2084 Object.defineProperty(validatedFactory, "type", { 2085 enumerable: false, 2086 get: function() { 2087 warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); 2088 Object.defineProperty(this, "type", { 2089 value: type 2090 }); 2091 return type; 2092 } 2093 }); 2094 } 2095 return validatedFactory; 2096 } 2097 function cloneElementWithValidation(element, props, children) { 2098 var newElement = cloneElement.apply(this, arguments); 2099 for (var i = 2; i < arguments.length; i++) { 2100 validateChildKeys(arguments[i], newElement.type); 2101 } 2102 validatePropTypes(newElement); 2103 return newElement; 2104 } 2105 function startTransition(scope, options) { 2106 var prevTransition = ReactCurrentBatchConfig.transition; 2107 ReactCurrentBatchConfig.transition = {}; 2108 var currentTransition = ReactCurrentBatchConfig.transition; 2109 { 2110 ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set(); 2111 } 2112 try { 2113 scope(); 2114 } finally { 2115 ReactCurrentBatchConfig.transition = prevTransition; 2116 { 2117 if (prevTransition === null && currentTransition._updatedFibers) { 2118 var updatedFibersCount = currentTransition._updatedFibers.size; 2119 if (updatedFibersCount > 10) { 2120 warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."); 2121 } 2122 currentTransition._updatedFibers.clear(); 2123 } 2124 } 2125 } 2126 } 2127 var didWarnAboutMessageChannel = false; 2128 var enqueueTaskImpl = null; 2129 function enqueueTask(task) { 2130 if (enqueueTaskImpl === null) { 2131 try { 2132 var requireString = ("require" + Math.random()).slice(0, 7); 2133 var nodeRequire = module && module[requireString]; 2134 enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate; 2135 } catch (_err) { 2136 enqueueTaskImpl = function(callback) { 2137 { 2138 if (didWarnAboutMessageChannel === false) { 2139 didWarnAboutMessageChannel = true; 2140 if (typeof MessageChannel === "undefined") { 2141 error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."); 2142 } 2143 } 2144 } 2145 var channel = new MessageChannel(); 2146 channel.port1.onmessage = callback; 2147 channel.port2.postMessage(void 0); 2148 }; 2149 } 2150 } 2151 return enqueueTaskImpl(task); 2152 } 2153 var actScopeDepth = 0; 2154 var didWarnNoAwaitAct = false; 2155 function act(callback) { 2156 { 2157 var prevActScopeDepth = actScopeDepth; 2158 actScopeDepth++; 2159 if (ReactCurrentActQueue.current === null) { 2160 ReactCurrentActQueue.current = []; 2161 } 2162 var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy; 2163 var result; 2164 try { 2165 ReactCurrentActQueue.isBatchingLegacy = true; 2166 result = callback(); 2167 if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) { 2168 var queue = ReactCurrentActQueue.current; 2169 if (queue !== null) { 2170 ReactCurrentActQueue.didScheduleLegacyUpdate = false; 2171 flushActQueue(queue); 2172 } 2173 } 2174 } catch (error2) { 2175 popActScope(prevActScopeDepth); 2176 throw error2; 2177 } finally { 2178 ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; 2179 } 2180 if (result !== null && typeof result === "object" && typeof result.then === "function") { 2181 var thenableResult = result; 2182 var wasAwaited = false; 2183 var thenable = { 2184 then: function(resolve, reject) { 2185 wasAwaited = true; 2186 thenableResult.then(function(returnValue2) { 2187 popActScope(prevActScopeDepth); 2188 if (actScopeDepth === 0) { 2189 recursivelyFlushAsyncActWork(returnValue2, resolve, reject); 2190 } else { 2191 resolve(returnValue2); 2192 } 2193 }, function(error2) { 2194 popActScope(prevActScopeDepth); 2195 reject(error2); 2196 }); 2197 } 2198 }; 2199 { 2200 if (!didWarnNoAwaitAct && typeof Promise !== "undefined") { 2201 Promise.resolve().then(function() { 2202 }).then(function() { 2203 if (!wasAwaited) { 2204 didWarnNoAwaitAct = true; 2205 error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"); 2206 } 2207 }); 2208 } 2209 } 2210 return thenable; 2211 } else { 2212 var returnValue = result; 2213 popActScope(prevActScopeDepth); 2214 if (actScopeDepth === 0) { 2215 var _queue = ReactCurrentActQueue.current; 2216 if (_queue !== null) { 2217 flushActQueue(_queue); 2218 ReactCurrentActQueue.current = null; 2219 } 2220 var _thenable = { 2221 then: function(resolve, reject) { 2222 if (ReactCurrentActQueue.current === null) { 2223 ReactCurrentActQueue.current = []; 2224 recursivelyFlushAsyncActWork(returnValue, resolve, reject); 2225 } else { 2226 resolve(returnValue); 2227 } 2228 } 2229 }; 2230 return _thenable; 2231 } else { 2232 var _thenable2 = { 2233 then: function(resolve, reject) { 2234 resolve(returnValue); 2235 } 2236 }; 2237 return _thenable2; 2238 } 2239 } 2240 } 2241 } 2242 function popActScope(prevActScopeDepth) { 2243 { 2244 if (prevActScopeDepth !== actScopeDepth - 1) { 2245 error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "); 2246 } 2247 actScopeDepth = prevActScopeDepth; 2248 } 2249 } 2250 function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { 2251 { 2252 var queue = ReactCurrentActQueue.current; 2253 if (queue !== null) { 2254 try { 2255 flushActQueue(queue); 2256 enqueueTask(function() { 2257 if (queue.length === 0) { 2258 ReactCurrentActQueue.current = null; 2259 resolve(returnValue); 2260 } else { 2261 recursivelyFlushAsyncActWork(returnValue, resolve, reject); 2262 } 2263 }); 2264 } catch (error2) { 2265 reject(error2); 2266 } 2267 } else { 2268 resolve(returnValue); 2269 } 2270 } 2271 } 2272 var isFlushing = false; 2273 function flushActQueue(queue) { 2274 { 2275 if (!isFlushing) { 2276 isFlushing = true; 2277 var i = 0; 2278 try { 2279 for (; i < queue.length; i++) { 2280 var callback = queue[i]; 2281 do { 2282 callback = callback(true); 2283 } while (callback !== null); 2284 } 2285 queue.length = 0; 2286 } catch (error2) { 2287 queue = queue.slice(i + 1); 2288 throw error2; 2289 } finally { 2290 isFlushing = false; 2291 } 2292 } 2293 } 2294 } 2295 var createElement$1 = createElementWithValidation; 2296 var cloneElement$1 = cloneElementWithValidation; 2297 var createFactory = createFactoryWithValidation; 2298 var Children = { 2299 map: mapChildren, 2300 forEach: forEachChildren, 2301 count: countChildren, 2302 toArray, 2303 only: onlyChild 2304 }; 2305 exports.Children = Children; 2306 exports.Component = Component; 2307 exports.Fragment = REACT_FRAGMENT_TYPE; 2308 exports.Profiler = REACT_PROFILER_TYPE; 2309 exports.PureComponent = PureComponent; 2310 exports.StrictMode = REACT_STRICT_MODE_TYPE; 2311 exports.Suspense = REACT_SUSPENSE_TYPE; 2312 exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; 2313 exports.cloneElement = cloneElement$1; 2314 exports.createContext = createContext; 2315 exports.createElement = createElement$1; 2316 exports.createFactory = createFactory; 2317 exports.createRef = createRef; 2318 exports.forwardRef = forwardRef; 2319 exports.isValidElement = isValidElement; 2320 exports.lazy = lazy; 2321 exports.memo = memo; 2322 exports.startTransition = startTransition; 2323 exports.unstable_act = act; 2324 exports.useCallback = useCallback; 2325 exports.useContext = useContext; 2326 exports.useDebugValue = useDebugValue; 2327 exports.useDeferredValue = useDeferredValue; 2328 exports.useEffect = useEffect; 2329 exports.useId = useId; 2330 exports.useImperativeHandle = useImperativeHandle; 2331 exports.useInsertionEffect = useInsertionEffect; 2332 exports.useLayoutEffect = useLayoutEffect; 2333 exports.useMemo = useMemo; 2334 exports.useReducer = useReducer; 2335 exports.useRef = useRef; 2336 exports.useState = useState; 2337 exports.useSyncExternalStore = useSyncExternalStore; 2338 exports.useTransition = useTransition; 2339 exports.version = ReactVersion; 2340 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { 2341 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); 2342 } 2343 })(); 2344 } 2345 } 2346}); 2347
vendor: 259 bytes, lines 2348-2359
2348// node_modules/react/index.js 2349var require_react = __commonJS({ 2350 "node_modules/react/index.js"(exports, module) { 2351 "use strict"; 2352 if (false) { 2353 module.exports = null; 2354 } else { 2355 module.exports = require_react_development(); 2356 } 2357 } 2358}); 2359
vendor: 35,457 bytes, lines 2360-3237
2360// node_modules/react/cjs/react-jsx-runtime.development.js 2361var require_react_jsx_runtime_development = __commonJS({ 2362 "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) { 2363 "use strict"; 2364 if (true) { 2365 (function() { 2366 "use strict"; 2367 var React = require_react(); 2368 var REACT_ELEMENT_TYPE = Symbol.for("react.element"); 2369 var REACT_PORTAL_TYPE = Symbol.for("react.portal"); 2370 var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); 2371 var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); 2372 var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); 2373 var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); 2374 var REACT_CONTEXT_TYPE = Symbol.for("react.context"); 2375 var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); 2376 var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); 2377 var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); 2378 var REACT_MEMO_TYPE = Symbol.for("react.memo"); 2379 var REACT_LAZY_TYPE = Symbol.for("react.lazy"); 2380 var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); 2381 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; 2382 var FAUX_ITERATOR_SYMBOL = "@@iterator"; 2383 function getIteratorFn(maybeIterable) { 2384 if (maybeIterable === null || typeof maybeIterable !== "object") { 2385 return null; 2386 } 2387 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; 2388 if (typeof maybeIterator === "function") { 2389 return maybeIterator; 2390 } 2391 return null; 2392 } 2393 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; 2394 function error(format) { 2395 { 2396 { 2397 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 2398 args[_key2 - 1] = arguments[_key2]; 2399 } 2400 printWarning("error", format, args); 2401 } 2402 } 2403 } 2404 function printWarning(level, format, args) { 2405 { 2406 var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; 2407 var stack = ReactDebugCurrentFrame2.getStackAddendum(); 2408 if (stack !== "") { 2409 format += "%s"; 2410 args = args.concat([stack]); 2411 } 2412 var argsWithFormat = args.map(function(item) { 2413 return String(item); 2414 }); 2415 argsWithFormat.unshift("Warning: " + format); 2416 Function.prototype.apply.call(console[level], console, argsWithFormat); 2417 } 2418 } 2419 var enableScopeAPI = false; 2420 var enableCacheElement = false; 2421 var enableTransitionTracing = false; 2422 var enableLegacyHidden = false; 2423 var enableDebugTracing = false; 2424 var REACT_MODULE_REFERENCE; 2425 { 2426 REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); 2427 } 2428 function isValidElementType(type) { 2429 if (typeof type === "string" || typeof type === "function") { 2430 return true; 2431 } 2432 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { 2433 return true; 2434 } 2435 if (typeof type === "object" && type !== null) { 2436 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object 2437 // types supported by any Flight configuration anywhere since 2438 // we don't know which Flight build this will end up being used 2439 // with. 2440 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { 2441 return true; 2442 } 2443 } 2444 return false; 2445 } 2446 function getWrappedName(outerType, innerType, wrapperName) { 2447 var displayName = outerType.displayName; 2448 if (displayName) { 2449 return displayName; 2450 } 2451 var functionName = innerType.displayName || innerType.name || ""; 2452 return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; 2453 } 2454 function getContextName(type) { 2455 return type.displayName || "Context"; 2456 } 2457 function getComponentNameFromType(type) { 2458 if (type == null) { 2459 return null; 2460 } 2461 { 2462 if (typeof type.tag === "number") { 2463 error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); 2464 } 2465 } 2466 if (typeof type === "function") { 2467 return type.displayName || type.name || null; 2468 } 2469 if (typeof type === "string") { 2470 return type; 2471 } 2472 switch (type) { 2473 case REACT_FRAGMENT_TYPE: 2474 return "Fragment"; 2475 case REACT_PORTAL_TYPE: 2476 return "Portal"; 2477 case REACT_PROFILER_TYPE: 2478 return "Profiler"; 2479 case REACT_STRICT_MODE_TYPE: 2480 return "StrictMode"; 2481 case REACT_SUSPENSE_TYPE: 2482 return "Suspense"; 2483 case REACT_SUSPENSE_LIST_TYPE: 2484 return "SuspenseList"; 2485 } 2486 if (typeof type === "object") { 2487 switch (type.$$typeof) { 2488 case REACT_CONTEXT_TYPE: 2489 var context = type; 2490 return getContextName(context) + ".Consumer"; 2491 case REACT_PROVIDER_TYPE: 2492 var provider = type; 2493 return getContextName(provider._context) + ".Provider"; 2494 case REACT_FORWARD_REF_TYPE: 2495 return getWrappedName(type, type.render, "ForwardRef"); 2496 case REACT_MEMO_TYPE: 2497 var outerName = type.displayName || null; 2498 if (outerName !== null) { 2499 return outerName; 2500 } 2501 return getComponentNameFromType(type.type) || "Memo"; 2502 case REACT_LAZY_TYPE: { 2503 var lazyComponent = type; 2504 var payload = lazyComponent._payload; 2505 var init = lazyComponent._init; 2506 try { 2507 return getComponentNameFromType(init(payload)); 2508 } catch (x) { 2509 return null; 2510 } 2511 } 2512 } 2513 } 2514 return null; 2515 } 2516 var assign = Object.assign; 2517 var disabledDepth = 0; 2518 var prevLog; 2519 var prevInfo; 2520 var prevWarn; 2521 var prevError; 2522 var prevGroup; 2523 var prevGroupCollapsed; 2524 var prevGroupEnd; 2525 function disabledLog() { 2526 } 2527 disabledLog.__reactDisabledLog = true; 2528 function disableLogs() { 2529 { 2530 if (disabledDepth === 0) { 2531 prevLog = console.log; 2532 prevInfo = console.info; 2533 prevWarn = console.warn; 2534 prevError = console.error; 2535 prevGroup = console.group; 2536 prevGroupCollapsed = console.groupCollapsed; 2537 prevGroupEnd = console.groupEnd; 2538 var props = { 2539 configurable: true, 2540 enumerable: true, 2541 value: disabledLog, 2542 writable: true 2543 }; 2544 Object.defineProperties(console, { 2545 info: props, 2546 log: props, 2547 warn: props, 2548 error: props, 2549 group: props, 2550 groupCollapsed: props, 2551 groupEnd: props 2552 }); 2553 } 2554 disabledDepth++; 2555 } 2556 } 2557 function reenableLogs() { 2558 { 2559 disabledDepth--; 2560 if (disabledDepth === 0) { 2561 var props = { 2562 configurable: true, 2563 enumerable: true, 2564 writable: true 2565 }; 2566 Object.defineProperties(console, { 2567 log: assign({}, props, { 2568 value: prevLog 2569 }), 2570 info: assign({}, props, { 2571 value: prevInfo 2572 }), 2573 warn: assign({}, props, { 2574 value: prevWarn 2575 }), 2576 error: assign({}, props, { 2577 value: prevError 2578 }), 2579 group: assign({}, props, { 2580 value: prevGroup 2581 }), 2582 groupCollapsed: assign({}, props, { 2583 value: prevGroupCollapsed 2584 }), 2585 groupEnd: assign({}, props, { 2586 value: prevGroupEnd 2587 }) 2588 }); 2589 } 2590 if (disabledDepth < 0) { 2591 error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); 2592 } 2593 } 2594 } 2595 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; 2596 var prefix; 2597 function describeBuiltInComponentFrame(name, source, ownerFn) { 2598 { 2599 if (prefix === void 0) { 2600 try { 2601 throw Error(); 2602 } catch (x) { 2603 var match = x.stack.trim().match(/\n( *(at )?)/); 2604 prefix = match && match[1] || ""; 2605 } 2606 } 2607 return "\n" + prefix + name; 2608 } 2609 } 2610 var reentry = false; 2611 var componentFrameCache; 2612 { 2613 var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; 2614 componentFrameCache = new PossiblyWeakMap(); 2615 } 2616 function describeNativeComponentFrame(fn, construct) { 2617 if (!fn || reentry) { 2618 return ""; 2619 } 2620 { 2621 var frame = componentFrameCache.get(fn); 2622 if (frame !== void 0) { 2623 return frame; 2624 } 2625 } 2626 var control; 2627 reentry = true; 2628 var previousPrepareStackTrace = Error.prepareStackTrace; 2629 Error.prepareStackTrace = void 0; 2630 var previousDispatcher; 2631 { 2632 previousDispatcher = ReactCurrentDispatcher.current; 2633 ReactCurrentDispatcher.current = null; 2634 disableLogs(); 2635 } 2636 try { 2637 if (construct) { 2638 var Fake = function() { 2639 throw Error(); 2640 }; 2641 Object.defineProperty(Fake.prototype, "props", { 2642 set: function() { 2643 throw Error(); 2644 } 2645 }); 2646 if (typeof Reflect === "object" && Reflect.construct) { 2647 try { 2648 Reflect.construct(Fake, []); 2649 } catch (x) { 2650 control = x; 2651 } 2652 Reflect.construct(fn, [], Fake); 2653 } else { 2654 try { 2655 Fake.call(); 2656 } catch (x) { 2657 control = x; 2658 } 2659 fn.call(Fake.prototype); 2660 } 2661 } else { 2662 try { 2663 throw Error(); 2664 } catch (x) { 2665 control = x; 2666 } 2667 fn(); 2668 } 2669 } catch (sample) { 2670 if (sample && control && typeof sample.stack === "string") { 2671 var sampleLines = sample.stack.split("\n"); 2672 var controlLines = control.stack.split("\n"); 2673 var s = sampleLines.length - 1; 2674 var c = controlLines.length - 1; 2675 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { 2676 c--; 2677 } 2678 for (; s >= 1 && c >= 0; s--, c--) { 2679 if (sampleLines[s] !== controlLines[c]) { 2680 if (s !== 1 || c !== 1) { 2681 do { 2682 s--; 2683 c--; 2684 if (c < 0 || sampleLines[s] !== controlLines[c]) { 2685 var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); 2686 if (fn.displayName && _frame.includes("<anonymous>")) { 2687 _frame = _frame.replace("<anonymous>", fn.displayName); 2688 } 2689 { 2690 if (typeof fn === "function") { 2691 componentFrameCache.set(fn, _frame); 2692 } 2693 } 2694 return _frame; 2695 } 2696 } while (s >= 1 && c >= 0); 2697 } 2698 break; 2699 } 2700 } 2701 } 2702 } finally { 2703 reentry = false; 2704 { 2705 ReactCurrentDispatcher.current = previousDispatcher; 2706 reenableLogs(); 2707 } 2708 Error.prepareStackTrace = previousPrepareStackTrace; 2709 } 2710 var name = fn ? fn.displayName || fn.name : ""; 2711 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; 2712 { 2713 if (typeof fn === "function") { 2714 componentFrameCache.set(fn, syntheticFrame); 2715 } 2716 } 2717 return syntheticFrame; 2718 } 2719 function describeFunctionComponentFrame(fn, source, ownerFn) { 2720 { 2721 return describeNativeComponentFrame(fn, false); 2722 } 2723 } 2724 function shouldConstruct(Component) { 2725 var prototype = Component.prototype; 2726 return !!(prototype && prototype.isReactComponent); 2727 } 2728 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { 2729 if (type == null) { 2730 return ""; 2731 } 2732 if (typeof type === "function") { 2733 { 2734 return describeNativeComponentFrame(type, shouldConstruct(type)); 2735 } 2736 } 2737 if (typeof type === "string") { 2738 return describeBuiltInComponentFrame(type); 2739 } 2740 switch (type) { 2741 case REACT_SUSPENSE_TYPE: 2742 return describeBuiltInComponentFrame("Suspense"); 2743 case REACT_SUSPENSE_LIST_TYPE: 2744 return describeBuiltInComponentFrame("SuspenseList"); 2745 } 2746 if (typeof type === "object") { 2747 switch (type.$$typeof) { 2748 case REACT_FORWARD_REF_TYPE: 2749 return describeFunctionComponentFrame(type.render); 2750 case REACT_MEMO_TYPE: 2751 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); 2752 case REACT_LAZY_TYPE: { 2753 var lazyComponent = type; 2754 var payload = lazyComponent._payload; 2755 var init = lazyComponent._init; 2756 try { 2757 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); 2758 } catch (x) { 2759 } 2760 } 2761 } 2762 } 2763 return ""; 2764 } 2765 var hasOwnProperty = Object.prototype.hasOwnProperty; 2766 var loggedTypeFailures = {}; 2767 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; 2768 function setCurrentlyValidatingElement(element) { 2769 { 2770 if (element) { 2771 var owner = element._owner; 2772 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); 2773 ReactDebugCurrentFrame.setExtraStackFrame(stack); 2774 } else { 2775 ReactDebugCurrentFrame.setExtraStackFrame(null); 2776 } 2777 } 2778 } 2779 function checkPropTypes(typeSpecs, values, location, componentName, element) { 2780 { 2781 var has = Function.call.bind(hasOwnProperty); 2782 for (var typeSpecName in typeSpecs) { 2783 if (has(typeSpecs, typeSpecName)) { 2784 var error$1 = void 0; 2785 try { 2786 if (typeof typeSpecs[typeSpecName] !== "function") { 2787 var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); 2788 err.name = "Invariant Violation"; 2789 throw err; 2790 } 2791 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); 2792 } catch (ex) { 2793 error$1 = ex; 2794 } 2795 if (error$1 && !(error$1 instanceof Error)) { 2796 setCurrentlyValidatingElement(element); 2797 error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); 2798 setCurrentlyValidatingElement(null); 2799 } 2800 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { 2801 loggedTypeFailures[error$1.message] = true; 2802 setCurrentlyValidatingElement(element); 2803 error("Failed %s type: %s", location, error$1.message); 2804 setCurrentlyValidatingElement(null); 2805 } 2806 } 2807 } 2808 } 2809 } 2810 var isArrayImpl = Array.isArray; 2811 function isArray(a) { 2812 return isArrayImpl(a); 2813 } 2814 function typeName(value) { 2815 { 2816 var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; 2817 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; 2818 return type; 2819 } 2820 } 2821 function willCoercionThrow(value) { 2822 { 2823 try { 2824 testStringCoercion(value); 2825 return false; 2826 } catch (e) { 2827 return true; 2828 } 2829 } 2830 } 2831 function testStringCoercion(value) { 2832 return "" + value; 2833 } 2834 function checkKeyStringCoercion(value) { 2835 { 2836 if (willCoercionThrow(value)) { 2837 error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); 2838 return testStringCoercion(value); 2839 } 2840 } 2841 } 2842 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; 2843 var RESERVED_PROPS = { 2844 key: true, 2845 ref: true, 2846 __self: true, 2847 __source: true 2848 }; 2849 var specialPropKeyWarningShown; 2850 var specialPropRefWarningShown; 2851 var didWarnAboutStringRefs; 2852 { 2853 didWarnAboutStringRefs = {}; 2854 } 2855 function hasValidRef(config) { 2856 { 2857 if (hasOwnProperty.call(config, "ref")) { 2858 var getter = Object.getOwnPropertyDescriptor(config, "ref").get; 2859 if (getter && getter.isReactWarning) { 2860 return false; 2861 } 2862 } 2863 } 2864 return config.ref !== void 0; 2865 } 2866 function hasValidKey(config) { 2867 { 2868 if (hasOwnProperty.call(config, "key")) { 2869 var getter = Object.getOwnPropertyDescriptor(config, "key").get; 2870 if (getter && getter.isReactWarning) { 2871 return false; 2872 } 2873 } 2874 } 2875 return config.key !== void 0; 2876 } 2877 function warnIfStringRefCannotBeAutoConverted(config, self) { 2878 { 2879 if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { 2880 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); 2881 if (!didWarnAboutStringRefs[componentName]) { 2882 error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); 2883 didWarnAboutStringRefs[componentName] = true; 2884 } 2885 } 2886 } 2887 } 2888 function defineKeyPropWarningGetter(props, displayName) { 2889 { 2890 var warnAboutAccessingKey = function() { 2891 if (!specialPropKeyWarningShown) { 2892 specialPropKeyWarningShown = true; 2893 error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); 2894 } 2895 }; 2896 warnAboutAccessingKey.isReactWarning = true; 2897 Object.defineProperty(props, "key", { 2898 get: warnAboutAccessingKey, 2899 configurable: true 2900 }); 2901 } 2902 } 2903 function defineRefPropWarningGetter(props, displayName) { 2904 { 2905 var warnAboutAccessingRef = function() { 2906 if (!specialPropRefWarningShown) { 2907 specialPropRefWarningShown = true; 2908 error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); 2909 } 2910 }; 2911 warnAboutAccessingRef.isReactWarning = true; 2912 Object.defineProperty(props, "ref", { 2913 get: warnAboutAccessingRef, 2914 configurable: true 2915 }); 2916 } 2917 } 2918 var ReactElement = function(type, key, ref, self, source, owner, props) { 2919 var element = { 2920 // This tag allows us to uniquely identify this as a React Element 2921 $$typeof: REACT_ELEMENT_TYPE, 2922 // Built-in properties that belong on the element 2923 type, 2924 key, 2925 ref, 2926 props, 2927 // Record the component responsible for creating this element. 2928 _owner: owner 2929 }; 2930 { 2931 element._store = {}; 2932 Object.defineProperty(element._store, "validated", { 2933 configurable: false, 2934 enumerable: false, 2935 writable: true, 2936 value: false 2937 }); 2938 Object.defineProperty(element, "_self", { 2939 configurable: false, 2940 enumerable: false, 2941 writable: false, 2942 value: self 2943 }); 2944 Object.defineProperty(element, "_source", { 2945 configurable: false, 2946 enumerable: false, 2947 writable: false, 2948 value: source 2949 }); 2950 if (Object.freeze) { 2951 Object.freeze(element.props); 2952 Object.freeze(element); 2953 } 2954 } 2955 return element; 2956 }; 2957 function jsxDEV(type, config, maybeKey, source, self) { 2958 { 2959 var propName; 2960 var props = {}; 2961 var key = null; 2962 var ref = null; 2963 if (maybeKey !== void 0) { 2964 { 2965 checkKeyStringCoercion(maybeKey); 2966 } 2967 key = "" + maybeKey; 2968 } 2969 if (hasValidKey(config)) { 2970 { 2971 checkKeyStringCoercion(config.key); 2972 } 2973 key = "" + config.key; 2974 } 2975 if (hasValidRef(config)) { 2976 ref = config.ref; 2977 warnIfStringRefCannotBeAutoConverted(config, self); 2978 } 2979 for (propName in config) { 2980 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { 2981 props[propName] = config[propName]; 2982 } 2983 } 2984 if (type && type.defaultProps) { 2985 var defaultProps = type.defaultProps; 2986 for (propName in defaultProps) { 2987 if (props[propName] === void 0) { 2988 props[propName] = defaultProps[propName]; 2989 } 2990 } 2991 } 2992 if (key || ref) { 2993 var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; 2994 if (key) { 2995 defineKeyPropWarningGetter(props, displayName); 2996 } 2997 if (ref) { 2998 defineRefPropWarningGetter(props, displayName); 2999 } 3000 } 3001 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); 3002 } 3003 } 3004 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; 3005 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; 3006 function setCurrentlyValidatingElement$1(element) { 3007 { 3008 if (element) { 3009 var owner = element._owner; 3010 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); 3011 ReactDebugCurrentFrame$1.setExtraStackFrame(stack); 3012 } else { 3013 ReactDebugCurrentFrame$1.setExtraStackFrame(null); 3014 } 3015 } 3016 } 3017 var propTypesMisspellWarningShown; 3018 { 3019 propTypesMisspellWarningShown = false; 3020 } 3021 function isValidElement(object) { 3022 { 3023 return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; 3024 } 3025 } 3026 function getDeclarationErrorAddendum() { 3027 { 3028 if (ReactCurrentOwner$1.current) { 3029 var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); 3030 if (name) { 3031 return "\n\nCheck the render method of `" + name + "`."; 3032 } 3033 } 3034 return ""; 3035 } 3036 } 3037 function getSourceInfoErrorAddendum(source) { 3038 { 3039 if (source !== void 0) { 3040 var fileName = source.fileName.replace(/^.*[\\\/]/, ""); 3041 var lineNumber = source.lineNumber; 3042 return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; 3043 } 3044 return ""; 3045 } 3046 } 3047 var ownerHasKeyUseWarning = {}; 3048 function getCurrentComponentErrorInfo(parentType) { 3049 { 3050 var info = getDeclarationErrorAddendum(); 3051 if (!info) { 3052 var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; 3053 if (parentName) { 3054 info = "\n\nCheck the top-level render call using <" + parentName + ">."; 3055 } 3056 } 3057 return info; 3058 } 3059 } 3060 function validateExplicitKey(element, parentType) { 3061 { 3062 if (!element._store || element._store.validated || element.key != null) { 3063 return; 3064 } 3065 element._store.validated = true; 3066 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); 3067 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { 3068 return; 3069 } 3070 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; 3071 var childOwner = ""; 3072 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { 3073 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; 3074 } 3075 setCurrentlyValidatingElement$1(element); 3076 error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); 3077 setCurrentlyValidatingElement$1(null); 3078 } 3079 } 3080 function validateChildKeys(node, parentType) { 3081 { 3082 if (typeof node !== "object") { 3083 return; 3084 } 3085 if (isArray(node)) { 3086 for (var i = 0; i < node.length; i++) { 3087 var child = node[i]; 3088 if (isValidElement(child)) { 3089 validateExplicitKey(child, parentType); 3090 } 3091 } 3092 } else if (isValidElement(node)) { 3093 if (node._store) { 3094 node._store.validated = true; 3095 } 3096 } else if (node) { 3097 var iteratorFn = getIteratorFn(node); 3098 if (typeof iteratorFn === "function") { 3099 if (iteratorFn !== node.entries) { 3100 var iterator = iteratorFn.call(node); 3101 var step; 3102 while (!(step = iterator.next()).done) { 3103 if (isValidElement(step.value)) { 3104 validateExplicitKey(step.value, parentType); 3105 } 3106 } 3107 } 3108 } 3109 } 3110 } 3111 } 3112 function validatePropTypes(element) { 3113 { 3114 var type = element.type; 3115 if (type === null || type === void 0 || typeof type === "string") { 3116 return; 3117 } 3118 var propTypes; 3119 if (typeof type === "function") { 3120 propTypes = type.propTypes; 3121 } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. 3122 // Inner props are checked in the reconciler. 3123 type.$$typeof === REACT_MEMO_TYPE)) { 3124 propTypes = type.propTypes; 3125 } else { 3126 return; 3127 } 3128 if (propTypes) { 3129 var name = getComponentNameFromType(type); 3130 checkPropTypes(propTypes, element.props, "prop", name, element); 3131 } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { 3132 propTypesMisspellWarningShown = true; 3133 var _name = getComponentNameFromType(type); 3134 error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); 3135 } 3136 if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { 3137 error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); 3138 } 3139 } 3140 } 3141 function validateFragmentProps(fragment) { 3142 { 3143 var keys = Object.keys(fragment.props); 3144 for (var i = 0; i < keys.length; i++) { 3145 var key = keys[i]; 3146 if (key !== "children" && key !== "key") { 3147 setCurrentlyValidatingElement$1(fragment); 3148 error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); 3149 setCurrentlyValidatingElement$1(null); 3150 break; 3151 } 3152 } 3153 if (fragment.ref !== null) { 3154 setCurrentlyValidatingElement$1(fragment); 3155 error("Invalid attribute `ref` supplied to `React.Fragment`."); 3156 setCurrentlyValidatingElement$1(null); 3157 } 3158 } 3159 } 3160 function jsxWithValidation(type, props, key, isStaticChildren, source, self) { 3161 { 3162 var validType = isValidElementType(type); 3163 if (!validType) { 3164 var info = ""; 3165 if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { 3166 info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; 3167 } 3168 var sourceInfo = getSourceInfoErrorAddendum(source); 3169 if (sourceInfo) { 3170 info += sourceInfo; 3171 } else { 3172 info += getDeclarationErrorAddendum(); 3173 } 3174 var typeString; 3175 if (type === null) { 3176 typeString = "null"; 3177 } else if (isArray(type)) { 3178 typeString = "array"; 3179 } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { 3180 typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; 3181 info = " Did you accidentally export a JSX literal instead of a component?"; 3182 } else { 3183 typeString = typeof type; 3184 } 3185 error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); 3186 } 3187 var element = jsxDEV(type, props, key, source, self); 3188 if (element == null) { 3189 return element; 3190 } 3191 if (validType) { 3192 var children = props.children; 3193 if (children !== void 0) { 3194 if (isStaticChildren) { 3195 if (isArray(children)) { 3196 for (var i = 0; i < children.length; i++) { 3197 validateChildKeys(children[i], type); 3198 } 3199 if (Object.freeze) { 3200 Object.freeze(children); 3201 } 3202 } else { 3203 error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); 3204 } 3205 } else { 3206 validateChildKeys(children, type); 3207 } 3208 } 3209 } 3210 if (type === REACT_FRAGMENT_TYPE) { 3211 validateFragmentProps(element); 3212 } else { 3213 validatePropTypes(element); 3214 } 3215 return element; 3216 } 3217 } 3218 function jsxWithValidationStatic(type, props, key) { 3219 { 3220 return jsxWithValidation(type, props, key, true); 3221 } 3222 } 3223 function jsxWithValidationDynamic(type, props, key) { 3224 { 3225 return jsxWithValidation(type, props, key, false); 3226 } 3227 } 3228 var jsx2 = jsxWithValidationDynamic; 3229 var jsxs = jsxWithValidationStatic; 3230 exports.Fragment = REACT_FRAGMENT_TYPE; 3231 exports.jsx = jsx2; 3232 exports.jsxs = jsxs; 3233 })(); 3234 } 3235 } 3236}); 3237
vendor: 289 bytes, lines 3238-3249
3238// node_modules/react/jsx-runtime.js 3239var require_jsx_runtime = __commonJS({ 3240 "node_modules/react/jsx-runtime.js"(exports, module) { 3241 "use strict"; 3242 if (false) { 3243 module.exports = null; 3244 } else { 3245 module.exports = require_react_jsx_runtime_development(); 3246 } 3247 } 3248}); 3249
3250// src/utils.ts 3251function sleep(ms) { 3252 return new Promise((resolve) => setTimeout(resolve, ms)); 3253} 3254function makeRandomKey(length = 5) { 3255 let result = ""; 3256 const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; 3257 const charactersLength = characters.length; 3258 for (let i = 0; i < length; i++) { 3259 result += characters.charAt(Math.floor(Math.random() * charactersLength)); 3260 } 3261 return result; 3262} 3263function dirname(path) { 3264 if (path === "/" || path === "") { 3265 return ""; 3266 } 3267 return path.replace(/[/]?[^/]+[/]?$/, ""); 3268} 3269function currentScriptPath() { 3270 return new URL(import.meta.url).pathname; 3271} 3272function currentScriptDir() { 3273 return dirname(currentScriptPath()); 3274} 3275function inferFiletype(filename) { 3276 const extMatch = filename.match(/\.[0-9a-z]+$/i); 3277 if (extMatch === null) { 3278 return null; 3279 } 3280 const ext = extMatch[0].substring(1).toLowerCase(); 3281 const type = FILE_EXTENSIONS[ext]; 3282 if (!type) { 3283 return null; 3284 } 3285 return type; 3286} 3287var FILE_EXTENSIONS = { 3288 py: "python", 3289 js: "javascript", 3290 html: "html", 3291 css: "css", 3292 csv: "csv", 3293 r: "r", 3294 sql: "sql", 3295 sass: "sass", 3296 scss: "sass", 3297 yaml: "yaml", 3298 yml: "yaml" 3299}; 3300function isApplePlatform() { 3301 return /(Mac|iPhone|iPod|iPad)/i.test(navigator.userAgent); 3302} 3303function modKeySymbol() { 3304 if (isApplePlatform()) { 3305 return "\u2318"; 3306 } else { 3307 return "Ctrl"; 3308 } 3309} 3310function isBinary(x) { 3311 if (typeof x === "string") { 3312 for (const b of x) { 3313 if (b === "\0" || b === "\xFF") { 3314 return true; 3315 } 3316 } 3317 return false; 3318 } else { 3319 for (const b of x) { 3320 if (b === 0 || b === 255) { 3321 return true; 3322 } 3323 } 3324 return false; 3325 } 3326} 3327function uint8ArrayToString(buf) { 3328 let result = ""; 3329 for (let i = 0; i < buf.length; i++) { 3330 result += String.fromCharCode(buf[i]); 3331 } 3332 return result; 3333} 3334function stringToUint8Array(s) { 3335 const len = s.length; 3336 const bytes = new Uint8Array(len); 3337 for (let i = 0; i < len; i++) { 3338 bytes[i] = s.charCodeAt(i); 3339 } 3340 return bytes; 3341} 3342function engineSwitch(engine, rValue, pythonValue) { 3343 switch (engine) { 3344 case "r": 3345 return rValue; 3346 case "python": 3347 default: 3348 return pythonValue; 3349 } 3350} 3351
3352// src/Components/filecontent.ts 3353function FCJSONtoFC(x) { 3354 if (x.type === "binary") { 3355 return { 3356 name: x.name, 3357 content: stringToUint8Array(window.atob(x.content)), 3358 type: "binary" 3359 }; 3360 } else { 3361 return { 3362 name: x.name, 3363 content: x.content, 3364 type: "text" 3365 }; 3366 } 3367} 3368function FCorFCJSONtoFC(x) { 3369 if (x.type === "binary") { 3370 if (typeof x.content === "string") { 3371 return FCJSONtoFC(x); 3372 } else { 3373 return x; 3374 } 3375 } else { 3376 return { 3377 name: x.name, 3378 content: x.content, 3379 type: "text" 3380 }; 3381 } 3382} 3383function FCtoFCJSON(x) { 3384 if (x.type === "binary") { 3385 return { 3386 name: x.name, 3387 content: window.btoa(uint8ArrayToString(x.content)), 3388 type: "binary" 3389 }; 3390 } else { 3391 return { 3392 name: x.name, 3393 content: x.content 3394 // To save a bit of space, don't include type:"text". 3395 }; 3396 } 3397} 3398
3399// src/Components/Icons.tsx 3400var import_jsx_runtime = __toESM(require_jsx_runtime()); 3401function Icon({ 3402 icon, 3403 style 3404}) { 3405 let viewBox = "0 0 512 512"; 3406 let svgPath = null; 3407 if (!style) { 3408 style = {}; 3409 } 3410 switch (icon) { 3411 case "cloud-arrow-down": 3412 viewBox = "0 0 640 512"; 3413 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M144 480C64.47 480 0 415.5 0 336C0 273.2 40.17 219.8 96.2 200.1C96.07 197.4 96 194.7 96 192C96 103.6 167.6 32 256 32C315.3 32 367 64.25 394.7 112.2C409.9 101.1 428.3 96 448 96C501 96 544 138.1 544 192C544 204.2 541.7 215.8 537.6 226.6C596 238.4 640 290.1 640 352C640 422.7 582.7 480 512 480H144zM303 392.1C312.4 402.3 327.6 402.3 336.1 392.1L416.1 312.1C426.3 303.6 426.3 288.4 416.1 279C407.6 269.7 392.4 269.7 383 279L344 318.1V184C344 170.7 333.3 160 320 160C306.7 160 296 170.7 296 184V318.1L256.1 279C247.6 269.7 232.4 269.7 223 279C213.7 288.4 213.7 303.6 223 312.1L303 392.1z" }); 3414 break; 3415 case "clone": 3416 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M64 464H288C296.8 464 304 456.8 304 448V384H352V448C352 483.3 323.3 512 288 512H64C28.65 512 0 483.3 0 448V224C0 188.7 28.65 160 64 160H128V208H64C55.16 208 48 215.2 48 224V448C48 456.8 55.16 464 64 464zM160 64C160 28.65 188.7 0 224 0H448C483.3 0 512 28.65 512 64V288C512 323.3 483.3 352 448 352H224C188.7 352 160 323.3 160 288V64zM224 304H448C456.8 304 464 296.8 464 288V64C464 55.16 456.8 48 448 48H224C215.2 48 208 55.16 208 64V288C208 296.8 215.2 304 224 304z" }); 3417 break; 3418 case "code": 3419 viewBox = "0 0 640 512"; 3420 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M414.8 40.79L286.8 488.8C281.9 505.8 264.2 515.6 247.2 510.8C230.2 505.9 220.4 488.2 225.2 471.2L353.2 23.21C358.1 6.216 375.8-3.624 392.8 1.232C409.8 6.087 419.6 23.8 414.8 40.79H414.8zM518.6 121.4L630.6 233.4C643.1 245.9 643.1 266.1 630.6 278.6L518.6 390.6C506.1 403.1 485.9 403.1 473.4 390.6C460.9 378.1 460.9 357.9 473.4 345.4L562.7 256L473.4 166.6C460.9 154.1 460.9 133.9 473.4 121.4C485.9 108.9 506.1 108.9 518.6 121.4V121.4zM166.6 166.6L77.25 256L166.6 345.4C179.1 35
34207.9 179.1 378.1 166.6 390.6C154.1 403.1 133.9 403.1 121.4 390.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4L121.4 121.4C133.9 108.9 154.1 108.9 166.6 121.4C179.1 133.9 179.1 154.1 166.6 166.6V166.6z" }); 3421 break; 3422 case "floppy": 3423 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M224 256c-35.2 0-64 28.8-64 64c0 35.2 28.8 64 64 64c35.2 0 64-28.8 64-64C288 284.8 259.2 256 224 256zM433.1 129.1l-83.9-83.9C341.1 37.06 328.8 32 316.1 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h320c35.35 0 64-28.65 64-64V163.9C448 151.2 442.9 138.9 433.1 129.1zM128 80h144V160H128V80zM400 416c0 8.836-7.164 16-16 16H64c-8.836 0-16-7.164-16-16V96c0-8.838 7.164-16 16-16h16v104c0 13.25 10.75 24 24 24h192C309.3 208 320 197.3 320 184V83.88l78.25 78.25C399.4 163.2 400 164.8 400 166.3V416z" }); 3424 break; 3425 case "share-nodes": 3426 viewBox = "0 0 448 512"; 3427 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M448 127.1C448 181 405 223.1 352 223.1C326.1 223.1 302.6 213.8 285.4 197.1L191.3 244.1C191.8 248 191.1 251.1 191.1 256C191.1 260 191.8 263.1 191.3 267.9L285.4 314.9C302.6 298.2 326.1 288 352 288C405 288 448 330.1 448 384C448 437 405 480 352 480C298.1 480 256 437 256 384C256 379.1 256.2 376 256.7 372.1L162.6 325.1C145.4 341.8 121.9 352 96 352C42.98 352 0 309 0 256C0 202.1 42.98 160 96 160C121.9 160 145.4 170.2 162.6 186.9L256.7 139.9C256.2 135.1 256 132 256 128C256 74.98 298.1 32 352 32C405 32 448 74.98 448 128L448 127.1zM95.1 287.1C113.7 287.1 127.1 273.7 127.1 255.1C127.1 238.3 113.7 223.1 95.1 223.1C78.33 223.1 63.1 238.3 63.1 255.1C63.1 273.7 78.33 287.1 95.1 287.1zM352 95.1C334.3 95.1 320 110.3 320 127.1C320 145.7 334.3 159.1 352 159.1C369.7 159.1 384 145.7 384 127.1C384 110.3 369.7 95.1 352 95.1zM352 416C369.7 416 384 401.7 384 384C384 366.3 369.7 352 352 352C334.3 352 320 366.3 320 384C320 401.7 334.3 416 352 416z" }); 3428 break; 3429 case "arrow-rotate-right": 3430 style.verticalAlign = "-0.15em"; 3431 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M496 48V192c0 17.69-14.31 32-32 32H320c-17.69 0-32-14.31-32-32s14.31-32 32-32h63.39c-29.97-39.7-77.25-63.78-127.6-63.78C167.7 96.22 96 167.9 96 256s71.69 159.8 159.8 159.8c34.88 0 68.03-11.03 95.88-31.94c14.22-10.53 34.22-7.75 44.81 6.375c10.59 14.16 7.75 34.22-6.375 44.81c-39.03 29.28-85.36 44.86-134.2 44.86C132.5 479.9 32 379.4 32 256s100.5-223.9 223.9-223.9c69.15 0 134 32.47 176.1 86.12V48c0-17.69 14.31-32 32-32S496 30.31 496 48z" }); 3432 break; 3433 case "play": 3434 viewBox = "0 0 384 512"; 3435 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M361 215C375.3 223.8 384 239.3 384 256C384 272.7 375.3 288.2 361 296.1L73.03 472.1C58.21 482 39.66 482.4 24.52 473.9C9.377 465.4 0 449.4 0 432V80C0 62.64 9.377 46.63 24.52 38.13C39.66 29.64 58.21 29.99 73.03 39.04L361 215z" }); 3436 break; 3437 case "upload": 3438 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M105.4 182.6c12.5 12.49 32.76 12.5 45.25 .001L224 109.3V352c0 17.67 14.33 32 32 32c17.67 0 32-14.33 32-32V109.3l73.38 73.38c12.49 12.49 32.75 12.49 45.25-.001c12.49-12.49 12.49-32.75 0-45.25l-128-128C272.4 3.125 264.2 0 256 0S239.6 3.125 233.4 9.375L105.4 137.4C92.88 149.9 92.88 170.1 105.4 182.6zM480 352h-160c0 35.35-28.65 64-64 64s-64-28.65-64-64H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96C512 366.3 497.7 352 480 352zM432 456c-13.2 0-24-10.8-24-24c0-13.2 10.8-24 24-24s24 10.8 24 24C456 445.2 445.2 456 432 456z" }); 3439 break; 3440 case "download": 3441 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M480 352h-133.5l-45.25 45.25C289.2 409.3 273.1 416 256 416s-33.16-6.656-45.25-18.75L165.5 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96C512 366.3 497.7 352 480 352zM432 456c-13.2 0-24-10.8-24-24c0-13.2 10.8-24 24-24s24 10.8 24 24C456 445.2 445.2 456 432 456zM233.4 374.6C239.6 380.9 247.8 384 256 384s16.38-3.125 22.62-9.375l128-128c12.49-12.5 12.49-32.75 0-45.25c-12.5-12.5-32.76-12.5-45.25 0L288 274.8V32c0-17.67-14.33-32-32-32C238.3 0 224 14.33 224 32v242.8L150.6 201.4c-12.49-12.5-32.75-12.5-45.25 0c-12.49 12.5-12.49 32.75 0 45.25L233.4 374.6z" }); 3442 break; 3443 case "file-arrow-down":
3444 viewBox = "0 0 384 512"; 3445 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M384 128h-128V0L384 128zM256 160H384v304c0 26.51-21.49 48-48 48h-288C21.49 512 0 490.5 0 464v-416C0 21.49 21.49 0 48 0H224l.0039 128C224 145.7 238.3 160 256 160zM255 295L216 334.1V232c0-13.25-10.75-24-24-24S168 218.8 168 232v102.1L128.1 295C124.3 290.3 118.2 288 112 288S99.72 290.3 95.03 295c-9.375 9.375-9.375 24.56 0 33.94l80 80c9.375 9.375 24.56 9.375 33.94 0l80-80c9.375-9.375 9.375-24.56 0-33.94S264.4 285.7 255 295z" }); 3446 break; 3447 case "arrow-up-from-bracket": 3448 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M384 352v64c0 17.67-14.33 32-32 32H96c-17.67 0-32-14.33-32-32v-64c0-17.67-14.33-32-32-32s-32 14.33-32 32v64c0 53.02 42.98 96 96 96h256c53.02 0 96-42.98 96-96v-64c0-17.67-14.33-32-32-32S384 334.3 384 352zM201.4 9.375l-128 128c-12.51 12.51-12.49 32.76 0 45.25c12.5 12.5 32.75 12.5 45.25 0L192 109.3V320c0 17.69 14.31 32 32 32s32-14.31 32-32V109.3l73.38 73.38c12.5 12.5 32.75 12.5 45.25 0s12.5-32.75 0-45.25l-128-128C234.1-3.125 213.9-3.125 201.4 9.375z" }); 3449 break; 3450 case "pen-to-square": 3451 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M373.1 24.97C401.2-3.147 446.8-3.147 474.9 24.97L487 37.09C515.1 65.21 515.1 110.8 487 138.9L289.8 336.2C281.1 344.8 270.4 351.1 258.6 354.5L158.6 383.1C150.2 385.5 141.2 383.1 135 376.1C128.9 370.8 126.5 361.8 128.9 353.4L157.5 253.4C160.9 241.6 167.2 230.9 175.8 222.2L373.1 24.97zM440.1 58.91C431.6 49.54 416.4 49.54 407 58.91L377.9 88L424 134.1L453.1 104.1C462.5 95.6 462.5 80.4 453.1 71.03L440.1 58.91zM203.7 266.6L186.9 325.1L245.4 308.3C249.4 307.2 252.9 305.1 255.8 302.2L390.1 168L344 121.9L209.8 256.2C206.9 259.1 204.8 262.6 203.7 266.6zM200 64C213.3 64 224 74.75 224 88C224 101.3 213.3 112 200 112H88C65.91 112 48 129.9 48 152V424C48 446.1 65.91 464 88 464H360C382.1 464 400 446.1 400 424V312C400 298.7 410.7 288 424 288C437.3 288 448 298.7 448 312V424C448 472.6 408.6 512 360 512H88C39.4 512 0 472.6 0 424V152C0 103.4 39.4 64 88 64H200z" }); 3452 break; 3453 case "up-right-from-square": 3454 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z" }); 3455 break; 3456 case "skull": 3457 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M416 400V464C416 490.5 394.5 512 368 512H320V464C320 455.2 312.8 448 304 448C295.2 448 288 455.2 288 464V512H224V464C224 455.2 216.8 448 208 448C199.2 448 192 455.2 192 464V512H144C117.5 512 96 490.5 96 464V400C96 399.6 96 399.3 96.01 398.9C37.48 357.8 0 294.7 0 224C0 100.3 114.6 0 256 0C397.4 0 512 100.3 512 224C512 294.7 474.5 357.8 415.1 398.9C415.1 399.3 416 399.6 416 400V400zM160 192C124.7 192 96 220.7 96 256C96 291.3 124.7 320 160 320C195.3 320 224 291.3 224 256C224 220.7 195.3 192 160 192zM352 320C387.3 320 416 291.3 416 256C416 220.7 387.3 192 352 192C316.7 192 288 220.7 288 256C288 291.3 316.7 320 352 320z" }); 3458 break; 3459 case "window-restore": 3460 svgPath = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M432 48H208C190.3 48 176 62.33 176 80V96H128V80C128 35.82 163.8 0 208 0H432C476.2 0 512 35.82 512 80V304C512 348.2 476.2 384 432 384H416V336H432C449.7 336 464 321.7 464 304V80C464 62.33 449.7 48 432 48zM320 128C355.3 128 384 156.7 384 192V448C384 483.3 355.3 512 320 512H64C28.65 512 0 483.3 0 448V192C0 156.7 28.65 128 64 128H320zM64 464H320C328.8 464 336 456.8 336 448V256H48V448C48 456.8 55.16 464 64 464z" }); 3461 break; 3462 default: 3463 throw new Error("Unknown icon: " + icon); 3464 } 3465 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( 3466 "svg", 3467 { 3468 className: "shinylive-icon", 3469 style, 3470 xmlns: "http://www.w3.org/2000/svg",
3471 viewBox, 3472 children: svgPath 3473 } 3474 ); 3475} 3476
3477// src/Components/share.ts 3478var import_lz_string = __toESM(require_lz_string()); 3479var shortEngine = { 3480 python: "py", 3481 r: "r" 3482}; 3483function editorUrlPrefix(engine) { 3484 return `https://shinylive.io/${shortEngine[engine]}/editor/`; 3485} 3486function appUrlPrefix(engine) { 3487 return `https://shinylive.io/${shortEngine[engine]}/app/`; 3488} 3489function fileContentsToUrlString(fileContents, sort = true) { 3490 if (sort) { 3491 fileContents.sort((a, b) => a.name.localeCompare(b.name)); 3492 } 3493 return import_lz_string.default.compressToEncodedURIComponent( 3494 JSON.stringify(fileContents.map(FCtoFCJSON)) 3495 ); 3496} 3497async function fileContentsToUrlStringInWebWorker(fileContents, sort = true) { 3498 if (sort) { 3499 fileContents.sort((a, b) => a.name.localeCompare(b.name)); 3500 } 3501 const fileContentJsonString = JSON.stringify(fileContents.map(FCtoFCJSON)); 3502 return await encodeLzstringWebWorker(fileContentJsonString); 3503} 3504var _lzstringWebWorker = null; 3505function ensureLzstringWebWorker() { 3506 if (_lzstringWebWorker === null) { 3507 _lzstringWebWorker = new Worker( 3508 currentScriptDir() + "/lzstring-worker.js", 3509 { type: "module" } 3510 ); 3511 } 3512 return _lzstringWebWorker; 3513} 3514async function encodeLzstringWebWorker(value) { 3515 const response = await postMessageLzstringWebWorker({ 3516 type: "encode", 3517 value 3518 }); 3519 return response.value; 3520} 3521async function postMessageLzstringWebWorker(msg) { 3522 const worker = ensureLzstringWebWorker(); 3523 return new Promise((onSuccess) => { 3524 const channel = new MessageChannel(); 3525 channel.port1.onmessage = (e) => { 3526 channel.port1.close(); 3527 const msg2 = e.data; 3528 onSuccess(msg2); 3529 }; 3530 worker.postMessage(msg, [channel.port2]); 3531 }); 3532} 3533 3534export { 3535 require_lz_string, 3536 require_react, 3537 sleep, 3538 makeRandomKey, 3539 currentScriptDir, 3540 inferFiletype, 3541 modKeySymbol, 3542 isBinary, 3543 uint8ArrayToString, 3544 stringToUint8Array, 3545 engineSwitch, 3546 FCJSONtoFC, 3547 FCorFCJSONtoFC, 3548 require_jsx_runtime, 3549 Icon, 3550 editorUrlPrefix, 3551 appUrlPrefix, 3552 fileContentsToUrlString, 3553 fileContentsToUrlStringInWebWorker 3554}; 3555/*! Bundled license information: 3556 3557react/cjs/react.development.js: 3558 (** 3559 * @license React 3560 * react.development.js 3561 * 3562 * Copyright (c) Facebook, Inc. and its affiliates. 3563 * 3564 * This source code is licensed under the MIT license found in the 3565 * LICENSE file in the root directory of this source tree. 3566 *) 3567 3568react/cjs/react-jsx-runtime.development.js: 3569 (** 3570 * @license React 3571 * react-jsx-runtime.development.js 3572 * 3573 * Copyright (c) Facebook, Inc. and its affiliates. 3574 * 3575 * This source code is licensed under the MIT license found in the 3576 * LICENSE file in the root directory of this source tree. 3577 *) 3578*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.