From 93b1298d468d8f4207126c72f5331402a4dbc42e Mon Sep 17 00:00:00 2001 From: ArDiouscuros <72071512+ArDiouscuros@users.noreply.github.com> Date: Sat, 1 Oct 2022 21:24:10 +0200 Subject: [PATCH 01/18] Improve !fetch, add !replay Allow save fetched commands to a file Replay command to get commands from file inside of interactive prompt Related to #871 --- scripts/dream.py | 49 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/scripts/dream.py b/scripts/dream.py index 5fab79f7d9..768493e8ae 100644 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -16,6 +16,7 @@ from ldm.dream.image_util import make_grid from ldm.dream.log import write_log from omegaconf import OmegaConf from backend.invoke_ai_web_server import InvokeAIWebServer +from pathlib import Path def main(): @@ -123,6 +124,7 @@ def main(): def main_loop(gen, opt, infile): """prompt/read/execute loop""" done = False + doneAfterInFile = infile is not None path_filter = re.compile(r'[<>:"/\\|?*]') last_results = list() model_config = OmegaConf.load(opt.conf)[opt.model] @@ -150,7 +152,8 @@ def main_loop(gen, opt, infile): try: command = get_next_command(infile) except EOFError: - done = True + done = doneAfterInFile + infile = None continue # skip empty lines @@ -175,10 +178,16 @@ def main_loop(gen, opt, infile): operation = 'postprocess' elif subcommand.startswith('fetch'): - file_path = command.replace('!fetch ','',1) + file_path = command.replace('!fetch','',1).strip() retrieve_dream_command(opt,file_path,completer) continue + elif subcommand.startswith('replay'): + file_path = command.replace('!replay','',1).strip() + if infile is None and os.path.isfile(file_path): + infile = open(file_path, 'r', encoding='utf-8') + continue + elif subcommand.startswith('history'): completer.show_history() continue @@ -510,18 +519,40 @@ def retrieve_dream_command(opt,file_path,completer): will retrieve and format the dream command used to generate the image, and pop it into the readline buffer (linux, Mac), or print out a comment for cut-and-paste (windows) + Given a wildcard path to a folder with image png files, + will retrieve and format the dream command used to generate the images, + and save them to a file commands.txt for further processing ''' + dir,basename = os.path.split(file_path) if len(dir) == 0: - path = os.path.join(opt.outdir,basename) - else: - path = file_path + dir = opt.outdir try: - cmd = dream_cmd_from_png(path) - except FileNotFoundError: - print(f'** {path}: file not found') + paths = list(Path(dir).glob(basename)) + except ValueError: + print(f'## "{basename}": unacceptable pattern') return - completer.set_line(cmd) + + commands = [] + for path in paths: + try: + cmd = dream_cmd_from_png(path) + except OSError: + print(f'## {path}: file could not be read') + continue + except (KeyError, AttributeError): + print(f'## {path}: file has no metadata') + continue + + commands.append(cmd) + + outfile = os.path.join(dir,'commands.txt') + with open(outfile, 'w', encoding='utf-8') as f: + f.write('\n'.join(commands)) + print(f'>> File {outfile} with commands created') + + if len(commands) == 1: + completer.set_line(commands[0]) if __name__ == '__main__': main() From 935a9d3c758f540fbc3dc898610304ce5b0d3e0d Mon Sep 17 00:00:00 2001 From: ArDiouscuros <72071512+ArDiouscuros@users.noreply.github.com> Date: Mon, 3 Oct 2022 10:38:22 +0200 Subject: [PATCH 02/18] Update !fetch command, add documentation and autocomplete list -- !fetch takes second optional argument name of the file to save commands to --- docs/features/CLI.md | 15 +++++++++++++++ ldm/dream/readline.py | 2 +- scripts/dream.py | 27 +++++++++++++++++++-------- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/docs/features/CLI.md b/docs/features/CLI.md index 530d659c64..580249f248 100644 --- a/docs/features/CLI.md +++ b/docs/features/CLI.md @@ -249,16 +249,31 @@ generated image and either loads them into the command line (Linux|Mac), or prints them out in a comment for copy-and-paste (Windows). You may provide either the name of a file in the current output directory, or a full file path. +Given a wildcard path to a folder with image png files, +command will retrieve the dream command used to generate the images, +and save them to a file commands.txt for further processing +Name of the saved file could be set as the second argument to !fetch ~~~ dream> !fetch 0000015.8929913.png # the script returns the next line, ready for editing and running: dream> a fantastic alien landscape -W 576 -H 512 -s 60 -A plms -C 7.5 + +dream> !fetch outputs\selected-imgs\*.png selected.txt +>> File outputs\selected-imgs\selected.txt with commands created ~~~ Note that this command may behave unexpectedly if given a PNG file that was not generated by InvokeAI. +## !replay + +This command replays a text file generated by !fetch or created manually + +~~~ +dream> !replay outputs\selected-imgs\selected.txt +~~~ + ## !history The dream script keeps track of all the commands you issue during a diff --git a/ldm/dream/readline.py b/ldm/dream/readline.py index 375a7ac41b..e99bf5b5a7 100644 --- a/ldm/dream/readline.py +++ b/ldm/dream/readline.py @@ -44,7 +44,7 @@ COMMANDS = ( '-save_orig','--save_original', '--skip_normalize','-x', '--log_tokenization','-t', - '!fix','!fetch','!history', + '!fix','!fetch','!history','!replay' ) IMG_PATH_COMMANDS = ( '--outdir[=\s]', diff --git a/scripts/dream.py b/scripts/dream.py index 768493e8ae..57435ccb26 100644 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -513,7 +513,7 @@ def split_variations(variations_string) -> list: else: return parts -def retrieve_dream_command(opt,file_path,completer): +def retrieve_dream_command(opt,command,completer): ''' Given a full or partial path to a previously-generated image file, will retrieve and format the dream command used to generate the image, @@ -523,10 +523,22 @@ def retrieve_dream_command(opt,file_path,completer): will retrieve and format the dream command used to generate the images, and save them to a file commands.txt for further processing ''' - + if len(command) == 0: + return + tokens = command.split() + if len(tokens) > 1: + outfilepath = tokens[1] + else: + outfilepath = "commands.txt" + + file_path = tokens[0] dir,basename = os.path.split(file_path) if len(dir) == 0: dir = opt.outdir + + outdir,outname = os.path.split(outfilepath) + if len(outdir) == 0: + outfilepath = os.path.join(dir,outname) try: paths = list(Path(dir).glob(basename)) except ValueError: @@ -543,16 +555,15 @@ def retrieve_dream_command(opt,file_path,completer): except (KeyError, AttributeError): print(f'## {path}: file has no metadata') continue - + commands.append(f'# {path}') commands.append(cmd) - outfile = os.path.join(dir,'commands.txt') - with open(outfile, 'w', encoding='utf-8') as f: + with open(outfilepath, 'w', encoding='utf-8') as f: f.write('\n'.join(commands)) - print(f'>> File {outfile} with commands created') + print(f'>> File {outfilepath} with commands created') - if len(commands) == 1: - completer.set_line(commands[0]) + if len(commands) == 2: + completer.set_line(commands[1]) if __name__ == '__main__': main() From 595d15455a0e4b26dc50456e23f9430f28d4382d Mon Sep 17 00:00:00 2001 From: Arthur Holstvoogd Date: Thu, 6 Oct 2022 15:49:35 +0200 Subject: [PATCH 03/18] Fix generation of image with s>1000 --- ldm/modules/diffusionmodules/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ldm/modules/diffusionmodules/util.py b/ldm/modules/diffusionmodules/util.py index 60b4d8a028..fb671bfb63 100644 --- a/ldm/modules/diffusionmodules/util.py +++ b/ldm/modules/diffusionmodules/util.py @@ -64,6 +64,8 @@ def make_ddim_timesteps( ): if ddim_discr_method == 'uniform': c = num_ddpm_timesteps // num_ddim_timesteps + if c < 1: + c = 1 ddim_timesteps = np.asarray(list(range(0, num_ddpm_timesteps, c))) elif ddim_discr_method == 'quad': ddim_timesteps = ( From 02b10402645f85311fdcaf039ff0e8fbde277f0b Mon Sep 17 00:00:00 2001 From: ArDiouscuros <72071512+ArDiouscuros@users.noreply.github.com> Date: Sat, 8 Oct 2022 13:32:28 +0200 Subject: [PATCH 04/18] Fix typo in ldm/dream/readline.py during merge, add more exception handling --- ldm/dream/readline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldm/dream/readline.py b/ldm/dream/readline.py index 99ea482a1d..7290a5fa5f 100644 --- a/ldm/dream/readline.py +++ b/ldm/dream/readline.py @@ -47,7 +47,7 @@ COMMANDS = ( '--skip_normalize','-x', '--log_tokenization','-t', '--hires_fix', - '!fix','!fetch',!replay','!history','!search','!clear', + '!fix','!fetch','!replay','!history','!search','!clear', ) IMG_PATH_COMMANDS = ( '--outdir[=\s]', From 62d4bb05d4827c3ab5c98d57cfc5c3125a10f047 Mon Sep 17 00:00:00 2001 From: ArDiouscuros <72071512+ArDiouscuros@users.noreply.github.com> Date: Sat, 8 Oct 2022 13:42:30 +0200 Subject: [PATCH 05/18] Add exception handling during metadata processing --- scripts/dream.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dream.py b/scripts/dream.py index aaf0e6f300..f5e6bfb094 100644 --- a/scripts/dream.py +++ b/scripts/dream.py @@ -593,9 +593,13 @@ def retrieve_dream_command(opt,command,completer): except OSError: print(f'## {path}: file could not be read') continue - except (KeyError, AttributeError): + except (KeyError, AttributeError, IndexError): print(f'## {path}: file has no metadata') continue + except: + print(f'## {path}: file could not be processed') + continue + commands.append(f'# {path}') commands.append(cmd) From a705a5a0aa3f40f9cd7f7bd330d1c1594d207bd8 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sat, 15 Oct 2022 15:46:29 -0400 Subject: [PATCH 06/18] enhance support for model switching and editing - Error checks for invalid model - Add !del_model command to invoke.py - Add del_model() method to model_cache - Autocompleter kept in sync with model addition/subtraction. --- ldm/generate.py | 3 +-- ldm/invoke/args.py | 9 +++++++- ldm/invoke/model_cache.py | 13 +++++++++++- ldm/invoke/readline.py | 18 +++++++++++++++- scripts/invoke.py | 43 +++++++++++++++++++++++++++++++++------ 5 files changed, 75 insertions(+), 11 deletions(-) diff --git a/ldm/generate.py b/ldm/generate.py index fe2dffb1d7..0f543e97ec 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -683,8 +683,7 @@ class Generate: model_data = self.model_cache.get_model(model_name) if model_data is None or len(model_data) == 0: - print(f'** Model switch failed **') - return self.model + return None self.model = model_data['model'] self.width = model_data['width'] diff --git a/ldm/invoke/args.py b/ldm/invoke/args.py index 4c6f69fe53..2b14129a84 100644 --- a/ldm/invoke/args.py +++ b/ldm/invoke/args.py @@ -519,7 +519,7 @@ class Args(object): formatter_class=ArgFormatter, description= """ - *Image generation:* + *Image generation* invoke> a fantastic alien landscape -W576 -H512 -s60 -n4 *postprocessing* @@ -534,6 +534,13 @@ class Args(object): !history lists all the commands issued during the current session. !NN retrieves the NNth command from the history + + *Model manipulation* + !models -- list models in configs/models.yaml + !switch -- switch to model named + !import_model path/to/weights/file.ckpt -- adds a model to your config + !edit_model -- edit a model's description + !del_model -- delete a model """ ) render_group = parser.add_argument_group('General rendering') diff --git a/ldm/invoke/model_cache.py b/ldm/invoke/model_cache.py index 5c6816e3c3..eecec5ff9d 100644 --- a/ldm/invoke/model_cache.py +++ b/ldm/invoke/model_cache.py @@ -73,7 +73,8 @@ class ModelCache(object): except Exception as e: print(f'** model {model_name} could not be loaded: {str(e)}') print(f'** restoring {self.current_model}') - return self.get_model(self.current_model) + self.get_model(self.current_model) + return None self.current_model = model_name self._push_newest_model(model_name) @@ -121,6 +122,16 @@ class ModelCache(object): else: print(line) + def del_model(self, model_name:str) ->str: + ''' + Delete the named model and return the YAML + ''' + omega = self.config + del omega[model_name] + if model_name in self.stack: + self.stack.remove(model_name) + return OmegaConf.to_yaml(omega) + def add_model(self, model_name:str, model_attributes:dict, clobber=False) ->str: ''' Update the named model with a dictionary of attributes. Will fail with an diff --git a/ldm/invoke/readline.py b/ldm/invoke/readline.py index e6ba39e793..2292f11b59 100644 --- a/ldm/invoke/readline.py +++ b/ldm/invoke/readline.py @@ -53,11 +53,12 @@ COMMANDS = ( '--log_tokenization','-t', '--hires_fix', '!fix','!fetch','!history','!search','!clear', - '!models','!switch','!import_model','!edit_model' + '!models','!switch','!import_model','!edit_model','!del_model', ) MODEL_COMMANDS = ( '!switch', '!edit_model', + '!del_model', ) WEIGHT_COMMANDS = ( '!import_model', @@ -205,9 +206,24 @@ class Completer(object): pydoc.pager('\n'.join(lines)) def set_line(self,line)->None: + ''' + Set the default string displayed in the next line of input. + ''' self.linebuffer = line readline.redisplay() + def add_model(self,model_name:str)->None: + ''' + add a model name to the completion list + ''' + self.models.append(model_name) + + def del_model(self,model_name:str)->None: + ''' + removes a model name from the completion list + ''' + self.models.remove(model_name) + def _seed_completions(self, text, state): m = re.search('(-S\s?|--seed[=\s]?)(\d*)',text) if m: diff --git a/scripts/invoke.py b/scripts/invoke.py index fbee218b78..7b9c574913 100644 --- a/scripts/invoke.py +++ b/scripts/invoke.py @@ -381,6 +381,15 @@ def do_command(command:str, gen, opt:Args, completer) -> tuple: completer.add_history(command) operation = None + elif command.startswith('!del'): + path = shlex.split(command) + if len(path) < 2: + print('** please provide the name of a model') + else: + del_config(path[1], gen, opt, completer) + completer.add_history(command) + operation = None + elif command.startswith('!fetch'): file_path = command.replace('!fetch ','',1) retrieve_dream_command(opt,file_path,completer) @@ -446,10 +455,23 @@ def add_weights_to_config(model_path:str, gen, opt, completer): done = True except: print('** Please enter a valid integer between 64 and 2048') - if write_config_file(opt.conf, gen, model_name, new_config): - gen.set_model(model_name) + completer.add_model(model_name) +def del_config(model_name:str, gen, opt, completer): + current_model = gen.model_name + if model_name == current_model: + print("** Can't delete active model. !switch to another model first. **") + return + yaml_str = gen.model_cache.del_model(model_name) + + tmpfile = os.path.join(os.path.dirname(opt.conf),'new_config.tmp') + with open(tmpfile, 'w') as outfile: + outfile.write(yaml_str) + os.rename(tmpfile,opt.conf) + print(f'** {model_name} deleted') + completer.del_model(model_name) + def edit_config(model_name:str, gen, opt, completer): config = gen.model_cache.config @@ -467,11 +489,11 @@ def edit_config(model_name:str, gen, opt, completer): new_value = input(f'{field}: ') new_config[field] = int(new_value) if field in ('width','height') else new_value completer.complete_extensions(None) - - if write_config_file(opt.conf, gen, model_name, new_config, clobber=True): - gen.set_model(model_name) + write_config_file(opt.conf, gen, model_name, new_config, clobber=True) def write_config_file(conf_path, gen, model_name, new_config, clobber=False): + current_model = gen.model_name + op = 'modify' if clobber else 'import' print('\n>> New configuration:') print(yaml.dump({model_name:new_config})) @@ -479,15 +501,24 @@ def write_config_file(conf_path, gen, model_name, new_config, clobber=False): return False try: + print('>> Verifying that new model loads...') yaml_str = gen.model_cache.add_model(model_name, new_config, clobber) + assert gen.set_model(model_name) is not None, 'model failed to load' except AssertionError as e: - print(f'** configuration failed: {str(e)}') + print(f'** aborting **') + gen.model_cache.del_model(model_name) return False tmpfile = os.path.join(os.path.dirname(conf_path),'new_config.tmp') with open(tmpfile, 'w') as outfile: outfile.write(yaml_str) os.rename(tmpfile,conf_path) + + do_switch = input(f'Keep model loaded? [y]') + if len(do_switch)==0 or do_switch[0] in ('y','Y'): + pass + else: + gen.set_model(current_model) return True def do_postprocess (gen, opt, callback): From 3e0a7b62290fc7a80a1154e83bc01980d0709458 Mon Sep 17 00:00:00 2001 From: wfng92 <43742196+wfng92@users.noreply.github.com> Date: Thu, 20 Oct 2022 15:59:00 +0800 Subject: [PATCH 07/18] Correct color channels in upscale using array slicing --- ldm/invoke/restoration/realesrgan.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ldm/invoke/restoration/realesrgan.py b/ldm/invoke/restoration/realesrgan.py index dc3eebd912..4b83fcbb10 100644 --- a/ldm/invoke/restoration/realesrgan.py +++ b/ldm/invoke/restoration/realesrgan.py @@ -60,14 +60,18 @@ class ESRGAN(): print( f'>> Real-ESRGAN Upscaling seed:{seed} : scale:{upsampler_scale}x' ) + + # REALSRGAN expects a BGR np array; make array and flip channels + bgr_image_array = np.array(image, dtype=np.uint8)[...,::-1] output, _ = upsampler.enhance( - np.array(image, dtype=np.uint8), + bgr_image_array, outscale=upsampler_scale, alpha_upsampler='realesrgan', ) - res = Image.fromarray(output) + # Flip the channels back to RGB + res = Image.fromarray(output[...,::-1]) if strength < 1.0: # Resize the image to the new image if the sizes have changed From 213e12fe1317bb4ccca5c4eec406fa0b3dd60a42 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 20 Oct 2022 08:16:43 +0800 Subject: [PATCH 08/18] Filters existing images when adding new images; Fixes #1085; Builds fresh bundle --- .../{index.b5f97cf7.js => index.b06af007.js} | 2 +- frontend/dist/index.html | 2 +- frontend/src/features/gallery/gallerySlice.ts | 17 +++++++++++++++-- .../options/MainOptions/MainCFGScale.tsx | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) rename frontend/dist/assets/{index.b5f97cf7.js => index.b06af007.js} (88%) diff --git a/frontend/dist/assets/index.b5f97cf7.js b/frontend/dist/assets/index.b06af007.js similarity index 88% rename from frontend/dist/assets/index.b5f97cf7.js rename to frontend/dist/assets/index.b06af007.js index 0085756c2c..d537a6fdee 100644 --- a/frontend/dist/assets/index.b5f97cf7.js +++ b/frontend/dist/assets/index.b06af007.js @@ -682,7 +682,7 @@ __p += '`),kn&&(Ie+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Ie+`return __p -}`;var mn=y2(function(){return Zn(j,vt+"return "+Ie).apply(n,q)});if(mn.source=Ie,eu(mn))throw mn;return mn}function LC(l){return Xn(l).toLowerCase()}function r1(l){return Xn(l).toUpperCase()}function OC(l,d,g){if(l=Xn(l),l&&(g||d===n))return _s(l);if(!l||!(d=aa(d)))return l;var E=Qo(l),D=Qo(d),j=gd(E,D),q=Ob(E,D)+1;return Os(E,j,q).join("")}function i1(l,d,g){if(l=Xn(l),l&&(g||d===n))return l.slice(0,Ib(l)+1);if(!l||!(d=aa(d)))return l;var E=Qo(l),D=Ob(E,Qo(d))+1;return Os(E,0,D).join("")}function b2(l,d,g){if(l=Xn(l),l&&(g||d===n))return l.replace(ji,"");if(!l||!(d=aa(d)))return l;var E=Qo(l),D=gd(E,Qo(d));return Os(E,D).join("")}function MC(l,d){var g=le,E=ge;if(wr(d)){var D="separator"in d?d.separator:D;g="length"in d?an(d.length):g,E="omission"in d?aa(d.omission):E}l=Xn(l);var j=l.length;if(Bc(l)){var q=Qo(l);j=q.length}if(g>=j)return l;var Q=g-Vu(E);if(Q<1)return E;var se=q?Os(q,0,Q).join(""):l.slice(0,Q);if(D===n)return se+E;if(q&&(Q+=se.length-Q),ih(D)){if(l.slice(Q).search(D)){var Me,ke=se;for(D.global||(D=ll(D.source,Xn(Vn.exec(D))+"g")),D.lastIndex=0;Me=D.exec(ke);)var Ie=Me.index;se=se.slice(0,Ie===n?Q:Ie)}}else if(l.indexOf(aa(D),Q)!=Q){var Qe=se.lastIndexOf(D);Qe>-1&&(se=se.slice(0,Qe))}return se+E}function DC(l){return l=Xn(l),l&&Ci.test(l)?l.replace(jn,y3):l}var PC=uf(function(l,d,g){return l+(g?" ":"")+d.toUpperCase()}),a1=py("toUpperCase");function o1(l,d,g){return l=Xn(l),d=g?n:d,d===n?b3(l)?C3(l):$v(l):l.match(d)||[]}var y2=bn(function(l,d){try{return yt(l,n,d)}catch(g){return eu(g)?g:new rn(g)}}),IC=yl(function(l,d){return Rt(d,function(g){g=Da(g),Rs(l,g,eh(l[g],l))}),l});function FC(l){var d=l==null?0:l.length,g=Pt();return l=d?Mn(l,function(E){if(typeof E[1]!="function")throw new Xa(c);return[g(E[0]),E[1]]}):[],bn(function(E){for(var D=-1;++Dbe)return[];var g=we,E=si(l,we);d=Pt(d),l-=we;for(var D=hm(E,d);++g0||d<0)?new An(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),d!==n&&(d=an(d),g=d<0?g.dropRight(-d):g.take(d-l)),g)},An.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},An.prototype.toArray=function(){return this.take(we)},gr(An.prototype,function(l,d){var g=/^(?:filter|find|map|reject)|While$/.test(d),E=/^(?:head|last)$/.test(d),D=B[E?"take"+(d=="last"?"Right":""):d],j=E||/^find/.test(d);!D||(B.prototype[d]=function(){var q=this.__wrapped__,Q=E?[1]:arguments,se=q instanceof An,Me=Q[0],ke=se||ln(q),Ie=function(yn){var kn=D.apply(B,La([yn],Q));return E&&Qe?kn[0]:kn};ke&&g&&typeof Me=="function"&&Me.length!=1&&(se=ke=!1);var Qe=this.__chain__,vt=!!this.__actions__.length,It=j&&!Qe,mn=se&&!vt;if(!j&&ke){q=mn?q:new An(this);var $t=l.apply(q,Q);return $t.__actions__.push({func:Qm,args:[Ie],thisArg:n}),new bo($t,Qe)}return It&&mn?l.apply(this,Q):($t=this.thru(Ie),It?E?$t.value()[0]:$t.value():$t)})}),Rt(["pop","push","shift","sort","splice","unshift"],function(l){var d=ul[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",E=/^(?:pop|shift)$/.test(l);B.prototype[l]=function(){var D=arguments;if(E&&!this.__chain__){var j=this.value();return d.apply(ln(j)?j:[],D)}return this[g](function(q){return d.apply(ln(q)?q:[],D)})}}),gr(An.prototype,function(l,d){var g=B[d];if(g){var E=g.name+"";er.call(Zc,E)||(Zc[E]=[]),Zc[E].push({name:d,func:g})}}),Zc[cf(n,z).name]=[{name:"wrapper",func:n}],An.prototype.clone=zt,An.prototype.reverse=Qc,An.prototype.value=Wr,B.prototype.at=Cx,B.prototype.chain=Nx,B.prototype.commit=wx,B.prototype.next=By,B.prototype.plant=tp,B.prototype.reverse=_x,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=Uy,B.prototype.first=B.prototype.head,Cd&&(B.prototype[Cd]=z0),B},$c=N3();L?((L.exports=$c)._=$c,S._=$c):Kt._=$c}).call(Ac)})(Wa,Wa.exports);const tb=Wa.exports,ive={currentImageUuid:"",images:[],areMoreImagesAvailable:!0},iU=xE({name:"gallery",initialState:ive,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const n=t.payload,i=e.images.filter(o=>o.uuid!==n);if(n===e.currentImageUuid){const o=e.images.findIndex(c=>c.uuid===n),u=Wa.exports.clamp(o,0,i.length-1);e.currentImage=i.length?i[u]:void 0,e.currentImageUuid=i.length?i[u].uuid:""}e.images=i},addImage:(e,t)=>{const n=t.payload,{uuid:i,mtime:o}=n;e.images.unshift(n),e.currentImageUuid=i,e.intermediateImage=void 0,e.currentImage=n,e.latest_mtime=o},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{images:t,currentImage:n}=e;if(n){const i=t.findIndex(o=>o.uuid===n.uuid);if(tb.inRange(i,0,t.length)){const o=t[i+1];e.currentImage=o,e.currentImageUuid=o.uuid}}},selectPrevImage:e=>{const{images:t,currentImage:n}=e;if(n){const i=t.findIndex(o=>o.uuid===n.uuid);if(tb.inRange(i,1,t.length+1)){const o=t[i-1];e.currentImage=o,e.currentImageUuid=o.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:i}=t.payload;if(n.length>0){if(e.images=e.images.concat(n).sort((o,u)=>u.mtime-o.mtime),!e.currentImage){const o=n[0];e.currentImage=o,e.currentImageUuid=o.uuid}e.latest_mtime=n[0].mtime,e.earliest_mtime=n[n.length-1].mtime}i!==void 0&&(e.areMoreImagesAvailable=i)}}}),{addImage:E6,clearIntermediateImage:NM,removeImage:ave,setCurrentImage:ove,addGalleryImages:sve,setIntermediateImage:lve,selectNextImage:aU,selectPrevImage:oU}=iU.actions,uve=iU.reducer,cve={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgress:!1,shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",hasError:!1,wasErrorSeen:!0},fve=cve,sU=xE({name:"system",initialState:fve,reducers:{setShouldDisplayInProgress:(e,t)=>{e.shouldDisplayInProgress=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Server error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:i,level:o}=t.payload,c={timestamp:n,message:i,level:o||"info"};e.log.push(c)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"}}}),{setShouldDisplayInProgress:dve,setIsProcessing:M4,addLogEntry:Ao,setShouldShowLogViewer:wM,setIsConnected:_M,setSocketId:Tye,setShouldConfirmOnDelete:lU,setOpenAccordions:pve,setSystemStatus:mve,setCurrentStatus:EM,setSystemConfig:hve,setShouldDisplayGuides:vve,processingCanceled:gve,errorOccurred:bve,errorSeen:uU}=sU.actions,yve=sU.reducer,Iu=Object.create(null);Iu.open="0";Iu.close="1";Iu.ping="2";Iu.pong="3";Iu.message="4";Iu.upgrade="5";Iu.noop="6";const D4=Object.create(null);Object.keys(Iu).forEach(e=>{D4[Iu[e]]=e});const Sve={type:"error",data:"parser error"},xve=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Cve=typeof ArrayBuffer=="function",Nve=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cU=({type:e,data:t},n,i)=>xve&&t instanceof Blob?n?i(t):TM(t,i):Cve&&(t instanceof ArrayBuffer||Nve(t))?n?i(t):TM(new Blob([t]),i):i(Iu[e]+(t||"")),TM=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+i)},n.readAsDataURL(e)},RM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hg=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,i,o=0,u,c,p,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const v=new ArrayBuffer(t),b=new Uint8Array(v);for(i=0;i>4,b[o++]=(c&15)<<4|p>>2,b[o++]=(p&3)<<6|h&63;return v},_ve=typeof ArrayBuffer=="function",fU=(e,t)=>{if(typeof e!="string")return{type:"message",data:dU(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Eve(e.substring(1),t)}:D4[n]?e.length>1?{type:D4[n],data:e.substring(1)}:{type:D4[n]}:Sve},Eve=(e,t)=>{if(_ve){const n=wve(e);return dU(n,t)}else return{base64:!0,data:e}},dU=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},pU=String.fromCharCode(30),Tve=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((u,c)=>{cU(u,!1,p=>{i[c]=p,++o===n&&t(i.join(pU))})})},Rve=(e,t)=>{const n=e.split(pU),i=[];for(let o=0;otypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function hU(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const kve=setTimeout,Lve=clearTimeout;function c3(e,t){t.useNativeTimers?(e.setTimeoutFn=kve.bind(ed),e.clearTimeoutFn=Lve.bind(ed)):(e.setTimeoutFn=setTimeout.bind(ed),e.clearTimeoutFn=clearTimeout.bind(ed))}const Ove=1.33;function Mve(e){return typeof e=="string"?Dve(e):Math.ceil((e.byteLength||e.size)*Ove)}function Dve(e){let t=0,n=0;for(let i=0,o=e.length;i=57344?n+=3:(i++,n+=4);return n}class Pve extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class vU extends Si{constructor(t){super(),this.writable=!1,c3(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,i){return super.emitReserved("error",new Pve(t,n,i)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fU(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const gU="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),C8=64,Ive={};let AM=0,n4=0,kM;function LM(e){let t="";do t=gU[e%C8]+t,e=Math.floor(e/C8);while(e>0);return t}function bU(){const e=LM(+new Date);return e!==kM?(AM=0,kM=e):e+"."+LM(AM++)}for(;n4{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};Rve(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tve(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let i="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=bU()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port);const o=yU(t),u=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(u?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ou(this.uri(),t)}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,u)=>{this.onError("xhr post error",o,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class Ou extends Si{constructor(t,n){super(),c3(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=hU(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new xU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ou.requestsCount++,Ou.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Bve,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ou.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ou.requestsCount=0;Ou.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",OM);else if(typeof addEventListener=="function"){const e="onpagehide"in ed?"pagehide":"unload";addEventListener(e,OM,!1)}}function OM(){for(let e in Ou.requests)Ou.requests.hasOwnProperty(e)&&Ou.requests[e].abort()}const jve=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),r4=ed.WebSocket||ed.MozWebSocket,MM=!0,Vve="arraybuffer",DM=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Hve extends vU{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,i=DM?{}:hU(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=MM&&!DM?n?new r4(t,n):new r4(t):new r4(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||Vve,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const c={};try{MM&&this.ws.send(u)}catch{}o&&jve(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let i="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=bU()),this.supportsBinary||(t.b64=1);const o=yU(t),u=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(u?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}check(){return!!r4}}const Wve={websocket:Hve,polling:$ve},Gve=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yve=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function N8(e){const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=Gve.exec(e||""),u={},c=14;for(;c--;)u[Yve[c]]=o[c]||"";return n!=-1&&i!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=qve(u,u.path),u.queryKey=Zve(u,u.query),u}function qve(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&i.splice(0,1),t.substr(t.length-1,1)=="/"&&i.splice(i.length-1,1),i}function Zve(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,u){o&&(n[o]=u)}),n}class Zf extends Si{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=N8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=N8(n.host).host),c3(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Fve(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=mU,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Wve[t](i)}open(){let t;if(this.opts.rememberUpgrade&&Zf.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),i=!1;Zf.priorWebsocketSuccess=!1;const o=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",x=>{if(!i)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Zf.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(b(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const N=new Error("probe error");N.transport=n.name,this.emitReserved("upgradeError",N)}}))};function u(){i||(i=!0,b(),n.close(),n=null)}const c=x=>{const N=new Error("probe error: "+x);N.transport=n.name,u(),this.emitReserved("upgradeError",N)};function p(){c("transport closed")}function h(){c("socket closed")}function v(x){n&&x.name!==n.name&&u()}const b=()=>{n.removeListener("open",o),n.removeListener("error",c),n.removeListener("close",p),this.off("close",h),this.off("upgrading",v)};n.once("open",o),n.once("error",c),n.once("close",p),this.once("close",h),this.once("upgrading",v),n.open()}onOpen(){if(this.readyState="open",Zf.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i0&&n>this.maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}write(t,n,i){return this.sendPacket("message",t,n,i),this}send(t,n,i){return this.sendPacket("message",t,n,i),this}sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const u={type:t,data:n,options:i};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){Zf.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let i=0;const o=t.length;for(;itypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,CU=Object.prototype.toString,Jve=typeof Blob=="function"||typeof Blob<"u"&&CU.call(Blob)==="[object BlobConstructor]",e0e=typeof File=="function"||typeof File<"u"&&CU.call(File)==="[object FileConstructor]";function AE(e){return Xve&&(e instanceof ArrayBuffer||Qve(e))||Jve&&e instanceof Blob||e0e&&e instanceof File}function P4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n=0&&e.num0;case qn.ACK:case qn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class a0e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=n0e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const o0e=Object.freeze(Object.defineProperty({__proto__:null,protocol:r0e,get PacketType(){return qn},Encoder:i0e,Decoder:kE},Symbol.toStringTag,{value:"Module"}));function Fl(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const s0e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class NU extends Si{constructor(t,n,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Fl(t,"open",this.onopen.bind(this)),Fl(t,"packet",this.onpacket.bind(this)),Fl(t,"error",this.onerror.bind(this)),Fl(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(s0e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const i={type:qn.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,p=n.pop();this._registerAckCallback(c,p),i.id=c}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){const i=this.flags.timeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let u=0;u{this.io.clearTimeoutFn(o),n.apply(this,[null,...u])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:qn.CONNECT,data:t})}):this.packet({type:qn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case qn.CONNECT:if(t.data&&t.data.sid){const o=t.data.sid;this.onconnect(o)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case qn.EVENT:case qn.BINARY_EVENT:this.onevent(t);break;case qn.ACK:case qn.BINARY_ACK:this.onack(t);break;case qn.DISCONNECT:this.ondisconnect();break;case qn.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:qn.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:qn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i0&&e.jitter<=1?e.jitter:0,this.attempts=0}zv.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};zv.prototype.reset=function(){this.attempts=0};zv.prototype.setMin=function(e){this.ms=e};zv.prototype.setMax=function(e){this.max=e};zv.prototype.setJitter=function(e){this.jitter=e};class E8 extends Si{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,c3(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new zv({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||o0e;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zf(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=Fl(n,"open",function(){i.onopen(),t&&t()}),u=Fl(n,"error",c=>{i.cleanup(),i._readyState="closed",this.emitReserved("error",c),t?t(c):i.maybeReconnectOnOpen()});if(this._timeout!==!1){const c=this._timeout;c===0&&o();const p=this.setTimeoutFn(()=>{o(),n.close(),n.emit("error",new Error("timeout"))},c);this.opts.autoUnref&&p.unref(),this.subs.push(function(){clearTimeout(p)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Fl(t,"ping",this.onping.bind(this)),Fl(t,"data",this.ondata.bind(this)),Fl(t,"error",this.onerror.bind(this)),Fl(t,"close",this.onclose.bind(this)),Fl(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch{this.onclose("parse error")}}ondecoded(t){this.emitReserved("packet",t)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i||(i=new NU(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(function(){clearTimeout(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ag={};function I4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Kve(e,t.path||"/socket.io"),i=n.source,o=n.id,u=n.path,c=ag[o]&&u in ag[o].nsps,p=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let h;return p?h=new E8(i,t):(ag[o]||(ag[o]=new E8(i,t)),h=ag[o]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(I4,{Manager:E8,Socket:NU,io:I4,connect:I4});let i4;const l0e=new Uint8Array(16);function u0e(){if(!i4&&(i4=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i4))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i4(l0e)}const ya=[];for(let e=0;e<256;++e)ya.push((e+256).toString(16).slice(1));function c0e(e,t=0){return(ya[e[t+0]]+ya[e[t+1]]+ya[e[t+2]]+ya[e[t+3]]+"-"+ya[e[t+4]]+ya[e[t+5]]+"-"+ya[e[t+6]]+ya[e[t+7]]+"-"+ya[e[t+8]]+ya[e[t+9]]+"-"+ya[e[t+10]]+ya[e[t+11]]+ya[e[t+12]]+ya[e[t+13]]+ya[e[t+14]]+ya[e[t+15]]).toLowerCase()}const f0e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PM={randomUUID:f0e};function a4(e,t,n){if(PM.randomUUID&&!t&&!e)return PM.randomUUID();e=e||{};const i=e.random||(e.rng||u0e)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=i[o];return t}return c0e(i)}var d0e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,p0e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,m0e=/[^-+\dA-Z]/g;function ko(e,t,n,i){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(IM[t]||t||IM.default);var o=t.slice(0,4);(o==="UTC:"||o==="GMT:")&&(t=t.slice(4),n=!0,o==="GMT:"&&(i=!0));var u=function(){return n?"getUTC":"get"},c=function(){return e[u()+"Date"]()},p=function(){return e[u()+"Day"]()},h=function(){return e[u()+"Month"]()},v=function(){return e[u()+"FullYear"]()},b=function(){return e[u()+"Hours"]()},x=function(){return e[u()+"Minutes"]()},N=function(){return e[u()+"Seconds"]()},_=function(){return e[u()+"Milliseconds"]()},T=function(){return n?0:e.getTimezoneOffset()},A=function(){return h0e(e)},M=function(){return v0e(e)},z={d:function(){return c()},dd:function(){return as(c())},ddd:function(){return To.dayNames[p()]},DDD:function(){return FM({y:v(),m:h(),d:c(),_:u(),dayName:To.dayNames[p()],short:!0})},dddd:function(){return To.dayNames[p()+7]},DDDD:function(){return FM({y:v(),m:h(),d:c(),_:u(),dayName:To.dayNames[p()+7]})},m:function(){return h()+1},mm:function(){return as(h()+1)},mmm:function(){return To.monthNames[h()]},mmmm:function(){return To.monthNames[h()+12]},yy:function(){return String(v()).slice(2)},yyyy:function(){return as(v(),4)},h:function(){return b()%12||12},hh:function(){return as(b()%12||12)},H:function(){return b()},HH:function(){return as(b())},M:function(){return x()},MM:function(){return as(x())},s:function(){return N()},ss:function(){return as(N())},l:function(){return as(_(),3)},L:function(){return as(Math.floor(_()/10))},t:function(){return b()<12?To.timeNames[0]:To.timeNames[1]},tt:function(){return b()<12?To.timeNames[2]:To.timeNames[3]},T:function(){return b()<12?To.timeNames[4]:To.timeNames[5]},TT:function(){return b()<12?To.timeNames[6]:To.timeNames[7]},Z:function(){return i?"GMT":n?"UTC":g0e(e)},o:function(){return(T()>0?"-":"+")+as(Math.floor(Math.abs(T())/60)*100+Math.abs(T())%60,4)},p:function(){return(T()>0?"-":"+")+as(Math.floor(Math.abs(T())/60),2)+":"+as(Math.floor(Math.abs(T())%60),2)},S:function(){return["th","st","nd","rd"][c()%10>3?0:(c()%100-c()%10!=10)*c()%10]},W:function(){return A()},WW:function(){return as(A())},N:function(){return M()}};return t.replace(d0e,function(P){return P in z?z[P]():P.slice(1,P.length-1)})}var IM={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},To={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},as=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},FM=function(t){var n=t.y,i=t.m,o=t.d,u=t._,c=t.dayName,p=t.short,h=p===void 0?!1:p,v=new Date,b=new Date;b.setDate(b[u+"Date"]()-1);var x=new Date;x.setDate(x[u+"Date"]()+1);var N=function(){return v[u+"Date"]()},_=function(){return v[u+"Month"]()},T=function(){return v[u+"FullYear"]()},A=function(){return b[u+"Date"]()},M=function(){return b[u+"Month"]()},z=function(){return b[u+"FullYear"]()},P=function(){return x[u+"Date"]()},I=function(){return x[u+"Month"]()},F=function(){return x[u+"FullYear"]()};return T()===n&&_()===i&&N()===o?h?"Tdy":"Today":z()===n&&M()===i&&A()===o?h?"Ysd":"Yesterday":F()===n&&I()===i&&P()===o?h?"Tmw":"Tomorrow":c},h0e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var i=new Date(n.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var o=n.getTimezoneOffset()-i.getTimezoneOffset();n.setHours(n.getHours()-o);var u=(n-i)/(864e5*7);return 1+Math.floor(u)},v0e=function(t){var n=t.getDay();return n===0&&(n=7),n},g0e=function(t){return(String(t).match(p0e)||[""]).pop().replace(m0e,"").replace(/GMT\+0000/g,"UTC")};const T8=fo("socketio/generateImage"),b0e=fo("socketio/runESRGAN"),y0e=fo("socketio/runFacetool"),S0e=fo("socketio/deleteImage"),wU=fo("socketio/requestImages"),x0e=fo("socketio/requestNewImages"),C0e=fo("socketio/cancelProcessing"),N0e=fo("socketio/uploadInitialImage");fo("socketio/uploadMaskImage");const w0e=fo("socketio/requestSystemConfig"),_0e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_M(!0)),t(EM("Connected")),n().gallery.latest_mtime?t(x0e()):t(wU())}catch(i){console.error(i)}},onDisconnect:()=>{try{t(_M(!1)),t(EM("Disconnected")),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(i){console.error(i)}},onGenerationResult:i=>{try{const{url:o,mtime:u,metadata:c}=i,p=a4();t(E6({uuid:p,url:o,mtime:u,metadata:c})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Image generated: ${o}`}))}catch(o){console.error(o)}},onIntermediateResult:i=>{try{const o=a4(),{url:u,metadata:c,mtime:p}=i;t(lve({uuid:o,url:u,mtime:p,metadata:c})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Intermediate image generated: ${u}`}))}catch(o){console.error(o)}},onPostprocessingResult:i=>{try{const{url:o,metadata:u,mtime:c}=i;t(E6({uuid:a4(),url:o,mtime:c,metadata:u})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Postprocessed: ${o}`}))}catch(o){console.error(o)}},onProgressUpdate:i=>{try{t(M4(!0)),t(mve(i))}catch(o){console.error(o)}},onError:i=>{const{message:o,additionalData:u}=i;try{t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Server error: ${o}`,level:"error"})),t(bve()),t(NM())}catch(c){console.error(c)}},onGalleryImages:i=>{const{images:o,areMoreImagesAvailable:u}=i,c=o.map(p=>{const{url:h,metadata:v,mtime:b}=p;return{uuid:a4(),url:h,mtime:b,metadata:v}});t(sve({images:c,areMoreImagesAvailable:u})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Loaded ${o.length} images`}))},onProcessingCanceled:()=>{t(gve());const{intermediateImage:i}=n().gallery;i&&(t(E6(i)),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Intermediate image saved: ${i.url}`})),t(NM())),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:i=>{const{url:o,uuid:u}=i;t(ave(u));const{initialImagePath:c,maskPath:p}=n().options;c===o&&t(Tv("")),p===o&&t(x8("")),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Image deleted: ${o}`}))},onInitialImageUploaded:i=>{const{url:o}=i;t(Tv(o)),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Initial image uploaded: ${o}`}))},onMaskImageUploaded:i=>{const{url:o}=i;t(x8(o)),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Mask image uploaded: ${o}`}))},onSystemConfig:i=>{t(hve(i))}}},E0e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],T0e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],R0e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],A0e=[{key:"2x",value:2},{key:"4x",value:4}],LE=0,OE=4294967295,k0e=["gfpgan","codeformer"],_U=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),L0e=(e,t)=>{const{prompt:n,iterations:i,steps:o,cfgScale:u,threshold:c,perlin:p,height:h,width:v,sampler:b,seed:x,seamless:N,hiresFix:_,shouldUseInitImage:T,img2imgStrength:A,initialImagePath:M,maskPath:z,shouldFitToWidthHeight:P,shouldGenerateVariations:I,variationAmount:F,seedWeights:$,shouldRunESRGAN:Y,upscalingLevel:Z,upscalingStrength:ue,shouldRunFacetool:ce,facetoolStrength:le,codeformerFidelity:ge,facetoolType:Ye,shouldRandomizeSeed:re}=e,{shouldDisplayInProgress:ie}=t,Ce={prompt:n,iterations:i,steps:o,cfg_scale:u,threshold:c,perlin:p,height:h,width:v,sampler_name:b,seed:x,seamless:N,hires_fix:_,progress_images:ie};Ce.seed=re?_U(LE,OE):x,T&&(Ce.init_img=M,Ce.strength=A,Ce.fit=P,z&&(Ce.init_mask=z)),I?(Ce.variation_amount=F,$&&(Ce.with_variations=Whe($))):Ce.variation_amount=0;let xe=!1,K=!1;return Y&&(xe={level:Z,strength:ue}),ce&&(K={type:Ye,strength:le},Ye==="codeformer"&&(K.codeformer_fidelity=ge)),{generationParameters:Ce,esrganParameters:xe,facetoolParameters:K}};var T6=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function R6(e,t,n,i){e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function EU(e,t){for(var n=t.slice(0,t.length-1),i=0;i=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function O0e(e,t){for(var n=e.length>=t.length?e:t,i=e.length>=t.length?t:e,o=!0,u=0;u=0&&Pr.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Pr.splice(0,Pr.length),(t===93||t===224)&&(t=91),t in xa){xa[t]=!1;for(var i in ud)ud[i]===t&&(us[i]=!1)}}function z0e(e){if(typeof e>"u")Object.keys(vi).forEach(function(c){return delete vi[c]});else if(Array.isArray(e))e.forEach(function(c){c.key&&A6(c)});else if(typeof e=="object")e.key&&A6(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?EU(ud,v):[];vi[N]=vi[N].filter(function(T){var A=o?T.method===o:!0;return!(A&&T.scope===i&&O0e(T.mods,_))})}})};function BM(e,t,n,i){if(t.element===i){var o;if(t.scope===n||t.scope==="all"){o=t.mods.length>0;for(var u in xa)Object.prototype.hasOwnProperty.call(xa,u)&&(!xa[u]&&t.mods.indexOf(+u)>-1||xa[u]&&t.mods.indexOf(+u)===-1)&&(o=!1);(t.mods.length===0&&!xa[16]&&!xa[18]&&!xa[17]&&!xa[91]||o||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function UM(e,t){var n=vi["*"],i=e.keyCode||e.which||e.charCode;if(!!us.filter.call(this,e)){if((i===93||i===224)&&(i=91),Pr.indexOf(i)===-1&&i!==229&&Pr.push(i),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(T){var A=R8[T];e[T]&&Pr.indexOf(A)===-1?Pr.push(A):!e[T]&&Pr.indexOf(A)>-1?Pr.splice(Pr.indexOf(A),1):T==="metaKey"&&e[T]&&Pr.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Pr=Pr.slice(Pr.indexOf(A))))}),i in xa){xa[i]=!0;for(var o in ud)ud[o]===i&&(us[o]=!0);if(!n)return}for(var u in xa)Object.prototype.hasOwnProperty.call(xa,u)&&(xa[u]=e[R8[u]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Pr.indexOf(17)===-1&&Pr.push(17),Pr.indexOf(18)===-1&&Pr.push(18),xa[17]=!0,xa[18]=!0);var c=nb();if(n)for(var p=0;p-1}function us(e,t,n){Pr=[];var i=TU(e),o=[],u="all",c=document,p=0,h=!1,v=!0,b="+",x=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(u=t.scope),t.element&&(c=t.element),t.keyup&&(h=t.keyup),t.keydown!==void 0&&(v=t.keydown),t.capture!==void 0&&(x=t.capture),typeof t.splitKey=="string"&&(b=t.splitKey)),typeof t=="string"&&(u=t);p1&&(o=EU(ud,e)),e=e[e.length-1],e=e==="*"?"*":f3(e),e in vi||(vi[e]=[]),vi[e].push({keyup:h,keydown:v,scope:u,mods:o,shortcut:i[p],method:n,key:i[p],splitKey:b,element:c});typeof c<"u"&&!B0e(c)&&window&&(AU.push(c),R6(c,"keydown",function(N){UM(N,c)},x),zM||(zM=!0,R6(window,"focus",function(){Pr=[]},x)),R6(c,"keyup",function(N){UM(N,c),F0e(N)},x))}function U0e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(vi).forEach(function(n){var i=vi[n].find(function(o){return o.scope===t&&o.shortcut===e});i&&i.method&&i.method()})}var k6={setScope:kU,getScope:nb,deleteScope:I0e,getPressedKeyCodes:M0e,isPressed:P0e,filter:D0e,trigger:U0e,unbind:z0e,keyMap:ME,modifier:ud,modifierMap:R8};for(var L6 in k6)Object.prototype.hasOwnProperty.call(k6,L6)&&(us[L6]=k6[L6]);if(typeof window<"u"){var $0e=window.hotkeys;us.noConflict=function(e){return e&&window.hotkeys===us&&(window.hotkeys=$0e),us},window.hotkeys=us}us.filter=function(){return!0};var LU=function(t,n){var i=t.target,o=i&&i.tagName;return Boolean(o&&n&&n.includes(o))},j0e=function(t){return LU(t,["INPUT","TEXTAREA","SELECT"])};function ii(e,t,n,i){n instanceof Array&&(i=n,n=void 0);var o=n||{},u=o.enableOnTags,c=o.filter,p=o.keyup,h=o.keydown,v=o.filterPreventDefault,b=v===void 0?!0:v,x=o.enabled,N=x===void 0?!0:x,_=o.enableOnContentEditable,T=_===void 0?!1:_,A=k.exports.useRef(null),M=k.exports.useCallback(function(z,P){var I,F;return c&&!c(z)?!b:j0e(z)&&!LU(z,u)||(I=z.target)!=null&&I.isContentEditable&&!T?!0:A.current===null||document.activeElement===A.current||(F=A.current)!=null&&F.contains(document.activeElement)?(t(z,P),!0):!1},i?[A,u,c].concat(i):[A,u,c]);return k.exports.useEffect(function(){if(!N){us.unbind(e,M);return}return p&&h!==!0&&(n.keydown=!1),us(e,n||{},M),function(){return us.unbind(e,M)}},[M,e,N]),A}us.isPressed;var O6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/InpaintingWIP.tsx";function V0e(){return C("div",{className:"work-in-progress inpainting-work-in-progress",children:[C("h1",{children:"Inpainting"},void 0,!1,{fileName:O6,lineNumber:6,columnNumber:7},this),C("p",{children:"Inpainting is available as a part of the Invoke AI Command Line Interface. A dedicated WebUI interface will be released in the near future."},void 0,!1,{fileName:O6,lineNumber:7,columnNumber:7},this)]},void 0,!0,{fileName:O6,lineNumber:5,columnNumber:5},this)}var M6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/NodesWIP.tsx";function H0e(){return C("div",{className:"work-in-progress nodes-work-in-progress",children:[C("h1",{children:"Nodes"},void 0,!1,{fileName:M6,lineNumber:6,columnNumber:7},this),C("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."},void 0,!1,{fileName:M6,lineNumber:7,columnNumber:7},this)]},void 0,!0,{fileName:M6,lineNumber:5,columnNumber:5},this)}var D6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/OutpaintingWIP.tsx";function W0e(){return C("div",{className:"work-in-progress outpainting-work-in-progress",children:[C("h1",{children:"Outpainting"},void 0,!1,{fileName:D6,lineNumber:6,columnNumber:7},this),C("p",{children:"Outpainting is available as a part of the Invoke AI Command Line Interface. A dedicated WebUI interface will be released in the near future."},void 0,!1,{fileName:D6,lineNumber:7,columnNumber:7},this)]},void 0,!0,{fileName:D6,lineNumber:5,columnNumber:5},this)}var s4="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/PostProcessingWIP.tsx";const G0e=()=>C("div",{className:"work-in-progress post-processing-work-in-progress",children:[C("h1",{children:"Post Processing"},void 0,!1,{fileName:s4,lineNumber:6,columnNumber:7},void 0),C("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image tab. A dedicated UI will be released soon."},void 0,!1,{fileName:s4,lineNumber:7,columnNumber:7},void 0),C("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen, High Resolution Fixing and more."},void 0,!1,{fileName:s4,lineNumber:13,columnNumber:7},void 0)]},void 0,!0,{fileName:s4,lineNumber:5,columnNumber:5},void 0);var $M="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/ImageToImageIcon.tsx";const Y0e=kv({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:C("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"},void 0,!1,{fileName:$M,lineNumber:8,columnNumber:7},void 0)},void 0,!1,{fileName:$M,lineNumber:7,columnNumber:5},void 0)});var q0e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/InpaintIcon.tsx";const Z0e=kv({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"},void 0,!1,{fileName:q0e,lineNumber:7,columnNumber:5},void 0)});var K0e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/NodesIcon.tsx";const X0e=kv({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"},void 0,!1,{fileName:K0e,lineNumber:7,columnNumber:5},void 0)});var Q0e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/OutpaintIcon.tsx";const J0e=kv({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"},void 0,!1,{fileName:Q0e,lineNumber:7,columnNumber:5},void 0)});var e1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/PostprocessingIcon.tsx";const t1e=kv({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"},void 0,!1,{fileName:e1e,lineNumber:7,columnNumber:5},void 0)});var jM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/TextToImageIcon.tsx";const n1e=kv({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:C("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:C("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"},void 0,!1,{fileName:jM,lineNumber:13,columnNumber:7},void 0)},void 0,!1,{fileName:jM,lineNumber:7,columnNumber:5},void 0)});var zl=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(zl||{});const r1e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}};var l4="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAISwitch.tsx";const pm=e=>{const{label:t,isDisabled:n=!1,fontSize:i="md",size:o="md",width:u="auto",...c}=e;return C(fd,{isDisabled:n,width:u,children:C(Sr,{justifyContent:"space-between",alignItems:"center",children:[t&&C(sm,{fontSize:i,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t},void 0,!1,{fileName:l4,lineNumber:30,columnNumber:11},void 0),C(s3,{size:o,className:"switch-button",...c},void 0,!1,{fileName:l4,lineNumber:39,columnNumber:9},void 0)]},void 0,!0,{fileName:l4,lineNumber:28,columnNumber:7},void 0)},void 0,!1,{fileName:l4,lineNumber:27,columnNumber:5},void 0)};var P6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestore.tsx";function OU(){const e=gt(o=>o.system.isGFPGANAvailable),t=gt(o=>o.options.shouldRunFacetool),n=Sn();return C(Sr,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[C("p",{children:"Restore Face"},void 0,!1,{fileName:P6,lineNumber:32,columnNumber:7},this),C(pm,{isDisabled:!e,isChecked:t,onChange:o=>n(Qhe(o.target.checked))},void 0,!1,{fileName:P6,lineNumber:33,columnNumber:7},this)]},void 0,!0,{fileName:P6,lineNumber:26,columnNumber:5},this)}var Ip="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAINumberInput.tsx";const VM=/^-?(0\.)?\.?$/,Vl=e=>{const{label:t,styleClass:n,isDisabled:i=!1,showStepper:o=!0,fontSize:u="1rem",size:c="sm",width:p,textAlign:h,isInvalid:v,value:b,onChange:x,min:N,max:_,isInteger:T=!0,...A}=e,[M,z]=k.exports.useState(String(b));k.exports.useEffect(()=>{!M.match(VM)&&b!==Number(M)&&z(String(b))},[b,M]);const P=F=>{z(F),F.match(VM)||x(T?Math.floor(Number(F)):Number(F))},I=F=>{const $=tb.clamp(T?Math.floor(Number(F.target.value)):Number(F.target.value),N,_);z(String($)),x($)};return C(fd,{isDisabled:i,isInvalid:v,className:`number-input ${n}`,children:[t&&C(sm,{fontSize:u,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",className:"number-input-label",children:t},void 0,!1,{fileName:Ip,lineNumber:103,columnNumber:9},void 0),C(Rz,{size:c,...A,className:"number-input-field",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:P,onBlur:I,children:[C(Az,{fontSize:u,className:"number-input-entry",width:p,textAlign:h},void 0,!1,{fileName:Ip,lineNumber:123,columnNumber:9},void 0),C("div",{className:"number-input-stepper",style:o?{display:"block"}:{display:"none"},children:[C(Oz,{className:"number-input-stepper-button"},void 0,!1,{fileName:Ip,lineNumber:133,columnNumber:11},void 0),C(Lz,{className:"number-input-stepper-button"},void 0,!1,{fileName:Ip,lineNumber:134,columnNumber:11},void 0)]},void 0,!0,{fileName:Ip,lineNumber:129,columnNumber:9},void 0)]},void 0,!0,{fileName:Ip,lineNumber:113,columnNumber:7},void 0)]},void 0,!0,{fileName:Ip,lineNumber:97,columnNumber:5},void 0)};var og="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAISelect.tsx";const Rb=e=>{const{label:t,isDisabled:n,validValues:i,size:o="sm",fontSize:u="md",styleClass:c,...p}=e;return C(fd,{isDisabled:n,className:`iai-select ${c}`,children:[C(sm,{fontSize:u,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",className:"iai-select-label",children:t},void 0,!1,{fileName:og,lineNumber:25,columnNumber:7},void 0),C(Iz,{fontSize:u,size:o,...p,className:"iai-select-picker",children:i.map(h=>typeof h=="string"||typeof h=="number"?C("option",{value:h,className:"iai-select-option",children:h},h,!1,{fileName:og,lineNumber:42,columnNumber:13},void 0):C("option",{value:h.value,children:h.key},h.value,!1,{fileName:og,lineNumber:46,columnNumber:13},void 0))},void 0,!1,{fileName:og,lineNumber:34,columnNumber:7},void 0)]},void 0,!0,{fileName:og,lineNumber:24,columnNumber:5},void 0)};var u4="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx";const i1e=Ga(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),a1e=Ga(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),DE=()=>{const e=Sn(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:i}=gt(i1e),{isGFPGANAvailable:o}=gt(a1e),u=h=>e(L4(h)),c=h=>e(eU(h)),p=h=>e(O4(h.target.value));return C(Sr,{direction:"column",gap:2,children:[C(Rb,{label:"Type",validValues:k0e.concat(),value:n,onChange:p},void 0,!1,{fileName:u4,lineNumber:71,columnNumber:7},void 0),C(Vl,{isDisabled:!o,label:"Strength",step:.05,min:0,max:1,onChange:u,value:t,width:"90px",isInteger:!1},void 0,!1,{fileName:u4,lineNumber:77,columnNumber:7},void 0),n==="codeformer"&&C(Vl,{isDisabled:!o,label:"Fidelity",step:.05,min:0,max:1,onChange:c,value:i,width:"90px",isInteger:!1},void 0,!1,{fileName:u4,lineNumber:89,columnNumber:9},void 0)]},void 0,!0,{fileName:u4,lineNumber:70,columnNumber:5},void 0)};var o1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx";function s1e(){const e=Sn(),t=gt(i=>i.options.shouldFitToWidthHeight);return C(pm,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:i=>e(tU(i.target.checked))},void 0,!1,{fileName:o1e,lineNumber:21,columnNumber:5},this)}var l1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx";function u1e(e){const{label:t="Strength",styleClass:n}=e,i=gt(c=>c.options.img2imgStrength),o=Sn();return C(Vl,{label:t,step:.01,min:.01,max:.99,onChange:c=>o(JB(c)),value:i,width:"90px",isInteger:!1,styleClass:n},void 0,!1,{fileName:l1e,lineNumber:26,columnNumber:5},this)}var c1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx";function f1e(){const e=Sn(),t=gt(i=>i.options.shouldRandomizeSeed);return C(pm,{label:"Randomize Seed",isChecked:t,onChange:i=>e(eve(i.target.checked))},void 0,!1,{fileName:c1e,lineNumber:22,columnNumber:5},this)}var d1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx";function p1e(){const e=gt(u=>u.options.seed),t=gt(u=>u.options.shouldRandomizeSeed),n=gt(u=>u.options.shouldGenerateVariations),i=Sn(),o=u=>i(Tb(u));return C(Vl,{label:"Seed",step:1,precision:0,flexGrow:1,min:LE,max:OE,isDisabled:t,isInvalid:e<0&&n,onChange:o,value:e,width:"10rem"},void 0,!1,{fileName:d1e,lineNumber:25,columnNumber:5},this)}var HM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx";function m1e(){const e=Sn(),t=gt(i=>i.options.shouldRandomizeSeed);return C(Du,{size:"sm",isDisabled:t,onClick:()=>e(Tb(_U(LE,OE))),children:C("p",{children:"Shuffle"},void 0,!1,{fileName:HM,lineNumber:27,columnNumber:7},this)},void 0,!1,{fileName:HM,lineNumber:22,columnNumber:5},this)}var h1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx";function v1e(){const e=Sn(),t=gt(i=>i.options.threshold);return C(Vl,{label:"Threshold",min:0,max:1e3,step:.1,onChange:i=>e(qhe(i)),value:t,isInteger:!1},void 0,!1,{fileName:h1e,lineNumber:19,columnNumber:5},this)}var g1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx";function b1e(){const e=Sn(),t=gt(i=>i.options.perlin);return C(Vl,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:i=>e(Zhe(i)),value:t,isInteger:!1},void 0,!1,{fileName:g1e,lineNumber:17,columnNumber:5},this)}var Ec="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/SeedOptions.tsx";const MU=()=>C(Sr,{gap:2,direction:"column",children:[C(f1e,{},void 0,!1,{fileName:Ec,lineNumber:14,columnNumber:7},void 0),C(Sr,{gap:2,children:[C(p1e,{},void 0,!1,{fileName:Ec,lineNumber:16,columnNumber:9},void 0),C(m1e,{},void 0,!1,{fileName:Ec,lineNumber:17,columnNumber:9},void 0)]},void 0,!0,{fileName:Ec,lineNumber:15,columnNumber:7},void 0),C(Sr,{gap:2,children:C(v1e,{},void 0,!1,{fileName:Ec,lineNumber:20,columnNumber:9},void 0)},void 0,!1,{fileName:Ec,lineNumber:19,columnNumber:7},void 0),C(Sr,{gap:2,children:C(b1e,{},void 0,!1,{fileName:Ec,lineNumber:23,columnNumber:9},void 0)},void 0,!1,{fileName:Ec,lineNumber:22,columnNumber:7},void 0)]},void 0,!0,{fileName:Ec,lineNumber:13,columnNumber:5},void 0);var I6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Upscale/Upscale.tsx";function DU(){const e=gt(o=>o.system.isESRGANAvailable),t=gt(o=>o.options.shouldRunESRGAN),n=Sn();return C(Sr,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[C("p",{children:"Upscale"},void 0,!1,{fileName:I6,lineNumber:30,columnNumber:7},this),C(pm,{isDisabled:!e,isChecked:t,onChange:o=>n(Jhe(o.target.checked))},void 0,!1,{fileName:I6,lineNumber:31,columnNumber:7},this)]},void 0,!0,{fileName:I6,lineNumber:24,columnNumber:5},this)}var F6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx";const y1e=Ga(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),S1e=Ga(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),PE=()=>{const e=Sn(),{upscalingLevel:t,upscalingStrength:n}=gt(y1e),{isESRGANAvailable:i}=gt(S1e);return C("div",{className:"upscale-options",children:[C(Rb,{isDisabled:!i,label:"Scale",value:t,onChange:c=>e(y8(Number(c.target.value))),validValues:A0e},void 0,!1,{fileName:F6,lineNumber:64,columnNumber:7},void 0),C(Vl,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:c=>e(S8(c)),value:n,isInteger:!1},void 0,!1,{fileName:F6,lineNumber:71,columnNumber:7},void 0)]},void 0,!0,{fileName:F6,lineNumber:63,columnNumber:5},void 0)};var x1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx";function C1e(){const e=gt(i=>i.options.shouldGenerateVariations),t=Sn();return C(pm,{isChecked:e,width:"auto",onChange:i=>t(Khe(i.target.checked))},void 0,!1,{fileName:x1e,lineNumber:22,columnNumber:5},this)}var z6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/Variations.tsx";function PU(){return C(Sr,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[C("p",{children:"Variations"},void 0,!1,{fileName:z6,lineNumber:13,columnNumber:7},this),C(C1e,{},void 0,!1,{fileName:z6,lineNumber:14,columnNumber:7},this)]},void 0,!0,{fileName:z6,lineNumber:7,columnNumber:5},this)}var B6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAIInput.tsx";function N1e(e){const{label:t,styleClass:n,isDisabled:i=!1,fontSize:o="1rem",width:u,isInvalid:c,...p}=e;return C(fd,{className:`input ${n}`,isInvalid:c,isDisabled:i,flexGrow:1,children:[C(sm,{fontSize:o,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t},void 0,!1,{fileName:B6,lineNumber:30,columnNumber:7},this),C(M_,{...p,className:"input-entry",size:"sm",width:u},void 0,!1,{fileName:B6,lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:B6,lineNumber:24,columnNumber:5},this)}var w1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx";function _1e(){const e=gt(o=>o.options.seedWeights),t=gt(o=>o.options.shouldGenerateVariations),n=Sn(),i=o=>n(nU(o.target.value));return C(N1e,{label:"Seed Weights",value:e,isInvalid:t&&!(RE(e)||e===""),isDisabled:!t,onChange:i},void 0,!1,{fileName:w1e,lineNumber:26,columnNumber:5},this)}var E1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx";function T1e(){const e=gt(o=>o.options.variationAmount),t=gt(o=>o.options.shouldGenerateVariations),n=Sn();return C(Vl,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:o=>n(Xhe(o)),isInteger:!1},void 0,!1,{fileName:E1e,lineNumber:24,columnNumber:5},this)}var U6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/VariationsOptions.tsx";const IU=()=>C(Sr,{gap:2,direction:"column",children:[C(T1e,{},void 0,!1,{fileName:U6,lineNumber:11,columnNumber:7},void 0),C(_1e,{},void 0,!1,{fileName:U6,lineNumber:12,columnNumber:7},void 0)]},void 0,!0,{fileName:U6,lineNumber:10,columnNumber:5},void 0);var $6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainAdvancedOptions.tsx";function FU(){const e=gt(i=>i.options.showAdvancedOptions),t=Sn();return C("div",{className:"advanced_options_checker",children:[C("input",{type:"checkbox",name:"advanced_options",id:"",onChange:i=>t(tve(i.target.checked)),checked:e},void 0,!1,{fileName:$6,lineNumber:16,columnNumber:7},this),C("label",{htmlFor:"advanced_options",children:"Advanced Options"},void 0,!1,{fileName:$6,lineNumber:23,columnNumber:7},this)]},void 0,!0,{fileName:$6,lineNumber:15,columnNumber:5},this)}var R1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainCFGScale.tsx";function A1e(){const e=Sn(),t=gt(i=>i.options.cfgScale);return C(Vl,{label:"CFG Scale",step:.5,min:1,max:200,onChange:i=>e(YB(i)),value:t,width:IE,fontSize:Bv,styleClass:"main-option-block",textAlign:"center",isInteger:!1},void 0,!1,{fileName:R1e,lineNumber:14,columnNumber:5},this)}var k1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainHeight.tsx";function L1e(){const e=gt(i=>i.options.height),t=Sn();return C(Rb,{label:"Height",value:e,flexGrow:1,onChange:i=>t(qB(Number(i.target.value))),validValues:R0e,fontSize:Bv,styleClass:"main-option-block"},void 0,!1,{fileName:k1e,lineNumber:16,columnNumber:5},this)}var O1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainIterations.tsx";function M1e(){const e=Sn(),t=gt(i=>i.options.iterations);return C(Vl,{label:"Images",step:1,min:1,max:9999,onChange:i=>e(Yhe(i)),value:t,width:IE,fontSize:Bv,styleClass:"main-option-block",textAlign:"center"},void 0,!1,{fileName:O1e,lineNumber:16,columnNumber:5},this)}var D1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainSampler.tsx";function P1e(){const e=gt(i=>i.options.sampler),t=Sn();return C(Rb,{label:"Sampler",value:e,onChange:i=>t(KB(i.target.value)),validValues:E0e,fontSize:Bv,styleClass:"main-option-block"},void 0,!1,{fileName:D1e,lineNumber:16,columnNumber:5},this)}var I1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainSteps.tsx";function F1e(){const e=Sn(),t=gt(i=>i.options.steps);return C(Vl,{label:"Steps",min:1,max:9999,step:1,onChange:i=>e(GB(i)),value:t,width:IE,fontSize:Bv,styleClass:"main-option-block",textAlign:"center"},void 0,!1,{fileName:I1e,lineNumber:14,columnNumber:5},this)}var z1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainWidth.tsx";function B1e(){const e=gt(i=>i.options.width),t=Sn();return C(Rb,{label:"Width",value:e,flexGrow:1,onChange:i=>t(ZB(Number(i.target.value))),validValues:T0e,fontSize:Bv,styleClass:"main-option-block"},void 0,!1,{fileName:z1e,lineNumber:16,columnNumber:5},this)}var gu="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainOptions.tsx";const Bv="0.9rem",IE="auto";function zU(){return C("div",{className:"main-options",children:C("div",{className:"main-options-list",children:[C("div",{className:"main-options-row",children:[C(M1e,{},void 0,!1,{fileName:gu,lineNumber:16,columnNumber:11},this),C(F1e,{},void 0,!1,{fileName:gu,lineNumber:17,columnNumber:11},this),C(A1e,{},void 0,!1,{fileName:gu,lineNumber:18,columnNumber:11},this)]},void 0,!0,{fileName:gu,lineNumber:15,columnNumber:9},this),C("div",{className:"main-options-row",children:[C(B1e,{},void 0,!1,{fileName:gu,lineNumber:21,columnNumber:11},this),C(L1e,{},void 0,!1,{fileName:gu,lineNumber:22,columnNumber:11},this),C(P1e,{},void 0,!1,{fileName:gu,lineNumber:23,columnNumber:11},this)]},void 0,!0,{fileName:gu,lineNumber:20,columnNumber:9},this)]},void 0,!0,{fileName:gu,lineNumber:14,columnNumber:7},this)},void 0,!1,{fileName:gu,lineNumber:13,columnNumber:5},this)}var BU={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},WM=Ae.createContext&&Ae.createContext(BU),F4="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/react-icons/lib/esm/iconBase.js",nd=globalThis&&globalThis.__assign||function(){return nd=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne.system,e=>e.shouldDisplayGuides),Q1e=({children:e,feature:t})=>{const n=gt(X1e),{text:i}=r1e[t];return n?C(aE,{trigger:"hover",children:[C(uE,{children:C(Xs,{children:e},void 0,!1,{fileName:Yh,lineNumber:31,columnNumber:9},void 0)},void 0,!1,{fileName:Yh,lineNumber:30,columnNumber:7},void 0),C(lE,{className:"guide-popover-content",maxWidth:"400px",onClick:o=>o.preventDefault(),cursor:"initial",children:[C(oE,{className:"guide-popover-arrow"},void 0,!1,{fileName:Yh,lineNumber:39,columnNumber:9},void 0),C("div",{className:"guide-popover-guide-content",children:i},void 0,!1,{fileName:Yh,lineNumber:40,columnNumber:9},void 0)]},void 0,!0,{fileName:Yh,lineNumber:33,columnNumber:7},void 0)]},void 0,!0,{fileName:Yh,lineNumber:29,columnNumber:5},void 0):C(Ui,{},void 0,!1)};var j6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/GuideIcon.tsx";const J1e=qe(({feature:e,icon:t=$U},n)=>C(Q1e,{feature:e,children:C(Xs,{ref:n,children:C(ms,{as:t},void 0,!1,{fileName:j6,lineNumber:16,columnNumber:9},void 0)},void 0,!1,{fileName:j6,lineNumber:15,columnNumber:7},void 0)},void 0,!1,{fileName:j6,lineNumber:14,columnNumber:5},void 0));var qh="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx";function ege(e){const{header:t,feature:n,options:i}=e;return C(VI,{className:"advanced-settings-item",children:[C("h2",{children:C($I,{className:"advanced-settings-header",children:[t,C(J1e,{feature:n},void 0,!1,{fileName:qh,lineNumber:25,columnNumber:11},this),C(jI,{},void 0,!1,{fileName:qh,lineNumber:26,columnNumber:11},this)]},void 0,!0,{fileName:qh,lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:qh,lineNumber:22,columnNumber:7},this),C(HI,{className:"advanced-settings-panel",children:i},void 0,!1,{fileName:qh,lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:qh,lineNumber:21,columnNumber:5},this)}var YM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/OptionsAccordion.tsx";const VU=e=>{const{accordionInfo:t}=e,n=gt(c=>c.system.openAccordions),i=Sn();return C(WI,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:c=>i(pve(c)),className:"advanced-settings",children:(()=>{const c=[];return t&&Object.keys(t).forEach(p=>{c.push(C(ege,{header:t[p].header,feature:t[p].feature,options:t[p].options},p,!1,{fileName:YM,lineNumber:40,columnNumber:11},void 0))}),c})()},void 0,!1,{fileName:YM,lineNumber:53,columnNumber:5},void 0)};var qM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/HiresOptions.tsx";const tge=()=>{const e=Sn(),t=gt(i=>i.options.hiresFix);return C(Sr,{gap:2,direction:"column",children:C(pm,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:i=>e(QB(i.target.checked))},void 0,!1,{fileName:qM,lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:qM,lineNumber:21,columnNumber:5},void 0)};var ZM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/SeamlessOptions.tsx";const nge=()=>{const e=Sn(),t=gt(i=>i.options.seamless);return C(Sr,{gap:2,direction:"column",children:C(pm,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:i=>e(XB(i.target.checked))},void 0,!1,{fileName:ZM,lineNumber:18,columnNumber:7},void 0)},void 0,!1,{fileName:ZM,lineNumber:17,columnNumber:5},void 0)};var V6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/OutputOptions.tsx";const HU=()=>C(Sr,{gap:2,direction:"column",children:[C(nge,{},void 0,!1,{fileName:V6,lineNumber:10,columnNumber:7},void 0),C(tge,{},void 0,!1,{fileName:V6,lineNumber:11,columnNumber:7},void 0)]},void 0,!0,{fileName:V6,lineNumber:9,columnNumber:5},void 0);var KM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAIButton.tsx";const vg=e=>{const{label:t,tooltip:n="",size:i="sm",...o}=e;return C(Ca,{label:n,children:C(Du,{size:i,...o,children:t},void 0,!1,{fileName:KM,lineNumber:17,columnNumber:7},void 0)},void 0,!1,{fileName:KM,lineNumber:16,columnNumber:5},void 0)},XM=Ga(e=>e.options,e=>({prompt:e.prompt,shouldGenerateVariations:e.shouldGenerateVariations,seedWeights:e.seedWeights,maskPath:e.maskPath,initialImagePath:e.initialImagePath,seed:e.seed,activeTab:e.activeTab}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),FE=Ga(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),WU=()=>{const{prompt:e}=gt(XM),{shouldGenerateVariations:t,seedWeights:n,maskPath:i,initialImagePath:o,seed:u,activeTab:c}=gt(XM),{isProcessing:p,isConnected:h}=gt(FE);return k.exports.useMemo(()=>!(!e||Boolean(e.match(/^[\s\r\n]+$/))||e&&!o&&c===1||i&&!o||p||!h||t&&(!(RE(n)||n==="")||u===-1)),[e,i,o,p,h,t,n,u,c])};var rge="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ProcessButtons/InvokeButton.tsx";function ige(){const e=Sn(),t=WU();return C(vg,{label:"Invoke","aria-label":"Invoke",type:"submit",isDisabled:!t,onClick:()=>{e(T8())},className:"invoke-btn"},void 0,!1,{fileName:rge,lineNumber:16,columnNumber:5},this)}var QM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAIIconButton.tsx";const Wp=e=>{const{tooltip:t="",tooltipPlacement:n="bottom",onClick:i,...o}=e;return C(Ca,{label:t,hasArrow:!0,placement:n,children:C(bi,{...o,cursor:i?"pointer":"unset",onClick:i},void 0,!1,{fileName:QM,lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:QM,lineNumber:21,columnNumber:5},void 0)};var JM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ProcessButtons/CancelButton.tsx";function age(){const e=Sn(),{isProcessing:t,isConnected:n}=gt(FE),i=()=>e(C0e());return ii("shift+x",()=>{(n||t)&&i()},[n,t]),C(Wp,{icon:C(K1e,{},void 0,!1,{fileName:JM,lineNumber:26,columnNumber:13},this),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!n||!t,onClick:i,className:"cancel-btn"},void 0,!1,{fileName:JM,lineNumber:25,columnNumber:5},this)}var H6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ProcessButtons/ProcessButtons.tsx";const GU=()=>C("div",{className:"process-buttons",children:[C(ige,{},void 0,!1,{fileName:H6,lineNumber:10,columnNumber:7},void 0),C(age,{},void 0,!1,{fileName:H6,lineNumber:11,columnNumber:7},void 0)]},void 0,!0,{fileName:H6,lineNumber:9,columnNumber:5},void 0);var W6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/PromptInput/PromptInput.tsx";const oge=Ga(e=>e.options,e=>({prompt:e.prompt}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),YU=()=>{const e=k.exports.useRef(null),{prompt:t}=gt(oge),{isProcessing:n}=gt(FE),i=Sn(),o=WU(),u=p=>{i(WB(p.target.value))};ii("ctrl+enter",()=>{o&&i(T8())},[o]),ii("alt+a",()=>{e.current?.focus()},[]);const c=p=>{p.key==="Enter"&&p.shiftKey===!1&&o&&(p.preventDefault(),i(T8()))};return C("div",{className:"prompt-bar",children:C(fd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),isDisabled:n,children:C(Wz,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:u,onKeyDown:c,resize:"vertical",height:30,ref:e},void 0,!1,{fileName:W6,lineNumber:73,columnNumber:9},void 0)},void 0,!1,{fileName:W6,lineNumber:69,columnNumber:7},void 0)},void 0,!1,{fileName:W6,lineNumber:68,columnNumber:5},void 0)};var Xi="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx";function sge(){const e=gt(n=>n.options.showAdvancedOptions),t={seed:{header:C(Xs,{flex:"1",textAlign:"left",children:"Seed"},void 0,!1,{fileName:Xi,lineNumber:29,columnNumber:9},this),feature:zl.SEED,options:C(MU,{},void 0,!1,{fileName:Xi,lineNumber:34,columnNumber:16},this)},variations:{header:C(PU,{},void 0,!1,{fileName:Xi,lineNumber:37,columnNumber:15},this),feature:zl.VARIATIONS,options:C(IU,{},void 0,!1,{fileName:Xi,lineNumber:39,columnNumber:16},this)},face_restore:{header:C(OU,{},void 0,!1,{fileName:Xi,lineNumber:42,columnNumber:15},this),feature:zl.FACE_CORRECTION,options:C(DE,{},void 0,!1,{fileName:Xi,lineNumber:44,columnNumber:16},this)},upscale:{header:C(DU,{},void 0,!1,{fileName:Xi,lineNumber:47,columnNumber:15},this),feature:zl.UPSCALE,options:C(PE,{},void 0,!1,{fileName:Xi,lineNumber:49,columnNumber:16},this)},other:{header:C(Xs,{flex:"1",textAlign:"left",children:"Other"},void 0,!1,{fileName:Xi,lineNumber:53,columnNumber:9},this),feature:zl.OTHER,options:C(HU,{},void 0,!1,{fileName:Xi,lineNumber:58,columnNumber:16},this)}};return C("div",{className:"image-to-image-panel",children:[C(YU,{},void 0,!1,{fileName:Xi,lineNumber:64,columnNumber:7},this),C(GU,{},void 0,!1,{fileName:Xi,lineNumber:65,columnNumber:7},this),C(zU,{},void 0,!1,{fileName:Xi,lineNumber:66,columnNumber:7},this),C(u1e,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"},void 0,!1,{fileName:Xi,lineNumber:67,columnNumber:7},this),C(s1e,{},void 0,!1,{fileName:Xi,lineNumber:71,columnNumber:7},this),C(FU,{},void 0,!1,{fileName:Xi,lineNumber:72,columnNumber:7},this),e?C(VU,{accordionInfo:t},void 0,!1,{fileName:Xi,lineNumber:74,columnNumber:9},this):null]},void 0,!0,{fileName:Xi,lineNumber:63,columnNumber:5},this)}function lge(e){return hr({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function uge(e){return hr({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function cge(e){return hr({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function fge(e){return hr({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function dge(e){return hr({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function pge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function mge(e){return hr({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function hge(e){return hr({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function vge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function gge(e){return hr({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function bge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"}}]})(e)}function yge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function Sge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"}}]})(e)}function xge(e){return hr({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function Cge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}var Nge=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Ab(e,t){var n=wge(e);if(typeof n.path!="string"){var i=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof i=="string"&&i.length>0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function wge(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var i=t.split(".").pop().toLowerCase(),o=Nge.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var _ge=[".DS_Store","Thumbs.db"];function Ege(e){return Ov(this,void 0,void 0,function(){return Mv(this,function(t){return CS(e)&&Tge(e.dataTransfer)?[2,Lge(e.dataTransfer,e.type)]:Rge(e)?[2,Age(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,kge(e)]:[2,[]]})})}function Tge(e){return CS(e)}function Rge(e){return CS(e)&&CS(e.target)}function CS(e){return typeof e=="object"&&e!==null}function Age(e){return A8(e.target.files).map(function(t){return Ab(t)})}function kge(e){return Ov(this,void 0,void 0,function(){var t;return Mv(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(i){return Ab(i)})]}})})}function Lge(e,t){return Ov(this,void 0,void 0,function(){var n,i;return Mv(this,function(o){switch(o.label){case 0:return e.items?(n=A8(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Oge))]):[3,2];case 1:return i=o.sent(),[2,eD(qU(i))];case 2:return[2,eD(A8(e.files).map(function(u){return Ab(u)}))]}})})}function eD(e){return e.filter(function(t){return _ge.indexOf(t.name)===-1})}function A8(e){if(e===null)return[];for(var t=[],n=0;n=j)return l;var Q=g-Vu(E);if(Q<1)return E;var se=q?Os(q,0,Q).join(""):l.slice(0,Q);if(D===n)return se+E;if(q&&(Q+=se.length-Q),ih(D)){if(l.slice(Q).search(D)){var Me,ke=se;for(D.global||(D=ll(D.source,Xn(Vn.exec(D))+"g")),D.lastIndex=0;Me=D.exec(ke);)var Ie=Me.index;se=se.slice(0,Ie===n?Q:Ie)}}else if(l.indexOf(aa(D),Q)!=Q){var Qe=se.lastIndexOf(D);Qe>-1&&(se=se.slice(0,Qe))}return se+E}function DC(l){return l=Xn(l),l&&Ci.test(l)?l.replace(jn,y3):l}var PC=uf(function(l,d,g){return l+(g?" ":"")+d.toUpperCase()}),a1=py("toUpperCase");function o1(l,d,g){return l=Xn(l),d=g?n:d,d===n?b3(l)?C3(l):$v(l):l.match(d)||[]}var y2=bn(function(l,d){try{return yt(l,n,d)}catch(g){return eu(g)?g:new rn(g)}}),IC=yl(function(l,d){return Rt(d,function(g){g=Da(g),Rs(l,g,eh(l[g],l))}),l});function FC(l){var d=l==null?0:l.length,g=Pt();return l=d?Mn(l,function(E){if(typeof E[1]!="function")throw new Xa(c);return[g(E[0]),E[1]]}):[],bn(function(E){for(var D=-1;++Dbe)return[];var g=we,E=si(l,we);d=Pt(d),l-=we;for(var D=hm(E,d);++g0||d<0)?new An(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),d!==n&&(d=an(d),g=d<0?g.dropRight(-d):g.take(d-l)),g)},An.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},An.prototype.toArray=function(){return this.take(we)},gr(An.prototype,function(l,d){var g=/^(?:filter|find|map|reject)|While$/.test(d),E=/^(?:head|last)$/.test(d),D=B[E?"take"+(d=="last"?"Right":""):d],j=E||/^find/.test(d);!D||(B.prototype[d]=function(){var q=this.__wrapped__,Q=E?[1]:arguments,se=q instanceof An,Me=Q[0],ke=se||ln(q),Ie=function(yn){var kn=D.apply(B,La([yn],Q));return E&&Qe?kn[0]:kn};ke&&g&&typeof Me=="function"&&Me.length!=1&&(se=ke=!1);var Qe=this.__chain__,vt=!!this.__actions__.length,It=j&&!Qe,mn=se&&!vt;if(!j&&ke){q=mn?q:new An(this);var $t=l.apply(q,Q);return $t.__actions__.push({func:Qm,args:[Ie],thisArg:n}),new bo($t,Qe)}return It&&mn?l.apply(this,Q):($t=this.thru(Ie),It?E?$t.value()[0]:$t.value():$t)})}),Rt(["pop","push","shift","sort","splice","unshift"],function(l){var d=ul[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",E=/^(?:pop|shift)$/.test(l);B.prototype[l]=function(){var D=arguments;if(E&&!this.__chain__){var j=this.value();return d.apply(ln(j)?j:[],D)}return this[g](function(q){return d.apply(ln(q)?q:[],D)})}}),gr(An.prototype,function(l,d){var g=B[d];if(g){var E=g.name+"";er.call(Zc,E)||(Zc[E]=[]),Zc[E].push({name:d,func:g})}}),Zc[cf(n,z).name]=[{name:"wrapper",func:n}],An.prototype.clone=zt,An.prototype.reverse=Qc,An.prototype.value=Wr,B.prototype.at=Cx,B.prototype.chain=Nx,B.prototype.commit=wx,B.prototype.next=By,B.prototype.plant=tp,B.prototype.reverse=_x,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=Uy,B.prototype.first=B.prototype.head,Cd&&(B.prototype[Cd]=z0),B},$c=N3();L?((L.exports=$c)._=$c,S._=$c):Kt._=$c}).call(Ac)})(Wa,Wa.exports);const tb=Wa.exports,ive={currentImageUuid:"",images:[],areMoreImagesAvailable:!0},iU=xE({name:"gallery",initialState:ive,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const n=t.payload,i=e.images.filter(o=>o.uuid!==n);if(n===e.currentImageUuid){const o=e.images.findIndex(c=>c.uuid===n),u=Wa.exports.clamp(o,0,i.length-1);e.currentImage=i.length?i[u]:void 0,e.currentImageUuid=i.length?i[u].uuid:""}e.images=i},addImage:(e,t)=>{const n=t.payload,{uuid:i,url:o,mtime:u}=n;e.images.find(c=>c.url===o&&c.mtime===u)||(e.images.unshift(n),e.currentImageUuid=i,e.intermediateImage=void 0,e.currentImage=n,e.latest_mtime=u)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{images:t,currentImage:n}=e;if(n){const i=t.findIndex(o=>o.uuid===n.uuid);if(tb.inRange(i,0,t.length)){const o=t[i+1];e.currentImage=o,e.currentImageUuid=o.uuid}}},selectPrevImage:e=>{const{images:t,currentImage:n}=e;if(n){const i=t.findIndex(o=>o.uuid===n.uuid);if(tb.inRange(i,1,t.length+1)){const o=t[i-1];e.currentImage=o,e.currentImageUuid=o.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:i}=t.payload;if(n.length>0){const o=n.filter(u=>!e.images.find(c=>c.url===u.url&&c.mtime===u.mtime));if(e.images=e.images.concat(o).sort((u,c)=>c.mtime-u.mtime),!e.currentImage){const u=n[0];e.currentImage=u,e.currentImageUuid=u.uuid}e.latest_mtime=n[0].mtime,e.earliest_mtime=n[n.length-1].mtime}i!==void 0&&(e.areMoreImagesAvailable=i)}}}),{addImage:E6,clearIntermediateImage:NM,removeImage:ave,setCurrentImage:ove,addGalleryImages:sve,setIntermediateImage:lve,selectNextImage:aU,selectPrevImage:oU}=iU.actions,uve=iU.reducer,cve={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgress:!1,shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",hasError:!1,wasErrorSeen:!0},fve=cve,sU=xE({name:"system",initialState:fve,reducers:{setShouldDisplayInProgress:(e,t)=>{e.shouldDisplayInProgress=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Server error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:i,level:o}=t.payload,c={timestamp:n,message:i,level:o||"info"};e.log.push(c)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"}}}),{setShouldDisplayInProgress:dve,setIsProcessing:M4,addLogEntry:Ao,setShouldShowLogViewer:wM,setIsConnected:_M,setSocketId:Tye,setShouldConfirmOnDelete:lU,setOpenAccordions:pve,setSystemStatus:mve,setCurrentStatus:EM,setSystemConfig:hve,setShouldDisplayGuides:vve,processingCanceled:gve,errorOccurred:bve,errorSeen:uU}=sU.actions,yve=sU.reducer,Iu=Object.create(null);Iu.open="0";Iu.close="1";Iu.ping="2";Iu.pong="3";Iu.message="4";Iu.upgrade="5";Iu.noop="6";const D4=Object.create(null);Object.keys(Iu).forEach(e=>{D4[Iu[e]]=e});const Sve={type:"error",data:"parser error"},xve=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Cve=typeof ArrayBuffer=="function",Nve=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cU=({type:e,data:t},n,i)=>xve&&t instanceof Blob?n?i(t):TM(t,i):Cve&&(t instanceof ArrayBuffer||Nve(t))?n?i(t):TM(new Blob([t]),i):i(Iu[e]+(t||"")),TM=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+i)},n.readAsDataURL(e)},RM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hg=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,i,o=0,u,c,p,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const v=new ArrayBuffer(t),b=new Uint8Array(v);for(i=0;i>4,b[o++]=(c&15)<<4|p>>2,b[o++]=(p&3)<<6|h&63;return v},_ve=typeof ArrayBuffer=="function",fU=(e,t)=>{if(typeof e!="string")return{type:"message",data:dU(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Eve(e.substring(1),t)}:D4[n]?e.length>1?{type:D4[n],data:e.substring(1)}:{type:D4[n]}:Sve},Eve=(e,t)=>{if(_ve){const n=wve(e);return dU(n,t)}else return{base64:!0,data:e}},dU=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},pU=String.fromCharCode(30),Tve=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((u,c)=>{cU(u,!1,p=>{i[c]=p,++o===n&&t(i.join(pU))})})},Rve=(e,t)=>{const n=e.split(pU),i=[];for(let o=0;otypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function hU(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const kve=setTimeout,Lve=clearTimeout;function c3(e,t){t.useNativeTimers?(e.setTimeoutFn=kve.bind(ed),e.clearTimeoutFn=Lve.bind(ed)):(e.setTimeoutFn=setTimeout.bind(ed),e.clearTimeoutFn=clearTimeout.bind(ed))}const Ove=1.33;function Mve(e){return typeof e=="string"?Dve(e):Math.ceil((e.byteLength||e.size)*Ove)}function Dve(e){let t=0,n=0;for(let i=0,o=e.length;i=57344?n+=3:(i++,n+=4);return n}class Pve extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class vU extends Si{constructor(t){super(),this.writable=!1,c3(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,i){return super.emitReserved("error",new Pve(t,n,i)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=fU(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const gU="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),C8=64,Ive={};let AM=0,n4=0,kM;function LM(e){let t="";do t=gU[e%C8]+t,e=Math.floor(e/C8);while(e>0);return t}function bU(){const e=LM(+new Date);return e!==kM?(AM=0,kM=e):e+"."+LM(AM++)}for(;n4{this.readyState="paused",t()};if(this.polling||!this.writable){let i=0;this.polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};Rve(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Tve(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let i="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=bU()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port);const o=yU(t),u=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(u?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Ou(this.uri(),t)}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,u)=>{this.onError("xhr post error",o,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class Ou extends Si{constructor(t,n){super(),c3(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=hU(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new xU(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ou.requestsCount++,Ou.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Bve,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ou.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ou.requestsCount=0;Ou.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",OM);else if(typeof addEventListener=="function"){const e="onpagehide"in ed?"pagehide":"unload";addEventListener(e,OM,!1)}}function OM(){for(let e in Ou.requests)Ou.requests.hasOwnProperty(e)&&Ou.requests[e].abort()}const jve=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),r4=ed.WebSocket||ed.MozWebSocket,MM=!0,Vve="arraybuffer",DM=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Hve extends vU{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,i=DM?{}:hU(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=MM&&!DM?n?new r4(t,n):new r4(t):new r4(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||Vve,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const c={};try{MM&&this.ws.send(u)}catch{}o&&jve(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let i="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(i=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=bU()),this.supportsBinary||(t.b64=1);const o=yU(t),u=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(u?"["+this.opts.hostname+"]":this.opts.hostname)+i+this.opts.path+(o.length?"?"+o:"")}check(){return!!r4}}const Wve={websocket:Hve,polling:$ve},Gve=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yve=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function N8(e){const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=Gve.exec(e||""),u={},c=14;for(;c--;)u[Yve[c]]=o[c]||"";return n!=-1&&i!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=qve(u,u.path),u.queryKey=Zve(u,u.query),u}function qve(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&i.splice(0,1),t.substr(t.length-1,1)=="/"&&i.splice(i.length-1,1),i}function Zve(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,u){o&&(n[o]=u)}),n}class Zf extends Si{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=N8(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=N8(n.host).host),c3(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=Fve(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=mU,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Wve[t](i)}open(){let t;if(this.opts.rememberUpgrade&&Zf.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),i=!1;Zf.priorWebsocketSuccess=!1;const o=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",x=>{if(!i)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Zf.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(b(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const N=new Error("probe error");N.transport=n.name,this.emitReserved("upgradeError",N)}}))};function u(){i||(i=!0,b(),n.close(),n=null)}const c=x=>{const N=new Error("probe error: "+x);N.transport=n.name,u(),this.emitReserved("upgradeError",N)};function p(){c("transport closed")}function h(){c("socket closed")}function v(x){n&&x.name!==n.name&&u()}const b=()=>{n.removeListener("open",o),n.removeListener("error",c),n.removeListener("close",p),this.off("close",h),this.off("upgrading",v)};n.once("open",o),n.once("error",c),n.once("close",p),this.once("close",h),this.once("upgrading",v),n.open()}onOpen(){if(this.readyState="open",Zf.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i0&&n>this.maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}write(t,n,i){return this.sendPacket("message",t,n,i),this}send(t,n,i){return this.sendPacket("message",t,n,i),this}sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const u={type:t,data:n,options:i};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}onError(t){Zf.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let i=0;const o=t.length;for(;itypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,CU=Object.prototype.toString,Jve=typeof Blob=="function"||typeof Blob<"u"&&CU.call(Blob)==="[object BlobConstructor]",e0e=typeof File=="function"||typeof File<"u"&&CU.call(File)==="[object FileConstructor]";function AE(e){return Xve&&(e instanceof ArrayBuffer||Qve(e))||Jve&&e instanceof Blob||e0e&&e instanceof File}function P4(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n=0&&e.num0;case qn.ACK:case qn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class a0e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=n0e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const o0e=Object.freeze(Object.defineProperty({__proto__:null,protocol:r0e,get PacketType(){return qn},Encoder:i0e,Decoder:kE},Symbol.toStringTag,{value:"Module"}));function Fl(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const s0e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class NU extends Si{constructor(t,n,i){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Fl(t,"open",this.onopen.bind(this)),Fl(t,"packet",this.onpacket.bind(this)),Fl(t,"error",this.onerror.bind(this)),Fl(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(s0e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const i={type:qn.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,p=n.pop();this._registerAckCallback(c,p),i.id=c}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(t,n){const i=this.flags.timeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let u=0;u{this.io.clearTimeoutFn(o),n.apply(this,[null,...u])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:qn.CONNECT,data:t})}):this.packet({type:qn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case qn.CONNECT:if(t.data&&t.data.sid){const o=t.data.sid;this.onconnect(o)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case qn.EVENT:case qn.BINARY_EVENT:this.onevent(t);break;case qn.ACK:case qn.BINARY_ACK:this.onack(t);break;case qn.DISCONNECT:this.ondisconnect();break;case qn.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:qn.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:qn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i0&&e.jitter<=1?e.jitter:0,this.attempts=0}zv.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};zv.prototype.reset=function(){this.attempts=0};zv.prototype.setMin=function(e){this.ms=e};zv.prototype.setMax=function(e){this.max=e};zv.prototype.setJitter=function(e){this.jitter=e};class E8 extends Si{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,c3(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new zv({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||o0e;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zf(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=Fl(n,"open",function(){i.onopen(),t&&t()}),u=Fl(n,"error",c=>{i.cleanup(),i._readyState="closed",this.emitReserved("error",c),t?t(c):i.maybeReconnectOnOpen()});if(this._timeout!==!1){const c=this._timeout;c===0&&o();const p=this.setTimeoutFn(()=>{o(),n.close(),n.emit("error",new Error("timeout"))},c);this.opts.autoUnref&&p.unref(),this.subs.push(function(){clearTimeout(p)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Fl(t,"ping",this.onping.bind(this)),Fl(t,"data",this.ondata.bind(this)),Fl(t,"error",this.onerror.bind(this)),Fl(t,"close",this.onclose.bind(this)),Fl(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch{this.onclose("parse error")}}ondecoded(t){this.emitReserved("packet",t)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i||(i=new NU(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(function(){clearTimeout(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ag={};function I4(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Kve(e,t.path||"/socket.io"),i=n.source,o=n.id,u=n.path,c=ag[o]&&u in ag[o].nsps,p=t.forceNew||t["force new connection"]||t.multiplex===!1||c;let h;return p?h=new E8(i,t):(ag[o]||(ag[o]=new E8(i,t)),h=ag[o]),n.query&&!t.query&&(t.query=n.queryKey),h.socket(n.path,t)}Object.assign(I4,{Manager:E8,Socket:NU,io:I4,connect:I4});let i4;const l0e=new Uint8Array(16);function u0e(){if(!i4&&(i4=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!i4))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i4(l0e)}const ya=[];for(let e=0;e<256;++e)ya.push((e+256).toString(16).slice(1));function c0e(e,t=0){return(ya[e[t+0]]+ya[e[t+1]]+ya[e[t+2]]+ya[e[t+3]]+"-"+ya[e[t+4]]+ya[e[t+5]]+"-"+ya[e[t+6]]+ya[e[t+7]]+"-"+ya[e[t+8]]+ya[e[t+9]]+"-"+ya[e[t+10]]+ya[e[t+11]]+ya[e[t+12]]+ya[e[t+13]]+ya[e[t+14]]+ya[e[t+15]]).toLowerCase()}const f0e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),PM={randomUUID:f0e};function a4(e,t,n){if(PM.randomUUID&&!t&&!e)return PM.randomUUID();e=e||{};const i=e.random||(e.rng||u0e)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=i[o];return t}return c0e(i)}var d0e=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,p0e=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,m0e=/[^-+\dA-Z]/g;function ko(e,t,n,i){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(IM[t]||t||IM.default);var o=t.slice(0,4);(o==="UTC:"||o==="GMT:")&&(t=t.slice(4),n=!0,o==="GMT:"&&(i=!0));var u=function(){return n?"getUTC":"get"},c=function(){return e[u()+"Date"]()},p=function(){return e[u()+"Day"]()},h=function(){return e[u()+"Month"]()},v=function(){return e[u()+"FullYear"]()},b=function(){return e[u()+"Hours"]()},x=function(){return e[u()+"Minutes"]()},N=function(){return e[u()+"Seconds"]()},_=function(){return e[u()+"Milliseconds"]()},T=function(){return n?0:e.getTimezoneOffset()},A=function(){return h0e(e)},M=function(){return v0e(e)},z={d:function(){return c()},dd:function(){return as(c())},ddd:function(){return To.dayNames[p()]},DDD:function(){return FM({y:v(),m:h(),d:c(),_:u(),dayName:To.dayNames[p()],short:!0})},dddd:function(){return To.dayNames[p()+7]},DDDD:function(){return FM({y:v(),m:h(),d:c(),_:u(),dayName:To.dayNames[p()+7]})},m:function(){return h()+1},mm:function(){return as(h()+1)},mmm:function(){return To.monthNames[h()]},mmmm:function(){return To.monthNames[h()+12]},yy:function(){return String(v()).slice(2)},yyyy:function(){return as(v(),4)},h:function(){return b()%12||12},hh:function(){return as(b()%12||12)},H:function(){return b()},HH:function(){return as(b())},M:function(){return x()},MM:function(){return as(x())},s:function(){return N()},ss:function(){return as(N())},l:function(){return as(_(),3)},L:function(){return as(Math.floor(_()/10))},t:function(){return b()<12?To.timeNames[0]:To.timeNames[1]},tt:function(){return b()<12?To.timeNames[2]:To.timeNames[3]},T:function(){return b()<12?To.timeNames[4]:To.timeNames[5]},TT:function(){return b()<12?To.timeNames[6]:To.timeNames[7]},Z:function(){return i?"GMT":n?"UTC":g0e(e)},o:function(){return(T()>0?"-":"+")+as(Math.floor(Math.abs(T())/60)*100+Math.abs(T())%60,4)},p:function(){return(T()>0?"-":"+")+as(Math.floor(Math.abs(T())/60),2)+":"+as(Math.floor(Math.abs(T())%60),2)},S:function(){return["th","st","nd","rd"][c()%10>3?0:(c()%100-c()%10!=10)*c()%10]},W:function(){return A()},WW:function(){return as(A())},N:function(){return M()}};return t.replace(d0e,function(P){return P in z?z[P]():P.slice(1,P.length-1)})}var IM={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},To={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},as=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},FM=function(t){var n=t.y,i=t.m,o=t.d,u=t._,c=t.dayName,p=t.short,h=p===void 0?!1:p,v=new Date,b=new Date;b.setDate(b[u+"Date"]()-1);var x=new Date;x.setDate(x[u+"Date"]()+1);var N=function(){return v[u+"Date"]()},_=function(){return v[u+"Month"]()},T=function(){return v[u+"FullYear"]()},A=function(){return b[u+"Date"]()},M=function(){return b[u+"Month"]()},z=function(){return b[u+"FullYear"]()},P=function(){return x[u+"Date"]()},I=function(){return x[u+"Month"]()},F=function(){return x[u+"FullYear"]()};return T()===n&&_()===i&&N()===o?h?"Tdy":"Today":z()===n&&M()===i&&A()===o?h?"Ysd":"Yesterday":F()===n&&I()===i&&P()===o?h?"Tmw":"Tomorrow":c},h0e=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var i=new Date(n.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var o=n.getTimezoneOffset()-i.getTimezoneOffset();n.setHours(n.getHours()-o);var u=(n-i)/(864e5*7);return 1+Math.floor(u)},v0e=function(t){var n=t.getDay();return n===0&&(n=7),n},g0e=function(t){return(String(t).match(p0e)||[""]).pop().replace(m0e,"").replace(/GMT\+0000/g,"UTC")};const T8=fo("socketio/generateImage"),b0e=fo("socketio/runESRGAN"),y0e=fo("socketio/runFacetool"),S0e=fo("socketio/deleteImage"),wU=fo("socketio/requestImages"),x0e=fo("socketio/requestNewImages"),C0e=fo("socketio/cancelProcessing"),N0e=fo("socketio/uploadInitialImage");fo("socketio/uploadMaskImage");const w0e=fo("socketio/requestSystemConfig"),_0e=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(_M(!0)),t(EM("Connected")),n().gallery.latest_mtime?t(x0e()):t(wU())}catch(i){console.error(i)}},onDisconnect:()=>{try{t(_M(!1)),t(EM("Disconnected")),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(i){console.error(i)}},onGenerationResult:i=>{try{const{url:o,mtime:u,metadata:c}=i,p=a4();t(E6({uuid:p,url:o,mtime:u,metadata:c})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Image generated: ${o}`}))}catch(o){console.error(o)}},onIntermediateResult:i=>{try{const o=a4(),{url:u,metadata:c,mtime:p}=i;t(lve({uuid:o,url:u,mtime:p,metadata:c})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Intermediate image generated: ${u}`}))}catch(o){console.error(o)}},onPostprocessingResult:i=>{try{const{url:o,metadata:u,mtime:c}=i;t(E6({uuid:a4(),url:o,mtime:c,metadata:u})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Postprocessed: ${o}`}))}catch(o){console.error(o)}},onProgressUpdate:i=>{try{t(M4(!0)),t(mve(i))}catch(o){console.error(o)}},onError:i=>{const{message:o,additionalData:u}=i;try{t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Server error: ${o}`,level:"error"})),t(bve()),t(NM())}catch(c){console.error(c)}},onGalleryImages:i=>{const{images:o,areMoreImagesAvailable:u}=i,c=o.map(p=>{const{url:h,metadata:v,mtime:b}=p;return{uuid:a4(),url:h,mtime:b,metadata:v}});t(sve({images:c,areMoreImagesAvailable:u})),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Loaded ${o.length} images`}))},onProcessingCanceled:()=>{t(gve());const{intermediateImage:i}=n().gallery;i&&(t(E6(i)),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Intermediate image saved: ${i.url}`})),t(NM())),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:i=>{const{url:o,uuid:u}=i;t(ave(u));const{initialImagePath:c,maskPath:p}=n().options;c===o&&t(Tv("")),p===o&&t(x8("")),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Image deleted: ${o}`}))},onInitialImageUploaded:i=>{const{url:o}=i;t(Tv(o)),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Initial image uploaded: ${o}`}))},onMaskImageUploaded:i=>{const{url:o}=i;t(x8(o)),t(Ao({timestamp:ko(new Date,"isoDateTime"),message:`Mask image uploaded: ${o}`}))},onSystemConfig:i=>{t(hve(i))}}},E0e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],T0e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],R0e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],A0e=[{key:"2x",value:2},{key:"4x",value:4}],LE=0,OE=4294967295,k0e=["gfpgan","codeformer"],_U=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),L0e=(e,t)=>{const{prompt:n,iterations:i,steps:o,cfgScale:u,threshold:c,perlin:p,height:h,width:v,sampler:b,seed:x,seamless:N,hiresFix:_,shouldUseInitImage:T,img2imgStrength:A,initialImagePath:M,maskPath:z,shouldFitToWidthHeight:P,shouldGenerateVariations:I,variationAmount:F,seedWeights:$,shouldRunESRGAN:Y,upscalingLevel:Z,upscalingStrength:ue,shouldRunFacetool:ce,facetoolStrength:le,codeformerFidelity:ge,facetoolType:Ye,shouldRandomizeSeed:re}=e,{shouldDisplayInProgress:ie}=t,Ce={prompt:n,iterations:i,steps:o,cfg_scale:u,threshold:c,perlin:p,height:h,width:v,sampler_name:b,seed:x,seamless:N,hires_fix:_,progress_images:ie};Ce.seed=re?_U(LE,OE):x,T&&(Ce.init_img=M,Ce.strength=A,Ce.fit=P,z&&(Ce.init_mask=z)),I?(Ce.variation_amount=F,$&&(Ce.with_variations=Whe($))):Ce.variation_amount=0;let xe=!1,K=!1;return Y&&(xe={level:Z,strength:ue}),ce&&(K={type:Ye,strength:le},Ye==="codeformer"&&(K.codeformer_fidelity=ge)),{generationParameters:Ce,esrganParameters:xe,facetoolParameters:K}};var T6=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function R6(e,t,n,i){e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function EU(e,t){for(var n=t.slice(0,t.length-1),i=0;i=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function O0e(e,t){for(var n=e.length>=t.length?e:t,i=e.length>=t.length?t:e,o=!0,u=0;u=0&&Pr.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Pr.splice(0,Pr.length),(t===93||t===224)&&(t=91),t in xa){xa[t]=!1;for(var i in ud)ud[i]===t&&(us[i]=!1)}}function z0e(e){if(typeof e>"u")Object.keys(vi).forEach(function(c){return delete vi[c]});else if(Array.isArray(e))e.forEach(function(c){c.key&&A6(c)});else if(typeof e=="object")e.key&&A6(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?EU(ud,v):[];vi[N]=vi[N].filter(function(T){var A=o?T.method===o:!0;return!(A&&T.scope===i&&O0e(T.mods,_))})}})};function BM(e,t,n,i){if(t.element===i){var o;if(t.scope===n||t.scope==="all"){o=t.mods.length>0;for(var u in xa)Object.prototype.hasOwnProperty.call(xa,u)&&(!xa[u]&&t.mods.indexOf(+u)>-1||xa[u]&&t.mods.indexOf(+u)===-1)&&(o=!1);(t.mods.length===0&&!xa[16]&&!xa[18]&&!xa[17]&&!xa[91]||o||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function UM(e,t){var n=vi["*"],i=e.keyCode||e.which||e.charCode;if(!!us.filter.call(this,e)){if((i===93||i===224)&&(i=91),Pr.indexOf(i)===-1&&i!==229&&Pr.push(i),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(T){var A=R8[T];e[T]&&Pr.indexOf(A)===-1?Pr.push(A):!e[T]&&Pr.indexOf(A)>-1?Pr.splice(Pr.indexOf(A),1):T==="metaKey"&&e[T]&&Pr.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Pr=Pr.slice(Pr.indexOf(A))))}),i in xa){xa[i]=!0;for(var o in ud)ud[o]===i&&(us[o]=!0);if(!n)return}for(var u in xa)Object.prototype.hasOwnProperty.call(xa,u)&&(xa[u]=e[R8[u]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Pr.indexOf(17)===-1&&Pr.push(17),Pr.indexOf(18)===-1&&Pr.push(18),xa[17]=!0,xa[18]=!0);var c=nb();if(n)for(var p=0;p-1}function us(e,t,n){Pr=[];var i=TU(e),o=[],u="all",c=document,p=0,h=!1,v=!0,b="+",x=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(u=t.scope),t.element&&(c=t.element),t.keyup&&(h=t.keyup),t.keydown!==void 0&&(v=t.keydown),t.capture!==void 0&&(x=t.capture),typeof t.splitKey=="string"&&(b=t.splitKey)),typeof t=="string"&&(u=t);p1&&(o=EU(ud,e)),e=e[e.length-1],e=e==="*"?"*":f3(e),e in vi||(vi[e]=[]),vi[e].push({keyup:h,keydown:v,scope:u,mods:o,shortcut:i[p],method:n,key:i[p],splitKey:b,element:c});typeof c<"u"&&!B0e(c)&&window&&(AU.push(c),R6(c,"keydown",function(N){UM(N,c)},x),zM||(zM=!0,R6(window,"focus",function(){Pr=[]},x)),R6(c,"keyup",function(N){UM(N,c),F0e(N)},x))}function U0e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(vi).forEach(function(n){var i=vi[n].find(function(o){return o.scope===t&&o.shortcut===e});i&&i.method&&i.method()})}var k6={setScope:kU,getScope:nb,deleteScope:I0e,getPressedKeyCodes:M0e,isPressed:P0e,filter:D0e,trigger:U0e,unbind:z0e,keyMap:ME,modifier:ud,modifierMap:R8};for(var L6 in k6)Object.prototype.hasOwnProperty.call(k6,L6)&&(us[L6]=k6[L6]);if(typeof window<"u"){var $0e=window.hotkeys;us.noConflict=function(e){return e&&window.hotkeys===us&&(window.hotkeys=$0e),us},window.hotkeys=us}us.filter=function(){return!0};var LU=function(t,n){var i=t.target,o=i&&i.tagName;return Boolean(o&&n&&n.includes(o))},j0e=function(t){return LU(t,["INPUT","TEXTAREA","SELECT"])};function ii(e,t,n,i){n instanceof Array&&(i=n,n=void 0);var o=n||{},u=o.enableOnTags,c=o.filter,p=o.keyup,h=o.keydown,v=o.filterPreventDefault,b=v===void 0?!0:v,x=o.enabled,N=x===void 0?!0:x,_=o.enableOnContentEditable,T=_===void 0?!1:_,A=k.exports.useRef(null),M=k.exports.useCallback(function(z,P){var I,F;return c&&!c(z)?!b:j0e(z)&&!LU(z,u)||(I=z.target)!=null&&I.isContentEditable&&!T?!0:A.current===null||document.activeElement===A.current||(F=A.current)!=null&&F.contains(document.activeElement)?(t(z,P),!0):!1},i?[A,u,c].concat(i):[A,u,c]);return k.exports.useEffect(function(){if(!N){us.unbind(e,M);return}return p&&h!==!0&&(n.keydown=!1),us(e,n||{},M),function(){return us.unbind(e,M)}},[M,e,N]),A}us.isPressed;var O6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/InpaintingWIP.tsx";function V0e(){return C("div",{className:"work-in-progress inpainting-work-in-progress",children:[C("h1",{children:"Inpainting"},void 0,!1,{fileName:O6,lineNumber:6,columnNumber:7},this),C("p",{children:"Inpainting is available as a part of the Invoke AI Command Line Interface. A dedicated WebUI interface will be released in the near future."},void 0,!1,{fileName:O6,lineNumber:7,columnNumber:7},this)]},void 0,!0,{fileName:O6,lineNumber:5,columnNumber:5},this)}var M6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/NodesWIP.tsx";function H0e(){return C("div",{className:"work-in-progress nodes-work-in-progress",children:[C("h1",{children:"Nodes"},void 0,!1,{fileName:M6,lineNumber:6,columnNumber:7},this),C("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."},void 0,!1,{fileName:M6,lineNumber:7,columnNumber:7},this)]},void 0,!0,{fileName:M6,lineNumber:5,columnNumber:5},this)}var D6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/OutpaintingWIP.tsx";function W0e(){return C("div",{className:"work-in-progress outpainting-work-in-progress",children:[C("h1",{children:"Outpainting"},void 0,!1,{fileName:D6,lineNumber:6,columnNumber:7},this),C("p",{children:"Outpainting is available as a part of the Invoke AI Command Line Interface. A dedicated WebUI interface will be released in the near future."},void 0,!1,{fileName:D6,lineNumber:7,columnNumber:7},this)]},void 0,!0,{fileName:D6,lineNumber:5,columnNumber:5},this)}var s4="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/WorkInProgress/PostProcessingWIP.tsx";const G0e=()=>C("div",{className:"work-in-progress post-processing-work-in-progress",children:[C("h1",{children:"Post Processing"},void 0,!1,{fileName:s4,lineNumber:6,columnNumber:7},void 0),C("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image tab. A dedicated UI will be released soon."},void 0,!1,{fileName:s4,lineNumber:7,columnNumber:7},void 0),C("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen, High Resolution Fixing and more."},void 0,!1,{fileName:s4,lineNumber:13,columnNumber:7},void 0)]},void 0,!0,{fileName:s4,lineNumber:5,columnNumber:5},void 0);var $M="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/ImageToImageIcon.tsx";const Y0e=kv({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:C("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"},void 0,!1,{fileName:$M,lineNumber:8,columnNumber:7},void 0)},void 0,!1,{fileName:$M,lineNumber:7,columnNumber:5},void 0)});var q0e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/InpaintIcon.tsx";const Z0e=kv({displayName:"InpaintIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,768.593C3543.31,517.323 3339.31,313.324 3088.04,313.324L455.269,313.324C203.999,313.324 0,517.323 0,768.593C0,768.593 0,2774.71 0,2774.71C0,3025.98 203.999,3229.98 455.269,3229.98L3088.04,3229.98C3339.31,3229.98 3543.31,3025.98 3543.31,2774.71C3543.31,2774.71 3543.31,768.593 3543.31,768.593ZM3446.56,2252.63L3446.56,768.593C3446.56,570.718 3285.91,410.068 3088.04,410.068C3088.04,410.068 455.269,410.068 455.269,410.068C257.394,410.068 96.745,570.718 96.745,768.593L96.745,2061.49L988.344,1051.01L1326.63,1423.12C1281.74,1438.3 1227.39,1454.93 1158.26,1480.89C995.738,1541.9 944.356,1613.28 911.834,1718.7C884.979,1805.76 875.814,1922.93 811.322,2093.5C763.918,2218.87 765.18,2304.83 790.606,2364.87C817.014,2427.22 869.858,2467.73 941.71,2493.83C1023.86,2523.67 1134.43,2534.25 1242.45,2557.97C1365.72,2585.04 1455.23,2643.2 1532.76,2665.96C1587.03,2681.89 1637.04,2683.6 1686.56,2663.56C1731.54,2645.36 1777.95,2607.64 1825.43,2535.92C1874.9,2461.2 1979.98,2369.94 2102.8,2276.91L2241.64,2429.63L2739.91,1850.53C2754.47,1841.35 2767.47,1833.12 2778.66,1825.94C2832.6,1791.35 2866.82,1742.41 2884.38,1682.61L2898.06,1666.72L3446.56,2252.63ZM1680.71,2559.9C1666.7,2570.37 1652.86,2577.22 1638.81,2580.95L1610.62,2588.45L1625.61,2644.82L1653.8,2637.33C1674.48,2631.83 1695.02,2622.04 1715.64,2606.61L1739,2589.14L1704.06,2542.43L1680.71,2559.9ZM1541.62,2570.42C1524.94,2564.58 1507.63,2557.37 1489.49,2549.48L1462.75,2537.84L1439.48,2591.33L1466.22,2602.97C1485.74,2611.46 1504.38,2619.18 1522.33,2625.47L1549.86,2635.12L1569.15,2580.07L1541.62,2570.42ZM1381.21,2503.1C1363.08,2496.04 1344.17,2489.24 1324.38,2483.03L1296.55,2474.29L1279.07,2529.94L1306.9,2538.68C1325.41,2544.49 1343.09,2550.86 1360.05,2557.46L1387.23,2568.04L1408.39,2513.68L1381.21,2503.1ZM1788.46,2430.83C1773.91,2447.61 1761.19,2463.86 1750.55,2479.44L1734.09,2503.52L1782.25,2536.43L1798.71,2512.35C1808.2,2498.46 1819.56,2484 1832.53,2469.04L1851.64,2447.01L1807.57,2408.79L1788.46,2430.83ZM1262.54,2466.49C1243.17,2462.24 1223.71,2458.43 1204.35,2454.87L1175.67,2449.6L1165.12,2506.97L1193.81,2512.24C1212.52,2515.68 1231.32,2519.35 1250.03,2523.46L1278.52,2529.72L1291.03,2472.74L1262.54,2466.49ZM1089.5,2434.66C1070.28,2431.1 1051.6,2427.35 1033.72,2423.15L1005.32,2416.49L992.002,2473.28L1020.4,2479.94C1039.14,2484.34 1058.71,2488.28 1078.86,2492.02L1107.54,2497.34L1118.18,2439.99L1089.5,2434.66ZM932.182,2386.94C917.545,2378.53 904.788,2368.71 894.532,2356.8L875.504,2334.69L831.294,2372.75L850.322,2394.85C864.755,2411.62 882.513,2425.67 903.11,2437.51L928.396,2452.05L957.469,2401.48L932.182,2386.94ZM1917.04,2306.1C1901.59,2319.37 1886.77,2332.5 1872.67,2345.44L1851.18,2365.17L1890.64,2408.14L1912.12,2388.41C1925.76,2375.89 1940.1,2363.19 1955.04,2350.36L1977.17,2331.36L1939.17,2287.1L1917.04,2306.1ZM866.485,2267.79C866.715,2251.85 868.706,2234.39 872.54,2215.21L878.257,2186.61L821.055,2175.17L815.338,2203.77C810.733,2226.81 808.434,2247.8 808.158,2266.94L807.737,2296.11L866.064,2296.95L866.485,2267.79ZM2055.08,2195.63C2039.24,2207.6 2023.66,2219.55 2008.43,2231.46L1985.45,2249.43L2021.38,2295.38L2044.36,2277.42C2059.34,2265.7 2074.66,2253.95 2090.23,2242.18L2113.51,2224.61L2078.35,2178.06L2055.08,2195.63ZM2197.62,2092.3C2181.57,2103.52 2165.6,2114.82 2149.74,2126.16L2126.02,2143.12L2159.95,2190.57L2183.67,2173.61C2199.36,2162.38 2215.18,2151.21 2231.05,2140.1L2254.95,2123.38L2221.52,2075.58L2197.62,2092.3ZM905.788,2108.14C912.858,2088.7 919.236,2069.96 925.03,2051.88L933.93,2024.1L878.378,2006.3L869.478,2034.08C863.905,2051.47 857.769,2069.5 850.968,2088.2L840.998,2115.61L895.817,2135.55L905.788,2108.14ZM2342.87,1993.45C2326.76,2004.15 2310.52,2015.01 2294.22,2026L2270.04,2042.31L2302.65,2090.67L2326.83,2074.37C2343.01,2063.45 2359.14,2052.67 2375.14,2042.04L2399.44,2025.91L2367.17,1977.31L2342.87,1993.45ZM2489.92,1897.67C2473.88,1907.94 2457.46,1918.5 2440.74,1929.32L2416.26,1945.16L2447.95,1994.14L2472.44,1978.29C2489.07,1967.53 2505.41,1957.02 2521.37,1946.8L2545.93,1931.07L2514.48,1881.94L2489.92,1897.67ZM956.972,1937.49C961.849,1917.31 966.133,1898.15 970.079,1879.93L976.253,1851.43L919.241,1839.08L913.067,1867.59C909.215,1885.38 905.033,1904.08 900.271,1923.79L893.42,1952.13L950.121,1965.84L956.972,1937.49ZM2638.01,1803.95C2622.5,1813.69 2605.98,1824.08 2588.59,1835.04L2563.91,1850.59L2595.02,1899.94L2619.69,1884.38C2637.05,1873.44 2653.55,1863.08 2669.03,1853.35L2693.73,1837.84L2662.71,1788.44L2638.01,1803.95ZM2769.59,1708.14C2760.26,1721.07 2748.81,1732.54 2735.03,1742.4L2711.31,1759.37L2745.25,1806.81L2768.97,1789.84C2788.08,1776.17 2803.93,1760.22 2816.88,1742.3L2833.95,1718.65L2786.67,1684.5L2769.59,1708.14ZM995.304,1767.43C1000.24,1748.86 1005.64,1731.66 1012.23,1715.62L1023.31,1688.64L969.359,1666.47L958.273,1693.45C950.767,1711.72 944.551,1731.29 938.928,1752.44L931.436,1780.63L987.812,1795.62L995.304,1767.43ZM1071.42,1633.09C1083.85,1622.63 1098.26,1612.75 1115.07,1603.23L1140.45,1588.86L1111.71,1538.1L1086.33,1552.47C1066.11,1563.92 1048.82,1575.88 1033.86,1588.46L1011.55,1607.24L1049.11,1651.87L1071.42,1633.09ZM2804.87,1559.28C2805.5,1578.06 2804.95,1596.1 2803,1613.27L2799.72,1642.25L2857.68,1648.81L2860.97,1619.83C2863.22,1599.96 2863.9,1579.07 2863.17,1557.33L2862.2,1528.18L2803.9,1530.12L2804.87,1559.28ZM1217.5,1558.88C1236.87,1551.88 1254.98,1545.61 1271.98,1539.88L1299.62,1530.55L1280.97,1475.28L1253.33,1484.6C1235.96,1490.46 1217.45,1496.87 1197.66,1504.02L1170.23,1513.94L1190.07,1568.8L1217.5,1558.88ZM1383.15,1502.63C1403.9,1495.17 1422.61,1487.67 1439.93,1479.27L1466.18,1466.54L1440.73,1414.06L1414.48,1426.78C1398.91,1434.33 1382.06,1441.03 1363.41,1447.74L1335.96,1457.62L1355.71,1512.51L1383.15,1502.63ZM2777.41,1393.4C2782.33,1412.11 2786.73,1430.56 2790.49,1448.67L2796.42,1477.23L2853.54,1465.37L2847.6,1436.81C2843.64,1417.72 2839.01,1398.28 2833.83,1378.57L2826.41,1350.36L2770,1365.19L2777.41,1393.4ZM1541.19,1401.64C1553.52,1387.35 1565.77,1370.94 1578.31,1351.79L1594.28,1327.39L1545.48,1295.44L1529.5,1319.84C1518.52,1336.62 1507.83,1351.02 1497.03,1363.53L1477.97,1385.61L1522.14,1423.72L1541.19,1401.64ZM2725.02,1229.27C2731.61,1247.45 2738.01,1265.61 2744.12,1283.7L2753.45,1311.33L2808.72,1292.66L2799.38,1265.03C2793.13,1246.53 2786.6,1227.96 2779.85,1209.37L2769.9,1181.95L2715.07,1201.86L2725.02,1229.27ZM1636.99,1247.12C1644.26,1232.56 1651.77,1217.04 1659.58,1200.45C1660.59,1198.3 1661.61,1196.15 1662.61,1194.02L1675.08,1167.65L1622.34,1142.72L1609.88,1169.09C1608.86,1171.25 1607.83,1173.42 1606.81,1175.59C1599.2,1191.75 1591.88,1206.88 1584.8,1221.06L1571.77,1247.16L1623.96,1273.21L1636.99,1247.12ZM2251.58,766.326C2320.04,672.986 2430.48,612.355 2554.96,612.355C2762.48,612.355 2930.95,780.83 2930.95,988.344C2930.95,1087.56 2892.44,1177.85 2829.58,1245.06C2804.67,1171.95 2775.67,1097.93 2747.18,1026.98C2699.54,908.311 2654.38,849.115 2602.9,816.501C2565.59,792.868 2523.88,781.903 2471.8,777.274C2416.47,772.355 2346.53,774.829 2251.58,766.326ZM2662.3,1066.95C2669.46,1084.79 2676.66,1102.83 2683.81,1120.98L2694.51,1148.12L2748.78,1126.72L2738.08,1099.59C2730.88,1081.32 2723.64,1063.18 2716.44,1045.23L2705.58,1018.16L2651.44,1039.88L2662.3,1066.95ZM1713.81,1090.65C1723.08,1073.13 1732.27,1056.54 1741.52,1040.87L1756.33,1015.74L1706.08,986.113L1691.27,1011.24C1681.59,1027.65 1671.95,1045.03 1662.25,1063.39L1648.61,1089.17L1700.18,1116.44L1713.81,1090.65ZM2584.06,922.671C2594.47,934.345 2604.5,948.467 2614.55,965.492L2629.38,990.608L2679.62,960.949L2664.79,935.834C2652.56,915.134 2640.26,898.042 2627.6,883.849L2608.19,862.079L2564.65,900.901L2584.06,922.671ZM1805.33,949.853C1817.51,935.859 1830.16,923.259 1843.5,912.06L1865.85,893.314L1828.36,848.625L1806.01,867.372C1790.4,880.469 1775.59,895.178 1761.34,911.545L1742.18,933.541L1786.17,971.849L1805.33,949.853ZM2446.47,869.303C2466.17,870.516 2483.98,872.335 2500.35,875.649L2528.94,881.438L2540.51,824.265L2511.93,818.476C2493.13,814.67 2472.68,812.474 2450.05,811.08L2420.94,809.287L2417.35,867.51L2446.47,869.303ZM1935.15,861.305C1951.44,856.036 1968.78,851.999 1987.35,849.144L2016.18,844.713L2007.32,787.057L1978.49,791.488C1956.68,794.84 1936.32,799.616 1917.19,805.802L1889.44,814.778L1907.39,870.28L1935.15,861.305ZM2271.35,861.832C2292.28,863.33 2311.95,864.351 2330.47,865.114L2359.61,866.316L2362.01,808.032L2332.87,806.83C2314.9,806.09 2295.82,805.1 2275.51,803.648L2246.42,801.567L2242.26,859.751L2271.35,861.832ZM2097.81,844.858C2115.7,845.771 2134.46,847.337 2154.17,849.543L2183.16,852.787L2189.65,794.816L2160.66,791.572C2139.72,789.228 2119.79,787.57 2100.78,786.6L2071.65,785.114L2068.68,843.372L2097.81,844.858Z"},void 0,!1,{fileName:q0e,lineNumber:7,columnNumber:5},void 0)});var K0e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/NodesIcon.tsx";const X0e=kv({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"},void 0,!1,{fileName:K0e,lineNumber:7,columnNumber:5},void 0)});var Q0e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/OutpaintIcon.tsx";const J0e=kv({displayName:"OutpaintIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,766.352C3543.31,516.705 3340.63,314.024 3090.98,314.024L452.328,314.024C202.681,314.024 0,516.705 0,766.352L0,2776.95C0,3026.6 202.681,3229.28 452.328,3229.28C452.328,3229.28 3090.98,3229.28 3090.98,3229.28C3340.63,3229.28 3543.31,3026.6 3543.31,2776.95C3543.31,2776.95 3543.31,766.352 3543.31,766.352ZM3454.26,766.352L3454.26,2776.95C3454.26,2977.46 3291.48,3140.24 3090.98,3140.24L452.328,3140.24C251.825,3140.24 89.043,2977.46 89.043,2776.95C89.043,2776.95 89.043,766.352 89.043,766.352C89.043,565.849 251.825,403.067 452.328,403.067C452.328,403.067 3090.98,403.067 3090.98,403.067C3291.48,403.067 3454.26,565.849 3454.26,766.352ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265Z"},void 0,!1,{fileName:Q0e,lineNumber:7,columnNumber:5},void 0)});var e1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/PostprocessingIcon.tsx";const t1e=kv({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:C("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"},void 0,!1,{fileName:e1e,lineNumber:7,columnNumber:5},void 0)});var jM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/icons/TextToImageIcon.tsx";const n1e=kv({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:C("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:C("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"},void 0,!1,{fileName:jM,lineNumber:13,columnNumber:7},void 0)},void 0,!1,{fileName:jM,lineNumber:7,columnNumber:5},void 0)});var zl=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(zl||{});const r1e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}};var l4="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAISwitch.tsx";const pm=e=>{const{label:t,isDisabled:n=!1,fontSize:i="md",size:o="md",width:u="auto",...c}=e;return C(fd,{isDisabled:n,width:u,children:C(Sr,{justifyContent:"space-between",alignItems:"center",children:[t&&C(sm,{fontSize:i,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t},void 0,!1,{fileName:l4,lineNumber:30,columnNumber:11},void 0),C(s3,{size:o,className:"switch-button",...c},void 0,!1,{fileName:l4,lineNumber:39,columnNumber:9},void 0)]},void 0,!0,{fileName:l4,lineNumber:28,columnNumber:7},void 0)},void 0,!1,{fileName:l4,lineNumber:27,columnNumber:5},void 0)};var P6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestore.tsx";function OU(){const e=gt(o=>o.system.isGFPGANAvailable),t=gt(o=>o.options.shouldRunFacetool),n=Sn();return C(Sr,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[C("p",{children:"Restore Face"},void 0,!1,{fileName:P6,lineNumber:32,columnNumber:7},this),C(pm,{isDisabled:!e,isChecked:t,onChange:o=>n(Qhe(o.target.checked))},void 0,!1,{fileName:P6,lineNumber:33,columnNumber:7},this)]},void 0,!0,{fileName:P6,lineNumber:26,columnNumber:5},this)}var Ip="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAINumberInput.tsx";const VM=/^-?(0\.)?\.?$/,Vl=e=>{const{label:t,styleClass:n,isDisabled:i=!1,showStepper:o=!0,fontSize:u="1rem",size:c="sm",width:p,textAlign:h,isInvalid:v,value:b,onChange:x,min:N,max:_,isInteger:T=!0,...A}=e,[M,z]=k.exports.useState(String(b));k.exports.useEffect(()=>{!M.match(VM)&&b!==Number(M)&&z(String(b))},[b,M]);const P=F=>{z(F),F.match(VM)||x(T?Math.floor(Number(F)):Number(F))},I=F=>{const $=tb.clamp(T?Math.floor(Number(F.target.value)):Number(F.target.value),N,_);z(String($)),x($)};return C(fd,{isDisabled:i,isInvalid:v,className:`number-input ${n}`,children:[t&&C(sm,{fontSize:u,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",className:"number-input-label",children:t},void 0,!1,{fileName:Ip,lineNumber:103,columnNumber:9},void 0),C(Rz,{size:c,...A,className:"number-input-field",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:P,onBlur:I,children:[C(Az,{fontSize:u,className:"number-input-entry",width:p,textAlign:h},void 0,!1,{fileName:Ip,lineNumber:123,columnNumber:9},void 0),C("div",{className:"number-input-stepper",style:o?{display:"block"}:{display:"none"},children:[C(Oz,{className:"number-input-stepper-button"},void 0,!1,{fileName:Ip,lineNumber:133,columnNumber:11},void 0),C(Lz,{className:"number-input-stepper-button"},void 0,!1,{fileName:Ip,lineNumber:134,columnNumber:11},void 0)]},void 0,!0,{fileName:Ip,lineNumber:129,columnNumber:9},void 0)]},void 0,!0,{fileName:Ip,lineNumber:113,columnNumber:7},void 0)]},void 0,!0,{fileName:Ip,lineNumber:97,columnNumber:5},void 0)};var og="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAISelect.tsx";const Rb=e=>{const{label:t,isDisabled:n,validValues:i,size:o="sm",fontSize:u="md",styleClass:c,...p}=e;return C(fd,{isDisabled:n,className:`iai-select ${c}`,children:[C(sm,{fontSize:u,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",className:"iai-select-label",children:t},void 0,!1,{fileName:og,lineNumber:25,columnNumber:7},void 0),C(Iz,{fontSize:u,size:o,...p,className:"iai-select-picker",children:i.map(h=>typeof h=="string"||typeof h=="number"?C("option",{value:h,className:"iai-select-option",children:h},h,!1,{fileName:og,lineNumber:42,columnNumber:13},void 0):C("option",{value:h.value,children:h.key},h.value,!1,{fileName:og,lineNumber:46,columnNumber:13},void 0))},void 0,!1,{fileName:og,lineNumber:34,columnNumber:7},void 0)]},void 0,!0,{fileName:og,lineNumber:24,columnNumber:5},void 0)};var u4="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/FaceRestore/FaceRestoreOptions.tsx";const i1e=Ga(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),a1e=Ga(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),DE=()=>{const e=Sn(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:i}=gt(i1e),{isGFPGANAvailable:o}=gt(a1e),u=h=>e(L4(h)),c=h=>e(eU(h)),p=h=>e(O4(h.target.value));return C(Sr,{direction:"column",gap:2,children:[C(Rb,{label:"Type",validValues:k0e.concat(),value:n,onChange:p},void 0,!1,{fileName:u4,lineNumber:71,columnNumber:7},void 0),C(Vl,{isDisabled:!o,label:"Strength",step:.05,min:0,max:1,onChange:u,value:t,width:"90px",isInteger:!1},void 0,!1,{fileName:u4,lineNumber:77,columnNumber:7},void 0),n==="codeformer"&&C(Vl,{isDisabled:!o,label:"Fidelity",step:.05,min:0,max:1,onChange:c,value:i,width:"90px",isInteger:!1},void 0,!1,{fileName:u4,lineNumber:89,columnNumber:9},void 0)]},void 0,!0,{fileName:u4,lineNumber:70,columnNumber:5},void 0)};var o1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageFit.tsx";function s1e(){const e=Sn(),t=gt(i=>i.options.shouldFitToWidthHeight);return C(pm,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:i=>e(tU(i.target.checked))},void 0,!1,{fileName:o1e,lineNumber:21,columnNumber:5},this)}var l1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/ImageToImage/ImageToImageStrength.tsx";function u1e(e){const{label:t="Strength",styleClass:n}=e,i=gt(c=>c.options.img2imgStrength),o=Sn();return C(Vl,{label:t,step:.01,min:.01,max:.99,onChange:c=>o(JB(c)),value:i,width:"90px",isInteger:!1,styleClass:n},void 0,!1,{fileName:l1e,lineNumber:26,columnNumber:5},this)}var c1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/RandomizeSeed.tsx";function f1e(){const e=Sn(),t=gt(i=>i.options.shouldRandomizeSeed);return C(pm,{label:"Randomize Seed",isChecked:t,onChange:i=>e(eve(i.target.checked))},void 0,!1,{fileName:c1e,lineNumber:22,columnNumber:5},this)}var d1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/Seed.tsx";function p1e(){const e=gt(u=>u.options.seed),t=gt(u=>u.options.shouldRandomizeSeed),n=gt(u=>u.options.shouldGenerateVariations),i=Sn(),o=u=>i(Tb(u));return C(Vl,{label:"Seed",step:1,precision:0,flexGrow:1,min:LE,max:OE,isDisabled:t,isInvalid:e<0&&n,onChange:o,value:e,width:"10rem"},void 0,!1,{fileName:d1e,lineNumber:25,columnNumber:5},this)}var HM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/ShuffleSeed.tsx";function m1e(){const e=Sn(),t=gt(i=>i.options.shouldRandomizeSeed);return C(Du,{size:"sm",isDisabled:t,onClick:()=>e(Tb(_U(LE,OE))),children:C("p",{children:"Shuffle"},void 0,!1,{fileName:HM,lineNumber:27,columnNumber:7},this)},void 0,!1,{fileName:HM,lineNumber:22,columnNumber:5},this)}var h1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/Threshold.tsx";function v1e(){const e=Sn(),t=gt(i=>i.options.threshold);return C(Vl,{label:"Threshold",min:0,max:1e3,step:.1,onChange:i=>e(qhe(i)),value:t,isInteger:!1},void 0,!1,{fileName:h1e,lineNumber:19,columnNumber:5},this)}var g1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/Perlin.tsx";function b1e(){const e=Sn(),t=gt(i=>i.options.perlin);return C(Vl,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:i=>e(Zhe(i)),value:t,isInteger:!1},void 0,!1,{fileName:g1e,lineNumber:17,columnNumber:5},this)}var Ec="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Seed/SeedOptions.tsx";const MU=()=>C(Sr,{gap:2,direction:"column",children:[C(f1e,{},void 0,!1,{fileName:Ec,lineNumber:14,columnNumber:7},void 0),C(Sr,{gap:2,children:[C(p1e,{},void 0,!1,{fileName:Ec,lineNumber:16,columnNumber:9},void 0),C(m1e,{},void 0,!1,{fileName:Ec,lineNumber:17,columnNumber:9},void 0)]},void 0,!0,{fileName:Ec,lineNumber:15,columnNumber:7},void 0),C(Sr,{gap:2,children:C(v1e,{},void 0,!1,{fileName:Ec,lineNumber:20,columnNumber:9},void 0)},void 0,!1,{fileName:Ec,lineNumber:19,columnNumber:7},void 0),C(Sr,{gap:2,children:C(b1e,{},void 0,!1,{fileName:Ec,lineNumber:23,columnNumber:9},void 0)},void 0,!1,{fileName:Ec,lineNumber:22,columnNumber:7},void 0)]},void 0,!0,{fileName:Ec,lineNumber:13,columnNumber:5},void 0);var I6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Upscale/Upscale.tsx";function DU(){const e=gt(o=>o.system.isESRGANAvailable),t=gt(o=>o.options.shouldRunESRGAN),n=Sn();return C(Sr,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[C("p",{children:"Upscale"},void 0,!1,{fileName:I6,lineNumber:30,columnNumber:7},this),C(pm,{isDisabled:!e,isChecked:t,onChange:o=>n(Jhe(o.target.checked))},void 0,!1,{fileName:I6,lineNumber:31,columnNumber:7},this)]},void 0,!0,{fileName:I6,lineNumber:24,columnNumber:5},this)}var F6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Upscale/UpscaleOptions.tsx";const y1e=Ga(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),S1e=Ga(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),PE=()=>{const e=Sn(),{upscalingLevel:t,upscalingStrength:n}=gt(y1e),{isESRGANAvailable:i}=gt(S1e);return C("div",{className:"upscale-options",children:[C(Rb,{isDisabled:!i,label:"Scale",value:t,onChange:c=>e(y8(Number(c.target.value))),validValues:A0e},void 0,!1,{fileName:F6,lineNumber:64,columnNumber:7},void 0),C(Vl,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:c=>e(S8(c)),value:n,isInteger:!1},void 0,!1,{fileName:F6,lineNumber:71,columnNumber:7},void 0)]},void 0,!0,{fileName:F6,lineNumber:63,columnNumber:5},void 0)};var x1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/GenerateVariations.tsx";function C1e(){const e=gt(i=>i.options.shouldGenerateVariations),t=Sn();return C(pm,{isChecked:e,width:"auto",onChange:i=>t(Khe(i.target.checked))},void 0,!1,{fileName:x1e,lineNumber:22,columnNumber:5},this)}var z6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/Variations.tsx";function PU(){return C(Sr,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[C("p",{children:"Variations"},void 0,!1,{fileName:z6,lineNumber:13,columnNumber:7},this),C(C1e,{},void 0,!1,{fileName:z6,lineNumber:14,columnNumber:7},this)]},void 0,!0,{fileName:z6,lineNumber:7,columnNumber:5},this)}var B6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAIInput.tsx";function N1e(e){const{label:t,styleClass:n,isDisabled:i=!1,fontSize:o="1rem",width:u,isInvalid:c,...p}=e;return C(fd,{className:`input ${n}`,isInvalid:c,isDisabled:i,flexGrow:1,children:[C(sm,{fontSize:o,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t},void 0,!1,{fileName:B6,lineNumber:30,columnNumber:7},this),C(M_,{...p,className:"input-entry",size:"sm",width:u},void 0,!1,{fileName:B6,lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:B6,lineNumber:24,columnNumber:5},this)}var w1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/SeedWeights.tsx";function _1e(){const e=gt(o=>o.options.seedWeights),t=gt(o=>o.options.shouldGenerateVariations),n=Sn(),i=o=>n(nU(o.target.value));return C(N1e,{label:"Seed Weights",value:e,isInvalid:t&&!(RE(e)||e===""),isDisabled:!t,onChange:i},void 0,!1,{fileName:w1e,lineNumber:26,columnNumber:5},this)}var E1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/VariationAmount.tsx";function T1e(){const e=gt(o=>o.options.variationAmount),t=gt(o=>o.options.shouldGenerateVariations),n=Sn();return C(Vl,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:o=>n(Xhe(o)),isInteger:!1},void 0,!1,{fileName:E1e,lineNumber:24,columnNumber:5},this)}var U6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AdvancedOptions/Variations/VariationsOptions.tsx";const IU=()=>C(Sr,{gap:2,direction:"column",children:[C(T1e,{},void 0,!1,{fileName:U6,lineNumber:11,columnNumber:7},void 0),C(_1e,{},void 0,!1,{fileName:U6,lineNumber:12,columnNumber:7},void 0)]},void 0,!0,{fileName:U6,lineNumber:10,columnNumber:5},void 0);var $6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainAdvancedOptions.tsx";function FU(){const e=gt(i=>i.options.showAdvancedOptions),t=Sn();return C("div",{className:"advanced_options_checker",children:[C("input",{type:"checkbox",name:"advanced_options",id:"",onChange:i=>t(tve(i.target.checked)),checked:e},void 0,!1,{fileName:$6,lineNumber:16,columnNumber:7},this),C("label",{htmlFor:"advanced_options",children:"Advanced Options"},void 0,!1,{fileName:$6,lineNumber:23,columnNumber:7},this)]},void 0,!0,{fileName:$6,lineNumber:15,columnNumber:5},this)}var R1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainCFGScale.tsx";function A1e(){const e=Sn(),t=gt(i=>i.options.cfgScale);return C(Vl,{label:"CFG Scale",step:.5,min:1,max:30,onChange:i=>e(YB(i)),value:t,width:IE,fontSize:Bv,styleClass:"main-option-block",textAlign:"center",isInteger:!1},void 0,!1,{fileName:R1e,lineNumber:14,columnNumber:5},this)}var k1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainHeight.tsx";function L1e(){const e=gt(i=>i.options.height),t=Sn();return C(Rb,{label:"Height",value:e,flexGrow:1,onChange:i=>t(qB(Number(i.target.value))),validValues:R0e,fontSize:Bv,styleClass:"main-option-block"},void 0,!1,{fileName:k1e,lineNumber:16,columnNumber:5},this)}var O1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainIterations.tsx";function M1e(){const e=Sn(),t=gt(i=>i.options.iterations);return C(Vl,{label:"Images",step:1,min:1,max:9999,onChange:i=>e(Yhe(i)),value:t,width:IE,fontSize:Bv,styleClass:"main-option-block",textAlign:"center"},void 0,!1,{fileName:O1e,lineNumber:16,columnNumber:5},this)}var D1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainSampler.tsx";function P1e(){const e=gt(i=>i.options.sampler),t=Sn();return C(Rb,{label:"Sampler",value:e,onChange:i=>t(KB(i.target.value)),validValues:E0e,fontSize:Bv,styleClass:"main-option-block"},void 0,!1,{fileName:D1e,lineNumber:16,columnNumber:5},this)}var I1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainSteps.tsx";function F1e(){const e=Sn(),t=gt(i=>i.options.steps);return C(Vl,{label:"Steps",min:1,max:9999,step:1,onChange:i=>e(GB(i)),value:t,width:IE,fontSize:Bv,styleClass:"main-option-block",textAlign:"center"},void 0,!1,{fileName:I1e,lineNumber:14,columnNumber:5},this)}var z1e="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainWidth.tsx";function B1e(){const e=gt(i=>i.options.width),t=Sn();return C(Rb,{label:"Width",value:e,flexGrow:1,onChange:i=>t(ZB(Number(i.target.value))),validValues:T0e,fontSize:Bv,styleClass:"main-option-block"},void 0,!1,{fileName:z1e,lineNumber:16,columnNumber:5},this)}var gu="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/MainOptions/MainOptions.tsx";const Bv="0.9rem",IE="auto";function zU(){return C("div",{className:"main-options",children:C("div",{className:"main-options-list",children:[C("div",{className:"main-options-row",children:[C(M1e,{},void 0,!1,{fileName:gu,lineNumber:16,columnNumber:11},this),C(F1e,{},void 0,!1,{fileName:gu,lineNumber:17,columnNumber:11},this),C(A1e,{},void 0,!1,{fileName:gu,lineNumber:18,columnNumber:11},this)]},void 0,!0,{fileName:gu,lineNumber:15,columnNumber:9},this),C("div",{className:"main-options-row",children:[C(B1e,{},void 0,!1,{fileName:gu,lineNumber:21,columnNumber:11},this),C(L1e,{},void 0,!1,{fileName:gu,lineNumber:22,columnNumber:11},this),C(P1e,{},void 0,!1,{fileName:gu,lineNumber:23,columnNumber:11},this)]},void 0,!0,{fileName:gu,lineNumber:20,columnNumber:9},this)]},void 0,!0,{fileName:gu,lineNumber:14,columnNumber:7},this)},void 0,!1,{fileName:gu,lineNumber:13,columnNumber:5},this)}var BU={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},WM=Ae.createContext&&Ae.createContext(BU),F4="/Users/spencer/Documents/Code/stable-diffusion/frontend/node_modules/react-icons/lib/esm/iconBase.js",nd=globalThis&&globalThis.__assign||function(){return nd=Object.assign||function(e){for(var t,n=1,i=arguments.length;ne.system,e=>e.shouldDisplayGuides),Q1e=({children:e,feature:t})=>{const n=gt(X1e),{text:i}=r1e[t];return n?C(aE,{trigger:"hover",children:[C(uE,{children:C(Xs,{children:e},void 0,!1,{fileName:Yh,lineNumber:31,columnNumber:9},void 0)},void 0,!1,{fileName:Yh,lineNumber:30,columnNumber:7},void 0),C(lE,{className:"guide-popover-content",maxWidth:"400px",onClick:o=>o.preventDefault(),cursor:"initial",children:[C(oE,{className:"guide-popover-arrow"},void 0,!1,{fileName:Yh,lineNumber:39,columnNumber:9},void 0),C("div",{className:"guide-popover-guide-content",children:i},void 0,!1,{fileName:Yh,lineNumber:40,columnNumber:9},void 0)]},void 0,!0,{fileName:Yh,lineNumber:33,columnNumber:7},void 0)]},void 0,!0,{fileName:Yh,lineNumber:29,columnNumber:5},void 0):C(Ui,{},void 0,!1)};var j6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/GuideIcon.tsx";const J1e=qe(({feature:e,icon:t=$U},n)=>C(Q1e,{feature:e,children:C(Xs,{ref:n,children:C(ms,{as:t},void 0,!1,{fileName:j6,lineNumber:16,columnNumber:9},void 0)},void 0,!1,{fileName:j6,lineNumber:15,columnNumber:7},void 0)},void 0,!1,{fileName:j6,lineNumber:14,columnNumber:5},void 0));var qh="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/AccordionItems/InvokeAccordionItem.tsx";function ege(e){const{header:t,feature:n,options:i}=e;return C(VI,{className:"advanced-settings-item",children:[C("h2",{children:C($I,{className:"advanced-settings-header",children:[t,C(J1e,{feature:n},void 0,!1,{fileName:qh,lineNumber:25,columnNumber:11},this),C(jI,{},void 0,!1,{fileName:qh,lineNumber:26,columnNumber:11},this)]},void 0,!0,{fileName:qh,lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:qh,lineNumber:22,columnNumber:7},this),C(HI,{className:"advanced-settings-panel",children:i},void 0,!1,{fileName:qh,lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:qh,lineNumber:21,columnNumber:5},this)}var YM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/OptionsAccordion.tsx";const VU=e=>{const{accordionInfo:t}=e,n=gt(c=>c.system.openAccordions),i=Sn();return C(WI,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:c=>i(pve(c)),className:"advanced-settings",children:(()=>{const c=[];return t&&Object.keys(t).forEach(p=>{c.push(C(ege,{header:t[p].header,feature:t[p].feature,options:t[p].options},p,!1,{fileName:YM,lineNumber:40,columnNumber:11},void 0))}),c})()},void 0,!1,{fileName:YM,lineNumber:53,columnNumber:5},void 0)};var qM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/HiresOptions.tsx";const tge=()=>{const e=Sn(),t=gt(i=>i.options.hiresFix);return C(Sr,{gap:2,direction:"column",children:C(pm,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:i=>e(QB(i.target.checked))},void 0,!1,{fileName:qM,lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:qM,lineNumber:21,columnNumber:5},void 0)};var ZM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/SeamlessOptions.tsx";const nge=()=>{const e=Sn(),t=gt(i=>i.options.seamless);return C(Sr,{gap:2,direction:"column",children:C(pm,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:i=>e(XB(i.target.checked))},void 0,!1,{fileName:ZM,lineNumber:18,columnNumber:7},void 0)},void 0,!1,{fileName:ZM,lineNumber:17,columnNumber:5},void 0)};var V6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/OutputOptions.tsx";const HU=()=>C(Sr,{gap:2,direction:"column",children:[C(nge,{},void 0,!1,{fileName:V6,lineNumber:10,columnNumber:7},void 0),C(tge,{},void 0,!1,{fileName:V6,lineNumber:11,columnNumber:7},void 0)]},void 0,!0,{fileName:V6,lineNumber:9,columnNumber:5},void 0);var KM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAIButton.tsx";const vg=e=>{const{label:t,tooltip:n="",size:i="sm",...o}=e;return C(Ca,{label:n,children:C(Du,{size:i,...o,children:t},void 0,!1,{fileName:KM,lineNumber:17,columnNumber:7},void 0)},void 0,!1,{fileName:KM,lineNumber:16,columnNumber:5},void 0)},XM=Ga(e=>e.options,e=>({prompt:e.prompt,shouldGenerateVariations:e.shouldGenerateVariations,seedWeights:e.seedWeights,maskPath:e.maskPath,initialImagePath:e.initialImagePath,seed:e.seed,activeTab:e.activeTab}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),FE=Ga(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),WU=()=>{const{prompt:e}=gt(XM),{shouldGenerateVariations:t,seedWeights:n,maskPath:i,initialImagePath:o,seed:u,activeTab:c}=gt(XM),{isProcessing:p,isConnected:h}=gt(FE);return k.exports.useMemo(()=>!(!e||Boolean(e.match(/^[\s\r\n]+$/))||e&&!o&&c===1||i&&!o||p||!h||t&&(!(RE(n)||n==="")||u===-1)),[e,i,o,p,h,t,n,u,c])};var rge="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ProcessButtons/InvokeButton.tsx";function ige(){const e=Sn(),t=WU();return C(vg,{label:"Invoke","aria-label":"Invoke",type:"submit",isDisabled:!t,onClick:()=>{e(T8())},className:"invoke-btn"},void 0,!1,{fileName:rge,lineNumber:16,columnNumber:5},this)}var QM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/common/components/IAIIconButton.tsx";const Wp=e=>{const{tooltip:t="",tooltipPlacement:n="bottom",onClick:i,...o}=e;return C(Ca,{label:t,hasArrow:!0,placement:n,children:C(bi,{...o,cursor:i?"pointer":"unset",onClick:i},void 0,!1,{fileName:QM,lineNumber:22,columnNumber:7},void 0)},void 0,!1,{fileName:QM,lineNumber:21,columnNumber:5},void 0)};var JM="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ProcessButtons/CancelButton.tsx";function age(){const e=Sn(),{isProcessing:t,isConnected:n}=gt(FE),i=()=>e(C0e());return ii("shift+x",()=>{(n||t)&&i()},[n,t]),C(Wp,{icon:C(K1e,{},void 0,!1,{fileName:JM,lineNumber:26,columnNumber:13},this),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!n||!t,onClick:i,className:"cancel-btn"},void 0,!1,{fileName:JM,lineNumber:25,columnNumber:5},this)}var H6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/ProcessButtons/ProcessButtons.tsx";const GU=()=>C("div",{className:"process-buttons",children:[C(ige,{},void 0,!1,{fileName:H6,lineNumber:10,columnNumber:7},void 0),C(age,{},void 0,!1,{fileName:H6,lineNumber:11,columnNumber:7},void 0)]},void 0,!0,{fileName:H6,lineNumber:9,columnNumber:5},void 0);var W6="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/options/PromptInput/PromptInput.tsx";const oge=Ga(e=>e.options,e=>({prompt:e.prompt}),{memoizeOptions:{resultEqualityCheck:Wa.exports.isEqual}}),YU=()=>{const e=k.exports.useRef(null),{prompt:t}=gt(oge),{isProcessing:n}=gt(FE),i=Sn(),o=WU(),u=p=>{i(WB(p.target.value))};ii("ctrl+enter",()=>{o&&i(T8())},[o]),ii("alt+a",()=>{e.current?.focus()},[]);const c=p=>{p.key==="Enter"&&p.shiftKey===!1&&o&&(p.preventDefault(),i(T8()))};return C("div",{className:"prompt-bar",children:C(fd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),isDisabled:n,children:C(Wz,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:u,onKeyDown:c,resize:"vertical",height:30,ref:e},void 0,!1,{fileName:W6,lineNumber:73,columnNumber:9},void 0)},void 0,!1,{fileName:W6,lineNumber:69,columnNumber:7},void 0)},void 0,!1,{fileName:W6,lineNumber:68,columnNumber:5},void 0)};var Xi="/Users/spencer/Documents/Code/stable-diffusion/frontend/src/features/tabs/ImageToImage/ImageToImagePanel.tsx";function sge(){const e=gt(n=>n.options.showAdvancedOptions),t={seed:{header:C(Xs,{flex:"1",textAlign:"left",children:"Seed"},void 0,!1,{fileName:Xi,lineNumber:29,columnNumber:9},this),feature:zl.SEED,options:C(MU,{},void 0,!1,{fileName:Xi,lineNumber:34,columnNumber:16},this)},variations:{header:C(PU,{},void 0,!1,{fileName:Xi,lineNumber:37,columnNumber:15},this),feature:zl.VARIATIONS,options:C(IU,{},void 0,!1,{fileName:Xi,lineNumber:39,columnNumber:16},this)},face_restore:{header:C(OU,{},void 0,!1,{fileName:Xi,lineNumber:42,columnNumber:15},this),feature:zl.FACE_CORRECTION,options:C(DE,{},void 0,!1,{fileName:Xi,lineNumber:44,columnNumber:16},this)},upscale:{header:C(DU,{},void 0,!1,{fileName:Xi,lineNumber:47,columnNumber:15},this),feature:zl.UPSCALE,options:C(PE,{},void 0,!1,{fileName:Xi,lineNumber:49,columnNumber:16},this)},other:{header:C(Xs,{flex:"1",textAlign:"left",children:"Other"},void 0,!1,{fileName:Xi,lineNumber:53,columnNumber:9},this),feature:zl.OTHER,options:C(HU,{},void 0,!1,{fileName:Xi,lineNumber:58,columnNumber:16},this)}};return C("div",{className:"image-to-image-panel",children:[C(YU,{},void 0,!1,{fileName:Xi,lineNumber:64,columnNumber:7},this),C(GU,{},void 0,!1,{fileName:Xi,lineNumber:65,columnNumber:7},this),C(zU,{},void 0,!1,{fileName:Xi,lineNumber:66,columnNumber:7},this),C(u1e,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"},void 0,!1,{fileName:Xi,lineNumber:67,columnNumber:7},this),C(s1e,{},void 0,!1,{fileName:Xi,lineNumber:71,columnNumber:7},this),C(FU,{},void 0,!1,{fileName:Xi,lineNumber:72,columnNumber:7},this),e?C(VU,{accordionInfo:t},void 0,!1,{fileName:Xi,lineNumber:74,columnNumber:9},this):null]},void 0,!0,{fileName:Xi,lineNumber:63,columnNumber:5},this)}function lge(e){return hr({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function uge(e){return hr({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function cge(e){return hr({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function fge(e){return hr({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function dge(e){return hr({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function pge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function mge(e){return hr({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function hge(e){return hr({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function vge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function gge(e){return hr({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function bge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"}}]})(e)}function yge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function Sge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"}}]})(e)}function xge(e){return hr({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function Cge(e){return hr({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}var Nge=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Ab(e,t){var n=wge(e);if(typeof n.path!="string"){var i=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof i=="string"&&i.length>0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function wge(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var i=t.split(".").pop().toLowerCase(),o=Nge.get(i);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var _ge=[".DS_Store","Thumbs.db"];function Ege(e){return Ov(this,void 0,void 0,function(){return Mv(this,function(t){return CS(e)&&Tge(e.dataTransfer)?[2,Lge(e.dataTransfer,e.type)]:Rge(e)?[2,Age(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,kge(e)]:[2,[]]})})}function Tge(e){return CS(e)}function Rge(e){return CS(e)&&CS(e.target)}function CS(e){return typeof e=="object"&&e!==null}function Age(e){return A8(e.target.files).map(function(t){return Ab(t)})}function kge(e){return Ov(this,void 0,void 0,function(){var t;return Mv(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(i){return Ab(i)})]}})})}function Lge(e,t){return Ov(this,void 0,void 0,function(){var n,i;return Mv(this,function(o){switch(o.label){case 0:return e.items?(n=A8(e.items).filter(function(u){return u.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Oge))]):[3,2];case 1:return i=o.sent(),[2,eD(qU(i))];case 2:return[2,eD(A8(e.files).map(function(u){return Ab(u)}))]}})})}function eD(e){return e.filter(function(t){return _ge.indexOf(t.name)===-1})}function A8(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);nn)return[!1,aD(n)];if(e.sizen)return[!1,aD(n)]}return[!0,null]}function Gp(e){return e!=null}function qge(e){var t=e.files,n=e.accept,i=e.minSize,o=e.maxSize,u=e.multiple,c=e.maxFiles,p=e.validator;return!u&&t.length>1||u&&c>=1&&t.length>c?!1:t.every(function(h){var v=QU(h,n),b=rb(v,1),x=b[0],N=JU(h,i,o),_=rb(N,1),T=_[0],A=p?p(h):null;return x&&T&&!A})}function NS(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function c4(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function sD(e){e.preventDefault()}function Zge(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Kge(e){return e.indexOf("Edge/")!==-1}function Xge(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Zge(e)||Kge(e)}function bu(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),c=1;c InvokeAI - A Stable Diffusion Toolkit - + diff --git a/frontend/src/features/gallery/gallerySlice.ts b/frontend/src/features/gallery/gallerySlice.ts index 415b80d326..cc9341fd81 100644 --- a/frontend/src/features/gallery/gallerySlice.ts +++ b/frontend/src/features/gallery/gallerySlice.ts @@ -72,7 +72,13 @@ export const gallerySlice = createSlice({ }, addImage: (state, action: PayloadAction) => { const newImage = action.payload; - const { uuid, mtime } = newImage; + const { uuid, url, mtime } = newImage; + + // Do not add duplicate images + if (state.images.find((i) => i.url === url && i.mtime === mtime)) { + return; + } + state.images.unshift(newImage); state.currentImageUuid = uuid; state.intermediateImage = undefined; @@ -120,8 +126,15 @@ export const gallerySlice = createSlice({ ) => { const { images, areMoreImagesAvailable } = action.payload; if (images.length > 0) { + // Filter images that already exist in the gallery + const newImages = images.filter( + (newImage) => + !state.images.find( + (i) => i.url === newImage.url && i.mtime === newImage.mtime + ) + ); state.images = state.images - .concat(images) + .concat(newImages) .sort((a, b) => b.mtime - a.mtime); if (!state.currentImage) { diff --git a/frontend/src/features/options/MainOptions/MainCFGScale.tsx b/frontend/src/features/options/MainOptions/MainCFGScale.tsx index b813079309..adb4d4697e 100644 --- a/frontend/src/features/options/MainOptions/MainCFGScale.tsx +++ b/frontend/src/features/options/MainOptions/MainCFGScale.tsx @@ -15,7 +15,7 @@ export default function MainCFGScale() { label="CFG Scale" step={0.5} min={1} - max={200} + max={30} onChange={handleChangeCfgScale} value={cfgScale} width={inputWidth} From d4d1014c9fbb0728af5dc3fde781b2b1a3ae881d Mon Sep 17 00:00:00 2001 From: Jan Skurovec Date: Wed, 19 Oct 2022 08:54:47 +0200 Subject: [PATCH 09/18] fix for 'model is not defined' when loading embedding --- ldm/generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldm/generate.py b/ldm/generate.py index fa72a72d38..b21787eb47 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -728,7 +728,7 @@ class Generate: seed_everything(random.randrange(0, np.iinfo(np.uint32).max)) if self.embedding_path is not None: - model.embedding_manager.load( + self.model.embedding_manager.load( self.embedding_path, self.precision == 'float32' or self.precision == 'autocast' ) From 83e6ab08aae620745f8bddb587b6799a1d70b7ea Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Fri, 21 Oct 2022 00:28:54 -0400 Subject: [PATCH 10/18] further improvements to model loading - code for committing config changes to models.yaml now in module rather than in invoke script - model marked "default" is now loaded if model not specified on command line - uncache changed models when edited, so that they reload properly - removed liaon from models.yaml and added stable-diffusion-1.5 --- configs/models.yaml | 12 +++---- ldm/generate.py | 8 +++-- ldm/invoke/args.py | 7 ++-- ldm/invoke/model_cache.py | 67 +++++++++++++++++++++++++++++++++++---- scripts/invoke.py | 24 +++++++++----- 5 files changed, 91 insertions(+), 27 deletions(-) diff --git a/configs/models.yaml b/configs/models.yaml index 8dd792d75e..f3fde45d8f 100644 --- a/configs/models.yaml +++ b/configs/models.yaml @@ -6,15 +6,15 @@ # and the width and height of the images it # was trained on. -laion400m: - config: configs/latent-diffusion/txt2img-1p4B-eval.yaml - weights: models/ldm/text2img-large/model.ckpt - description: Latent Diffusion LAION400M model - width: 256 - height: 256 stable-diffusion-1.4: config: configs/stable-diffusion/v1-inference.yaml weights: models/ldm/stable-diffusion-v1/model.ckpt description: Stable Diffusion inference model version 1.4 width: 512 height: 512 +stable-diffusion-1.5: + config: configs/stable-diffusion/v1-inference.yaml + weights: models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt + description: Stable Diffusion inference model version 1.5 + width: 512 + height: 512 diff --git a/ldm/generate.py b/ldm/generate.py index 0f543e97ec..5f3a6fd4b5 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -35,6 +35,9 @@ from ldm.invoke.devices import choose_torch_device, choose_precision from ldm.invoke.conditioning import get_uc_and_c from ldm.invoke.model_cache import ModelCache +# this is fallback model in case no default is defined +FALLBACK_MODEL_NAME='stable-diffusion-1.4' + def fix_func(orig): if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available(): def new_func(*args, **kw): @@ -127,7 +130,7 @@ class Generate: def __init__( self, - model = 'stable-diffusion-1.4', + model = None, conf = 'configs/models.yaml', embedding_path = None, sampler_name = 'k_lms', @@ -143,7 +146,6 @@ class Generate: free_gpu_mem=False, ): mconfig = OmegaConf.load(conf) - self.model_name = model self.height = None self.width = None self.model_cache = None @@ -188,6 +190,8 @@ class Generate: # model caching system for fast switching self.model_cache = ModelCache(mconfig,self.device,self.precision) + print(f'DEBUG: model={model}, default_model={self.model_cache.default_model()}') + self.model_name = model or self.model_cache.default_model() or FALLBACK_MODEL_NAME # for VRAM usage statistics self.session_peakmem = torch.cuda.max_memory_allocated() if self._has_cuda else None diff --git a/ldm/invoke/args.py b/ldm/invoke/args.py index 2b14129a84..c997f45da2 100644 --- a/ldm/invoke/args.py +++ b/ldm/invoke/args.py @@ -364,17 +364,16 @@ class Args(object): deprecated_group.add_argument('--laion400m') deprecated_group.add_argument('--weights') # deprecated model_group.add_argument( - '--conf', + '--config', '-c', - '-conf', + '-config', dest='conf', default='./configs/models.yaml', help='Path to configuration file for alternate models.', ) model_group.add_argument( '--model', - default='stable-diffusion-1.4', - help='Indicates which diffusion model to load. (currently "stable-diffusion-1.4" (default) or "laion400m")', + help='Indicates which diffusion model to load (defaults to "default" stanza in configs/models.yaml)', ) model_group.add_argument( '--sampler', diff --git a/ldm/invoke/model_cache.py b/ldm/invoke/model_cache.py index eecec5ff9d..5e9e53cfb7 100644 --- a/ldm/invoke/model_cache.py +++ b/ldm/invoke/model_cache.py @@ -85,6 +85,26 @@ class ModelCache(object): 'hash': hash } + def default_model(self) -> str: + ''' + Returns the name of the default model, or None + if none is defined. + ''' + for model_name in self.config: + if self.config[model_name].get('default',False): + return model_name + return None + + def set_default_model(self,model_name:str): + ''' + Set the default model. The change will not take + effect until you call model_cache.commit() + ''' + assert model_name in self.models,f"unknown model '{model_name}'" + for model in self.models: + self.models[model].pop('default',None) + self.models[model_name]['default'] = True + def list_models(self) -> dict: ''' Return a dict of models in the format: @@ -122,22 +142,23 @@ class ModelCache(object): else: print(line) - def del_model(self, model_name:str) ->str: + def del_model(self, model_name:str) ->bool: ''' - Delete the named model and return the YAML + Delete the named model. ''' omega = self.config del omega[model_name] if model_name in self.stack: self.stack.remove(model_name) - return OmegaConf.to_yaml(omega) + return True - def add_model(self, model_name:str, model_attributes:dict, clobber=False) ->str: + def add_model(self, model_name:str, model_attributes:dict, clobber=False) ->True: ''' Update the named model with a dictionary of attributes. Will fail with an assertion error if the name already exists. Pass clobber=True to overwrite. - On a successful update, the config will be changed in memory and a YAML - string will be returned. + On a successful update, the config will be changed in memory and the + method will return True. Will fail with an assertion error if provided + attributes are incorrect or the model name is missing. ''' omega = self.config # check that all the required fields are present @@ -150,7 +171,9 @@ class ModelCache(object): config[field] = model_attributes[field] omega[model_name] = config - return OmegaConf.to_yaml(omega) + if clobber: + self._invalidate_cached_model(model_name) + return True def _check_memory(self): avail_memory = psutil.virtual_memory()[1] @@ -230,6 +253,36 @@ class ModelCache(object): if self._has_cuda(): torch.cuda.empty_cache() + def commit(self,config_file_path:str): + ''' + Write current configuration out to the indicated file. + ''' + yaml_str = OmegaConf.to_yaml(self.config) + tmpfile = os.path.join(os.path.dirname(config_file_path),'new_config.tmp') + with open(tmpfile, 'w') as outfile: + outfile.write(self.preamble()) + outfile.write(yaml_str) + os.rename(tmpfile,config_file_path) + + def preamble(self): + ''' + Returns the preamble for the config file. + ''' + return '''# This file describes the alternative machine learning models +# available to the dream script. +# +# To add a new model, follow the examples below. Each +# model requires a model config file, a weights file, +# and the width and height of the images it +# was trained on. +''' + + def _invalidate_cached_model(self,model_name:str): + self.unload_model(model_name) + if model_name in self.stack: + self.stack.remove(model_name) + self.models.pop(model_name,None) + def _model_to_cpu(self,model): if self.device != 'cpu': model.cond_stage_model.device = 'cpu' diff --git a/scripts/invoke.py b/scripts/invoke.py index 7b9c574913..8aedfb87a5 100644 --- a/scripts/invoke.py +++ b/scripts/invoke.py @@ -341,6 +341,7 @@ def main_loop(gen, opt, infile): print('goodbye!') + # to do: this is ugly, fix def do_command(command:str, gen, opt:Args, completer) -> tuple: operation = 'generate' # default operation, alternative is 'postprocess' @@ -455,7 +456,10 @@ def add_weights_to_config(model_path:str, gen, opt, completer): done = True except: print('** Please enter a valid integer between 64 and 2048') - if write_config_file(opt.conf, gen, model_name, new_config): + + make_default = input('Make this the default model? [n] ') in ('y','Y') + + if write_config_file(opt.conf, gen, model_name, new_config, make_default=make_default): completer.add_model(model_name) def del_config(model_name:str, gen, opt, completer): @@ -488,14 +492,17 @@ def edit_config(model_name:str, gen, opt, completer): completer.linebuffer = str(conf[field]) if field in conf else '' new_value = input(f'{field}: ') new_config[field] = int(new_value) if field in ('width','height') else new_value + make_default = input('Make this the default model? [n] ') in ('y','Y') completer.complete_extensions(None) - write_config_file(opt.conf, gen, model_name, new_config, clobber=True) + write_config_file(opt.conf, gen, model_name, new_config, clobber=True, make_default=make_default) -def write_config_file(conf_path, gen, model_name, new_config, clobber=False): +def write_config_file(conf_path, gen, model_name, new_config, clobber=False, make_default=False): current_model = gen.model_name op = 'modify' if clobber else 'import' print('\n>> New configuration:') + if make_default: + new_config['default'] = True print(yaml.dump({model_name:new_config})) if input(f'OK to {op} [n]? ') not in ('y','Y'): return False @@ -508,12 +515,13 @@ def write_config_file(conf_path, gen, model_name, new_config, clobber=False): print(f'** aborting **') gen.model_cache.del_model(model_name) return False - - tmpfile = os.path.join(os.path.dirname(conf_path),'new_config.tmp') - with open(tmpfile, 'w') as outfile: - outfile.write(yaml_str) - os.rename(tmpfile,conf_path) + if make_default: + print('making this default') + gen.model_cache.set_default_model(model_name) + + gen.model_cache.commit(conf_path) + do_switch = input(f'Keep model loaded? [y]') if len(do_switch)==0 or do_switch[0] in ('y','Y'): pass From fbea657effa4d9adb34a2d1c7306b3063b79fadc Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 20 Oct 2022 20:08:24 -0400 Subject: [PATCH 11/18] fix a number of bugs in textual inversion - remove unsupported testtubelogger, use csvlogger instead - fix logic for parsing --gpus option so that it won't crash if trailing comma absent - change trainer accelerator from unsupported 'ddp' to 'auto' --- main.py | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/main.py b/main.py index 436b7251ba..60c091891c 100644 --- a/main.py +++ b/main.py @@ -439,7 +439,7 @@ class ImageLogger(Callback): self.rescale = rescale self.batch_freq = batch_frequency self.max_images = max_images - self.logger_log_images = { pl.loggers.TestTubeLogger: self._testtube, } if torch.cuda.is_available() else { } + self.logger_log_images = { } self.log_steps = [ 2**n for n in range(int(np.log2(self.batch_freq)) + 1) ] @@ -451,17 +451,6 @@ class ImageLogger(Callback): self.log_images_kwargs = log_images_kwargs if log_images_kwargs else {} self.log_first_step = log_first_step - @rank_zero_only - def _testtube(self, pl_module, images, batch_idx, split): - for k in images: - grid = torchvision.utils.make_grid(images[k]) - grid = (grid + 1.0) / 2.0 # -1,1 -> 0,1; c,h,w - - tag = f'{split}/{k}' - pl_module.logger.experiment.add_image( - tag, grid, global_step=pl_module.global_step - ) - @rank_zero_only def log_local( self, save_dir, split, images, global_step, current_epoch, batch_idx @@ -714,7 +703,7 @@ if __name__ == '__main__': # merge trainer cli with config trainer_config = lightning_config.get('trainer', OmegaConf.create()) # default to ddp - trainer_config['accelerator'] = 'ddp' + trainer_config['accelerator'] = 'auto' for k in nondefault_trainer_args(opt): trainer_config[k] = getattr(opt, k) if not 'gpus' in trainer_config: @@ -751,12 +740,8 @@ if __name__ == '__main__': trainer_kwargs = dict() # default logger configs - if torch.cuda.is_available(): - def_logger = 'testtube' - def_logger_target = 'TestTubeLogger' - else: - def_logger = 'csv' - def_logger_target = 'CSVLogger' + def_logger = 'csv' + def_logger_target = 'CSVLogger' default_logger_cfgs = { 'wandb': { 'target': 'pytorch_lightning.loggers.WandbLogger', @@ -918,7 +903,8 @@ if __name__ == '__main__': config.model.base_learning_rate, ) if not cpu: - ngpu = len(lightning_config.trainer.gpus.strip(',').split(',')) + gpus = str(lightning_config.trainer.gpus).strip(', ').split(',') + ngpu = len(gpus) else: ngpu = 1 if 'accumulate_grad_batches' in lightning_config.trainer: From c9f9eed04ea456a9ca59eeafc78b2eda6b1fb281 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Fri, 21 Oct 2022 12:54:13 -0400 Subject: [PATCH 12/18] resolve numerous small merge bugs - This merges PR #882 Coauthor: ArDiouscuros --- ldm/invoke/readline.py | 12 +++++- scripts/invoke.py | 89 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 82 insertions(+), 19 deletions(-) diff --git a/ldm/invoke/readline.py b/ldm/invoke/readline.py index 6814f10f1b..d7cff45bfa 100644 --- a/ldm/invoke/readline.py +++ b/ldm/invoke/readline.py @@ -22,6 +22,7 @@ except (ImportError,ModuleNotFoundError): IMG_EXTENSIONS = ('.png','.jpg','.jpeg','.PNG','.JPG','.JPEG','.gif','.GIF') WEIGHT_EXTENSIONS = ('.ckpt','.bae') +TEXT_EXTENSIONS = ('.txt','.TXT') CONFIG_EXTENSIONS = ('.yaml','.yml') COMMANDS = ( '--steps','-s', @@ -69,6 +70,9 @@ WEIGHT_COMMANDS = ( IMG_PATH_COMMANDS = ( '--outdir[=\s]', ) +TEXT_PATH_COMMANDS=( + '!replay', + ) IMG_FILE_COMMANDS=( '!fix', '!fetch', @@ -78,8 +82,9 @@ IMG_FILE_COMMANDS=( '--init_color[=\s]', '--embedding_path[=\s]', ) -path_regexp = '('+'|'.join(IMG_PATH_COMMANDS+IMG_FILE_COMMANDS) + ')\s*\S*$' -weight_regexp = '('+'|'.join(WEIGHT_COMMANDS) + ')\s*\S*$' +path_regexp = '(' + '|'.join(IMG_PATH_COMMANDS+IMG_FILE_COMMANDS) + ')\s*\S*$' +weight_regexp = '(' + '|'.join(WEIGHT_COMMANDS) + ')\s*\S*$' +text_regexp = '(' + '|'.join(TEXT_PATH_COMMANDS) + ')\s*\S*$' class Completer(object): def __init__(self, options, models=[]): @@ -122,6 +127,9 @@ class Completer(object): elif re.search(weight_regexp,buffer): self.matches = self._path_completions(text, state, WEIGHT_EXTENSIONS) + elif re.search(text_regexp,buffer): + self.matches = self._path_completions(text, state, TEXT_EXTENSIONS) + # This is the first time for this text, so build a match list. elif text: self.matches = [ diff --git a/scripts/invoke.py b/scripts/invoke.py index 754ee1fad0..84b3835579 100644 --- a/scripts/invoke.py +++ b/scripts/invoke.py @@ -17,9 +17,15 @@ from ldm.invoke.pngwriter import PngWriter, retrieve_metadata, write_metadata from ldm.invoke.image_util import make_grid from ldm.invoke.log import write_log from omegaconf import OmegaConf +from pathlib import Path + +# global used in multiple functions (fix) +infile = None def main(): """Initialize command-line parsers and the diffusion model""" + global infile + opt = Args() args = opt.parse_args() if not args: @@ -48,7 +54,6 @@ def main(): os.makedirs(opt.outdir) # load the infile as a list of lines - infile = None if opt.infile: try: if os.path.isfile(opt.infile): @@ -96,14 +101,16 @@ def main(): ) try: - main_loop(gen, opt, infile) + main_loop(gen, opt) except KeyboardInterrupt: print("\ngoodbye!") # TODO: main_loop() has gotten busy. Needs to be refactored. -def main_loop(gen, opt, infile): +def main_loop(gen, opt): """prompt/read/execute loop""" + global infile done = False + doneAfterInFile = infile is not None path_filter = re.compile(r'[<>:"/\\|?*]') last_results = list() model_config = OmegaConf.load(opt.conf) @@ -130,7 +137,8 @@ def main_loop(gen, opt, infile): try: command = get_next_command(infile) except EOFError: - done = True + done = infile is None or doneAfterInFile + infile = None continue # skip empty lines @@ -368,7 +376,10 @@ def main_loop(gen, opt, infile): print('goodbye!') +# TO DO: remove repetitive code and the awkward command.replace() trope +# Just do a simple parse of the command! def do_command(command:str, gen, opt:Args, completer) -> tuple: + global infile operation = 'generate' # default operation, alternative is 'postprocess' if command.startswith('!dream'): # in case a stored prompt still contains the !dream command @@ -414,8 +425,16 @@ def do_command(command:str, gen, opt:Args, completer) -> tuple: operation = None elif command.startswith('!fetch'): - file_path = command.replace('!fetch ','',1) + file_path = command.replace('!fetch','',1).strip() retrieve_dream_command(opt,file_path,completer) + completer.add_history(command) + operation = None + + elif command.startswith('!replay'): + file_path = command.replace('!replay','',1).strip() + if infile is None and os.path.isfile(file_path): + infile = open(file_path, 'r', encoding='utf-8') + completer.add_history(command) operation = None elif command.startswith('!history'): @@ -423,7 +442,7 @@ def do_command(command:str, gen, opt:Args, completer) -> tuple: operation = None elif command.startswith('!search'): - search_str = command.replace('!search ','',1) + search_str = command.replace('!search','',1).strip() completer.show_history(search_str) operation = None @@ -723,27 +742,63 @@ def make_step_callback(gen, opt, prefix): image.save(filename,'PNG') return callback -def retrieve_dream_command(opt,file_path,completer): +def retrieve_dream_command(opt,command,completer): ''' Given a full or partial path to a previously-generated image file, will retrieve and format the dream command used to generate the image, and pop it into the readline buffer (linux, Mac), or print out a comment for cut-and-paste (windows) + Given a wildcard path to a folder with image png files, + will retrieve and format the dream command used to generate the images, + and save them to a file commands.txt for further processing ''' + if len(command) == 0: + return + tokens = command.split() + if len(tokens) > 1: + outfilepath = tokens[1] + else: + outfilepath = "commands.txt" + + file_path = tokens[0] dir,basename = os.path.split(file_path) if len(dir) == 0: - path = os.path.join(opt.outdir,basename) - else: - path = file_path + dir = opt.outdir + + outdir,outname = os.path.split(outfilepath) + if len(outdir) == 0: + outfilepath = os.path.join(dir,outname) try: - cmd = dream_cmd_from_png(path) - except OSError: - print(f'** {path}: file could not be read') + paths = list(Path(dir).glob(basename)) + except ValueError: + print(f'## "{basename}": unacceptable pattern') return - except (KeyError, AttributeError): - print(f'** {path}: file has no metadata') - return - completer.set_line(cmd) + + commands = [] + for path in paths: + try: + cmd = dream_cmd_from_png(path) + except OSError: + print(f'## {path}: file could not be read') + continue + except (KeyError, AttributeError, IndexError): + print(f'## {path}: file has no metadata') + continue + except: + print(f'## {path}: file could not be processed') + continue + + commands.append(f'# {path}') + commands.append(cmd) + + with open(outfilepath, 'w', encoding='utf-8') as f: + f.write('\n'.join(commands)) + print(f'>> File {outfilepath} with commands created') + + if len(commands) == 2: + completer.set_line(commands[1]) + +###################################### if __name__ == '__main__': main() From a127eeff204bf80ec85837618fcf44e9ddadfff7 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 21 Oct 2022 23:04:38 +0800 Subject: [PATCH 13/18] Fixes gallery bugs & adds gallery context menu --- frontend/dist/assets/index.2d646c45.js | 690 ++++++++++++++++++ frontend/dist/assets/index.58175ea1.css | 1 - frontend/dist/assets/index.7749e179.css | 1 + frontend/dist/assets/index.b06af007.js | 690 ------------------ frontend/dist/index.html | 4 +- frontend/package.json | 2 +- frontend/src/app/socketio/emitters.ts | 2 +- .../WorkInProgress/PostProcessingWIP.tsx | 11 +- .../src/features/gallery/DeleteImageModal.tsx | 8 + .../src/features/gallery/HoverableImage.scss | 42 ++ .../src/features/gallery/HoverableImage.tsx | 243 +++--- .../src/features/gallery/ImageGallery.scss | 52 +- .../src/features/gallery/ImageGallery.tsx | 21 +- frontend/src/features/options/optionsSlice.ts | 100 ++- .../tabs/ImageToImage/InitImagePreview.tsx | 22 +- frontend/src/features/tabs/InvokeTabs.tsx | 5 + frontend/src/styles/_Colors_Dark.scss | 5 + frontend/src/styles/_Colors_Light.scss | 7 + frontend/yarn.lock | 279 ++++++- 19 files changed, 1314 insertions(+), 871 deletions(-) create mode 100644 frontend/dist/assets/index.2d646c45.js delete mode 100644 frontend/dist/assets/index.58175ea1.css create mode 100644 frontend/dist/assets/index.7749e179.css delete mode 100644 frontend/dist/assets/index.b06af007.js diff --git a/frontend/dist/assets/index.2d646c45.js b/frontend/dist/assets/index.2d646c45.js new file mode 100644 index 0000000000..1fd272c7b0 --- /dev/null +++ b/frontend/dist/assets/index.2d646c45.js @@ -0,0 +1,690 @@ +function iY(e,t){for(var n=0;ni[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var Dc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aY(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E={exports:{}},$7={exports:{}};/** + * @license React + * react.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e,t){(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.2.0",i=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),v=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),k=Symbol.iterator,I="@@iterator";function D(S){if(S===null||typeof S!="object")return null;var L=k&&S[k]||S[I];return typeof L=="function"?L:null}var P={current:null},F={transition:null},z={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},q={current:null},Y={},Q=null;function ie(S){Q=S}Y.setExtraStackFrame=function(S){Q=S},Y.getCurrentStack=null,Y.getStackAddendum=function(){var S="";Q&&(S+=Q);var L=Y.getCurrentStack;return L&&(S+=L()||""),S};var ae=!1,pe=!1,$e=!1,te=!1,ee=!1,be={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:F,ReactCurrentOwner:q};be.ReactDebugCurrentFrame=Y,be.ReactCurrentActQueue=z;function Ce(S){{for(var L=arguments.length,V=new Array(L>1?L-1:0),G=1;G1?L-1:0),G=1;G1){for(var It=Array(wt),yt=0;yt1){for(var Wt=Array(yt),Ot=0;Ot is not supported and will be removed in a future major release. Did you mean to render instead?")),L.Provider},set:function(Ee){L.Provider=Ee}},_currentValue:{get:function(){return L._currentValue},set:function(Ee){L._currentValue=Ee}},_currentValue2:{get:function(){return L._currentValue2},set:function(Ee){L._currentValue2=Ee}},_threadCount:{get:function(){return L._threadCount},set:function(Ee){L._threadCount=Ee}},Consumer:{get:function(){return V||(V=!0,K("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),L.Consumer}},displayName:{get:function(){return L.displayName},set:function(Ee){se||(Ce("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Ee),se=!0)}}}),L.Consumer=ze}return L._currentRenderer=null,L._currentRenderer2=null,L}var hr=-1,Vi=0,qa=1,Hi=2;function X(S){if(S._status===hr){var L=S._result,V=L();if(V.then(function(ze){if(S._status===Vi||S._status===hr){var Ee=S;Ee._status=qa,Ee._result=ze}},function(ze){if(S._status===Vi||S._status===hr){var Ee=S;Ee._status=Hi,Ee._result=ze}}),S._status===hr){var G=S;G._status=Vi,G._result=V}}if(S._status===qa){var se=S._result;return se===void 0&&K(`lazy: Expected the result of a dynamic import() call. Instead received: %s + +Your code should look like: + const MyComponent = lazy(() => import('./MyComponent')) + +Did you accidentally put curly braces around the import?`,se),"default"in se||K(`lazy: Expected the result of a dynamic import() call. Instead received: %s + +Your code should look like: + const MyComponent = lazy(() => import('./MyComponent'))`,se),se.default}else throw S._result}function Ue(S){var L={_status:hr,_result:S},V={$$typeof:T,_payload:L,_init:X};{var G,se;Object.defineProperties(V,{defaultProps:{configurable:!0,get:function(){return G},set:function(ze){K("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."),G=ze,Object.defineProperty(V,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return se},set:function(ze){K("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."),se=ze,Object.defineProperty(V,"propTypes",{enumerable:!0})}}})}return V}function Xe(S){S!=null&&S.$$typeof===w?K("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof S!="function"?K("forwardRef requires a render function but was given %s.",S===null?"null":typeof S):S.length!==0&&S.length!==2&&K("forwardRef render functions accept exactly two parameters: props and ref. %s",S.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),S!=null&&(S.defaultProps!=null||S.propTypes!=null)&&K("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var L={$$typeof:g,render:S};{var V;Object.defineProperty(L,"displayName",{enumerable:!1,configurable:!0,get:function(){return V},set:function(G){V=G,!S.name&&!S.displayName&&(S.displayName=G)}})}return L}var Et;Et=Symbol.for("react.module.reference");function ln(S){return!!(typeof S=="string"||typeof S=="function"||S===s||S===p||ee||S===u||S===b||S===C||te||S===A||ae||pe||$e||typeof S=="object"&&S!==null&&(S.$$typeof===T||S.$$typeof===w||S.$$typeof===m||S.$$typeof===v||S.$$typeof===g||S.$$typeof===Et||S.getModuleId!==void 0))}function Cn(S,L){ln(S)||K("memo: The first argument must be a component. Instead received: %s",S===null?"null":typeof S);var V={$$typeof:w,type:S,compare:L===void 0?null:L};{var G;Object.defineProperty(V,"displayName",{enumerable:!1,configurable:!0,get:function(){return G},set:function(se){G=se,!S.name&&!S.displayName&&(S.displayName=se)}})}return V}function ot(){var S=P.current;return S===null&&K(`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: +1. You might have mismatching versions of React and the renderer (such as React DOM) +2. You might be breaking the Rules of Hooks +3. You might have more than one copy of React in the same app +See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),S}function Zt(S){var L=ot();if(S._context!==void 0){var V=S._context;V.Consumer===S?K("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?"):V.Provider===S&&K("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return L.useContext(S)}function Vn(S){var L=ot();return L.useState(S)}function Bn(S,L,V){var G=ot();return G.useReducer(S,L,V)}function cn(S){var L=ot();return L.useRef(S)}function Wr(S,L){var V=ot();return V.useEffect(S,L)}function Ea(S,L){var V=ot();return V.useInsertionEffect(S,L)}function Vo(S,L){var V=ot();return V.useLayoutEffect(S,L)}function Ei(S,L){var V=ot();return V.useCallback(S,L)}function go(S,L){var V=ot();return V.useMemo(S,L)}function Hu(S,L,V){var G=ot();return G.useImperativeHandle(S,L,V)}function _a(S,L){{var V=ot();return V.useDebugValue(S,L)}}function al(){var S=ot();return S.useTransition()}function Za(S){var L=ot();return L.useDeferredValue(S)}function en(){var S=ot();return S.useId()}function Ka(S,L,V){var G=ot();return G.useSyncExternalStore(S,L,V)}var _i=0,Ho,ys,Wo,xs,Ss,Go,Yo;function Cs(){}Cs.__reactDisabledLog=!0;function ol(){{if(_i===0){Ho=console.log,ys=console.info,Wo=console.warn,xs=console.error,Ss=console.group,Go=console.groupCollapsed,Yo=console.groupEnd;var S={configurable:!0,enumerable:!0,value:Cs,writable:!0};Object.defineProperties(console,{info:S,log:S,warn:S,error:S,group:S,groupCollapsed:S,groupEnd:S})}_i++}}function sl(){{if(_i--,_i===0){var S={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Le({},S,{value:Ho}),info:Le({},S,{value:ys}),warn:Le({},S,{value:Wo}),error:Le({},S,{value:xs}),group:Le({},S,{value:Ss}),groupCollapsed:Le({},S,{value:Go}),groupEnd:Le({},S,{value:Yo})})}_i<0&&K("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ta=be.ReactCurrentDispatcher,Br;function Wi(S,L,V){{if(Br===void 0)try{throw Error()}catch(se){var G=se.stack.trim().match(/\n( *(at )?)/);Br=G&&G[1]||""}return` +`+Br+S}}var Ti=!1,Gi;{var ws=typeof WeakMap=="function"?WeakMap:Map;Gi=new ws}function qo(S,L){if(!S||Ti)return"";{var V=Gi.get(S);if(V!==void 0)return V}var G;Ti=!0;var se=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ze;ze=Ta.current,Ta.current=null,ol();try{if(L){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(Ut){G=Ut}Reflect.construct(S,[],Ee)}else{try{Ee.call()}catch(Ut){G=Ut}S.call(Ee.prototype)}}else{try{throw Error()}catch(Ut){G=Ut}S()}}catch(Ut){if(Ut&&G&&typeof Ut.stack=="string"){for(var Ge=Ut.stack.split(` +`),ct=G.stack.split(` +`),wt=Ge.length-1,It=ct.length-1;wt>=1&&It>=0&&Ge[wt]!==ct[It];)It--;for(;wt>=1&&It>=0;wt--,It--)if(Ge[wt]!==ct[It]){if(wt!==1||It!==1)do if(wt--,It--,It<0||Ge[wt]!==ct[It]){var yt=` +`+Ge[wt].replace(" at new "," at ");return S.displayName&&yt.includes("")&&(yt=yt.replace("",S.displayName)),typeof S=="function"&&Gi.set(S,yt),yt}while(wt>=1&&It>=0);break}}}finally{Ti=!1,Ta.current=ze,sl(),Error.prepareStackTrace=se}var Wt=S?S.displayName||S.name:"",Ot=Wt?Wi(Wt):"";return typeof S=="function"&&Gi.set(S,Ot),Ot}function Ns(S,L,V){return qo(S,!1)}function Yl(S){var L=S.prototype;return!!(L&&L.isReactComponent)}function Ri(S,L,V){if(S==null)return"";if(typeof S=="function")return qo(S,Yl(S));if(typeof S=="string")return Wi(S);switch(S){case b:return Wi("Suspense");case C:return Wi("SuspenseList")}if(typeof S=="object")switch(S.$$typeof){case g:return Ns(S.render);case w:return Ri(S.type,L,V);case T:{var G=S,se=G._payload,ze=G._init;try{return Ri(ze(se),L,V)}catch{}}}return""}var Zo={},Yi=be.ReactDebugCurrentFrame;function Ra(S){if(S){var L=S._owner,V=Ri(S.type,S._source,L?L.type:null);Yi.setExtraStackFrame(V)}else Yi.setExtraStackFrame(null)}function ll(S,L,V,G,se){{var ze=Function.call.bind(sn);for(var Ee in S)if(ze(S,Ee)){var Ge=void 0;try{if(typeof S[Ee]!="function"){var ct=Error((G||"React class")+": "+V+" type `"+Ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof S[Ee]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ct.name="Invariant Violation",ct}Ge=S[Ee](L,Ee,G,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(wt){Ge=wt}Ge&&!(Ge instanceof Error)&&(Ra(se),K("%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).",G||"React class",V,Ee,typeof Ge),Ra(null)),Ge instanceof Error&&!(Ge.message in Zo)&&(Zo[Ge.message]=!0,Ra(se),K("Failed %s type: %s",V,Ge.message),Ra(null))}}}function fn(S){if(S){var L=S._owner,V=Ri(S.type,S._source,L?L.type:null);ie(V)}else ie(null)}var Aa;Aa=!1;function Ko(){if(q.current){var S=_t(q.current.type);if(S)return` + +Check the render method of \``+S+"`."}return""}function Ht(S){if(S!==void 0){var L=S.fileName.replace(/^.*[\\\/]/,""),V=S.lineNumber;return` + +Check your code at `+L+":"+V+"."}return""}function ul(S){return S!=null?Ht(S.__source):""}var Sr={};function Xa(S){var L=Ko();if(!L){var V=typeof S=="string"?S:S.displayName||S.name;V&&(L=` + +Check the top-level render call using <`+V+">.")}return L}function na(S,L){if(!(!S._store||S._store.validated||S.key!=null)){S._store.validated=!0;var V=Xa(L);if(!Sr[V]){Sr[V]=!0;var G="";S&&S._owner&&S._owner!==q.current&&(G=" It was passed a child from "+_t(S._owner.type)+"."),fn(S),K('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,G),fn(null)}}}function bo(S,L){if(typeof S=="object"){if(jt(S))for(var V=0;V",se=" Did you accidentally export a JSX literal instead of a component?"):Ee=typeof S,K("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ee,se)}var Ge=lt.apply(this,arguments);if(Ge==null)return Ge;if(G)for(var ct=2;ct10&&Ce("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."),G._updatedFibers.clear()}}}var yo=!1,Oa=null;function cl(S){if(Oa===null)try{var L=("require"+Math.random()).slice(0,7),V=e&&e[L];Oa=V.call(e,"timers").setImmediate}catch{Oa=function(se){yo===!1&&(yo=!0,typeof MessageChannel>"u"&&K("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."));var ze=new MessageChannel;ze.port1.onmessage=se,ze.port2.postMessage(void 0)}}return Oa(S)}var gn=0,Fn=!1;function ql(S){{var L=gn;gn++,z.current===null&&(z.current=[]);var V=z.isBatchingLegacy,G;try{if(z.isBatchingLegacy=!0,G=S(),!V&&z.didScheduleLegacyUpdate){var se=z.current;se!==null&&(z.didScheduleLegacyUpdate=!1,ge(se))}}catch(Wt){throw qi(L),Wt}finally{z.isBatchingLegacy=V}if(G!==null&&typeof G=="object"&&typeof G.then=="function"){var ze=G,Ee=!1,Ge={then:function(Wt,Ot){Ee=!0,ze.then(function(Ut){qi(L),gn===0?W(Ut,Wt,Ot):Wt(Ut)},function(Ut){qi(L),Ot(Ut)})}};return!Fn&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Ee||(Fn=!0,K("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 () => ...);"))}),Ge}else{var ct=G;if(qi(L),gn===0){var wt=z.current;wt!==null&&(ge(wt),z.current=null);var It={then:function(Wt,Ot){z.current===null?(z.current=[],W(ct,Wt,Ot)):Wt(ct)}};return It}else{var yt={then:function(Wt,Ot){Wt(ct)}};return yt}}}}function qi(S){S!==gn-1&&K("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),gn=S}function W(S,L,V){{var G=z.current;if(G!==null)try{ge(G),cl(function(){G.length===0?(z.current=null,L(S)):W(S,L,V)})}catch(se){V(se)}else L(S)}}var ne=!1;function ge(S){if(!ne){ne=!0;var L=0;try{for(;L0;){var Jt=vn-1>>>1,Tn=We[Jt];if(v(Tn,lt)>0)We[Jt]=lt,We[vn]=Tn,vn=Jt;else return}}function m(We,lt,At){for(var vn=At,Jt=We.length,Tn=Jt>>>1;vnAt&&(!We||Ln()));){var vn=te.callback;if(typeof vn=="function"){te.callback=null,ee=te.priorityLevel;var Jt=te.expirationTime<=At,Tn=vn(Jt);At=e.unstable_now(),typeof Tn=="function"?te.callback=Tn:te===s(ae)&&u(ae),we(At)}else u(ae);te=s(ae)}if(te!==null)return!0;var $n=s(pe);return $n!==null&&Pt(Le,$n.startTime-At),!1}function Je(We,lt){switch(We){case g:case b:case C:case w:case T:break;default:We=C}var At=ee;ee=We;try{return lt()}finally{ee=At}}function it(We){var lt;switch(ee){case g:case b:case C:lt=C;break;default:lt=ee;break}var At=ee;ee=lt;try{return We()}finally{ee=At}}function Rt(We){var lt=ee;return function(){var At=ee;ee=lt;try{return We.apply(this,arguments)}finally{ee=At}}}function Ve(We,lt,At){var vn=e.unstable_now(),Jt;if(typeof At=="object"&&At!==null){var Tn=At.delay;typeof Tn=="number"&&Tn>0?Jt=vn+Tn:Jt=vn}else Jt=vn;var $n;switch(We){case g:$n=z;break;case b:$n=q;break;case T:$n=ie;break;case w:$n=Q;break;case C:default:$n=Y;break}var Dr=Jt+$n,Mn={id:$e++,callback:lt,priorityLevel:We,startTime:Jt,expirationTime:Dr,sortIndex:-1};return Jt>vn?(Mn.sortIndex=Jt,o(pe,Mn),s(ae)===null&&Mn===s(pe)&&(K?De():K=!0,Pt(Le,Jt-vn))):(Mn.sortIndex=Dr,o(ae,Mn),!Ce&&!be&&(Ce=!0,nn(Me))),Mn}function at(){}function St(){!Ce&&!be&&(Ce=!0,nn(Me))}function Dt(){return s(ae)}function He(We){We.callback=null}function jt(){return ee}var Se=!1,tt=null,Ct=-1,nt=i,on=-1;function Ln(){var We=e.unstable_now()-on;return!(We125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}We>0?nt=Math.floor(1e3/We):nt=i}var kn=function(){if(tt!==null){var We=e.unstable_now();on=We;var lt=!0,At=!0;try{At=tt(lt,We)}finally{At?bn():(Se=!1,tt=null)}}else Se=!1},bn;if(typeof de=="function")bn=function(){de(kn)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,et=Ye.port2;Ye.port1.onmessage=kn,bn=function(){et.postMessage(null)}}else bn=function(){le(kn,0)};function nn(We){tt=We,Se||(Se=!0,bn())}function Pt(We,lt){Ct=le(function(){We(e.unstable_now())},lt)}function De(){ve(Ct),Ct=-1}var qt=_t,_n=null;e.unstable_IdlePriority=T,e.unstable_ImmediatePriority=g,e.unstable_LowPriority=w,e.unstable_NormalPriority=C,e.unstable_Profiling=_n,e.unstable_UserBlockingPriority=b,e.unstable_cancelCallback=He,e.unstable_continueExecution=St,e.unstable_forceFrameRate=sn,e.unstable_getCurrentPriorityLevel=jt,e.unstable_getFirstCallbackNode=Dt,e.unstable_next=it,e.unstable_pauseExecution=at,e.unstable_requestPaint=qt,e.unstable_runWithPriority=Je,e.unstable_scheduleCallback=Ve,e.unstable_shouldYield=Ln,e.unstable_wrapCallback=Rt,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(qP);(function(e){e.exports=qP})(YP);/** + * @license React + * react-dom.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=E.exports,t=YP.exports,n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,i=!1;function o(r){i=r}function s(r){if(!i){for(var a=arguments.length,l=new Array(a>1?a-1:0),f=1;f1?a-1:0),f=1;f2&&(r[0]==="o"||r[0]==="O")&&(r[1]==="n"||r[1]==="N")}function Dr(r,a,l,f){if(l!==null&&l.type===Ye)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":{if(f)return!1;if(l!==null)return!l.acceptsBooleans;var h=r.toLowerCase().slice(0,5);return h!=="data-"&&h!=="aria-"}default:return!1}}function Mn(r,a,l,f){if(a===null||typeof a>"u"||Dr(r,a,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case Pt:return!a;case De:return a===!1;case qt:return isNaN(a);case _n:return isNaN(a)||a<1}return!1}function wi(r){return Rn.hasOwnProperty(r)?Rn[r]:null}function jn(r,a,l,f,h,x,_){this.acceptsBooleans=a===nn||a===Pt||a===De,this.attributeName=f,this.attributeNamespace=h,this.mustUseProperty=l,this.propertyName=r,this.type=a,this.sanitizeURL=x,this.removeEmptyString=_}var Rn={},Ni=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Ni.forEach(function(r){Rn[r]=new jn(r,Ye,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var a=r[0],l=r[1];Rn[a]=new jn(a,et,!1,l,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){Rn[r]=new jn(r,nn,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){Rn[r]=new jn(r,nn,!1,r,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(r){Rn[r]=new jn(r,Pt,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){Rn[r]=new jn(r,Pt,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){Rn[r]=new jn(r,De,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){Rn[r]=new jn(r,_n,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){Rn[r]=new jn(r,qt,!1,r.toLowerCase(),null,!1,!1)});var xr=/[\-\:]([a-z])/g,Bo=function(r){return r[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(r){var a=r.replace(xr,Bo);Rn[a]=new jn(a,et,!1,r,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(r){var a=r.replace(xr,Bo);Rn[a]=new jn(a,et,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var a=r.replace(xr,Bo);Rn[a]=new jn(a,et,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){Rn[r]=new jn(r,et,!1,r.toLowerCase(),null,!1,!1)});var gs="xlinkHref";Rn[gs]=new jn("xlinkHref",et,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){Rn[r]=new jn(r,et,!1,r.toLowerCase(),null,!0,!0)});var bs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Uo=!1;function jo(r){!Uo&&bs.test(r)&&(Uo=!0,u("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(r)))}function hr(r,a,l,f){if(f.mustUseProperty){var h=f.propertyName;return r[h]}else{on(l,a),f.sanitizeURL&&jo(""+l);var x=f.attributeName,_=null;if(f.type===De){if(r.hasAttribute(x)){var O=r.getAttribute(x);return O===""?!0:Mn(a,l,f,!1)?O:O===""+l?l:O}}else if(r.hasAttribute(x)){if(Mn(a,l,f,!1))return r.getAttribute(x);if(f.type===Pt)return l;_=r.getAttribute(x)}return Mn(a,l,f,!1)?_===null?l:_:_===""+l?l:_}}function Vi(r,a,l,f){{if(!Tn(a))return;if(!r.hasAttribute(a))return l===void 0?void 0:null;var h=r.getAttribute(a);return on(l,a),h===""+l?l:h}}function qa(r,a,l,f){var h=wi(a);if(!$n(a,h,f)){if(Mn(a,l,h,f)&&(l=null),f||h===null){if(Tn(a)){var x=a;l===null?r.removeAttribute(x):(on(l,a),r.setAttribute(x,""+l))}return}var _=h.mustUseProperty;if(_){var O=h.propertyName;if(l===null){var M=h.type;r[O]=M===Pt?!1:""}else r[O]=l;return}var U=h.attributeName,H=h.attributeNamespace;if(l===null)r.removeAttribute(U);else{var oe=h.type,re;oe===Pt||oe===De&&l===!0?re="":(on(l,U),re=""+l,h.sanitizeURL&&jo(re.toString())),H?r.setAttributeNS(H,U,re):r.setAttribute(U,re)}}}var Hi=Symbol.for("react.element"),X=Symbol.for("react.portal"),Ue=Symbol.for("react.fragment"),Xe=Symbol.for("react.strict_mode"),Et=Symbol.for("react.profiler"),ln=Symbol.for("react.provider"),Cn=Symbol.for("react.context"),ot=Symbol.for("react.forward_ref"),Zt=Symbol.for("react.suspense"),Vn=Symbol.for("react.suspense_list"),Bn=Symbol.for("react.memo"),cn=Symbol.for("react.lazy"),Wr=Symbol.for("react.scope"),Ea=Symbol.for("react.debug_trace_mode"),Vo=Symbol.for("react.offscreen"),Ei=Symbol.for("react.legacy_hidden"),go=Symbol.for("react.cache"),Hu=Symbol.for("react.tracing_marker"),_a=Symbol.iterator,al="@@iterator";function Za(r){if(r===null||typeof r!="object")return null;var a=_a&&r[_a]||r[al];return typeof a=="function"?a:null}var en=Object.assign,Ka=0,_i,Ho,ys,Wo,xs,Ss,Go;function Yo(){}Yo.__reactDisabledLog=!0;function Cs(){{if(Ka===0){_i=console.log,Ho=console.info,ys=console.warn,Wo=console.error,xs=console.group,Ss=console.groupCollapsed,Go=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Yo,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}Ka++}}function ol(){{if(Ka--,Ka===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:en({},r,{value:_i}),info:en({},r,{value:Ho}),warn:en({},r,{value:ys}),error:en({},r,{value:Wo}),group:en({},r,{value:xs}),groupCollapsed:en({},r,{value:Ss}),groupEnd:en({},r,{value:Go})})}Ka<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var sl=n.ReactCurrentDispatcher,Ta;function Br(r,a,l){{if(Ta===void 0)try{throw Error()}catch(h){var f=h.stack.trim().match(/\n( *(at )?)/);Ta=f&&f[1]||""}return` +`+Ta+r}}var Wi=!1,Ti;{var Gi=typeof WeakMap=="function"?WeakMap:Map;Ti=new Gi}function ws(r,a){if(!r||Wi)return"";{var l=Ti.get(r);if(l!==void 0)return l}var f;Wi=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=sl.current,sl.current=null,Cs();try{if(a){var _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[])}catch(xe){f=xe}Reflect.construct(r,[],_)}else{try{_.call()}catch(xe){f=xe}r.call(_.prototype)}}else{try{throw Error()}catch(xe){f=xe}r()}}catch(xe){if(xe&&f&&typeof xe.stack=="string"){for(var O=xe.stack.split(` +`),M=f.stack.split(` +`),U=O.length-1,H=M.length-1;U>=1&&H>=0&&O[U]!==M[H];)H--;for(;U>=1&&H>=0;U--,H--)if(O[U]!==M[H]){if(U!==1||H!==1)do if(U--,H--,H<0||O[U]!==M[H]){var oe=` +`+O[U].replace(" at new "," at ");return r.displayName&&oe.includes("")&&(oe=oe.replace("",r.displayName)),typeof r=="function"&&Ti.set(r,oe),oe}while(U>=1&&H>=0);break}}}finally{Wi=!1,sl.current=x,ol(),Error.prepareStackTrace=h}var re=r?r.displayName||r.name:"",ye=re?Br(re):"";return typeof r=="function"&&Ti.set(r,ye),ye}function qo(r,a,l){return ws(r,!0)}function Ns(r,a,l){return ws(r,!1)}function Yl(r){var a=r.prototype;return!!(a&&a.isReactComponent)}function Ri(r,a,l){if(r==null)return"";if(typeof r=="function")return ws(r,Yl(r));if(typeof r=="string")return Br(r);switch(r){case Zt:return Br("Suspense");case Vn:return Br("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case ot:return Ns(r.render);case Bn:return Ri(r.type,a,l);case cn:{var f=r,h=f._payload,x=f._init;try{return Ri(x(h),a,l)}catch{}}}return""}function Zo(r){switch(r._debugOwner&&r._debugOwner.type,r._debugSource,r.tag){case w:return Br(r.type);case Q:return Br("Lazy");case z:return Br("Suspense");case pe:return Br("SuspenseList");case m:case g:case Y:return Ns(r.type);case P:return Ns(r.type.render);case v:return qo(r.type);default:return""}}function Yi(r){try{var a="",l=r;do a+=Zo(l),l=l.return;while(l);return a}catch(f){return` +Error generating stack: `+f.message+` +`+f.stack}}function Ra(r,a,l){var f=r.displayName;if(f)return f;var h=a.displayName||a.name||"";return h!==""?l+"("+h+")":l}function ll(r){return r.displayName||"Context"}function fn(r){if(r==null)return null;if(typeof r.tag=="number"&&u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Ue:return"Fragment";case X:return"Portal";case Et:return"Profiler";case Xe:return"StrictMode";case Zt:return"Suspense";case Vn:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case Cn:var a=r;return ll(a)+".Consumer";case ln:var l=r;return ll(l._context)+".Provider";case ot:return Ra(r,r.render,"ForwardRef");case Bn:var f=r.displayName||null;return f!==null?f:fn(r.type)||"Memo";case cn:{var h=r,x=h._payload,_=h._init;try{return fn(_(x))}catch{return null}}}return null}function Aa(r,a,l){var f=a.displayName||a.name||"";return r.displayName||(f!==""?l+"("+f+")":l)}function Ko(r){return r.displayName||"Context"}function Ht(r){var a=r.tag,l=r.type;switch(a){case be:return"Cache";case I:var f=l;return Ko(f)+".Consumer";case D:var h=l;return Ko(h._context)+".Provider";case ae:return"DehydratedFragment";case P:return Aa(l,l.render,"ForwardRef");case A:return"Fragment";case w:return l;case C:return"Portal";case b:return"Root";case T:return"Text";case Q:return fn(l);case k:return l===Xe?"StrictMode":"Mode";case te:return"Offscreen";case F:return"Profiler";case $e:return"Scope";case z:return"Suspense";case pe:return"SuspenseList";case Ce:return"TracingMarker";case v:case m:case ie:case g:case q:case Y:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;break}return null}var ul=n.ReactDebugCurrentFrame,Sr=null,Xa=!1;function na(){{if(Sr===null)return null;var r=Sr._debugOwner;if(r!==null&&typeof r<"u")return Ht(r)}return null}function bo(){return Sr===null?"":Yi(Sr)}function Or(){ul.getCurrentStack=null,Sr=null,Xa=!1}function ar(r){ul.getCurrentStack=r===null?null:bo,Sr=r,Xa=!1}function Xo(){return Sr}function Jr(r){Xa=r}function mr(r){return""+r}function li(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return bn(r),r;default:return""}}var Wu={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function yo(r,a){Wu[a.type]||a.onChange||a.onInput||a.readOnly||a.disabled||a.value==null||u("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),a.onChange||a.readOnly||a.disabled||a.checked==null||u("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Oa(r){var a=r.type,l=r.nodeName;return l&&l.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function cl(r){return r._valueTracker}function gn(r){r._valueTracker=null}function Fn(r){var a="";return r&&(Oa(r)?a=r.checked?"true":"false":a=r.value),a}function ql(r){var a=Oa(r)?"checked":"value",l=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);bn(r[a]);var f=""+r[a];if(!(r.hasOwnProperty(a)||typeof l>"u"||typeof l.get!="function"||typeof l.set!="function")){var h=l.get,x=l.set;Object.defineProperty(r,a,{configurable:!0,get:function(){return h.call(this)},set:function(O){bn(O),f=""+O,x.call(this,O)}}),Object.defineProperty(r,a,{enumerable:l.enumerable});var _={getValue:function(){return f},setValue:function(O){bn(O),f=""+O},stopTracking:function(){gn(r),delete r[a]}};return _}}function qi(r){cl(r)||(r._valueTracker=ql(r))}function W(r){if(!r)return!1;var a=cl(r);if(!a)return!0;var l=a.getValue(),f=Fn(r);return f!==l?(a.setValue(f),!0):!1}function ne(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var ge=!1,ut=!1,dn=!1,zn=!1;function Kt(r){var a=r.type==="checkbox"||r.type==="radio";return a?r.checked!=null:r.value!=null}function S(r,a){var l=r,f=a.checked,h=en({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??l._wrapperState.initialChecked});return h}function L(r,a){yo("input",a),a.checked!==void 0&&a.defaultChecked!==void 0&&!ut&&(u("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",na()||"A component",a.type),ut=!0),a.value!==void 0&&a.defaultValue!==void 0&&!ge&&(u("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",na()||"A component",a.type),ge=!0);var l=r,f=a.defaultValue==null?"":a.defaultValue;l._wrapperState={initialChecked:a.checked!=null?a.checked:a.defaultChecked,initialValue:li(a.value!=null?a.value:f),controlled:Kt(a)}}function V(r,a){var l=r,f=a.checked;f!=null&&qa(l,"checked",f,!1)}function G(r,a){var l=r;{var f=Kt(a);!l._wrapperState.controlled&&f&&!zn&&(u("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),zn=!0),l._wrapperState.controlled&&!f&&!dn&&(u("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),dn=!0)}V(r,a);var h=li(a.value),x=a.type;if(h!=null)x==="number"?(h===0&&l.value===""||l.value!=h)&&(l.value=mr(h)):l.value!==mr(h)&&(l.value=mr(h));else if(x==="submit"||x==="reset"){l.removeAttribute("value");return}a.hasOwnProperty("value")?Ge(l,a.type,h):a.hasOwnProperty("defaultValue")&&Ge(l,a.type,li(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(l.defaultChecked=!!a.defaultChecked)}function se(r,a,l){var f=r;if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var h=a.type,x=h==="submit"||h==="reset";if(x&&(a.value===void 0||a.value===null))return;var _=mr(f._wrapperState.initialValue);l||_!==f.value&&(f.value=_),f.defaultValue=_}var O=f.name;O!==""&&(f.name=""),f.defaultChecked=!f.defaultChecked,f.defaultChecked=!!f._wrapperState.initialChecked,O!==""&&(f.name=O)}function ze(r,a){var l=r;G(l,a),Ee(l,a)}function Ee(r,a){var l=a.name;if(a.type==="radio"&&l!=null){for(var f=r;f.parentNode;)f=f.parentNode;on(l,"name");for(var h=f.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),x=0;x.")))}):a.dangerouslySetInnerHTML!=null&&(It||(It=!0,u("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),a.selected!=null&&!ct&&(u("Use the `defaultValue` or `value` props on must be a scalar value if `multiple` is false.%s",l,Ai())}}}}function Dn(r,a,l,f){var h=r.options;if(a){for(var x=l,_={},O=0;O.");var f=en({},a,{value:void 0,defaultValue:void 0,children:mr(l._wrapperState.initialValue)});return f}function o0(r,a){var l=r;yo("textarea",a),a.value!==void 0&&a.defaultValue!==void 0&&!Qb&&(u("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",na()||"A component"),Qb=!0);var f=a.value;if(f==null){var h=a.children,x=a.defaultValue;if(h!=null){u("Use the `defaultValue` or `value` props instead of setting children on