-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,o){var s=this;this.isLanguageChangingTo=i;var a=gr();this.emit("languageChanging",i);var l=function(d){s.language=d,s.languages=s.services.languageUtils.toResolveHierarchy(d),s.resolvedLanguage=void 0,s.setResolvedLanguage(d)},u=function(d,p){p?(l(p),s.translator.changeLanguage(p),s.isLanguageChangingTo=void 0,s.emit("languageChanged",p),s.logger.log("languageChanged",p)):s.isLanguageChangingTo=void 0,a.resolve(function(){return s.t.apply(s,arguments)}),o&&o(d,function(){return s.t.apply(s,arguments)})},c=function(d){!i&&!d&&s.services.languageDetector&&(d=[]);var p=typeof d=="string"?d:s.services.languageUtils.getBestMatchFromCodes(d);p&&(s.language||l(p),s.translator.language||s.translator.changeLanguage(p),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage(p)),s.loadResources(p,function(v){u(v,p)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(c):c(i),a}},{key:"getFixedT",value:function(i,o,s){var a=this,l=function u(c,f){var d;if(qt(f)!=="object"){for(var p=arguments.length,v=new Array(p>2?p-2:0),S=2;S1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var c=function(p,v){var S=o.services.backendConnector.state["".concat(p,"|").concat(v)];return S===-1||S===2};if(s.precheck){var f=s.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(a,i)&&(!l||c(u,i)))}},{key:"loadNamespaces",value:function(i,o){var s=this,a=gr();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),o&&o(l)}),a):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var s=gr();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(u){return a.indexOf(u)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(u){s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei,a=ot(ot(ot({},this.options),o),{isClone:!0}),l=new n(a);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(c){l[c]=i[c]}),l.services=ot({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new sf(l.services,l.options),l.translator.on("*",function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),p=1;p0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Po(e,t)});var ke=Po.createInstance();ke.createInstance=Po.createInstance;ke.createInstance;ke.init;ke.loadResources;ke.reloadResources;ke.use;ke.changeLanguage;ke.getFixedT;ke.t;ke.exists;ke.setDefaultNamespace;ke.hasLoadedNamespace;ke.loadNamespaces;ke.loadLanguages;const j1="Stable Diffusion UI",T1="",M1={home:"Home",history:"History",community:"Community",settings:"Settings"},A1={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},U1={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:",width:"Width:",height:"Height:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},z1={txt:"Image Modifiers (art styles, tags etc)"},$1={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},B1={fave:"Favorites Only",search:"Search"},Q1={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},V1=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
+ */var Ho=E.exports,dy=jl.exports;function py(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hy=typeof Object.is=="function"?Object.is:py,gy=dy.useSyncExternalStore,my=Ho.useRef,vy=Ho.useEffect,yy=Ho.useMemo,Sy=Ho.useDebugValue;th.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=my(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=yy(function(){function l(g){if(!u){if(u=!0,c=g,g=r(g),i!==void 0&&s.hasValue){var v=s.value;if(i(v,g))return f=v}return f=g}if(v=f,hy(c,g))return v;var S=r(g);return i!==void 0&&i(v,S)?v:(c=g,f=S)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=gy(e,o[0],o[1]);return vy(function(){s.hasValue=!0,s.value=a},[a]),Sy(a),a};(function(e){e.exports=th})(eh);const wy=hf(eh.exports),{useSyncExternalStoreWithSelector:ky}=wy;function Oy(e,t=e.getState,n){const r=ky(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.exports.useDebugValue(r),r}const jc=e=>{const t=typeof e=="function"?fy(e):e,n=(r,i)=>Oy(t,r,i);return Object.assign(n,t),n},xy=e=>e?jc(e):jc;var Gl=xy;const Py=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,...a}=t;let l;try{l=(o!=null?o:({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const u=l.connect(a);let c=!0;i.setState=(g,v,S)=>{const w=n(g,v);return c&&u.send(S===void 0?{type:s||"anonymous"}:typeof S=="string"?{type:S}:S,r()),w};const f=(...g)=>{const v=c;c=!1,n(...g),c=v},d=e(i.setState,r,i);if(u.init(d),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let g=!1;const v=i.dispatch;i.dispatch=(...S)=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&S[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),v(...S)}}return u.subscribe(g=>{var v;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Is(g.payload,S=>{if(S.type==="__setState"){f(S.state);return}!i.dispatchFromDevtools||typeof i.dispatch=="function"&&i.dispatch(S)});case"DISPATCH":switch(g.payload.type){case"RESET":return f(d),u.init(i.getState());case"COMMIT":return u.init(i.getState());case"ROLLBACK":return Is(g.state,S=>{f(S),u.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Is(g.state,S=>{f(S)});case"IMPORT_STATE":{const{nextLiftedState:S}=g.payload,w=(v=S.computedStates.slice(-1)[0])==null?void 0:v.state;if(!w)return;f(w),u.send(null,S);return}case"PAUSE_RECORDING":return c=!c}return}}),d},_y=Py,Is=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Oo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Oo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Oo(r)(n)}}}},Cy=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,m)=>({...m,...w}),...t},s=!1;const a=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const c=Oo(o.serialize),f=()=>{const w=o.partialize({...r()});let m;const p=c({state:w,version:o.version}).then(h=>u.setItem(o.name,h)).catch(h=>{m=h});if(m)throw m;return p},d=i.setState;i.setState=(w,m)=>{d(w,m),f()};const g=e((...w)=>{n(...w),f()},r,i);let v;const S=()=>{var w;if(!u)return;s=!1,a.forEach(p=>p(r()));const m=((w=o.onRehydrateStorage)==null?void 0:w.call(o,r()))||void 0;return Oo(u.getItem.bind(u))(o.name).then(p=>{if(p)return o.deserialize(p)}).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==o.version){if(o.migrate)return o.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var h;return v=o.merge(p,(h=r())!=null?h:g),n(v,!0),f()}).then(()=>{m==null||m(v,void 0),s=!0,l.forEach(p=>p(v))}).catch(p=>{m==null||m(void 0,p)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(u=w.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>S(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},S(),v||g},Ey=Cy;function Xr(){return Math.floor(Math.random()*1e4)}const Ry=["plms","ddim","heun","euler","euler_a","dpm2","dpm2_a","lms"],F=Gl(_y((e,t)=>({parallelCount:1,requestOptions:{prompt:"a photograph of an astronaut riding a horse",seed:Xr(),num_outputs:1,num_inference_steps:50,guidance_scale:7.5,width:512,height:512,prompt_strength:.8,turbo:!0,use_cpu:!1,use_full_precision:!0,save_to_disk_path:"null",use_face_correction:"GFPGANv1.3",use_upscale:"RealESRGAN_x4plus",show_only_filtered_image:!0,init_image:void 0,sampler:"plms"},tags:[],uiOptions:{isUseRandomSeed:!0,isUseAutoSave:!1,isSoundEnabled:!1},allModifiers:[[[]]],isInpainting:!1,setParallelCount:n=>e(ie(r=>{r.parallelCount=n})),setRequestOptions:(n,r)=>{e(ie(i=>{i.requestOptions[n]=r}))},getValueForRequestKey:n=>t().requestOptions[n],setAllModifiers:n=>{e(ie(r=>{r.allModifiers=n}))},toggleTag:n=>{e(ie(r=>{const i=r.tags.indexOf(n);i>-1?r.tags.splice(i,1):r.tags.push(n)}))},hasTag:n=>t().tags.includes(n),selectedTags:()=>t().tags,builtRequest:()=>{const n=t(),r=n.requestOptions,i=n.tags,o=`${r.prompt} ${i.join(",")}`,s={...r,prompt:o};return n.uiOptions.isUseAutoSave||(s.save_to_disk_path=null),s.init_image===void 0&&(s.prompt_strength=void 0),s.use_upscale===""&&(s.use_upscale=null),s.use_upscale===null&&s.use_face_correction===null&&(s.show_only_filtered_image=!1),s},toggleUseFaceCorrection:()=>{e(ie(n=>{const r=typeof n.getValueForRequestKey("use_face_correction")=="string"?null:"GFPGANv1.3";n.requestOptions.use_face_correction=r}))},isUsingFaceCorrection:()=>typeof t().getValueForRequestKey("use_face_correction")=="string",isUsingUpscaling:()=>t().getValueForRequestKey("use_upscale")!=="",toggleUseRandomSeed:()=>{e(ie(n=>{n.uiOptions.isUseRandomSeed=!n.uiOptions.isUseRandomSeed,n.requestOptions.seed=n.uiOptions.isUseRandomSeed?Xr():n.requestOptions.seed}))},isRandomSeed:()=>t().uiOptions.isUseRandomSeed,toggleUseAutoSave:()=>{e(ie(n=>{n.uiOptions.isUseAutoSave=!n.uiOptions.isUseAutoSave}))},isUseAutoSave:()=>t().uiOptions.isUseAutoSave,toggleSoundEnabled:()=>{e(ie(n=>{n.uiOptions.isSoundEnabled=!n.uiOptions.isSoundEnabled}))},isSoundEnabled:()=>t().uiOptions.isSoundEnabled,toggleInpainting:()=>{e(ie(n=>{n.isInpainting=!n.isInpainting}))}})));var Mc="_1jo75h1",Ac="_1jo75h0",Ny="_1jo75h2";const Uc="Stable Diffusion is starting...",Iy="Stable Diffusion is ready to use!",zc="Stable Diffusion is not running!";function Ly({className:e}){const[t,n]=E.exports.useState(Uc),[r,i]=E.exports.useState(Ac),{status:o,data:s}=Wr(["health"],iy,{refetchInterval:ry});return E.exports.useEffect(()=>{o==="loading"?(n(Uc),i(Ac)):o==="error"?(n(zc),i(Mc)):o==="success"&&(s[0]==="OK"?(n(Iy),i(Ny)):(n(zc),i(Mc)))},[o,s]),k(yn,{children:k("p",{className:[r,e].join(" "),children:t})})}function qt(e){return qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(e)}function ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $c(e,t){for(var n=0;n",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},Dy=function(t){return Fy[t]},Ty=function(t){return t.replace(by,Dy)};function Bc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qc(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};Ua=Qc(Qc({},Ua),e)}function Ay(){return Ua}var Uy=function(){function e(){nt(this,e),this.usedNamespaces={}}return rt(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function zy(e){nh=e}function $y(){return nh}var By={type:"3rdParty",init:function(t){My(t.options.react),zy(t)}};function Qy(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var s=function(l,u){var c=t.services.backendConnector.state["".concat(l,"|").concat(u)];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))}function Hy(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return za("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,s){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}):Vy(e,t,n)}function rh(e){if(Array.isArray(e))return e}function Ky(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(e);!(i=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function Kc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=E.exports.useContext(jy)||{},i=r.i18n,o=r.defaultNS,s=n||i||$y();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Uy),!s){za("You will need to pass in an i18next instance by using initReactI18next");var a=function(R){return Array.isArray(R)?R[R.length-1]:R},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&za("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Ls(Ls(Ls({},Ay()),s.options.react),t),c=u.useSuspense,f=u.keyPrefix,d=e||o||s.options&&s.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(d);var g=(s.isInitialized||s.initializedStoreOnce)&&d.every(function(O){return Hy(O,s,u)});function v(){return s.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var S=E.exports.useState(v),w=qy(S,2),m=w[0],p=w[1],h=d.join(),y=Wy(h),P=E.exports.useRef(!0);E.exports.useEffect(function(){var O=u.bindI18n,R=u.bindI18nStore;P.current=!0,!g&&!c&&Hc(s,d,function(){P.current&&p(v)}),g&&y&&y!==h&&P.current&&p(v);function b(){P.current&&p(v)}return O&&s&&s.on(O,b),R&&s&&s.store.on(R,b),function(){P.current=!1,O&&s&&O.split(" ").forEach(function(M){return s.off(M,b)}),R&&s&&R.split(" ").forEach(function(M){return s.store.off(M,b)})}},[s,h]);var _=E.exports.useRef(!0);E.exports.useEffect(function(){P.current&&!_.current&&p(v),_.current=!1},[s,f]);var x=[m,s,g];if(x.t=m,x.i18n=s,x.ready=g,g||!g&&!c)return x;throw new Promise(function(O){Hc(s,d,function(){O()})})}var Gy="_1v2cc580";function Yy(){const{t:e}=tn(),{status:t,data:n}=Wr([ay],ly),[r,i]=E.exports.useState("2.1.0"),[o,s]=E.exports.useState("");return E.exports.useEffect(()=>{if(t==="success"){const{update_branch:a}=n;i("v2.1"),s(a==="main"?"(stable)":"(beta)")}},[t,n,i,i]),L("div",{className:Gy,children:[L("h1",{children:[e("title")," ",r," ",o," "]}),k(Ly,{className:"status-display"})]})}const Ke=Gl(Ey((e,t)=>({isOpenAdvancedSettings:!1,isOpenAdvImprovementSettings:!1,isOpenAdvPropertySettings:!1,isOpenAdvWorkflowSettings:!1,isOpenAdvGPUSettings:!1,isOpenImageModifier:!1,imageMofidiersMap:{},toggleAdvancedSettings:()=>{e(ie(n=>{n.isOpenAdvancedSettings=!n.isOpenAdvancedSettings}))},toggleAdvImprovementSettings:()=>{e(ie(n=>{n.isOpenAdvImprovementSettings=!n.isOpenAdvImprovementSettings}))},toggleAdvPropertySettings:()=>{e(ie(n=>{n.isOpenAdvPropertySettings=!n.isOpenAdvPropertySettings}))},toggleAdvWorkflowSettings:()=>{e(ie(n=>{n.isOpenAdvWorkflowSettings=!n.isOpenAdvWorkflowSettings}))},toggleAdvGPUSettings:()=>{e(ie(n=>{n.isOpenAdvGPUSettings=!n.isOpenAdvGPUSettings}))},toggleImageModifier:()=>{e(ie(n=>{n.isOpenImageModifier=!n.isOpenImageModifier}))}}),{name:"createUI"}));var sh="_1961rof0",he="_1961rof1";var Pi="_11d5x3d1",Jy="_11d5x3d0",Ko="_11d5x3d2";function Xy(){const{t:e}=tn(),t=F(f=>f.isUsingFaceCorrection()),n=F(f=>f.isUsingUpscaling()),r=F(f=>f.getValueForRequestKey("use_upscale")),i=F(f=>f.getValueForRequestKey("show_only_filtered_image")),o=F(f=>f.toggleUseFaceCorrection),s=F(f=>f.setRequestOptions),a=Ke(f=>f.isOpenAdvImprovementSettings),l=Ke(f=>f.toggleAdvImprovementSettings),[u,c]=E.exports.useState(!1);return E.exports.useEffect(()=>{t||r!=""?c(!1):c(!0)},[t,n,c]),L("div",{children:[k("button",{type:"button",className:Ko,onClick:l,children:k("h4",{children:"Improvement Settings"})}),a&&L(yn,{children:[k("div",{className:he,children:L("label",{children:[k("input",{type:"checkbox",checked:t,onChange:f=>o()}),"Fix incorrect faces and eyes (uses GFPGAN)"]})}),k("div",{className:he,children:L("label",{children:[e("settings.ups"),L("select",{id:"upscale_model",name:"upscale_model",value:r,onChange:f=>{s("use_upscale",f.target.value)},children:[k("option",{value:"",children:e("settings.no-ups")}),k("option",{value:"RealESRGAN_x4plus",children:"RealESRGAN_x4plus"}),k("option",{value:"RealESRGAN_x4plus_anime_6B",children:"RealESRGAN_x4plus_anime_6B"})]})]})}),k("div",{className:he,children:L("label",{children:[k("input",{disabled:u,type:"checkbox",checked:i,onChange:f=>s("show_only_filtered_image",f.target.checked)}),e("settings.corrected")]})})]})]})}const Wc=[{value:128,label:"128 (*)"},{value:192,label:"192"},{value:256,label:"256 (*)"},{value:320,label:"320"},{value:384,label:"384"},{value:448,label:"448"},{value:512,label:"512 (*)"},{value:576,label:"576"},{value:640,label:"640"},{value:704,label:"704"},{value:768,label:"768 (*)"},{value:832,label:"832"},{value:896,label:"896"},{value:960,label:"960"},{value:1024,label:"1024 (*)"}];function Zy(){const{t:e}=tn(),t=F(v=>v.setRequestOptions),n=F(v=>v.toggleUseRandomSeed),r=F(v=>v.isRandomSeed()),i=F(v=>v.getValueForRequestKey("seed")),o=F(v=>v.getValueForRequestKey("num_inference_steps")),s=F(v=>v.getValueForRequestKey("guidance_scale")),a=F(v=>v.getValueForRequestKey("init_image")),l=F(v=>v.getValueForRequestKey("prompt_strength")),u=F(v=>v.getValueForRequestKey("width")),c=F(v=>v.getValueForRequestKey("height")),f=F(v=>v.getValueForRequestKey("sampler")),d=Ke(v=>v.isOpenAdvPropertySettings),g=Ke(v=>v.toggleAdvPropertySettings);return L("div",{children:[k("button",{type:"button",className:Ko,onClick:g,children:k("h4",{children:"Property Settings"})}),d&&L(yn,{children:[L("div",{className:he,children:[L("label",{children:["Seed:",k("input",{size:10,value:i,onChange:v=>t("seed",v.target.value),disabled:r,placeholder:"random"})]}),L("label",{children:[k("input",{type:"checkbox",checked:r,onChange:v=>n()})," ","Random Image"]})]}),k("div",{className:he,children:L("label",{children:[e("settings.steps")," ",k("input",{value:o,onChange:v=>{t("num_inference_steps",v.target.value)},size:4})]})}),L("div",{className:he,children:[L("label",{children:[e("settings.guide-scale"),k("input",{value:s,onChange:v=>t("guidance_scale",v.target.value),type:"range",min:"0",max:"20",step:".1"})]}),k("span",{children:s})]}),a!==void 0&&L("div",{className:he,children:[L("label",{children:[e("settings.prompt-str")," ",k("input",{value:l,onChange:v=>t("prompt_strength",v.target.value),type:"range",min:"0",max:"1",step:".05"})]}),k("span",{children:l})]}),L("div",{className:he,children:[L("label",{children:[e("settings.width"),k("select",{value:u,onChange:v=>t("width",v.target.value),children:Wc.map(v=>k("option",{value:v.value,children:v.label},`width-option_${v.value}`))})]}),L("label",{children:[e("settings.height"),k("select",{value:c,onChange:v=>t("height",v.target.value),children:Wc.map(v=>k("option",{value:v.value,children:v.label},`height-option_${v.value}`))})]})]}),k("div",{className:he,children:L("label",{children:[e("settings.sampler"),k("select",{value:f,onChange:v=>t("sampler",v.target.value),children:Ry.map(v=>k("option",{value:v,children:v},`sampler-option_${v}`))})]})})]})]})}function e0(){const{t:e}=tn(),t=F(d=>d.getValueForRequestKey("num_outputs")),n=F(d=>d.parallelCount),r=F(d=>d.isUseAutoSave()),i=F(d=>d.getValueForRequestKey("save_to_disk_path")),o=F(d=>d.isSoundEnabled()),s=F(d=>d.setRequestOptions),a=F(d=>d.setParallelCount),l=F(d=>d.toggleUseAutoSave),u=F(d=>d.toggleSoundEnabled),c=Ke(d=>d.isOpenAdvWorkflowSettings),f=Ke(d=>d.toggleAdvWorkflowSettings);return L("div",{children:[k("button",{type:"button",className:Ko,onClick:f,children:k("h4",{children:"Workflow Settings"})}),c&&L(yn,{children:[k("div",{className:he,children:L("label",{children:[e("settings.amount-of-img")," ",k("input",{type:"number",value:t,onChange:d=>s("num_outputs",parseInt(d.target.value,10)),size:4})]})}),k("div",{className:he,children:L("label",{children:[e("settings.how-many"),k("input",{type:"number",value:n,onChange:d=>a(parseInt(d.target.value,10)),size:4})]})}),L("div",{className:he,children:[L("label",{children:[k("input",{checked:r,onChange:d=>l(),type:"checkbox"}),e("storage.ast")," "]}),L("label",{children:[k("input",{value:i,onChange:d=>s("save_to_disk_path",d.target.value),size:40,disabled:!r}),k("span",{className:"visually-hidden",children:"Path on disk where images will be saved"})]})]}),k("div",{className:he,children:L("label",{children:[k("input",{checked:o,onChange:d=>u(),type:"checkbox"}),e("advanced-settings.sound")]})})]})]})}function t0(){const{t:e}=tn(),t=F(a=>a.getValueForRequestKey("turbo")),n=F(a=>a.getValueForRequestKey("use_cpu")),r=F(a=>a.getValueForRequestKey("use_full_precision")),i=F(a=>a.setRequestOptions),o=Ke(a=>a.isOpenAdvGPUSettings),s=Ke(a=>a.toggleAdvGPUSettings);return L("div",{children:[k("button",{type:"button",className:Ko,onClick:s,children:k("h4",{children:"GPU Settings"})}),o&&L(yn,{children:[k("div",{className:he,children:L("label",{children:[k("input",{checked:t,onChange:a=>i("turbo",a.target.checked),type:"checkbox"}),e("advanced-settings.turbo")," ",e("advanced-settings.turbo-disc")]})}),k("div",{className:he,children:L("label",{children:[k("input",{type:"checkbox",checked:n,onChange:a=>i("use_cpu",a.target.checked)}),e("advanced-settings.cpu")," ",e("advanced-settings.cpu-disc")]})}),k("div",{className:he,children:L("label",{children:[k("input",{checked:r,onChange:a=>i("use_full_precision",a.target.checked),type:"checkbox"}),e("advanced-settings.gpu")," ",e("advanced-settings.gpu-disc")]})})]})]})}function n0(){return L("ul",{className:Jy,children:[k("li",{className:Pi,children:k(Xy,{})}),k("li",{className:Pi,children:k(Zy,{})}),k("li",{className:Pi,children:k(e0,{})}),k("li",{className:Pi,children:k(t0,{})})]})}function r0(){const e=Ke(n=>n.isOpenAdvancedSettings),t=Ke(n=>n.toggleAdvancedSettings);return L("div",{className:sh,children:[k("button",{type:"button",onClick:t,className:"panel-box-toggle-btn",children:k("h3",{children:"Advanced Settings"})}),e&&k(n0,{})]})}var i0="g3uahc1",o0="g3uahc0",s0="g3uahc2",a0="g3uahc3";function ah({name:e}){const t=F(i=>i.hasTag(e))?"selected":"",n=F(i=>i.toggleTag),r=()=>{n(e)};return k("div",{className:"modifierTag "+t,onClick:r,children:k("p",{children:e})})}function l0({tags:e}){return k("ul",{className:a0,children:e.map(t=>k("li",{children:k(ah,{name:t})},t))})}function u0({title:e,tags:t}){const[n,r]=E.exports.useState(!1);return L("div",{className:i0,children:[k("button",{type:"button",className:s0,onClick:()=>{r(!n)},children:k("h4",{children:e})}),n&&k(l0,{tags:t})]})}function c0(){const e=F(i=>i.allModifiers),t=Ke(i=>i.isOpenImageModifier),n=Ke(i=>i.toggleImageModifier);return L("div",{className:sh,children:[k("button",{type:"button",onClick:()=>{n()},className:"panel-box-toggle-btn",children:k("h3",{children:"Image Modifiers (art styles, tags, ect)"})}),t&&k("ul",{className:o0,children:e.map((i,o)=>k("li",{children:k(u0,{title:i[0],tags:i[1]})},i[0]))})]})}var f0="fma0ug0";function d0({imageData:e,brushSize:t,brushShape:n,brushColor:r,isErasing:i}){const o=E.exports.useRef(null),s=E.exports.useRef(null),[a,l]=E.exports.useState(!1),[u,c]=E.exports.useState(512),[f,d]=E.exports.useState(512);E.exports.useEffect(()=>{const p=new Image;p.onload=()=>{c(p.width),d(p.height)},p.src=e},[e]),E.exports.useEffect(()=>{if(o.current!=null){const p=o.current.getContext("2d"),h=p.getImageData(0,0,u,f),y=h.data;for(let P=0;P0&&(y[P]=parseInt(r,16),y[P+1]=parseInt(r,16),y[P+2]=parseInt(r,16));p.putImageData(h,0,0)}},[r]);const g=p=>{l(!0)},v=p=>{l(!1);const h=o.current;h!=null&&h.toDataURL()},S=(p,h,y,P,_)=>{const x=o.current;if(x!=null){const O=x.getContext("2d");if(i){const R=y/2;O.clearRect(p-R,h-R,y,y)}else O.beginPath(),O.lineWidth=y,O.lineCap=P,O.strokeStyle=_,O.moveTo(p,h),O.lineTo(p,h),O.stroke()}},w=(p,h,y,P,_)=>{const x=s.current;if(x!=null){const O=x.getContext("2d");if(O.beginPath(),O.clearRect(0,0,x.width,x.height),i){const R=y/2;O.lineWidth=2,O.lineCap="butt",O.strokeStyle=_,O.moveTo(p-R,h-R),O.lineTo(p+R,h-R),O.lineTo(p+R,h+R),O.lineTo(p-R,h+R),O.lineTo(p-R,h-R),O.stroke()}else O.lineWidth=y,O.lineCap=P,O.strokeStyle=_,O.moveTo(p,h),O.lineTo(p,h),O.stroke()}};return L("div",{className:f0,children:[k("img",{src:e}),k("canvas",{ref:o,width:u,height:f}),k("canvas",{ref:s,width:u,height:f,onMouseDown:g,onMouseUp:v,onMouseMove:p=>{const{nativeEvent:{offsetX:h,offsetY:y}}=p;w(h,y,t,n,r),a&&S(h,y,t,n,r)}})]})}var Gc="_2yyo4x2",p0="_2yyo4x1",h0="_2yyo4x0";function g0(){const e=E.exports.useRef(null),[t,n]=E.exports.useState("20"),[r,i]=E.exports.useState("round"),[o,s]=E.exports.useState("#fff"),[a,l]=E.exports.useState(!1),u=F(S=>S.getValueForRequestKey("init_image"));return L("div",{className:h0,children:[k(d0,{imageData:u,brushSize:t,brushShape:r,brushColor:o,isErasing:a}),L("div",{className:p0,children:[L("div",{className:Gc,children:[k("button",{onClick:()=>{l(!1)},children:"Mask"}),k("button",{onClick:()=>{l(!0)},children:"Erase"}),k("button",{disabled:!0,onClick:()=>{console.log("fill mask!!",e)},children:"Fill"}),k("button",{disabled:!0,onClick:()=>{console.log("clear all")},children:"Clear"}),L("label",{children:["Brush Size",k("input",{type:"range",min:"1",max:"100",value:t,onChange:S=>{n(S.target.value)}})]})]}),L("div",{className:Gc,children:[k("button",{onClick:()=>{i("round")},children:"Cirle Brush"}),k("button",{onClick:()=>{i("square")},children:"Square Brush"}),k("button",{onClick:()=>{s("#000")},children:"Dark Brush"}),k("button",{onClick:()=>{s("#fff")},children:"Light Brush"})]})]})]})}var m0="cjcdm20",v0="cjcdm21";var y0="_1how28i0",S0="_1how28i1";var w0="_1rn4m8a4",k0="_1rn4m8a2",O0="_1rn4m8a3",x0="_1rn4m8a0",P0="_1rn4m8a1",_0="_1rn4m8a5";function C0(e){const{t}=tn(),n=E.exports.useRef(null),r=F(c=>c.getValueForRequestKey("init_image")),i=F(c=>c.isInpainting),o=F(c=>c.setRequestOptions),s=()=>{var c;(c=n.current)==null||c.click()},a=c=>{const f=c.target.files[0];if(f!==void 0){const d=new FileReader;d.onload=g=>{g.target!=null&&o("init_image",g.target.result)},d.readAsDataURL(f)}},l=F(c=>c.toggleInpainting),u=()=>{o("init_image",void 0),i&&l()};return L("div",{className:x0,children:[L("div",{children:[k("label",{className:P0,children:k("b",{children:t("home.initial-img-txt")})}),k("input",{ref:n,className:k0,name:"init_image",type:"file",onChange:a}),k("button",{className:O0,onClick:s,children:t("home.initial-img-btn")})]}),k("div",{className:w0,children:r!==void 0&&k(yn,{children:L("div",{children:[k("img",{src:r,width:"100",height:"100"}),k("button",{className:_0,onClick:u,children:"X"})]})})})]})}function E0(){const e=F(t=>t.selectedTags());return L("div",{className:"selected-tags",children:[k("p",{children:"Active Tags"}),k("ul",{children:e.map(t=>k("li",{children:k(ah,{name:t})},t))})]})}const Mn=Gl((e,t)=>({images:[],completedImageIds:[],addNewImage:(n,r,i=!1)=>{e(ie(o=>{let{seed:s}=r;i&&(s=Xr()),o.images.push({id:n,options:{...r,seed:s}})}))},hasQueuedImages:()=>t().images.length>0,firstInQueue:()=>{let n=t().images[0];return n=n!==void 0?n:{},n},removeFirstInQueue:()=>{e(ie(n=>{const r=n.images.shift();n.completedImageIds.push(r.id)}))},clearCachedIds:()=>{e(ie(n=>{n.completedImageIds=[]}))}}));let _i;const R0=new Uint8Array(16);function N0(){if(!_i&&(_i=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _i(R0)}const ae=[];for(let e=0;e<256;++e)ae.push((e+256).toString(16).slice(1));function I0(e,t=0){return(ae[e[t+0]]+ae[e[t+1]]+ae[e[t+2]]+ae[e[t+3]]+"-"+ae[e[t+4]]+ae[e[t+5]]+"-"+ae[e[t+6]]+ae[e[t+7]]+"-"+ae[e[t+8]]+ae[e[t+9]]+"-"+ae[e[t+10]]+ae[e[t+11]]+ae[e[t+12]]+ae[e[t+13]]+ae[e[t+14]]+ae[e[t+15]]).toLowerCase()}const L0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Yc={randomUUID:L0};function b0(e,t,n){if(Yc.randomUUID&&!t&&!e)return Yc.randomUUID();e=e||{};const r=e.random||(e.rng||N0)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return I0(r)}var F0="_1hnlbmt0";function D0(){const{t:e}=tn(),t=F(l=>l.parallelCount),n=F(l=>l.builtRequest),r=Mn(l=>l.addNewImage),i=Mn(l=>l.hasQueuedImages()),o=F(l=>l.isRandomSeed()),s=F(l=>l.setRequestOptions);return k("button",{className:F0,onClick:()=>{o&&s("seed",Xr());const l=n(),u=[];let{num_outputs:c}=l;if(t>c)u.push(c);else for(;c>=1;)c-=t,c<=0?u.push(t):u.push(Math.abs(c));u.forEach((f,d)=>{let g=l.seed;if(d!==0){debugger;g=Xr()}r(b0(),{...l,num_outputs:f,seed:g})})},disabled:i,children:e("home.make-img-btn")})}function T0(){const{t:e}=tn(),t=F(i=>i.getValueForRequestKey("prompt")),n=F(i=>i.setRequestOptions),r=i=>{n("prompt",i.target.value)};return L("div",{className:y0,children:[L("div",{className:S0,children:[k("p",{children:e("home.editor-title")}),k("textarea",{value:t,onChange:r})]}),k(D0,{}),k(C0,{}),k(E0,{})]})}function j0(){const e=F(t=>t.isInpainting);return L(yn,{children:[L("div",{className:m0,children:[k(T0,{}),k(r0,{}),k(c0,{})]}),e&&k("div",{className:v0,children:k(g0,{})})]})}const M0=`${Sn}/ding.mp3`,lh=Of.forwardRef((e,t)=>k("audio",{ref:t,style:{display:"none"},children:k("source",{src:M0,type:"audio/mp3"})}));lh.displayName="AudioDing";var A0="_1yvg52n0",U0="_1yvg52n1";function z0({imageData:e,metadata:t,className:n}){return k("div",{className:[A0,n].join(" "),children:k("img",{className:U0,src:e,alt:t.prompt})})}function $0({isLoading:e,image:t}){const{info:n,data:r}=t!=null?t:{},i=F(l=>l.setRequestOptions),o=()=>{const{prompt:l,seed:u,num_inference_steps:c,guidance_scale:f,use_face_correction:d,use_upscale:g,width:v,height:S}=n;let w=l.replace(/[^a-zA-Z0-9]/g,"_");w=w.substring(0,100);let m=`${w}_Seed-${u}_Steps-${c}_Guidance-${f}`;return typeof d=="string"&&(m+=`_FaceCorrection-${d}`),typeof g=="string"&&(m+=`_Upscale-${g}`),m+=`_${v}x${S}`,m+=".png",m},s=()=>{const l=document.createElement("a");l.download=o(),l.href=r,l.click()},a=()=>{i("init_image",r)};return k("div",{className:"current-display",children:e?k("h4",{className:"loading",children:"Loading..."}):t!==null&&L("div",{children:[L("p",{children:[" ",n==null?void 0:n.prompt]}),k(z0,{imageData:r,metadata:n}),L("div",{children:[k("button",{onClick:s,children:"Save"}),k("button",{onClick:a,children:"Use as Input"})]})]})||k("h4",{className:"no-image",children:"Try Making a new image!"})})}var B0="fsj92y3",Q0="fsj92y1",V0="fsj92y0",H0="fsj92y2";function K0({images:e,setCurrentDisplay:t,removeImages:n}){const r=i=>{const o=e[i];t(o)};return L("div",{className:V0,children:[e!=null&&e.length>0&&k("button",{className:B0,onClick:()=>{n()},children:"REMOVE"}),k("ul",{className:Q0,children:e==null?void 0:e.map((i,o)=>i===void 0?(console.warn(`image ${o} is undefined`),null):k("li",{children:k("button",{className:H0,onClick:()=>{r(o)},children:k("img",{src:i.data,alt:i.info.prompt})})},i.id))})]})}var q0="_688lcr1",W0="_688lcr0",G0="_688lcr2";const Y0="_batch";function J0(){const e=E.exports.useRef(null),t=F(h=>h.isSoundEnabled()),{id:n,options:r}=Mn(h=>h.firstInQueue()),i=Mn(h=>h.removeFirstInQueue),[o,s]=E.exports.useState(null),[a,l]=E.exports.useState(!1),[u,c]=E.exports.useState(!0),{status:f,data:d}=Wr([Ns,n],async()=>await uy(r),{enabled:a});E.exports.useEffect(()=>{l(n!==void 0)},[n]),E.exports.useEffect(()=>{c(!!(a&&f==="loading"))},[a,f]),E.exports.useEffect(()=>{var h;f==="success"&&d.status==="succeeded"&&(t&&((h=e.current)==null||h.play()),i())},[f,d,i,e,t]);const g=jp(),[v,S]=E.exports.useState([]),w=Mn(h=>h.completedImageIds),m=Mn(h=>h.clearCachedIds);return E.exports.useEffect(()=>{const h=w.map(y=>g.getQueryData([Ns,y]));if(h.length>0){const y=h.map((P,_)=>{if(P!==void 0)return P.output.map((x,O)=>({id:`${w[O]}${Y0}-${x.seed}-${O}`,data:x.data,info:{...P.request,seed:x.seed}}))}).flat().reverse().filter(P=>P!==void 0);S(y),y.length>0?s(y[0]):s(null)}else S([]),s(null)},[S,s,g,w]),L("div",{className:W0,children:[k(lh,{ref:e}),k("div",{className:q0,children:k($0,{isLoading:u,image:o})}),k("div",{className:G0,children:k(K0,{removeImages:()=>{w.forEach(h=>{g.removeQueries([Ns,h])}),m()},images:v,setCurrentDisplay:s})})]})}var X0="_97t2g71",Z0="_97t2g70";function e1(){return L("div",{className:Z0,children:[L("p",{children:["If you found this project useful and want to help keep it alive, please"," ",k("a",{href:"https://ko-fi.com/cmdr2_stablediffusion_ui",target:"_blank",rel:"noreferrer",children:k("img",{src:`${Sn}/kofi.png`,className:X0})})," ","to help cover the cost of development and maintenance! Thank you for your support!"]}),L("p",{children:["Please feel free to join the"," ",k("a",{href:"https://discord.com/invite/u9yhsFmEkB",target:"_blank",rel:"noreferrer",children:"discord community"})," ","or"," ",k("a",{href:"https://github.com/cmdr2/stable-diffusion-ui/issues",target:"_blank",rel:"noreferrer",children:"file an issue"})," ","if you have any problems or suggestions in using this interface."]}),L("div",{id:"footer-legal",children:[L("p",{children:[k("b",{children:"Disclaimer:"})," The authors of this project are not responsible for any content generated using this interface."]}),L("p",{children:["This license of this software forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, ",k("br",{}),"spread misinformation and target vulnerable groups. For the full list of restrictions please read"," ",k("a",{href:"https://github.com/cmdr2/stable-diffusion-ui/blob/main/LICENSE",target:"_blank",rel:"noreferrer",children:"the license"}),"."]}),k("p",{children:"By using this software, you consent to the terms and conditions of the license."})]})]})}function t1({className:e}){const t=F(a=>a.setRequestOptions),{status:n,data:r}=Wr(["SaveDir"],sy),{status:i,data:o}=Wr(["modifications"],oy),s=F(a=>a.setAllModifiers);return E.exports.useEffect(()=>{n==="success"&&t("save_to_disk_path",r)},[t,n,r]),E.exports.useEffect(()=>{i==="success"?s(o):i==="error"&&s(cy)},[t,i,o]),L("div",{className:[Xv,e].join(" "),children:[k("header",{className:ny,children:k(Yy,{})}),k("nav",{className:Zv,children:k(j0,{})}),k("main",{className:ey,children:k(J0,{})}),k("footer",{className:ty,children:k(e1,{})})]})}function n1({className:e}){return k("div",{children:k("h1",{children:"Settings"})})}var r1="_4vfmtj1z";function Wt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $a(e,t){return $a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$a(e,t)}function qo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$a(e,t)}function oi(e,t){if(t&&(qt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wt(e)}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pt(e)}function i1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function o1(e){return rh(e)||i1(e)||ih(e)||oh()}function Jc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xc(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.init(t,n)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||s1,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i1?r-1:0),o=1;o-1?a.replace(/###/g,"."):a}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function ef(e,t,n){var r=Yl(e,t,Object),i=r.obj,o=r.k;i[o]=n}function u1(e,t,n,r){var i=Yl(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function xo(e,t){var n=Yl(e,t),r=n.obj,i=n.k;if(!!r)return r[i]}function tf(e,t,n){var r=xo(e,n);return r!==void 0?r:xo(t,n)}function uh(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):uh(e[r],t[r],n):e[r]=t[r]);return e}function Pn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var c1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function f1(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return c1[t]}):e}var Wo=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,d1=[" ",",","?","!",";"];function p1(e,t,n){t=t||"",n=n||"";var r=d1.filter(function(a){return t.indexOf(a)<0&&n.indexOf(a)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ci(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ch(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;oo+s;)s++,a=r.slice(o,o+s).join(n),l=i[a];if(l===void 0)return;if(l===null)return null;if(t.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var u=r.slice(o+s).join(n);return u?ch(l,u,n):void 0}i=i[r[o]]}return i}}var m1=function(e){qo(n,e);var t=h1(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return nt(this,n),i=t.call(this),Wo&&Jt.call(Wt(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return rt(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,o];s&&typeof s!="string"&&(c=c.concat(s)),s&&typeof s=="string"&&(c=c.concat(l?s.split(l):s)),i.indexOf(".")>-1&&(c=i.split("."));var f=xo(this.data,c);return f||!u||typeof s!="string"?f:ch(this.data&&this.data[i]&&this.data[i][o],s,l)}},{key:"addResource",value:function(i,o,s,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var c=[i,o];s&&(c=c.concat(u?s.split(u):s)),i.indexOf(".")>-1&&(c=i.split("."),a=o,o=c[1]),this.addNamespaces(o),ef(this.data,c,a),l.silent||this.emit("added",i,o,s,a)}},{key:"addResources",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in s)(typeof s[l]=="string"||Object.prototype.toString.apply(s[l])==="[object Array]")&&this.addResource(i,o,l,s[l],{silent:!0});a.silent||this.emit("added",i,o,s)}},{key:"addResourceBundle",value:function(i,o,s,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,o];i.indexOf(".")>-1&&(c=i.split("."),a=s,s=o,o=c[1]),this.addNamespaces(o);var f=xo(this.data,c)||{};a?uh(f,s,l):f=Ci(Ci({},f),s),ef(this.data,c,f),u.silent||this.emit("added",i,o,s)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ci(Ci({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),s=o&&Object.keys(o)||[];return!!s.find(function(a){return o[a]&&Object.keys(o[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Jt),fh={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var s=this;return t.forEach(function(a){s.processors[a]&&(n=s.processors[a].process(n,r,i,o))}),n}};function rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function me(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var of={},sf=function(e){qo(n,e);var t=v1(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return nt(this,n),i=t.call(this),Wo&&Jt.call(Wt(i)),l1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Wt(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=ut.create("translator"),i}return rt(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var s=this.resolve(i,o);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(i,o){var s=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=s&&i.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!p1(i,s,a);if(u&&!c){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:l};var d=i.split(s);(s!==a||s===a&&this.options.ns.indexOf(d[0])>-1)&&(l=d.shift()),i=d.join(a)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,s){var a=this;if(qt(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],o),f=c.key,d=c.namespaces,g=d[d.length-1],v=o.lng||this.language,S=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(S){var w=o.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(g).concat(w).concat(f),m):"".concat(g).concat(w).concat(f)}return l?(m.res=f,m):f}var m=this.resolve(i,o),p=m&&m.res,h=m&&m.usedKey||f,y=m&&m.exactUsedKey||f,P=Object.prototype.toString.apply(p),_=["[object Number]","[object Function]","[object RegExp]"],x=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,R=typeof p!="string"&&typeof p!="boolean"&&typeof p!="number";if(O&&p&&R&&_.indexOf(P)<0&&!(typeof x=="string"&&P==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,p,me(me({},o),{},{ns:d})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=b,m):b}if(u){var M=P==="[object Array]",ne=M?[]:{},Re=M?y:h;for(var Oe in p)if(Object.prototype.hasOwnProperty.call(p,Oe)){var sr="".concat(Re).concat(u).concat(Oe);ne[Oe]=this.translate(sr,me(me({},o),{joinArrays:!1,ns:d})),ne[Oe]===sr&&(ne[Oe]=p[Oe])}p=ne}}else if(O&&typeof x=="string"&&P==="[object Array]")p=p.join(x),p&&(p=this.extendTranslation(p,i,o,s));else{var Nt=!1,gt=!1,N=o.count!==void 0&&typeof o.count!="string",D=n.hasDefaultValue(o),T=N?this.pluralResolver.getSuffix(v,o.count,o):"",$=o["defaultValue".concat(T)]||o.defaultValue;!this.isValidLookup(p)&&D&&(Nt=!0,p=$),this.isValidLookup(p)||(gt=!0,p=f);var J=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,wn=J&>?void 0:p,Ne=D&&$!==p&&this.options.updateMissing;if(gt||Nt||Ne){if(this.logger.log(Ne?"updateKey":"missingKey",v,g,f,Ne?$:p),u){var kn=this.resolve(f,me(me({},o),{},{keySeparator:!1}));kn&&kn.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var Ie=[],mt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&mt&&mt[0])for(var Go=0;Go1&&arguments[1]!==void 0?arguments[1]:{},a,l,u,c,f;return typeof i=="string"&&(i=[i]),i.forEach(function(d){if(!o.isValidLookup(a)){var g=o.extractFromKey(d,s),v=g.key;l=v;var S=g.namespaces;o.options.fallbackNS&&(S=S.concat(o.options.fallbackNS));var w=s.count!==void 0&&typeof s.count!="string",m=w&&!s.ordinal&&s.count===0&&o.pluralResolver.shouldUseIntlApi(),p=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",h=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);S.forEach(function(y){o.isValidLookup(a)||(f=y,!of["".concat(h[0],"-").concat(y)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(of["".concat(h[0],"-").concat(y)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(h.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(P){if(!o.isValidLookup(a)){c=P;var _=[v];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(_,v,P,y,s);else{var x;w&&(x=o.pluralResolver.getSuffix(P,s.count,s));var O="".concat(o.options.pluralSeparator,"zero");if(w&&(_.push(v+x),m&&_.push(v+O)),p){var R="".concat(v).concat(o.options.contextSeparator).concat(s.context);_.push(R),w&&(_.push(R+x),m&&_.push(R+O))}}for(var b;b=_.pop();)o.isValidLookup(a)||(u=b,a=o.getResource(P,y,b,s))}}))})}}),{res:a,usedKey:l,exactUsedKey:u,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,s,a):this.resourceStore.getResource(i,o,s,a)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&o===s.substring(0,o.length)&&i[s]!==void 0)return!0;return!1}}]),n}(Jt);function bs(e){return e.charAt(0).toUpperCase()+e.slice(1)}var S1=function(){function e(t){nt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ut.create("languageUtils")}return rt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=bs(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=bs(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=bs(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var s=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(s))&&(i=s)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var s=r.getLanguagePartFromCode(o);if(r.isSupportedCode(s))return i=s;i=r.options.supportedLngs.find(function(a){if(a.indexOf(s)===0)return a})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),s=[],a=function(u){!u||(i.isSupportedCode(u)?s.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),o.forEach(function(l){s.indexOf(l)<0&&a(i.formatLanguageCode(l))}),s}}]),e}(),w1=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],k1={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},O1=["v1","v2","v3"],af={zero:0,one:1,two:2,few:3,many:4,other:5};function x1(){var e={};return w1.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:k1[t.fc]}})}),e}var P1=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.languageUtils=t,this.options=n,this.logger=ut.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=x1()}return rt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(s,a){return af[s]-af[a]}).map(function(s){return"".concat(r.options.prepend).concat(s)}):o.numbers.map(function(s){return r.getSuffix(n,s,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),s=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));var a=function(){return i.options.prepend&&s.toString()?i.options.prepend+s.toString():s.toString()};return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?"_plural_".concat(s.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!O1.includes(this.options.compatibilityJSON)}}]),e}();function lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function We(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=ut.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return rt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:f1,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Pn(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Pn(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Pn(r.nestingPrefix):r.nestingPrefixEscaped||Pn("$t("),this.nestingSuffix=r.nestingSuffix?Pn(r.nestingSuffix):r.nestingSuffixEscaped||Pn(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var s=this,a,l,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(w){return w.replace(/\$/g,"$$$$")}var d=function(m){if(m.indexOf(s.formatSeparator)<0){var p=tf(r,c,m);return s.alwaysFormat?s.format(p,void 0,i,We(We(We({},o),r),{},{interpolationkey:m})):p}var h=m.split(s.formatSeparator),y=h.shift().trim(),P=h.join(s.formatSeparator).trim();return s.format(tf(r,c,y),P,i,We(We(We({},o),r),{},{interpolationkey:y}))};this.resetRegExp();var g=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,v=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,S=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return s.escapeValue?f(s.escape(m)):f(m)}}];return S.forEach(function(w){for(u=0;a=w.regex.exec(n);){var m=a[1].trim();if(l=d(m),l===void 0)if(typeof g=="function"){var p=g(n,a,o);l=typeof p=="string"?p:""}else if(o&&o.hasOwnProperty(m))l="";else if(v){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=Zc(l));var h=w.safeValue(l);if(n=n.replace(a[0],h),v?(w.regex.lastIndex+=l.length,w.regex.lastIndex-=a[0].length):w.regex.lastIndex=0,u++,u>=s.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,l=We({},o);l.applyPostProcessor=!1,delete l.defaultValue;function u(g,v){var S=this.nestingOptionsSeparator;if(g.indexOf(S)<0)return g;var w=g.split(new RegExp("".concat(S,"[ ]*{"))),m="{".concat(w[1]);g=w[0],m=this.interpolate(m,l);var p=m.match(/'/g),h=m.match(/"/g);(p&&p.length%2===0&&!h||h.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),v&&(l=We(We({},v),l))}catch(y){return this.logger.warn("failed parsing options string in nesting for key ".concat(g),y),"".concat(g).concat(S).concat(m)}return delete l.defaultValue,g}for(;s=this.nestingRegexp.exec(n);){var c=[],f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){var d=s[1].split(this.formatSeparator).map(function(g){return g.trim()});s[1]=d.shift(),c=d,f=!0}if(a=r(u.call(this,s[1].trim(),l),l),a&&s[0]===n&&typeof a!="string")return a;typeof a!="string"&&(a=Zc(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),f&&(a=c.reduce(function(g,v){return i.format(g,v,o.lng,We(We({},o),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),e}();function uf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(s){if(!!s){var a=s.split(":"),l=o1(a),u=l[0],c=l.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=f),f==="false"&&(n[u.trim()]=!1),f==="true"&&(n[u.trim()]=!0),isNaN(f)||(n[u.trim()]=parseInt(f,10))}})}}return{formatName:t,formatOptions:n}}var E1=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=ut.create("formatter"),this.options=t,this.formats={number:function(r,i,o){return new Intl.NumberFormat(i,o).format(r)},currency:function(r,i,o){return new Intl.NumberFormat(i,Lt(Lt({},o),{},{style:"currency"})).format(r)},datetime:function(r,i,o){return new Intl.DateTimeFormat(i,Lt({},o)).format(r)},relativetime:function(r,i,o){return new Intl.RelativeTimeFormat(i,Lt({},o)).format(r,o.range||"day")},list:function(r,i,o){return new Intl.ListFormat(i,Lt({},o)).format(r)}},this.init(t)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"format",value:function(n,r,i,o){var s=this,a=r.split(this.formatSeparator),l=a.reduce(function(u,c){var f=C1(c),d=f.formatName,g=f.formatOptions;if(s.formats[d]){var v=u;try{var S=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},w=S.locale||S.lng||o.locale||o.lng||i;v=s.formats[d](u,w,Lt(Lt(Lt({},g),o),S))}catch(m){s.logger.warn(m)}return v}else s.logger.warn("there was no format function for ".concat(d));return u},n);return l}}]),e}();function cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ff(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I1(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var L1=function(e){qo(n,e);var t=R1(n);function n(r,i,o){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return nt(this,n),s=t.call(this),Wo&&Jt.call(Wt(s)),s.backend=r,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=ut.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,a.backend,a),s}return rt(n,[{key:"queueLoad",value:function(i,o,s,a){var l=this,u={},c={},f={},d={};return i.forEach(function(g){var v=!0;o.forEach(function(S){var w="".concat(g,"|").concat(S);!s.reload&&l.store.hasResourceBundle(g,S)?l.state[w]=2:l.state[w]<0||(l.state[w]===1?c[w]===void 0&&(c[w]=!0):(l.state[w]=1,v=!1,c[w]===void 0&&(c[w]=!0),u[w]===void 0&&(u[w]=!0),d[S]===void 0&&(d[S]=!0)))}),v||(f[g]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(d)}}},{key:"loaded",value:function(i,o,s){var a=i.split("|"),l=a[0],u=a[1];o&&this.emit("failedLoading",l,u,o),s&&this.store.addResourceBundle(l,u,s),this.state[i]=o?-1:2;var c={};this.queue.forEach(function(f){u1(f.loaded,[l],u),I1(f,i),o&&f.errors.push(o),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(d){c[d]||(c[d]={});var g=f.loaded[d];g.length&&g.forEach(function(v){c[d][v]===void 0&&(c[d][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,o,s){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:s,tried:l,wait:u,callback:c});return}return this.readingCalls++,this.backend[s](i,o,function(f,d){if(a.readingCalls--,a.waitingReads.length>0){var g=a.waitingReads.shift();a.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(f&&d&&l2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,a,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(c){s.loadOne(c)})}},{key:"load",value:function(i,o,s){this.prepareLoading(i,o,{},s)}},{key:"reload",value:function(i,o,s){this.prepareLoading(i,o,{reload:!0},s)}},{key:"loadOne",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=i.split("|"),l=a[0],u=a[1];this.read(l,u,"read",void 0,void 0,function(c,f){c&&o.logger.warn("".concat(s,"loading namespace ").concat(u," for language ").concat(l," failed"),c),!c&&f&&o.logger.log("".concat(s,"loaded namespace ").concat(u," for language ").concat(l),f),o.loaded(i,c,f)})}},{key:"saveMissing",value:function(i,o,s,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}s==null||s===""||(this.backend&&this.backend.create&&this.backend.create(i,o,s,a,null,ff(ff({},u),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,s,a))}}]),n}(Jt);function b1(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(qt(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),qt(t[2])==="object"||qt(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function df(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function pf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ei(){}function T1(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Po=function(e){qo(n,e);var t=F1(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(nt(this,n),r=t.call(this),Wo&&Jt.call(Wt(r)),r.options=df(i),r.services={},r.logger=ut,r.modules={external:[]},T1(Wt(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),oi(r,Wt(r));setTimeout(function(){r.init(i,o)},0)}return r}return rt(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(s=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var a=b1();this.options=ot(ot(ot({},a),this.options),df(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=ot(ot({},a.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?ut.init(l(this.modules.logger),this.options):ut.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=E1);var c=new S1(this.options);this.store=new m1(this.options.resources,this.options);var f=this.services;f.logger=ut,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new P1(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(f.formatter=l(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new _1(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new L1(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var p=arguments.length,h=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y
0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var g=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];g.forEach(function(m){i[m]=function(){var p;return(p=i.store)[m].apply(p,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(m){i[m]=function(){var p;return(p=i.store)[m].apply(p,arguments),i}});var S=gr(),w=function(){var p=function(y,P){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),S.resolve(P),s(y,P)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return p(null,i.t.bind(i));i.changeLanguage(i.options.lng,p)};return this.options.resources||!this.options.initImmediate?w():setTimeout(w,0),S}},{key:"loadResources",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei,a=s,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(a=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var u=[],c=function(g){if(!!g){var v=o.services.languageUtils.toResolveHierarchy(g);v.forEach(function(S){u.indexOf(S)<0&&u.push(S)})}};if(l)c(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(d){return c(d)})}this.options.preload&&this.options.preload.forEach(function(d){return c(d)}),this.services.backendConnector.load(u,this.options.ns,function(d){!d&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),a(d)})}else a(null)}},{key:"reloadResources",value:function(i,o,s){var a=gr();return i||(i=this.languages),o||(o=this.options.ns),s||(s=Ei),this.services.backendConnector.reload(i,o,function(l){a.resolve(),s(l)}),a}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&fh.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,o){var s=this;this.isLanguageChangingTo=i;var a=gr();this.emit("languageChanging",i);var l=function(d){s.language=d,s.languages=s.services.languageUtils.toResolveHierarchy(d),s.resolvedLanguage=void 0,s.setResolvedLanguage(d)},u=function(d,g){g?(l(g),s.translator.changeLanguage(g),s.isLanguageChangingTo=void 0,s.emit("languageChanged",g),s.logger.log("languageChanged",g)):s.isLanguageChangingTo=void 0,a.resolve(function(){return s.t.apply(s,arguments)}),o&&o(d,function(){return s.t.apply(s,arguments)})},c=function(d){!i&&!d&&s.services.languageDetector&&(d=[]);var g=typeof d=="string"?d:s.services.languageUtils.getBestMatchFromCodes(d);g&&(s.language||l(g),s.translator.language||s.translator.changeLanguage(g),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage(g)),s.loadResources(g,function(v){u(v,g)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(c):c(i),a}},{key:"getFixedT",value:function(i,o,s){var a=this,l=function u(c,f){var d;if(qt(f)!=="object"){for(var g=arguments.length,v=new Array(g>2?g-2:0),S=2;S1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var c=function(g,v){var S=o.services.backendConnector.state["".concat(g,"|").concat(v)];return S===-1||S===2};if(s.precheck){var f=s.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(a,i)&&(!l||c(u,i)))}},{key:"loadNamespaces",value:function(i,o){var s=this,a=gr();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),o&&o(l)}),a):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var s=gr();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(u){return a.indexOf(u)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(u){s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei,a=ot(ot(ot({},this.options),o),{isClone:!0}),l=new n(a);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(c){l[c]=i[c]}),l.services=ot({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new sf(l.services,l.options),l.translator.on("*",function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),g=1;g0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Po(e,t)});var ke=Po.createInstance();ke.createInstance=Po.createInstance;ke.createInstance;ke.init;ke.loadResources;ke.reloadResources;ke.use;ke.changeLanguage;ke.getFixedT;ke.t;ke.exists;ke.setDefaultNamespace;ke.hasLoadedNamespace;ke.loadNamespaces;ke.loadLanguages;const j1="Stable Diffusion UI",M1="",A1={home:"Home",history:"History",community:"Community",settings:"Settings"},U1={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},z1={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:",width:"Width:",height:"Height:",sampler:"Sampler:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},$1={txt:"Image Modifiers (art styles, tags etc)"},B1={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},Q1={fave:"Favorites Only",search:"Search"},V1={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},H1=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
Please feel free to join the discord community or file an issue if you have any problems or suggestions in using this interface.
@@ -91,10 +91,10 @@ This license of this software forbids you from sharing any content that violates
spread misinformation and target vulnerable groups. For the full list of restrictions please read the license.
By using this software, you consent to the terms and conditions of the license.
-`,H1={title:j1,description:T1,navbar:M1,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:A1,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:U1,tags:z1,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
+`,K1={title:j1,description:M1,navbar:A1,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:U1,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:z1,tags:$1,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
`,part3:`You can also add modifiers like "Realistic", "Pencil Sketch", "ArtStation" etc by browsing through the "Image Modifiers" section and selecting the desired modifiers.
-`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:$1,history:B1,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
-Please restart the program after changing this.`,save:"SAVE"},storage:Q1,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:V1},K1="Stable Diffusion UI",q1="",W1={home:"Home",history:"History",community:"Community",settings:"Settings"},G1={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},Y1={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:",width:"Width:",height:"Height:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},J1={txt:"Image Modifiers (art styles, tags etc)"},X1={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},Z1={fave:"Favorites Only",search:"Search"},eS={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},tS=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
+`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:B1,history:Q1,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
+Please restart the program after changing this.`,save:"SAVE"},storage:V1,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:H1},q1="Stable Diffusion UI",W1="",G1={home:"Home",history:"History",community:"Community",settings:"Settings"},Y1={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},J1={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:",width:"Width:",height:"Height:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},X1={txt:"Image Modifiers (art styles, tags etc)"},Z1={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},eS={fave:"Favorites Only",search:"Search"},tS={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},nS=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
Please feel free to join the discord community or file an issue if you have any problems or suggestions in using this interface.
@@ -104,7 +104,7 @@ This license of this software forbids you from sharing any content that violates
spread misinformation and target vulnerable groups. For the full list of restrictions please read the license.
By using this software, you consent to the terms and conditions of the license.
-`,nS={title:K1,description:q1,navbar:W1,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:G1,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:Y1,tags:J1,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
+`,rS={title:q1,description:W1,navbar:G1,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:Y1,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:J1,tags:X1,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
`,part3:`You can also add modifiers like "Realistic", "Pencil Sketch", "ArtStation" etc by browsing through the "Image Modifiers" section and selecting the desired modifiers.
-`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:X1,history:Z1,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
-Please restart the program after changing this.`,save:"SAVE"},storage:eS,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:tS},rS={en:{translation:H1},es:{translation:nS}};ke.use($y).init({lng:"en",interpolation:{escapeValue:!1},resources:rS}).then(()=>{console.log("i18n initialized")}).catch(e=>{console.error("i18n initialization failed",e)}).finally(()=>{console.log("i18n initialization finished")});const iS=new Tv;function oS(){const e=n1;return k(Mv,{location:iS,routes:[{path:"/",element:k(e1,{className:e})},{path:"/settings",element:k(t1,{className:e})}]})}const sS=new iv({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});kv();Fs.createRoot(document.getElementById("root")).render(k(Of.StrictMode,{children:L(av,{client:sS,children:[k(oS,{}),k(hv,{initialIsOpen:!0})]})}));
+`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:Z1,history:eS,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
+Please restart the program after changing this.`,save:"SAVE"},storage:tS,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:nS},iS={en:{translation:K1},es:{translation:rS}};ke.use(By).init({lng:"en",interpolation:{escapeValue:!1},resources:iS}).then(()=>{console.log("i18n initialized")}).catch(e=>{console.error("i18n initialization failed",e)}).finally(()=>{console.log("i18n initialization finished")});const oS=new jv;function sS(){const e=r1;return k(Mv,{location:oS,routes:[{path:"/",element:k(t1,{className:e})},{path:"/settings",element:k(n1,{className:e})}]})}const aS=new iv({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});kv();Fs.createRoot(document.getElementById("root")).render(k(Of.StrictMode,{children:L(av,{client:aS,children:[k(sS,{}),k(hv,{initialIsOpen:!0})]})}));