diff --git a/README.ZH_CN.md b/README.ZH_CN.md index a0643e2..6a2ae97 100644 --- a/README.ZH_CN.md +++ b/README.ZH_CN.md @@ -51,7 +51,7 @@ git clone https://github.com/yolain/ComfyUI-Easy-Use ## 👨🏻‍🚀 计划 -- [ ] 更新便于维护的新前端代码 +- [x] 更新便于维护的新前端代码 - [x] 使用sass维护css样式 - [x] 对原有扩展进行优化 - [x] 增加新的组件(如节点时间统计等) @@ -62,6 +62,7 @@ git clone https://github.com/yolain/ComfyUI-Easy-Use **v1.2.2** +- 增加 v2 版本新前端代码 - 增加 `easy fluxLoader` - 增加 `controlnetApply` 相关节点对sd3和hunyuanDiT的支持 @@ -149,7 +150,8 @@ git clone https://github.com/yolain/ComfyUI-Easy-Use - `easy wildcards` 增加 **multiline_mode**属性 - 增加 当节点需要下载模型时,若huggingface连接超时,会切换至镜像地址下载模型 -**v1.1.2** +
+v1.1.2 - 改写 EasyUse 相关节点的部分插槽推荐节点 - 增加 **启用上下文菜单自动嵌套子目录** 设置项,默认为启用状态,可分类子目录及checkpoints、loras预览图 @@ -164,8 +166,10 @@ git clone https://github.com/yolain/ComfyUI-Easy-Use - 修复 `easy stylesSelector` 当未选择样式时,原有提示词发生了变化 - 修复 `easy pipeEdit` 提示词输入lora时报错 - 修复 layerDiffuse xyplot相关bug +
-**v1.1.1** +
+v1.1.1/b> - 修复首次添加含seed的节点且当前模式为control_before_generate时,seed为0的问题 - `easy preSamplingAdvanced` 增加 **return_with_leftover_noise** @@ -175,7 +179,7 @@ git clone https://github.com/yolain/ComfyUI-Easy-Use - 修补官方BUG: 当control_mode为before 在首次加载页面时未修改节点中widget名称为 control_before_generate - 去除强制**control_before_generate**设定 - 增加 `easy imageRemBg` - 默认为BriaAI的RMBG-1.4模型, 移除背景效果更加,速度更快 - +
v1.1.0 diff --git a/README.md b/README.md index 969b624..72f9fe0 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Double-click install.bat to install the required dependencies ## 👨🏻‍🚀 Plan -- [ ] Updated new front-end code for easier maintenance +- [x] Updated new front-end code for easier maintenance - [x] Maintain css styles using sass - [x] Optimize existing extensions - [x] Add new components @@ -57,6 +57,7 @@ Double-click install.bat to install the required dependencies **v1.2.2** +- Added v2 web frond-end code - Added `easy fluxLoader` - Added support for `controlnetApply` Related nodes with SD3 and hunyuanDiT @@ -137,7 +138,8 @@ Double-click install.bat to install the required dependencies - Added `easy promptConcat` - `easy wildcards` Added **multiline_mode** -**v1.1.2** +
+v1.1.2 - Optimized some of the recommended nodes for slots related to EasyUse - Added **Enable ContextMenu Auto Nest Subdirectories** The setting item is enabled by default, and it can be classified into subdirectories, checkpoints and loras previews @@ -152,8 +154,10 @@ Double-click install.bat to install the required dependencies - Fixed `easy pipeEdit` error when add lora to prompt - Fixed layerDiffuse xyplot bug - `easy kSamplerInpainting` add *additional* widget,you can choose 'Differential Diffusion' or 'Only InpaintModelConditioning' +
-**v1.1.1** +
+v1.1.1 - The issue that the seed is 0 when a node with a seed control is added and **control before generate** is fixed for the first time run queue prompt. - `easy preSamplingAdvanced` Added **return_with_leftover_noise** @@ -162,6 +166,7 @@ Double-click install.bat to install the required dependencies - Renamed all nodes widget name named seed_num to seed - Remove forced **control_before_generate** settings。 If you want to use control_before_generate, change widget_value_control_mode to before in system settings - Added `easy imageRemBg` - The default is BriaAI's RMBG-1.4 model, which removes the background effect more and faster +
v1.1.0 diff --git a/py/api.py b/py/api.py index db670d3..014c886 100644 --- a/py/api.py +++ b/py/api.py @@ -150,11 +150,15 @@ async def getModelsList(request): # get models thumbnails @PromptServer.instance.routes.get("/easyuse/models/thumbnail") async def getModelsThumbnail(request): + limit = 500 + if "limit" in request.rel_url.query: + limit = request.rel_url.query.get("limit") + limit = int(limit) checkpoints = folder_paths.get_filename_list("checkpoints_thumb") loras = folder_paths.get_filename_list("loras_thumb") checkpoints_full = [] loras_full = [] - if len(checkpoints) + len(loras) >= 500: + if len(checkpoints) + len(loras) >= limit: return web.Response(status=400) for index, i in enumerate(checkpoints): full_path = folder_paths.get_full_path('checkpoints_thumb', str(i)) diff --git a/web_version/v2/assets/primeuix-Be3xdh47.js b/web_version/v2/assets/primeuix-Be3xdh47.js new file mode 100644 index 0000000..c3ce3d2 --- /dev/null +++ b/web_version/v2/assets/primeuix-Be3xdh47.js @@ -0,0 +1 @@ +var e=Object.defineProperty,t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,n=(t,r,s)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s;function a(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}function o(e){return!!(e&&e.constructor&&e.call&&e.apply)}function i(e){return!a(e)}function l(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||0!==Object.keys(e).length)}function c(e,...t){return o(e)?e(...t):e}function u(e,t=!0){return"string"==typeof e&&(t||""!==e)}function d(e){return u(e)?e.replace(/(-|_)/g,"").toLowerCase():e}function m(e,t="",r={}){const s=d(t).split("."),n=s.shift();return n?l(e)?m(c(e[Object.keys(e).find((e=>d(e)===n))||""],r),s.join("."),r):void 0:c(e,r)}function h(e,t=!0){return Array.isArray(e)&&(t||0!==e.length)}function p(e){return i(e)&&!isNaN(e)}function f(e,t){if(t){const r=t.test(e);return t.lastIndex=0,r}return!1}function g(...e){const a=(e={},o={})=>{const i=((e,a)=>{for(var o in a||(a={}))r.call(a,o)&&n(e,o,a[o]);if(t)for(var o of t(a))s.call(a,o)&&n(e,o,a[o]);return e})({},e);return Object.keys(o).forEach((t=>{l(o[t])&&t in e&&l(e[t])?i[t]=a(e[t],o[t]):i[t]=o[t]})),i};return e.reduce(((e,t,r)=>0===r?t:a(e,t)),{})}function y(e){return e?e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":"):e}function v(e){return u(e,!1)?e[0].toUpperCase()+e.slice(1):e}function b(e){return u(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,((e,t)=>0===t?e:"-"+e.toLowerCase())).toLowerCase():e}function S(e){return u(e)?e.replace(/[A-Z]/g,((e,t)=>0===t?e:"."+e.toLowerCase())).toLowerCase():e}function $(){const e=new Map;return{on(t,r){let s=e.get(t);return s?s.push(r):s=[r],e.set(t,s),this},off(t,r){let s=e.get(t);return s&&s.splice(s.indexOf(r)>>>0,1),this},emit(t,r){let s=e.get(t);s&&s.slice().map((e=>{e(r)}))},clear(){e.clear()}}}var w=Object.defineProperty,k=Object.defineProperties,L=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,C=(e,t,r)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&C(e,r,t[r]);if(N)for(var r of N(t))j.call(t,r)&&C(e,r,t[r]);return e},_=(e,t)=>k(e,L(t)),P=(e,t)=>{var r={};for(var s in e)O.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(null!=e&&N)for(var s of N(e))t.indexOf(s)<0&&j.call(e,s)&&(r[s]=e[s]);return r},T=$();function E(e,t){h(e)?e.push(...t||[]):l(e)&&Object.assign(e,t)}function A(e,t=""){if(!["opacity","z-index","line-height","font-weight","flex","flex-grow","flex-shrink","order"].some((e=>t.endsWith(e)))){return`${e}`.trim().split(" ").map((e=>p(e)?`${e}px`:e)).join(" ")}return e}function V(e="",t=""){return function(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}(`${u(e,!1)&&u(t,!1)?`${e}-`:e}${t}`)}function R(e="",t=""){return`--${V(e,t)}`}function F(e,t="",r="",s=[],n){if(u(e)){const a=/{([^}]*)}/g,o=e.trim();if(f(o,a)){const e=o.replaceAll(a,(e=>{const t=e.replace(/{|}/g,"").split(".").filter((e=>!s.some((t=>f(e,t)))));return`var(${R(r,b(t.join("-")))}${i(n)?`, ${n}`:""})`})),t=/(\d+\s+[\+\-\*\/]\s+\d+)/g,l=/var\([^)]+\)/g;return f(e.replace(l,"0"),t)?`calc(${e})`:e}return A(o,t)}if(p(e))return A(e,t)}function D(e,t){return e?`${e}{${t}}`:""}var W=(...e)=>z(I.getTheme(),...e),z=(e={},t,r,s="variable")=>{if(t){const{variable:n,options:a}=I.defaults||{},{prefix:o,transform:i}=(null==e?void 0:e.options)||a||{},l=f(t,/{([^}]*)}/g)?t:`{${t}}`;return"value"===s||"strict"===i?I.getTokenValue(t):F(l,void 0,o,[n.excludedKeyRegex],r)}return""};function H(e,t={}){const r=I.defaults.variable,{prefix:s=r.prefix,selector:n=r.selector,excludedKeyRegex:a=r.excludedKeyRegex}=t,o=(e,t="")=>Object.entries(e).reduce(((e,[r,n])=>{const i=f(r,a)?V(t):V(t,b(r)),c=function(e){return l(e)&&e.hasOwnProperty("value")&&e.hasOwnProperty("type")?e.value:e}(n);if(l(c)){const{variables:t,tokens:r}=o(c,i);E(e.tokens,r),E(e.variables,t)}else e.tokens.push((s?i.replace(`${s}-`,""):i).replaceAll("-",".")),function(e,t,r){u(t,!1)&&e.push(`${t}:${r};`)}(e.variables,R(i),F(c,i,s,[a]));return e}),{variables:[],tokens:[]}),{variables:i,tokens:c}=o(e,s);return{value:i,tokens:c,declarations:i.join(""),css:D(n,i.join(""))}}var M={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:"attr",selector:`:root${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:"media",selector:`${e}{:root{[CSS]}}`,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(e.trim())}}},custom:{resolve:e=>({type:"custom",selector:e,matched:!0})}},resolve(e){const t=Object.keys(this.rules).filter((e=>"custom"!==e)).map((e=>this.rules[e]));return[e].flat().map((e=>{var r;return null!=(r=t.map((t=>t.resolve(e))).find((e=>e.matched)))?r:this.rules.custom.resolve(e)}))}},_toVariables:(e,t)=>H(e,{prefix:null==t?void 0:t.prefix}),getCommon({name:e="",theme:t={},params:r,set:s,defaults:n}){var a,o,l,c;const{preset:u,options:d}=t;let m,h,p,f;if(i(u)){const{primitive:t,semantic:r}=u,g=r||{},{colorScheme:y}=g,v=P(g,["colorScheme"]),b=y||{},{dark:S}=b,$=P(b,["dark"]),w=i(t)?this._toVariables({primitive:t},d):{},k=i(v)?this._toVariables({semantic:v},d):{},L=i($)?this._toVariables({light:$},d):{},N=i(S)?this._toVariables({dark:S},d):{},[O,j]=[null!=(a=w.declarations)?a:"",w.tokens],[C,x]=[null!=(o=k.declarations)?o:"",k.tokens||[]],[_,T]=[null!=(l=L.declarations)?l:"",L.tokens||[]],[E,A]=[null!=(c=N.declarations)?c:"",N.tokens||[]];m=this.transformCSS(e,O,"light","variable",d,s,n),h=j;p=`${this.transformCSS(e,`${C}${_}color-scheme:light`,"light","variable",d,s,n)}${this.transformCSS(e,`${E}color-scheme:dark`,"dark","variable",d,s,n)}`,f=[...new Set([...x,...T,...A])]}return{primitive:{css:m,tokens:h},semantic:{css:p,tokens:f}}},getPreset({name:e="",preset:t={},options:r,params:s,set:n,defaults:a,selector:o}){var l,c,u;const d=e.replace("-directive",""),m=t,{colorScheme:h}=m,p=P(m,["colorScheme"]),f=h||{},{dark:g}=f,y=P(f,["dark"]),v=i(p)?this._toVariables({[d]:p},r):{},b=i(y)?this._toVariables({[d]:y},r):{},S=i(g)?this._toVariables({[d]:g},r):{},[$,w]=[null!=(l=v.declarations)?l:"",v.tokens||[]],[k,L]=[null!=(c=b.declarations)?c:"",b.tokens||[]],[N,O]=[null!=(u=S.declarations)?u:"",S.tokens||[]],j=[...new Set([...w,...L,...O])];return{css:`${this.transformCSS(d,`${$}${k}`,"light","variable",r,n,a,o)}${this.transformCSS(d,N,"dark","variable",r,n,a,o)}`,tokens:j}},getPresetC({name:e="",theme:t={},params:r,set:s,defaults:n}){var a;const{preset:o,options:i}=t,l=null==(a=null==o?void 0:o.components)?void 0:a[e];return this.getPreset({name:e,preset:l,options:i,params:r,set:s,defaults:n})},getPresetD({name:e="",theme:t={},params:r,set:s,defaults:n}){var a;const o=e.replace("-directive",""),{preset:i,options:l}=t,c=null==(a=null==i?void 0:i.directives)?void 0:a[o];return this.getPreset({name:o,preset:c,options:l,params:r,set:s,defaults:n})},getColorSchemeOption(e,t){var r;return this.regex.resolve(null!=(r=e.darkModeSelector)?r:t.options.darkModeSelector)},getLayerOrder(e,t={},r,s){const{cssLayer:n}=t;if(n){return`@layer ${c(n.order||"primeui",r)}`}return""},getCommonStyleSheet({name:e="",theme:t={},params:r,props:s={},set:n,defaults:a}){const o=this.getCommon({name:e,theme:t,params:r,set:n,defaults:a}),i=Object.entries(s).reduce(((e,[t,r])=>e.push(`${t}="${r}"`)&&e),[]).join(" ");return Object.entries(o||{}).reduce(((e,[t,r])=>{if(null==r?void 0:r.css){const s=y(null==r?void 0:r.css),n=`${t}-variables`;e.push(``)}return e}),[]).join("")},getStyleSheet({name:e="",theme:t={},params:r,props:s={},set:n,defaults:a}){var o;const i={name:e,theme:t,params:r,set:n,defaults:a},l=null==(o=e.includes("-directive")?this.getPresetD(i):this.getPresetC(i))?void 0:o.css,c=Object.entries(s).reduce(((e,[t,r])=>e.push(`${t}="${r}"`)&&e),[]).join(" ");return l?``:""},createTokens(e={},t,r="",s="",n={}){return Object.entries(e).forEach((([e,o])=>{const i=f(e,t.variable.excludedKeyRegex)?r:r?`${r}.${S(e)}`:S(e),c=s?`${s}.${e}`:e;l(o)?this.createTokens(o,t,i,c,n):(n[i]||(n[i]={paths:[],computed(e,t={}){if(e){const r=this.paths.find((t=>t.scheme===e))||this.paths.find((e=>"none"===e.scheme));return null==r?void 0:r.computed(e,t.binding)}return this.paths.map((e=>e.computed(e.scheme,t[e.scheme])))}}),n[i].paths.push({path:c,value:o,scheme:c.includes("colorScheme.light")?"light":c.includes("colorScheme.dark")?"dark":"none",computed(e,t={}){const r=/{([^}]*)}/g;let s=o;if(t.name=this.path,t.binding||(t.binding={}),f(o,r)){const a=o.trim().replaceAll(r,(r=>{var s,a;const o=r.replace(/{|}/g,"");return null==(a=null==(s=n[o])?void 0:s.computed(e,t))?void 0:a.value})),i=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,l=/var\([^)]+\)/g;s=f(a.replace(l,"0"),i)?`calc(${a})`:a}return a(t.binding)&&delete t.binding,{colorScheme:e,path:this.path,paths:t,value:s.includes("undefined")?void 0:s}}}))})),n},getTokenValue(e,t,r){var s;const n=t.split(".").filter((e=>!f(e.toLowerCase(),r.variable.excludedKeyRegex))).join(".");const a=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,o=[null==(s=e[n])?void 0:s.computed(a)].flat().filter((e=>e));return 1===o.length?o[0].value:o.reduce(((e={},t)=>{const r=t,{colorScheme:s}=r,n=P(r,["colorScheme"]);return e[s]=n,e}),void 0)},transformCSS(e,t,r,s,n={},a,o,u){if(i(t)){const{cssLayer:d}=n;if("style"!==s){const e=this.getColorSchemeOption(n,o),s=u?D(u,t):t;t="dark"===r?e.reduce(((e,{selector:t})=>(i(t)&&(e+=t.includes("[CSS]")?t.replace("[CSS]",s):D(t,s)),e)),""):D(null!=u?u:":root",t)}if(d){const r={name:"primeui",order:"primeui"};l(d)&&(r.name=c(d.name,{name:e,type:s})),i(r.name)&&(t=D(`@layer ${r.name}`,t),null==a||a.layerNames(r.name))}return t}return""}},I={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){const{theme:t}=e;t&&(this._theme=_(x({},t),{options:x(x({},this.defaults.options),t.options)}),this._tokens=M.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var e;return(null==(e=this.theme)?void 0:e.preset)||{}},get options(){var e;return(null==(e=this.theme)?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),T.emit("theme:change",e)},getPreset(){return this.preset},setPreset(e){this._theme=_(x({},this.theme),{preset:e}),this._tokens=M.createTokens(e,this.defaults),this.clearLoadedStyleNames(),T.emit("preset:change",e),T.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(e){this._theme=_(x({},this.theme),{options:e}),this.clearLoadedStyleNames(),T.emit("options:change",e),T.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return M.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return M.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){const r={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return M.getPresetC(r)},getDirective(e="",t){const r={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return M.getPresetD(r)},getCustomPreset(e="",t,r,s){const n={name:e,preset:t,options:this.options,selector:r,params:s,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return M.getPreset(n)},getLayerOrderCSS(e=""){return M.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,r="style",s){return M.transformCSS(e,t,s,r,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,r={}){return M.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,r={}){return M.getStyleSheet({name:e,theme:this.theme,params:t,props:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),T.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&T.emit("theme:load"))}};function B(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}function K(e,t){if(e&&t){const r=t=>{B(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)};[t].flat().filter(Boolean).forEach((e=>e.split(" ").forEach(r)))}}function Z(e,t){if(e&&t){const r=t=>{e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")};[t].flat().filter(Boolean).forEach((e=>e.split(" ").forEach(r)))}}function q(){let e=window,t=document,r=t.documentElement,s=t.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||s.clientWidth,height:e.innerHeight||r.clientHeight||s.clientHeight}}function X(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}function Y(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function U(e,t){if(e instanceof HTMLElement){return e.offsetWidth}return 0}function G(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function J(e,t={}){if(G(e)){const r=(t,s)=>{var n,a;const o=(null==(n=null==e?void 0:e.$attrs)?void 0:n[t])?[null==(a=null==e?void 0:e.$attrs)?void 0:a[t]]:[];return[s].flat().reduce(((e,s)=>{if(null!=s){const n=typeof s;if("string"===n||"number"===n)e.push(s);else if("object"===n){const n=Array.isArray(s)?r(t,s):Object.entries(s).map((([e,r])=>"style"!==t||!r&&0!==r?r?e:void 0:`${e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${r}`));e=n.length?e.concat(n.filter((e=>!!e))):e}}return e}),o)};Object.entries(t).forEach((([t,s])=>{if(null!=s){const n=t.match(/^on(.+)/);n?e.addEventListener(n[1].toLowerCase(),s):"p-bind"===t?J(e,s):(s="class"===t?[...new Set(r("class",s))].join(" ").trim():"style"===t?r("style",s).join(";").trim():s,(e.$attrs=e.$attrs||{})&&(e.$attrs[t]=s),e.setAttribute(t,s))}}))}}function Q(e,t={},...r){if(e){const s=document.createElement(e);return J(s,t),s.append(...r),s}}function ee(e,t){if(e){e.style.opacity="0";let r=+new Date,s="0",n=function(){s=""+(+e.style.opacity+((new Date).getTime()-r)/t),e.style.opacity=s,r=+new Date,+s<1&&(window.requestAnimationFrame&&requestAnimationFrame(n)||setTimeout(n,16))};n()}}function te(e,t){return G(e)?e.matches(t)?e:e.querySelector(t):null}function re(e,t){if(G(e)){const r=e.getAttribute(t);return isNaN(r)?"true"===r||"false"===r?"true"===r:r:+r}}function se(e){if(e){let t=e.offsetHeight,r=getComputedStyle(e);return t-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),t}return 0}function ne(e){if(e){let t=e.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function ae(e){if(e){let t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}function oe(e,t){if(e){return e.offsetHeight}return 0}function ie(e,t=[]){const r=ne(e);return null===r?t:ie(r,t.concat([r]))}function le(e){let t=[];if(e){let r=ie(e);const s=/(auto|scroll)/,n=e=>{try{let t=window.getComputedStyle(e,null);return s.test(t.getPropertyValue("overflow"))||s.test(t.getPropertyValue("overflowX"))||s.test(t.getPropertyValue("overflowY"))}catch(t){return!1}};for(let e of r){let r=1===e.nodeType&&e.dataset.scrollselectors;if(r){let s=r.split(",");for(let r of s){let s=te(e,r);s&&n(s)&&t.push(s)}}9!==e.nodeType&&n(e)&&t.push(e)}}return t}function ce(e){return!(null==e||!e.nodeName||!ne(e))}function ue(e){if(e){let t=e.offsetWidth,r=getComputedStyle(e);return t-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),t}return 0}function de(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function me(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function he(e,t="",r){G(e)&&null!=r&&e.setAttribute(t,r)}var pe={};function fe(e="pui_id_"){return pe.hasOwnProperty(e)||(pe[e]=0),pe[e]++,`${e}${pe[e]}`}var ge=function(){let e=[];const t=(t,r,s=0)=>[...e].reverse().find((e=>!0))||{key:t,value:s},r=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:r,set:(r,s,n)=>{s&&(s.style.zIndex=String(((r,s,n=999)=>{const a=t(r,s,n),o=a.value+(a.key===r?0:n)+1;return e.push({key:r,value:o}),o})(r,!0,n)))},clear:t=>{var s;t&&(s=r(t),e=e.filter((e=>e.value!==s)),t.style.zIndex="")},getCurrent:e=>(e=>t(e).value)(e)}}();export{U as A,oe as B,ae as C,K as D,$ as E,re as F,ee as G,me as H,X as I,Y as J,q as K,B as L,ge as Z,he as a,de as b,I as c,W as d,o as e,te as f,le as g,i as h,ce as i,T as j,m as k,u as l,y as m,h as n,a as o,l as p,v as q,c as r,J as s,d as t,fe as u,g as v,Q as w,Z as x,se as y,ue as z}; diff --git a/web_version/v2/assets/primevue-BSs2m5Wu.js b/web_version/v2/assets/primevue-BSs2m5Wu.js new file mode 100644 index 0000000..aaf7c2e --- /dev/null +++ b/web_version/v2/assets/primevue-BSs2m5Wu.js @@ -0,0 +1 @@ +import{s as e,a as t,i as n,b as o,r as i,m as r,c as l,d as a,u as s,g as u,f as c,t as d,e as v,h as p,j as f,k as m,l as h,n as y,o as g,E as b,p as S,q as $,v as P}from"./primeuix-Be3xdh47.js";import{r as O,a as _,g as w,o as T,n as C,w as j,m as N,b as k,c as L,d as x,e as M}from"./vue-DjzFgvDF.js";var D={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(e){return this._loadedStyleNames.has(e)},setLoadedStyleName:function(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName:function(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}};function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function A(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},l=O(!1),a=O(i),s=O(null),u=o()?window.document:void 0,c=r.document,d=void 0===c?u:c,v=r.immediate,p=void 0===v||v,f=r.manual,m=void 0!==f&&f,h=r.name,y=void 0===h?"style_".concat(++U):h,g=r.id,b=void 0===g?void 0:g,S=r.media,$=void 0===S?void 0:S,P=r.nonce,N=void 0===P?void 0:P,k=r.first,L=void 0!==k&&k,x=r.onMounted,M=void 0===x?void 0:x,D=r.onUpdated,V=void 0===D?void 0:D,E=r.onLoad,I=void 0===E?void 0:E,B=r.props,R=void 0===B?{}:B,F=function(){},z=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(d){var r=A(A({},R),o),u=r.name||y,c=r.id||b,v=r.nonce||N;s.value=d.querySelector('style[data-primevue-style-id="'.concat(u,'"]'))||d.getElementById(c)||d.createElement("style"),s.value.isConnected||(a.value=n||i,e(s.value,{type:"text/css",id:c,media:$,nonce:v}),L?d.head.prepend(s.value):d.head.appendChild(s.value),t(s.value,"data-primevue-style-id",u),e(s.value,r),s.value.onload=function(e){return null==I?void 0:I(e,{name:u})},null==M||M(u)),l.value||(F=j(a,(function(e){s.value.textContent=e,null==V||V(u)}),{immediate:!0}),l.value=!0)}};return p&&!m&&function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];w()?T(e):t?e():C(e)}(z),{id:b,name:y,el:s,css:a,unload:function(){d&&l.value&&(F(),n(s.value)&&d.head.removeChild(s.value),l.value=!1)},load:z,isLoaded:_(l)}}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,l,a=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t);else for(;!(s=(o=r.call(n)).done)&&(a.push(o.value),a.length!==t);s=!0);}catch(c){u=!0,i=c}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e})(i(e,{dt:a}));return n?B(r(n),Y({name:this.name},t)):{}},loadCSS:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.load(this.css,e)},loadTheme:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.load(this.theme,t,(function(n){return l.transformCSS(t.name||e.name,n)}))},getCommonTheme:function(e){return l.getCommon(this.name,e)},getComponentTheme:function(e){return l.getComponent(this.name,e)},getDirectiveTheme:function(e){return l.getDirective(this.name,e)},getPresetTheme:function(e,t,n){return l.getCustomPreset(this.name,e,t,n)},getLayerOrderThemeCSS:function(){return l.getLayerOrderCSS(this.name)},getStyleSheet:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.css){var n=i(this.css,{dt:a}),o=r("".concat(n).concat(e)),l=Object.entries(t).reduce((function(e,t){var n=F(t,2),o=n[0],i=n[1];return e.push("".concat(o,'="').concat(i,'"'))&&e}),[]).join(" ");return'")}return""},getCommonThemeStyleSheet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.getCommonStyleSheet(this.name,e,t)},getThemeStyleSheet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[l.getStyleSheet(this.name,e,t)];if(this.theme){var o="base"===this.name?"global-style":"".concat(this.name,"-style"),s=i(this.theme,{dt:a}),u=r(l.transformCSS(o,s)),c=Object.entries(t).reduce((function(e,t){var n=F(t,2),o=n[0],i=n[1];return e.push("".concat(o,'="').concat(i,'"'))&&e}),[]).join(" ");n.push('"))}return n.join("")},extend:function(e){return Y(Y({},this),{},{css:void 0,theme:void 0},e)}};function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t,n){return t&&function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this.listener=n}),[{key:"bindScrollListener",value:function(){this.scrollableParents=u(this.element);for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"pv_id_")}var X=q.extend({name:"common"});function ee(e){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function te(e){return le(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ie(e)||oe()}function ne(e,t){return le(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,l,a=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(a.push(o.value),a.length!==t);s=!0);}catch(c){u=!0,i=c}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return a}}(e,t)||ie(e,t)||oe()}function oe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ie(e,t){if(e){if("string"==typeof e)return re(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(e,t):void 0}}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:function(){};D.clearLoadedStyleNames(),f.on("theme:change",e)},_getHostInstance:function(e){return e?this.$options.hostName?e.$.type.name===this.$options.hostName?e:this._getHostInstance(e.$parentInstance):e.$parentInstance:void 0},_getPropValue:function(e){var t;return this[e]||(null===(t=this._getHostInstance(this))||void 0===t?void 0:t[e])},_getOptionValue:function(e){return m(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})},_getPTValue:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=/./g.test(n)&&!!o[n.split(".")[0]],l=this._getPropValue("ptOptions")||(null===(e=this.$primevueConfig)||void 0===e?void 0:e.ptOptions)||{},a=l.mergeSections,s=void 0===a||a,u=l.mergeProps,c=void 0!==u&&u,d=i?r?this._useGlobalPT(this._getPTClassValue,n,o):this._useDefaultPT(this._getPTClassValue,n,o):void 0,v=r?void 0:this._getPTSelf(t,this._getPTClassValue,n,se(se({},o),{},{global:d||{}})),p=this._getPTDatasets(n);return s||!s&&v?c?this._mergeProps(c,d,v,p):se(se(se({},d),v),p):se(se({},v),p)},_getPTSelf:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:"",o="data-pc-",i="root"===n&&p(null===(e=this.pt)||void 0===e?void 0:e["data-pc-section"]);return"transition"!==n&&se(se({},"root"===n&&se(ue({},"".concat(o,"name"),d(i?null===(t=this.pt)||void 0===t?void 0:t["data-pc-section"]:this.$.type.name)),i&&ue({},"".concat(o,"extend"),d(this.$.type.name)))),{},ue({},"".concat(o,"section"),d(n)))},_getPTClassValue:function(){var e=this._getOptionValue.apply(this,arguments);return h(e)||y(e)?{class:e}:e},_getPT:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0,i=function(e){var i,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=o?o(e):e,a=d(n),s=d(t.$name);return null!==(i=r?a!==s?null==l?void 0:l[a]:void 0:null==l?void 0:l[a])&&void 0!==i?i:l};return null!=e&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:i(e.originalValue),value:i(e.value)}:i(e,!0)},_usePT:function(e,t,n,o){var i=function(e){return t(e,n,o)};if(null!=e&&e.hasOwnProperty("_usept")){var r,l=e._usept||(null===(r=this.$primevueConfig)||void 0===r?void 0:r.ptOptions)||{},a=l.mergeSections,s=void 0===a||a,u=l.mergeProps,c=void 0!==u&&u,d=i(e.originalValue),v=i(e.value);if(void 0===d&&void 0===v)return;return h(v)?v:h(d)?d:s||!s&&v?c?this._mergeProps(c,d,v):se(se({},d),v):v}return i(e)},_useGlobalPT:function(e,t,n){return this._usePT(this.globalPT,e,t,n)},_useDefaultPT:function(e,t,n){return this._usePT(this.defaultPT,e,t,n)},ptm:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._getPTValue(this.pt,e,se(se({},this.$params),t))},ptmi:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return N(this.$_attrsWithoutPT,this.ptm(e,t))},ptmo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._getPTValue(e,t,se({instance:this},n),!1)},cx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,e,se(se({},this.$params),t))},sx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var n=this._getOptionValue(this.$style.inlineStyles,e,se(se({},this.$params),t));return[this._getOptionValue(X.inlineStyles,e,se(se({},this.$params),t)),n]}}},computed:{globalPT:function(){var e,t=this;return this._getPT(null===(e=this.$primevueConfig)||void 0===e?void 0:e.pt,void 0,(function(e){return i(e,{instance:t})}))},defaultPT:function(){var e,t=this;return this._getPT(null===(e=this.$primevueConfig)||void 0===e?void 0:e.pt,void 0,(function(e){return t._getOptionValue(e,t.$name,se({},t.$params))||i(e,se({},t.$params))}))},isUnstyled:function(){var e;return void 0!==this.unstyled?this.unstyled:null===(e=this.$primevueConfig)||void 0===e?void 0:e.unstyled},$theme:function(){var e;return null===(e=this.$primevueConfig)||void 0===e?void 0:e.theme},$style:function(){return se(se({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadTheme:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$styleOptions:function(){var e;return{nonce:null===(e=this.$primevueConfig)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce}},$primevueConfig:function(){var e;return null===(e=this.$primevue)||void 0===e?void 0:e.config},$name:function(){return this.$options.hostName||this.$.type.name},$params:function(){var e=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:e,props:null==e?void 0:e.$props,state:null==e?void 0:e.$data,attrs:null==e?void 0:e.$attrs}}},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter((function(e){var t=ne(e,1)[0];return null==t?void 0:t.startsWith("pt:")})).reduce((function(e,t){var n=ne(t,2),o=n[0],i=n[1],r=te(o.split(":")).slice(1);return null==r||r.reduce((function(e,t,n,o){return!e[t]&&(e[t]=n===o.length-1?i:{}),e[t]}),e),e}),{})},$_attrsWithoutPT:function(){return Object.entries(this.$attrs||{}).filter((function(e){var t=ne(e,1)[0];return!(null!=t&&t.startsWith("pt:"))})).reduce((function(e,t){var n=ne(t,2),o=n[0],i=n[1];return e[o]=i,e}),{})},$attrSelector:function(){return Q("pc")}}},de=q.extend({name:"baseicon",css:"\n.p-icon {\n display: inline-block;\n vertical-align: baseline;\n}\n\n.p-icon-spin {\n -webkit-animation: p-icon-spin 2s infinite linear;\n animation: p-icon-spin 2s infinite linear;\n}\n\n@-webkit-keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n@keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n"});function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(){var e=we._getOptionValue.apply(we,arguments);return h(e)||y(e)?{class:e}:e},s=(null===(e=n.binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.ptOptions)||(null===(t=n.$primevueConfig)||void 0===t?void 0:t.ptOptions)||{},u=s.mergeSections,c=void 0===u||u,d=s.mergeProps,v=void 0!==d&&d,p=l?we._useDefaultPT(n,n.defaultPT(),a,i,r):void 0,f=we._usePT(n,we._getPT(o,n.$name),a,i,Oe(Oe({},r),{},{global:p||{}})),m=we._getPTDatasets(n,i);return c||!c&&f?v?we._mergeProps(n,v,p,f,m):Oe(Oe(Oe({},p),f),m):Oe(Oe({},f),m)},_getPTDatasets:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="data-pc-";return Oe(Oe({},"root"===t&&_e({},"".concat(n,"name"),d(e.$name))),{},_e({},"".concat(n,"section"),d(t)))},_getPT:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=function(e){var o,i=n?n(e):e,r=d(t);return null!==(o=null==i?void 0:i[r])&&void 0!==o?o:i};return null!=e&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:o(e.originalValue),value:o(e.value)}:o(e)},_usePT:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=function(e){return n(e,o,i)};if(null!=t&&t.hasOwnProperty("_usept")){var l,a=t._usept||(null===(l=e.$primevueConfig)||void 0===l?void 0:l.ptOptions)||{},s=a.mergeSections,u=void 0===s||s,c=a.mergeProps,d=void 0!==c&&c,v=r(t.originalValue),p=r(t.value);if(void 0===v&&void 0===p)return;return h(p)?p:h(v)?v:u||!u&&p?d?we._mergeProps(e,d,v,p):Oe(Oe({},v),p):p}return r(t)},_useDefaultPT:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return we._usePT(e,t,n,o,i)},_loadStyles:function(e,t,n){var o,i=we._getConfig(t,n),r={nonce:null==i||null===(o=i.csp)||void 0===o?void 0:o.nonce};we._loadCoreStyles(e.$instance,r),we._loadThemeStyles(e.$instance,r),we._loadScopedThemeStyles(e.$instance,r),we._themeChangeListener((function(){return we._loadThemeStyles(e.$instance,r)}))},_loadCoreStyles:function(){var e,t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;!D.isStyleNameLoaded(null===(e=o.$style)||void 0===e?void 0:e.name)&&null!==(t=o.$style)&&void 0!==t&&t.name&&(q.loadCSS(i),o.isUnstyled()&&(null===(n=o.$style)||void 0===n||n.loadCSS(i)),D.setLoadedStyleName(o.$style.name))},_loadThemeStyles:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(null==n||!n.isUnstyled()){if(!l.isStyleNameLoaded("common")){var i,r,a=(null===(i=n.$style)||void 0===i||null===(r=i.getCommonTheme)||void 0===r?void 0:r.call(i))||{},s=a.primitive,u=a.semantic;q.load(null==s?void 0:s.css,Oe({name:"primitive-variables"},o)),q.load(null==u?void 0:u.css,Oe({name:"semantic-variables"},o)),q.loadTheme(Oe({name:"global-style"},o)),l.setLoadedStyleName("common")}if(!l.isStyleNameLoaded(null===(e=n.$style)||void 0===e?void 0:e.name)&&null!==(t=n.$style)&&void 0!==t&&t.name){var c,d,v,p,f=((null===(c=n.$style)||void 0===c||null===(d=c.getDirectiveTheme)||void 0===d?void 0:d.call(c))||{}).css;null===(v=n.$style)||void 0===v||v.load(f,Oe({name:"".concat(n.$style.name,"-variables")},o)),null===(p=n.$style)||void 0===p||p.loadTheme(Oe({name:"".concat(n.$style.name,"-style")},o)),l.setLoadedStyleName(n.$style.name)}if(!l.isStyleNameLoaded("layer-order")){var m,h,y=null===(m=n.$style)||void 0===m||null===(h=m.getLayerOrderThemeCSS)||void 0===h?void 0:h.call(m);q.load(y,Oe({name:"layer-order",first:!0},o)),l.setLoadedStyleName("layer-order")}}},_loadScopedThemeStyles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.preset();if(n&&e.$attrSelector){var o,i,r,l=((null===(o=e.$style)||void 0===o||null===(i=o.getPresetTheme)||void 0===i?void 0:i.call(o,n,"[".concat(e.$attrSelector,"]")))||{}).css,a=null===(r=e.$style)||void 0===r?void 0:r.load(l,Oe({name:"".concat(e.$attrSelector,"-").concat(e.$style.name)},t));e.scopedStyleEl=a.el}},_themeChangeListener:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};D.clearLoadedStyleNames(),f.on("theme:change",e)},_hook:function(e,t,n,o,i,r){var l,a,s="on".concat($(t)),u=we._getConfig(o,i),c=null==n?void 0:n.$instance,d=we._usePT(c,we._getPT(null==o||null===(l=o.value)||void 0===l?void 0:l.pt,e),we._getOptionValue,"hooks.".concat(s)),v=we._useDefaultPT(c,null==u||null===(a=u.pt)||void 0===a||null===(a=a.directives)||void 0===a?void 0:a[e],we._getOptionValue,"hooks.".concat(s)),p={el:n,binding:o,vnode:i,prevVnode:r};null==d||d(c,p),null==v||v(c,p)},_mergeProps:function(){for(var e=arguments.length>1?arguments[1]:void 0,t=arguments.length,n=new Array(t>2?t-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{},n=function(n,o,i,r,l){var a,s,u;o._$instances=o._$instances||{};var c=we._getConfig(i,r),d=o._$instances[e]||{},v=g(d)?Oe(Oe({},t),null==t?void 0:t.methods):{};o._$instances[e]=Oe(Oe({},d),{},{$name:e,$host:o,$binding:i,$modifiers:null==i?void 0:i.modifiers,$value:null==i?void 0:i.value,$el:d.$el||o||void 0,$style:Oe({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadTheme:function(){}},null==t?void 0:t.style),$primevueConfig:c,$attrSelector:o.$attrSelector,defaultPT:function(){return we._getPT(null==c?void 0:c.pt,void 0,(function(t){var n;return null==t||null===(n=t.directives)||void 0===n?void 0:n[e]}))},isUnstyled:function(){var e,t;return void 0!==(null===(e=o.$instance)||void 0===e||null===(e=e.$binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.unstyled)?null===(t=o.$instance)||void 0===t||null===(t=t.$binding)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.unstyled:null==c?void 0:c.unstyled},theme:function(){var e;return null===(e=o.$instance)||void 0===e||null===(e=e.$primevueConfig)||void 0===e?void 0:e.theme},preset:function(){var e;return null===(e=o.$instance)||void 0===e||null===(e=e.$binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.dt},ptm:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return we._getPTValue(o.$instance,null===(e=o.$instance)||void 0===e||null===(e=e.$binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.pt,t,Oe({},n))},ptmo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return we._getPTValue(o.$instance,e,t,n,!1)},cx:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!==(e=o.$instance)&&void 0!==e&&e.isUnstyled()?void 0:we._getOptionValue(null===(t=o.$instance)||void 0===t||null===(t=t.$style)||void 0===t?void 0:t.classes,n,Oe({},i))},sx:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?we._getOptionValue(null===(e=o.$instance)||void 0===e||null===(e=e.$style)||void 0===e?void 0:e.inlineStyles,t,Oe({},n)):void 0}},v),o.$instance=o._$instances[e],null===(a=(s=o.$instance)[n])||void 0===a||a.call(s,o,i,r,l),o["$".concat(e)]=o.$instance,we._hook(e,n,o,i,r,l),o.$pd||(o.$pd={}),o.$pd[e]=Oe(Oe({},null===(u=o.$pd)||void 0===u?void 0:u[e]),{},{name:e,instance:o.$instance})};return{created:function(e,t,o,i){n("created",e,t,o,i)},beforeMount:function(e,t,o,i){e.$attrSelector=Q("pd"),we._loadStyles(e,t,o),n("beforeMount",e,t,o,i),function(e){var t,n,o,i,r,l=null===(t=e.$instance)||void 0===t?void 0:t.watch;null==l||null===(n=l.config)||void 0===n||n.call(e.$instance,null===(o=e.$instance)||void 0===o?void 0:o.$primevueConfig),ge.on("config:change",(function(t){var n,o=t.newValue,i=t.oldValue;return null==l||null===(n=l.config)||void 0===n?void 0:n.call(e.$instance,o,i)})),null==l||null===(i=l["config.ripple"])||void 0===i||i.call(e.$instance,null===(r=e.$instance)||void 0===r||null===(r=r.$primevueConfig)||void 0===r?void 0:r.ripple),ge.on("config:ripple:change",(function(t){var n,o=t.newValue,i=t.oldValue;return null==l||null===(n=l["config.ripple"])||void 0===n?void 0:n.call(e.$instance,o,i)}))}(e)},mounted:function(e,t,o,i){we._loadStyles(e,t,o),n("mounted",e,t,o,i)},beforeUpdate:function(e,t,o,i){n("beforeUpdate",e,t,o,i)},updated:function(e,t,o,i){we._loadStyles(e,t,o),n("updated",e,t,o,i)},beforeUnmount:function(e,t,o,i){n("beforeUnmount",e,t,o,i)},unmounted:function(e,t,o,i){var r;null===(r=e.$instance)||void 0===r||null===(r=r.scopedStyleEl)||void 0===r||null===(r=r.value)||void 0===r||r.remove(),n("unmounted",e,t,o,i)}}},extend:function(){var e=Se(we._getMeta.apply(we,arguments),2),t=e[0],n=e[1];return Oe({extend:function(){var e=Se(we._getMeta.apply(we,arguments),2),t=e[0],o=e[1];return we.extend(t,Oe(Oe(Oe({},n),null==n?void 0:n.methods),o))}},we._extend(t,n))}},Te="equals",Ce="notEquals";function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ke(e){for(var t=1;tet=t,ct=Symbol();function at(t){return t&&"object"==typeof t&&"[object Object]"===Object.prototype.toString.call(t)&&"function"!=typeof t.toJSON}var it,lt;function ut(){const e=t(!0),r=e.run((()=>n({})));let c=[],a=[];const i=o({install(t){rt(i),i._a=t,t.provide(ct,i),t.config.globalProperties.$pinia=i,a.forEach((t=>c.push(t))),a=[]},use(t){return this._a?c.push(t):a.push(t),this},_p:c,_a:null,_e:e,_s:new Map,state:r});return i}(lt=it||(it={})).direct="direct",lt.patchObject="patch object",lt.patchFunction="patch function";const st=()=>{};function dt(t,n,o,e=st){t.push(n);const r=()=>{const o=t.indexOf(n);o>-1&&(t.splice(o,1),e())};return!o&&l()&&u(r),r}function pt(t,...n){t.slice().forEach((t=>{t(...n)}))}const bt=t=>t(),ft=Symbol(),ht=Symbol();function gt(t,n){t instanceof Map&&n instanceof Map?n.forEach(((n,o)=>t.set(o,n))):t instanceof Set&&n instanceof Set&&n.forEach(t.add,t);for(const o in n){if(!n.hasOwnProperty(o))continue;const e=n[o],r=t[o];at(r)&&at(e)&&t.hasOwnProperty(o)&&!c(e)&&!a(e)?t[o]=gt(r,e):t[o]=e}return t}const vt=Symbol();const{assign:yt}=Object;function mt(o,l,u={},d,p,b){let f;const h=yt({actions:{}},u),g={deep:!0};let v,y,m,x=[],k=[];const w=d.state.value[o];let _;function j(t){let n;v=y=!1,"function"==typeof t?(t(d.state.value[o]),n={type:it.patchFunction,storeId:o,events:m}):(gt(d.state.value[o],t),n={type:it.patchObject,payload:t,storeId:o,events:m});const e=_=Symbol();s().then((()=>{_===e&&(v=!0)})),y=!0,pt(x,n,d.state.value[o])}b||w||(d.state.value[o]={}),n({});const $=b?function(){const{state:t}=u,n=t?t():{};this.$patch((t=>{yt(t,n)}))}:st;const O=(t,n="")=>{if(ft in t)return t[ht]=n,t;const e=function(){rt(d);const n=Array.from(arguments),r=[],c=[];let a;pt(k,{args:n,name:e[ht],store:A,after:function(t){r.push(t)},onError:function(t){c.push(t)}});try{a=t.apply(this&&this.$id===o?this:A,n)}catch(i){throw pt(c,i),i}return a instanceof Promise?a.then((t=>(pt(r,t),t))).catch((t=>(pt(c,t),Promise.reject(t)))):(pt(r,a),a)};return e[ft]=!0,e[ht]=n,e},S={_p:d,$id:o,$onAction:dt.bind(null,k),$patch:j,$reset:$,$subscribe(t,n={}){const r=dt(x,t,n.detached,(()=>c())),c=f.run((()=>e((()=>d.state.value[o]),(e=>{("sync"===n.flush?y:v)&&t({storeId:o,type:it.direct,events:m},e)}),yt({},g,n))));return r},$dispose:function(){f.stop(),x=[],k=[],d._s.delete(o)}},A=r(S);d._s.set(o,A);const E=(d._a&&d._a.runWithContext||bt)((()=>d._e.run((()=>(f=t()).run((()=>l({action:O})))))));for(const t in E){const n=E[t];if(c(n)&&(!c(I=n)||!I.effect)||a(n))b||(!w||at(T=n)&&T.hasOwnProperty(vt)||(c(n)?n.value=w[t]:gt(n,w[t])),d.state.value[o][t]=n);else if("function"==typeof n){const o=O(n,t);E[t]=o,h.actions[t]=n}}var T,I;return yt(A,E),yt(i(A),E),Object.defineProperty(A,"$state",{get:()=>d.state.value[o],set:t=>{j((n=>{yt(n,t)}))}}),d._p.forEach((t=>{yt(A,f.run((()=>t({store:A,app:d._a,pinia:d,options:h}))))})),w&&b&&u.hydrate&&u.hydrate(A.$state,w),v=!0,y=!0,A}function xt(t,n,e){let r,c;const a="function"==typeof n;function i(t,e){const i=f();(t=t||(i?d(ct,null):null))&&rt(t),(t=et)._s.has(r)||(a?mt(r,n,c,t):function(t,n,e){const{state:r,actions:c,getters:a}=n,i=e.state.value[t];let l;l=mt(t,(function(){i||(e.state.value[t]=r?r():{});const n=p(e.state.value[t]);return yt(n,c,Object.keys(a||{}).reduce(((n,r)=>(n[r]=o(b((()=>{rt(e);const n=e._s.get(t);return a[r].call(n,n)}))),n)),{}))}),n,e,0,!0)}(r,c,t));return t._s.get(r)}return"string"==typeof t?(r=t,c=a?e:n):(c=t,r=t.id),i.$id=r,i}function kt(t){{t=i(t);const n={};for(const o in t){const e=t[o];(c(e)||a(e))&&(n[o]=h(t,o))}return n}}var wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jt=function(){this.__data__=[],this.size=0};var $t=function(t,n){return t===n||t!=t&&n!=n},Ot=$t;var St=function(t,n){for(var o=t.length;o--;)if(Ot(t[o][0],n))return o;return-1},At=St,Et=Array.prototype.splice;var Tt=St;var It=St;var zt=St;var Bt=jt,Ct=function(t){var n=this.__data__,o=At(n,t);return!(o<0)&&(o==n.length-1?n.pop():Et.call(n,o,1),--this.size,!0)},Lt=function(t){var n=this.__data__,o=Tt(n,t);return o<0?void 0:n[o][1]},Pt=function(t){return It(this.__data__,t)>-1},Mt=function(t,n){var o=this.__data__,e=zt(o,t);return e<0?(++this.size,o.push([t,n])):o[e][1]=n,this};function Dt(t){var n=-1,o=null==t?0:t.length;for(this.clear();++n-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},oe=an,ee=ne,re=Bo,ce={};ce["[object Float32Array]"]=ce["[object Float64Array]"]=ce["[object Int8Array]"]=ce["[object Int16Array]"]=ce["[object Int32Array]"]=ce["[object Uint8Array]"]=ce["[object Uint8ClampedArray]"]=ce["[object Uint16Array]"]=ce["[object Uint32Array]"]=!0,ce["[object Arguments]"]=ce["[object Array]"]=ce["[object ArrayBuffer]"]=ce["[object Boolean]"]=ce["[object DataView]"]=ce["[object Date]"]=ce["[object Error]"]=ce["[object Function]"]=ce["[object Map]"]=ce["[object Number]"]=ce["[object Object]"]=ce["[object RegExp]"]=ce["[object Set]"]=ce["[object String]"]=ce["[object WeakMap]"]=!1;var ae=function(t){return re(t)&&ee(t.length)&&!!ce[oe(t)]};var ie=function(t){return function(n){return t(n)}},le={exports:{}};!function(t,n){var o=Nt,e=n&&!n.nodeType&&n,r=e&&t&&!t.nodeType&&t,c=r&&r.exports===e&&o.process,a=function(){try{var t=r&&r.require&&r.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(n){}}();t.exports=a}(le,le.exports);var ue=le.exports,se=ae,de=ie,pe=ue&&ue.isTypedArray,be=pe?de(pe):se,fe=zo,he=Zo,ge=Jo,ve=Yo,ye=te,me=be,xe=Object.prototype.hasOwnProperty;var ke=function(t,n){var o=ge(t),e=!o&&he(t),r=!o&&!e&&ve(t),c=!o&&!e&&!r&&me(t),a=o||e||r||c,i=a?fe(t.length,String):[],l=i.length;for(var u in t)!n&&!xe.call(t,u)||a&&("length"==u||r&&("offset"==u||"parent"==u)||c&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ye(u,l))||i.push(u);return i},we=Object.prototype;var _e=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||we)};var je=function(t,n){return function(o){return t(n(o))}},$e=je(Object.keys,Object),Oe=_e,Se=$e,Ae=Object.prototype.hasOwnProperty;var Ee=pn,Te=ne;var Ie=function(t){return null!=t&&Te(t.length)&&!Ee(t)},ze=ke,Be=function(t){if(!Oe(t))return Se(t);var n=[];for(var o in Object(t))Ae.call(t,o)&&"constructor"!=o&&n.push(o);return n},Ce=Ie;var Le=function(t){return Ce(t)?ze(t):Be(t)},Pe=Io,Me=Le;var De=function(t,n){return t&&Pe(n,Me(n),t)};var He=ln,Fe=_e,Ue=function(t){var n=[];if(null!=t)for(var o in Object(t))n.push(o);return n},Ke=Object.prototype.hasOwnProperty;var Ve=ke,Re=function(t){if(!He(t))return Ue(t);var n=Fe(t),o=[];for(var e in t)("constructor"!=e||!n&&Ke.call(t,e))&&o.push(e);return o},Ne=Ie;var Ge=function(t){return Ne(t)?Ve(t,!0):Re(t)},We=Io,qe=Ge;var Ze=function(t,n){return t&&We(n,qe(n),t)},Je={exports:{}};!function(t,n){var o=qt,e=n&&!n.nodeType&&n,r=e&&t&&!t.nodeType&&t,c=r&&r.exports===e?o.Buffer:void 0,a=c?c.allocUnsafe:void 0;t.exports=function(t,n){if(n)return t.slice();var o=t.length,e=a?a(o):new t.constructor(o);return t.copy(e),e}}(Je,Je.exports);var Xe=Je.exports;var Ye=function(t,n){var o=-1,e=t.length;for(n||(n=Array(e));++o0;function ca(t,n,o,e){t.addEventListener?t.addEventListener(n,o,e):t.attachEvent&&t.attachEvent("on".concat(n),o)}function aa(t,n,o,e){t.removeEventListener?t.removeEventListener(n,o,e):t.detachEvent&&t.detachEvent("on".concat(n),o)}function ia(t,n){const o=n.slice(0,n.length-1);for(let e=0;e=0;)n[o-1]+=",",n.splice(o,1),o=n.lastIndexOf("");return n}const ua={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ra?173:189,"=":ra?61:187,";":ra?59:186,"'":222,"[":219,"]":221,"\\":220},sa={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},da={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},pa={16:!1,18:!1,17:!1,91:!1},ba={};for(let Ya=1;Ya<20;Ya++)ua["f".concat(Ya)]=111+Ya;let fa=[],ha=null,ga="all";const va=new Map,ya=t=>ua[t.toLowerCase()]||sa[t.toLowerCase()]||t.toUpperCase().charCodeAt(0);function ma(t){ga=t||"all"}function xa(){return ga||"all"}function ka(t){if(void 0===t)Object.keys(ba).forEach((t=>{Array.isArray(ba[t])&&ba[t].forEach((t=>wa(t))),delete ba[t]})),Oa(null);else if(Array.isArray(t))t.forEach((t=>{t.key&&wa(t)}));else if("object"==typeof t)t.key&&wa(t);else if("string"==typeof t){for(var n=arguments.length,o=new Array(n>1?n-1:0),e=1;e{let{key:n,scope:o,method:e,splitKey:r="+"}=t;la(n).forEach((t=>{const n=t.split(r),c=n.length,a=n[c-1],i="*"===a?"*":ya(a);if(!ba[i])return;o||(o=xa());const l=c>1?ia(sa,n):[],u=[];ba[i]=ba[i].filter((t=>{const n=(!e||t.method===e)&&t.scope===o&&function(t,n){const o=t.length>=n.length?t:n,e=t.length>=n.length?n:t;let r=!0;for(let c=0;cOa(t)))}))};function _a(t,n,o,e){if(n.element!==e)return;let r;if(n.scope===o||"all"===n.scope){r=n.mods.length>0;for(const t in pa)Object.prototype.hasOwnProperty.call(pa,t)&&(!pa[t]&&n.mods.indexOf(+t)>-1||pa[t]&&-1===n.mods.indexOf(+t))&&(r=!1);(0!==n.mods.length||pa[16]||pa[18]||pa[17]||pa[91])&&!r&&"*"!==n.shortcut||(n.keys=[],n.keys=n.keys.concat(fa),!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function ja(t,n){const o=ba["*"];let e=t.keyCode||t.which||t.charCode;if(!$a.filter.call(this,t))return;if(93!==e&&224!==e||(e=91),-1===fa.indexOf(e)&&229!==e&&fa.push(e),["ctrlKey","altKey","shiftKey","metaKey"].forEach((n=>{const o=da[n];t[n]&&-1===fa.indexOf(o)?fa.push(o):!t[n]&&fa.indexOf(o)>-1?fa.splice(fa.indexOf(o),1):"metaKey"===n&&t[n]&&3===fa.length&&(t.ctrlKey||t.shiftKey||t.altKey||(fa=fa.slice(fa.indexOf(o))))})),e in pa){pa[e]=!0;for(const t in sa)sa[t]===e&&($a[t]=!0);if(!o)return}for(const i in pa)Object.prototype.hasOwnProperty.call(pa,i)&&(pa[i]=t[da[i]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===fa.indexOf(17)&&fa.push(17),-1===fa.indexOf(18)&&fa.push(18),pa[17]=!0,pa[18]=!0);const r=xa();if(o)for(let i=0;i1&&(r=ia(sa,t)),(t="*"===(t=t[t.length-1])?"*":ya(t))in ba||(ba[t]=[]),ba[t].push({keyup:l,keydown:u,scope:c,mods:r,shortcut:e[i],method:o,key:e[i],splitKey:s,element:a});if(void 0!==a&&window){if(!va.has(a)){const t=function(){return ja(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,a)},n=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;ja(t,a),function(t){let n=t.keyCode||t.which||t.charCode;const o=fa.indexOf(n);if(o>=0&&fa.splice(o,1),t.key&&"meta"===t.key.toLowerCase()&&fa.splice(0,fa.length),93!==n&&224!==n||(n=91),n in pa){pa[n]=!1;for(const t in sa)sa[t]===n&&($a[t]=!1)}}(t)};va.set(a,{keydownListener:t,keyupListenr:n,capture:d}),ca(a,"keydown",t,d),ca(a,"keyup",n,d)}if(!ha){const t=()=>{fa=[]};ha={listener:t,capture:d},ca(window,"focus",t,d)}}}function Oa(t){const n=Object.values(ba).flat();if(n.findIndex((n=>{let{element:o}=n;return o===t}))<0){const{keydownListener:n,keyupListenr:o,capture:e}=va.get(t)||{};n&&o&&(aa(t,"keyup",o,e),aa(t,"keydown",n,e),va.delete(t))}if(n.length<=0||va.size<=0){if(Object.keys(va).forEach((t=>{const{keydownListener:n,keyupListenr:o,capture:e}=va.get(t)||{};n&&o&&(aa(t,"keyup",o,e),aa(t,"keydown",n,e),va.delete(t))})),va.clear(),Object.keys(ba).forEach((t=>delete ba[t])),ha){const{listener:t,capture:n}=ha;aa(window,"focus",t,n),ha=null}}}const Sa={getPressedKeyString:function(){return fa.map((t=>{return n=t,Object.keys(ua).find((t=>ua[t]===n))||(t=>Object.keys(sa).find((n=>sa[n]===t)))(t)||String.fromCharCode(t);var n}))},setScope:ma,getScope:xa,deleteScope:function(t,n){let o,e;t||(t=xa());for(const r in ba)if(Object.prototype.hasOwnProperty.call(ba,r))for(o=ba[r],e=0;e{let{element:n}=t;return Oa(n)}))}else e++;xa()===t&&ma(n||"all")},getPressedKeyCodes:function(){return fa.slice(0)},getAllKeyCodes:function(){const t=[];return Object.keys(ba).forEach((n=>{ba[n].forEach((n=>{let{key:o,scope:e,mods:r,shortcut:c}=n;t.push({scope:e,shortcut:c,mods:r,keys:o.split("+").map((t=>ya(t)))})}))})),t},isPressed:function(t){return"string"==typeof t&&(t=ya(t)),-1!==fa.indexOf(t)},filter:function(t){const n=t.target||t.srcElement,{tagName:o}=n;let e=!0;const r="INPUT"===o&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(n.type);return(n.isContentEditable||(r||"TEXTAREA"===o||"SELECT"===o)&&!n.readOnly)&&(e=!1),e},trigger:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(ba).forEach((o=>{ba[o].filter((o=>o.scope===n&&o.shortcut===t)).forEach((t=>{t&&t.method&&t.method()}))}))},unbind:ka,keyMap:ua,modifier:sa,modifierMap:da};for(const Ya in Sa)Object.prototype.hasOwnProperty.call(Sa,Ya)&&($a[Ya]=Sa[Ya]);if("undefined"!=typeof window){const t=window.hotkeys;$a.noConflict=n=>(n&&window.hotkeys===$a&&(window.hotkeys=t),$a),window.hotkeys=$a}var Aa={root:function(t){var n=t.props,o=t.instance;return["p-badge p-component",{"p-badge-circle":I(n.value)&&1===String(n.value).length,"p-badge-dot":z(n.value)&&!o.$slots.default,"p-badge-sm":"small"===n.size,"p-badge-lg":"large"===n.size,"p-badge-xl":"xlarge"===n.size,"p-badge-info":"info"===n.severity,"p-badge-success":"success"===n.severity,"p-badge-warn":"warn"===n.severity,"p-badge-danger":"danger"===n.severity,"p-badge-secondary":"secondary"===n.severity,"p-badge-contrast":"contrast"===n.severity}]}},Ea=X.extend({name:"badge",theme:function(t){var n=t.dt;return"\n.p-badge {\n display: inline-flex;\n border-radius: ".concat(n("badge.border.radius"),";\n align-items: center;\n justify-content: center;\n padding: ").concat(n("badge.padding"),";\n background: ").concat(n("badge.primary.background"),";\n color: ").concat(n("badge.primary.color"),";\n font-size: ").concat(n("badge.font.size"),";\n font-weight: ").concat(n("badge.font.weight"),";\n min-width: ").concat(n("badge.min.width"),";\n height: ").concat(n("badge.height"),";\n}\n\n.p-badge-dot {\n width: ").concat(n("badge.dot.size"),";\n min-width: ").concat(n("badge.dot.size"),";\n height: ").concat(n("badge.dot.size"),";\n border-radius: 50%;\n padding: 0;\n}\n\n.p-badge-circle {\n padding: 0;\n border-radius: 50%;\n}\n\n.p-badge-secondary {\n background: ").concat(n("badge.secondary.background"),";\n color: ").concat(n("badge.secondary.color"),";\n}\n\n.p-badge-success {\n background: ").concat(n("badge.success.background"),";\n color: ").concat(n("badge.success.color"),";\n}\n\n.p-badge-info {\n background: ").concat(n("badge.info.background"),";\n color: ").concat(n("badge.info.color"),";\n}\n\n.p-badge-warn {\n background: ").concat(n("badge.warn.background"),";\n color: ").concat(n("badge.warn.color"),";\n}\n\n.p-badge-danger {\n background: ").concat(n("badge.danger.background"),";\n color: ").concat(n("badge.danger.color"),";\n}\n\n.p-badge-contrast {\n background: ").concat(n("badge.contrast.background"),";\n color: ").concat(n("badge.contrast.color"),";\n}\n\n.p-badge-sm {\n font-size: ").concat(n("badge.sm.font.size"),";\n min-width: ").concat(n("badge.sm.min.width"),";\n height: ").concat(n("badge.sm.height"),";\n}\n\n.p-badge-lg {\n font-size: ").concat(n("badge.lg.font.size"),";\n min-width: ").concat(n("badge.lg.min.width"),";\n height: ").concat(n("badge.lg.height"),";\n}\n\n.p-badge-xl {\n font-size: ").concat(n("badge.xl.font.size"),";\n min-width: ").concat(n("badge.xl.min.width"),";\n height: ").concat(n("badge.xl.height"),";\n}\n")},classes:Aa}),Ta={name:"Badge",extends:{name:"BaseBadge",extends:Y,props:{value:{type:[String,Number],default:null},severity:{type:String,default:null},size:{type:String,default:null}},style:Ea,provide:function(){return{$pcBadge:this,$parentInstance:this}}},inheritAttrs:!1};Ta.render=function(t,n,o,e,r,c){return g(),v("span",k({class:t.cx("root")},t.ptmi("root")),[y(t.$slots,"default",{},(function(){return[m(x(t.value),1)]}))],16)};var Ia=X.extend({name:"ripple-directive",theme:function(t){var n=t.dt;return"\n.p-ink {\n display: block;\n position: absolute;\n background: ".concat(n("ripple.background"),";\n border-radius: 100%;\n transform: scale(0);\n pointer-events: none;\n}\n\n.p-ink-active {\n animation: ripple 0.4s linear;\n}\n\n@keyframes ripple {\n 100% {\n opacity: 0;\n transform: scale(2.5);\n }\n}\n")},classes:{root:"p-ink"}});function za(t){return(za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ba(t){return function(t){if(Array.isArray(t))return Ca(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return Ca(t,n);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Ca(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ca(t,n){(null==n||n>t.length)&&(n=t.length);for(var o=0,e=Array(n);ot.length)&&(n=t.length);for(var o=0,e=Array(n);oi.width||r<0||e<0||e+a>i.height},getTarget:function(t){return J(t,"p-inputwrapper")?q(t,"input"):t},getModifiers:function(t){return t.modifiers&&Object.keys(t.modifiers).length?t.modifiers:t.arg&&"object"===Ga(t.arg)?Object.entries(t.arg).reduce((function(t,n){var o=Va(n,2),e=o[0],r=o[1];return"event"!==e&&"position"!==e||(t[r]=!0),t}),{}):{}}}}),qa={name:"Card",extends:{name:"BaseCard",extends:Y,style:X.extend({name:"card",theme:function(t){var n=t.dt;return"\n.p-card {\n background: ".concat(n("card.background"),";\n color: ").concat(n("card.color"),";\n box-shadow: ").concat(n("card.shadow"),";\n border-radius: ").concat(n("card.border.radius"),";\n display: flex;\n flex-direction: column;\n}\n\n.p-card-caption {\n display: flex;\n flex-direction: column;\n gap: ").concat(n("card.caption.gap"),";\n}\n\n.p-card-body {\n padding: ").concat(n("card.body.padding"),";\n display: flex;\n flex-direction: column;\n gap: ").concat(n("card.body.gap"),";\n}\n\n.p-card-title {\n font-size: ").concat(n("card.title.font.size"),";\n font-weight: ").concat(n("card.title.font.weight"),";\n}\n\n.p-card-subtitle {\n color: ").concat(n("card.subtitle.color"),";\n}\n")},classes:{root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"}}),provide:function(){return{$pcCard:this,$parentInstance:this}}},inheritAttrs:!1};qa.render=function(t,n,o,e,r,c){return g(),v("div",k({class:t.cx("root")},t.ptmi("root")),[t.$slots.header?(g(),v("div",k({key:0,class:t.cx("header")},t.ptm("header")),[y(t.$slots,"header")],16)):A("",!0),E("div",k({class:t.cx("body")},t.ptm("body")),[t.$slots.title||t.$slots.subtitle?(g(),v("div",k({key:0,class:t.cx("caption")},t.ptm("caption")),[t.$slots.title?(g(),v("div",k({key:0,class:t.cx("title")},t.ptm("title")),[y(t.$slots,"title")],16)):A("",!0),t.$slots.subtitle?(g(),v("div",k({key:1,class:t.cx("subtitle")},t.ptm("subtitle")),[y(t.$slots,"subtitle")],16)):A("",!0)],16)):A("",!0),E("div",k({class:t.cx("content")},t.ptm("content")),[y(t.$slots,"content")],16),t.$slots.footer?(g(),v("div",k({key:1,class:t.cx("footer")},t.ptm("footer")),[y(t.$slots,"footer")],16)):A("",!0)],16)],16)};var Za=X.extend({name:"inputtext",theme:function(t){var n=t.dt;return"\n.p-inputtext {\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: ".concat(n("inputtext.color"),";\n background: ").concat(n("inputtext.background"),";\n padding: ").concat(n("inputtext.padding.y")," ").concat(n("inputtext.padding.x"),";\n border: 1px solid ").concat(n("inputtext.border.color"),";\n transition: background ").concat(n("inputtext.transition.duration"),", color ").concat(n("inputtext.transition.duration"),", border-color ").concat(n("inputtext.transition.duration"),", outline-color ").concat(n("inputtext.transition.duration"),", box-shadow ").concat(n("inputtext.transition.duration"),";\n appearance: none;\n border-radius: ").concat(n("inputtext.border.radius"),";\n outline-color: transparent;\n box-shadow: ").concat(n("inputtext.shadow"),";\n}\n\n.p-inputtext:enabled:hover {\n border-color: ").concat(n("inputtext.hover.border.color"),";\n}\n\n.p-inputtext:enabled:focus {\n border-color: ").concat(n("inputtext.focus.border.color"),";\n box-shadow: ").concat(n("inputtext.focus.ring.shadow"),";\n outline: ").concat(n("inputtext.focus.ring.width")," ").concat(n("inputtext.focus.ring.style")," ").concat(n("inputtext.focus.ring.color"),";\n outline-offset: ").concat(n("inputtext.focus.ring.offset"),";\n}\n\n.p-inputtext.p-invalid {\n border-color: ").concat(n("inputtext.invalid.border.color"),";\n}\n\n.p-inputtext.p-variant-filled {\n background: ").concat(n("inputtext.filled.background"),";\n}\n\n.p-inputtext.p-variant-filled:enabled:focus {\n background: ").concat(n("inputtext.filled.focus.background"),";\n}\n\n.p-inputtext:disabled {\n opacity: 1;\n background: ").concat(n("inputtext.disabled.background"),";\n color: ").concat(n("inputtext.disabled.color"),";\n}\n\n.p-inputtext::placeholder {\n color: ").concat(n("inputtext.placeholder.color"),";\n}\n\n.p-inputtext-sm {\n font-size: ").concat(n("inputtext.sm.font.size"),";\n padding: ").concat(n("inputtext.sm.padding.y")," ").concat(n("inputtext.sm.padding.x"),";\n}\n\n.p-inputtext-lg {\n font-size: ").concat(n("inputtext.lg.font.size"),";\n padding: ").concat(n("inputtext.lg.padding.y")," ").concat(n("inputtext.lg.padding.x"),";\n}\n\n.p-inputtext-fluid {\n width: 100%;\n}\n")},classes:{root:function(t){var n=t.instance,o=t.props;return["p-inputtext p-component",{"p-filled":n.filled,"p-inputtext-sm":"small"===o.size,"p-inputtext-lg":"large"===o.size,"p-invalid":o.invalid,"p-variant-filled":o.variant?"filled"===o.variant:"filled"===n.$primevue.config.inputStyle||"filled"===n.$primevue.config.inputVariant,"p-inputtext-fluid":n.hasFluid}]}}}),Ja={name:"InputText",extends:{name:"BaseInputText",extends:Y,props:{modelValue:null,size:{type:String,default:null},invalid:{type:Boolean,default:!1},variant:{type:String,default:null},fluid:{type:Boolean,default:null}},style:Za,provide:function(){return{$pcInputText:this,$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue"],inject:{$pcFluid:{default:null}},methods:{getPTOptions:function(t){return("root"===t?this.ptmi:this.ptm)(t,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(t){this.$emit("update:modelValue",t.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},hasFluid:function(){return z(this.fluid)?!!this.$pcFluid:this.fluid}}},Xa=["value","aria-invalid"];Ja.render=function(t,n,o,e,r,c){return g(),v("input",k({type:"text",class:t.cx("root"),value:t.modelValue,"aria-invalid":t.invalid||void 0,onInput:n[0]||(n[0]=function(){return c.onInput&&c.onInput.apply(c,arguments)})},c.getPTOptions("root")),null,16,Xa)};export{Wa as T,Ua as a,qa as b,ea as c,xt as d,Ja as e,ut as f,$a as h,kt as s}; diff --git a/web_version/v2/assets/vue-DjzFgvDF.js b/web_version/v2/assets/vue-DjzFgvDF.js new file mode 100644 index 0000000..35a6acd --- /dev/null +++ b/web_version/v2/assets/vue-DjzFgvDF.js @@ -0,0 +1,23 @@ +/** +* @vue/shared v3.4.36 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +function e(e,t){const n=new Set(e.split(","));return e=>n.has(e)}const t={},n=[],s=()=>{},r=()=>!1,o=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),i=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,a=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>"[object Map]"===b(e),d=e=>"[object Set]"===b(e),h=e=>"function"==typeof e,v=e=>"string"==typeof e,g=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,m=e=>(_(e)||h(e))&&h(e.then)&&h(e.catch),y=Object.prototype.toString,b=e=>y.call(e),x=e=>b(e).slice(8,-1),w=e=>"[object Object]"===b(e),S=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,C=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),k=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},O=/-(\w)/g,E=k((e=>e.replace(O,((e,t)=>t?t.toUpperCase():"")))),F=/\B([A-Z])/g,M=k((e=>e.replace(F,"-$1").toLowerCase())),P=k((e=>e.charAt(0).toUpperCase()+e.slice(1))),A=k((e=>e?`on${P(e)}`:"")),R=(e,t)=>!Object.is(e,t),j=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},L=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let I;const V=()=>I||(I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function $(e){if(f(e)){const t={};for(let n=0;n{if(e){const n=e.split(U);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function W(e){let t="";if(v(e))t=e;else if(f(e))for(let n=0;n!(!e||!0!==e.__v_isRef),q=e=>v(e)?e:null==e?"":f(e)||_(e)&&(e.toString===y||!h(e.toString))?K(e)?q(e.value):JSON.stringify(e,G,2):String(e),G=(e,t)=>K(t)?G(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],s)=>(e[J(t,s)+" =>"]=n,e)),{})}:d(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>J(e)))}:g(t)?J(t):!_(t)||f(t)||w(t)?t:String(t),J=(e,t="")=>{var n;return g(e)?`Symbol(${null!=(n=e.description)?n:t})`:e}; +/** +* @vue/reactivity v3.4.36 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +let Q,X;class Z{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Q,!e&&Q&&(this.index=(Q.scopes||(Q.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Q;try{return Q=this,e()}finally{Q=t}}}on(){Q=this}off(){Q=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),ae()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=le,t=X;try{return le=!0,X=this,this._runnings++,se(this),this.fn()}finally{re(this),this._runnings--,X=t,le=e}}stop(){this.active&&(se(this),re(this),this.onStop&&this.onStop(),this.active=!1)}}function se(e){e._trackId++,e._depsLength=0}function re(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},_e=new WeakMap,me=Symbol(""),ye=Symbol("");function be(e,t,n){if(le&&X){let t=_e.get(e);t||_e.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=ge((()=>t.delete(n)))),de(X,s)}}function xe(e,t,n,s,r,o){const l=_e.get(e);if(!l)return;let i=[];if("clear"===t)i=[...l.values()];else if("length"===n&&f(e)){const e=Number(s);l.forEach(((t,n)=>{("length"===n||!g(n)&&n>=e)&&i.push(t)}))}else switch(void 0!==n&&i.push(l.get(n)),t){case"add":f(e)?S(n)&&i.push(l.get("length")):(i.push(l.get(me)),p(e)&&i.push(l.get(ye)));break;case"delete":f(e)||(i.push(l.get(me)),p(e)&&i.push(l.get(ye)));break;case"set":p(e)&&i.push(l.get(me))}fe();for(const c of i)c&&ve(c,4);pe()}const we=e("__proto__,__v_isRef,__isVue"),Se=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(g)),Ce=ke();function ke(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=ft(this);for(let t=0,r=this.length;t{e[t]=function(...e){ue(),fe();const n=ft(this)[t].apply(this,e);return pe(),ae(),n}})),e}function Oe(e){g(e)||(e=String(e));const t=ft(this);return be(t,0,e),t.hasOwnProperty(e)}class Ee{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?st:nt:r?tt:et).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=f(e);if(!s){if(o&&a(Ce,t))return Reflect.get(Ce,t,n);if("hasOwnProperty"===t)return Oe}const l=Reflect.get(e,t,n);return(g(t)?Se.has(t):we(t))?l:(s||be(e,0,t),r?l:mt(l)?o&&S(t)?l:l.value:_(l)?s?ot(l):rt(l):l)}}class Fe extends Ee{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=ct(r);if(ut(n)||ct(n)||(r=ft(r),n=ft(n)),!f(e)&&mt(r)&&!mt(n))return!t&&(r.value=n,!0)}const o=f(e)&&S(t)?Number(t)e,Te=e=>Reflect.getPrototypeOf(e);function Le(e,t,n=!1,s=!1){const r=ft(e=e.__v_raw),o=ft(t);n||(R(t,o)&&be(r,0,t),be(r,0,o));const{has:l}=Te(r),i=s?je:n?ht:dt;return l.call(r,t)?i(e.get(t)):l.call(r,o)?i(e.get(o)):void(e!==r&&e.get(t))}function Ie(e,t=!1){const n=this.__v_raw,s=ft(n),r=ft(e);return t||(R(e,r)&&be(s,0,e),be(s,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function Ve(e,t=!1){return e=e.__v_raw,!t&&be(ft(e),0,me),Reflect.get(e,"size",e)}function $e(e,t=!1){t||ut(e)||ct(e)||(e=ft(e));const n=ft(this);return Te(n).has.call(n,e)||(n.add(e),xe(n,"add",e,e)),this}function Ne(e,t,n=!1){n||ut(t)||ct(t)||(t=ft(t));const s=ft(this),{has:r,get:o}=Te(s);let l=r.call(s,e);l||(e=ft(e),l=r.call(s,e));const i=o.call(s,e);return s.set(e,t),l?R(t,i)&&xe(s,"set",e,t):xe(s,"add",e,t),this}function Ue(e){const t=ft(this),{has:n,get:s}=Te(t);let r=n.call(t,e);r||(e=ft(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&xe(t,"delete",e,void 0),o}function De(){const e=ft(this),t=0!==e.size,n=e.clear();return t&&xe(e,"clear",void 0,void 0),n}function Be(e,t){return function(n,s){const r=this,o=r.__v_raw,l=ft(o),i=t?je:e?ht:dt;return!e&&be(l,0,me),o.forEach(((e,t)=>n.call(s,i(e),i(t),r)))}}function We(e,t,n){return function(...s){const r=this.__v_raw,o=ft(r),l=p(o),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,u=r[e](...s),a=n?je:t?ht:dt;return!t&&be(o,0,c?ye:me),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:i?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function ze(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function He(){const e={get(e){return Le(this,e)},get size(){return Ve(this)},has:Ie,add:$e,set:Ne,delete:Ue,clear:De,forEach:Be(!1,!1)},t={get(e){return Le(this,e,!1,!0)},get size(){return Ve(this)},has:Ie,add(e){return $e.call(this,e,!0)},set(e,t){return Ne.call(this,e,t,!0)},delete:Ue,clear:De,forEach:Be(!1,!0)},n={get(e){return Le(this,e,!0)},get size(){return Ve(this,!0)},has(e){return Ie.call(this,e,!0)},add:ze("add"),set:ze("set"),delete:ze("delete"),clear:ze("clear"),forEach:Be(!0,!1)},s={get(e){return Le(this,e,!0,!0)},get size(){return Ve(this,!0)},has(e){return Ie.call(this,e,!0)},add:ze("add"),set:ze("set"),delete:ze("delete"),clear:ze("clear"),forEach:Be(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=We(r,!1,!1),n[r]=We(r,!0,!1),t[r]=We(r,!1,!0),s[r]=We(r,!0,!0)})),[e,n,t,s]}const[Ke,qe,Ge,Je]=He();function Qe(e,t){const n=t?e?Je:Ge:e?qe:Ke;return(t,s,r)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(a(n,s)&&s in t?n:t,s,r)}const Xe={get:Qe(!1,!1)},Ze={get:Qe(!1,!0)},Ye={get:Qe(!0,!1)},et=new WeakMap,tt=new WeakMap,nt=new WeakMap,st=new WeakMap;function rt(e){return ct(e)?e:lt(e,!1,Pe,Xe,et)}function ot(e){return lt(e,!0,Ae,Ye,nt)}function lt(e,t,n,s,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const l=(i=e).__v_skip||!Object.isExtensible(i)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(x(i));var i;if(0===l)return e;const c=new Proxy(e,2===l?s:n);return r.set(e,c),c}function it(e){return ct(e)?it(e.__v_raw):!(!e||!e.__v_isReactive)}function ct(e){return!(!e||!e.__v_isReadonly)}function ut(e){return!(!e||!e.__v_isShallow)}function at(e){return!!e&&!!e.__v_raw}function ft(e){const t=e&&e.__v_raw;return t?ft(t):e}function pt(e){return Object.isExtensible(e)&&T(e,"__v_skip",!0),e}const dt=e=>_(e)?rt(e):e,ht=e=>_(e)?ot(e):e;class vt{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ne((()=>e(this._value)),(()=>_t(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=ft(this);return e._cacheable&&!e.effect.dirty||!R(e._value,e._value=e.effect.run())||_t(e,4),gt(e),e.effect._dirtyLevel>=2&&_t(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function gt(e){var t;le&&X&&(e=ft(e),de(X,null!=(t=e.dep)?t:e.dep=ge((()=>e.dep=void 0),e instanceof vt?e:void 0)))}function _t(e,t=4,n,s){const r=(e=ft(e)).dep;r&&ve(r,t)}function mt(e){return!(!e||!0!==e.__v_isRef)}function yt(e){return function(e,t){if(mt(e))return e;return new bt(e,t)}(e,!1)}class bt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:ft(e),this._value=t?e:dt(e)}get value(){return gt(this),this._value}set value(e){const t=this.__v_isShallow||ut(e)||ct(e);e=t?e:ft(e),R(e,this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=t?e:dt(e),_t(this,4))}}function xt(e){return mt(e)?e.value:e}const wt={get:(e,t,n)=>xt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return mt(r)&&!mt(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function St(e){return it(e)?e:new Proxy(e,wt)}function Ct(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=Ft(e,n);return t}class kt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=_e.get(e);return n&&n.get(t)}(ft(this._object),this._key)}}class Ot{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Et(e,t,n){return mt(e)?e:h(e)?new Ot(e):_(e)&&arguments.length>1?Ft(e,t,n):yt(e)}function Ft(e,t,n){const s=e[t];return mt(s)?s:new kt(e,t,n)} +/** +* @vue/runtime-core v3.4.36 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Mt(e,t,n,s){try{return s?e(...s):e()}catch(r){At(r,t,n)}}function Pt(e,t,n,s){if(h(e)){const r=Mt(e,t,n,s);return r&&m(r)&&r.catch((e=>{At(e,t,n)})),r}if(f(e)){const r=[];for(let o=0;o>>1,r=Tt[s],o=Kt(r);oKt(e)-Kt(t)));if(It.length=0,Vt)return void Vt.push(...e);for(Vt=e,$t=0;$tnull==e.id?1/0:e.id,qt=(e,t)=>{const n=Kt(e)-Kt(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Gt(e){jt=!1,Rt=!0,Tt.sort(qt);try{for(Lt=0;Lt{s._d&&Qs(-1);const r=Xt(t);let o;try{o=e(...n)}finally{Xt(r),s._d&&Qs(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Yt(e,n){if(null===Jt)return e;const s=Fr(Jt),r=e.dirs||(e.dirs=[]);for(let o=0;o!!e.type.__asyncLoader,sn=e=>e.type.__isKeepAlive;function rn(e,t){ln(e,"a",t)}function on(e,t){ln(e,"da",t)}function ln(e,t,n=gr){const s=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(un(t,s,n),n){let e=n.parent;for(;e&&e.parent;)sn(e.parent.vnode)&&cn(s,t,n,e),e=e.parent}}function cn(e,t,n,s){const r=un(t,e,s,!0);gn((()=>{c(s[t],r)}),n)}function un(e,t,n=gr,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{ue();const r=br(n),o=Pt(t,n,e,s);return r(),ae(),o});return s?r.unshift(o):r.push(o),o}}const an=e=>(t,n=gr)=>{Cr&&"sp"!==e||un(e,((...e)=>t(...e)),n)},fn=an("bm"),pn=an("m"),dn=an("bu"),hn=an("u"),vn=an("bum"),gn=an("um"),_n=an("sp"),mn=an("rtg"),yn=an("rtc");function bn(e,t=gr){un("ec",e,t)}const xn="components";function wn(e,t){return On(xn,e,!0,t)||e}const Sn=Symbol.for("v-ndc");function Cn(e){return v(e)?On(xn,e,!1)||e:e||Sn}function kn(e){return On("directives",e)}function On(e,t,n=!0,s=!1){const r=Jt||gr;if(r){const n=r.type;if(e===xn){const e=Mr(n,!1);if(e&&(e===t||e===E(t)||e===P(E(t))))return n}const o=En(r[e]||n[e],t)||En(r.appContext[e],t);return!o&&s?n:o}}function En(e,t){return e&&(e[t]||e[E(t)]||e[P(E(t))])}function Fn(e,t,n,s){let r;const o=n;if(f(e)||v(e)){r=new Array(e.length);for(let n=0,s=e.length;nt(e,n,void 0,o)));else{const n=Object.keys(e);r=new Array(n.length);for(let s=0,l=n.length;s!er(e)||e.type!==zs&&!(e.type===Bs&&!Pn(e.children))))?e:null}const An=e=>e?wr(e)?Fr(e):An(e.parent):null,Rn=i(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>An(e.parent),$root:e=>An(e.root),$emit:e=>e.emit,$options:e=>Un(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Bt(e.update)}),$nextTick:e=>e.n||(e.n=Dt.bind(e.proxy)),$watch:e=>As.bind(e)}),jn=(e,n)=>e!==t&&!e.__isScriptSetup&&a(e,n),Tn={get({_:e},n){if("__v_skip"===n)return!0;const{ctx:s,setupState:r,data:o,props:l,accessCache:i,type:c,appContext:u}=e;let f;if("$"!==n[0]){const c=i[n];if(void 0!==c)switch(c){case 1:return r[n];case 2:return o[n];case 4:return s[n];case 3:return l[n]}else{if(jn(r,n))return i[n]=1,r[n];if(o!==t&&a(o,n))return i[n]=2,o[n];if((f=e.propsOptions[0])&&a(f,n))return i[n]=3,l[n];if(s!==t&&a(s,n))return i[n]=4,s[n];In&&(i[n]=0)}}const p=Rn[n];let d,h;return p?("$attrs"===n&&be(e.attrs,0,""),p(e)):(d=c.__cssModules)&&(d=d[n])?d:s!==t&&a(s,n)?(i[n]=4,s[n]):(h=u.config.globalProperties,a(h,n)?h[n]:void 0)},set({_:e},n,s){const{data:r,setupState:o,ctx:l}=e;return jn(o,n)?(o[n]=s,!0):r!==t&&a(r,n)?(r[n]=s,!0):!a(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(l[n]=s,!0))},has({_:{data:e,setupState:n,accessCache:s,ctx:r,appContext:o,propsOptions:l}},i){let c;return!!s[i]||e!==t&&a(e,i)||jn(n,i)||(c=l[0])&&a(c,i)||a(r,i)||a(Rn,i)||a(o.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:a(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ln(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let In=!0;function Vn(e){const t=Un(e),n=e.proxy,r=e.ctx;In=!1,t.beforeCreate&&$n(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:i,watch:c,provide:u,inject:a,created:p,beforeMount:d,mounted:v,beforeUpdate:g,updated:m,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:w,destroyed:S,unmounted:C,render:k,renderTracked:O,renderTriggered:E,errorCaptured:F,serverPrefetch:M,expose:P,inheritAttrs:A,components:R,directives:j,filters:T}=t;if(a&&function(e,t){f(e)&&(e=zn(e));for(const n in e){const s=e[n];let r;r=_(s)?"default"in s?Zn(s.from||n,s.default,!0):Zn(s.from||n):Zn(s),mt(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(a,r,null),i)for(const s in i){const e=i[s];h(e)&&(r[s]=e.bind(n))}if(o){const t=o.call(n,n);_(t)&&(e.data=rt(t))}if(In=!0,l)for(const f in l){const e=l[f],t=h(e)?e.bind(n,n):h(e.get)?e.get.bind(n,n):s,o=!h(e)&&h(e.set)?e.set.bind(n):s,i=Pr({get:t,set:o});Object.defineProperty(r,f,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(c)for(const s in c)Nn(c[s],r,n,s);if(u){const e=h(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(gr){let n=gr.provides;const s=gr.parent&&gr.parent.provides;s===n&&(n=gr.provides=Object.create(s)),n[e]=t}else;}(t,e[t])}))}function L(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&$n(p,e,"c"),L(fn,d),L(pn,v),L(dn,g),L(hn,m),L(rn,y),L(on,b),L(bn,F),L(yn,O),L(mn,E),L(vn,w),L(gn,C),L(_n,M),f(P))if(P.length){const t=e.exposed||(e.exposed={});P.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});k&&e.render===s&&(e.render=k),null!=A&&(e.inheritAttrs=A),R&&(e.components=R),j&&(e.directives=j)}function $n(e,t,n){Pt(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Nn(e,t,n,s){const r=s.includes(".")?Rs(n,s):()=>n[s];if(v(e)){const n=t[e];h(n)&&Ms(r,n)}else if(h(e))Ms(r,e.bind(n));else if(_(e))if(f(e))e.forEach((e=>Nn(e,t,n,s)));else{const s=h(e.handler)?e.handler.bind(n):t[e.handler];h(s)&&Ms(r,s,e)}}function Un(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,i=o.get(t);let c;return i?c=i:r.length||n||s?(c={},r.length&&r.forEach((e=>Dn(c,e,l,!0))),Dn(c,t,l)):c=t,_(t)&&o.set(t,c),c}function Dn(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Dn(e,o,n,!0),r&&r.forEach((t=>Dn(e,t,n,!0)));for(const l in t)if(s&&"expose"===l);else{const s=Bn[l]||n&&n[l];e[l]=s?s(e[l],t[l]):t[l]}return e}const Bn={data:Wn,props:qn,emits:qn,methods:Kn,computed:Kn,beforeCreate:Hn,created:Hn,beforeMount:Hn,mounted:Hn,beforeUpdate:Hn,updated:Hn,beforeDestroy:Hn,beforeUnmount:Hn,destroyed:Hn,unmounted:Hn,activated:Hn,deactivated:Hn,errorCaptured:Hn,serverPrefetch:Hn,components:Kn,directives:Kn,watch:function(e,t){if(!e)return t;if(!t)return e;const n=i(Object.create(null),e);for(const s in t)n[s]=Hn(e[s],t[s]);return n},provide:Wn,inject:function(e,t){return Kn(zn(e),zn(t))}};function Wn(e,t){return t?e?function(){return i(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function zn(e){if(f(e)){const t={};for(let n=0;n(o.has(e)||(e&&h(e.install)?(o.add(e),e.install(c,...t)):h(e)&&(o.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(o,i,u){if(!l){const a=or(n,s);return a.appContext=r,!0===u?u="svg":!1===u&&(u=void 0),i&&t?t(a,o):e(a,o,u),l=!0,c._container=o,o.__vue_app__=c,Fr(a.component)}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c),runWithContext(e){const t=Xn;Xn=c;try{return e()}finally{Xn=t}}};return c}}let Xn=null;function Zn(e,t,n=!1){const s=gr||Jt;if(s||Xn){const r=s?null==s.parent?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:Xn._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&h(t)?t.call(s&&s.proxy):t}}function Yn(){return!!(gr||Jt||Xn)}const es={},ts=()=>Object.create(es),ns=e=>Object.getPrototypeOf(e)===es;function ss(e,t,n,s=!1){const r={},o=ts();e.propsDefaults=Object.create(null),rs(e,t,r,o);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);n?e.props=s?r:lt(r,!1,Re,Ze,tt):e.type.props?e.props=r:e.props=o,e.attrs=o}function rs(e,n,s,r){const[o,l]=e.propsOptions;let i,c=!1;if(n)for(let t in n){if(C(t))continue;const u=n[t];let f;o&&a(o,f=E(t))?l&&l.includes(f)?(i||(i={}))[f]=u:s[f]=u:Vs(e.emitsOptions,t)||t in r&&u===r[t]||(r[t]=u,c=!0)}if(l){const n=ft(s),r=i||t;for(let t=0;t{d=!0;const[t,n]=is(e,s,!0);i(u,t),n&&p.push(...n)};!r&&s.mixins.length&&s.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!d)return _(e)&&o.set(e,n),n;if(f(c))for(let n=0;n"_"===e[0]||"$stable"===e,as=e=>f(e)?e.map(ur):[ur(e)],fs=(e,t,n)=>{if(t._n)return t;const s=Zt(((...e)=>as(t(...e))),n);return s._c=!1,s},ps=(e,t,n)=>{const s=e._ctx;for(const r in e){if(us(r))continue;const n=e[r];if(h(n))t[r]=fs(0,n,s);else if(null!=n){const e=as(n);t[r]=()=>e}}},ds=(e,t)=>{const n=as(t);e.slots.default=()=>n},hs=(e,t,n)=>{for(const s in t)(n||"_"!==s)&&(e[s]=t[s])},vs=(e,t,n)=>{const s=e.slots=ts();if(32&e.vnode.shapeFlag){const e=t._;e?(hs(s,t,n),n&&T(s,"_",e,!0)):ps(t,s)}else t&&ds(e,t)},gs=(e,n,s)=>{const{vnode:r,slots:o}=e;let l=!0,i=t;if(32&r.shapeFlag){const e=n._;e?s&&1===e?l=!1:hs(o,n,s):(l=!n.$stable,ps(n,o)),i=n}else n&&(ds(e,n),i={default:1});if(l)for(const t in o)us(t)||null!=i[t]||delete o[t]};function _s(e,n,s,r,o=!1){if(f(e))return void e.forEach(((e,t)=>_s(e,n&&(f(n)?n[t]:n),s,r,o)));if(nn(r)&&!o)return;const l=4&r.shapeFlag?Fr(r.component):r.el,i=o?null:l,{i:u,r:p}=e,d=n&&n.r,g=u.refs===t?u.refs={}:u.refs,_=u.setupState;if(null!=d&&d!==p&&(v(d)?(g[d]=null,a(_,d)&&(_[d]=null)):mt(d)&&(d.value=null)),h(p))Mt(p,u,12,[i,g]);else{const t=v(p),n=mt(p);if(t||n){const r=()=>{if(e.f){const n=t?a(_,p)?_[p]:g[p]:p.value;o?f(n)&&c(n,l):f(n)?n.includes(l)||n.push(l):t?(g[p]=[l],a(_,p)&&(_[p]=g[p])):(p.value=[l],e.k&&(g[e.k]=p.value))}else t?(g[p]=i,a(_,p)&&(_[p]=i)):n&&(p.value=i,e.k&&(g[e.k]=i))};i?(r.id=-1,ys(r,s)):r()}}}const ms=Symbol("_vte"),ys=function(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):(f(n=e)?It.push(...n):Vt&&Vt.includes(n,n.allowRecurse?$t+1:$t)||It.push(n),Wt());var n};function bs(e){return function(e){V().__VUE__=!0;const{insert:r,remove:o,patchProp:l,createElement:i,createText:c,createComment:u,setText:f,setElementText:p,parentNode:d,nextSibling:h,setScopeId:v=s,insertStaticContent:g}=e,_=(e,t,n,s=null,r=null,o=null,l=void 0,i=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!tr(e,t)&&(s=X(e),K(e,r,o,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:u,ref:a,shapeFlag:f}=t;switch(u){case Ws:y(e,t,n,s);break;case zs:b(e,t,n,s);break;case Hs:null==e&&x(t,n,s,l);break;case Bs:L(e,t,n,s,r,o,l,i,c);break;default:1&f?k(e,t,n,s,r,o,l,i,c):6&f?I(e,t,n,s,r,o,l,i,c):(64&f||128&f)&&u.process(e,t,n,s,r,o,l,i,c,te)}null!=a&&r&&_s(a,e&&e.ref,o,t||e,!t)},y=(e,t,n,s)=>{if(null==e)r(t.el=c(t.children),n,s);else{const n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,s)=>{null==e?r(t.el=u(t.children||""),n,s):t.el=e.el},x=(e,t,n,s)=>{[e.el,e.anchor]=g(e.children,t,n,s,e.el,e.anchor)},w=({el:e,anchor:t},n,s)=>{let o;for(;e&&e!==t;)o=h(e),r(e,n,s),e=o;r(t,n,s)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),o(e),e=n;o(t)},k=(e,t,n,s,r,o,l,i,c)=>{"svg"===t.type?l="svg":"math"===t.type&&(l="mathml"),null==e?O(t,n,s,r,o,l,i,c):A(e,t,r,o,l,i,c)},O=(e,t,n,s,o,c,u,a)=>{let f,d;const{props:h,shapeFlag:v,transition:g,dirs:_}=e;if(f=e.el=i(e.type,c,h&&h.is,h),8&v?p(f,e.children):16&v&&P(e.children,f,null,s,o,xs(e,c),u,a),_&&en(e,null,s,"created"),F(f,e,e.scopeId,u,s),h){for(const e in h)"value"===e||C(e)||l(f,e,null,h[e],c,s);"value"in h&&l(f,"value",null,h.value,c),(d=h.onVnodeBeforeMount)&&dr(d,s,e)}_&&en(e,null,s,"beforeMount");const m=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(o,g);m&&g.beforeEnter(f),r(f,t,n),((d=h&&h.onVnodeMounted)||m||_)&&ys((()=>{d&&dr(d,s,e),m&&g.enter(f),_&&en(e,null,s,"mounted")}),o)},F=(e,t,n,s,r)=>{if(n&&v(e,n),s)for(let o=0;o{for(let u=c;u{const u=n.el=e.el;let{patchFlag:a,dynamicChildren:f,dirs:d}=n;a|=16&e.patchFlag;const h=e.props||t,v=n.props||t;let g;if(s&&ws(s,!1),(g=v.onVnodeBeforeUpdate)&&dr(g,s,n,e),d&&en(n,e,s,"beforeUpdate"),s&&ws(s,!0),(h.innerHTML&&null==v.innerHTML||h.textContent&&null==v.textContent)&&p(u,""),f?R(e.dynamicChildren,f,u,s,r,xs(n,o),i):c||B(e,n,u,null,s,r,xs(n,o),i,!1),a>0){if(16&a)T(u,h,v,s,o);else if(2&a&&h.class!==v.class&&l(u,"class",null,v.class,o),4&a&&l(u,"style",h.style,v.style,o),8&a){const e=n.dynamicProps;for(let t=0;t{g&&dr(g,s,n,e),d&&en(n,e,s,"updated")}),r)},R=(e,t,n,s,r,o,l)=>{for(let i=0;i{if(n!==s){if(n!==t)for(const t in n)C(t)||t in s||l(e,t,n[t],null,o,r);for(const t in s){if(C(t))continue;const i=s[t],c=n[t];i!==c&&"value"!==t&&l(e,t,c,i,o,r)}"value"in s&&l(e,"value",n.value,s.value,o)}},L=(e,t,n,s,o,l,i,u,a)=>{const f=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:v}=t;v&&(u=u?u.concat(v):v),null==e?(r(f,n,s),r(p,n,s),P(t.children||[],n,p,o,l,i,u,a)):d>0&&64&d&&h&&e.dynamicChildren?(R(e.dynamicChildren,h,n,o,l,i,u),(null!=t.key||o&&t===o.subTree)&&Ss(e,t,!0)):B(e,t,n,p,o,l,i,u,a)},I=(e,t,n,s,r,o,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,s,l,c):$(t,n,s,r,o,l,c):N(e,t,c)},$=(e,n,s,r,o,l,i)=>{const c=e.component=function(e,n,s){const r=e.type,o=(n?n.appContext:e.appContext)||hr,l={uid:vr++,vnode:e,type:r,parent:n,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new Z(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:is(r,o),emitsOptions:Is(r,o),emit:null,emitted:null,propsDefaults:t,inheritAttrs:r.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};l.ctx={_:l},l.root=n?n.root:l,l.emit=Ls.bind(null,l),e.ce&&e.ce(l);return l}(e,r,o);if(sn(e)&&(c.ctx.renderer=te),function(e,t=!1,n=!1){t&&yr(t);const{props:s,children:r}=e.vnode,o=wr(e);ss(e,s,o,t),vs(e,r,n);const l=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Tn);const{setup:s}=n;if(s){const n=e.setupContext=s.length>1?function(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,Er),slots:e.slots,emit:e.emit,expose:t}}(e):null,r=br(e);ue();const o=Mt(s,e,0,[e.props,n]);if(ae(),r(),m(o)){if(o.then(xr,xr),t)return o.then((n=>{kr(e,n,t)})).catch((t=>{At(t,e,0)}));e.asyncDep=o}else kr(e,o,t)}else Or(e,t)}(e,t):void 0;t&&yr(!1)}(c,!1,i),c.asyncDep){if(o&&o.registerDep(c,U,i),!e.el){const e=c.subTree=or(zs);b(null,e,n,s)}}else U(c,e,n,s,o,l,i)},N=(e,t,n)=>{const s=t.component=e.component;if(function(e,t,n){const{props:s,children:r,component:o}=e,{props:l,children:i,patchFlag:c}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||s!==l&&(s?!l||Ds(s,l,u):!!l);if(1024&c)return!0;if(16&c)return s?Ds(s,l,u):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;tLt&&Tt.splice(t,1)}(s.update),s.effect.dirty=!0,s.update()}else t.el=e.el,s.vnode=t},U=(e,t,n,r,o,l,i)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:s,parent:r,vnode:u}=e;{const n=Cs(e);if(n)return t&&(t.el=u.el,D(e,t,i)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let a,f=t;ws(e,!1),t?(t.el=u.el,D(e,t,i)):t=u,n&&j(n),(a=t.props&&t.props.onVnodeBeforeUpdate)&&dr(a,r,t,u),ws(e,!0);const p=$s(e),h=e.subTree;e.subTree=p,_(h,p,d(h.el),X(h),e,o,l),t.el=p.el,null===f&&function({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,p.el),s&&ys(s,o),(a=t.props&&t.props.onVnodeUpdated)&&ys((()=>dr(a,r,t,u)),o)}else{let s;const{el:i,props:c}=t,{bm:u,m:a,parent:f}=e,p=nn(t);if(ws(e,!1),u&&j(u),!p&&(s=c&&c.onVnodeBeforeMount)&&dr(s,f,t),ws(e,!0),i&&re){const n=()=>{e.subTree=$s(e),re(i,e.subTree,e,o,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const s=e.subTree=$s(e);_(null,s,n,r,e,o,l),t.el=s.el}if(a&&ys(a,o),!p&&(s=c&&c.onVnodeMounted)){const e=t;ys((()=>dr(s,f,e)),o)}(256&t.shapeFlag||f&&nn(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&ys(e.a,o),e.isMounted=!0,t=n=r=null}},u=e.effect=new ne(c,s,(()=>Bt(a)),e.scope),a=e.update=()=>{u.dirty&&u.run()};a.i=e,a.id=e.uid,ws(e,!0),a()},D=(e,t,n)=>{t.component=e;const s=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:l}}=e,i=ft(r),[c]=e.propsOptions;let u=!1;if(!(s||l>0)||16&l){let s;rs(e,t,r,o)&&(u=!0);for(const o in i)t&&(a(t,o)||(s=M(o))!==o&&a(t,s))||(c?!n||void 0===n[o]&&void 0===n[s]||(r[o]=os(c,i,o,void 0,e,!0)):delete r[o]);if(o!==i)for(const e in o)t&&a(t,e)||(delete o[e],u=!0)}else if(8&l){const n=e.vnode.dynamicProps;for(let s=0;s{const u=e&&e.children,a=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void z(u,f,n,s,r,o,l,i,c);if(256&d)return void W(u,f,n,s,r,o,l,i,c)}8&h?(16&a&&Q(u,r,o),f!==u&&p(n,f)):16&a?16&h?z(u,f,n,s,r,o,l,i,c):Q(u,r,o,!0):(8&a&&p(n,""),16&h&&P(f,n,s,r,o,l,i,c))},W=(e,t,s,r,o,l,i,c,u)=>{t=t||n;const a=(e=e||n).length,f=t.length,p=Math.min(a,f);let d;for(d=0;df?Q(e,o,l,!0,!1,p):P(t,s,r,o,l,i,c,u,p)},z=(e,t,s,r,o,l,i,c,u)=>{let a=0;const f=t.length;let p=e.length-1,d=f-1;for(;a<=p&&a<=d;){const n=e[a],r=t[a]=u?ar(t[a]):ur(t[a]);if(!tr(n,r))break;_(n,r,s,null,o,l,i,c,u),a++}for(;a<=p&&a<=d;){const n=e[p],r=t[d]=u?ar(t[d]):ur(t[d]);if(!tr(n,r))break;_(n,r,s,null,o,l,i,c,u),p--,d--}if(a>p){if(a<=d){const e=d+1,n=ed)for(;a<=p;)K(e[a],o,l,!0),a++;else{const h=a,v=a,g=new Map;for(a=v;a<=d;a++){const e=t[a]=u?ar(t[a]):ur(t[a]);null!=e.key&&g.set(e.key,a)}let m,y=0;const b=d-v+1;let x=!1,w=0;const S=new Array(b);for(a=0;a=b){K(n,o,l,!0);continue}let r;if(null!=n.key)r=g.get(n.key);else for(m=v;m<=d;m++)if(0===S[m-v]&&tr(n,t[m])){r=m;break}void 0===r?K(n,o,l,!0):(S[r-v]=a+1,r>=w?w=r:x=!0,_(n,t[r],s,null,o,l,i,c,u),y++)}const C=x?function(e){const t=e.slice(),n=[0];let s,r,o,l,i;const c=e.length;for(s=0;s>1,e[n[i]]0&&(t[s]=n[o-1]),n[o]=s)}}o=n.length,l=n[o-1];for(;o-- >0;)n[o]=l,l=t[l];return n}(S):n;for(m=C.length-1,a=b-1;a>=0;a--){const e=v+a,n=t[e],p=e+1{const{el:l,type:i,transition:c,children:u,shapeFlag:a}=e;if(6&a)return void H(e.component.subTree,t,n,s);if(128&a)return void e.suspense.move(t,n,s);if(64&a)return void i.move(e,t,n,te);if(i===Bs){r(l,t,n);for(let e=0;ec.enter(l)),o);else{const{leave:e,delayLeave:s,afterLeave:o}=c,i=()=>r(l,t,n),u=()=>{e(l,(()=>{i(),o&&o()}))};s?s(l,i,u):u()}else r(l,t,n)},K=(e,t,n,s=!1,r=!1)=>{const{type:o,props:l,ref:i,children:c,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p,cacheIndex:d}=e;if(-2===f&&(r=!1),null!=i&&_s(i,null,n,e,!0),null!=d&&(t.renderCache[d]=void 0),256&a)return void t.ctx.deactivate(e);const h=1&a&&p,v=!nn(e);let g;if(v&&(g=l&&l.onVnodeBeforeUnmount)&&dr(g,t,e),6&a)J(e.component,n,s);else{if(128&a)return void e.suspense.unmount(n,s);h&&en(e,null,t,"beforeUnmount"),64&a?e.type.remove(e,t,n,te,s):u&&!u.hasOnce&&(o!==Bs||f>0&&64&f)?Q(u,t,n,!1,!0):(o===Bs&&384&f||!r&&16&a)&&Q(c,t,n),s&&q(e)}(v&&(g=l&&l.onVnodeUnmounted)||h)&&ys((()=>{g&&dr(g,t,e),h&&en(e,null,t,"unmounted")}),n)},q=e=>{const{type:t,el:n,anchor:s,transition:r}=e;if(t===Bs)return void G(n,s);if(t===Hs)return void S(e);const l=()=>{o(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:s}=r,o=()=>t(n,l);s?s(e.el,l,o):o()}else l()},G=(e,t)=>{let n;for(;e!==t;)n=h(e),o(e),e=n;o(t)},J=(e,t,n)=>{const{bum:s,scope:r,update:o,subTree:l,um:i,m:c,a:u}=e;ks(c),ks(u),s&&j(s),r.stop(),o&&(o.active=!1,K(l,e,t,n)),i&&ys(i,t),ys((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,n,s=!1,r=!1,o=0)=>{for(let l=o;l{if(6&e.shapeFlag)return X(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=h(e.anchor||e.el),n=t&&t[ms];return n?h(n):t};let Y=!1;const ee=(e,t,n)=>{null==e?t._vnode&&K(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),Y||(Y=!0,zt(),Ht(),Y=!1),t._vnode=e},te={p:_,um:K,m:H,r:q,mt:$,mc:P,pc:B,pbc:R,n:X,o:e};let se,re;return{render:ee,hydrate:se,createApp:Qn(ee,se)}}(e)}function xs({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ws({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ss(e,t,n=!1){const s=e.children,r=t.children;if(f(s)&&f(r))for(let o=0;oZn(Os),Fs={};function Ms(e,t,n){return Ps(e,t,n)}function Ps(e,n,{immediate:r,deep:o,flush:l,once:i,onTrack:u,onTrigger:a}=t){if(n&&i){const e=n;n=(...t)=>{e(...t),O()}}const p=gr,d=e=>!0===o?e:js(e,!1===o?1:void 0);let v,g,_=!1,m=!1;if(mt(e)?(v=()=>e.value,_=ut(e)):it(e)?(v=()=>d(e),_=!0):f(e)?(m=!0,_=e.some((e=>it(e)||ut(e))),v=()=>e.map((e=>mt(e)?e.value:it(e)?d(e):h(e)?Mt(e,p,2):void 0))):v=h(e)?n?()=>Mt(e,p,2):()=>(g&&g(),Pt(e,p,3,[b])):s,n&&o){const e=v;v=()=>js(e())}let y,b=e=>{g=C.onStop=()=>{Mt(e,p,4),g=C.onStop=void 0}};if(Cr){if(b=s,n?r&&Pt(n,p,3,[v(),m?[]:void 0,b]):v(),"sync"!==l)return s;{const e=Es();y=e.__watcherHandles||(e.__watcherHandles=[])}}let x=m?new Array(e.length).fill(Fs):Fs;const w=()=>{if(C.active&&C.dirty)if(n){const e=C.run();(o||_||(m?e.some(((e,t)=>R(e,x[t]))):R(e,x)))&&(g&&g(),Pt(n,p,3,[e,x===Fs?void 0:m&&x[0]===Fs?[]:x,b]),x=e)}else C.run()};let S;w.allowRecurse=!!n,"sync"===l?S=w:"post"===l?S=()=>ys(w,p&&p.suspense):(w.pre=!0,p&&(w.id=p.uid),S=()=>Bt(w));const C=new ne(v,s,S),k=ee(),O=()=>{C.stop(),k&&c(k.effects,C)};return n?r?w():x=C.run():"post"===l?ys(C.run.bind(C),p&&p.suspense):C.run(),y&&y.push(O),O}function As(e,t,n){const s=this.proxy,r=v(e)?e.includes(".")?Rs(s,e):()=>s[e]:e.bind(s,s);let o;h(t)?o=t:(o=t.handler,n=t);const l=br(this),i=Ps(r,o.bind(s),n);return l(),i}function Rs(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{js(e,t,n)}));else if(w(e)){for(const s in e)js(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&js(e[s],t,n)}return e}const Ts=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${E(t)}Modifiers`]||e[`${M(t)}Modifiers`];function Ls(e,n,...s){if(e.isUnmounted)return;const r=e.vnode.props||t;let o=s;const l=n.startsWith("update:"),i=l&&Ts(r,n.slice(7));let c;i&&(i.trim&&(o=s.map((e=>v(e)?e.trim():e))),i.number&&(o=s.map(L)));let u=r[c=A(n)]||r[c=A(E(n))];!u&&l&&(u=r[c=A(M(n))]),u&&Pt(u,e,6,o);const a=r[c+"Once"];if(a){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Pt(a,e,6,o)}}function Is(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(void 0!==r)return r;const o=e.emits;let l={},c=!1;if(!h(e)){const s=e=>{const n=Is(e,t,!0);n&&(c=!0,i(l,n))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return o||c?(f(o)?o.forEach((e=>l[e]=null)):i(l,o),_(e)&&s.set(e,l),l):(_(e)&&s.set(e,null),null)}function Vs(e,t){return!(!e||!o(t))&&(t=t.slice(2).replace(/Once$/,""),a(e,t[0].toLowerCase()+t.slice(1))||a(e,M(t))||a(e,t))}function $s(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:c,emit:u,render:a,renderCache:f,props:p,data:d,setupState:h,ctx:v,inheritAttrs:g}=e,_=Xt(e);let m,y;try{if(4&n.shapeFlag){const e=r||s,t=e;m=ur(a.call(t,e,f,p,h,d,v)),y=c}else{const e=t;0,m=ur(e.length>1?e(p,{attrs:c,slots:i,emit:u}):e(p,null)),y=t.props?c:Ns(c)}}catch(x){Ks.length=0,At(x,e,1),m=or(zs)}let b=m;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(o&&e.some(l)&&(y=Us(y,o)),b=lr(b,y,!1,!0))}return n.dirs&&(b=lr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),m=b,Xt(_),m}const Ns=e=>{let t;for(const n in e)("class"===n||"style"===n||o(n))&&((t||(t={}))[n]=e[n]);return t},Us=(e,t)=>{const n={};for(const s in e)l(s)&&s.slice(9)in t||(n[s]=e[s]);return n};function Ds(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r0?qs||n:null,Ks.pop(),qs=Ks[Ks.length-1]||null,Js>0&&qs&&qs.push(e),e}function Zs(e,t,n,s,r,o){return Xs(rr(e,t,n,s,r,o,!0))}function Ys(e,t,n,s,r){return Xs(or(e,t,n,s,r,!0))}function er(e){return!!e&&!0===e.__v_isVNode}function tr(e,t){return e.type===t.type&&e.key===t.key}const nr=({key:e})=>null!=e?e:null,sr=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||mt(e)||h(e)?{i:Jt,r:e,k:t,f:!!n}:e:null);function rr(e,t=null,n=null,s=0,r=null,o=(e===Bs?0:1),l=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nr(t),ref:t&&sr(t),scopeId:Qt,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Jt};return i?(fr(c,n),128&o&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),Js>0&&!l&&qs&&(c.patchFlag>0||6&o)&&32!==c.patchFlag&&qs.push(c),c}const or=function(e,t=null,n=null,s=0,r=null,o=!1){e&&e!==Sn||(e=zs);if(er(e)){const s=lr(e,t,!0);return n&&fr(s,n),Js>0&&!o&&qs&&(6&s.shapeFlag?qs[qs.indexOf(e)]=s:qs.push(s)),s.patchFlag=-2,s}l=e,h(l)&&"__vccOpts"in l&&(e=e.__vccOpts);var l;if(t){t=function(e){return e?at(e)||ns(e)?i({},e):e:null}(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=W(e)),_(n)&&(at(n)&&!f(n)&&(n=i({},n)),t.style=$(n))}const c=v(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:h(e)?2:0;return rr(e,t,n,s,r,c,o,!0)};function lr(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:l,children:i,transition:c}=e,u=t?pr(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&nr(u),ref:t&&t.ref?n&&o?f(o)?o.concat(sr(t)):[o,sr(t)]:sr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Bs?-1===l?16:16|l:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lr(e.ssContent),ssFallback:e.ssFallback&&lr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&tn(a,c.clone(a)),a}function ir(e=" ",t=0){return or(Ws,null,e,t)}function cr(e="",t=!1){return t?(Gs(),Ys(zs,null,e)):or(zs,null,e)}function ur(e){return null==e||"boolean"==typeof e?or(zs):f(e)?or(Bs,null,e.slice()):"object"==typeof e?ar(e):or(Ws,null,String(e))}function ar(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:lr(e)}function fr(e,t){let n=0;const{shapeFlag:s}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&s){const n=t.default;return void(n&&(n._c&&(n._d=!1),fr(e,n()),n._c&&(n._d=!0)))}{n=32;const s=t._;s||ns(t)?3===s&&Jt&&(1===Jt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Jt}}else h(t)?(t={default:t,_ctx:Jt},n=32):(t=String(t),64&s?(n=16,t=[ir(t)]):n=8);e.children=t,e.shapeFlag|=n}function pr(...e){const t={};for(let n=0;ngr||Jt;let mr,yr;{const e=V(),t=(t,n)=>{let s;return(s=e[t])||(s=e[t]=[]),s.push(n),e=>{s.length>1?s.forEach((t=>t(e))):s[0](e)}};mr=t("__VUE_INSTANCE_SETTERS__",(e=>gr=e)),yr=t("__VUE_SSR_SETTERS__",(e=>Cr=e))}const br=e=>{const t=gr;return mr(e),e.scope.on(),()=>{e.scope.off(),mr(t)}},xr=()=>{gr&&gr.scope.off(),mr(null)};function wr(e){return 4&e.vnode.shapeFlag}let Sr,Cr=!1;function kr(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:_(t)&&(e.setupState=St(t)),Or(e,n)}function Or(e,t,n){const r=e.type;if(!e.render){if(!t&&Sr&&!r.render){const t=r.template||Un(e).template;if(t){const{isCustomElement:n,compilerOptions:s}=e.appContext.config,{delimiters:o,compilerOptions:l}=r,c=i(i({isCustomElement:n,delimiters:o},s),l);r.render=Sr(t,c)}}e.render=r.render||s}{const t=br(e);ue();try{Vn(e)}finally{ae(),t()}}}const Er={get:(e,t)=>(be(e,0,""),e[t])};function Fr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(St(pt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Rn?Rn[n](e):void 0,has:(e,t)=>t in e||t in Rn})):e.proxy}function Mr(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}const Pr=(e,t)=>{const n=function(e,t,n=!1){let r,o;const l=h(e);return l?(r=e,o=s):(r=e.get,o=e.set),new vt(r,o,l||!o,n)}(e,0,Cr);return n};function Ar(e,t,n){const s=arguments.length;return 2===s?_(t)&&!f(t)?er(t)?or(e,null,[t]):or(e,t):or(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):3===s&&er(n)&&(n=[n]),or(e,t,n))}const Rr="3.4.36",jr="undefined"!=typeof document?document:null,Tr=jr&&jr.createElement("template"),Lr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r="svg"===t?jr.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?jr.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?jr.createElement(e,{is:n}):jr.createElement(e);return"select"===e&&s&&null!=s.multiple&&r.setAttribute("multiple",s.multiple),r},createText:e=>jr.createTextNode(e),createComment:e=>jr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>jr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const l=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==o&&(r=r.nextSibling););else{Tr.innerHTML="svg"===s?`${e}`:"mathml"===s?`${e}`:e;const r=Tr.content;if("svg"===s||"mathml"===s){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ir=Symbol("_vtc"); +/** +* @vue/runtime-dom v3.4.36 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const Vr=Symbol("_vod"),$r=Symbol("_vsh"),Nr=Symbol(""),Ur=/(^|;)\s*display\s*:/;const Dr=/\s*!important$/;function Br(e,t,n){if(f(n))n.forEach((n=>Br(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=function(e,t){const n=zr[t];if(n)return n;let s=E(t);if("filter"!==s&&s in e)return zr[t]=s;s=P(s);for(let r=0;r{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Pt(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Yr(),n}(s,r);qr(e,n,l,i)}else l&&(!function(e,t,n,s){e.removeEventListener(t,n,s)}(e,n,l,i),o[t]=void 0)}}const Qr=/(?:Once|Passive|Capture)$/;let Xr=0;const Zr=Promise.resolve(),Yr=()=>Xr||(Zr.then((()=>Xr=0)),Xr=Date.now());const eo=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const to=e=>{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>j(t,e):t};function no(e){e.target.composing=!0}function so(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ro=Symbol("_assign"),oo={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[ro]=to(r);const o=s||r.props&&"number"===r.props.type;qr(e,t?"change":"input",(t=>{if(t.target.composing)return;let s=e.value;n&&(s=s.trim()),o&&(s=L(s)),e[ro](s)})),n&&qr(e,"change",(()=>{e.value=e.value.trim()})),t||(qr(e,"compositionstart",no),qr(e,"compositionend",so),qr(e,"change",so))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},l){if(e[ro]=to(l),e.composing)return;const i=null==t?"":t;if((!o&&"number"!==e.type||/^0\d/.test(e.value)?e.value:L(e.value))!==i){if(document.activeElement===e&&"range"!==e.type){if(s&&t===n)return;if(r&&e.value.trim()===i)return}e.value=i}}},lo=["ctrl","shift","alt","meta"],io={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>lo.some((n=>e[`${n}Key`]&&!t.includes(n)))},co=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(n,...s)=>{for(let e=0;e{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=n=>{if(!("key"in n))return;const s=M(n.key);return t.some((e=>e===s||uo[e]===s))?e(n):void 0})},fo=i({patchProp:(e,t,n,s,r,i)=>{const c="svg"===r;"class"===t?function(e,t,n){const s=e[Ir];s&&(t=(t?[t,...s]:[...s]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,c):"style"===t?function(e,t,n){const s=e.style,r=v(n);let o=!1;if(n&&!r){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Br(s,t,"")}else for(const e in t)null==n[e]&&Br(s,e,"");for(const e in n)"display"===e&&(o=!0),Br(s,e,n[e])}else if(r){if(t!==n){const e=s[Nr];e&&(n+=";"+e),s.cssText=n,o=Ur.test(n)}}else t&&e.removeAttribute("style");Vr in e&&(e[Vr]=o?s.display:"",e[$r]&&(s.display="none"))}(e,n,s):o(t)?l(t)||Jr(e,t,0,s,i):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,s){if(s)return"innerHTML"===t||"textContent"===t||!!(t in e&&eo(t)&&h(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(eo(t)&&v(n))return!1;return t in e}(e,t,s,c))?(!function(e,t,n){if("innerHTML"===t||"textContent"===t){if(null==n)return;return void(e[t]=n)}const s=e.tagName;if("value"===t&&"PROGRESS"!==s&&!s.includes("-")){const r="OPTION"===s?e.getAttribute("value")||"":e.value,o=null==n?"":String(n);return r===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let r=!1;if(""===n||null==n){const s=typeof e[t];"boolean"===s?n=H(n):null==n&&"string"===s?(n="",r=!0):"number"===s&&(n=0,r=!0)}try{e[t]=n}catch(o){}r&&e.removeAttribute(t)}(e,t,s),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Kr(e,t,s,c,0,"value"!==t)):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),Kr(e,t,s,c))}},Lr);let po;function ho(){return po||(po=bs(fo))}const vo=(...e)=>{ho().render(...e)},go=(...e)=>{const t=ho().createApp(...e),{mount:n}=t;return t.mount=e=>{const s=function(e){if(v(e)){return document.querySelector(e)}return e}(e);if(!s)return;const r=t._component;h(r)||r.render||r.template||(r.template=s.innerHTML),s.innerHTML="";const o=n(s,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};export{wn as A,kn as B,Yt as C,Ys as D,Zt as E,W as F,cr as G,Cn as H,Bs as I,oo as J,xt as K,Fn as L,co as M,$ as N,or as O,ao as P,vo as Q,Ar as R,go as S,ot as a,Gs as b,Zs as c,rr as d,rt as e,Y as f,_r as g,pt as h,mt as i,it as j,ee as k,te as l,pr as m,Dt as n,pn as o,Zn as p,Ct as q,yt as r,Pr as s,ft as t,Yn as u,Et as v,Ms as w,Mn as x,ir as y,q as z}; diff --git a/web_version/v2/easyuse.js b/web_version/v2/easyuse.js index 39dda3d..75fab56 100644 --- a/web_version/v2/easyuse.js +++ b/web_version/v2/easyuse.js @@ -1,30 +1,2 @@ -!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";.easyuse-model-info{color:#fff;max-width:90vw;font-family:var(--font-family)}.easyuse-model-content{display:flex;flex-direction:column;overflow:hidden}.easyuse-model-header{margin:0 0 15px}.easyuse-model-header-remark{display:flex;align-items:center;margin-top:5px}.easyuse-model-info h2{text-align:left;margin:0}.easyuse-model-info h5{text-align:left;margin:0 15px 0 0;font-weight:400;color:var(--descrip-text)}.easyuse-model-info p{margin:5px 0}.easyuse-model-info a{color:var(--theme-color-light)}.easyuse-model-info a:hover{text-decoration:underline}.easyuse-model-tags-list{display:flex;flex-wrap:wrap;list-style:none;gap:10px;max-height:200px;overflow:auto;margin:10px 0;padding:0}.easyuse-model-tag{background-color:var(--comfy-input-bg);border:2px solid var(--border-color);color:var(--input-text);display:flex;align-items:center;gap:5px;border-radius:5px;padding:2px 5px;cursor:pointer}.easyuse-model-tag--selected span:before{content:"✅";position:absolute;background-color:var(--theme-color-light);left:0;top:0;right:0;bottom:0;text-align:center}.easyuse-model-tag:hover{border:2px solid var(--theme-color-light)}.easyuse-model-tag p{margin:0}.easyuse-model-tag span{text-align:center;border-radius:5px;background-color:var(--theme-color-light);padding:2px;position:relative;min-width:20px;overflow:hidden;color:#fff}.easyuse-model-metadata .comfy-modal-content{max-width:100%}.easyuse-model-metadata label{margin-right:1ch;color:#ccc}.easyuse-model-metadata span{color:var(--theme-color-light)}.easyuse-preview{max-width:660px;margin-right:15px;position:relative}.easyuse-preview-group{position:relative;overflow:hidden;border-radius:.5rem;width:660px}.easyuse-preview-list{display:flex;flex-wrap:nowrap;width:100%;transition:all .5s ease-in-out}.easyuse-preview-list.no-transition{transition:none}.easyuse-preview-slide{display:flex;flex-basis:calc(50% - 5px);flex-grow:0;flex-shrink:0;position:relative;justify-content:center;align-items:center;padding-right:5px;padding-left:0}.easyuse-preview-slide:nth-child(2n){padding-left:5px;padding-right:0}.easyuse-preview-slide-content{position:relative;min-height:150px;width:100%}.easyuse-preview-slide-content .save{position:absolute;right:6px;z-index:12;bottom:6px;display:flex;align-items:center;height:26px;padding:0 9px;color:var(--input-text);font-size:12px;line-height:26px;background:#00000080;border-radius:13px;cursor:pointer;min-width:80px;text-align:center}.easyuse-preview-slide-content .save:hover{filter:brightness(120%);will-change:auto}.easyuse-preview-slide-content img{border-radius:14px;object-position:center center;max-width:100%;max-height:700px;border-style:none;vertical-align:middle}.easyuse-preview button{position:absolute;z-index:10;top:50%;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:15px;border:1px solid rgba(66,63,78,.15);background-color:#423f4e80;color:#fffc;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transform:translateY(-50%)}.easyuse-preview button.left{left:10px}.easyuse-preview button.right{right:10px}.easyuse-model-detail{margin-top:16px;overflow:hidden;border:1px solid var(--border-color);border-radius:8px;width:300px}.easyuse-model-detail-head{height:40px;padding:0 10px;font-weight:500;font-size:14px;font-style:normal;line-height:40px}.easyuse-model-detail-body{box-sizing:border-box;font-size:12px}.easyuse-model-detail-item{display:flex;justify-content:flex-start;border-top:1px solid var(--border-color)}.easyuse-model-detail-item-label{flex-shrink:0;width:88px;padding-top:5px;padding-bottom:5px;padding-left:10px;border-right:1px solid var(--border-color);color:var(--input-text);font-weight:400}.easyuse-model-detail-item-value{display:flex;flex-wrap:wrap;padding:5px 10px;color:var(--input-text)}.easyuse-model-detail-textarea{border-top:1px solid var(--border-color);padding:10px;height:100px;overflow-y:auto;font-size:12px}.easyuse-model-detail-textarea textarea{width:100%;height:100%;border:0;background-color:transparent;color:var(--input-text)}.easyuse-model-detail-textarea textarea::placeholder{color:var(--descrip-text)}.easyuse-model-detail-textarea.empty{display:flex;justify-content:center;align-items:center;color:var(--descrip-text)}.easyuse-model-notes{background-color:#00000040;padding:5px;margin-top:5px}.easyuse-model-notes:empty{display:none}.easyuse-account-user{font-size:10px;color:var(--descrip-text);text-align:center}.easyuse-account-user-info{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;cursor:pointer}.easyuse-account-user-info .user{display:flex;align-items:center}.easyuse-account-user-info .edit{padding:5px 10px;background:var(--comfy-menu-bg);border-radius:4px}.easyuse-account-user-info:hover{filter:brightness(110%)}.easyuse-account-user-info h5{margin:0;font-size:10px;text-align:left}.easyuse-account-user-info h6{margin:0;font-size:8px;text-align:left;font-weight:300}.easyuse-account-user-info .remark{margin-top:4px}.easyuse-account-user-info .avatar{width:36px;height:36px;background:var(--comfy-input-bg);border-radius:50%;margin-right:5px;display:flex;justify-content:center;align-items:center;font-size:16px;overflow:hidden}.easyuse-account-user-info .avatar img{width:100%;height:100%}.easyuse-account-dialog{width:600px}.easyuse-account-dialog-main a,.easyuse-account-dialog-main a:visited{font-weight:400;color:var(--theme-color-light)}.easyuse-account-dialog-item{display:flex;justify-content:flex-start;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-color)}.easyuse-account-dialog-item input{padding:5px;margin-right:5px}.easyuse-account-dialog-item input.key{flex:1}.easyuse-account-dialog-item button{cursor:pointer;margin-left:5px!important;padding:5px!important;font-size:16px!important}.easyuse-account-dialog-item button:hover{filter:brightness(120%)}.easyuse-account-dialog-item button.choose{background:var(--theme-color)}.easyuse-account-dialog-item button.delete{background:var(--error-color)}.easy-dropdown,.easy-nested-dropdown{position:relative;box-sizing:border-box;background-color:#171717;box-shadow:0 4px 4px #ffffff40;padding:0;margin:0;list-style:none;z-index:1000;overflow:visible;max-height:fit-content;max-width:fit-content}.easy-dropdown{position:absolute;border-radius:0}.easy-dropdown li.item,.easy-nested-dropdown li.item{font-weight:400;min-width:max-content}.easy-dropdown li.folder,.easy-nested-dropdown li.folder{cursor:default;position:relative;border-right:3px solid cyan}.easy-dropdown li.folder:after,.easy-nested-dropdown li.folder:after{content:">";position:absolute;right:2px;font-weight:400}.easy-dropdown li,.easy-nested-dropdown li{padding:4px 10px;cursor:pointer;font-family:system-ui;font-size:.7rem;position:relative}.easy-nested-dropdown{position:absolute;top:0;left:100%;margin:0;border:none;display:none}.easy-dropdown li.selected>.easy-nested-dropdown,.easy-nested-dropdown li.selected>.easy-nested-dropdown{display:block;border:none}.easy-dropdown li.selected,.easy-nested-dropdown li.selected{background-color:#e5e5e5;border:none}:root{--theme-color:var(--primary-bg);--theme-color-light: var(--primary-hover-bg);--success-color: #52c41a;--error-color: #ff4d4f;--warning-color: #faad14;--font-family: Inter, -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;--p-inputtext-background: var(--p-form-field-background);--p-inputtext-disabled-background: var(--p-form-field-disabled-background);--p-inputtext-filled-background: var(--p-form-field-filled-background);--p-inputtext-filled-focus-background: var(--p-form-field-filled-focus-background);--p-inputtext-border-color: var(--p-form-field-border-color);--p-inputtext-hover-border-color: var(--p-form-field-hover-border-color);--p-inputtext-focus-border-color: var(--p-form-field-focus-border-color);--p-inputtext-invalid-border-color: var(--p-form-field-invalid-border-color);--p-inputtext-color: var(--p-form-field-color);--p-inputtext-disabled-color: var(--p-form-field-disabled-color);--p-inputtext-placeholder-color: var(--p-form-field-placeholder-color);--p-inputtext-shadow: var(--p-form-field-shadow);--p-inputtext-padding-x: var(--p-form-field-padding-x);--p-inputtext-padding-y: var(--p-form-field-padding-y);--p-inputtext-border-radius: var(--p-form-field-border-radius);--p-inputtext-focus-ring-width: var(--p-form-field-focus-ring-width);--p-inputtext-focus-ring-style: var(--p-form-field-focus-ring-style);--p-inputtext-focus-ring-color: var(--p-form-field-focus-ring-color);--p-inputtext-focus-ring-offset: var(--p-form-field-focus-ring-offset);--p-inputtext-focus-ring-shadow: var(--p-form-field-focus-ring-shadow);--p-inputtext-transition-duration: var(--p-form-field-transition-duration);--p-inputtext-sm-font-size: .875rem;--p-inputtext-sm-padding-x: .625rem;--p-inputtext-sm-padding-y: .375rem;--p-inputtext-lg-font-size: 1.125rem;--p-inputtext-lg-padding-x: .875rem;--p-inputtext-lg-padding-y: .625rem;--p-tag-font-size: .875rem;--p-tag-font-weight: 700;--p-tag-padding: .25rem .5rem;--p-tag-gap: .25rem;--p-tag-border-radius: var(--p-content-border-radius);--p-tag-rounded-border-radius: var(--p-border-radius-xl);--p-tag-icon-size: .75rem;--p-tag-primary-background: var(--p-primary-100);--p-tag-primary-color: var(--p-primary-700);--p-tag-secondary-background: var(--p-surface-100);--p-tag-secondary-color: var(--p-surface-600);--p-tag-success-background: var(--p-green-100);--p-tag-success-color: var(--p-green-700);--p-tag-info-background: var(--p-sky-100);--p-tag-info-color: var(--p-sky-700);--p-tag-warn-background: var(--p-orange-100);--p-tag-warn-color: var(--p-orange-700);--p-tag-danger-background: var(--p-red-100);--p-tag-danger-color: var(--p-red-700);--p-tag-contrast-background: var(--p-surface-950);--p-tag-contrast-color: var(--p-surface-0)}:root .dark-theme{--p-tag-font-size: .875rem;--p-tag-font-weight: 700;--p-tag-padding: .25rem .5rem;--p-tag-gap: .25rem;--p-tag-border-radius: var(--p-content-border-radius);--p-tag-rounded-border-radius: var(--p-border-radius-xl);--p-tag-icon-size: .75rem;--p-tag-primary-background: color-mix(in srgb, var(--p-primary-500), transparent 84%);--p-tag-primary-color: var(--p-primary-300);--p-tag-secondary-background: var(--p-surface-800);--p-tag-secondary-color: var(--p-surface-300);--p-tag-success-background: color-mix(in srgb, var(--p-green-500), transparent 84%);--p-tag-success-color: var(--p-green-300);--p-tag-info-background: color-mix(in srgb, var(--p-sky-500), transparent 84%);--p-tag-info-color: var(--p-sky-300);--p-tag-warn-background: color-mix(in srgb, var(--p-orange-500), transparent 84%);--p-tag-warn-color: var(--p-orange-300);--p-tag-danger-background: color-mix(in srgb, var(--p-red-500), transparent 84%);--p-tag-danger-color: var(--p-red-300);--p-tag-contrast-background: var(--p-surface-0);--p-tag-contrast-color: var(--p-surface-950)}.comfyui-easyuse-theme,.comfyui-easyuse-primary{color:var(--theme-color-light)}.comfyui-easyuse-theme.point:hover,.comfyui-easyuse-primary.point:hover{opacity:.8}.comfyui-easyuse-success{color:var(--success-color)}.comfyui-easyuse-success.point:hover{opacity:.8}.comfyui-easyuse-error{color:var(--error-color)}.comfyui-easyuse-error.point:hover{opacity:.8}.comfyui-easyuse-warning,.comfyui-easyuse--warn{color:var(--warning-color)}.comfyui-easyuse-warning.point:hover,.comfyui-easyuse--warn.point:hover{opacity:.8}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.grid{display:grid}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-20{gap:5rem}.gap-3{gap:.75rem}.gap-3\\.5{gap:.875rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.gap-\\[0\\.28rem\\]{gap:.28rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-6{row-gap:1.5rem}@media (min-width: 576px){.sm\\:col-span-4{grid-column:span 4/span 4}.sm\\:col-span-6{grid-column:span 6/span 6}.sm\\:ml-8{margin-left:2rem}.sm\\:mt-0{margin-top:0}.sm\\:flex{display:flex}.sm\\:h-60{height:15rem}.sm\\:\\!w-64{width:16rem!important}.sm\\:w-40{width:10rem}.sm\\:w-44{width:11rem}.sm\\:w-56{width:14rem}.sm\\:w-60{width:15rem}.sm\\:w-64{width:16rem}.sm\\:w-80{width:20rem}.sm\\:w-96{width:24rem}.sm\\:w-\\[30rem\\]{width:30rem}.sm\\:w-auto{width:auto}.sm\\:min-w-\\[30rem\\]{min-width:30rem}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:flex-nowrap{flex-wrap:nowrap}.sm\\:items-start{align-items:flex-start}.sm\\:items-end{align-items:flex-end}.sm\\:items-center{align-items:center}.sm\\:justify-center{justify-content:center}.sm\\:justify-between{justify-content:space-between}.sm\\:gap-2{gap:.5rem}.sm\\:p-20{padding:5rem}.sm\\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\\:py-10{padding-bottom:2.5rem;padding-top:2.5rem}.sm\\:py-5{padding-bottom:1.25rem;padding-top:1.25rem}.sm\\:pt-32{padding-top:8rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:-bottom-12{bottom:-3rem}.md\\:-bottom-28{bottom:-7rem}.md\\:-bottom-8{bottom:-2rem}.md\\:-bottom-\\[26rem\\]{bottom:-26rem}.md\\:-left-12{left:-3rem}.md\\:-left-28{left:-7rem}.md\\:-left-32{left:-8rem}.md\\:-left-4{left:-1rem}.md\\:-left-48{left:-12rem}.md\\:-left-\\[22rem\\]{left:-22rem}.md\\:bottom-0{bottom:0}.md\\:left-10{left:2.5rem}.md\\:left-\\[32rem\\]{left:32rem}.md\\:left-\\[42rem\\]{left:42rem}.md\\:top-1\\/2{top:50%}.md\\:top-32{top:8rem}.md\\:top-8{top:2rem}.md\\:col-span-2{grid-column:span 2/span 2}.md\\:col-span-4{grid-column:span 4/span 4}.md\\:col-span-6{grid-column:span 6/span 6}.md\\:ml-auto{margin-left:auto}.md\\:block{display:block}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:h-\\[20rem\\]{height:20rem}.md\\:h-\\[32rem\\]{height:32rem}.md\\:\\!w-80{width:20rem!important}.md\\:w-2\\/12{width:16.666667%}.md\\:w-40{width:10rem}.md\\:w-5\\/12{width:41.666667%}.md\\:w-56{width:14rem}.md\\:w-6\\/12{width:50%}.md\\:w-60{width:15rem}.md\\:w-8\\/12{width:66.666667%}.md\\:w-80{width:20rem}.md\\:w-\\[100rem\\]{width:100rem}.md\\:w-\\[26rem\\]{width:26rem}.md\\:w-\\[30rem\\]{width:30rem}.md\\:w-\\[50rem\\]{width:50rem}.md\\:w-\\[52rem\\]{width:52rem}.md\\:w-\\[60rem\\]{width:60rem}.md\\:w-\\[95rem\\]{width:95rem}.md\\:w-screen{width:100vw}.md\\:flex-initial{flex:0 1 auto}.md\\:-translate-y-1\\/2{--tw-translate-y: -50% }.md\\:-translate-y-1\\/2,.md\\:translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-0{--tw-translate-x: 0px }.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:flex-col{flex-direction:column}.md\\:items-end{align-items:flex-end}.md\\:items-center{align-items:center}.md\\:justify-start{justify-content:flex-start}.md\\:justify-center{justify-content:center}.md\\:gap-20{gap:5rem}.md\\:gap-4{gap:1rem}.md\\:p-5{padding:1.25rem}.md\\:p-8{padding:2rem}}@media (min-width: 992px){.lg\\:left-20{left:5rem}.lg\\:left-\\[36rem\\]{left:36rem}.lg\\:left-\\[50rem\\]{left:50rem}.lg\\:col-span-1{grid-column:span 1/span 1}.lg\\:col-span-2{grid-column:span 2/span 2}.lg\\:col-span-4{grid-column:span 4/span 4}.lg\\:col-span-6{grid-column:span 6/span 6}.lg\\:mb-0{margin-bottom:0}.lg\\:mt-0{margin-top:0}.lg\\:mt-20{margin-top:5rem}.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:h-10{height:2.5rem}.lg\\:h-32{height:8rem}.lg\\:h-\\[28rem\\]{height:28rem}.lg\\:\\!w-\\[30rem\\]{width:30rem!important}.lg\\:w-3\\/12{width:25%}.lg\\:w-32{width:8rem}.lg\\:w-\\[28rem\\]{width:28rem}.lg\\:w-\\[64rem\\]{width:64rem}.lg\\:w-fit{width:-moz-fit-content;width:fit-content}.lg\\:max-w-6xl{max-width:72rem}.lg\\:flex-row{flex-direction:row}.lg\\:gap-0{gap:0}.lg\\:rounded-2xl{border-radius:1rem}.lg\\:rounded-3xl{border-radius:1.5rem}.lg\\:rounded-xl{border-radius:.75rem}.lg\\:p-7{padding:1.75rem}.lg\\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\\:px-20{padding-left:5rem;padding-right:5rem}.lg\\:px-56{padding-left:14rem;padding-right:14rem}.lg\\:px-8{padding-left:2rem;padding-right:2rem}.lg\\:px-9{padding-left:2.25rem;padding-right:2.25rem}.lg\\:py-20{padding-bottom:5rem;padding-top:5rem}.lg\\:py-7{padding-bottom:1.75rem;padding-top:1.75rem}.lg\\:pt-0{padding-top:0}.lg\\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\\:text-5xl{font-size:3rem;line-height:1}.lg\\:text-base{font-size:1rem;line-height:1.5rem}.lg\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1200px){.xl\\:-left-12{left:-3rem}.xl\\:-left-28{left:-7rem}.xl\\:bottom-0{bottom:0}.xl\\:left-36{left:9rem}.xl\\:left-\\[42rem\\]{left:42rem}.xl\\:left-\\[60rem\\]{left:60rem}.xl\\:col-span-3{grid-column:span 3/span 3}.xl\\:col-span-4{grid-column:span 4/span 4}.xl\\:col-span-6{grid-column:span 6/span 6}.xl\\:block{display:block}.xl\\:flex{display:flex}.xl\\:hidden{display:none}.xl\\:h-\\[36\\.25rem\\]{height:36.25rem}.xl\\:\\!w-40{width:10rem!important}.xl\\:w-3\\/12{width:25%}.xl\\:w-6\\/12{width:50%}.xl\\:w-96{width:24rem}.xl\\:w-\\[29rem\\]{width:29rem}.xl\\:max-w-36{max-width:9rem}.xl\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\\:flex-row{flex-direction:row}.xl\\:items-start{align-items:flex-start}.xl\\:items-center{align-items:center}.xl\\:gap-1{gap:.25rem}.xl\\:gap-6{gap:1.5rem}.xl\\:text-left{text-align:left}}.comfyui-easyuse-toast{position:fixed;z-index:99999;top:0;left:0;height:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:start}.comfyui-easyuse-toast-container{position:relative;height:fit-content;padding:4px;margin-top:-100px;opacity:0;z-index:3;-webkit-transition:all .3s ease-in-out;-khtml-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.comfyui-easyuse-toast-container:last-child{z-index:1}.comfyui-easyuse-toast-container.show{opacity:1;margin-top:0!important;transform:translateY(0)}.comfyui-easyuse-toast-container:not(.show){z-index:1}.comfyui-easyuse-toast-container>div{position:relative;background:var(--comfy-menu-bg);color:var(--input-text);height:fit-content;box-shadow:0 0 10px #000000e0;padding:9px 12px;border-radius:var(--border-radius);font-size:14px;pointer-events:all;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-toast-container>div>span{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-toast-container>div>span i{font-size:16px;margin-right:8px}.comfyui-easyuse-toast-container>div>span i.loading{animation:loading-rotate 1s linear infinite}.comfyui-easyuse-toast-container a{cursor:pointer;text-decoration:underline;color:var(--theme-color-light);margin-left:4px;display:inline-block;line-height:1}.comfyui-easyuse-toast-container a:hover{color:var(--theme-color-light);text-decoration:none}@keyframes loading-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.comfyui-easyuse-selector{position:relative}.comfyui-easyuse-selector.hide{display:none}.comfyui-easyuse-selector__header{--height:26px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;height:var(--height);padding-bottom:10px;border-bottom:1px solid var(--border-color-solid)}.comfyui-easyuse-selector__header_button{height:var(--height);width:var(--height);border-radius:var(--border-radius);border:1px solid var(--border-color);font-size:11px;background:var(--bg-color);box-shadow:none;cursor:pointer;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-selector__header_button:hover{filter:brightness(1.2)}.comfyui-easyuse-selector__header_button:hover i{color:var(--error-color)}.comfyui-easyuse-selector__header_button i{font-size:16px;color:var(--input-text);-webkit-transition:all .3s ease-in-out;-khtml-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.comfyui-easyuse-selector__header_search{flex:1;margin-left:10px;border-radius:var(--border-radius);border:1px solid var(--border-color);font-size:11px;background:var(--bg-color);padding:0 8px;height:var(--height);display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-selector__header_search i{font-size:16px}.comfyui-easyuse-selector__header_search .search{vertical-align:middle;margin-left:5px;outline:none;resize:none;border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;overflow-y:scroll;background:transparent;width:100%;line-height:var(--height);font-size:12px;color:var(--input-text);-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-selector__content{list-style:none;padding:0;margin:0;min-height:150px;height:calc(100% - 28px);overflow-y:auto;overflow-x:hidden}.comfyui-easyuse-selector-item{display:inline-block;position:relative}.comfyui-easyuse-selector-item__tag{display:inline-block;vertical-align:middle;margin-top:8px;margin-right:8px;padding:4px;color:var(--input-text);background-color:var(--bg-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-size:11px;cursor:pointer;overflow:hidden;position:relative}.comfyui-easyuse-selector-item__tag:hover{filter:brightness(1.2)}.comfyui-easyuse-selector-item__tag.hide{display:none}.comfyui-easyuse-selector-item__tag input{--ring-color: transparent;position:relative;box-shadow:none;border:1px solid var(--border-color);border-radius:2px;background:linear-gradient(135deg,var(--comfy-menu-bg) 0%,var(--comfy-input-bg) 60%)}.comfyui-easyuse-selector-item__tag input[type=checkbox]{display:inline-block;flex-shrink:0;vertical-align:middle;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--border-color);background-origin:border-box;padding:0;width:1rem;height:1rem;border-radius:4px;color:var(--theme-color-light);-webkit-user-select:none;user-select:none}.comfyui-easyuse-selector-item__tag input[type=checkbox]:checked{border:1px solid var(--theme-color-light);background-color:var(--theme-color-light);background-image:url("data:image/svg+xml,%3csvg viewBox=\'0 0 16 16\' fill=\'white\' xmlns=\'http://www.w3.org/2000/svg\'%3e%3cpath d=\'M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z\'/%3e%3c/svg%3e")}.comfyui-easyuse-selector-item__tag input span{margin:0 4px;vertical-align:middle}.comfyui-easyuse-selector-preview{position:absolute;left:-180px;top:-110px;z-index:2;border:1px solid var(--border-color);border-radius:var(--border-radius);background:var(--comfy-menu-bg);-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px);overflow:hidden}.comfyui-easyuse-selector-preview img{width:150px;height:150px}.comfyui-easyuse-selector-preview__text{font-size:12px;padding:5px 10px;max-width:130px;color:var(--input-text)}.comfyui-easyuse-selector-preview__text h6{line-height:1.15;font-size:10px;margin:10px 0}.comfyui-easyuse-dialog{max-width:600px}.comfyui-easyuse-dialog-title{font-size:18px;font-weight:700;text-align:center;color:var(--input-text);margin:0}.comfyui-easyuse-dialog-images{margin-top:10px;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box}.comfyui-easyuse-dialog-images img{width:50%;height:auto;cursor:pointer;box-sizing:border-box;filter:brightness(80%)}.comfyui-easyuse-dialog-images img:hover{filter:brightness(100%)}.comfyui-easyuse-dialog-images.selected{border:4px solid var(--success-color)}.comfyui-easyuse-dialog-hidden{display:none;height:0}.comfyui-easyuse-contextmenu{--height: 26px;--padding: 8px;font-family:var(--font-family);position:fixed;top:0;left:0;width:100%;max-width:200px;min-width:100px;min-height:100px;padding:var(--padding) 0;box-shadow:0 0 10px #00000040;background-color:var(--tr-odd-bg-color);border-radius:var(--border-radius);z-index:10;will-change:transform}.comfyui-easyuse-contextmenu-item-divider{height:1px;width:100%;background-color:var(--border-color);margin:var(--padding) 0}.comfyui-easyuse-contextmenu-item-content{height:var(--height);padding:0 12px;cursor:pointer;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-contextmenu-item-content span{font-size:11px;color:var(--input-text);display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-contextmenu-item-content i{color:var(--input-text);margin-left:4px;display:block;width:0;height:0;border-width:4px 4px 0;border-style:solid;border-color:var(--descrip-text) transparent transparent;-webkit-transform:scaleY(.8) rotate(-90deg);-khtml-transform:scaleY(.8) rotate(-90deg);-moz-transform:scaleY(.8) rotate(-90deg);-ms-transform:scaleY(.8) rotate(-90deg);-o-transform:scaleY(.8) rotate(-90deg);transform:scaleY(.8) rotate(-90deg)}.comfyui-easyuse-contextmenu-item-content:hover{background:var(--theme-color)}.comfyui-easyuse-contextmenu-item.disabled .comfyui-easyuse-contextmenu-item-content span{color:var(--border-color);cursor:default}.comfyui-easyuse-contextmenu-item.disabled .comfyui-easyuse-contextmenu-item-content:hover{background:transparent}.comfyui-easyuse-contextmenu-submenu{font-family:var(--font-family);position:absolute;top:0;left:200px;max-width:200px;width:200px;min-width:100px;min-height:--height;padding:var(--padding) 0;box-shadow:0 0 10px #00000040;background-color:var(--tr-odd-bg-color);border-radius:var(--border-radius);z-index:10;will-change:transform}.comfyui-easyuse-contextmenu-model{position:relative}.comfyui-easyuse-contextmenu-model:hover img{display:block;opacity:1}.comfyui-easyuse-contextmenu-model img{position:absolute;z-index:1;right:-175px;top:-75px;width:150px;height:auto;display:none;filter:brightness(70%);-webkit-filter:brightness(70%);opacity:0;-webkit-transition:all .5s cubic-bezier(.55,0,.1,1);-khtml-transition:all .5s cubic-bezier(.55,0,.1,1);-moz-transition:all .5s cubic-bezier(.55,0,.1,1);-ms-transition:all .5s cubic-bezier(.55,0,.1,1);-o-transition:all .5s cubic-bezier(.55,0,.1,1);transition:all .5s cubic-bezier(.55,0,.1,1)}.comfyui-easyuse-slider{width:100%;height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-slider-item{height:inherit;min-width:25px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-direction:column;-khtml-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column}.comfyui-easyuse-slider-item-input{height:15px;font-size:10px;color:var(--input-text)}.comfyui-easyuse-slider-item-label{height:15px;border:none;color:var(--descrip-text);font-size:8px}.comfyui-easyuse-slider-item-scroll{width:5px;height:calc(100% - 30px);background:var(--comfy-input-bg);border-radius:10px;position:relative}.comfyui-easyuse-slider-item-bar{width:10px;height:10px;background:linear-gradient(to bottom,var(--input-text),var(--descrip-text));border-radius:100%;box-shadow:0 2px 10px var(--bg-color);position:absolute;top:0;left:-2.5px;cursor:pointer;z-index:1}.comfyui-easyuse-slider-item-area{width:100%;border-radius:20px;position:absolute;bottom:0;background:var(--input-text);z-index:0}.comfyui-easyuse-slider-item.positive .comfyui-easyuse-slider-item-label{color:var(--success-color)}.comfyui-easyuse-slider-item.positive .comfyui-easyuse-slider-item-area{background:var(--success-color)}.comfyui-easyuse-slider-item.negative .comfyui-easyuse-slider-item-label{color:var(--error-color)}.comfyui-easyuse-slider-item.negative .comfyui-easyuse-slider-item-area{background:var(--error-color)}.comfyui-easyuse-map{height:100%;background:var(--comfy-menu-bg)}.comfyui-easyuse-map .p-splitter-gutter-handle{height:1px!important}.comfyui-easyuse-map-nodes{height:100%;position:relative}.comfyui-easyuse-map-nodes__header{position:absolute;z-index:2;top:0;left:0;width:100%;padding:.25rem 0 .25rem 1rem;height:2.7rem;background:var(--comfy-menu-bg);border-bottom:1px solid var(--border-color);display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px)}.comfyui-easyuse-map-nodes__header .title{font-size:13px;color:var(--input-text);font-weight:400;line-height:1.5}.comfyui-easyuse-map-nodes__header .toolbar{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes__header .toolbar .icon{font-size:.85rem;margin-left:.25rem;cursor:pointer}.comfyui-easyuse-map-nodes__content{position:relative;padding:2.7rem 0 0;height:100%;overflow:auto}.comfyui-easyuse-map-nodes__content dl .label{padding-left:1rem}.comfyui-easyuse-map-nodes__content ol,.comfyui-easyuse-map-nodes__content dl{list-style-type:none;padding:0;margin:0}.comfyui-easyuse-map-nodes__content ol .toolbar span,.comfyui-easyuse-map-nodes__content dl .toolbar span{font-size:13px}.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye{color:var(--input-text)}.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye-slash,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye-slash{color:var(--descrip-text)}.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye-slash.never,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye-slash.never{opacity:.5}.comfyui-easyuse-map-nodes__content .no_result{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;text-align:center}.comfyui-easyuse-map-nodes-group{position:relative;overflow:hidden;width:100%;height:2rem;cursor:default;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes-group .left,.comfyui-easyuse-map-nodes-group .right{height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes-group .left{padding-left:.5rem;margin-right:.25rem;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-map-nodes-group .icon{font-size:.85rem;margin-right:.25rem}.comfyui-easyuse-map-nodes-group .label{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;height:100%;width:100%;min-width:80px}.comfyui-easyuse-map-nodes-group .label span{font-size:14px;color:var(--input-text);font-weight:400;line-height:1.5;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.comfyui-easyuse-map-nodes-group:hover{background:var(--content-hover-bg)!important}.comfyui-easyuse-map-nodes-group.active{background:var(--theme-color)!important}.comfyui-easyuse-map-nodes-group.active .label{color:#fff;cursor:default}.comfyui-easyuse-map-nodes-group.never .label{color:var(--descrip-text);opacity:.4}.comfyui-easyuse-map-nodes-group.bypass .label{color:var(--descrip-text)}.comfyui-easyuse-map-nodes-node{height:2rem;cursor:default;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;position:relative;overflow:hidden}.comfyui-easyuse-map-nodes-node .label{text-indent:.5rem;font-size:13px;color:var(--input-text);font-weight:400;line-height:1.5;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;margin-right:.25rem;height:2rem;line-height:2rem;width:100%;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical}.comfyui-easyuse-map-nodes-node .label.error{color:var(--error-color)}.comfyui-easyuse-map-nodes-node:hover{background:var(--content-hover-bg)!important}.comfyui-easyuse-map-nodes-node.never .label{color:var(--descrip-text);opacity:.5}.comfyui-easyuse-map-nodes-node.bypass .label{color:#f0f;opacity:.5}.comfyui-easyuse-map-nodes .nodes .label{text-indent:1rem}.no-result-placeholder{display:flex;justify-content:center;align-items:center;height:100%}.no-result-placeholder-content{text-align:center;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-khtml-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between}.no-result-placeholder .p-card{background-color:transparent!important;box-shadow:none;text-align:center}.no-result-placeholder h3{color:var(--input-text);margin-bottom:.5rem}.no-result-placeholder p{color:var(--descrip-text);margin-bottom:1rem;margin-top:0}#comfyui-easyuse-components{position:absolute;top:0;left:0;z-index:2}.comfyui-easyuse{--p-datatable-header-cell-padding: .15rem 1rem;--p-datatable-body-cell-padding: .15rem 1rem;--p-primary-color: var(--theme-color-light)!important;--border-color-solid: var(--border-color);--border-radius: 8px}.comfyui-easyuse.dark-theme{--fg-color: #fff;--bg-color: #242427;--content-bg:#18181b;--content-fg:#fff;--content-hover-bg: #27272a;--comfy-menu-bg: rgba(24,24,27,.9);--comfy-input-bg: #242427;--input-text: #ffffff;--descrip-text: #71717a;--drag-text: #ccc;--error-text: #ff4444;--border-color: #3f3f46;--border-color-solid: #2a2a2e;--tr-even-bg-color: rgba(28,28,28,.9);--tr-odd-bg-color: rgba(19,19,19,.9)}.comfyui-easyuse ::-webkit-scrollbar{width:0em}.comfyui-easyuse ::-webkit-scrollbar-track{background-color:transparent}.comfyui-easyuse ::-webkit-scrollbar-thumb{background-color:transparent;border-radius:2px}.comfyui-easyuse ::-webkit-scrollbar-thumb:hover{background-color:transparent}.comfyui-easyuse body{font-family:var(--font-family)!important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.comfyui-easyuse textarea{font-family:var(--font-family)!important}.comfyui-easyuse hr{border:1px solid var(--border-color)}.comfyui-easyuse .comfy-multiline-input{background-color:transparent;border:1px solid var(--border-color-solid);border-radius:var(--border-radius);padding:8px;font-size:12px}.comfyui-easyuse #comfy-settings-dialog{border:1px solid var(--border-color);background:transparent;-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%);box-shadow:none}.comfyui-easyuse .comfy-modal{border:1px solid var(--border-color);box-shadow:none;-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .cm-title{background-color:transparent!important}.comfyui-easyuse .cm-notice-board{border-radius:10px!important;border:1px solid var(--border-color)!important}.comfyui-easyuse .cm-menu-container{margin-bottom:50px!important}.comfyui-easyuse .cn-manager-custom_milk_white .tg-column-name,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-column-name{color:var(--input-text)}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-message,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-message{text-align:center;color:var(--descrip-text)!important}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .tg-cell,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .tg-cell{color:var(--input-text)}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .cn-node-name a,.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .cmm-node-name a,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .cn-node-name a,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .cmm-node-name a{color:var(--theme-color)!important}.comfyui-easyuse .comfy-menu{border-radius:16px;box-shadow:0 0 1px var(--descrip-text);-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .comfy-menu button.comfy-settings-btn{font-size:12px}.comfyui-easyuse .comfy-menu-btns{margin-bottom:4px}.comfyui-easyuse .comfy-menu button,.comfyui-easyuse .comfy-modal button{font-size:14px;padding:4px 0;margin-bottom:4px}.comfyui-easyuse .comfy-menu-btns button,.comfyui-easyuse .comfy-list-actions button{font-size:10px}.comfyui-easyuse .comfy-menu>button,.comfyui-easyuse .comfy-menu-btns button,.comfyui-easyuse .comfy-menu .comfy-list button,.comfyui-easyuse .comfy-modal button{border-width:1px}.comfyui-easyuse #comfy-dev-save-api-button{justify-content:center}.comfyui-easyuse #queue-button{position:relative;overflow:hidden;min-height:30px;z-index:1}.comfyui-easyuse #queue-button:after{clear:both;content:attr(data-attr);background:green;color:#fff;width:var(--process-bar-width);height:100%;position:absolute;top:0;left:0;z-index:0;text-align:center;display:flex;justify-content:center;align-items:center}.comfyui-easyuse #shareButton{background:linear-gradient(to left,var(--theme-color),var(--theme-color-light))!important;color:#fff!important}.comfyui-easyuse .litegraph.litecontextmenu{--height: 24px;--padding: 6px;font-family:var(--font-family);padding:var(--padding) 0;border-radius:var(--border-radius);-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .litegraph.litecontextmenu .litemenu-title{padding:var(--padding)}.comfyui-easyuse .litegraph.litecontextmenu>div:first-child.litemenu-title{margin-top:-6px}.comfyui-easyuse .litegraph.litecontextmenu .submenu{height:var(--height);line-height:var(--height);padding:0 18px 0 12px;margin:0;background:transparent!important}.comfyui-easyuse .litegraph.litecontextmenu .submenu.has_submenu{border-right:none;position:relative}.comfyui-easyuse .litegraph.litecontextmenu .submenu.has_submenu:after{content:"";display:block;width:0;height:0;border-width:4px 4px 0;border-style:solid;border-color:var(--input-text) transparent transparent;transform:translateY(-50%) rotate(-90deg);top:50%;position:absolute}.comfyui-easyuse .litegraph.litecontextmenu .submenu.separator{height:1px;width:100%;background-color:var(--border-color)!important;margin:var(--padding) 0;border:none}.comfyui-easyuse .litegraph.litecontextmenu .submenu:last-child.separator{display:none}.comfyui-easyuse .litegraph.litecontextmenu .submenu:hover:not(.separator){background:var(--theme-color)!important}.comfyui-easyuse .litegraph.lite-search-item{background-color:var(--comfy-input-bg)!important;filter:brightness(100%)}.comfyui-easyuse .litegraph.lite-search-item:hover{filter:brightness(120%);color:var(--input-text)}.comfyui-easyuse .graphdialog{-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .graphdialog button{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse .comfyui-menu{border-bottom:1px solid var(--bg-color)}.comfyui-easyuse .side-tool-bar-container{border-right:1px solid var(--bg-color)}.comfyui-easyuse .comfy-modal-content{width:100%}.comfyui-easyuse-poseEditor{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;text-align:center;font-size:18px;line-height:1.5}#comfyui-menu-monitor{width:120px}#comfyui-menu-monitor #crystools-monitor-container{margin:0 auto!important}#comfyui-menu-monitor #crystools-monitor-container>div{margin:2px 0!important}#comfyui-menu-monitor #crystools-monitor-container>div>div>div{padding:0 4px!important}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); -var e,t,n,o,i,r,s,a,l,c,u,d,p,f,h,m,g=Object.defineProperty,v=(e,t,n)=>((e,t,n)=>t in e?g(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);let y=(null==(t=null==(e=window.comfyAPI)?void 0:e.app)?void 0:t.app)||null,b=(null==(o=null==(n=window.comfyAPI)?void 0:n.api)?void 0:o.api)||null,_=(null==(r=null==(i=window.comfyAPI)?void 0:i.ui)?void 0:r.$el)||null,w=(null==(a=null==(s=window.comfyAPI)?void 0:s.dialog)?void 0:a.ComfyDialog)||null,S=(null==(c=null==(l=window.comfyAPI)?void 0:l.widgets)?void 0:c.ComfyWidgets)||null,x=(null==(d=null==(u=window.comfyAPI)?void 0:u.utils)?void 0:d.applyTextReplacements)||null,k=(null==(f=null==(p=window.comfyAPI)?void 0:p.groupNode)?void 0:f.GroupNodeConfig)||null;const C=(e,t=void 0)=>{var n,o;return e?null==(o=null==(n=null==y?void 0:y.ui)?void 0:n.settings)?void 0:o.getSettingValue(e,t):null};function A(e,t=null,n=void 0){try{let o=e?C(e,n):null;return void 0===o&&t&&(o=localStorage[e]),o}catch(o){return null}}async function E(e,t,n=null){var o,i;try{(null==(i=null==(o=null==y?void 0:y.ui)?void 0:o.settings)?void 0:i.setSettingValue)?y.ui.settings.setSettingValue(e,t):await b.storeSetting(e,t),n&&(localStorage[n]="object"==typeof t?JSON.stringify(t):t)}catch(r){}}function O(e,t){if(e="number"==typeof e?e:e instanceof Date?e.getTime():parseInt(e),isNaN(e))return null;let n=new Date(e);(e=n.toString().split(/[\s\:]/g).slice(0,-2))[1]=["01","02","03","04","05","06","07","08","09","10","11","12"][n.getMonth()];let o={MM:1,dd:2,yyyy:3,hh:4,mm:5,ss:6};return t.replace(/([Mmdhs]|y{2})\1/g,(t=>e[o[t]]))}const L="comfyui-easyuse-",T="dark-theme",N="#236692",I={PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd"},P=0x4000000000000,D=["loaders","latent","image","mask","sampling","_for_testing","advanced","utils","api"],j={ALWAYS:0,NEVER:2,BYPASS:4},M="easyuse_nodes_map",R=LGraphCanvas.node_colors.bgcolor,$={ColorPalette:{version:104,id:"obsidian",name:"Obsidian",colors:{node_slot:{CLIP:"#FFD500",CLIP_VISION:"#A8DADC",CLIP_VISION_OUTPUT:"#ad7452",CONDITIONING:"#FFA931",CONTROL_NET:"#6EE7B7",IMAGE:"#64B5F6",LATENT:"#FF9CF9",MASK:"#81C784",MODEL:"#B39DDB",STYLE_MODEL:"#C2FFAE",VAE:"#FF6E6E",TAESD:"#DCC274",PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd"},litegraph_base:{BACKGROUND_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQBJREFUeNrs1rEKwjAUhlETUkj3vP9rdmr1Ysammk2w5wdxuLgcMHyptfawuZX4pJSWZTnfnu/lnIe/jNNxHHGNn//HNbbv+4dr6V+11uF527arU7+u63qfa/bnmh8sWLBgwYJlqRf8MEptXPBXJXa37BSl3ixYsGDBMliwFLyCV/DeLIMFCxYsWLBMwSt4Be/NggXLYMGCBUvBK3iNruC9WbBgwYJlsGApeAWv4L1ZBgsWLFiwYJmCV/AK3psFC5bBggULloJX8BpdwXuzYMGCBctgwVLwCl7Be7MMFixYsGDBsu8FH1FaSmExVfAxBa/gvVmwYMGCZbBg/W4vAQYA5tRF9QYlv/QAAAAASUVORK5CYII=",CLEAR_BACKGROUND_COLOR:"#09090b",NODE_TITLE_COLOR:"#d4d4d8",NODE_SELECTED_TITLE_COLOR:"#ffffff",NODE_TEXT_SIZE:14,NODE_TEXT_COLOR:"#ffffff",NODE_SUBTEXT_SIZE:12,NODE_DEFAULT_COLOR:"#09090b",NODE_DEFAULT_BGCOLOR:"rgba(24,24,27,.9)",NODE_DEFAULT_BOXCOLOR:"rgba(255,255,255,.75)",NODE_DEFAULT_SHAPE:"box",NODE_BOX_OUTLINE_COLOR:N,DEFAULT_SHADOW_COLOR:"rgba(0,0,0,0)",DEFAULT_GROUP_FONT:24,WIDGET_BGCOLOR:"#242427",WIDGET_OUTLINE_COLOR:"#3f3f46",WIDGET_TEXT_COLOR:"#d4d4d8",WIDGET_SECONDARY_TEXT_COLOR:"#d4d4d8",LINK_COLOR:"#9A9",EVENT_LINK_COLOR:"#A86",CONNECTING_LINK_COLOR:"#AFA"},comfy_base:{"fg-color":"#fff","bg-color":"#09090b","comfy-menu-bg":"rgba(24,24,24,.9)","comfy-input-bg":"#262626","input-text":"#ddd","descrip-text":"#999","drag-text":"#ccc","error-text":"#ff4444","border-color":"#29292c","tr-even-bg-color":"rgba(28,28,28,.9)","tr-odd-bg-color":"rgba(19,19,19,.9)"}}},NODE_COLORS:{red:{color:"#af3535",bgcolor:R,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:R,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:R,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:R,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:R,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:R,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:R,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:R,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:R,groupcolor:"#444"}}};let G=JSON.parse(JSON.stringify($));delete G.NODE_COLORS,G.ColorPalette.id="obsidian_dark",G.ColorPalette.name="Obsidian Dark",G.ColorPalette.colors.litegraph_base.BACKGROUND_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGlmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuMTQ2Mjg5OSwgMjAyMy8wNi8yNS0yMDowMTo1NSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDI1LjEgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMy0xMS0xM1QwMDoxODowMiswMTowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjMtMTEtMTVUMDI6MDQ6NTkrMDE6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMTEtMTVUMDI6MDQ6NTkrMDE6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmIyYzRhNjA5LWJmYTctYTg0MC1iOGFlLTk3MzE2ZjM1ZGIyNyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjk0ZmNlZGU4LTE1MTctZmQ0MC04ZGU3LWYzOTgxM2E3ODk5ZiIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjIzMWIxMGIwLWI0ZmItMDI0ZS1iMTJlLTMwNTMwM2NkMDdjOCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MjMxYjEwYjAtYjRmYi0wMjRlLWIxMmUtMzA1MzAzY2QwN2M4IiBzdEV2dDp3aGVuPSIyMDIzLTExLTEzVDAwOjE4OjAyKzAxOjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjUuMSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQ4OWY1NzlmLTJkNjUtZWQ0Zi04OTg0LTA4NGE2MGE1ZTMzNSIgc3RFdnQ6d2hlbj0iMjAyMy0xMS0xNVQwMjowNDo1OSswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDI1LjEgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpiMmM0YTYwOS1iZmE3LWE4NDAtYjhhZS05NzMxNmYzNWRiMjciIHN0RXZ0OndoZW49IjIwMjMtMTEtMTVUMDI6MDQ6NTkrMDE6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyNS4xIChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4OTe6GAAAAx0lEQVR42u3WMQoAIQxFwRzJys77X8vSLiRgITif7bYbgrwYc/mKXyBoY4VVBgsWLFiwYFmOlTv+9jfDOjHmr8u6eVkGCxYsWLBgmc5S8ApewXvgYRksWLBgKXidpeBdloL3wMOCBctgwVLwCl7BuyyDBQsWLFiwTGcpeAWv4D3wsAwWLFiwFLzOUvAuS8F74GHBgmWwYCl4Ba/gXZbBggULFixYprMUvIJX8B54WAYLFixYCl5nKXiXpeA98LBgwTJYsGC9tg1o8f4TTtqzNQAAAABJRU5ErkJggg==",G.ColorPalette.colors.litegraph_base.CLEAR_BACKGROUND_COLOR="#000";const B=LGraphCanvas.node_colors.bgcolor,F={ColorPalette:{id:"milk_white",name:"Milk White",colors:{node_slot:{CLIP:"#FFA726",CLIP_VISION:"#5C6BC0",CLIP_VISION_OUTPUT:"#8D6E63",CONDITIONING:"#EF5350",CONTROL_NET:"#66BB6A",IMAGE:"#42A5F5",LATENT:"#AB47BC",MASK:"#9CCC65",MODEL:"#7E57C2",STYLE_MODEL:"#D4E157",VAE:"#FF7043",PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd"},litegraph_base:{BACKGROUND_IMAGE:"data:image/gif;base64,R0lGODlhZABkALMAAAAAAP///+vr6+rq6ujo6Ofn5+bm5uXl5d3d3f///wAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAABkAGQAAAT/UMhJq7046827HkcoHkYxjgZhnGG6si5LqnIM0/fL4qwwIMAg0CAsEovBIxKhRDaNy2GUOX0KfVFrssrNdpdaqTeKBX+dZ+jYvEaTf+y4W66mC8PUdrE879f9d2mBeoNLfH+IhYBbhIx2jkiHiomQlGKPl4uZe3CaeZifnnijgkESBqipqqusra6vsLGys62SlZO4t7qbuby7CLa+wqGWxL3Gv3jByMOkjc2lw8vOoNSi0czAncXW3Njdx9Pf48/Z4Kbbx+fQ5evZ4u3k1fKR6cn03vHlp7T9/v8A/8Gbp4+gwXoFryXMB2qgwoMMHyKEqA5fxX322FG8tzBcRnMW/zlulPbRncmQGidKjMjyYsOSKEF2FBlJQMCbOHP6c9iSZs+UnGYCdbnSo1CZI5F64kn0p1KnTH02nSoV3dGTV7FFHVqVq1dtWcMmVQZTbNGu72zqXMuW7danVL+6e4t1bEy6MeueBYLXrNO5Ze36jQtWsOG97wIj1vt3St/DjTEORss4nNq2mDP3e7w4r1bFkSET5hy6s2TRlD2/mSxXtSHQhCunXo26NevCpmvD/UU6tuullzULH76q92zdZG/Ltv1a+W+osI/nRmyc+fRi1Xdbh+68+0vv10dH3+77KD/i6IdnX669/frn5Zsjh4/2PXju8+8bzc9/6fj27LFnX11/+IUnXWl7BJfegm79FyB9JOl3oHgSklefgxAC+FmFGpqHIYcCfkhgfCohSKKJVo044YUMttggiBkmp6KFXw1oII24oYhjiDByaKOOHcp3Y5BD/njikSkO+eBREQAAOw==",CLEAR_BACKGROUND_COLOR:"lightgray",NODE_TITLE_COLOR:"#222",NODE_SELECTED_TITLE_COLOR:"#000",NODE_TEXT_SIZE:14,NODE_TEXT_COLOR:"#444",NODE_SUBTEXT_SIZE:12,NODE_DEFAULT_COLOR:"#F7F7F7",NODE_DEFAULT_BGCOLOR:"#F5F5F5",NODE_DEFAULT_BOXCOLOR:"#555",NODE_DEFAULT_SHAPE:"box",NODE_BOX_OUTLINE_COLOR:"#000",DEFAULT_SHADOW_COLOR:"rgba(0,0,0,0.1)",DEFAULT_GROUP_FONT:24,WIDGET_BGCOLOR:"#D4D4D4",WIDGET_OUTLINE_COLOR:"#999",WIDGET_TEXT_COLOR:"#222",WIDGET_SECONDARY_TEXT_COLOR:"#555",LINK_COLOR:"#9A9",EVENT_LINK_COLOR:"#FF9800",CONNECTING_LINK_COLOR:"#222"},comfy_base:{"fg-color":"#222","bg-color":"#DDD","comfy-menu-bg":"#F5F5F5","comfy-input-bg":"#C9C9C9","input-text":"#222","descrip-text":"#444","drag-text":"#555","error-text":"#F44336","border-color":"#bbb","tr-even-bg-color":"#f9f9f9","tr-odd-bg-color":"#fff","content-bg":"#e0e0e0","content-fg":"#222","content-hover-bg":"#adadad","content-hover-fg":"#222"}}},NODE_COLORS:{red:{color:"#af3535",bgcolor:B,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:B,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:B,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:B,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:B,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:B,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:B,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:B,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:B,groupcolor:"#444"}}},U={"Workflow created by":"工作流创建者","Watch more video content":"观看更多视频内容","Workflow Guide":"工作流指南","💎 View Checkpoint Info...":"💎 查看 Checkpoint 信息...","💎 View Lora Info...":"💎 查看 Lora 信息...","🔃 Reload Node":"🔃 刷新节点","Updated At:":"最近更新:","Created At:":"首次发布:","✏️ Edit":"✏️ 编辑","💾 Save":"💾 保存","No notes":"当前还没有备注内容","Saving Notes...":"正在保存备注...","Type your notes here":"在这里输入备注内容",ModelName:"模型名称","Models Required":"所需模型","Download Model":"下载模型","Source Url":"模型源地址",Notes:"备注",Type:"类型","Trained Words":"训练词",BaseModel:"基础算法",Details:"详情",Description:"描述",Download:"下载量",Source:"来源","Saving Preview...":"正在保存预览图...","Saving Succeed":"保存成功","Clean SuccessFully":"清理成功","Clean Failed":"清理失败","Saving Failed":"保存失败","No COMBO link":"沒有找到COMBO连接","Reboot ComfyUI":"重启ComfyUI","Are you sure you'd like to reboot the server?":"是否要重启ComfyUI?","Nodes Map":"管理节点组","No Nodes":"未找到节点","No nodes found in the map":"在工作流程中没有找到节点","Expand All":"展开所有组","Collapse All":"折叠所有组",Queue:"队列","Cleanup Of GPU Usage":"清理GPU占用","Please stop all running tasks before cleaning GPU":"请在清理GPU之前停止所有运行中的任务",Always:"启用中",Bypass:"已忽略",Never:"已停用","Auto Sorting":"自动排序","Toggle `Show/Hide` can set mode of group, LongPress can set group nodes to never":"点击`启用中/已忽略`可设置组模式, 长按可停用该组节点","Enable Shift+Up/Down/Left/Right key to align selected nodes":"启用 `Shift+上/下/左/右` 键对齐选中的节点","Enable Shift+g to add selected nodes to a group":"启用 `Shift+g` 键将选中的节点添加一个组","Enable Up/Down/Left/Right key to jump nearest nodes":"启用 `上/下/左/右` 键跳转到最近的前后节点","Enable ALT+1~9 to paste nodes from nodes template":"启用 `ALT+1~9` 从节点模板粘贴到工作流中","Enable contextMenu auto nest subdirectories":"启用上下文菜单自动嵌套子目录","Enable right-click menu to add node A~Z sorting":"启用右键菜单中新建节点A~Z排序","Enable model thumbnails display":"启动模型预览图显示","Enable nodes runtime display":"启动节点运行时间显示","Enable chain get node and set node with parent nodes":"启用将获取点和设置点与父节点链在一起","Too many thumbnails, have closed the display":"模型缩略图太多啦,为您关闭了显示","Get styles list Failed":"获取样式列表失败","Get style image Failed":"获取样式图片失败","Empty All":"清空所有","Type here to search styles ...":"在此处输入以搜索样式 ...","Loading UserInfo...":"正在获取用户信息...","Please set the APIKEY first":"请先设置APIKEY","Setting APIKEY":"设置APIKEY","Save Account Info":"保存账号信息",Choose:"选择",Delete:"删除",Edit:"编辑","At least one account is required":"删除失败: 至少需要一个账户","APIKEY is not Empty":"APIKEY 不能为空","Add Account":"添加账号","Getting Your APIKEY":"获取您的APIKEY","Choose Selected Images":"选择选中的图片","Choose images to continue":"选择图片以继续",Background:"背景",Hat:"帽子",Hair:"头发",Body:"身体",Face:"脸部",Clothes:"衣服",Others:"其他",Glove:"手套",Sunglasses:"太阳镜","Upper-clothes":"上衣",Dress:"连衣裙",Coat:"外套",Socks:"袜子",Pants:"裤子",Jumpsuits:"连体衣",Scarf:"围巾",Skirt:"裙子","Left-arm":"左臂","Right-arm":"右臂","Left-leg":"左腿","Right-leg":"右腿","Left-shoe":"左鞋","Right-shoe":"右鞋",s:"秒","No Node Templates Found":"未找到节点模板预设","Get Node Templates File Failed":"获取节点模板文件失败","Node template with {key} not set":"未设置快捷键为{key}的节点预设","ComfyUI Basic":"ComfyUI 基础节点","Recommend Nodes":"推荐节点","Others A~Z":"其他节点 A~Z"},z=A("AGL.Locale"),V=(e,t=!1)=>"zh-CN"===(t?navigator.language:z)&&U[e]||e,H={addGroup:{id:"EasyUse.Hotkeys.AddGroup",name:V("Enable Shift+g to add selected nodes to a group"),tooltip:V(""),type:"boolean",defaultValue:!0},alignSelectedNodes:{id:"EasyUse.Hotkeys.AlignSelectedNodes",name:V("Enable Shift+Up/Down/Left/Right key to align selected nodes"),tooltip:V(""),type:"boolean",defaultValue:!0},nodesTemplate:{id:"EasyUse.Hotkeys.NodesTemplate",name:V("Enable ALT+1~9 to paste nodes from nodes template"),tooltip:V(""),type:"boolean",defaultValue:!0},jumpNearestNodes:{id:"EasyUse.Hotkeys.JumpNearestNodes",name:V("Enable Up/Down/Left/Right key to jump nearest nodes"),tooltip:V(""),type:"boolean",defaultValue:!0},subDirectories:{id:"EasyUse.ContextMenu.SubDirectories",name:V("Enable contextMenu auto nest subdirectories"),tooltip:V(""),type:"boolean",defaultValue:!0},modelsThumbnails:{id:"EasyUse.ContextMenu.ModelsThumbnails",name:V("Enable model thumbnails display"),tooltip:V(""),type:"boolean",defaultValue:!0},rightMenuNodesSort:{id:"EasyUse.ContextMenu.NodesSort",name:V("Enable right-click menu to add node A~Z sorting"),tooltip:V(""),type:"boolean",defaultValue:!0},nodesRuntime:{id:"EasyUse.Nodes.Runtime",name:V("Enable nodes runtime display"),tooltip:V(""),type:"boolean",defaultValue:!0},chainGetSet:{id:"EasyUse.Nodes.ChainGetSet",name:V("Enable chain get node and set node with parent nodes"),tooltip:V(""),type:"boolean",defaultValue:!0}};function W(e=100,t){return new Promise((n=>{setTimeout((()=>{n(t)}),e)}))} -/** -* @vue/shared v3.4.36 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */function Y(e,t){const n=new Set(e.split(","));return e=>n.has(e)}const Z={},K=[],X=()=>{},Q=()=>!1,J=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),q=e=>e.startsWith("onUpdate:"),ee=Object.assign,te=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ne=Object.prototype.hasOwnProperty,oe=(e,t)=>ne.call(e,t),ie=Array.isArray,re=e=>"[object Map]"===fe(e),se=e=>"[object Set]"===fe(e),ae=e=>"function"==typeof e,le=e=>"string"==typeof e,ce=e=>"symbol"==typeof e,ue=e=>null!==e&&"object"==typeof e,de=e=>(ue(e)||ae(e))&&ae(e.then)&&ae(e.catch),pe=Object.prototype.toString,fe=e=>pe.call(e),he=e=>fe(e).slice(8,-1),me=e=>"[object Object]"===fe(e),ge=e=>le(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,ve=Y(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ye=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},be=/-(\w)/g,_e=ye((e=>e.replace(be,((e,t)=>t?t.toUpperCase():"")))),we=/\B([A-Z])/g,Se=ye((e=>e.replace(we,"-$1").toLowerCase())),xe=ye((e=>e.charAt(0).toUpperCase()+e.slice(1))),ke=ye((e=>e?`on${xe(e)}`:"")),Ce=(e,t)=>!Object.is(e,t),Ae=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Oe=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Le;const Te=()=>Le||(Le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function Ne(e){if(ie(e)){const t={};for(let n=0;n{if(e){const n=e.split(Pe);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function Me(e){let t="";if(le(e))t=e;else if(ie(e))for(let n=0;n!(!e||!0!==e.__v_isRef),Be=e=>le(e)?e:null==e?"":ie(e)||ue(e)&&(e.toString===pe||!ae(e.toString))?Ge(e)?Be(e.value):JSON.stringify(e,Fe,2):String(e),Fe=(e,t)=>Ge(t)?Fe(e,t.value):re(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[Ue(t,o)+" =>"]=n,e)),{})}:se(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>Ue(e)))}:ce(t)?Ue(t):!ue(t)||ie(t)||me(t)?t:String(t),Ue=(e,t="")=>{var n;return ce(e)?`Symbol(${null!=(n=e.description)?n:t})`:e}; -/** -* @vue/reactivity v3.4.36 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -let ze,Ve;class He{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ze,!e&&ze&&(this.index=(ze.scopes||(ze.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=ze;try{return ze=this,e()}finally{ze=t}}}on(){ze=this}off(){ze=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),nt()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Je,t=Ve;try{return Je=!0,Ve=this,this._runnings++,Ke(this),this.fn()}finally{Xe(this),this._runnings--,Ve=t,Je=e}}stop(){this.active&&(Ke(this),Xe(this),this.onStop&&this.onStop(),this.active=!1)}}function Ke(e){e._trackId++,e._depsLength=0}function Xe(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},ct=new WeakMap,ut=Symbol(""),dt=Symbol("");function pt(e,t,n){if(Je&&Ve){let t=ct.get(e);t||ct.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=lt((()=>t.delete(n)))),rt(Ve,o)}}function ft(e,t,n,o,i,r){const s=ct.get(e);if(!s)return;let a=[];if("clear"===t)a=[...s.values()];else if("length"===n&&ie(e)){const e=Number(o);s.forEach(((t,n)=>{("length"===n||!ce(n)&&n>=e)&&a.push(t)}))}else switch(void 0!==n&&a.push(s.get(n)),t){case"add":ie(e)?ge(n)&&a.push(s.get("length")):(a.push(s.get(ut)),re(e)&&a.push(s.get(dt)));break;case"delete":ie(e)||(a.push(s.get(ut)),re(e)&&a.push(s.get(dt)));break;case"set":re(e)&&a.push(s.get(ut))}ot();for(const l of a)l&&at(l,4);it()}const ht=Y("__proto__,__v_isRef,__isVue"),mt=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(ce)),gt=vt();function vt(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=on(this);for(let t=0,i=this.length;t{e[t]=function(...e){tt(),ot();const n=on(this)[t].apply(this,e);return it(),nt(),n}})),e}function yt(e){ce(e)||(e=String(e));const t=on(this);return pt(t,0,e),t.hasOwnProperty(e)}class bt{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(o?i?Kt:Zt:i?Yt:Wt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=ie(e);if(!o){if(r&&oe(gt,t))return Reflect.get(gt,t,n);if("hasOwnProperty"===t)return yt}const s=Reflect.get(e,t,n);return(ce(t)?mt.has(t):ht(t))?s:(o||pt(e,0,t),i?s:dn(s)?r&&ge(t)?s:s.value:ue(s)?o?Qt(s):Xt(s):s)}}class _t extends bt{constructor(e=!1){super(!1,e)}set(e,t,n,o){let i=e[t];if(!this._isShallow){const t=en(i);if(tn(n)||en(n)||(i=on(i),n=on(n)),!ie(e)&&dn(i)&&!dn(n))return!t&&(i.value=n,!0)}const r=ie(e)&&ge(t)?Number(t)e,At=e=>Reflect.getPrototypeOf(e);function Et(e,t,n=!1,o=!1){const i=on(e=e.__v_raw),r=on(t);n||(Ce(t,r)&&pt(i,0,t),pt(i,0,r));const{has:s}=At(i),a=o?Ct:n?an:sn;return s.call(i,t)?a(e.get(t)):s.call(i,r)?a(e.get(r)):void(e!==i&&e.get(t))}function Ot(e,t=!1){const n=this.__v_raw,o=on(n),i=on(e);return t||(Ce(e,i)&&pt(o,0,e),pt(o,0,i)),e===i?n.has(e):n.has(e)||n.has(i)}function Lt(e,t=!1){return e=e.__v_raw,!t&&pt(on(e),0,ut),Reflect.get(e,"size",e)}function Tt(e,t=!1){t||tn(e)||en(e)||(e=on(e));const n=on(this);return At(n).has.call(n,e)||(n.add(e),ft(n,"add",e,e)),this}function Nt(e,t,n=!1){n||tn(t)||en(t)||(t=on(t));const o=on(this),{has:i,get:r}=At(o);let s=i.call(o,e);s||(e=on(e),s=i.call(o,e));const a=r.call(o,e);return o.set(e,t),s?Ce(t,a)&&ft(o,"set",e,t):ft(o,"add",e,t),this}function It(e){const t=on(this),{has:n,get:o}=At(t);let i=n.call(t,e);i||(e=on(e),i=n.call(t,e)),o&&o.call(t,e);const r=t.delete(e);return i&&ft(t,"delete",e,void 0),r}function Pt(){const e=on(this),t=0!==e.size,n=e.clear();return t&&ft(e,"clear",void 0,void 0),n}function Dt(e,t){return function(n,o){const i=this,r=i.__v_raw,s=on(r),a=t?Ct:e?an:sn;return!e&&pt(s,0,ut),r.forEach(((e,t)=>n.call(o,a(e),a(t),i)))}}function jt(e,t,n){return function(...o){const i=this.__v_raw,r=on(i),s=re(r),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=i[e](...o),u=n?Ct:t?an:sn;return!t&&pt(r,0,l?dt:ut),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Mt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Rt(){const e={get(e){return Et(this,e)},get size(){return Lt(this)},has:Ot,add:Tt,set:Nt,delete:It,clear:Pt,forEach:Dt(!1,!1)},t={get(e){return Et(this,e,!1,!0)},get size(){return Lt(this)},has:Ot,add(e){return Tt.call(this,e,!0)},set(e,t){return Nt.call(this,e,t,!0)},delete:It,clear:Pt,forEach:Dt(!1,!0)},n={get(e){return Et(this,e,!0)},get size(){return Lt(this,!0)},has(e){return Ot.call(this,e,!0)},add:Mt("add"),set:Mt("set"),delete:Mt("delete"),clear:Mt("clear"),forEach:Dt(!0,!1)},o={get(e){return Et(this,e,!0,!0)},get size(){return Lt(this,!0)},has(e){return Ot.call(this,e,!0)},add:Mt("add"),set:Mt("set"),delete:Mt("delete"),clear:Mt("clear"),forEach:Dt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=jt(i,!1,!1),n[i]=jt(i,!0,!1),t[i]=jt(i,!1,!0),o[i]=jt(i,!0,!0)})),[e,n,t,o]}const[$t,Gt,Bt,Ft]=Rt();function Ut(e,t){const n=t?e?Ft:Bt:e?Gt:$t;return(t,o,i)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(oe(n,o)&&o in t?n:t,o,i)}const zt={get:Ut(!1,!1)},Vt={get:Ut(!1,!0)},Ht={get:Ut(!0,!1)},Wt=new WeakMap,Yt=new WeakMap,Zt=new WeakMap,Kt=new WeakMap;function Xt(e){return en(e)?e:Jt(e,!1,St,zt,Wt)}function Qt(e){return Jt(e,!0,xt,Ht,Zt)}function Jt(e,t,n,o,i){if(!ue(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const s=(a=e).__v_skip||!Object.isExtensible(a)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(he(a));var a;if(0===s)return e;const l=new Proxy(e,2===s?o:n);return i.set(e,l),l}function qt(e){return en(e)?qt(e.__v_raw):!(!e||!e.__v_isReactive)}function en(e){return!(!e||!e.__v_isReadonly)}function tn(e){return!(!e||!e.__v_isShallow)}function nn(e){return!!e&&!!e.__v_raw}function on(e){const t=e&&e.__v_raw;return t?on(t):e}function rn(e){return Object.isExtensible(e)&&Ee(e,"__v_skip",!0),e}const sn=e=>ue(e)?Xt(e):e,an=e=>ue(e)?Qt(e):e;class ln{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ze((()=>e(this._value)),(()=>un(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=on(this);return e._cacheable&&!e.effect.dirty||!Ce(e._value,e._value=e.effect.run())||un(e,4),cn(e),e.effect._dirtyLevel>=2&&un(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function cn(e){var t;Je&&Ve&&(e=on(e),rt(Ve,null!=(t=e.dep)?t:e.dep=lt((()=>e.dep=void 0),e instanceof ln?e:void 0)))}function un(e,t=4,n,o){const i=(e=on(e)).dep;i&&at(i,t)}function dn(e){return!(!e||!0!==e.__v_isRef)}function pn(e){return function(e,t){if(dn(e))return e;return new fn(e,t)}(e,!1)}class fn{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:on(e),this._value=t?e:sn(e)}get value(){return cn(this),this._value}set value(e){const t=this.__v_isShallow||tn(e)||en(e);e=t?e:on(e),Ce(e,this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=t?e:sn(e),un(this,4))}}function hn(e){return dn(e)?e.value:e}const mn={get:(e,t,n)=>hn(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return dn(i)&&!dn(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function gn(e){return qt(e)?e:new Proxy(e,mn)}class vn{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=ct.get(e);return n&&n.get(t)}(on(this._object),this._key)}}class yn{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function bn(e,t,n){return dn(e)?e:ae(e)?new yn(e):ue(e)&&arguments.length>1?_n(e,t,n):pn(e)}function _n(e,t,n){const o=e[t];return dn(o)?o:new vn(e,t,n)} -/** -* @vue/runtime-core v3.4.36 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function wn(e,t,n,o){try{return o?e(...o):e()}catch(i){xn(i,t,n)}}function Sn(e,t,n,o){if(ae(e)){const i=wn(e,t,n,o);return i&&de(i)&&i.catch((e=>{xn(e,t,n)})),i}if(ie(e)){const i=[];for(let r=0;r>>1,i=An[o],r=$n(i);r$n(e)-$n(t)));if(On.length=0,Ln)return void Ln.push(...e);for(Ln=e,Tn=0;Tnnull==e.id?1/0:e.id,Gn=(e,t)=>{const n=$n(e)-$n(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Bn(e){Cn=!1,kn=!0,An.sort(Gn);try{for(En=0;En{o._d&&Bi(-1);const i=zn(t);let r;try{r=e(...n)}finally{zn(i),o._d&&Bi(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Hn(e,t){if(null===Fn)return e;const n=yr(Fn),o=e.dirs||(e.dirs=[]);for(let i=0;i!!e.type.__asyncLoader,Kn=e=>e.type.__isKeepAlive;function Xn(e,t){Jn(e,"a",t)}function Qn(e,t){Jn(e,"da",t)}function Jn(e,t,n=sr){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(eo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Kn(e.parent.vnode)&&qn(o,t,n,e),e=e.parent}}function qn(e,t,n,o){const i=eo(t,e,o,!0);ao((()=>{te(o[t],i)}),n)}function eo(e,t,n=sr,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...o)=>{tt();const i=ur(n),r=Sn(t,n,e,o);return i(),nt(),r});return o?i.unshift(r):i.push(r),r}}const to=e=>(t,n=sr)=>{hr&&"sp"!==e||eo(e,((...e)=>t(...e)),n)},no=to("bm"),oo=to("m"),io=to("bu"),ro=to("u"),so=to("bum"),ao=to("um"),lo=to("sp"),co=to("rtg"),uo=to("rtc");function po(e,t=sr){eo("ec",e,t)}const fo="components",ho="directives";function mo(e,t){return vo(fo,e,!0,t)||e}const go=Symbol.for("v-ndc");function vo(e,t,n=!0,o=!1){const i=Fn||sr;if(i){const n=i.type;if(e===fo){const e=br(n,!1);if(e&&(e===t||e===_e(t)||e===xe(_e(t))))return n}const r=yo(i[e]||n[e],t)||yo(i.appContext[e],t);return!r&&o?n:r}}function yo(e,t){return e&&(e[t]||e[_e(t)]||e[xe(_e(t))])}function bo(e,t,n,o){let i;const r=n;if(ie(e)||le(e)){i=new Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,r)));else{const n=Object.keys(e);i=new Array(n.length);for(let o=0,s=n.length;o!Vi(e)||e.type!==Di&&!(e.type===Ii&&!wo(e.children))))?e:null}const So=e=>e?pr(e)?yr(e):So(e.parent):null,xo=ee(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>So(e.parent),$root:e=>So(e.root),$emit:e=>e.emit,$options:e=>No(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Dn(e.update)}),$nextTick:e=>e.n||(e.n=Pn.bind(e.proxy)),$watch:e=>wi.bind(e)}),ko=(e,t)=>e!==Z&&!e.__isScriptSetup&&oe(e,t),Co={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:o,data:i,props:r,accessCache:s,type:a,appContext:l}=e;let c;if("$"!==t[0]){const a=s[t];if(void 0!==a)switch(a){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(ko(o,t))return s[t]=1,o[t];if(i!==Z&&oe(i,t))return s[t]=2,i[t];if((c=e.propsOptions[0])&&oe(c,t))return s[t]=3,r[t];if(n!==Z&&oe(n,t))return s[t]=4,n[t];Eo&&(s[t]=0)}}const u=xo[t];let d,p;return u?("$attrs"===t&&pt(e.attrs,0,""),u(e)):(d=a.__cssModules)&&(d=d[t])?d:n!==Z&&oe(n,t)?(s[t]=4,n[t]):(p=l.config.globalProperties,oe(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return ko(i,t)?(i[t]=n,!0):o!==Z&&oe(o,t)?(o[t]=n,!0):!oe(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(r[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:r}},s){let a;return!!n[s]||e!==Z&&oe(e,s)||ko(t,s)||(a=r[0])&&oe(a,s)||oe(o,s)||oe(xo,s)||oe(i.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ao(e){return ie(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Eo=!0;function Oo(e){const t=No(e),n=e.proxy,o=e.ctx;Eo=!1,t.beforeCreate&&Lo(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:s,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:f,updated:h,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:y,destroyed:b,unmounted:_,render:w,renderTracked:S,renderTriggered:x,errorCaptured:k,serverPrefetch:C,expose:A,inheritAttrs:E,components:O,directives:L,filters:T}=t;if(c&&function(e,t){ie(e)&&(e=jo(e));for(const n in e){const o=e[n];let i;i=ue(o)?"default"in o?zo(o.from||n,o.default,!0):zo(o.from||n):zo(o),dn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(c,o,null),s)for(const I in s){const e=s[I];ae(e)&&(o[I]=e.bind(n))}if(i){const t=i.call(n,n);ue(t)&&(e.data=Xt(t))}if(Eo=!0,r)for(const I in r){const e=r[I],t=ae(e)?e.bind(n,n):ae(e.get)?e.get.bind(n,n):X,i=!ae(e)&&ae(e.set)?e.set.bind(n):X,s=_r({get:t,set:i});Object.defineProperty(o,I,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(a)for(const I in a)To(a[I],o,n,I);if(l){const e=ae(l)?l.call(n):l;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(sr){let n=sr.provides;const o=sr.parent&&sr.parent.provides;o===n&&(n=sr.provides=Object.create(o)),n[e]=t}else;}(t,e[t])}))}function N(e,t){ie(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&Lo(u,e,"c"),N(no,d),N(oo,p),N(io,f),N(ro,h),N(Xn,m),N(Qn,g),N(po,k),N(uo,S),N(co,x),N(so,y),N(ao,_),N(lo,C),ie(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});w&&e.render===X&&(e.render=w),null!=E&&(e.inheritAttrs=E),O&&(e.components=O),L&&(e.directives=L)}function Lo(e,t,n){Sn(ie(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function To(e,t,n,o){const i=o.includes(".")?Si(n,o):()=>n[o];if(le(e)){const n=t[e];ae(n)&&bi(i,n)}else if(ae(e))bi(i,e.bind(n));else if(ue(e))if(ie(e))e.forEach((e=>To(e,t,n,o)));else{const o=ae(e.handler)?e.handler.bind(n):t[e.handler];ae(o)&&bi(i,o,e)}}function No(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,a=r.get(t);let l;return a?l=a:i.length||n||o?(l={},i.length&&i.forEach((e=>Io(l,e,s,!0))),Io(l,t,s)):l=t,ue(t)&&r.set(t,l),l}function Io(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Io(e,r,n,!0),i&&i.forEach((t=>Io(e,t,n,!0)));for(const s in t)if(o&&"expose"===s);else{const o=Po[s]||n&&n[s];e[s]=o?o(e[s],t[s]):t[s]}return e}const Po={data:Do,props:$o,emits:$o,methods:Ro,computed:Ro,beforeCreate:Mo,created:Mo,beforeMount:Mo,mounted:Mo,beforeUpdate:Mo,updated:Mo,beforeDestroy:Mo,beforeUnmount:Mo,destroyed:Mo,unmounted:Mo,activated:Mo,deactivated:Mo,errorCaptured:Mo,serverPrefetch:Mo,components:Ro,directives:Ro,watch:function(e,t){if(!e)return t;if(!t)return e;const n=ee(Object.create(null),e);for(const o in t)n[o]=Mo(e[o],t[o]);return n},provide:Do,inject:function(e,t){return Ro(jo(e),jo(t))}};function Do(e,t){return t?e?function(){return ee(ae(e)?e.call(this,this):e,ae(t)?t.call(this,this):t)}:t:e}function jo(e){if(ie(e)){const t={};for(let n=0;n(r.has(e)||(e&&ae(e.install)?(r.add(e),e.install(a,...t)):ae(e)&&(r.add(e),e(a,...t))),a),mixin:e=>(i.mixins.includes(e)||i.mixins.push(e),a),component:(e,t)=>t?(i.components[e]=t,a):i.components[e],directive:(e,t)=>t?(i.directives[e]=t,a):i.directives[e],mount(r,l,c){if(!s){const u=Ki(n,o);return u.appContext=i,!0===c?c="svg":!1===c&&(c=void 0),l&&t?t(u,r):e(u,r,c),s=!0,a._container=r,r.__vue_app__=a,yr(u.component)}},unmount(){s&&(e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(i.provides[e]=t,a),runWithContext(e){const t=Uo;Uo=a;try{return e()}finally{Uo=t}}};return a}}let Uo=null;function zo(e,t,n=!1){const o=sr||Fn;if(o||Uo){const i=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:Uo._context.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&ae(t)?t.call(o&&o.proxy):t}}const Vo={},Ho=()=>Object.create(Vo),Wo=e=>Object.getPrototypeOf(e)===Vo;function Yo(e,t,n,o=!1){const i={},r=Ho();e.propsDefaults=Object.create(null),Zo(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:Jt(i,!1,kt,Vt,Yt):e.type.props?e.props=i:e.props=r,e.attrs=r}function Zo(e,t,n,o){const[i,r]=e.propsOptions;let s,a=!1;if(t)for(let l in t){if(ve(l))continue;const c=t[l];let u;i&&oe(i,u=_e(l))?r&&r.includes(u)?(s||(s={}))[u]=c:n[u]=c:Ei(e.emitsOptions,l)||l in o&&c===o[l]||(o[l]=c,a=!0)}if(r){const t=on(n),o=s||Z;for(let s=0;s{l=!0;const[n,o]=Qo(e,t,!0);ee(s,n),o&&a.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!r&&!l)return ue(e)&&o.set(e,K),K;if(ie(r))for(let u=0;u"_"===e[0]||"$stable"===e,ei=e=>ie(e)?e.map(qi):[qi(e)],ti=(e,t,n)=>{if(t._n)return t;const o=Vn(((...e)=>ei(t(...e))),n);return o._c=!1,o},ni=(e,t,n)=>{const o=e._ctx;for(const i in e){if(qo(i))continue;const n=e[i];if(ae(n))t[i]=ti(0,n,o);else if(null!=n){const e=ei(n);t[i]=()=>e}}},oi=(e,t)=>{const n=ei(t);e.slots.default=()=>n},ii=(e,t,n)=>{for(const o in t)(n||"_"!==o)&&(e[o]=t[o])},ri=(e,t,n)=>{const o=e.slots=Ho();if(32&e.vnode.shapeFlag){const e=t._;e?(ii(o,t,n),n&&Ee(o,"_",e,!0)):ni(t,o)}else t&&oi(e,t)},si=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=Z;if(32&o.shapeFlag){const e=t._;e?n&&1===e?r=!1:ii(i,t,n):(r=!t.$stable,ni(t,i)),s=t}else t&&(oi(e,t),s={default:1});if(r)for(const a in i)qo(a)||null!=s[a]||delete i[a]};function ai(e,t,n,o,i=!1){if(ie(e))return void e.forEach(((e,r)=>ai(e,t&&(ie(t)?t[r]:t),n,o,i)));if(Zn(o)&&!i)return;const r=4&o.shapeFlag?yr(o.component):o.el,s=i?null:r,{i:a,r:l}=e,c=t&&t.r,u=a.refs===Z?a.refs={}:a.refs,d=a.setupState;if(null!=c&&c!==l&&(le(c)?(u[c]=null,oe(d,c)&&(d[c]=null)):dn(c)&&(c.value=null)),ae(l))wn(l,a,12,[s,u]);else{const t=le(l),o=dn(l);if(t||o){const a=()=>{if(e.f){const n=t?oe(d,l)?d[l]:u[l]:l.value;i?ie(n)&&te(n,r):ie(n)?n.includes(r)||n.push(r):t?(u[l]=[r],oe(d,l)&&(d[l]=u[l])):(l.value=[r],e.k&&(u[e.k]=l.value))}else t?(u[l]=s,oe(d,l)&&(d[l]=s)):o&&(l.value=s,e.k&&(u[e.k]=s))};s?(a.id=-1,ci(a,n)):a()}}}const li=Symbol("_vte"),ci=function(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):(ie(n=e)?On.push(...n):Ln&&Ln.includes(n,n.allowRecurse?Tn+1:Tn)||On.push(n),jn());var n};function ui(e){return function(e){Te().__VUE__=!0;const{insert:t,remove:n,patchProp:o,createElement:i,createText:r,createComment:s,setText:a,setElementText:l,parentNode:c,nextSibling:u,setScopeId:d=X,insertStaticContent:p}=e,f=(e,t,n,o=null,i=null,r=null,s=void 0,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Hi(e,t)&&(o=F(e),M(e,i,r,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case Pi:h(e,t,n,o);break;case Di:m(e,t,n,o);break;case ji:null==e&&g(t,n,o,s);break;case Ii:A(e,t,n,o,i,r,s,a,l);break;default:1&d?b(e,t,n,o,i,r,s,a,l):6&d?E(e,t,n,o,i,r,s,a,l):(64&d||128&d)&&c.process(e,t,n,o,i,r,s,a,l,V)}null!=u&&i&&ai(u,e&&e.ref,r,t||e,!t)},h=(e,n,o,i)=>{if(null==e)t(n.el=r(n.children),o,i);else{const t=n.el=e.el;n.children!==e.children&&a(t,n.children)}},m=(e,n,o,i)=>{null==e?t(n.el=s(n.children||""),o,i):n.el=e.el},g=(e,t,n,o)=>{[e.el,e.anchor]=p(e.children,t,n,o,e.el,e.anchor)},v=({el:e,anchor:n},o,i)=>{let r;for(;e&&e!==n;)r=u(e),t(e,o,i),e=r;t(n,o,i)},y=({el:e,anchor:t})=>{let o;for(;e&&e!==t;)o=u(e),n(e),e=o;n(t)},b=(e,t,n,o,i,r,s,a,l)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?_(t,n,o,i,r,s,a,l):x(e,t,i,r,s,a,l)},_=(e,n,r,s,a,c,u,d)=>{let p,f;const{props:h,shapeFlag:m,transition:g,dirs:v}=e;if(p=e.el=i(e.type,c,h&&h.is,h),8&m?l(p,e.children):16&m&&S(e.children,p,null,s,a,di(e,c),u,d),v&&Wn(e,null,s,"created"),w(p,e,e.scopeId,u,s),h){for(const e in h)"value"===e||ve(e)||o(p,e,null,h[e],c,s);"value"in h&&o(p,"value",null,h.value,c),(f=h.onVnodeBeforeMount)&&or(f,s,e)}v&&Wn(e,null,s,"beforeMount");const y=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(a,g);y&&g.beforeEnter(p),t(p,n,r),((f=h&&h.onVnodeMounted)||y||v)&&ci((()=>{f&&or(f,s,e),y&&g.enter(p),v&&Wn(e,null,s,"mounted")}),a)},w=(e,t,n,o,i)=>{if(n&&d(e,n),o)for(let r=0;r{for(let c=l;c{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;const f=e.props||Z,h=t.props||Z;let m;if(n&&pi(n,!1),(m=h.onVnodeBeforeUpdate)&&or(m,n,t,e),p&&Wn(t,e,n,"beforeUpdate"),n&&pi(n,!0),(f.innerHTML&&null==h.innerHTML||f.textContent&&null==h.textContent)&&l(c,""),d?k(e.dynamicChildren,d,c,n,i,di(t,r),s):a||I(e,t,c,null,n,i,di(t,r),s,!1),u>0){if(16&u)C(c,f,h,n,r);else if(2&u&&f.class!==h.class&&o(c,"class",null,h.class,r),4&u&&o(c,"style",f.style,h.style,r),8&u){const e=t.dynamicProps;for(let t=0;t{m&&or(m,n,t,e),p&&Wn(t,e,n,"updated")}),i)},k=(e,t,n,o,i,r,s)=>{for(let a=0;a{if(t!==n){if(t!==Z)for(const s in t)ve(s)||s in n||o(e,s,t[s],null,r,i);for(const s in n){if(ve(s))continue;const a=n[s],l=t[s];a!==l&&"value"!==s&&o(e,s,l,a,r,i)}"value"in n&&o(e,"value",t.value,n.value,r)}},A=(e,n,o,i,s,a,l,c,u)=>{const d=n.el=e?e.el:r(""),p=n.anchor=e?e.anchor:r("");let{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=n;m&&(c=c?c.concat(m):m),null==e?(t(d,o,i),t(p,o,i),S(n.children||[],o,p,s,a,l,c,u)):f>0&&64&f&&h&&e.dynamicChildren?(k(e.dynamicChildren,h,o,s,a,l,c),(null!=n.key||s&&n===s.subTree)&&fi(e,n,!0)):I(e,n,o,p,s,a,l,c,u)},E=(e,t,n,o,i,r,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?i.ctx.activate(t,n,o,s,l):O(t,n,o,i,r,s,l):L(e,t,l)},O=(e,t,n,o,i,r,s)=>{const a=e.component=function(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||ir,r={uid:rr++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new He(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Qo(o,i),emitsOptions:Ai(o,i),emit:null,emitted:null,propsDefaults:Z,inheritAttrs:o.inheritAttrs,ctx:Z,data:Z,props:Z,attrs:Z,slots:Z,refs:Z,setupState:Z,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};r.ctx={_:r},r.root=t?t.root:r,r.emit=Ci.bind(null,r),e.ce&&e.ce(r);return r}(e,o,i);if(Kn(e)&&(a.ctx.renderer=V),function(e,t=!1,n=!1){t&&cr(t);const{props:o,children:i}=e.vnode,r=pr(e);Yo(e,o,r,t),ri(e,i,n);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Co);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,vr),slots:e.slots,emit:e.emit,expose:t}}(e):null,i=ur(e);tt();const r=wn(o,e,0,[e.props,n]);if(nt(),i(),de(r)){if(r.then(dr,dr),t)return r.then((n=>{mr(e,n,t)})).catch((t=>{xn(t,e,0)}));e.asyncDep=r}else mr(e,r,t)}else gr(e,t)}(e,t):void 0;t&&cr(!1)}(a,!1,s),a.asyncDep){if(i&&i.registerDep(a,T,s),!e.el){const e=a.subTree=Ki(Di);m(null,e,t,n)}}else T(a,e,t,n,i,r,s)},L=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:i,component:r}=e,{props:s,children:a,patchFlag:l}=t,c=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!i&&!a||a&&a.$stable)||o!==s&&(o?!s||Ni(o,s,c):!!s);if(1024&l)return!0;if(16&l)return o?Ni(o,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;tEn&&An.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},T=(e,t,n,o,i,r,s)=>{const a=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:l,vnode:u}=e;{const n=hi(e);if(n)return t&&(t.el=u.el,N(e,t,s)),void n.asyncDep.then((()=>{e.isUnmounted||a()}))}let d,p=t;pi(e,!1),t?(t.el=u.el,N(e,t,s)):t=u,n&&Ae(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&or(d,l,t,u),pi(e,!0);const h=Oi(e),m=e.subTree;e.subTree=h,f(m,h,c(m.el),F(m),e,i,r),t.el=h.el,null===p&&function({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,h.el),o&&ci(o,i),(d=t.props&&t.props.onVnodeUpdated)&&ci((()=>or(d,l,t,u)),i)}else{let s;const{el:a,props:l}=t,{bm:c,m:u,parent:d}=e,p=Zn(t);if(pi(e,!1),c&&Ae(c),!p&&(s=l&&l.onVnodeBeforeMount)&&or(s,d,t),pi(e,!0),a&&W){const n=()=>{e.subTree=Oi(e),W(a,e.subTree,e,i,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const s=e.subTree=Oi(e);f(null,s,n,o,e,i,r),t.el=s.el}if(u&&ci(u,i),!p&&(s=l&&l.onVnodeMounted)){const e=t;ci((()=>or(s,d,e)),i)}(256&t.shapeFlag||d&&Zn(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&ci(e.a,i),e.isMounted=!0,t=n=o=null}},l=e.effect=new Ze(a,X,(()=>Dn(u)),e.scope),u=e.update=()=>{l.dirty&&l.run()};u.i=e,u.id=e.uid,pi(e,!0),u()},N=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,a=on(i),[l]=e.propsOptions;let c=!1;if(!(o||s>0)||16&s){let o;Zo(e,t,i,r)&&(c=!0);for(const r in a)t&&(oe(t,r)||(o=Se(r))!==r&&oe(t,o))||(l?!n||void 0===n[r]&&void 0===n[o]||(i[r]=Ko(l,a,r,void 0,e,!0)):delete i[r]);if(r!==a)for(const e in r)t&&oe(t,e)||(delete r[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o{const u=e&&e.children,d=e?e.shapeFlag:0,p=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f)return void D(u,p,n,o,i,r,s,a,c);if(256&f)return void P(u,p,n,o,i,r,s,a,c)}8&h?(16&d&&B(u,i,r),p!==u&&l(n,p)):16&d?16&h?D(u,p,n,o,i,r,s,a,c):B(u,i,r,!0):(8&d&&l(n,""),16&h&&S(p,n,o,i,r,s,a,c))},P=(e,t,n,o,i,r,s,a,l)=>{t=t||K;const c=(e=e||K).length,u=t.length,d=Math.min(c,u);let p;for(p=0;pu?B(e,i,r,!0,!1,d):S(t,n,o,i,r,s,a,l,d)},D=(e,t,n,o,i,r,s,a,l)=>{let c=0;const u=t.length;let d=e.length-1,p=u-1;for(;c<=d&&c<=p;){const o=e[c],u=t[c]=l?er(t[c]):qi(t[c]);if(!Hi(o,u))break;f(o,u,n,null,i,r,s,a,l),c++}for(;c<=d&&c<=p;){const o=e[d],c=t[p]=l?er(t[p]):qi(t[p]);if(!Hi(o,c))break;f(o,c,n,null,i,r,s,a,l),d--,p--}if(c>d){if(c<=p){const e=p+1,d=ep)for(;c<=d;)M(e[c],i,r,!0),c++;else{const h=c,m=c,g=new Map;for(c=m;c<=p;c++){const e=t[c]=l?er(t[c]):qi(t[c]);null!=e.key&&g.set(e.key,c)}let v,y=0;const b=p-m+1;let _=!1,w=0;const S=new Array(b);for(c=0;c=b){M(o,i,r,!0);continue}let u;if(null!=o.key)u=g.get(o.key);else for(v=m;v<=p;v++)if(0===S[v-m]&&Hi(o,t[v])){u=v;break}void 0===u?M(o,i,r,!0):(S[u-m]=c+1,u>=w?w=u:_=!0,f(o,t[u],n,null,i,r,s,a,l),y++)}const x=_?function(e){const t=e.slice(),n=[0];let o,i,r,s,a;const l=e.length;for(o=0;o>1,e[n[a]]0&&(t[o]=n[r-1]),n[r]=o)}}r=n.length,s=n[r-1];for(;r-- >0;)n[r]=s,s=t[s];return n}(S):K;for(v=x.length-1,c=b-1;c>=0;c--){const e=m+c,d=t[e],p=e+1{const{el:s,type:a,transition:l,children:c,shapeFlag:u}=e;if(6&u)return void j(e.component.subTree,n,o,i);if(128&u)return void e.suspense.move(n,o,i);if(64&u)return void a.move(e,n,o,V);if(a===Ii){t(s,n,o);for(let e=0;el.enter(s)),r);else{const{leave:e,delayLeave:i,afterLeave:r}=l,a=()=>t(s,n,o),c=()=>{e(s,(()=>{a(),r&&r()}))};i?i(s,a,c):c()}else t(s,n,o)},M=(e,t,n,o=!1,i=!1)=>{const{type:r,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:p,cacheIndex:f}=e;if(-2===d&&(i=!1),null!=a&&ai(a,null,n,e,!0),null!=f&&(t.renderCache[f]=void 0),256&u)return void t.ctx.deactivate(e);const h=1&u&&p,m=!Zn(e);let g;if(m&&(g=s&&s.onVnodeBeforeUnmount)&&or(g,t,e),6&u)G(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);h&&Wn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,V,o):c&&!c.hasOnce&&(r!==Ii||d>0&&64&d)?B(c,t,n,!1,!0):(r===Ii&&384&d||!i&&16&u)&&B(l,t,n),o&&R(e)}(m&&(g=s&&s.onVnodeUnmounted)||h)&&ci((()=>{g&&or(g,t,e),h&&Wn(e,null,t,"unmounted")}),n)},R=e=>{const{type:t,el:o,anchor:i,transition:r}=e;if(t===Ii)return void $(o,i);if(t===ji)return void y(e);const s=()=>{n(o),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:n}=r,i=()=>t(o,s);n?n(e.el,s,i):i()}else s()},$=(e,t)=>{let o;for(;e!==t;)o=u(e),n(e),e=o;n(t)},G=(e,t,n)=>{const{bum:o,scope:i,update:r,subTree:s,um:a,m:l,a:c}=e;mi(l),mi(c),o&&Ae(o),i.stop(),r&&(r.active=!1,M(s,e,t,n)),a&&ci(a,t),ci((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},B=(e,t,n,o=!1,i=!1,r=0)=>{for(let s=r;s{if(6&e.shapeFlag)return F(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=u(e.anchor||e.el),n=t&&t[li];return n?u(n):t};let U=!1;const z=(e,t,n)=>{null==e?t._vnode&&M(t._vnode,null,null,!0):f(t._vnode||null,e,t,null,null,null,n),U||(U=!0,Mn(),Rn(),U=!1),t._vnode=e},V={p:f,um:M,m:j,r:R,mt:O,mc:S,pc:I,pbc:k,n:F,o:e};let H,W;return{render:z,hydrate:H,createApp:Fo(z,H)}}(e)}function di({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function pi({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function fi(e,t,n=!1){const o=e.children,i=t.children;if(ie(o)&&ie(i))for(let r=0;rzo(gi),yi={};function bi(e,t,n){return _i(e,t,n)}function _i(e,t,{immediate:n,deep:o,flush:i,once:r,onTrack:s,onTrigger:a}=Z){if(t&&r){const e=t;t=(...t)=>{e(...t),w()}}const l=sr,c=e=>!0===o?e:xi(e,!1===o?1:void 0);let u,d,p=!1,f=!1;if(dn(e)?(u=()=>e.value,p=tn(e)):qt(e)?(u=()=>c(e),p=!0):ie(e)?(f=!0,p=e.some((e=>qt(e)||tn(e))),u=()=>e.map((e=>dn(e)?e.value:qt(e)?c(e):ae(e)?wn(e,l,2):void 0))):u=ae(e)?t?()=>wn(e,l,2):()=>(d&&d(),Sn(e,l,3,[m])):X,t&&o){const e=u;u=()=>xi(e())}let h,m=e=>{d=b.onStop=()=>{wn(e,l,4),d=b.onStop=void 0}};if(hr){if(m=X,t?n&&Sn(t,l,3,[u(),f?[]:void 0,m]):u(),"sync"!==i)return X;{const e=vi();h=e.__watcherHandles||(e.__watcherHandles=[])}}let g=f?new Array(e.length).fill(yi):yi;const v=()=>{if(b.active&&b.dirty)if(t){const e=b.run();(o||p||(f?e.some(((e,t)=>Ce(e,g[t]))):Ce(e,g)))&&(d&&d(),Sn(t,l,3,[e,g===yi?void 0:f&&g[0]===yi?[]:g,m]),g=e)}else b.run()};let y;v.allowRecurse=!!t,"sync"===i?y=v:"post"===i?y=()=>ci(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),y=()=>Dn(v));const b=new Ze(u,X,y),_=Ye(),w=()=>{b.stop(),_&&te(_.effects,b)};return t?n?v():g=b.run():"post"===i?ci(b.run.bind(b),l&&l.suspense):b.run(),h&&h.push(w),w}function wi(e,t,n){const o=this.proxy,i=le(e)?e.includes(".")?Si(o,e):()=>o[e]:e.bind(o,o);let r;ae(t)?r=t:(r=t.handler,n=t);const s=ur(this),a=_i(i,r.bind(o),n);return s(),a}function Si(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{xi(e,t,n)}));else if(me(e)){for(const o in e)xi(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&xi(e[o],t,n)}return e}const ki=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${_e(t)}Modifiers`]||e[`${Se(t)}Modifiers`];function Ci(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Z;let i=n;const r=t.startsWith("update:"),s=r&&ki(o,t.slice(7));let a;s&&(s.trim&&(i=n.map((e=>le(e)?e.trim():e))),s.number&&(i=n.map(Oe)));let l=o[a=ke(t)]||o[a=ke(_e(t))];!l&&r&&(l=o[a=ke(Se(t))]),l&&Sn(l,e,6,i);const c=o[a+"Once"];if(c){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,Sn(c,e,6,i)}}function Ai(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(void 0!==i)return i;const r=e.emits;let s={},a=!1;if(!ae(e)){const o=e=>{const n=Ai(e,t,!0);n&&(a=!0,ee(s,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return r||a?(ie(r)?r.forEach((e=>s[e]=null)):ee(s,r),ue(e)&&o.set(e,s),s):(ue(e)&&o.set(e,null),null)}function Ei(e,t){return!(!e||!J(t))&&(t=t.slice(2).replace(/Once$/,""),oe(e,t[0].toLowerCase()+t.slice(1))||oe(e,Se(t))||oe(e,t))}function Oi(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[r],slots:s,attrs:a,emit:l,render:c,renderCache:u,props:d,data:p,setupState:f,ctx:h,inheritAttrs:m}=e,g=zn(e);let v,y;try{if(4&n.shapeFlag){const e=i||o,t=e;v=qi(c.call(t,e,u,d,f,p,h)),y=a}else{const e=t;0,v=qi(e.length>1?e(d,{attrs:a,slots:s,emit:l}):e(d,null)),y=t.props?a:Li(a)}}catch(_){Mi.length=0,xn(_,e,1),v=Ki(Di)}let b=v;if(y&&!1!==m){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(r&&e.some(q)&&(y=Ti(y,r)),b=Xi(b,y,!1,!0))}return n.dirs&&(b=Xi(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),v=b,zn(g),v}const Li=e=>{let t;for(const n in e)("class"===n||"style"===n||J(n))&&((t||(t={}))[n]=e[n]);return t},Ti=(e,t)=>{const n={};for(const o in e)q(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Ni(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i0?Ri||K:null,Mi.pop(),Ri=Mi[Mi.length-1]||null,Gi>0&&Ri&&Ri.push(e),e}function Ui(e,t,n,o,i,r){return Fi(Zi(e,t,n,o,i,r,!0))}function zi(e,t,n,o,i){return Fi(Ki(e,t,n,o,i,!0))}function Vi(e){return!!e&&!0===e.__v_isVNode}function Hi(e,t){return e.type===t.type&&e.key===t.key}const Wi=({key:e})=>null!=e?e:null,Yi=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?le(e)||dn(e)||ae(e)?{i:Fn,r:e,k:t,f:!!n}:e:null);function Zi(e,t=null,n=null,o=0,i=null,r=(e===Ii?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wi(t),ref:t&&Yi(t),scopeId:Un,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Fn};return a?(tr(l,n),128&r&&e.normalize(l)):n&&(l.shapeFlag|=le(n)?8:16),Gi>0&&!s&&Ri&&(l.patchFlag>0||6&r)&&32!==l.patchFlag&&Ri.push(l),l}const Ki=function(e,t=null,n=null,o=0,i=null,r=!1){e&&e!==go||(e=Di);if(Vi(e)){const o=Xi(e,t,!0);return n&&tr(o,n),Gi>0&&!r&&Ri&&(6&o.shapeFlag?Ri[Ri.indexOf(e)]=o:Ri.push(o)),o.patchFlag=-2,o}s=e,ae(s)&&"__vccOpts"in s&&(e=e.__vccOpts);var s;if(t){t=function(e){return e?nn(e)||Wo(e)?ee({},e):e:null}(t);let{class:e,style:n}=t;e&&!le(e)&&(t.class=Me(e)),ue(n)&&(nn(n)&&!ie(n)&&(n=ee({},n)),t.style=Ne(n))}const a=le(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:ue(e)?4:ae(e)?2:0;return Zi(e,t,n,o,i,a,r,!0)};function Xi(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:a,transition:l}=e,c=t?nr(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Wi(c),ref:t&&t.ref?n&&r?ie(r)?r.concat(Yi(t)):[r,Yi(t)]:Yi(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ii?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Xi(e.ssContent),ssFallback:e.ssFallback&&Xi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&o&&Yn(u,l.clone(u)),u}function Qi(e=" ",t=0){return Ki(Pi,null,e,t)}function Ji(e="",t=!1){return t?($i(),zi(Di,null,e)):Ki(Di,null,e)}function qi(e){return null==e||"boolean"==typeof e?Ki(Di):ie(e)?Ki(Ii,null,e.slice()):"object"==typeof e?er(e):Ki(Pi,null,String(e))}function er(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Xi(e)}function tr(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(ie(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),tr(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Wo(t)?3===o&&Fn&&(1===Fn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Fn}}else ae(t)?(t={default:t,_ctx:Fn},n=32):(t=String(t),64&o?(n=16,t=[Qi(t)]):n=8);e.children=t,e.shapeFlag|=n}function nr(...e){const t={};for(let n=0;nsr||Fn;let lr,cr;{const e=Te(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};lr=t("__VUE_INSTANCE_SETTERS__",(e=>sr=e)),cr=t("__VUE_SSR_SETTERS__",(e=>hr=e))}const ur=e=>{const t=sr;return lr(e),e.scope.on(),()=>{e.scope.off(),lr(t)}},dr=()=>{sr&&sr.scope.off(),lr(null)};function pr(e){return 4&e.vnode.shapeFlag}let fr,hr=!1;function mr(e,t,n){ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ue(t)&&(e.setupState=gn(t)),gr(e,n)}function gr(e,t,n){const o=e.type;if(!e.render){if(!t&&fr&&!o.render){const t=o.template||No(e).template;if(t){const{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:r,compilerOptions:s}=o,a=ee(ee({isCustomElement:n,delimiters:r},i),s);o.render=fr(t,a)}}e.render=o.render||X}{const t=ur(e);tt();try{Oo(e)}finally{nt(),t()}}}const vr={get:(e,t)=>(pt(e,0,""),e[t])};function yr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(gn(rn(e.exposed)),{get:(t,n)=>n in t?t[n]:n in xo?xo[n](e):void 0,has:(e,t)=>t in e||t in xo})):e.proxy}function br(e,t=!0){return ae(e)?e.displayName||e.name:e.name||t&&e.__name}const _r=(e,t)=>{const n=function(e,t,n=!1){let o,i;const r=ae(e);return r?(o=e,i=X):(o=e.get,i=e.set),new ln(o,i,r||!i,n)}(e,0,hr);return n};const wr="3.4.36",Sr="undefined"!=typeof document?document:null,xr=Sr&&Sr.createElement("template"),kr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i="svg"===t?Sr.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Sr.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?Sr.createElement(e,{is:n}):Sr.createElement(e);return"select"===e&&o&&null!=o.multiple&&i.setAttribute("multiple",o.multiple),i},createText:e=>Sr.createTextNode(e),createComment:e=>Sr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Sr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,r){const s=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==r&&(i=i.nextSibling););else{xr.innerHTML="svg"===o?`${e}`:"mathml"===o?`${e}`:e;const i=xr.content;if("svg"===o||"mathml"===o){const e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Cr=Symbol("_vtc"); -/** -* @vue/runtime-dom v3.4.36 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const Ar=Symbol("_vod"),Er=Symbol("_vsh"),Or=Symbol(""),Lr=/(^|;)\s*display\s*:/;const Tr=/\s*!important$/;function Nr(e,t,n){if(ie(n))n.forEach((n=>Nr(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Pr[t];if(n)return n;let o=_e(t);if("filter"!==o&&o in e)return Pr[t]=o;o=xe(o);for(let i=0;i{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Sn(function(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Ur(),n}(o,i);Mr(e,n,s,a)}else s&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,s,a),r[t]=void 0)}}const Gr=/(?:Once|Passive|Capture)$/;let Br=0;const Fr=Promise.resolve(),Ur=()=>Br||(Fr.then((()=>Br=0)),Br=Date.now());const zr=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Vr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ie(t)?e=>Ae(t,e):t};function Hr(e){e.target.composing=!0}function Wr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Yr=Symbol("_assign"),Zr={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[Yr]=Vr(i);const r=o||i.props&&"number"===i.props.type;Mr(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),r&&(o=Oe(o)),e[Yr](o)})),n&&Mr(e,"change",(()=>{e.value=e.value.trim()})),t||(Mr(e,"compositionstart",Hr),Mr(e,"compositionend",Wr),Mr(e,"change",Wr))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[Yr]=Vr(s),e.composing)return;const a=null==t?"":t;if((!r&&"number"!==e.type||/^0\d/.test(e.value)?e.value:Oe(e.value))!==a){if(document.activeElement===e&&"range"!==e.type){if(o&&t===n)return;if(i&&e.value.trim()===a)return}e.value=a}}},Kr=["ctrl","shift","alt","meta"],Xr={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Kr.some((n=>e[`${n}Key`]&&!t.includes(n)))},Qr=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=Se(n.key);return t.some((e=>e===o||Jr[e]===o))?e(n):void 0})},es=ee({patchProp:(e,t,n,o,i,r)=>{const s="svg"===i;"class"===t?function(e,t,n){const o=e[Cr];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,s):"style"===t?function(e,t,n){const o=e.style,i=le(n);let r=!1;if(n&&!i){if(t)if(le(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Nr(o,t,"")}else for(const e in t)null==n[e]&&Nr(o,e,"");for(const e in n)"display"===e&&(r=!0),Nr(o,e,n[e])}else if(i){if(t!==n){const e=o[Or];e&&(n+=";"+e),o.cssText=n,r=Lr.test(n)}}else t&&e.removeAttribute("style");Ar in e&&(e[Ar]=r?o.display:"",e[Er]&&(o.display="none"))}(e,n,o):J(t)?q(t)||$r(e,t,0,o,r):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&zr(t)&&ae(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(zr(t)&&le(n))return!1;return t in e}(e,t,o,s))?(!function(e,t,n){if("innerHTML"===t||"textContent"===t){if(null==n)return;return void(e[t]=n)}const o=e.tagName;if("value"===t&&"PROGRESS"!==o&&!o.includes("-")){const i="OPTION"===o?e.getAttribute("value")||"":e.value,r=null==n?"":String(n);return i===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),void(e._value=n)}let i=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=$e(n):null==n&&"string"===o?(n="",i=!0):"number"===o&&(n=0,i=!0)}try{e[t]=n}catch(r){}i&&e.removeAttribute(t)}(e,t,o),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||jr(e,t,o,s,0,"value"!==t)):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),jr(e,t,o,s))}},kr);let ts;function ns(){return ts||(ts=ui(es))} -/*! - * pinia v2.2.1 - * (c) 2024 Eduardo San Martin Morote - * @license MIT - */ -let os;const is=e=>os=e,rs=Symbol();function ss(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var as,ls;(ls=as||(as={})).direct="direct",ls.patchObject="patch object",ls.patchFunction="patch function";const cs=()=>{};function us(e,t,n,o=cs){e.push(t);const i=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),o())};var r;return!n&&Ye()&&(r=i,ze&&ze.cleanups.push(r)),i}function ds(e,...t){e.slice().forEach((e=>{e(...t)}))}const ps=e=>e(),fs=Symbol(),hs=Symbol();function ms(e,t){e instanceof Map&&t instanceof Map?t.forEach(((t,n)=>e.set(n,t))):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],i=e[n];ss(i)&&ss(o)&&e.hasOwnProperty(n)&&!dn(o)&&!qt(o)?e[n]=ms(i,o):e[n]=o}return e}const gs=Symbol();const{assign:vs}=Object;function ys(e,t,n,o){const{state:i,actions:r,getters:s}=t,a=n.state.value[e];let l;return l=bs(e,(function(){a||(n.state.value[e]=i?i():{});const t=function(e){const t=ie(e)?new Array(e.length):{};for(const n in e)t[n]=_n(e,n);return t}(n.state.value[e]);return vs(t,r,Object.keys(s||{}).reduce(((t,o)=>(t[o]=rn(_r((()=>{is(n);const t=n._s.get(e);return s[o].call(t,t)}))),t)),{}))}),t,n,o,!0),l}function bs(e,t,n={},o,i,r){let s;const a=vs({actions:{}},n),l={deep:!0};let c,u,d,p=[],f=[];const h=o.state.value[e];let m;function g(t){let n;c=u=!1,"function"==typeof t?(t(o.state.value[e]),n={type:as.patchFunction,storeId:e,events:d}):(ms(o.state.value[e],t),n={type:as.patchObject,payload:t,storeId:e,events:d});const i=m=Symbol();Pn().then((()=>{m===i&&(c=!0)})),u=!0,ds(p,n,o.state.value[e])}r||h||(o.state.value[e]={}),pn({});const v=r?function(){const{state:e}=n,t=e?e():{};this.$patch((e=>{vs(e,t)}))}:cs;const y=(t,n="")=>{if(fs in t)return t[hs]=n,t;const i=function(){is(o);const n=Array.from(arguments),r=[],s=[];let a;ds(f,{args:n,name:i[hs],store:b,after:function(e){r.push(e)},onError:function(e){s.push(e)}});try{a=t.apply(this&&this.$id===e?this:b,n)}catch(l){throw ds(s,l),l}return a instanceof Promise?a.then((e=>(ds(r,e),e))).catch((e=>(ds(s,e),Promise.reject(e)))):(ds(r,a),a)};return i[fs]=!0,i[hs]=n,i},b=Xt({_p:o,$id:e,$onAction:us.bind(null,f),$patch:g,$reset:v,$subscribe(t,n={}){const i=us(p,t,n.detached,(()=>r())),r=s.run((()=>bi((()=>o.state.value[e]),(o=>{("sync"===n.flush?u:c)&&t({storeId:e,type:as.direct,events:d},o)}),vs({},l,n))));return i},$dispose:function(){s.stop(),p=[],f=[],o._s.delete(e)}});o._s.set(e,b);const _=(o._a&&o._a.runWithContext||ps)((()=>o._e.run((()=>(s=We()).run((()=>t({action:y})))))));for(const x in _){const t=_[x];if(dn(t)&&(!dn(S=t)||!S.effect)||qt(t))r||(!h||ss(w=t)&&w.hasOwnProperty(gs)||(dn(t)?t.value=h[x]:ms(t,h[x])),o.state.value[e][x]=t);else if("function"==typeof t){const e=y(t,x);_[x]=e,a.actions[x]=t}}var w,S;return vs(b,_),vs(on(b),_),Object.defineProperty(b,"$state",{get:()=>o.state.value[e],set:e=>{g((t=>{vs(t,e)}))}}),o._p.forEach((e=>{vs(b,s.run((()=>e({store:b,app:o._a,pinia:o,options:a}))))})),h&&r&&n.hydrate&&n.hydrate(b.$state,h),c=!0,u=!0,b}function _s(e,t,n){let o,i;const r="function"==typeof t;function s(e,n){(e=e||(!!(sr||Fn||Uo)?zo(rs,null):null))&&is(e),(e=os)._s.has(o)||(r?bs(o,t,i,e):ys(o,i,e));return e._s.get(o)}return"string"==typeof e?(o=e,i=r?n:t):(i=e,o=e.id),s.$id=o,s}function ws(e){{e=on(e);const t={};for(const n in e){const o=e[n];(dn(o)||qt(o))&&(t[n]=bn(e,n))}return t}}var Ss="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function xs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ks=function(){this.__data__=[],this.size=0};var Cs=function(e,t){return e===t||e!=e&&t!=t},As=Cs;var Es=function(e,t){for(var n=e.length;n--;)if(As(e[n][0],t))return n;return-1},Os=Es,Ls=Array.prototype.splice;var Ts=Es;var Ns=Es;var Is=Es;var Ps=ks,Ds=function(e){var t=this.__data__,n=Os(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ls.call(t,n,1),--this.size,!0)},js=function(e){var t=this.__data__,n=Ts(t,e);return n<0?void 0:t[n][1]},Ms=function(e){return Ns(this.__data__,e)>-1},Rs=function(e,t){var n=this.__data__,o=Is(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this};function $s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},ec=sa,tc=ql,nc=Nl,oc={};oc["[object Float32Array]"]=oc["[object Float64Array]"]=oc["[object Int8Array]"]=oc["[object Int16Array]"]=oc["[object Int32Array]"]=oc["[object Uint8Array]"]=oc["[object Uint8ClampedArray]"]=oc["[object Uint16Array]"]=oc["[object Uint32Array]"]=!0,oc["[object Arguments]"]=oc["[object Array]"]=oc["[object ArrayBuffer]"]=oc["[object Boolean]"]=oc["[object DataView]"]=oc["[object Date]"]=oc["[object Error]"]=oc["[object Function]"]=oc["[object Map]"]=oc["[object Number]"]=oc["[object Object]"]=oc["[object RegExp]"]=oc["[object Set]"]=oc["[object String]"]=oc["[object WeakMap]"]=!1;var ic=function(e){return nc(e)&&tc(e.length)&&!!oc[ec(e)]};var rc=function(e){return function(t){return e(t)}},sc={exports:{}};!function(e,t){var n=Hs,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,r=i&&i.exports===o&&n.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(t){}}();e.exports=s}(sc,sc.exports);var ac=sc.exports,lc=ic,cc=rc,uc=ac&&ac.isTypedArray,dc=uc?cc(uc):lc,pc=Tl,fc=Yl,hc=Zl,mc=Xl,gc=Jl,vc=dc,yc=Object.prototype.hasOwnProperty;var bc=function(e,t){var n=hc(e),o=!n&&fc(e),i=!n&&!o&&mc(e),r=!n&&!o&&!i&&vc(e),s=n||o||i||r,a=s?pc(e.length,String):[],l=a.length;for(var c in e)!t&&!yc.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gc(c,l))||a.push(c);return a},_c=Object.prototype;var wc=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_c)};var Sc=function(e,t){return function(n){return e(t(n))}},xc=Sc(Object.keys,Object),kc=wc,Cc=xc,Ac=Object.prototype.hasOwnProperty;var Ec=da,Oc=ql;var Lc=function(e){return null!=e&&Oc(e.length)&&!Ec(e)},Tc=bc,Nc=function(e){if(!kc(e))return Cc(e);var t=[];for(var n in Object(e))Ac.call(e,n)&&"constructor"!=n&&t.push(n);return t},Ic=Lc;var Pc=function(e){return Ic(e)?Tc(e):Nc(e)},Dc=Ll,jc=Pc;var Mc=function(e,t){return e&&Dc(t,jc(t),e)};var Rc=aa,$c=wc,Gc=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Bc=Object.prototype.hasOwnProperty;var Fc=bc,Uc=function(e){if(!Rc(e))return Gc(e);var t=$c(e),n=[];for(var o in e)("constructor"!=o||!t&&Bc.call(e,o))&&n.push(o);return n},zc=Lc;var Vc=function(e){return zc(e)?Fc(e,!0):Uc(e)},Hc=Ll,Wc=Vc;var Yc=function(e,t){return e&&Hc(t,Wc(t),e)},Zc={exports:{}};!function(e,t){var n=Zs,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,r=i&&i.exports===o?n.Buffer:void 0,s=r?r.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,o=s?s(n):new e.constructor(n);return e.copy(o),o}}(Zc,Zc.exports);var Kc=Zc.exports;var Xc=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n({groups:[],nodes:[]}),getters:{groups_nodes(){var e;let t=[],n=[];if((null==(e=this.nodes)?void 0:e.length)>0){this.nodes.map((e=>{let o=e.pos,i=!1;for(let n=0;nr.pos[0]&&o[0]r.pos[1]&&o[1]e.pos[0]-t.pos[0])).sort(((e,t)=>e.pos[1]-t.pos[1])))},setNodes(e){this.nodes=tp(e)},update(){y.extensionManager.activeSidebarTab===M&&setTimeout((e=>{this.setGroups(y.canvas.graph._groups),this.setNodes(y.canvas.graph._nodes)}),1)},watchGraph(){let e=this;this.update();const t=y.graph.onNodeAdded;y.graph.onNodeAdded=function(n){e.update();const o=n.onRemoved;return n.onRemoved=function(){return e.update(),null==o?void 0:o.apply(this,arguments)},null==t?void 0:t.apply(this,arguments)},y.canvas.onNodeMoved=function(t){e.update()};const n=LGraphCanvas.onNodeAlign;LGraphCanvas.onNodeAlign=function(t){return e.update(),null==n?void 0:n.apply(this,arguments)};const o=LGraphCanvas.onGroupAdd;LGraphCanvas.onGroupAdd=function(){return e.update(),null==o?void 0:o.apply(this,arguments)};const i=LGraphCanvas.onGroupAlign;LGraphCanvas.onGroupAlign=function(t){return e.update(),null==i?void 0:i.apply(this,arguments)};const r=LGraphCanvas.onMenuNodeRemove;LGraphCanvas.onMenuNodeRemove=function(t){return e.update(),null==r?void 0:r.apply(this,arguments)}}}});let op=null;const ip=["custom_obsidian","custom_obsidian_dark","custom_milk_white"],rp={"easy positive":"green","easy negative":"red","easy promptList":"cyan","easy promptLine":"cyan","easy promptConcat":"cyan","easy promptReplace":"cyan","easy textSwitch":"pale_blue"};let sp=LGraphCanvas.node_colors,ap=null,lp=null,cp=null,up=null;for(let by in H)dp=H[by],y.ui.settings.addSetting(dp);var dp;function pp(e,t=!1){let n="after",o="before";t&&([o,n]=[n,o]),e.label=(e.label??e.name).replace(o,n),e.name=e.label}function fp(e,t,n,o,i,r,s){t.strokeStyle=o,t.fillStyle=i;let a=LiteGraph.NODE_TITLE_HEIGHT,l=this.ds.scale<.5,c=e._shape||e.constructor.shape||LiteGraph.ROUND_SHAPE,u=e.constructor.title_mode,d=!0;u==LiteGraph.TRANSPARENT_TITLE||u==LiteGraph.NO_TITLE?d=!1:u==LiteGraph.AUTOHIDE_TITLE&&mouse_over&&(d=!0);let p=new Float32Array(4);p=[0,d?-a:0,n[0]+1,d?n[1]+a:n[1]];let f=t.globalAlpha;if(t.lineWidth=1,t.beginPath(),c==LiteGraph.BOX_SHAPE||l?t.fillRect(p[0],p[1],p[2],p[3]):c==LiteGraph.ROUND_SHAPE||c==LiteGraph.CARD_SHAPE?t.roundRect(p[0],p[1],p[2],p[3],c==LiteGraph.CARD_SHAPE?[this.round_radius,this.round_radius,0,0]:[this.round_radius]):c==LiteGraph.CIRCLE_SHAPE&&t.arc(.5*n[0],.5*n[1],.5*n[0],0,2*Math.PI),t.strokeStyle=LiteGraph.WIDGET_OUTLINE_COLOR,t.stroke(),t.strokeStyle=o,t.fill(),!e.flags.collapsed&&d&&(t.shadowColor="transparent",t.fillStyle="rgba(0,0,0,0.2)",t.fillRect(0,-1,p[2],2)),t.shadowColor="transparent",e.onDrawBackground&&e.onDrawBackground(t,this,this.canvas,this.graph_mouse),d||u==LiteGraph.TRANSPARENT_TITLE){const i="dark"==function(e){let t=e.replace("#","");return n=parseInt(t.substring(0,2),16),o=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16),.299*n+.587*o+.114*i>127.5?"light":"dark";var n,o,i}((null==e?void 0:e.color)||"#ffffff");if(e.onDrawTitleBar)e.onDrawTitleBar(t,a,n,this.ds.scale,o);else if(u!=LiteGraph.TRANSPARENT_TITLE&&(e.constructor.title_color||this.render_title_colored)){let i=e.constructor.title_color||o;if(e.flags.collapsed&&(t.shadowColor=LiteGraph.DEFAULT_SHADOW_COLOR),this.use_gradients){let e=LGraphCanvas.gradients[i];e||(e=LGraphCanvas.gradients[i]=t.createLinearGradient(0,0,400,0),e.addColorStop(0,i),e.addColorStop(1,"#000")),t.fillStyle=e}else t.fillStyle=i;t.beginPath(),c==LiteGraph.BOX_SHAPE||l?t.rect(0,-a,n[0]+1,a):c!=LiteGraph.ROUND_SHAPE&&c!=LiteGraph.CARD_SHAPE||t.roundRect(0,-a,n[0]+1,a,e.flags.collapsed?[this.round_radius]:[this.round_radius,this.round_radius,0,0]),t.fill(),t.shadowColor="transparent"}let s=!1;LiteGraph.node_box_coloured_by_mode&&LiteGraph.NODE_MODES_COLORS[e.mode]&&(s=LiteGraph.NODE_MODES_COLORS[e.mode]),LiteGraph.node_box_coloured_when_on&&(s=e.action_triggered?"#FFF":e.execute_triggered?"#AAA":s);let d=10;if(e.onDrawTitleBox)e.onDrawTitleBox(t,a,n,this.ds.scale);else if(c==LiteGraph.ROUND_SHAPE||c==LiteGraph.CIRCLE_SHAPE||c==LiteGraph.CARD_SHAPE){const n=i?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR,o=i?"#eeeeee":e.boxcolor||s||LiteGraph.NODE_DEFAULT_BOXCOLOR;t.fillStyle=r?n:o,t.beginPath(),t.fillRect(10,0-1.05*d-1,1.1*d,.125*d),t.fillRect(10,0-1.45*d-1,1.1*d,.125*d),t.fillRect(10,0-1.85*d-1,1.1*d,.125*d)}else t.fillStyle=e.boxcolor||s||LiteGraph.NODE_DEFAULT_BOXCOLOR,t.fillRect(.5*(a-d),-.5*(a+d),d,d);if(t.globalAlpha=f,e.onDrawTitleText&&e.onDrawTitleText(t,a,n,this.ds.scale,this.title_text_font,r),!l){t.font=this.title_text_font;let n=String(e.getTitle());n&&(t.fillStyle=r?i?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR:i?"#ffffff":e.constructor.title_text_color||this.node_title_color,e.flags.collapsed?(t.textAlign="left",t.measureText(n),t.fillText(n.substr(0,20),a,LiteGraph.NODE_TITLE_TEXT_Y-a),t.textAlign="left"):(t.textAlign="left",t.fillText(n,a,LiteGraph.NODE_TITLE_TEXT_Y-a)))}if(!e.flags.collapsed&&e.subgraph&&!e.skip_subgraph_button){let n=LiteGraph.NODE_TITLE_HEIGHT,o=e.size[0]-n,i=LiteGraph.isInsideRectangle(this.graph_mouse[0]-e.pos[0],this.graph_mouse[1]-e.pos[1],o+2,2-n,n-4,n-4);t.fillStyle=i?"#888":"#555",c==LiteGraph.BOX_SHAPE||l?t.fillRect(o+2,2-n,n-4,n-4):(t.beginPath(),t.roundRect(o+2,2-n,n-4,n-4,[4]),t.fill()),t.fillStyle="#333",t.beginPath(),t.moveTo(o+.2*n,.6*-n),t.lineTo(o+.8*n,.6*-n),t.lineTo(o+.5*n,.3*-n),t.fill()}e.onDrawTitle&&e.onDrawTitle(t)}if(r){e.onBounding&&e.onBounding(p),u==LiteGraph.TRANSPARENT_TITLE&&(p[1]-=a,p[3]+=a),t.lineWidth=2,t.globalAlpha=.8,t.beginPath();let i=0,r=0,s=1;c==LiteGraph.BOX_SHAPE?t.rect(i+p[0],i+p[1],r+p[2],r+p[3]):c==LiteGraph.ROUND_SHAPE||c==LiteGraph.CARD_SHAPE&&e.flags.collapsed?t.roundRect(i+p[0],i+p[1],r+p[2],r+p[3],[this.round_radius*s]):c==LiteGraph.CARD_SHAPE?t.roundRect(i+p[0],i+p[1],r+p[2],r+p[3],[this.round_radius*s,s,this.round_radius*s,s]):c==LiteGraph.CIRCLE_SHAPE&&t.arc(.5*n[0],.5*n[1],.5*n[0]+6,0,2*Math.PI),t.strokeStyle=LiteGraph.NODE_BOX_OUTLINE_COLOR,t.stroke(),t.strokeStyle=o,t.globalAlpha=1}e.execute_triggered>0&&e.execute_triggered--,e.action_triggered>0&&e.action_triggered--}function hp(e,t,n,o){if(!e.widgets||!e.widgets.length)return 0;let i=e.size[0],r=e.widgets;t+=2;let s=LiteGraph.NODE_WIDGET_HEIGHT,a=this.ds.scale>.5;n.save(),n.globalAlpha=this.editor_alpha;let l=LiteGraph.WIDGET_OUTLINE_COLOR,c=LiteGraph.WIDGET_BGCOLOR,u=LiteGraph.WIDGET_TEXT_COLOR,d=LiteGraph.WIDGET_SECONDARY_TEXT_COLOR,p=12;for(let f=0;f1&&(i=1),n.fillStyle=h.options.hasOwnProperty("slider_color")?h.options.slider_color:o==h?l:N,n.beginPath(),n.roundRect(p,m,i*(g-24),s,[.25*s]),n.fill(),h.marker){let e=(h.marker-h.options.min)/t;e<0&&(e=0),e>1&&(e=1),n.fillStyle=h.options.hasOwnProperty("marker_color")?h.options.marker_color:"#AA9",n.roundRect(p+e*(g-24),m,2,s,[.25*s])}if(a){n.textAlign="center",n.fillStyle=u;let e=(h.label||h.name)+": "+Number(h.value).toFixed(null!=h.options.precision?h.options.precision:3).toString();n.fillText(e,.5*g,m+.7*s)}break;case"number":case"combo":if(n.textAlign="left",n.strokeStyle=l,n.fillStyle=c,n.beginPath(),a?n.roundRect(p,m,g-24,s,[.25*s]):n.rect(p,m,g-24,s),n.fill(),a){h.disabled||n.stroke(),n.fillStyle=u,h.disabled||(n.beginPath(),n.moveTo(24,m+6.5),n.lineTo(18,m+.5*s),n.lineTo(24,m+s-6.5),n.fill(),n.beginPath(),n.moveTo(g-p-12,m+6.5),n.lineTo(g-p-6,m+.5*s),n.lineTo(g-p-12,m+s-6.5),n.fill()),n.fillStyle=d,n.font="10px Inter",n.fillText(h.label||h.name,29,m+.7*s),n.fillStyle=u,n.textAlign="right";let e=6;if("number"==h.type)n.font="10px Inter",n.fillText(Number(h.value).toFixed(void 0!==h.options.precision?h.options.precision:3),g-24-e,m+.7*s);else{let t=h.value;if(h.options.values){let e=h.options.values;e.constructor===Function&&(e=e()),e&&e.constructor!==Array&&(t=e[h.value])}n.fillText(t,g-24-e,m+.7*s)}}break;case"string":case"text":if(n.textAlign="left",n.strokeStyle=l,n.fillStyle=c,n.beginPath(),a?n.roundRect(p,m,g-24,s,[.25*s]):n.rect(p,m,g-24,s),n.fill(),a){h.disabled||n.stroke(),n.save(),n.beginPath(),n.rect(p,m,g-24,s),n.clip(),n.fillStyle=d;const e=h.label||h.name;n.font="10px Inter",null!=e&&n.fillText(e,24,m+.7*s),n.fillStyle=u,n.textAlign="right",n.fillText(String(h.value).substr(0,30),g-24,m+.7*s),n.restore()}break;default:h.draw&&h.draw(n,e,g,m,s)}t+=(h.computeSize?h.computeSize(g)[1]:s)+4,n.globalAlpha=this.editor_alpha}n.restore(),n.textAlign="left"}function mp(e,t,n,o,i){return new LiteGraph.ContextMenu(LiteGraph.NODE_MODES,{event:n,callback:function(e){if(!i)return;var t=Object.values(LiteGraph.NODE_MODES).indexOf(e),n=function(e){t>=0&&LiteGraph.NODE_MODES[t]?e.changeMode(t):e.changeMode(LiteGraph.ALWAYS),op||(op=np()),op.update()},o=LGraphCanvas.active_canvas;if(!o.selected_nodes||Object.keys(o.selected_nodes).length<=1)n(i);else for(var r in o.selected_nodes)n(o.selected_nodes[r])},parentMenu:o,node:i}),!1}function gp(e,t,n,o,i){if(!i)throw"no node for color";var r=[];for(var s in r.push({value:null,content:"No color"}),LGraphCanvas.node_colors){var a=LGraphCanvas.node_colors[s];e={value:s,content:""+s+""};r.push(e)}return new LiteGraph.ContextMenu(r,{event:n,callback:function(e){if(!i)return;var t=e.value?LGraphCanvas.node_colors[e.value]:null,n=function(e){t?e.constructor===LiteGraph.LGraphGroup?e.color=t.groupcolor:(e.color=t.color,e.bgcolor=t.bgcolor):(delete e.color,delete e.bgcolor),op||(op=np()),op.update()},o=LGraphCanvas.active_canvas;if(!o.selected_nodes||Object.keys(o.selected_nodes).length<=1)n(i);else for(var r in o.selected_nodes)n(o.selected_nodes[r]);i.setDirtyCanvas(!0,!0)},parentMenu:o,node:i}),!1}function vp(e,t,n,o,i){var r=e.property||"title",s=i[r],a=document.createElement("div");a.is_modified=!1,a.className="graphdialog",a.innerHTML="",a.close=function(){a.parentNode&&a.parentNode.removeChild(a)},a.querySelector(".name").innerText=r;var l=a.querySelector(".value");l&&(l.value=s,l.addEventListener("blur",(function(e){this.focus()})),l.addEventListener("keydown",(function(e){if(a.is_modified=!0,27==e.keyCode)a.close();else if(13==e.keyCode)h();else if(13!=e.keyCode&&"textarea"!=e.target.localName)return;e.preventDefault(),e.stopPropagation()})));var c=LGraphCanvas.active_canvas.canvas,u=c.getBoundingClientRect(),d=-20,p=-20;u&&(d-=u.left,p-=u.top),event?(a.style.left=event.clientX+d+"px",a.style.top=event.clientY+p+"px"):(a.style.left=.5*c.width+d+"px",a.style.top=.5*c.height+p+"px"),a.querySelector("button").addEventListener("click",h),c.parentNode.appendChild(a),l&&l.focus();var f=null;function h(){l&&function(t){"Number"==e.type?t=Number(t):"Boolean"==e.type&&(t=Boolean(t));i[r]=t,a.parentNode&&a.parentNode.removeChild(a);i.setDirtyCanvas(!0,!0),op||(op=np());op.update()}(l.value)}a.addEventListener("mouseleave",(function(e){LiteGraph.dialog_close_on_mouse_leave&&!a.is_modified&&LiteGraph.dialog_close_on_mouse_leave&&(f=setTimeout(a.close,LiteGraph.dialog_close_on_mouse_leave_delay))})),a.addEventListener("mouseenter",(function(e){LiteGraph.dialog_close_on_mouse_leave&&f&&clearTimeout(f)}))}y.registerExtension({name:"Comfy.EasyUse.UI",init(){var e,t;const n="Comfy.CustomColorPalettes",o="Comfy.Settings.Comfy.CustomColorPalettes";if(lp||(lp=A(n,o)),cp||(cp=A("Comfy.ColorPalette","Comfy.Settings.Comfy.ColorPalette")||"dark"),(!(null==(e=null==lp?void 0:lp.obsidian)?void 0:e.version)||lp.obsidian.version<$.ColorPalette.version)&&(lp.obsidian=$.ColorPalette,lp.obsidian_dark=G.ColorPalette,E(n,lp,o)),(!(null==(t=null==lp?void 0:lp.milk_white)?void 0:t.version)||lp.milk_white.version{(null==e?void 0:e.value)&&(null==e?void 0:e.oldValue)&&(await W(1),Object.assign(y.canvas.default_connection_color_byType,I),Object.assign(LGraphCanvas.link_type_colors,I)),"custom_milk_white"==e.value&&document.body.classList.remove(T)})),setTimeout((e=>bp(A("Comfy.UseNewMenu")||"Disabled")),1)},async nodeCreated(e){var t;if(rp.hasOwnProperty(e.comfyClass)){const t=rp[e.comfyClass],n=sp[t];if(!n)return;n.color&&(e.color=n.color),n.bgcolor&&(e.bgcolor=n.bgcolor)}if(ap||(ap=A("Comfy.WidgetControlMode")),"before"==ap){const n="before"==ap;if((null==(t=e.widgets)?void 0:t.length)>0)for(const t of e.widgets)if(["control_before_generate","control_after_generate"].includes(t.name)&&(await pp(t,n),t.linkedWidgets))for(const e of t.linkedWidgets)await pp(e,n)}}});const yp=null==(h=y.ui.settings.settingsLookup)?void 0:h["Comfy.UseNewMenu"];yp&&(yp.onChange=e=>bp(e));const bp=e=>{var t;const n=(null==(t=document.getElementById("crystools-root"))?void 0:t.children)||null;if((null==n?void 0:n.length)>0){if(!up)for(let e=0;ee.widgets.find((e=>e.name===t)),Sp=(e,t,n=!1,o="")=>{var i;if(!t||((e,t)=>!!e.inputs&&e.inputs.some((e=>e.name===t)))(e,t.name))return;_p[t.name]||(_p[t.name]={origType:t.type,origComputeSize:t.computeSize});const r=e.size;t.type=n?_p[t.name].origType:"easyHidden"+o,t.computeSize=n?_p[t.name].origComputeSize:()=>[0,-4],null==(i=t.linkedWidgets)||i.forEach((o=>Sp(e,o,":"+t.name,n)));const s=n?Math.max(e.computeSize()[1],r[1]):e.size[1];e.setSize([e.size[0],s])},xp=(e,t=0)=>{var n,o;if(e)return(null==(n=e.widgets)?void 0:n[t])?e.widgets[t].value:e.widgets_values?null==(o=e.widgets_values)?void 0:o[t]:void 0},kp=e=>e.setSize([e.size[0],e.computeSize()[1]]),Cp=(e,t)=>graph.getNodeById(e),Ap=e=>{var t;try{return Object.values(null==(t=null==graph?void 0:graph.list_of_graphcanvas[0])?void 0:t.selected_nodes)}catch(n){return[]}};function Ep(e,t,n){return e+(o=n,(.5-.5*Math.cos(Math.PI*o))*(t-e));var o}const Op=(e,t=!0)=>{var n,o;const i=(null==(o=null==(n=e.graph)?void 0:n.list_of_graphcanvas)?void 0:o[0])||null;if(!i)return;const[r,s]=e.pos,[a,l]=e.size;(([e,t],n)=>{const o=n.ds,i=document.body.clientWidth,r=document.body.clientHeight,s=o.scale,a=.5*i/s-e,l=.5*r/s-t,c=Date.now()+250,u=o.offset[0],d=o.offset[1],p=()=>{const e=c-Date.now();if(!(Date.now(){const t=Cp(e);t&&Op(t)},Tp=(e,t=(()=>graph.links??[])())=>t[e],Np=e=>e.toLowerCase().replace(/_./g,(e=>e.replace("_","").toUpperCase())),Ip=e=>"easy getNode"===e.type,Pp=e=>"easy setNode"===e.type,Dp=e=>Ip(e)||Pp(e),jp=(e=(()=>graph._nodes??[])())=>e.filter((e=>Dp(e))),Mp=(e,t,n=0)=>{e.widgets_values||(e.widgets_values=[]),e.widgets_values[n]=t,e.widgets[n].value=t},Rp=e=>graph.add(e),$p=e=>graph.remove(e),Gp=(e,t=0)=>{var n,o;if("Reroute"!==e.type)return[e,t];const i=e,r=null==(o=null==(n=i.inputs)?void 0:n[0])?void 0:o.link;if(!r)return[i,t];const s=Tp(r);if(!s)return[i,t];const a=Cp(s.origin_id);return a?(setTimeout((()=>{$p(i)})),Gp(a,s.origin_slot)):[i,t]},Bp=e=>{var t,n,o;if("Reroute"!==e.type)return e;const i=e,r=null==(n=null==(t=i.outputs)?void 0:t[0])?void 0:n.links;if(!r)return i;const s=r[0];if(!s)return i;const a=Tp(s);if(!a)return i;const l=Cp(a.target_id);return l?(1===(null==(o=i.outputs[0].links)?void 0:o.length)&&setTimeout((()=>{$p(i)})),Bp(l)):i};const Fp=new class{constructor(){v(this,"element",_(`div.${L}toast`)),v(this,"children",HTMLElement),v(this,"container",document.body),this.container.appendChild(this.element)}async show(e){let t=_(`div.${L}toast-container`,[_("div",[_("span",[...e.icon?[_("i",{className:e.icon})]:[],_("span",e.content)])])]);t.setAttribute("toast-id",e.id),this.element.replaceChildren(t),this.container.appendChild(this.element),await W(64),t.style.marginTop=`-${t.offsetHeight}px`,await W(64),t.classList.add("show"),e.duration&&(await W(e.duration),this.hide(e.id))}async hide(e){const t=document.querySelector(`.${L}toast > [toast-id="${e}"]`);(null==t?void 0:t.classList.contains("show"))&&(t.classList.remove("show"),await W(750)),t&&t.remove()}async clearAllMessages(){let e=document.querySelector(`.${L}container`);e&&(e.innerHTML="")}async info(e,t=3e3,n=[]){this.show({id:"toast-info",icon:`mdi mdi-information ${L}theme`,content:e,duration:t})}async success(e,t=3e3){this.show({id:"toast-success",icon:`mdi mdi-check-circle ${L}success`,content:e,duration:t})}async error(e,t=3e3){this.show({id:"toast-error",icon:`mdi mdi-close-circle ${L}error`,content:e,duration:t})}async warn(e,t=3e3){this.show({id:"toast-warn",icon:`mdi mdi-alert-circle ${L}warning`,content:e,duration:t})}async showLoading(e,t=0){this.show({id:"toast-loading",icon:"mdi mdi-rotate-right loading",content:e,duration:t})}async hideLoading(){this.hide("toast-loading")}},Up=["rescale_after_model","rescale","lora_name","upscale_method","image_output","add_noise","info","sampler_name","ckpt_B_name","ckpt_C_name","save_model","refiner_ckpt_name","num_loras","num_controlnet","mode","toggle","resolution","ratio","target_parameter","input_count","replace_count","downscale_mode","range_mode","text_combine_mode","input_mode","lora_count","ckpt_count","conditioning_mode","preset","use_tiled","use_batch","num_embeds","easing_mode","guider","scheduler","inpaint_mode","t5_type","rem_mode"],zp=["LIGHT - SD1.5 only (low strength)","STANDARD (medium strength)","VIT-G (medium strength)","PLUS (high strength)","PLUS FACE (portraits)","FULL FACE - SD1.5 only (portraits stronger)"],Vp=["FACEID","FACEID PLUS - SD1.5 only","FACEID PLUS V2","FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"],Hp=["easy seed","easy latentNoisy","easy wildcards","easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingSdTurbo","easy preSamplingCascade","easy preSamplingDynamicCFG","easy preSamplingLayerDiffusion","easy fullkSampler","easy fullCascadeKSampler"],Wp=["easy fullLoader","easy a1111Loader","easy comfyLoader","easy hyditLoader","easy pixArtLoader"],Yp=["easy imageSize","easy imageSizeBySide","easy imageSizeByLongerSide","easy imageSizeShow","easy imageRatio","easy imagePixelPerfect"];function Zp(e,t){const n=e.comfyClass,o=t.value;switch(t.name){case"range_mode":Sp(e,wp(e,"step"),"step"==o),Sp(e,wp(e,"num_steps"),"num_steps"==o),kp(e);break;case"text_combine_mode":Sp(e,wp(e,"replace_text"),"replace"==o);break;case"lora_name":["lora_model_strength","lora_clip_strength"].map((t=>Sp(e,wp(e,t),"None"!==o)));break;case"resolution":"自定义 x 自定义"===o&&(t.value="width x height (custom)"),["empty_latent_width","empty_latent_height"].map((t=>Sp(e,wp(e,t),"width x height (custom)"===o)));break;case"ratio":["empty_latent_width","empty_latent_height"].map((t=>Sp(e,wp(e,t),"custom"===o)));break;case"num_loras":var i=o+1,r=wp(e,"mode").value;for(let t=0;tSp(e,wp(e,t),"simple"!==r)));for(let t=i;t<21;t++)["lora_"+t+"_name","lora_"+t+"_strength","lora_"+t+"_model_strength","lora_"+t+"_clip_strength"].map((t=>Sp(e,wp(e,t),!1)));kp(e);break;case"num_controlnet":i=o+1,r=wp(e,"mode").value;for(let t=0;tSp(e,wp(e,t),!0))),["start_percent_"+t,"end_percent_"+t].map((t=>Sp(e,wp(e,t),"simple"!==r)));for(let t=i;t<21;t++)["controlnet_"+t,"controlnet_"+t+"_strength","scale_soft_weight_"+t,"start_percent_"+t,"end_percent_"+t].map((t=>Sp(e,wp(e,t),!1)));kp(e);break;case"mode":switch(null==e?void 0:e.comfyClass){case"easy loraStack":i=wp(e,"num_loras").value+1,r=o;for(let t=0;tSp(e,wp(e,t),"simple"!==r)));kp(e);break;case"easy controlnetStack":i=wp(e,"num_controlnet").value+1,r=o;for(let t=0;tSp(e,wp(e,t),"simple"!==r)));kp(e);break;case"easy icLightApply":r=o;["lighting","remove_bg"].map((t=>Sp(e,wp(e,t),"Foreground"===r))),Sp(e,wp(e,"source"),"Foreground"!==r),kp(e)}break;case"toggle":t.type="toggle",t.options={on:"Enabled",off:"Disabled"};break;case"t5_type":["clip_name","padding"].map((t=>Sp(e,wp(e,t),"sd3"==o))),["t5_name","device","dtype"].map((t=>Sp(e,wp(e,t),"t5v11"==o))),kp(e);break;case"preset":if(zp.includes(o)){let t=wp(e,"use_tiled");Sp(e,wp(e,"lora_strength")),Sp(e,wp(e,"provider")),Sp(e,wp(e,"weight_faceidv2")),Sp(e,wp(e,"weight_kolors")),Sp(e,wp(e,"use_tiled"),!0),Sp(e,wp(e,"sharpening"),t&&t.value)}else Vp.includes(o)&&(Sp(e,wp(e,"weight_faceidv2"),!!["FACEID PLUS V2","FACEID PLUS KOLORS"].includes(o)),Sp(e,wp(e,"weight_kolors"),!!["FACEID PLUS KOLORS"].includes(t.value)),["FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"].includes(o)?Sp(e,wp(e,"lora_strength"),!1):Sp(e,wp(e,"lora_strength"),!0),Sp(e,wp(e,"provider"),!0),Sp(e,wp(e,"use_tiled")),Sp(e,wp(e,"sharpening")));kp(e);break;case"use_tiled":Sp(e,wp(e,"sharpening"),!!o),kp(e);break;case"num_embeds":i=o+1;for(let t=0;tSp(e,wp(e,t),!1)));break;case"brushnet_random":case"brushnet_segmentation":["dtype","scale","start_at","end_at"].map((t=>Sp(e,wp(e,t),!0))),["fitting","function"].map((t=>Sp(e,wp(e,t),!1)));break;case"powerpaint":["dtype","fitting","function","scale","start_at","end_at"].map((t=>Sp(e,wp(e,t),!0)))}kp(e);break;case"image_output":Sp(e,wp(e,"link_id"),!!["Sender","Sender&Save"].includes(o)),Sp(e,wp(e,"decode_vae_name"),!!["Hide","Hide&Save"].includes(o)),["save_prefix","output_path","embed_workflow","number_padding","overwrite_existing"].map((t=>Sp(e,wp(e,t),!!["Save","Hide&Save","Sender&Save"].includes(o))));break;case"add_noise":var s=wp(e,"control_before_generate"),a=wp(e,"control_after_generate")||s;"disable"===o?(Sp(e,wp(e,"seed")),a&&(a.last_value=a.value,a.value="fixed",Sp(e,a))):(Sp(e,wp(e,"seed"),!0),a&&((null==a?void 0:a.last_value)&&(a.value=a.last_value),Sp(e,a,!0))),kp(e);break;case"guider":switch(o){case"Basic":["cfg","cfg_negative"].map((t=>Sp(e,wp(e,t))));break;case"CFG":Sp(e,wp(e,"cfg"),!0),Sp(e,wp(e,"cfg_negative"));break;case"IP2P+DualCFG":case"DualCFG":["cfg","cfg_negative"].map((t=>Sp(e,wp(e,t),!0)))}kp(e);break;case"scheduler":["karrasADV","exponentialADV","polyExponential"].includes(o)?(["sigma_max","sigma_min"].map((t=>Sp(e,wp(e,t),!0))),["denoise","beta_d","beta_min","eps_s","coeff"].map((t=>Sp(e,wp(e,t))),!1),Sp(e,wp(e,"rho"),"exponentialADV"!=o)):"vp"==o?(["sigma_max","sigma_min","denoise","rho","coeff"].map((t=>Sp(e,wp(e,t)))),["beta_d","beta_min","eps_s"].map((t=>Sp(e,wp(e,t),!0)))):(["sigma_max","sigma_min","beta_d","beta_min","eps_s","rho"].map((t=>Sp(e,wp(e,t)))),Sp(e,wp(e,"coeff"),"gits"==o),Sp(e,wp(e,"denoise"),!0)),kp(e);break;case"conditioning_mode":["replace","concat","combine"].includes(o)?["average_strength","old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>Sp(e,wp(e,t)))):"average"==o?(Sp(e,wp(e,"average_strength"),!0),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>Sp(e,wp(e,t),!1)))):"timestep"==o&&(["average_strength"].map((t=>Sp(e,wp(e,t),!1))),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>Sp(e,wp(e,t)))));break;case"rescale":wp(e,"rescale_after_model").value,Sp(e,wp(e,"width"),"to Width/Height"===o),Sp(e,wp(e,"height"),"to Width/Height"===o),Sp(e,wp(e,"percent"),"by percentage"===o),Sp(e,wp(e,"longer_side"),"to longer side - maintain aspect"===o),kp(e);break;case"upscale_method":["factor","crop"].map((t=>Sp(e,wp(e,t),"None"!==o)));break;case"target_parameter":switch(n){case"easy XYInputs: Steps":["first_step","last_step"].map((t=>Sp(e,wp(e,t),"steps"==o))),["first_start_step","last_start_step"].map((t=>Sp(e,wp(e,t),"start_at_step"==o))),["first_end_step","last_end_step"].map((t=>Sp(e,wp(e,t),"end_at_step"==o)));break;case"easy XYInputs: Sampler/Scheduler":let t=wp(e,"input_count").value+1;for(let n=0;nSp(e,wp(e,t),"strength"==o))),["first_start_percent","last_start_percent"].map((t=>Sp(e,wp(e,t),"start_percent"==o))),["first_end_percent","last_end_percent"].map((t=>Sp(e,wp(e,t),"end_percent"==o))),["strength","start_percent","end_percent"].map((t=>Sp(e,wp(e,t),o!=t))),kp(e)}case"replace_count":i=o+1;for(let t=0;tSp(e,wp(e,t),!l)));for(let t=i;t<11;t++)["lora_name_"+t,"model_str_"+t,"clip_str_"+t].map((t=>Sp(e,wp(e,t),!1)));kp(e);break;case"ckpt_count":i=o+1;var c=-1!=wp(e,"input_mode").value.indexOf("ClipSkip"),u=-1!=wp(e,"input_mode").value.indexOf("VAE");for(let t=0;tSp(e,wp(e,t),!1)));kp(e);break;case"input_count":i=o+1;var d=wp(e,"target_parameter").value;for(let t=0;tSp(e,wp(e,n),!t)));["model_strength","clip_strength"].map((n=>Sp(e,wp(e,n),!t)));break;case"easy XYInputs: Checkpoint":i=wp(e,"ckpt_count").value+1,c=-1!=wp(e,"input_mode").value.indexOf("ClipSkip"),u=-1!=wp(e,"input_mode").value.indexOf("VAE");for(let n=0;ne.name===t));if(-1!==e){for(let t=e;t{var e;const t=this.computeSize();t[0]"info"===e.name));if(-1!==e&&this.widgets[e]){this.widgets[e].value=t}}requestAnimationFrame((()=>{var e;const t=this.computeSize();t[0]"prompt"==e.name));this.addWidget("button","get values from COMBO link","",(()=>{var t,o;const i=(null==(o=null==(t=this.outputs[1])?void 0:t.links)?void 0:o.length)>0?this.outputs[1].links[0]:null,r=n.graph._nodes.find((e=>{var t;return null==(t=e.inputs)?void 0:t.find((e=>e.link==i))}));if(i&&r){const t=r.inputs.find((e=>e.link==i)).widget.name,n=r.widgets.find((e=>e.name==t));let o=(null==n?void 0:n.options.values)||null;o&&(o=o.join("\n"),e.value=o)}else Fp.error(V("No COMBO link"),3e3)}),{serialize:!1})}),Wp.includes(t.name)){let t=function(e){var t="";for(let n=0;ne.name===t+"_prompt")),o="comfy-multiline-input wildcard_"+t+"_"+this.id.toString();if(-1==n&&e){const n=document.createElement("textarea");n.className=o,n.placeholder="Wildcard Prompt ("+t+")";const i=this.addDOMWidget(t+"_prompt","customtext",n,{getValue:e=>n.value,setValue(e){n.value=e},serialize:!1});i.inputEl=n,i.inputEl.readOnly=!0,n.addEventListener("input",(()=>{var e;null==(e=i.callback)||e.call(i,i.value)})),i.value=e}else if(this.widgets[n])if(e){this.widgets[n].value=e}else{this.widgets.splice(n,1);const e=document.getElementsByClassName(o);e&&e[0]&&e[0].remove()}}};e.prototype.onExecuted=function(e){null==a||a.apply(this,arguments);const o=t(e.positive),i=t(e.negative);n.call(this,o,"positive"),n.call(this,i,"negative")}}if(["easy sv3dLoader"].includes(t.name)){let t=function(e,t,n){switch(e){case"azimuth":return n.readOnly=!0,n.style.opacity=.6,"0:(0.0,0.0)"+(t>1?`\n${t-1}:(360.0,0.0)`:"");case"elevation":return n.readOnly=!0,n.style.opacity=.6,"0:(-90.0,0.0)"+(t>1?`\n${t-1}:(90.0,0.0)`:"");case"custom":return n.readOnly=!1,n.style.opacity=1,"0:(0.0,0.0)\n9:(180.0,0.0)\n20:(360.0,0.0)"}};e.prototype.onNodeCreated=async function(){r&&r.apply(this,[]);const e=this.widgets.find((e=>"easing_mode"==e.name)),n=this.widgets.find((e=>"batch_size"==e.name)),o=this.widgets.find((e=>"scheduler"==e.name));setTimeout((i=>{o.value||(o.value=t(e.value,n.value,o.inputEl))}),1),e.callback=e=>{o.value=t(e,n.value,o.inputEl)},n.callback=n=>{o.value=t(e.value,n,o.inputEl)}}}if(Hp.includes(o)&&(e.prototype.onNodeCreated=async function(){r&&r.apply(this,[]);const e=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),o=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));if("easy seed"==t.name){const t=this.addWidget("button","🎲 Manual Random Seed",null,(t=>{"fixed"!=o.value&&(o.value="fixed"),e.value=Math.floor(Math.random()*P),n.queuePrompt(0,1)}),{serialize:!1});e.linkedWidgets=[t,o]}},e.prototype.onAdded=async function(){i&&i.apply(this,[]);const e=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),t=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));setTimeout((n=>{"control_before_generate"==t.name&&0===e.value&&(e.value=Math.floor(Math.random()*P))}),1)}),"easy convertAnything"==o&&(e.prototype.onNodeCreated=async function(){r&&r.apply(this,[]);const e=this.widgets.find((e=>"output_type"==e.name)),t=t=>{this.outputs[0].type=e.value.toUpperCase(),this.outputs[0].name=e.value,this.outputs[0].label=e.value};setTimeout((e=>t()),10),e.callback=e=>t()}),"easy imageInsetCrop"==o){let t=function(e){const t=e.widgets[0];for(let n=1;n<=4;n++)"Pixels"===t.value?(e.widgets[n].options.step=80,e.widgets[n].options.max=8192):(e.widgets[n].options.step=10,e.widgets[n].options.max=99)};e.prototype.onAdded=async function(e){const n=this.widgets[0];let o=n.callback;n.callback=(...e)=>{t(this),o&&o.apply(n,[...e])},setTimeout((e=>{t(this)}),1)}}},nodeCreated(e){if(e.comfyClass.startsWith("easy ")){if(e.widgets)for(const n of e.widgets){if(!Up.includes(n.name))continue;let t=n.value;Zp(e,n),Object.defineProperty(n,"value",{get:e=>t,set(o){o!==t&&(t=o,Zp(e,n))}})}const t=e.comfyClass;if("easy preDetailerFix"==t){const t=e.widgets.find((e=>"customtext"===e.type));if(!t)return;t.dynamicPrompts=!1,t.inputEl.placeholder="wildcard spec: if kept empty, this option will be ignored",t.serializeValue=()=>t.value}if("easy wildcards"==t){const t=e.widgets.find((e=>"text"==e.name));let n=1;Object.defineProperty(e.widgets[n],"value",{set:e=>{if((new Error).stack.includes("inner_value_change")&&"Select the LoRA to add to the text"!=e){let n=e;n.endsWith(".safetensors")&&(n=n.slice(0,-12)),t.value+=``}},get:e=>"Select the LoRA to add to the text"}),Object.defineProperty(e.widgets[n+1],"value",{set:e=>{(new Error).stack.includes("inner_value_change")&&"Select the Wildcard to add to the text"!=e&&(""!=t.value&&(t.value+=", "),t.value+=e)},get:e=>"Select the Wildcard to add to the text"}),e.widgets[n].serializeValue=e=>"Select the LoRA to add to the text",e.widgets[n+1].serializeValue=e=>"Select the Wildcard to add to the text"}if(Yp.includes(t)){const t=document.createElement("textarea");t.className="comfy-multiline-input",t.readOnly=!0;const n=e.addDOMWidget("info","customtext",t,{getValue:e=>t.value,setValue:e=>t.value=e,serialize:!1});n.inputEl=t,t.addEventListener("input",(()=>{var e;null==(e=n.callback)||e.call(n,n.value)}))}}}}),y.registerExtension({name:"easy bookmark",registerCustomNodes(){class e{constructor(){v(this,"type","easy bookmark"),v(this,"title","🔖"),v(this,"slot_start_y",-20),v(this,"___collapsed_width",0),v(this,"isVirtualNode",!0),v(this,"serialize_widgets",!0),v(this,"keypressBound",null),this.addWidget("text","shortcut_key","1",(e=>{""!==(e=e.trim()[0]||"1")&&(this.title="🔖 "+e)}),{y:8}),this.addWidget("number","zoom",1,(e=>{}),{y:8+LiteGraph.NODE_WIDGET_HEIGHT+4,max:2,min:.5,precision:2}),this.keypressBound=this.onKeypress.bind(this)}get _collapsed_width(){return this.___collapsed_width}set _collapsed_width(e){const t=y.canvas,n=t.canvas.getContext("2d");if(n){const e=n.font;n.font=t.title_text_font,this.___collapsed_width=40+n.measureText(this.title).width,n.font=e}}onAdded(){setTimeout((e=>{const t=this.widgets[0].value;t&&(this.title="🔖 "+t)}),1),window.addEventListener("keydown",this.keypressBound)}onRemoved(){window.removeEventListener("keydown",this.keypressBound)}onKeypress(e){const t=e.target;["input","textarea"].includes(t.localName)||this.widgets[0]&&e.key.toLocaleLowerCase()===this.widgets[0].value.toLocaleLowerCase()&&this.canvasToBookmark()}canvasToBookmark(){var e,t;const n=y.canvas;(null==(e=null==n?void 0:n.ds)?void 0:e.offset)&&(n.ds.offset[0]=16-this.pos[0],n.ds.offset[1]=40-this.pos[1]),null!=(null==(t=null==n?void 0:n.ds)?void 0:t.scale)&&(n.ds.scale=Number(this.widgets[1].value||1)),n.setDirty(!0,!0)}}LiteGraph.registerNodeType("easy bookmark",Object.assign(e,{title:"Bookmark 🔖"})),e.category="EasyUse/Util"}}),y.registerExtension({name:"Comfy.EasyUse.ChainNode",init(){y.canvas._mousemove_callback=e=>{if(!A("EasyUse.Nodes.ChainGetSet",null,!0))return;((e,t=!1,n={})=>{var o,i,r,s,a;if(0===e.length)return;const l=n.inputX||160,c=n.ouputX||60;if(e.filter((e=>Dp(e))).length>1)return;for(const d of e){let s=0,a=0;const u=n.inputY||10,p=n.outputY||30,f=[];if(d.graph){for(const e of d.inputs??[]){const t=e.link;if(!t)continue;const{origin_id:n,target_slot:o}=Tp(t),i=Cp(n);if(!i)continue;if(!Dp(i))continue;const r=d.getConnectionPos(!0,o);i.pos=[r[0]-l,r[1]+15+s*u],s+=1,f.push(i),i.flags.collapsed=!0}for(const e of d.outputs??[])if(e.links&&d.graph)for(const t of e.links){const{target_id:e}=Tp(t),n=Cp(e);if(!n)continue;if(!Dp(n))continue;const i=null==(o=n.outputs)?void 0:o.links;if((null==i?void 0:i.length)>1)return;const r=d.getConnectionPos(!1,0);n.pos=[r[0]+c,r[1]+15+a*p],a+=1,f.push(n),n.flags.collapsed=!0}if(t&&1===e.length){const e=[d,...f];(null==(r=null==(i=d.graph)?void 0:i.list_of_graphcanvas)?void 0:r[0]).selectNodes(e)}}}const u=e[0];if(!u)return;(null==(a=null==(s=u.graph)?void 0:s.list_of_graphcanvas)?void 0:a[0]).setDirty(!0,!0)})(Ap())};const e=LGraphCanvas.prototype.showLinkMenu;LGraphCanvas.prototype.showLinkMenu=function(t,n){return n.shiftKey?(((e,t=!1)=>{var n,o,i,r,s,a,l,c,u,d;const{type:p}=e;if("*"===p)return;let{origin_id:f,target_id:h,origin_slot:m,target_slot:g}=e,v=Cp(f),y=Cp(h);if(!v||!y)return!1;if("Reroute"===v.type){let e=0;[v,e]=Gp(v),f=null==v?void 0:v.id,m=e,void 0!==m&&-1!==m||(m=0)}if("Reroute"===y.type&&(y=Bp(y),h=null==y?void 0:y.id,g=null==y?void 0:y.inputs.findIndex((e=>e.type===p)),void 0!==g&&-1!==g||(g=0)),void 0===f||void 0===h||!v||!y)return!1;if(t&&(Dp(v)||Dp(y)))return!1;let b=Np((null==(n=y.getInputInfo(g))?void 0:n.name)??p.toLowerCase());b||(b=Np((null==(i=null==(o=null==v?void 0:v.outputs)?void 0:o[m])?void 0:i.name)??(null==(s=null==(r=null==v?void 0:v.outputs)?void 0:r[m])?void 0:s.type.toString())??b+`_from_${f}_to_${h}`));let _,w=!1,S=!1;if(Dp(v))b=xp(v),S=!0;else{const e=null==(l=null==(a=v.outputs)?void 0:a[m])?void 0:l.links;if(e)for(const t of e){const e=Cp((null==(c=Tp(t))?void 0:c.target_id)??-1);e&&Dp(e)&&Pp(e)&&(b=xp(e),S=!0)}if(!S){for(const e of jp()){if(b!==xp(e)||!Pp(e))continue;const t=null==(u=e.inputs[0])?void 0:u.link;(null==(d=Tp(t))?void 0:d.origin_id)===v.id?S=!0:w=!0}w&&(b+=`_from_${f}_to_${h}`)}}if(!S){_=LiteGraph.createNode("easy setNode"),_.is_auto_link=!0;const e=v.getConnectionPos(!1,m);_.pos=[e[0]+20,e[1]],_.inputs[0].name=b,_.inputs[0].type=p,_.inputs[0].widget=y.inputs[g].widget,Mp(_,b),Rp(_),_.flags.collapsed=!0;let t=[];v.widgets?t=Object.values(v.widgets).map((e=>e.value)):v.widgets_values&&(t=JSON.parse(JSON.stringify(v.widgets_values))),v.connect(m,_,0),v.widgets_values=t,"PrimitiveNode"===v.type&&setTimeout((()=>{if(v){v.connect(m,_,0);for(const[e,n]of t.entries())Mp(v,n,e);null!==_&&_.setSize(_.computeSize())}}))}const x=LiteGraph.createNode("easy getNode"),k=y.getConnectionPos(!0,g);x.pos=[k[0]-150,k[1]],x.outputs[0].name=b,x.outputs[0].type=p,x.outputs[0].widget=y.inputs[g].widget,Rp(x),Mp(x,b),null===x||(x.flags.collapsed=!0,x.setSize(x.computeSize()),x.connect(0,y,g))})(t),!1):(e.apply(this,[t,n]),!1)}}});let Kp=[];function Xp(e,t,n,o,i){var r=LGraphCanvas.active_canvas,s=r.getCanvasWindow(),a=r.graph;if(a)return function e(t,o){var l=LiteGraph.getNodeTypesCategories(r.filter||a.filter).filter((function(e){return e.startsWith(t)})),c=[];l.map((function(n){if(n){var o=new RegExp("^("+t+")"),i=n.replace(o,"").split("/")[0],r=""===t?i+"/":t+i+"/",s=i;-1!=s.indexOf("::")&&(s=s.split("::")[1]),-1===c.findIndex((function(e){return e.value===r}))&&c.push({value:r,content:s,has_submenu:!0,callback:function(t,n,o,i){e(t.value,i)}})}})),LiteGraph.getNodeTypesInCategory(t.slice(0,-1),r.filter||a.filter).map((function(e){if(!e.skip_list){var t={value:e.type,content:e.title,has_submenu:!1,callback:function(e,t,n,o){var s=o.getFirstEvent();r.graph.beforeChange();var a=LiteGraph.createNode(e.value);a&&(a.pos=r.convertEventToCanvasOffset(s),r.graph.add(a)),i&&i(a),r.graph.afterChange()}};c.push(t)}}));const u=A("EasyUse.ContextMenu.NodesSort",null,!0);""===t&&u&&(c=function(e){let t=[],n=[];return e.forEach((e=>{(null==e?void 0:e.value)&&D.includes(e.value.split("/")[0])?t.push(e):n.push(e)})),[{title:V("ComfyUI Basic"),is_category_title:!0},...t,{title:V("Others A~Z"),is_category_title:!0},...n.sort(((e,t)=>e.content.localeCompare(t.content)))]}(c)),new LiteGraph.ContextMenu(c,{event:n,parentMenu:o},s)}("",o),!1}function Qp(e,t,n){var o=this;n=n||{};var i=document.createElement("div");i.className="litemenu-entry submenu";var r=!1;function s(e){var t=this.value,i=!0;(o.current_submenu&&o.current_submenu.close(e),n.callback)&&(!0===n.callback.call(this,t,n,e,o,n.node)&&(i=!1));if(t){if(t.callback&&!n.ignore_item_callbacks&&!0!==t.disabled)!0===t.callback.call(this,t,n,e,o,n.extra)&&(i=!1);if(t.submenu){if(!t.submenu.options)throw"ContextMenu submenu needs options";new o.constructor(t.submenu.options,{callback:t.submenu.callback,event:e,parentMenu:o,ignore_item_callbacks:t.submenu.ignore_item_callbacks,title:t.submenu.title,extra:t.submenu.extra,autoopen:n.autoopen}),i=!1}}i&&!o.lock&&o.close()}return null===t?i.classList.add("separator"):t.is_category_title?(i.classList.remove("litemenu-entry"),i.classList.remove("submenu"),i.classList.add("litemenu-title"),i.innerHTML=t.title):(i.innerHTML=t&&t.title?t.title:e,i.value=t,t&&(t.disabled&&(r=!0,i.classList.add("disabled")),(t.submenu||t.has_submenu)&&i.classList.add("has_submenu")),"function"==typeof t?(i.dataset.value=e,i.onclick_callback=t):i.dataset.value=t,t.className&&(i.className+=" "+t.className)),this.root.appendChild(i),r||i.addEventListener("click",s),!r&&n.autoopen&&LiteGraph.pointerListenerAdd(i,"enter",(function(e){var t=this.value;if(!t||!t.has_submenu)return;s.call(this,e)})),i}function Jp(e){return e.substring(0,e.lastIndexOf("."))}function qp(e){return e.substring(e.lastIndexOf(".")+1)}y.registerExtension({name:"Comfy.EasyUse.ContextMenu",async setup(){LGraphCanvas.onMenuAdd=Xp;const e=await b.fetchApi("/easyuse/models/thumbnail");if(200===e.status){let t=await e.json();Kp=t}else Fp.error(V("Too many thumbnails, have closed the display"));const t=LiteGraph.ContextMenu;LiteGraph.ContextMenu=function(e,n){var o,i;if(n.parentMenu);else if(n.extra)null==(o=n.extra.constructor)||o.name;else if(n.scale){if(A("EasyUse.ContextMenu.SubDirectories",null,!0)){const o=function(e,t){const n=e,o=[...n],i={},r=[],s=[],a=["ckpt","pt","bin","pth","safetensors"];if((null==e?void 0:e.length)>0){const t=qp(e[e.length-1]);if(!a.includes(t))return null}for(const l of n){const e=l.indexOf("/")>-1?"/":"\\",t=l.split(e);if(t.length>1){const n=t.shift();i[n]=i[n]||[],i[n].push(t.join(e))}else"CHOOSE"===l||l.startsWith("DISABLE ")?r.push(l):s.push(l)}if(Object.values(i).length>0){const e=t.callback;t.callback=null;const n=(t,n)=>{["None","无","無","なし"].includes(t.content)?e("None",n):e(o.find((e=>e.endsWith(t.content)),n))},l=(e,t="")=>{const o=t?t+"\\"+Jp(e):Jp(e),i=qp(e),r=(new Date).getTime();let s,l="";if(a.includes(i))for(let n=0;n{let n=[],o=[];const r=e.map((e=>{const r={},s=e.indexOf("/")>-1?"/":"\\",a=e.split(s);if(a.length>1){const e=a.shift();r[e]=r[e]||[],r[e].push(a.join(s))}if(Object.values(i).length>0){let t=Object.keys(r)[0];t&&r[t]?n.push({key:t,value:r[t][0]}):o.push(l(e,t))}return l(e,t)}));if(n.length>0){let e={};return n.forEach((t=>{e[t.key]=e[t.key]||[],e[t.key].push(t.value)})),[...Object.entries(e).map((e=>({content:e[0],has_submenu:!0,callback:()=>{},submenu:{options:u(e[1],e[0])}}))),...o]}return r};for(const[t,o]of Object.entries(i))c.push({content:t,has_submenu:!0,callback:()=>{},submenu:{options:u(o,t)}});return c.push(...s.map((e=>l(e,"")))),r.length>0&&c.push(...r.map((e=>l(e,"")))),c}return null}(e,n);if(o)return t.call(this,o,n)}}else n.hasOwnProperty("extra")&&(e.unshift(null),i=window.location.host,["192.168.","10.","127.",/^172\.((1[6-9]|2[0-9]|3[0-1])\.)/].some((e=>"string"==typeof e?i.startsWith(e):e.test(i)))&&e.unshift({content:`${V("Reboot ComfyUI")}`,callback:e=>async function(){if(confirm(V("Are you sure you'd like to reboot the server?")))try{b.fetchApi("/easyuse/reboot")}catch(e){}}()}),e.unshift({content:`${V("Cleanup Of GPU Usage")}`,callback:e=>async function(){try{const{Running:e,Pending:t}=await b.getQueue();if(e.length>0||t.length>0)return void Fp.error(V("Clean Failed")+":"+V("Please stop all running tasks before cleaning GPU"));200==(await b.fetchApi("/easyuse/cleangpu",{method:"POST"})).status?Fp.success(V("Clean SuccessFully")):Fp.error(V("Clean Failed"))}catch(e){}}()}));return t.apply(this,[...arguments])},LiteGraph.ContextMenu.prototype=t.prototype,LiteGraph.ContextMenu.prototype.addItem=Qp}});class ef extends w{constructor(){super(),this.element.classList.add("easyuse-model-metadata")}show(e){super.show(_("div",Object.keys(e).map((t=>_("div",[_("label",{textContent:t}),_("span",{textContent:e[t]})])))))}}class tf extends w{constructor(e){super(),this.name=e,this.element.classList.add("easyuse-model-info")}get customNotes(){return this.metadata["easyuse.notes"]}set customNotes(e){this.metadata["easyuse.notes"]=e}get hash(){return this.metadata["easyuse.sha256"]}async show(e,t){this.type=e;const n=b.fetchApi("/easyuse/metadata/"+encodeURIComponent(`${e}/${t}`));this.info=_("div",{style:{flex:"auto"}}),this.imgCurrent=0,this.imgList=_("div.easyuse-preview-list",{style:{display:"none"}}),this.imgWrapper=_("div.easyuse-preview",[_("div.easyuse-preview-group",[this.imgList])]),this.main=_("main",{style:{display:"flex"}},[this.imgWrapper,this.info]),this.content=_("div.easyuse-model-content",[_("div.easyuse-model-header",[_("h2",{textContent:this.name})]),this.main]);const o=_("div",{textContent:"ℹ️ Loading...",parent:this.content});super.show(this.content),this.metadata=await(await n).json(),this.viewMetadata.style.cursor=this.viewMetadata.style.opacity="",this.viewMetadata.removeAttribute("disabled"),o.remove(),this.addInfo()}createButtons(){const e=super.createButtons();return this.viewMetadata=_("button",{type:"button",textContent:"View raw metadata",disabled:"disabled",style:{opacity:.5,cursor:"not-allowed"},onclick:e=>{this.metadata&&(new ef).show(this.metadata)}}),e.unshift(this.viewMetadata),e}parseNote(){if(!this.customNotes)return[];let e=[];const t=new RegExp("(\\bhttps?:\\/\\/[^\\s]+)","g");let n,o=0;do{let i;n=t.exec(this.customNotes);let r=0;n?(i=n.index,r=n.index+n[0].length):i=this.customNotes.length;let s=this.customNotes.substring(o,i);s&&(s=s.replaceAll("\n","
"),e.push(_("span",{innerHTML:s}))),n&&e.push(_("a",{href:n[0],textContent:n[0],target:"_blank"})),o=r}while(n);return e}addInfoEntry(e,t){return _("p",{parent:this.info},["string"==typeof e?_("label",{textContent:e+": "}):e,"string"==typeof t?_("span",{textContent:t}):t])}async getCivitaiDetails(){const e=await fetch("https://civitai.com/api/v1/model-versions/by-hash/"+this.hash);if(200===e.status)return await e.json();throw 404===e.status?new Error("Model not found"):new Error(`Error loading info (${e.status}) ${e.statusText}`)}addCivitaiInfo(){const e=this.getCivitaiDetails(),t=_("span",{textContent:"ℹ️ Loading..."});return this.addInfoEntry(_("label",[_("img",{style:{width:"18px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),_("span",{textContent:"Civitai: "})]),t),e.then((e=>{var t,n;this.imgWrapper.style.display="block";let o=this.element.querySelector(".easyuse-model-header");o&&o.replaceChildren(_("h2",{textContent:this.name}),_("div.easyuse-model-header-remark",[_("h5",{textContent:V("Updated At:")+O(new Date(e.updatedAt),"yyyy/MM/dd")}),_("h5",{textContent:V("Created At:")+O(new Date(e.updatedAt),"yyyy/MM/dd")})]));let i=null,r=this.parseNote.call(this),s=V("✏️ Edit"),a=_("div.easyuse-model-detail-textarea",[_("p",(null==r?void 0:r.length)>0?r:{textContent:V("No notes")})]);if(r&&0!=r.length?a.classList.remove("empty"):a.classList.add("empty"),this.info.replaceChildren(_("div.easyuse-model-detail",[_("div.easyuse-model-detail-head.flex-b",[_("span",V("Notes")),_("a",{textContent:s,href:"#",style:{fontSize:"12px",float:"right",color:"var(--warning-color)",textDecoration:"none"},onclick:async e=>{if(e.preventDefault(),i){if(i.value!=this.customNotes){toast.showLoading(V("Saving Notes...")),this.customNotes=i.value;const e=await b.fetchApi("/easyuse/metadata/notes/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:this.customNotes});if(toast.hideLoading(),200!==e.status)return toast.error(V("Saving Failed")),void alert(`Error saving notes (${e.status}) ${e.statusText}`);toast.success(V("Saving Succeed")),r=this.parseNote.call(this),a.replaceChildren(_("p",(null==r?void 0:r.length)>0?r:{textContent:V("No notes")})),i.value?a.classList.remove("empty"):a.classList.add("empty")}else a.replaceChildren(_("p",{textContent:V("No notes")})),a.classList.add("empty");e.target.textContent=s,i.remove(),i=null}else e.target.textContent="💾 Save",i=_("textarea",{placeholder:V("Type your notes here"),style:{width:"100%",minWidth:"200px",minHeight:"50px",height:"100px"},textContent:this.customNotes}),a.replaceChildren(i),i.focus()}})]),a]),_("div.easyuse-model-detail",[_("div.easyuse-model-detail-head",{textContent:V("Details")}),_("div.easyuse-model-detail-body",[_("div.easyuse-model-detail-item",[_("div.easyuse-model-detail-item-label",{textContent:V("Type")}),_("div.easyuse-model-detail-item-value",{textContent:e.model.type})]),_("div.easyuse-model-detail-item",[_("div.easyuse-model-detail-item-label",{textContent:V("BaseModel")}),_("div.easyuse-model-detail-item-value",{textContent:e.baseModel})]),_("div.easyuse-model-detail-item",[_("div.easyuse-model-detail-item-label",{textContent:V("Download")}),_("div.easyuse-model-detail-item-value",{textContent:(null==(t=e.stats)?void 0:t.downloadCount)||0})]),_("div.easyuse-model-detail-item",[_("div.easyuse-model-detail-item-label",{textContent:V("Trained Words")}),_("div.easyuse-model-detail-item-value",{textContent:(null==e?void 0:e.trainedWords.join(","))||"-"})]),_("div.easyuse-model-detail-item",[_("div.easyuse-model-detail-item-label",{textContent:V("Source")}),_("div.easyuse-model-detail-item-value",[_("label",[_("img",{style:{width:"14px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),_("a",{href:"https://civitai.com/models/"+e.modelId,textContent:"View "+e.model.name,target:"_blank"})])])])])])),null==(n=e.images)?void 0:n.length){this.imgCurrent=0,this.isSaving=!1,e.images.map((e=>e.url&&this.imgList.appendChild(_("div.easyuse-preview-slide",[_("div.easyuse-preview-slide-content",[_("img",{src:e.url}),_("div.save",{textContent:"Save as preview",onclick:async()=>{if(this.isSaving)return;this.isSaving=!0,toast.showLoading(V("Saving Preview..."));const t=await(await fetch(e.url)).blob(),n="temp_preview."+new URL(e.url).pathname.split(".")[1],o=new FormData;o.append("image",new File([t],n)),o.append("overwrite","true"),o.append("type","temp");if(200!==(await b.fetchApi("/upload/image",{method:"POST",body:o})).status)return this.isSaving=!1,toast.error(V("Saving Failed")),toast.hideLoading(),void alert(`Error saving preview (${req.status}) ${req.statusText}`);await b.fetchApi("/easyuse/save/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:JSON.stringify({filename:n,type:"temp"}),headers:{"content-type":"application/json"}}).then((e=>{toast.success(V("Saving Succeed")),toast.hideLoading()})),this.isSaving=!1,app.refreshComboInNodes()}})])]))));let t=this;this.imgDistance=(-660*this.imgCurrent).toString(),this.imgList.style.display="",this.imgList.style.transform="translate3d("+this.imgDistance+"px, 0px, 0px)",this.slides=this.imgList.querySelectorAll(".easyuse-preview-slide"),this.slideLeftButton=_("button.left",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',onclick:()=>{e.images.length<=2||(t.imgList.classList.remove("no-transition"),0==t.imgCurrent?(t.imgCurrent=e.images.length/2-1,this.slides[this.slides.length-1].style.transform="translate3d("+(-660*(this.imgCurrent+1)).toString()+"px, 0px, 0px)",this.slides[this.slides.length-2].style.transform="translate3d("+(-660*(this.imgCurrent+1)).toString()+"px, 0px, 0px)",t.imgList.style.transform="translate3d(660px, 0px, 0px)",setTimeout((e=>{this.slides[this.slides.length-1].style.transform="translate3d(0px, 0px, 0px)",this.slides[this.slides.length-2].style.transform="translate3d(0px, 0px, 0px)",t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)",t.imgList.classList.add("no-transition")}),500)):(t.imgCurrent=t.imgCurrent-1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"))}}),this.slideRightButton=_("button.right",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',onclick:()=>{if(!(e.images.length<=2))if(t.imgList.classList.remove("no-transition"),t.imgCurrent>=e.images.length/2-1){t.imgCurrent=0;const n=e.images.length/2;this.slides[0].style.transform="translate3d("+(660*n).toString()+"px, 0px, 0px)",this.slides[1].style.transform="translate3d("+(660*n).toString()+"px, 0px, 0px)",t.imgList.style.transform="translate3d("+(-660*n).toString()+"px, 0px, 0px)",setTimeout((e=>{this.slides[0].style.transform="translate3d(0px, 0px, 0px)",this.slides[1].style.transform="translate3d(0px, 0px, 0px)",t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)",t.imgList.classList.add("no-transition")}),500)}else t.imgCurrent=t.imgCurrent+1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"}})}return e.description&&_("div",{parent:this.content,innerHTML:e.description,style:{marginTop:"10px"}}),e})).catch((e=>{this.imgWrapper.style.display="none",t.textContent="⚠️ "+e.message})).finally((e=>{}))}}class nf extends tf{async addInfo(){await this.addCivitaiInfo()}}class of extends tf{getTagFrequency(){if(!this.metadata.ss_tag_frequency)return[];const e=JSON.parse(this.metadata.ss_tag_frequency),t={};for(const n in e){const o=e[n];for(const e in o)e in t?t[e]+=o[e]:t[e]=o[e]}return Object.entries(t).sort(((e,t)=>t[1]-e[1]))}getResolutions(){let e=[];if(this.metadata.ss_bucket_info){const t=JSON.parse(this.metadata.ss_bucket_info);if(null==t?void 0:t.buckets)for(const{resolution:n,count:o}of Object.values(t.buckets))e.push([o,`${n.join("x")} * ${o}`])}e=e.sort(((e,t)=>t[0]-e[0])).map((e=>e[1]));let t=this.metadata.ss_resolution;if(t){const n=t.split(","),o=n[0].replace("(",""),i=n[1].replace(")","");e.push(`${o.trim()}x${i.trim()} (Base res)`)}else(t=this.metadata["modelspec.resolution"])&&e.push(t+" (Base res");return e.length||e.push("⚠️ Unknown"),e}getTagList(e){return e.map((e=>_("li.easyuse-model-tag",{dataset:{tag:e[0]},$:e=>{e.onclick=()=>{e.classList.toggle("easyuse-model-tag--selected")}}},[_("p",{textContent:e[0]}),_("span",{textContent:e[1]})])))}addTags(){let e,t=this.getTagFrequency();if(null==t?void 0:t.length){const n=t.length;let o;n>500&&(t=t.slice(0,500),e=_("p",[_("span",{textContent:"⚠️ Only showing first 500 tags "}),_("a",{href:"#",textContent:`Show all ${n}`,onclick:()=>{o.replaceChildren(...this.getTagList(this.getTagFrequency())),e.remove()}})])),o=_("ol.easyuse-model-tags-list",this.getTagList(t)),this.tags=_("div",[o])}else this.tags=_("p",{textContent:"⚠️ No tag frequency metadata found"});this.content.append(this.tags),e&&this.content.append(e)}async addInfo(){const e=this.addCivitaiInfo();this.addTags();const t=await e;t&&_("div",{parent:this.content,innerHTML:t.description,style:{maxHeight:"250px",overflow:"auto"}})}createButtons(){const e=super.createButtons();function t(e,t){const n=_("textarea",{parent:document.body,style:{position:"fixed"},textContent:t.map((e=>e.dataset.tag)).join(", ")});n.select();try{document.execCommand("copy"),e.target.dataset.text||(e.target.dataset.text=e.target.textContent),e.target.textContent="Copied "+t.length+" tags",setTimeout((()=>{e.target.textContent=e.target.dataset.text}),1e3)}catch(o){prompt("Copy to clipboard: Ctrl+C, Enter",text)}finally{document.body.removeChild(n)}}return e.unshift(_("button",{type:"button",textContent:"Copy Selected",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag--selected")])}}),_("button",{type:"button",textContent:"Copy All",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag")])}})),e}}const rf=["easy fullLoader","easy a1111Loader","easy comfyLoader","easy kolorsLoader","easy hunyuanDiTLoader","easy pixArtLoader"],sf=["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingLayerDiffusion","easy fullkSampler"],af=["KSamplerSelect","SamplerEulerAncestral","SamplerEulerAncestralCFG++","SamplerLMS","SamplerDPMPP_3M_SDE","SamplerDPMPP_2M_SDE","SamplerDPMPP_SDE","SamplerDPMAdaptative","SamplerLCMUpscale","SamplerTCD","SamplerTCD EulerA"],lf=["BasicScheduler","KarrasScheduler","ExponentialScheduler","PolyexponentialScheduler","VPScheduler","BetaSamplingScheduler","SDTurboScheduler","SplitSigmas","SplitSigmasDenoise","FlipSigmas","AlignYourStepsScheduler","GITSScheduler"],cf=["easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerLayerDiffusion"],uf=["easy controlnetLoader","easy controlnetLoaderADV","easy controlnetLoader++","easy instantIDApply","easy instantIDApplyADV"],df=["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition","easy ipadapterApplyFromParams","easy pulIDApply","easy pulIDApplyADV"],pf=["easy positive","easy wildcards"],ff=["easy loadImageBase64","LoadImage","LoadImageMask"],hf=["easy applyBrushNet","easy applyPowerPaint","easy applyInpaint"],mf={positive_prompt:{text:"positive",positive:"text"},loaders:{ckpt_name:"ckpt_name",vae_name:"vae_name",clip_skip:"clip_skip",lora_name:"lora_name",resolution:"resolution",empty_latent_width:"empty_latent_width",empty_latent_height:"empty_latent_height",positive:"positive",negative:"negative",batch_size:"batch_size",a1111_prompt_style:"a1111_prompt_style"},preSampling:{steps:"steps",cfg:"cfg",cfg_scale_min:"cfg",sampler_name:"sampler_name",scheduler:"scheduler",denoise:"denoise",seed_num:"seed_num",seed:"seed"},kSampler:{image_output:"image_output",save_prefix:"save_prefix",link_id:"link_id"},controlnet:{control_net_name:"control_net_name",strength:["strength","cn_strength"],scale_soft_weights:["scale_soft_weights","cn_soft_weights"],cn_strength:["strength","cn_strength"],cn_soft_weights:["scale_soft_weights","cn_soft_weights"]},ipadapter:{preset:"preset",lora_strength:"lora_strength",provider:"provider",weight:"weight",weight_faceidv2:"weight_faceidv2",start_at:"start_at",end_at:"end_at",cache_mode:"cache_mode",use_tiled:"use_tiled",insightface:"insightface",pulid_file:"pulid_file"},load_image:{image:"image",base64_data:"base64_data",channel:"channel"},inpaint:{dtype:"dtype",fitting:"fitting",function:"function",scale:"scale",start_at:"start_at",end_at:"end_at"},sampler:{},sigmas:{}},gf={loaders:{optional_lora_stack:"optional_lora_stack",positive:"positive",negative:"negative"},preSampling:{pipe:"pipe",image_to_latent:"image_to_latent",latent:"latent"},kSampler:{pipe:"pipe",model:"model"},controlnet:{pipe:"pipe",image:"image",image_kps:"image_kps",control_net:"control_net",positive:"positive",negative:"negative",mask:"mask"},positive_prompt:{},ipadapter:{model:"model",image:"image",image_style:"image",attn_mask:"attn_mask",optional_ipadapter:"optional_ipadapter"},inpaint:{pipe:"pipe",image:"image",mask:"mask"},sampler:{},sigmas:{}},vf={loaders:{pipe:"pipe",model:"model",vae:"vae",clip:null,positive:null,negative:null,latent:null},preSampling:{pipe:"pipe"},kSampler:{pipe:"pipe",image:"image"},controlnet:{pipe:"pipe",positive:"positive",negative:"negative"},positive_prompt:{text:"positive",positive:"text"},load_image:{IMAGE:"IMAGE",MASK:"MASK"},ipadapter:{model:"model",tiles:"tiles",masks:"masks",ipadapter:"ipadapter"},inpaint:{pipe:"pipe"},sampler:{SAMPLER:"SAMPLER"},sigmas:{SIGMAS:"SIGMAS"}};function yf(e,t,n){return function(){!function(e,t,n){const o=LiteGraph.createNode(t);if(o){if(y.graph.add(o),o.pos=e.pos.slice(),o.size=e.size.slice(),e.widgets.forEach((e=>{if(mf[n][e.name]){const i=mf[n][e.name];if(i){const n=(t=i,o.widgets.find((e=>"object"==typeof t?t.includes(e.name):e.name===t)));n&&(n.value=e.value,"seed_num"==e.name&&(n.linkedWidgets[0].value=e.linkedWidgets[0].value),"converted-widget"==e.type&&Cf(o,n,e))}}var t})),e.inputs&&e.inputs.forEach(((t,i)=>{if(t&&t.link&&gf[n][t.name]){const i=gf[n][t.name];if(null===i)return;const r=o.findInputSlot(i);if(-1!==r){const n=e.graph.links[t.link];if(n){const t=e.graph.getNodeById(n.origin_id);t&&t.connect(n.origin_slot,o,r)}}}})),e.outputs&&e.outputs.forEach(((t,i)=>{if(t&&t.links&&vf[n]&&vf[n][t.name]){const i=vf[n][t.name];if(null===i)return;const r=o.findOutputSlot(i);-1!==r&&t.links.forEach((t=>{const n=e.graph.links[t];if(n){const t=e.graph.getNodeById(n.target_id);t&&o.connect(r,t,n.target_slot)}}))}})),y.graph.remove(e),"easy fullkSampler"==o.type){const e=o.outputs[0].links;if(e&&e[0]){const t=y.graph._nodes.find((t=>t.inputs&&t.inputs[0]&&t.inputs[0].link==e[0]));t&&y.graph.remove(t)}}else if(sf.includes(o.type)){const e=o.outputs[0].links;if(!e||!e[0]){const e=LiteGraph.createNode("easy kSampler");y.graph.add(e),e.pos=o.pos.slice(),e.pos[0]=e.pos[0]+o.size[0]+20;const t=o.findInputSlot("pipe");-1!==t&&o&&o.connect(0,e,t)}}o.setSize([o.size[0],o.computeSize()[1]])}}(e,t,n)}}const bf=(e,t)=>{const n=e.prototype.getExtraMenuOptions;e.prototype.getExtraMenuOptions=function(){const e=n.apply(this,arguments);return t.apply(this,arguments),e}},_f=(e,t,n,o,i=!0)=>{bf(o,(function(o,r){r.unshift({content:e,has_submenu:i,callback:(e,o,i,r,s)=>wf(e,o,i,r,s,t,n)}),"loaders"==t&&(r.unshift({content:V("💎 View Lora Info..."),callback:(e,t,n,o,i)=>{let r=i.widgets.find((e=>"lora_name"==e.name)).value;r&&"None"!=r&&new of(r).show("loras",r)}}),r.unshift({content:V("💎 View Checkpoint Info..."),callback:(e,t,n,o,i)=>{let r=i.widgets[0].value;r&&"None"!=r&&new nf(r).show("checkpoints",r)}}))}))},wf=(e,t,n,o,i,r,s)=>{const a=[];return s.map((e=>{i.type!==e&&a.push({content:`${e}`,callback:yf(i,e,r)})})),new LiteGraph.ContextMenu(a,{event:n,callback:null,parentMenu:o,node:i}),!1},Sf="converted-widget",xf=Symbol();function kf(e,t,n=""){if(t.origType=t.type,t.origComputeSize=t.computeSize,t.origSerializeValue=t.serializeValue,t.computeSize=()=>[0,-4],t.type=Sf+n,t.serializeValue=()=>{if(!e.inputs)return;let n=e.inputs.find((e=>{var n;return(null==(n=e.widget)?void 0:n.name)===t.name}));return n&&n.link?t.origSerializeValue?t.origSerializeValue():t.value:void 0},t.linkedWidgets)for(const o of t.linkedWidgets)kf(e,o,":"+t.name)}function Cf(e,t,n){kf(e,t);const{type:o}=function(e){let t=e[0];t instanceof Array&&(t="COMBO");return{type:t}}(n),i=e.size;t.options&&t.options.forceInput||e.addInput(t.name,o,{widget:{name:t.name,[xf]:()=>n}});for(const r of e.widgets)r.last_y+=LiteGraph.NODE_SLOT_HEIGHT;e.setSize([Math.max(i[0],e.size[0]),Math.max(i[1],e.size[1])])}const Af=function(e){var t,n,o,i;const r=e.constructor.type,s=e.properties.origVals||{},a=s.title||e.title,l=s.color||e.color,c=s.bgcolor||e.bgcolor,u=e,d={size:[...e.size],color:l,bgcolor:c,pos:[...e.pos]};let p=[],f=[];if(e.inputs)for(const y of e.inputs)if(y.link){const t=y.name,n=e.findInputSlot(t),o=e.getInputNode(n),i=e.getInputLink(n);p.push([i.origin_slot,o,t])}if(e.outputs)for(const y of e.outputs)if(y.links){const e=y.name;for(const t of y.links){const n=graph.links[t],o=graph._nodes_by_id[n.target_id];f.push([e,o,n.target_slot])}}y.graph.remove(e);const h=y.graph.add(LiteGraph.createNode(r,a,d));function m(){if(u.widgets)for(let e of u.widgets)if("converted-widget"===e.type){const t=h.widgets.find((t=>t.name===e.name));for(let n of u.inputs)n.name===e.name&&Cf(h,t,n.widget)}for(let e of p){const[t,n,o]=e;n.connect(t,h.id,o)}for(let e of f){const[t,n,o]=e;h.connect(t,n,o)}}let g=u.widgets_values;if(!g&&(null==(t=h.widgets)?void 0:t.length)>0)return h.widgets.forEach(((e,t)=>{const n=u.widgets[t];e.name===n.name&&e.type===n.type&&(e.value=n.value)})),void m();const v=(null==g?void 0:g.length)<=(null==(n=h.widgets)?void 0:n.length);let b=v?0:g.length-1;function _(e,t){var n,o,i,r,s,a;if(!0===e||!1===e){if((null==(n=t.options)?void 0:n.on)&&(null==(o=t.options)?void 0:o.off))return{value:e,pass:!0}}else if("number"==typeof e){if((null==(i=t.options)?void 0:i.min)<=e&&e<=(null==(r=t.options)?void 0:r.max))return{value:e,pass:!0}}else{if(null==(a=null==(s=t.options)?void 0:s.values)?void 0:a.includes(e))return{value:e,pass:!0};if(t.inputEl&&"string"==typeof e)return{value:e,pass:!0}}return{value:t.value,pass:!1}}const w=e=>{var t;const n=u.widgets[e];let o=h.widgets[e];if(o.name===n.name&&o.type===n.type){for(;v?b=0;){let{value:e,pass:t}=_(g[b],o);if(t&&null!==e){o.value=e;break}b+=v?1:-1}b++,v||(b=g.length-((null==(t=h.widgets)?void 0:t.length)-1-e))}};if(v&&(null==(o=h.widgets)?void 0:o.length)>0)for(let y=0;y0)for(let y=h.widgets.length-1;y>=0;y--)w(y);m()};y.registerExtension({name:"Comfy.EasyUse.ExtraMenu",async beforeRegisterNodeDef(e,t,n){bf(e,(function(e,n){n.unshift({content:V("🔃 Reload Node"),callback:(e,t,n,o,i)=>{let r=LGraphCanvas.active_canvas;if(!r.selected_nodes||Object.keys(r.selected_nodes).length<=1)Af(i);else for(let s in r.selected_nodes)Af(r.selected_nodes[s])}}),"easy ckptNames"==t.name&&n.unshift({content:V("💎 View Checkpoint Info..."),callback:(e,t,n,o,i)=>{i.widgets[0].value}})})),pf.includes(t.name)&&_f("↪️ Swap EasyPrompt","positive_prompt",pf,e),rf.includes(t.name)&&_f("↪️ Swap EasyLoader","loaders",rf,e),sf.includes(t.name)&&_f("↪️ Swap EasyPreSampling","preSampling",sf,e),cf.includes(t.name)&&_f("↪️ Swap EasyKSampler","preSampling",cf,e),af.includes(t.name)&&_f("↪️ Swap Custom Sampler","sampler",af,e),lf.includes(t.name)&&_f("↪️ Swap Custom Sigmas","sigmas",lf,e),uf.includes(t.name)&&_f("↪️ Swap EasyControlnet","controlnet",uf,e),df.includes(t.name)&&_f("↪️ Swap EasyAdapater","ipadapter",df,e),ff.includes(t.name)&&_f("↪️ Swap LoadImage","load_image",ff,e),hf.includes(t.name)&&_f("↪️ Swap InpaintNode","inpaint",hf,e)}});const Ef="➡️";y.registerExtension({name:"easy setNode",registerCustomNodes(){class e{constructor(){v(this,"defaultVisibility",!0),v(this,"serialize_widgets",!0),this.properties||(this.properties={previousName:""}),this.properties.showOutputText=e.defaultVisibility;const t=this;t.color=LGraphCanvas.node_colors.blue.color,this.addWidget("text","Constant","",((e,n,o,i,r)=>{t.validateName(t.graph),""!==this.widgets[0].value&&(this.title=Ef+this.widgets[0].value),this.update(),this.properties.previousName=this.widgets[0].value}),{}),this.addInput("*","*"),this.onConnectionsChange=function(e,n,o,i,r){if(1!=e||o||(this.inputs[n].type="*",this.inputs[n].name="*",this.title="Set"),i&&t.graph&&1==e&&o){const e=t.graph._nodes.find((e=>e.id==i.origin_id)).outputs[i.origin_slot],n=e.type,o=t.is_auto_link?this.widgets[0].value:e.name;"Set"===this.title&&(this.title=Ef+o,this.widgets[0].value=o),"*"===this.widgets[0].value&&(this.widgets[0].value=o),this.validateName(t.graph),this.inputs[0].type=n,this.inputs[0].name=o,setTimeout((e=>{this.title=Ef+this.widgets[0].value}),1)}this.update()},this.validateName=function(e){let n=t.widgets[0].value;if(""!=n){let o=0,i=[];do{i=e._nodes.filter((e=>e!=this&&("easy setNode"==e.type&&e.widgets[0].value===n))),i.length>0&&(n=t.widgets[0].value+o),o++}while(i.length>0);t.widgets[0].value=n,this.update()}},this.clone=function(){const t=e.prototype.clone.apply(this);return t.inputs[0].name="*",t.inputs[0].type="*",t.properties.previousName="",t.size=t.computeSize(),t},this.onAdded=function(e){this.validateName(e)},this.update=function(){if(t.graph){this.findGetters(t.graph).forEach((e=>{e.setType(this.inputs[0].type)})),this.widgets[0].value&&this.findGetters(t.graph,!0).forEach((e=>{e.setName(this.widgets[0].value)}));t.graph._nodes.filter((e=>"easy getNode"==e.type)).forEach((e=>{e.setComboValues&&e.setComboValues()}))}},this.findGetters=function(e,t){const n=t?this.properties.previousName:this.widgets[0].value;return e._nodes.filter((e=>"easy getNode"==e.type&&e.widgets[0].value===n&&""!=n))},this.isVirtualNode=!0}onRemoved(){this.graph._nodes.filter((e=>"easy getNode"==e.type)).forEach((e=>{e.setComboValues&&e.setComboValues([this])}))}}LiteGraph.registerNodeType("easy setNode",Object.assign(e,{title:"Set"})),e.category="EasyUse/Util"}}),y.registerExtension({name:"easy getNode",registerCustomNodes(){class e{constructor(){v(this,"defaultVisibility",!0),v(this,"serialize_widgets",!0),this.properties||(this.properties={}),this.properties.showOutputText=e.defaultVisibility;const t=this;t.color=LGraphCanvas.node_colors.blue.color,this.addWidget("combo","Constant","",(e=>{this.onRename()}),{values:()=>t.graph._nodes.filter((e=>"easy setNode"==e.type)).map((e=>e.widgets[0].value)).sort()}),this.addOutput("*","*"),this.onConnectionsChange=function(e,t,n,o,i){this.validateLinks(),2!=e||n?(this.onRename(),setTimeout((e=>{this.title="⬅️"+this.widgets[0].value}),1)):(this.outputs[t].type="*",this.outputs[t].name="*",this.title="Get")},this.setName=function(e){t.widgets[0].value=e,t.onRename(),t.serialize()},this.onRename=function(e=0){const n=this.findSetter(t.graph);if(n){const t=n.inputs[0].type,o=n.inputs[0].name;this.setType(t,o),this.outputs[e].type=t,this.outputs[e].name=o,this.title="⬅️"+n.widgets[0].value}else this.setType("*","*"),this.outputs[e].type="*",this.outputs[e].name="*"},this.clone=function(){const t=e.prototype.clone.apply(this);return t.size=t.computeSize(),t},this.validateLinks=function(){"*"!=this.outputs[0].type&&this.outputs[0].links&&this.outputs[0].links.forEach((e=>{const n=t.graph.links[e];n&&n.type!=this.outputs[0].type&&"*"!=n.type&&t.graph.removeLink(e)}))},this.setType=function(e,t){this.outputs[0].name=t,this.outputs[0].type=e,this.validateLinks()},this.findSetter=function(e){const t=this.widgets[0].value;return e._nodes.find((e=>"easy setNode"==e.type&&e.widgets[0].value===t&&""!=t))},this.isVirtualNode=!0}getInputLink(e){const t=this.findSetter(this.graph);if(t){const n=t.inputs[e];return this.graph.links[n.link]}throw new Error("No setter found for "+this.widgets[0].value+"("+this.type+")")}onAdded(e){}}LiteGraph.registerNodeType("easy getNode",Object.assign(e,{title:"Get"})),e.category="EasyUse/Util"}}),b.addEventListener("easyuse-global-seed",(function(e){let t=app.graph._nodes_by_id;for(let n in t){let o=t[n];if("easy globalSeed"==o.type){if(o.widgets){const t=o.widgets.find((e=>"value"==e.name));o.widgets.find((e=>"last_seed"==e.name)).value=t.value,t.value=e.detail.value}}else if(o.widgets){const t=o.widgets.find((e=>"seed_num"==e.name||"seed"==e.name||"noise_seed"==e.name));t&&null!=e.detail.seed_map[o.id]&&(t.value=e.detail.seed_map[o.id])}}}));const Of=b.queuePrompt;b.queuePrompt=async function(e,{output:t,workflow:n}){n.seed_widgets={};for(let o in app.graph._nodes_by_id){let e=app.graph._nodes_by_id[o].widgets;if(e)for(let t in e)"seed_num"!=e[t].name&&"seed"!=e[t].name&&"noise_seed"!=e[t].name||"converted-widget"==e[t].type||(n.seed_widgets[o]=parseInt(t))}return await Of.call(b,e,{output:t,workflow:n})};const Lf=["easy imageSave","easy fullkSampler","easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy detailerFix"];y.registerExtension({name:"Comfy.EasyUse.SaveImageExtraOutput",async beforeRegisterNodeDef(e,t,n){if(Lf.includes(t.name)){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0,o=this.widgets.find((e=>"filename_prefix"===e.name||"save_prefix"===e.name));return o.serializeValue=()=>x(n,o.value),e}}else{const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0;return this.properties&&"Node name for S&R"in this.properties||this.addProperty("Node name for S&R",this.constructor.type,"string"),e}}}});const Tf=["easy wildcards","easy positive","easy negative","easy stylesSelector","easy promptConcat","easy promptReplace"],Nf=["easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingDynamicCFG","easy preSamplingSdTurbo","easy preSamplingLayerDiffusion"],If=["easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo"],Pf=["easy controlnetLoader","easy controlnetLoaderADV"],Df=["easy instantIDApply","easy instantIDApplyADV"],jf=["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition"],Mf=["easy pipeIn","easy pipeOut","easy pipeEdit"],Rf=["easy XYPlot","easy XYPlotAdvanced"],$f=["easy setNode"],Gf=["Reroute","RescaleCFG","LoraLoaderModelOnly","LoraLoader","FreeU","FreeU_v2",...jf,...$f],Bf={"easy seed":{from:{INT:["Reroute",...Nf,"easy fullkSampler"]}},"easy positive":{from:{STRING:["Reroute",...Tf]}},"easy negative":{from:{STRING:["Reroute",...Tf]}},"easy wildcards":{from:{STRING:["Reroute","easy showAnything",...Tf]}},"easy stylesSelector":{from:{STRING:["Reroute","easy showAnything",...Tf]}},"easy promptConcat":{from:{STRING:["Reroute","easy showAnything",...Tf]}},"easy promptReplace":{from:{STRING:["Reroute","easy showAnything",...Tf]}},"easy fullLoader":{from:{PIPE_LINE:["Reroute",...Nf,"easy fullkSampler",...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy a1111Loader":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy comfyLoader":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy hunyuanDiTLoader":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy kolorsLoader":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy pixArtLoader":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy svdLoader":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy zero123Loader":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy sv3dLoader":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...Mf,...$f],MODEL:Gf},to:{STRING:["Reroute",...Tf]}},"easy preSampling":{from:{PIPE_LINE:["Reroute",...If,...Mf,...Pf,...Rf,...$f]}},"easy preSamplingAdvanced":{from:{PIPE_LINE:["Reroute",...If,...Mf,...Pf,...Rf,...$f]}},"easy preSamplingDynamicCFG":{from:{PIPE_LINE:["Reroute",...If,...Mf,...Pf,...Rf,...$f]}},"easy preSamplingCustom":{from:{PIPE_LINE:["Reroute",...If,...Mf,...Pf,...Rf,...$f]}},"easy preSamplingLayerDiffusion":{from:{PIPE_LINE:["Reroute","easy kSamplerLayerDiffusion",...If,...Mf,...Pf,...Rf,...$f]}},"easy preSamplingNoiseIn":{from:{PIPE_LINE:["Reroute",...If,...Mf,...Pf,...Rf,...$f]}},"easy fullkSampler":{from:{PIPE_LINE:["Reroute",...Mf.reverse(),"easy preDetailerFix","easy preMaskDetailerFix",...Nf,...$f]}},"easy kSampler":{from:{PIPE_LINE:["Reroute",...Mf.reverse(),"easy preDetailerFix","easy preMaskDetailerFix","easy hiresFix",...Nf,...$f]}},"easy controlnetLoader":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f]}},"easy controlnetLoaderADV":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f]}},"easy instantIDApply":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f],MODEL:Gf},to:{COMBO:["Reroute","easy promptLine"]}},"easy instantIDApplyADV":{from:{PIPE_LINE:["Reroute",...Nf,...Pf,...Df,...Mf,...$f],MODEL:Gf},to:{COMBO:["Reroute","easy promptLine"]}},"easy ipadapterApply":{to:{COMBO:["Reroute","easy promptLine"]}},"easy ipadapterApplyADV":{to:{STRING:["Reroute","easy sliderControl",...Tf],COMBO:["Reroute","easy promptLine"]}},"easy ipadapterStyleComposition":{to:{COMBO:["Reroute","easy promptLine"]}},"easy preDetailerFix":{from:{PIPE_LINE:["Reroute","easy detailerFix",...Mf,...$f]},to:{PIPE_LINE:["Reroute","easy ultralyticsDetectorPipe","easy samLoaderPipe","easy kSampler","easy fullkSampler"]}},"easy preMaskDetailerFix":{from:{PIPE_LINE:["Reroute","easy detailerFix",...Mf,...$f]}},"easy samLoaderPipe":{from:{PIPE_LINE:["Reroute","easy preDetailerFix",...Mf,...$f]}},"easy ultralyticsDetectorPipe":{from:{PIPE_LINE:["Reroute","easy preDetailerFix",...Mf,...$f]}},"easy cascadeLoader":{from:{PIPE_LINE:["Reroute","easy fullCascadeKSampler","easy preSamplingCascade",...Pf,...Mf,...$f],MODEL:Gf.filter((e=>!jf.includes(e)))}},"easy fullCascadeKSampler":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced",...Mf,...$f]}},"easy preSamplingCascade":{from:{PIPE_LINE:["Reroute","easy cascadeKSampler",...Mf,...$f]}},"easy cascadeKSampler":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced",...Mf,...$f]}}};y.registerExtension({name:"Comfy.EasyUse.Suggestions",async setup(e){LGraphCanvas.prototype.createDefaultNodeForSlot=function(e){e=e||{};var t,n=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,position:[],nodeType:null,posAdd:[0,0],posSizeFix:[0,0]},e),o=n.nodeFrom&&null!==n.slotFrom,i=!o&&n.nodeTo&&null!==n.slotTo;if(!o&&!i)return!1;if(!n.nodeType)return!1;var r=o?n.nodeFrom:n.nodeTo,s=o?n.slotFrom:n.slotTo,a=r.type,l=!1;switch(typeof s){case"string":l=o?r.findOutputSlot(s,!1):r.findInputSlot(s,!1),s=o?r.outputs[s]:r.inputs[s];break;case"object":l=o?r.findOutputSlot(s.name):r.findInputSlot(s.name);break;case"number":l=s,s=o?r.outputs[s]:r.inputs[s];break;default:return!1}var c=s.type==LiteGraph.EVENT?"_event_":s.type,u=o?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in;if(u&&u[c]){s.link;let e=!1;const i=o?"from":"to";if(Bf[a]&&Bf[a][i]&&(null==(t=Bf[a][i][c])?void 0:t.length)>0){for(var d in Bf[a][i][c])if(n.nodeType==Bf[a][i][c][d]||"AUTO"==n.nodeType){e=Bf[a][i][c][d];break}}else if("object"==typeof u[c]||"array"==typeof u[c]){for(var d in u[c])if(n.nodeType==u[c][d]||"AUTO"==n.nodeType){e=u[c][d];break}}else n.nodeType!=u[c]&&"AUTO"!=n.nodeType||(e=u[c]);if(e){var p=!1;"object"==typeof e&&e.node&&(p=e,e=e.node);var f=LiteGraph.createNode(e);if(f){if(p){if(p.properties)for(var h in p.properties)f.addProperty(h,p.properties[h]);if(p.inputs)for(var h in f.inputs=[],p.inputs)f.addOutput(p.inputs[h][0],p.inputs[h][1]);if(p.outputs)for(var h in f.outputs=[],p.outputs)f.addOutput(p.outputs[h][0],p.outputs[h][1]);p.title&&(f.title=p.title),p.json&&f.configure(p.json)}return this.graph.add(f),f.pos=[n.position[0]+n.posAdd[0]+(n.posSizeFix[0]?n.posSizeFix[0]*f.size[0]:0),n.position[1]+n.posAdd[1]+(n.posSizeFix[1]?n.posSizeFix[1]*f.size[1]:0)],o?n.nodeFrom.connectByType(l,f,c):n.nodeTo.connectByTypeOutput(l,f,c),!0}}}return!1},LGraphCanvas.prototype.showConnectionMenu=function(e){e=e||{};var t,n=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,e:null},e),o=this,i=n.nodeFrom&&n.slotFrom,r=!i&&n.nodeTo&&n.slotTo;if(!i&&!r)return!1;var s=i?n.nodeFrom:n.nodeTo,a=i?n.slotFrom:n.slotTo,l=!1;switch(typeof a){case"string":l=i?s.findOutputSlot(a,!1):s.findInputSlot(a,!1),a=i?s.outputs[a]:s.inputs[a];break;case"object":l=i?s.findOutputSlot(a.name):s.findInputSlot(a.name);break;case"number":l=a,a=i?s.outputs[a]:s.inputs[a];break;default:return!1}var c=["Add Node",null];o.allow_searchbox&&(c.push("Search"),c.push(null));var u=a.type==LiteGraph.EVENT?"_event_":a.type,d=i?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in,p=s.type;if(d&&d[u]){const e=i?"from":"to";if(Bf[p]&&Bf[p][e]&&(null==(t=Bf[p][e][u])?void 0:t.length)>0)for(var f in Bf[p][e][u])c.push(Bf[p][e][u][f]);else if("object"==typeof d[u]||"array"==typeof d[u])for(var f in d[u])c.push(d[u][f]);else c.push(d[u])}var h=new LiteGraph.ContextMenu(c,{event:n.e,title:(a&&""!=a.name?a.name+(u?" | ":""):"")+(a&&u?u:""),callback:function(e,t,r){switch(e){case"Add Node":LGraphCanvas.onMenuAdd(null,null,r,h,(function(e){i?n.nodeFrom.connectByType(l,e,u):n.nodeTo.connectByTypeOutput(l,e,u)}));break;case"Search":i?o.showSearchBox(r,{node_from:n.nodeFrom,slot_from:a,type_filter_in:u}):o.showSearchBox(r,{node_to:n.nodeTo,slot_from:a,type_filter_out:u});break;default:o.createDefaultNodeForSlot(Object.assign(n,{position:[n.e.canvasX,n.e.canvasY],nodeType:e}))}}});return!1}}}),y.registerExtension({name:"Comfy.EasyUse.TimeTaken",setup(){const e=new Map;let t=0;b.addEventListener("executing",(n=>{if(!A("EasyUse.Nodes.Runtime",null,!0))return;const o=(null==n?void 0:n.node)||(null==n?void 0:n.detail)||null,i=Cp(o);i&&(i.executionDuration="");const r=e.get(t);if(e.delete(t),t&&r){const e=Date.now()-r,n=Cp(t);n&&(n.executionDuration=`${(e/1e3).toFixed(2)}${V("s")}`)}t=o,e.set(o,Date.now())}))},beforeRegisterNodeDef(e,t){const n=e.prototype.onDrawForeground;e.prototype.onDrawForeground=function(...e){const[t]=e;return function(e,t){if(!t)return;e.save(),e.fillStyle=LiteGraph.NODE_DEFAULT_BGCOLOR,function(e,t,n,o,i,r){e.beginPath(),e.moveTo(t+r,n),e.lineTo(t+o-r,n),e.arcTo(t+o,n,t+o,n+r,r),e.lineTo(t+o,n+i-r),e.arcTo(t+o,n+i,t+o-r,n+i,r),e.lineTo(t+r,n+i),e.arcTo(t,n+i,t,n+i-r,r),e.lineTo(t,n+r),e.arcTo(t,n,t+r,n,r),e.closePath()}(e,0,-LiteGraph.NODE_TITLE_HEIGHT-20,e.measureText(t).width+10,LiteGraph.NODE_TITLE_HEIGHT-10,4),e.fill(),function(e,t,n,o,i="#000",r=12,s="Inter"){e.font=`${r}px ${s}`,e.fillStyle=i,e.fillText(t,n,o)}(e,t,8,-LiteGraph.NODE_TITLE_HEIGHT-6,LiteGraph.NODE_TITLE_COLOR),e.restore()}(t,this.executionDuration||""),null==n?void 0:n.apply(this,e)}}});const Ff="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function Uf(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o):e.attachEvent&&e.attachEvent("on".concat(t),n)}function zf(e,t,n,o){e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent&&e.detachEvent("on".concat(t),n)}function Vf(e,t){const n=t.slice(0,t.length-1);for(let o=0;o=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}const Wf={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Ff?173:189,"=":Ff?61:187,";":Ff?59:186,"'":222,"[":219,"]":221,"\\":220},Yf={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Zf={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Kf={16:!1,18:!1,17:!1,91:!1},Xf={};for(let by=1;by<20;by++)Wf["f".concat(by)]=111+by;let Qf=[],Jf=null,qf="all";const eh=new Map,th=e=>Wf[e.toLowerCase()]||Yf[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function nh(e){qf=e||"all"}function oh(){return qf||"all"}function ih(e){if(void 0===e)Object.keys(Xf).forEach((e=>{Array.isArray(Xf[e])&&Xf[e].forEach((e=>rh(e))),delete Xf[e]})),ch(null);else if(Array.isArray(e))e.forEach((e=>{e.key&&rh(e)}));else if("object"==typeof e)e.key&&rh(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o{let{key:t,scope:n,method:o,splitKey:i="+"}=e;Hf(t).forEach((e=>{const t=e.split(i),r=t.length,s=t[r-1],a="*"===s?"*":th(s);if(!Xf[a])return;n||(n=oh());const l=r>1?Vf(Yf,t):[],c=[];Xf[a]=Xf[a].filter((e=>{const t=(!o||e.method===o)&&e.scope===n&&function(e,t){const n=e.length>=t.length?e:t,o=e.length>=t.length?t:e;let i=!0;for(let r=0;rch(e)))}))};function sh(e,t,n,o){if(t.element!==o)return;let i;if(t.scope===n||"all"===t.scope){i=t.mods.length>0;for(const e in Kf)Object.prototype.hasOwnProperty.call(Kf,e)&&(!Kf[e]&&t.mods.indexOf(+e)>-1||Kf[e]&&-1===t.mods.indexOf(+e))&&(i=!1);(0!==t.mods.length||Kf[16]||Kf[18]||Kf[17]||Kf[91])&&!i&&"*"!==t.shortcut||(t.keys=[],t.keys=t.keys.concat(Qf),!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function ah(e,t){const n=Xf["*"];let o=e.keyCode||e.which||e.charCode;if(!lh.filter.call(this,e))return;if(93!==o&&224!==o||(o=91),-1===Qf.indexOf(o)&&229!==o&&Qf.push(o),["ctrlKey","altKey","shiftKey","metaKey"].forEach((t=>{const n=Zf[t];e[t]&&-1===Qf.indexOf(n)?Qf.push(n):!e[t]&&Qf.indexOf(n)>-1?Qf.splice(Qf.indexOf(n),1):"metaKey"===t&&e[t]&&3===Qf.length&&(e.ctrlKey||e.shiftKey||e.altKey||(Qf=Qf.slice(Qf.indexOf(n))))})),o in Kf){Kf[o]=!0;for(const e in Yf)Yf[e]===o&&(lh[e]=!0);if(!n)return}for(const a in Kf)Object.prototype.hasOwnProperty.call(Kf,a)&&(Kf[a]=e[Zf[a]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===Qf.indexOf(17)&&Qf.push(17),-1===Qf.indexOf(18)&&Qf.push(18),Kf[17]=!0,Kf[18]=!0);const i=oh();if(n)for(let a=0;a1&&(i=Vf(Yf,e)),(e="*"===(e=e[e.length-1])?"*":th(e))in Xf||(Xf[e]=[]),Xf[e].push({keyup:l,keydown:c,scope:r,mods:i,shortcut:o[a],method:n,key:o[a],splitKey:u,element:s});if(void 0!==s&&window){if(!eh.has(s)){const e=function(){return ah(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,s)},t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;ah(e,s),function(e){let t=e.keyCode||e.which||e.charCode;const n=Qf.indexOf(t);if(n>=0&&Qf.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&Qf.splice(0,Qf.length),93!==t&&224!==t||(t=91),t in Kf){Kf[t]=!1;for(const e in Yf)Yf[e]===t&&(lh[e]=!1)}}(e)};eh.set(s,{keydownListener:e,keyupListenr:t,capture:d}),Uf(s,"keydown",e,d),Uf(s,"keyup",t,d)}if(!Jf){const e=()=>{Qf=[]};Jf={listener:e,capture:d},Uf(window,"focus",e,d)}}}function ch(e){const t=Object.values(Xf).flat();if(t.findIndex((t=>{let{element:n}=t;return n===e}))<0){const{keydownListener:t,keyupListenr:n,capture:o}=eh.get(e)||{};t&&n&&(zf(e,"keyup",n,o),zf(e,"keydown",t,o),eh.delete(e))}if(t.length<=0||eh.size<=0){if(Object.keys(eh).forEach((e=>{const{keydownListener:t,keyupListenr:n,capture:o}=eh.get(e)||{};t&&n&&(zf(e,"keyup",n,o),zf(e,"keydown",t,o),eh.delete(e))})),eh.clear(),Object.keys(Xf).forEach((e=>delete Xf[e])),Jf){const{listener:e,capture:t}=Jf;zf(window,"focus",e,t),Jf=null}}}const uh={getPressedKeyString:function(){return Qf.map((e=>{return t=e,Object.keys(Wf).find((e=>Wf[e]===t))||(e=>Object.keys(Yf).find((t=>Yf[t]===e)))(e)||String.fromCharCode(e);var t}))},setScope:nh,getScope:oh,deleteScope:function(e,t){let n,o;e||(e=oh());for(const i in Xf)if(Object.prototype.hasOwnProperty.call(Xf,i))for(n=Xf[i],o=0;o{let{element:t}=e;return ch(t)}))}else o++;oh()===e&&nh(t||"all")},getPressedKeyCodes:function(){return Qf.slice(0)},getAllKeyCodes:function(){const e=[];return Object.keys(Xf).forEach((t=>{Xf[t].forEach((t=>{let{key:n,scope:o,mods:i,shortcut:r}=t;e.push({scope:o,shortcut:r,mods:i,keys:n.split("+").map((e=>th(e)))})}))})),e},isPressed:function(e){return"string"==typeof e&&(e=th(e)),-1!==Qf.indexOf(e)},filter:function(e){const t=e.target||e.srcElement,{tagName:n}=t;let o=!0;const i="INPUT"===n&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(i||"TEXTAREA"===n||"SELECT"===n)&&!t.readOnly)&&(o=!1),o},trigger:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(Xf).forEach((n=>{Xf[n].filter((n=>n.scope===t&&n.shortcut===e)).forEach((e=>{e&&e.method&&e.method()}))}))},unbind:ih,keyMap:Wf,modifier:Yf,modifierMap:Zf};for(const by in uh)Object.prototype.hasOwnProperty.call(uh,by)&&(lh[by]=uh[by]);if("undefined"!=typeof window){const e=window.hotkeys;lh.noConflict=t=>(t&&window.hotkeys===lh&&(window.hotkeys=e),lh),window.hotkeys=lh}let dh=null;y.registerExtension({name:"Comfy.EasyUse.HotKeys",setup(){if(void 0!==lh){lh("up,down,left,right",(function(e,t){var n,o,i,r,s,a,l,c,u,d,p,f,h,m,g;e.preventDefault();if(!A("EasyUse.Hotkeys.JumpNearestNodes",null,!0))return;const v=Ap();if(0===v.length)return;const y=v[0];switch(t.key){case"up":case"left":let e=null;if(Ip(y)){const e=null==(n=y.widgets_values)?void 0:n[0],t=null==(o=y.graph)?void 0:o._nodes,i=null==t?void 0:t.find((t=>{var n;if(Pp(t)){if((null==(n=t.widgets_values)?void 0:n[0])===e)return t}return null}));i&&Op(i)}else if((null==(i=y.inputs)?void 0:i.length)>0){for(let t=0;t{var n;if(Ip(t)){if((null==(n=t.widgets_values)?void 0:n[0])===e)return t}return null}));n&&Op(n)}else if((null==(d=y.outputs)?void 0:d.length)>0){for(let e=0;e0&&y.outputs[e].links[0]){t=y.outputs[e].links[0];break}if(t){const e=null==(f=y.graph)?void 0:f.links;if(e[t]){const n=null==(h=e[t])?void 0:h.target_id,o=null==(g=null==(m=y.graph)?void 0:m._nodes_by_id)?void 0:g[n];o&&Op(o)}}}}})),lh("shift+up,shift+down,shift+left,shift+right",(function(e,t){e.preventDefault();if(!A("EasyUse.Hotkeys.AlignSelectedNodes",null,!0))return;const n=Ap();if(n.length<=1)return;const o=n;switch(t.key){case"shift+up":LGraphCanvas.alignNodes(o,"top",o[0]);break;case"shift+down":LGraphCanvas.alignNodes(o,"bottom",o[0]);break;case"shift+left":LGraphCanvas.alignNodes(o,"left",o[0]);break;case"shift+right":LGraphCanvas.alignNodes(o,"right",o[0])}dh||(dh=np()),dh&&dh.update()})),lh("shift+g",(function(e,t){e.preventDefault();A("EasyUse.Hotkeys.AddGroup",null,!0)&&(fh(),dh||(dh=np()),dh&&dh.update())}));const e=[];Array.from(Array(10).keys()).forEach((t=>e.push(`alt+${t}`))),lh(e.join(","),(async function(e,t){e.preventDefault();if(!A("EasyUse.Hotkeys.NodesTemplate",null,!0))return;const n=t.key;let o=parseInt(n.split("+")[1]);const i=await b.getUserData("comfy.templates.json");let r=null;if(200==i.status)try{r=await i.json()}catch(a){Fp.error(V("Get Node Templates File Failed"))}else localStorage["Comfy.NodeTemplates"]?r=JSON.parse(localStorage["Comfy.NodeTemplates"]):Fp.warn(V("No Node Templates Found"));if(!r)return void Fp.warn(V("No Node Templates Found"));o=0===o?9:o-1;const s=r[o];if(s)try{const e=(null==s?void 0:s.name)||"Group",t=(null==s?void 0:s.data)?JSON.parse(s.data):[];ph((async()=>{await k.registerFromWorkflow(t.groupNodes,{}),localStorage.litegrapheditor_clipboard=s.data,y.canvas.pasteFromClipboard(),t.groupNodes||fh(e)}))}catch(a){Fp.error(a)}else Fp.warn(V("Node template with {key} not set").replace("{key}",n))}));const t=async function(e){if(("b"===e.key||"m"==e.key)&&(e.metaKey||e.ctrlKey)){if(0===Ap().length)return;dh||(dh=np()),dh&&dh.update()}};window.addEventListener("keydown",t,!0)}}});const ph=async e=>{const t=localStorage.litegrapheditor_clipboard;await e(),localStorage.litegrapheditor_clipboard=t},fh=e=>{const t=Ap();if(0===t.length)return;const n=t;let o=new LiteGraph.LGraphGroup;o.title=e||"Group",((e,t=[],n=20)=>{var o,i,r,s,a,l,c,u,d,p;for(var f of(i=r=s=a=-1,l=c=u=d=-1,[e._nodes,t]))for(var h in f)l=(p=f[h]).pos[0],c=p.pos[1],u=p.pos[0]+p.size[0],d=p.pos[1]+p.size[1],"Reroute"!=p.type&&(c-=LiteGraph.NODE_TITLE_HEIGHT),(null==(o=p.flags)?void 0:o.collapsed)&&(d=c+LiteGraph.NODE_TITLE_HEIGHT,(null==p?void 0:p._collapsed_width)&&(u=l+Math.round(p._collapsed_width))),(-1==i||ls)&&(s=u),(-1==a||d>a)&&(a=d);r-=Math.round(1.4*e.font_size),e.pos=[i-n,r-n],e.size=[s-i+2*n,a-r+2*n]})(o,n),y.canvas.graph.add(o)};function hh(e,t,n,o){const i=[];return e.workflow.links.forEach((e=>{n&&e[1]===t&&!i.includes(e[3])&&i.push(e[3]),o&&e[3]===t&&!i.includes(e[1])&&i.push(e[1])})),i}async function mh(e,t=!1){const n=structuredClone(await y.graphToPrompt()),o=[];if(n.workflow.nodes.forEach((e=>{o.push(e.id)})),n.workflow.links=n.workflow.links.filter((e=>o.includes(e[1])&&o.includes(e[3]))),t)for(;!y.graph._nodes_by_id[e].isChooser;)e=hh(n,e,!0,!1)[0];const i=function(e,t){const n=[],o=[t];for(;o.length>0;){const t=o.pop();n.push(t),o.push(...hh(e,t,!0,!1).filter((e=>!(n.includes(e)||o.includes(e)))))}o.push(...n.filter((e=>e!=t)));const i=[t];for(;o.length>0;){const t=o.pop();i.push(t),o.push(...hh(e,t,!1,!0).filter((e=>!(i.includes(e)||o.includes(e)))))}const r=[];return r.push(...n),r.push(...i.filter((e=>!r.includes(e)))),r}(n,e);n.workflow.nodes=n.workflow.nodes.filter((t=>(t.id===e&&t.inputs.forEach((e=>{e.link=null})),i.includes(t.id)))),n.workflow.links=n.workflow.links.filter((e=>i.includes(e[1])&&i.includes(e[3])));const r={};for(const[l,c]of Object.entries(n.output))i.includes(parseInt(l))&&(r[l]=c);const s={};for(const[l,c]of Object.entries(r[e.toString()].inputs))Array.isArray(c)||(s[l]=c);r[e.toString()].inputs=s,n.output=r;const a=y.graphToPrompt;y.graphToPrompt=()=>(y.graphToPrompt=a,n),y.queuePrompt(0)}const gh=new class{constructor(){this.current_node_id=void 0,this.class_of_current_node=null,this.current_node_is_chooser=!1}update(){var e,t;return y.runningNodeId!=this.current_node_id&&(this.current_node_id=y.runningNodeId,this.current_node_id?(this.class_of_current_node=null==(t=null==(e=y.graph)?void 0:e._nodes_by_id[y.runningNodeId.toString()])?void 0:t.comfyClass,this.current_node_is_chooser="easy imageChooser"===this.class_of_current_node):(this.class_of_current_node=void 0,this.current_node_is_chooser=!1),!0)}},vh=class e{constructor(){}static idle(){return!y.runningNodeId}static paused(){return!0}static paused_here(t){return e.here(t)}static running(){return!e.idle()}static here(e){return y.runningNodeId==e}static state(){return"Paused"}};v(vh,"cancelling",!1);let yh=vh;function bh(e,t){const n=new FormData;n.append("message",t),n.append("id",e),b.fetchApi("/easyuse/image_chooser_message",{method:"POST",body:n})}function _h(){bh(-1,"__cancel__"),yh.cancelling=!0,b.interrupt(),yh.cancelling=!1}var wh=0;function Sh(){wh+=1}const xh=["easy kSampler","easy kSamplerTiled","easy fullkSampler"];function kh(e){const t=y.graph._nodes_by_id[e.detail.id];if(t){t.selected=new Set,t.anti_selected=new Set;const n=function(e,t){var n;return e.imgs=[],t.forEach((t=>{const n=new Image;e.imgs.push(n),n.onload=()=>{y.graph.setDirtyCanvas(!0)},n.src=`/view?filename=${encodeURIComponent(t.filename)}&type=temp&subfolder=${y.getPreviewFormatParam()}`})),null==(n=e.setSizeForImage)||n.call(e),e.imgs}(t,e.detail.urls);return{node:t,image:n,isKSampler:xh.includes(t.type)}}}function Ch(e,t,n){var o;if(e.imageRects)o=e.imageRects[t];else{const t=e.imagey;o=[1,t+1,e.size[0]-2,e.size[1]-t-2]}n.strokeRect(o[0]+1,o[1]+1,o[2]-2,o[3]-2)}class Ah extends w{constructor(){super(),this.node=null,this.select_index=[],this.dialog_div=null}show(e,t){this.select_index=[],this.node=t;const n=e.map(((e,n)=>{const o=_("img",{src:e.src,onclick:e=>{this.select_index.includes(n)?(this.select_index=this.select_index.filter((e=>e!==n)),o.classList.remove("selected")):(this.select_index.push(n),o.classList.add("selected")),t.selected.has(n)?t.selected.delete(n):t.selected.add(n)}});return o}));super.show(_("div.comfyui-easyuse-chooser-dialog",[_("h5.comfyui-easyuse-chooser-dialog-title",V("Choose images to continue")),_("div.comfyui-easyuse-chooser-dialog-images",n)]))}createButtons(){const e=super.createButtons();return e[0].onclick=e=>{yh.running()&&_h(),super.close()},e.unshift(_("button",{type:"button",textContent:V("Choose Selected Images"),onclick:e=>{bh(this.node.id,[...this.node.selected,-1,...this.node.anti_selected]),yh.idle()&&(Sh(),mh(this.node.id).then((()=>{bh(this.node.id,[...this.node.selected,-1,...this.node.anti_selected])}))),super.close()}})),e}}function Eh(){const e=y.graph._nodes_by_id[this.node_id];if(e){const t=[...e.selected];(null==t?void 0:t.length)>0&&e.setProperty("values",t),bh(e.id,[...e.selected,-1,...e.anti_selected]),yh.idle()&&(Sh(),mh(e.id).then((()=>{bh(e.id,[...e.selected,-1,...e.anti_selected])})))}}function Oh(){yh.running()&&_h()}function Lh(e){Object.defineProperty(e,"clicked",{get:function(){return this._clicked},set:function(e){this._clicked=e&&""!=this.name}})}function Th(e){e.options||(e.options={}),e.options.serialize=!1}y.registerExtension({name:"Comfy.EasyUse.imageChooser",init(){window.addEventListener("beforeunload",_h,!0)},setup(e){const t=LGraphCanvas.prototype.draw;LGraphCanvas.prototype.draw=function(){gh.update()&&e.graph._nodes.forEach((e=>{e.update&&e.update()})),t.apply(this,arguments)},b.addEventListener("easyuse-image-choose",(function(e){const{node:t,image:n,isKSampler:o}=kh(e);if(o){(new Ah).show(n,t)}}));const n=b.interrupt;b.interrupt=function(){yh.cancelling||_h(),n.apply(this,arguments)},b.addEventListener("execution_start",(function(){(wh>0?(wh-=1,0):(bh(-1,"__start__"),1))&&e.graph._nodes.forEach((e=>{(e.selected||e.anti_selected)&&(e.selected.clear(),e.anti_selected.clear(),e.update())}))}))},async nodeCreated(e,t){if("easy imageChooser"==e.comfyClass){e.setProperty("values",[]),void 0===(null==e?void 0:e.imageIndex)&&Object.defineProperty(e,"imageIndex",{get:function(){return null},set:function(t){e.overIndex=t}}),void 0===(null==e?void 0:e.imagey)&&Object.defineProperty(e,"imagey",{get:function(){return null},set:function(t){return e.widgets[e.widgets.length-1].last_y+LiteGraph.NODE_WIDGET_HEIGHT}});const t=e.onMouseDown;e.onMouseDown=function(n,o,i){if(n.isPrimary){const t=function(e,t){var n,o;if((null==(n=e.imgs)?void 0:n.length)>1)for(var i=0;i0&&n0&&oe.imagey)return 0;return-1}(e,o);t>=0&&this.imageClicked(t)}return t&&t.apply(this,arguments)},e.send_button_widget=e.addWidget("button","","",Eh),e.cancel_button_widget=e.addWidget("button","","",Oh),Lh(e.cancel_button_widget),Lh(e.send_button_widget),Th(e.cancel_button_widget),Th(e.send_button_widget)}},beforeRegisterNodeDef(e,t,n){if("easy imageChooser"==(null==t?void 0:t.name)){const t=e.prototype.onDrawBackground;e.prototype.onDrawBackground=function(e){t.apply(this,arguments),function(e,t){var n,o;if(e.imgs){if(e.imageRects)for(let n=0;n{Ch(e,n,t)})),t.strokeStyle="#F88",null==(o=null==e?void 0:e.anti_selected)||o.forEach((n=>{Ch(e,n,t)}))}}(this,e)},e.prototype.imageClicked=function(t){"easy imageChooser"===(null==e?void 0:e.comfyClass)&&(this.selected.has(t)?this.selected.delete(t):this.selected.add(t),this.update())};const n=e.prototype.update;e.prototype.update=function(){var e;if(n&&n.apply(this,arguments),this.send_button_widget){this.send_button_widget.node_id=this.id;const t=(this.selected?this.selected.size:0)+(this.anti_selected?this.anti_selected.size:0),n=(null==(e=this.imgs)?void 0:e.length)||0;yh.paused_here(this.id)&&t>0?this.send_button_widget.name=t>1?"Progress selected ("+t+"/"+n+")":"Progress selected image":this.send_button_widget.name=t>0?t>1?"Progress selected ("+t+"/"+n+")":"Progress selected image as restart":""}if(this.cancel_button_widget){const e=yh.running();this.cancel_button_widget.name=e?"Cancel current run":""}this.setDirtyCanvas(!0,!0)}}}}),Number.prototype.div=function(e){return function(e,t){let n,o,i=0,r=0,s="string"==typeof e?e:e.toString(),a="string"==typeof t?t:t.toString();try{i=s.toString().split(".")[1].length}catch(l){}try{r=a.toString().split(".")[1].length}catch(l){}return n=Number(s.toString().replace(".","")),o=Number(a.toString().replace(".","")),n/o*Math.pow(10,r-i)}(this,e)};let Nh=[],Ih=0;const Ph={sd3:6.5,"sd3-turbo":4};class Dh extends w{constructor(){super(),this.lists=[],this.dialog_div=null,this.user_div=null}addItem(e,t){return _("div.easyuse-account-dialog-item",[_("input",{type:"text",placeholder:"Enter name",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);Nh[t].name=e.target.value},value:Nh[e].name}),_("input.key",{type:"text",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);Nh[t].key=e.target.value},placeholder:"Enter APIKEY",value:Nh[e].key}),_("button.choose",{textContent:V("Choose"),onclick:async e=>{var n,o,i;const r=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);let s=Nh[r].name,a=Nh[r].key;if(!s)return void Fp.error(V("Please enter the account name"));if(!a)return void Fp.error(V("Please enter the APIKEY"));let l=!0;for(let t=0;t{(new Dh).show(t)}},[_("div.user",[_("div.avatar",r?[_("img",{src:r})]:"😀"),_("div.info",[_("h5.name",s),_("h6.remark","Credits: "+a)])]),_("div.edit",{textContent:V("Edit")})])),Fp.success(V("Save Succeed"))}else Fp.success(V("Save Succeed"));this.close()}else Fp.error(V("Save Failed"))}}),_("button.delete",{textContent:V("Delete"),onclick:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);Nh.length<=1?Fp.error(V("At least one account is required")):(Nh.splice(t,1),this.dialog_div.removeChild(e.target.parentNode))}})])}show(e){Nh.forEach(((t,n)=>{this.lists.push(this.addItem(n,e))})),this.dialog_div=_("div.easyuse-account-dialog",this.lists),super.show(_("div.easyuse-account-dialog-main",[_("div",[_("a",{href:"https://platform.stability.ai/account/keys",target:"_blank",textContent:V("Getting Your APIKEY")})]),this.dialog_div]))}createButtons(){const e=super.createButtons();return e.unshift(_("button",{type:"button",textContent:V("Save Account Info"),onclick:e=>{let t=!0;for(let n=0;n{200==e.status?Fp.success(V("Save Succeed")):Fp.error(V("Save Failed"))}))}else Fp.error(V("APIKEY is not Empty"))}})),e.unshift(_("button",{type:"button",textContent:V("Add Account"),onclick:e=>{const t="Account "+Nh.length.toString();Nh.push({name:t,key:""});const n=this.addItem(Nh.length-1);this.lists.push(n),this.dialog_div.appendChild(n)}})),e}}y.registerExtension({name:"Comfy.EasyUse.API.SD3",async beforeRegisterNodeDef(e,t,n){if("easy stableDiffusion3API"==t.name){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=async function(){var e,n,o;t&&(null==t||t.apply(this,arguments));const i=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),r=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));let s=this.widgets.find((e=>"model"==e.name));s.callback=e=>{a.value="-"+Ph[e]};const a=this.addWidget("text","cost_credit","0",(e=>{}),{serialize:!1});a.disabled=!0,setTimeout((e=>{"control_before_generate"==r.name&&0===i.value&&(i.value=Math.floor(4294967294*Math.random())),a.value="-"+Ph[s.value]}),100);let l=_("div.easyuse-account-user",[V("Loading UserInfo...")]);this.addDOMWidget("account","btn",_("div.easyuse-account",l)),b.addEventListener("stable-diffusion-api-generate-succeed",(async({detail:e})=>{var t;let n=l.querySelectorAll(".remark");if(n&&n[0]){const t=(null==e?void 0:e.model)?Ph[e.model]:0;if(t){let e=function(e,t){let n,o,i,r,s,a;s="string"==typeof e?e:e.toString(),a="string"==typeof t?t:t.toString();try{n=s.split(".")[1].length}catch(l){n=0}try{o=a.split(".")[1].length}catch(l){o=0}return i=Math.pow(10,Math.max(n,o)),r=n>=o?n:o,((e*i-t*i)/i).toFixed(r)}(parseFloat(n[0].innerText.replace(/Credits: /g,"")),t);e>0&&(n[0].innerText="Credits: "+e.toString())}}await W(1e4);const o=await b.fetchApi("/easyuse/stability/balance");if(200==o.status){const e=await o.json();if(null==e?void 0:e.balance){const o=(null==(t=e.balance)?void 0:t.credits)||0;n&&n[0]&&(n[0].innerText="Credits: "+o)}}}));const c=await b.fetchApi("/easyuse/stability/api_keys");if(200==c.status){let t=await c.json();if(Nh=t.keys,Ih=t.current,Nh.length>0&&void 0!==Ih){const t=Nh[Ih].key,i=Nh[Ih].name;if(t){const t=await b.fetchApi("/easyuse/stability/user_info");if(200==t.status){const i=await t.json();if((null==i?void 0:i.account)&&(null==i?void 0:i.balance)){const t=(null==(e=i.account)?void 0:e.profile_picture)||null,r=(null==(n=i.account)?void 0:n.email)||null,s=(null==(o=i.balance)?void 0:o.credits)||0;l.replaceChildren(_("div.easyuse-account-user-info",{onclick:e=>{(new Dh).show(l)}},[_("div.user",[_("div.avatar",t?[_("img",{src:t})]:"😀"),_("div.info",[_("h5.name",r),_("h6.remark","Credits: "+s)])]),_("div.edit",{textContent:V("Edit")})]))}}}else l.replaceChildren(_("div.easyuse-account-user-info",{onclick:e=>{(new Dh).show(l)}},[_("div.user",[_("div.avatar","😀"),_("div.info",[_("h5.name",i),_("h6.remark",V("Click to set the APIKEY first"))])]),_("div.edit",{textContent:V("Edit")})]))}}}}}});let jh=null;function Mh(){jh&&(jh.removeEventListeners(),jh.dropdown.remove(),jh=null)}function Rh(e,t,n,o=!1){Mh(),new $h(e,t,n,o)}class $h{constructor(e,t,n,o=!1){this.dropdown=document.createElement("ul"),this.dropdown.setAttribute("role","listbox"),this.dropdown.classList.add("easy-dropdown"),this.selectedIndex=-1,this.inputEl=e,this.suggestions=t,this.onSelect=n,this.isDict=o,this.focusedDropdown=this.dropdown,this.buildDropdown(),this.onKeyDownBound=this.onKeyDown.bind(this),this.onWheelBound=this.onWheel.bind(this),this.onClickBound=this.onClick.bind(this),this.addEventListeners()}buildDropdown(){this.isDict?this.buildNestedDropdown(this.suggestions,this.dropdown):this.suggestions.forEach(((e,t)=>{this.addListItem(e,t,this.dropdown)}));const e=this.inputEl.getBoundingClientRect();this.dropdown.style.top=e.top+e.height-10+"px",this.dropdown.style.left=e.left+"px",document.body.appendChild(this.dropdown),jh=this}buildNestedDropdown(e,t){let n=0;Object.keys(e).forEach((o=>{const i=e[o];if("object"==typeof i&&null!==i){const e=document.createElement("ul");e.setAttribute("role","listbox"),e.classList.add("easy-nested-dropdown");const r=document.createElement("li");r.classList.add("folder"),r.textContent=o,r.appendChild(e),r.addEventListener("mouseover",this.onMouseOver.bind(this,n,t)),t.appendChild(r),this.buildNestedDropdown(i,e),n+=1}else{const e=document.createElement("li");e.classList.add("item"),e.setAttribute("role","option"),e.textContent=o,e.addEventListener("mouseover",this.onMouseOver.bind(this,n,t)),e.addEventListener("mousedown",this.onMouseDown.bind(this,o)),t.appendChild(e),n+=1}}))}addListItem(e,t,n){const o=document.createElement("li");o.setAttribute("role","option"),o.textContent=e,o.addEventListener("mouseover",this.onMouseOver.bind(this,t)),o.addEventListener("mousedown",this.onMouseDown.bind(this,e)),n.appendChild(o)}addEventListeners(){document.addEventListener("keydown",this.onKeyDownBound),this.dropdown.addEventListener("wheel",this.onWheelBound),document.addEventListener("click",this.onClickBound)}removeEventListeners(){document.removeEventListener("keydown",this.onKeyDownBound),this.dropdown.removeEventListener("wheel",this.onWheelBound),document.removeEventListener("click",this.onClickBound)}onMouseOver(e,t){t&&(this.focusedDropdown=t),this.selectedIndex=e,this.updateSelection()}onMouseOut(){this.selectedIndex=-1,this.updateSelection()}onMouseDown(e,t){t.preventDefault(),this.onSelect(e),this.dropdown.remove(),this.removeEventListeners()}onKeyDown(e){const t=Array.from(this.focusedDropdown.children),n=t[this.selectedIndex];if(jh)if(38===e.keyCode)e.preventDefault(),this.selectedIndex=Math.max(0,this.selectedIndex-1),this.updateSelection();else if(40===e.keyCode)e.preventDefault(),this.selectedIndex=Math.min(t.length-1,this.selectedIndex+1),this.updateSelection();else if(39===e.keyCode){if(e.preventDefault(),n&&n.classList.contains("folder")){const e=n.querySelector(".easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=0,this.updateSelection())}}else if(37===e.keyCode&&this.focusedDropdown!==this.dropdown){const e=this.focusedDropdown.closest(".easy-dropdown, .easy-nested-dropdown").parentNode.closest(".easy-dropdown, .easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=Array.from(e.children).indexOf(this.focusedDropdown.parentNode),this.updateSelection())}else if((13===e.keyCode||9===e.keyCode)&&this.selectedIndex>=0){e.preventDefault(),n.classList.contains("item")&&(this.onSelect(t[this.selectedIndex].textContent),this.dropdown.remove(),this.removeEventListeners());const o=n.querySelector(".easy-nested-dropdown");o&&(this.focusedDropdown=o,this.selectedIndex=0,this.updateSelection())}else 27===e.keyCode&&(this.dropdown.remove(),this.removeEventListeners())}onWheel(e){const t=parseInt(this.dropdown.style.top);localStorage.getItem("Comfy.Settings.Comfy.InvertMenuScrolling")?this.dropdown.style.top=t+(e.deltaY<0?10:-10)+"px":this.dropdown.style.top=t+(e.deltaY<0?-10:10)+"px"}onClick(e){this.dropdown.contains(e.target)||e.target===this.inputEl||(this.dropdown.remove(),this.removeEventListeners())}updateSelection(){Array.from(this.focusedDropdown.children).forEach(((e,t)=>{t===this.selectedIndex?e.classList.add("selected"):e.classList.remove("selected")}))}}function Gh(e){const t=e.min||0,n=e.max||0,o=e.step||1;if(0===o)return[];const i=[];let r=t;for(;r<=n;){if(Number.isInteger(o))i.push(Math.round(r)+"; ");else{let e=r.toFixed(3);-0==e&&(e="0.000"),/\.\d{3}$/.test(e)||(e+="0"),i.push(e+"; ")}r+=o}return n>=0&&t>=0?i:i.reverse()}let Bh={},Fh={};function Uh(e,t){String(e.id);const n=t.name,o=t.value.replace(/^(loader|preSampling):\s/,"");Fh[n]?Fh[n]!=Bh[o]&&(Fh[n]=Bh[o]):Fh={...Fh,[n]:Bh[o]}}y.registerExtension({name:"Comfy.EasyUse.XYPlot",async beforeRegisterNodeDef(e,t,n){if("easy XYPlot"===t.name){Bh=t.input.hidden.plot_dict[0];for(const e in Bh){const t=Bh[e];if(Array.isArray(t)){let n=[];for(const e of t)n.push(e+"; ");Bh[e]=n}else Bh[e]="object"==typeof t?"seed"==e?t+"; ":Gh(t):t+"; "}Bh.None=[],Bh["---------------------"]=[]}},nodeCreated(e){"easy XYPlot"===e.comfyClass&&(function(e){if(e.widgets)for(const t of e.widgets)if("x_axis"===t.name||"y_axis"===t.name){let n=t.value;Object.defineProperty(t,"value",{get:()=>n,set(o){o!==n&&(n=o,Uh(e,t))}})}}(e),function(e){if(e.widgets){const t=e.widgets.filter((e=>"customtext"===e.type&&!1!==e.dynamicPrompts||e.dynamicPrompts));for(const e of t){let t=function(e,t,o,i){return e&&(t[o]=e),t.map((e=>n(e,i))).filter((e=>""!==e)).join("")},n=function(e,t){if(e=o(e),i(e,t))return e+"; ";let n=r(e,t);return 1===n.length||2===n.length?n[0]:i(s(e),t)?s(e)+"; ":""},o=function(e){return e.replace(/(\n|;| )/g,"")},i=function(e,t){return t.includes(e+"; ")},r=function(e,t){return t.filter((t=>t.toLowerCase().includes(e.toLowerCase())))},s=function(e){return Number(e)?Number(e).toFixed(3):["0","0.","0.0","0.00","00"].includes(e)?"0.000":e};const a=function(){const n=e.name[0]+"_axis";let o=(null==Fh?void 0:Fh[n])||[];if(0===o.length)return;const i=e.inputEl.value,r=e.inputEl.selectionStart;let s=i.split("; ");const a=i.substring(0,r).split("; ").length-1,l=s[a].replace(/\n/g,"").toLowerCase(),c=o.filter((e=>e.toLowerCase().includes(l))).map((e=>e.replace(/; /g,"")));if(c.length>0)Rh(e.inputEl,c,(n=>{const i=t(n,s,a,o);e.inputEl.value=i}));else{Mh();const n=t(null,s,a,o);e.inputEl.value=n}};e.inputEl.removeEventListener("input",a),e.inputEl.addEventListener("input",a),e.inputEl.removeEventListener("mouseup",a),e.inputEl.addEventListener("mouseup",a)}}}(e))}});const zh=_s("graphStore",{state:e=>({selectors:[],selectors_styles:{},seg_selectors:[],slider_controls:[]}),actions:{setSelectors(e){this.selectors=tp(e)},setStyles(e,t){this.selectors_styles[e]||(this.selectors_styles[e]=t)},setSegSelectors(e){this.seg_selectors=tp(e)},setSliderControls(e){this.slider_controls=tp(e)}}}),Vh=["data-id"],Hh=[Zi("i",{class:"mdi mdi-trash-can"},null,-1)],Wh=Zi("i",{class:"mdi mdi-magnify"},null,-1),Yh=["placeholder"],Zh=["onMouseenter","onMouseleave"],Kh=["onClick"],Xh=["name","checked"],Qh=["src"],Jh={key:0},qh=Zi("span",{class:"comfyui-easyuse-success"},"positive:",-1),em={key:1},tm=Zi("span",{class:"comfyui-easyuse-error"},"negative:",-1),nm="comfyui-easyuse-selector",om={__name:"stylesSelector",props:{id:{type:String|Number,default:""},type:{type:String,default:""},selectedStyles:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["chooseStyle"],setup(e,{emit:t}){const n=e,o=zh(),{selectors_styles:i}=ws(o),r=pn([]);bi((e=>n.type),(async e=>{r.value=[],e&&await(async e=>{if(i.value[n.type])return!0;const t=await b.fetchApi(`/easyuse/prompt/styles?name=${e}`);if(200===t.status){let e=(await t.json()).map(((e,t)=>(e.index=t,e)));return await o.setStyles(n.type,e),!0}return Fp.error(V("Get styles list Failed")),!1})(e)&&a()}),{immediate:!0});const s=t,a=e=>{const t=n.selectedStyles,o=tp(i.value[n.type]);r.value=o.sort(((e,t)=>e.index-t.index)).sort(((e,n)=>t.includes(n.name)-t.includes(e.name)))},l=pn(""),c=e=>e.toLowerCase(),u=Xt({}),d=e=>{u.src="",u.name="",u.positive="",u.negative=""},p=async e=>{const t=await b.fetchApi(`/easyuse/prompt/styles/image?name=${e}&styles_name=${n.type}`);if(200===t.status){const o=await t.text();if(o.startsWith("http"))return o;return`/easyuse/prompt/styles/image?name=${e}&styles_name=${n.type}`}},f=e=>{e.target.src="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QNLaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA5LjEtYzAwMSA3OS4xNDYyODk5Nzc3LCAyMDIzLzA2LzI1LTIzOjU3OjE0ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuMSAoMjAyMzA5MDUubS4yMzE2IDk3OWM4NmQpICAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjA3NEU1QzNCNUJBMTFFRUExMUVDNkZDRjI0NzlBN0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjA3NEU1QzRCNUJBMTFFRUExMUVDNkZDRjI0NzlBN0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGMDc0RTVDMUI1QkExMUVFQTExRUM2RkNGMjQ3OUE3RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGMDc0RTVDMkI1QkExMUVFQTExRUM2RkNGMjQ3OUE3RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/uAA5BZG9iZQBkwAAAAAH/2wCEAAYEBAQFBAYFBQYJBgUGCQsIBgYICwwKCgsKCgwQDAwMDAwMEAwODxAPDgwTExQUExMcGxsbHB8fHx8fHx8fHx8BBwcHDQwNGBAQGBoVERUaHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fH//AABEIAIAAgAMBEQACEQEDEQH/xACLAAEAAgMBAQEAAAAAAAAAAAAABAUCAwYBBwgBAQADAQEBAAAAAAAAAAAAAAABAgMEBQYQAAEEAgECAwUHAwUAAAAAAAEAAgMEEQUhEgYxEwdBYSIyFFFxgVJyIxWRoTOxwdFiJBEBAAICAQQBBAIDAAAAAAAAAAECEQMxIUESBBOB0SIyUXGCIwX/2gAMAwEAAhEDEQA/AP1SgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDXJYgj+d4afsVopM8KWvEcy8it1pXdMcjXO/Lnn+im2u0cwV2VniW1UXEBAQEBAQEBAQEBAQRNlc+mgyDh7zhv+5WunX5Sw37fCHM2dh48r06ank7N6rn2Ja7qa4hw5BBwQV010uK+/DsO29v/J68SOI86Jxjl95HIP4gryPc0fHfHaXu+j7Py68zzHSVquV2iAgICAgICAgICDyTr6HdHz4PTnwypjnqic46OauNbY6mGX99p+L8w9xaeV6OufHt0eXtr59M9VFb194E9LmuH3kf6rv17avO2ets7YVcuuuk/uOa3PgBlxP4BdMbq9nLPqbJ5xDbSM9azFXpyujuSO+Bo5kcf0NPyj25We2YtEzaPxdfr6519Kz+UvqEIlELBKQZQ0eYRwC7HOPxXzVsZ6cPpK5x15ZKEiAgICAgICAgICCNc1tG40CzA2XHg4j4h9zhyFpr22p+s4Z7NNL/ALRlTX+1dVFBJOJrcTI2lxZHYcBx+sldWv3bzOMVn6fZy39OkRnNo+v3aoOx9JOxks8tqwHDPS+1IW8+IzGWZVrf9DZHSMR/j9yvo656zMz9V1rdLqdYwsoVIqwd87mNAc79Tvmd+JXJt332ftMy6temlP1jCasmggICAgICAgICAgwlmiib1SPDB7zhWrWZ4VtaI5QXb2l5ojYHvLjjIGB/dbR61sZlhPtVziFb3PYdd0luCvAZbXludVZ1huZQPgyTx4/atvWj4rxaZ6d/6Ye1/t1zSI6zx/bzti5YqaOpBeg8u41n/oa14cA4ccH7lPs1jZebVn8eyPUtOrXFbR+XdYx9xa90pjeXROaSCXDj+oysZ9S+Mx1bR7uvOJ6LGOWKVgfG8PafAtOQueazHLqraJjMMlCRAQEBAQEBAQRLNp4HTFx/2/4WtKR3Y32T2Udl8j3knk/aeSu6kREPPvaZlpY3DmyY8DyrzPZWv8tkvmFv7bg12RyR1DGeeMj2KnjE9JaeUx1hi1sgaet/U7JIOMcE8Dj7FMREcK2zPKMasr5XO6fmOVt5xEOadVplYU45IAOhxa72kLm2TFuXXqrNeF1WtlwDZeHfmHguO+vHDupszylLJsICAgICAg8cMjCQiYR5IVpFmc1Q5qLXHPgfbhbV2MLaYlqNQAYA4V/kV+PDA1fcp81fjYurtYMu4CmLZRNYhtZWBAI8CqzdaKN8df3LObtIokxwe5ZzZrFUloIGFnLWHqhIgICAgICAgxMbSpyjDAwAq3kr4MTWCnzR4MX02PGHDISNmETqieWba7QABwB4KJumKNgjaFXK0VZYChYQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEHzvuv1G7k1W9s6/Xamtaq15oaonmnsCR008HntaI4K8/s4HOeEGXZXqTud7uqtG7r6kNa5HdMU9aaw9zZde+FkrHsnr1+M2MZBPIKDRe9cO2K2mjs/V0m7X61lWzq32W+ZFEbfkSSO4B+GL9zw4QWm99TqFVmjsaSu7fUtxeNM2aTmSMBbHI9zWHqHVJlnDTxjPKCJL6sea502t1D7Ouhr0rNqxNM2CSNuwnkgjAi6ZOotdEc/Egibf1j/j+7JNL9DWdWg84TWn2ywtdFKyMZb5Tg0nLyG55x48IJ3bXqe/ea/a26dFtyTXtldDUqyOdNL5VqaDHS5gwXRxMe3xz1Y9iDKP1Sa7uefUnR7TyYqUVoEU5jY6pJZIz1RY4ZiMYd7TkexBA749Wr2gtCKlrIpGs17NjK29LLWmPmMsyiFkbIZsPEdKQu6y0eAQWdD1E2L93W1tzRyCDY3paev2NaxVlhIjidMfMb5vmse1kbi9pZ7MeKDt0BAQEBAQfEPU+lFY2++q2K1uSSezTnrReVsTTmiZVYHOd9LVuQyubIwANkbxz4FA7FsQ0NrrLNXX7N0eo1+3darGDYPjb5j6prxVRajjDetsRAjj4yM4CDre2uxO7q2hqtm7nua6w9rp5tfXgoSxwyTOMr42PlrPe4Nc8jJJQRDb3Oz1fYFrcV7As0mu3u7nbWkBZ9LSfG5nlxs/yySWRiNozwcBBx9EXadGTXz62+LG41+jZS6adhzS6vfnlkEjgzEZax7T8ePFBu3nbPdUXqJZsw6S5cqbCW1YdIY2lxhhfEGMjfHtoG9HxucwPEZy4/A7kMC87aq2Kmv7mdvxuqGmklFjUU4G2Yp21rdyW00t+kJkFl88pY9vDgwNDvEoK9np73FBcHdkrt2+rZd5FjQx7O0b8WvbzDKZhN1SSse573QdeAHkN+Ichj3p2rBvZq9vUnY2tcNQPqpZYZpJ44GxXqzHdVlzZZpib73mLHViI85c1BZ6OpsIe/6/XSuntevdsz6+8+pI0/yM1dtWVr2Z644P8rmyuj6S53jxkh9aQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBB/9k="};return(t,o)=>($i(),Ui("div",{class:Me(nm+` ${nm}-styles`),"data-id":e.id,onMouseleave:d},[r.value.length>0&&e.show?($i(),Ui(Ii,{key:0},[Zi("div",{class:Me(nm+"__header")},[Zi("div",{class:Me(nm+"__header_button"),onClick:o[0]||(o[0]=e=>(s("chooseStyle",[]),void(l.value="")))},Hh,2),Zi("div",{class:Me(nm+"__header_search")},[Wh,Hn(Zi("textarea",{class:"search","onUpdate:modelValue":o[1]||(o[1]=e=>l.value=e),dir:"ltr",rows:1,placeholder:hn(V)("Type here to search styles ...")},null,8,Yh),[[Zr,l.value]])],2)],2),Zi("div",{class:Me(nm+"__content"),onMouseleave:a},[($i(!0),Ui(Ii,null,bo(r.value,((t,o)=>($i(),Ui("div",{class:Me(nm+"-item"),key:o,onMouseenter:e=>(async e=>{if(!e.imageSrc){if(e.imageLoading)return;e.imageLoading=!0;const t=await p(e.imgName).finally((()=>e.imageLoading=!1));e.imageSrc=t}u.name="zh-CN"==z&&e.name_cn?e.name_cn:e.name,u.positive=e.prompt,u.negative=e.negative_prompt,u.src=e.imageSrc})(t),onMouseleave:Qr((e=>d()),["stop"])},[Zi("span",{class:Me([nm+"-item__tag",{hide:!(e.selectedStyles.includes(t.name)||-1!=c(t.name).indexOf(c(l.value))||t.name_cn&&-1!=c(t.name_cn).indexOf(c(l.value)))}]),onClick:e=>(e=>{let t=n.selectedStyles;t.includes(e.name)?t=t.filter((t=>t!==e.name)):t.push(e.name),s("chooseStyle",t)})(t)},[Zi("input",{type:"checkbox",name:t.name,checked:e.selectedStyles.includes(t.name)},null,8,Xh),Zi("span",null,Be("zh-CN"==hn(z)&&t.name_cn?t.name_cn:t.name),1)],10,Kh)],42,Zh)))),128))],34),(null==u?void 0:u.src)?($i(),Ui("div",{key:0,class:Me(nm+"-preview")},[Zi("img",{src:u.src,ref:"image",alt:"preview",onError:f},null,40,Qh),Zi("div",{class:Me(nm+"-preview__text")},[Zi("b",null,Be(u.name),1),Zi("div",{class:Me(nm+"-preview__prompt")},[u.positive?($i(),Ui("h6",Jh,[qh,Zi("span",null,Be(u.positive),1)])):Ji("",!0),u.negative?($i(),Ui("h6",em,[tm,Zi("span",null,Be(u.negative),1)])):Ji("",!0)],2)],2)],2)):Ji("",!0)],64)):Ji("",!0)],42,Vh))}},im=["data-id"],rm=["onClick"],sm=["name","checked"],am="comfyui-easyuse-selector",lm={__name:"segSelector",props:{id:{type:String|Number,default:""},type:{type:String,default:""},selected:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const n=e,o=pn([]);bi((e=>n.type),(async e=>{switch(e){case"selfie_multiclass_256x256":o.value=["Background","Hair","Body","Face","Clothes","Others"];break;case"human_parsing_lip":o.value=["Background","Hat","Hair","Glove","Sunglasses","Upper-clothes","Dress","Coat","Socks","Pants","Jumpsuits","Scarf","Skirt","Face","Left-arm","Right-arm","Left-leg","Right-leg","Left-shoe","Right-shoe"]}}),{immediate:!0});const i=t;return(t,r)=>{var s;return $i(),Ui("div",{class:Me(am+` ${am}-seg`),"data-id":e.id},[(null==(s=o.value)?void 0:s.length)>0&&e.show?($i(!0),Ui(Ii,{key:0},bo(o.value,((t,o)=>($i(),Ui("div",{class:Me(am+"-item"),key:o},[Zi("span",{class:Me(am+"-item__tag"),onClick:e=>(e=>{let t=tp(n.selected);t.includes(e)?t=t.filter((t=>t!==e)):t.push(e),i("select",t)})(t)},[Zi("input",{type:"checkbox",name:t,checked:e.selected.includes(t)},null,8,sm),Zi("span",null,Be(hn(V)(t)),1)],10,rm)],2)))),128)):Ji("",!0)],10,im)}}},cm=["data-id"],um=["onMousedown","onDblclick"],dm="comfyui-easyuse-slider",pm="ipadapter layer weights",fm={__name:"sliderControl",props:{id:{type:String|Number,default:""},mode:{type:String,default:""},type:{type:String,default:""},values:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["changeValues","showSlider"],setup(e,{emit:t}){const n=e,o=t,i=(e,t,n)=>(e-t)/(n-t)*100,r=(e,t,o=void 0)=>{if(n.mode===pm){let n={3:2.5,6:1}[t]||0;return{default:12==e?n:0,min:-1,max:3,step:.05,value:void 0!==o?o:12==e?n:0,top:void 0!==o?100-i(o,-1,3)+"%":null,height:void 0!==o?i(o,-1,3)+"%":null}}};bi((e=>n.mode),(async(e,t)=>{var i;if(e!==t&&e===pm)if(!t&&(null==(i=n.values)?void 0:i.length)>0){const e=n.values.map((e=>{const t=e.split(":");return r(n.values.length,t[0],parseFloat(t[1]))}));await o("changeValues",e)}else{let e="sd1"==n.type?16:12,t=Array.from({length:e},((t,n)=>r(e,n)));await o("changeValues",t)}o("showSlider")}),{immediate:!0}),bi((e=>n.type),((e,t)=>{if(e!=t&&n.mode==pm){let e="sd1"==n.type?16:12,t=Array.from({length:e},((t,n)=>r(e,n)));o("changeValues",t)}}));const s=pn(null),a=pn(null);return oo((()=>{document.onmouseup=e=>document.onmousemove=null})),(t,r)=>{var l;return $i(),Ui("div",{class:Me(dm),"data-id":e.id},[(null==(l=e.values)?void 0:l.length)>0&&e.show?($i(!0),Ui(Ii,{key:0},bo(e.values,((t,r)=>($i(),Ui("div",{class:Me([dm+"-item",{positive:3==r&&"sdxl"==e.type&&e.mode==pm},{negative:6==r&&"sdxl"==e.type&&e.mode==pm}]),key:r},[Zi("div",{class:Me(dm+"-item-input")},Be(t.value),3),Zi("div",{class:Me(dm+"-item-scroll"),ref_for:!0,ref_key:"scroll",ref:s},[Zi("div",{class:Me(dm+"-item-bar"),ref_for:!0,ref_key:"bar",ref:a,style:Ne({top:t.top||100-i(t.default,t.min,t.max)+"%"}),onMousedown:e=>((e,t,i)=>{let r=e||window.event,l=s.value[i],c=a.value[i],u=tp(n.values),d=r.clientY-c.offsetTop;document.onmousemove=e=>{let n=(e||window.event).clientY-d;n<0?n=0:n>l.offsetHeight-c.offsetHeight&&(n=l.offsetHeight-c.offsetHeight);let r=(t.max-t.min)/t.step,s=(l.offsetHeight-c.offsetHeight)/r;n=Math.round(n/s)*s;const a=Math.floor(n/(l.offsetHeight-c.offsetHeight)*100)+"%",p=Math.floor((l.offsetHeight-c.offsetHeight-n)/(l.offsetHeight-c.offsetHeight)*100)+"%",f=parseFloat(parseFloat(t.max-(t.max-t.min)*(n/(l.offsetHeight-c.offsetHeight))).toFixed(2));u[i]={...u[i],top:a,height:p,value:f},o("changeValues",u),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}})(e,t,r),onDblclick:e=>((e,t,i)=>{let r=tp(n.values);r[i]={...r[i],top:null,height:null,value:t.default},o("changeValues",r)})(0,t,r)},null,46,um),Zi("div",{class:Me(dm+"-item-area"),style:Ne({height:t.height||i(t.default,t.min,t.max)+"%"})},null,6)],2),Zi("div",{class:Me(dm+"-item-label")},[Zi("span",null,Be(t.label),1)],2)],2)))),128)):Ji("",!0)],8,cm)}}},hm={__name:"index",setup(e){const t=zh(),{selectors:n,seg_selectors:o,slider_controls:i}=ws(t),r=pn({}),s=async e=>{var o,i,s,a,l,c;await W(1);const u=wp(e,"styles"),d=(null==(o=e.properties.values)?void 0:o.length)>0?e.properties.values:[];let p=tp(n.value);p.push({id:e.id,type:u.value,value:d,show:!1});const f=p.length-1;await t.setSelectors(p);let h=null==(a=null==(s=null==(i=r.value[e.id])?void 0:i._)?void 0:s.vnode)?void 0:a.el;if(!h)return;let m=e.addDOMWidget("select_styles","btn",h);e.properties.values||e.setProperty("values",[]),p[f].show=!0,await t.setSelectors(p);let g=u.value;Object.defineProperty(u,"value",{set:n=>{g=n,p[f].type=n,e.properties.values=[],p[f].value=[],t.setSelectors(p)},get:e=>g}),Object.defineProperty(m,"value",{set:e=>{setTimeout((n=>{p[f].value=e.split(","),t.setSelectors(p)}),150)},get:t=>{var o,i;return e.properties.values=(null==(i=null==(o=n.value)?void 0:o[f])?void 0:i.value)||[],e.properties.values.join(",")}}),((null==(l=e.size)?void 0:l[0])<150||(null==(c=e.size)?void 0:c[1])<150)&&e.setSize([425,500]);const v=e.onRemoved;e.onRemoved=function(){if(v&&(null==v||v.apply(this,arguments)),void 0!==n.value.findIndex((t=>t.id==e.id))){let e=tp(n.value);e.splice(f,1),t.setSelectors(e)}return v}},a=pn({}),l=async e=>{var n,i,r,s;await W(1);const l=wp(e,"method"),c=(null==(n=e.properties.values)?void 0:n.length)>0?e.properties.values:[];let u=tp(o.value);u.push({id:e.id,type:l.value,value:c,show:!1});const d=u.length-1;await t.setSegSelectors(u);let p=null==(s=null==(r=null==(i=a.value[e.id])?void 0:i._)?void 0:r.vnode)?void 0:s.el;if(!p)return;let f=e.addDOMWidget("mask_components","btn",p);e.properties.values||e.setProperty("values",[]),u[d].show=!0,await t.setSegSelectors(u);let h=l.value;Object.defineProperty(l,"value",{set:n=>{h=n,u[d].type=n,e.properties.values=[],u[d].value=[],Sp(e,wp(e,"confidence"),"selfie_multiclass_256x256"===h),e.setSize([300,"selfie_multiclass_256x256"===h?260:500]),t.setSegSelectors(u)},get:e=>h}),Object.defineProperty(f,"value",{set:e=>{setTimeout((n=>{u[d].value=e.split(","),t.setSegSelectors(u)}),150)},get:t=>{var n;return e.properties.values=(null==(n=o.value)?void 0:n[d].value)||[],e.properties.values.join(",")}}),Sp(e,wp(e,"confidence"),"selfie_multiclass_256x256"===h),e.setSize([300,"selfie_multiclass_256x256"===h?260:500]);const m=e.onRemoved;e.onRemoved=function(){if(m&&(null==m||m.apply(this,arguments)),void 0!==o.value.findIndex((t=>t.id==e.id))){let e=tp(o.value);e.splice(d,1),t.setSegSelectors(e)}return m}},c=pn({}),u=async e=>{var n,o,r,s;await W(1);const a=wp(e,"mode"),l=wp(e,"model_type"),u=(null==(n=e.properties.values)?void 0:n.length)>0?e.properties.values:[];let d=tp(i.value);d.push({id:e.id,type:l.value,mode:a.value,value:u,show:!1});const p=d.length-1;await t.setSliderControls(d);let f=null==(s=null==(r=null==(o=c.value[e.id])?void 0:o._)?void 0:r.vnode)?void 0:s.el;if(!f)return;let h=e.addDOMWidget("values","btn",f);e.properties.values||e.setProperty("values",[]),Object.defineProperty(h,"value",{set:function(){},get:t=>{var n;const o=(null==(n=i.value)?void 0:n[p].value)||[];return e.properties.values=o.map(((e,t)=>`${t}:${e.value}`)),e.properties.values.join(",")}}),e.setSize("sdxl"==l.value?[375,320]:[455,320]),l.callback=n=>{d=tp(i.value),d[p].type!=n&&(e.setSize("sdxl"==n?[375,320]:[455,320]),d[p].value=[],d[p].type=n,t.setSliderControls(d))};const m=e.onRemoved;e.onRemoved=function(){if(m&&(null==m||m.apply(this,arguments)),void 0!==i.value.findIndex((t=>t.id==e.id))){let e=tp(i.value);e.splice(p,1),t.setSliderControls(e)}return m}};return oo((e=>{y.registerExtension({name:"Comfy.EasyUse.Components",async beforeRegisterNodeDef(e,t){const n=e.prototype.onNodeCreated;"easy stylesSelector"==t.name&&(e.prototype.onNodeCreated=async function(){return n&&(null==n||n.apply(this,arguments)),await s(this),n}),"easy humanSegmentation"==t.name&&(e.prototype.onNodeCreated=async function(){return n&&(null==n||n.apply(this,arguments)),await l(this),n}),"easy sliderControl"==t.name&&(e.prototype.onNodeCreated=async function(){return n&&(null==n||n.apply(this,arguments)),await u(this),n}),"easy poseEditor"==t.name&&(e.prototype.onNodeCreated=async function(){n&&(null==n||n.apply(this,arguments));const e=document.createElement("div");return e.className="comfyui-easyuse-poseEditor",e.innerHTML='
This node is about to be removed, you can use ComfyUI_Custom_Nodes_AlekPet to replace it.
',this.addDOMWidget("editor","btn",e),n})}})})),(e,s)=>($i(),Ui(Ii,null,[($i(!0),Ui(Ii,null,bo(hn(n),((e,o)=>($i(),zi(om,{ref_for:!0,ref:t=>{t&&(r.value[e.id]=t)},type:e.type,key:o,id:e.id,show:e.show,selectedStyles:e.value,onChooseStyle:e=>((e,o)=>{let i=tp(n.value);i[o].value=e,t.setSelectors(i)})(e,o)},null,8,["type","id","show","selectedStyles","onChooseStyle"])))),128)),($i(!0),Ui(Ii,null,bo(hn(o),((e,n)=>($i(),zi(lm,{ref_for:!0,ref:t=>{t&&(a.value[e.id]=t)},type:e.type,key:n,id:e.id,show:e.show,selected:e.value,onSelect:e=>((e,n)=>{let i=tp(o.value);i[n].value=e,t.setSegSelectors(i)})(e,n)},null,8,["type","id","show","selected","onSelect"])))),128)),($i(!0),Ui(Ii,null,bo(hn(i),((e,n)=>($i(),zi(fm,{ref_for:!0,ref:t=>{t&&(c.value[e.id]=t)},type:e.type,key:n,id:e.id,show:e.show,mode:e.mode,values:e.value,onChangeValues:e=>((e,n)=>{let o=tp(i.value);o[n].value=e,t.setSliderControls(o)})(e,n),onShowSlider:e=>(e=>{let n=tp(i.value);n[e].show=!0,t.setSliderControls(n)})(n)},null,8,["type","id","show","mode","values","onChangeValues","onShowSlider"])))),128))],64))}};var mm=Object.defineProperty,gm=Object.getOwnPropertySymbols,vm=Object.prototype.hasOwnProperty,ym=Object.prototype.propertyIsEnumerable,bm=(e,t,n)=>t in e?mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function _m(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"==typeof e&&0===Object.keys(e).length}function wm(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Sm(e){return!_m(e)}function xm(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||0!==Object.keys(e).length)}function km(e,...t){return wm(e)?e(...t):e}function Cm(e,t=!0){return"string"==typeof e&&(t||""!==e)}function Am(e){return Cm(e)?e.replace(/(-|_)/g,"").toLowerCase():e}function Em(e,t="",n={}){const o=Am(t).split("."),i=o.shift();return i?xm(e)?Em(km(e[Object.keys(e).find((e=>Am(e)===i))||""],n),o.join("."),n):void 0:km(e,n)}function Om(e,t=!0){return Array.isArray(e)&&(t||0!==e.length)}function Lm(e){return Sm(e)&&!isNaN(e)}function Tm(e,t){if(t){const n=t.test(e);return t.lastIndex=0,n}return!1}function Nm(...e){const t=(e={},n={})=>{const o=((e,t)=>{for(var n in t||(t={}))vm.call(t,n)&&bm(e,n,t[n]);if(gm)for(var n of gm(t))ym.call(t,n)&&bm(e,n,t[n]);return e})({},e);return Object.keys(n).forEach((i=>{xm(n[i])&&i in e&&xm(e[i])?o[i]=t(e[i],n[i]):o[i]=n[i]})),o};return e.reduce(((e,n,o)=>0===o?n:t(e,n)),{})}function Im(e){return e?e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":"):e}function Pm(e){return Cm(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,((e,t)=>0===t?e:"-"+e.toLowerCase())).toLowerCase():e}function Dm(e){return Cm(e)?e.replace(/[A-Z]/g,((e,t)=>0===t?e:"."+e.toLowerCase())).toLowerCase():e}function jm(){const e=new Map;return{on(t,n){let o=e.get(t);return o?o.push(n):o=[n],e.set(t,o),this},off(t,n){let o=e.get(t);return o&&o.splice(o.indexOf(n)>>>0,1),this},emit(t,n){let o=e.get(t);o&&o.slice().map((e=>{e(n)}))},clear(){e.clear()}}}var Mm=Object.defineProperty,Rm=Object.defineProperties,$m=Object.getOwnPropertyDescriptors,Gm=Object.getOwnPropertySymbols,Bm=Object.prototype.hasOwnProperty,Fm=Object.prototype.propertyIsEnumerable,Um=(e,t,n)=>t in e?Mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zm=(e,t)=>{for(var n in t||(t={}))Bm.call(t,n)&&Um(e,n,t[n]);if(Gm)for(var n of Gm(t))Fm.call(t,n)&&Um(e,n,t[n]);return e},Vm=(e,t)=>Rm(e,$m(t)),Hm=(e,t)=>{var n={};for(var o in e)Bm.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&Gm)for(var o of Gm(e))t.indexOf(o)<0&&Fm.call(e,o)&&(n[o]=e[o]);return n},Wm=jm();function Ym(e,t){Om(e)?e.push(...t||[]):xm(e)&&Object.assign(e,t)}function Zm(e,t=""){if(!["opacity","z-index","line-height","font-weight","flex","flex-grow","flex-shrink","order"].some((e=>t.endsWith(e)))){return`${e}`.trim().split(" ").map((e=>Lm(e)?`${e}px`:e)).join(" ")}return e}function Km(e="",t=""){return function(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}(`${Cm(e,!1)&&Cm(t,!1)?`${e}-`:e}${t}`)}function Xm(e="",t=""){return`--${Km(e,t)}`}function Qm(e,t="",n="",o=[],i){if(Cm(e)){const r=/{([^}]*)}/g,s=e.trim();if(Tm(s,r)){const e=s.replaceAll(r,(e=>{const t=e.replace(/{|}/g,"").split(".").filter((e=>!o.some((t=>Tm(e,t)))));return`var(${Xm(n,Pm(t.join("-")))}${Sm(i)?`, ${i}`:""})`})),t=/(\d+\s+[\+\-\*\/]\s+\d+)/g,a=/var\([^)]+\)/g;return Tm(e.replace(a,"0"),t)?`calc(${e})`:e}return Zm(s,t)}if(Lm(e))return Zm(e,t)}function Jm(e,t){return e?`${e}{${t}}`:""}var qm=(...e)=>eg(og.getTheme(),...e),eg=(e={},t,n,o="variable")=>{if(t){const{variable:i,options:r}=og.defaults||{},{prefix:s,transform:a}=(null==e?void 0:e.options)||r||{},l=Tm(t,/{([^}]*)}/g)?t:`{${t}}`;return"value"===o||"strict"===a?og.getTokenValue(t):Qm(l,void 0,s,[i.excludedKeyRegex],n)}return""};function tg(e,t={}){const n=og.defaults.variable,{prefix:o=n.prefix,selector:i=n.selector,excludedKeyRegex:r=n.excludedKeyRegex}=t,s=(e,t="")=>Object.entries(e).reduce(((e,[n,i])=>{const a=Tm(n,r)?Km(t):Km(t,Pm(n)),l=function(e){return xm(e)&&e.hasOwnProperty("value")&&e.hasOwnProperty("type")?e.value:e}(i);if(xm(l)){const{variables:t,tokens:n}=s(l,a);Ym(e.tokens,n),Ym(e.variables,t)}else e.tokens.push((o?a.replace(`${o}-`,""):a).replaceAll("-",".")),function(e,t,n){Cm(t,!1)&&e.push(`${t}:${n};`)}(e.variables,Xm(a),Qm(l,a,o,[r]));return e}),{variables:[],tokens:[]}),{variables:a,tokens:l}=s(e,o);return{value:a,tokens:l,declarations:a.join(""),css:Jm(i,a.join(""))}}var ng={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:"attr",selector:`:root${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:"media",selector:`${e}{:root{[CSS]}}`,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(e.trim())}}},custom:{resolve:e=>({type:"custom",selector:e,matched:!0})}},resolve(e){const t=Object.keys(this.rules).filter((e=>"custom"!==e)).map((e=>this.rules[e]));return[e].flat().map((e=>{var n;return null!=(n=t.map((t=>t.resolve(e))).find((e=>e.matched)))?n:this.rules.custom.resolve(e)}))}},_toVariables:(e,t)=>tg(e,{prefix:null==t?void 0:t.prefix}),getCommon({name:e="",theme:t={},params:n,set:o,defaults:i}){var r,s,a,l;const{preset:c,options:u}=t;let d,p,f,h;if(Sm(c)){const{primitive:t,semantic:n}=c,m=n||{},{colorScheme:g}=m,v=Hm(m,["colorScheme"]),y=g||{},{dark:b}=y,_=Hm(y,["dark"]),w=Sm(t)?this._toVariables({primitive:t},u):{},S=Sm(v)?this._toVariables({semantic:v},u):{},x=Sm(_)?this._toVariables({light:_},u):{},k=Sm(b)?this._toVariables({dark:b},u):{},[C,A]=[null!=(r=w.declarations)?r:"",w.tokens],[E,O]=[null!=(s=S.declarations)?s:"",S.tokens||[]],[L,T]=[null!=(a=x.declarations)?a:"",x.tokens||[]],[N,I]=[null!=(l=k.declarations)?l:"",k.tokens||[]];d=this.transformCSS(e,C,"light","variable",u,o,i),p=A;f=`${this.transformCSS(e,`${E}${L}color-scheme:light`,"light","variable",u,o,i)}${this.transformCSS(e,`${N}color-scheme:dark`,"dark","variable",u,o,i)}`,h=[...new Set([...O,...T,...I])]}return{primitive:{css:d,tokens:p},semantic:{css:f,tokens:h}}},getPreset({name:e="",preset:t={},options:n,params:o,set:i,defaults:r,selector:s}){var a,l,c;const u=e.replace("-directive",""),d=t,{colorScheme:p}=d,f=Hm(d,["colorScheme"]),h=p||{},{dark:m}=h,g=Hm(h,["dark"]),v=Sm(f)?this._toVariables({[u]:f},n):{},y=Sm(g)?this._toVariables({[u]:g},n):{},b=Sm(m)?this._toVariables({[u]:m},n):{},[_,w]=[null!=(a=v.declarations)?a:"",v.tokens||[]],[S,x]=[null!=(l=y.declarations)?l:"",y.tokens||[]],[k,C]=[null!=(c=b.declarations)?c:"",b.tokens||[]],A=[...new Set([...w,...x,...C])];return{css:`${this.transformCSS(u,`${_}${S}`,"light","variable",n,i,r,s)}${this.transformCSS(u,k,"dark","variable",n,i,r,s)}`,tokens:A}},getPresetC({name:e="",theme:t={},params:n,set:o,defaults:i}){var r;const{preset:s,options:a}=t,l=null==(r=null==s?void 0:s.components)?void 0:r[e];return this.getPreset({name:e,preset:l,options:a,params:n,set:o,defaults:i})},getPresetD({name:e="",theme:t={},params:n,set:o,defaults:i}){var r;const s=e.replace("-directive",""),{preset:a,options:l}=t,c=null==(r=null==a?void 0:a.directives)?void 0:r[s];return this.getPreset({name:s,preset:c,options:l,params:n,set:o,defaults:i})},getColorSchemeOption(e,t){var n;return this.regex.resolve(null!=(n=e.darkModeSelector)?n:t.options.darkModeSelector)},getLayerOrder(e,t={},n,o){const{cssLayer:i}=t;if(i){return`@layer ${km(i.order||"primeui",n)}`}return""},getCommonStyleSheet({name:e="",theme:t={},params:n,props:o={},set:i,defaults:r}){const s=this.getCommon({name:e,theme:t,params:n,set:i,defaults:r}),a=Object.entries(o).reduce(((e,[t,n])=>e.push(`${t}="${n}"`)&&e),[]).join(" ");return Object.entries(s||{}).reduce(((e,[t,n])=>{if(null==n?void 0:n.css){const o=Im(null==n?void 0:n.css),i=`${t}-variables`;e.push(``)}return e}),[]).join("")},getStyleSheet({name:e="",theme:t={},params:n,props:o={},set:i,defaults:r}){var s;const a={name:e,theme:t,params:n,set:i,defaults:r},l=null==(s=e.includes("-directive")?this.getPresetD(a):this.getPresetC(a))?void 0:s.css,c=Object.entries(o).reduce(((e,[t,n])=>e.push(`${t}="${n}"`)&&e),[]).join(" ");return l?``:""},createTokens(e={},t,n="",o="",i={}){return Object.entries(e).forEach((([e,r])=>{const s=Tm(e,t.variable.excludedKeyRegex)?n:n?`${n}.${Dm(e)}`:Dm(e),a=o?`${o}.${e}`:e;xm(r)?this.createTokens(r,t,s,a,i):(i[s]||(i[s]={paths:[],computed(e,t={}){if(e){const n=this.paths.find((t=>t.scheme===e))||this.paths.find((e=>"none"===e.scheme));return null==n?void 0:n.computed(e,t.binding)}return this.paths.map((e=>e.computed(e.scheme,t[e.scheme])))}}),i[s].paths.push({path:a,value:r,scheme:a.includes("colorScheme.light")?"light":a.includes("colorScheme.dark")?"dark":"none",computed(e,t={}){const n=/{([^}]*)}/g;let o=r;if(t.name=this.path,t.binding||(t.binding={}),Tm(r,n)){const s=r.trim().replaceAll(n,(n=>{var o,r;const s=n.replace(/{|}/g,"");return null==(r=null==(o=i[s])?void 0:o.computed(e,t))?void 0:r.value})),a=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,l=/var\([^)]+\)/g;o=Tm(s.replace(l,"0"),a)?`calc(${s})`:s}return _m(t.binding)&&delete t.binding,{colorScheme:e,path:this.path,paths:t,value:o.includes("undefined")?void 0:o}}}))})),i},getTokenValue(e,t,n){var o;const i=t.split(".").filter((e=>!Tm(e.toLowerCase(),n.variable.excludedKeyRegex))).join(".");const r=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,s=[null==(o=e[i])?void 0:o.computed(r)].flat().filter((e=>e));return 1===s.length?s[0].value:s.reduce(((e={},t)=>{const n=t,{colorScheme:o}=n,i=Hm(n,["colorScheme"]);return e[o]=i,e}),void 0)},transformCSS(e,t,n,o,i={},r,s,a){if(Sm(t)){const{cssLayer:l}=i;if("style"!==o){const e=this.getColorSchemeOption(i,s),o=a?Jm(a,t):t;t="dark"===n?e.reduce(((e,{selector:t})=>(Sm(t)&&(e+=t.includes("[CSS]")?t.replace("[CSS]",o):Jm(t,o)),e)),""):Jm(null!=a?a:":root",t)}if(l){const n={name:"primeui",order:"primeui"};xm(l)&&(n.name=km(l.name,{name:e,type:o})),Sm(n.name)&&(t=Jm(`@layer ${n.name}`,t),null==r||r.layerNames(n.name))}return t}return""}},og={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){const{theme:t}=e;t&&(this._theme=Vm(zm({},t),{options:zm(zm({},this.defaults.options),t.options)}),this._tokens=ng.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var e;return(null==(e=this.theme)?void 0:e.preset)||{}},get options(){var e;return(null==(e=this.theme)?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),Wm.emit("theme:change",e)},getPreset(){return this.preset},setPreset(e){this._theme=Vm(zm({},this.theme),{preset:e}),this._tokens=ng.createTokens(e,this.defaults),this.clearLoadedStyleNames(),Wm.emit("preset:change",e),Wm.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(e){this._theme=Vm(zm({},this.theme),{options:e}),this.clearLoadedStyleNames(),Wm.emit("options:change",e),Wm.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return ng.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return ng.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){const n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return ng.getPresetC(n)},getDirective(e="",t){const n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return ng.getPresetD(n)},getCustomPreset(e="",t,n,o){const i={name:e,preset:t,options:this.options,selector:n,params:o,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return ng.getPreset(i)},getLayerOrderCSS(e=""){return ng.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,n="style",o){return ng.transformCSS(e,t,o,n,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,n={}){return ng.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,n={}){return ng.getStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),Wm.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&Wm.emit("theme:load"))}};function ig(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}function rg(e,t){if(e&&t){const n=t=>{ig(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)};[t].flat().filter(Boolean).forEach((e=>e.split(" ").forEach(n)))}}function sg(e,t){if(e&&t){const n=t=>{e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")};[t].flat().filter(Boolean).forEach((e=>e.split(" ").forEach(n)))}}function ag(e,t){if(e instanceof HTMLElement){return e.offsetWidth}return 0}function lg(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}function cg(e,t={}){if(lg(e)){const n=(t,o)=>{var i,r;const s=(null==(i=null==e?void 0:e.$attrs)?void 0:i[t])?[null==(r=null==e?void 0:e.$attrs)?void 0:r[t]]:[];return[o].flat().reduce(((e,o)=>{if(null!=o){const i=typeof o;if("string"===i||"number"===i)e.push(o);else if("object"===i){const i=Array.isArray(o)?n(t,o):Object.entries(o).map((([e,n])=>"style"!==t||!n&&0!==n?n?e:void 0:`${e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${n}`));e=i.length?e.concat(i.filter((e=>!!e))):e}}return e}),s)};Object.entries(t).forEach((([t,o])=>{if(null!=o){const i=t.match(/^on(.+)/);i?e.addEventListener(i[1].toLowerCase(),o):"p-bind"===t?cg(e,o):(o="class"===t?[...new Set(n("class",o))].join(" ").trim():"style"===t?n("style",o).join(";").trim():o,(e.$attrs=e.$attrs||{})&&(e.$attrs[t]=o),e.setAttribute(t,o))}}))}}function ug(e,t={},...n){if(e){const o=document.createElement(e);return cg(o,t),o.append(...n),o}}function dg(e,t){return lg(e)?e.matches(t)?e:e.querySelector(t):null}function pg(e,t){if(lg(e)){const n=e.getAttribute(t);return isNaN(n)?"true"===n||"false"===n?"true"===n:n:+n}}function fg(e){if(e){let t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),t}return 0}function hg(e){if(e){let t=e.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function mg(e,t){if(e){return e.offsetHeight}return 0}function gg(e,t=[]){const n=hg(e);return null===n?t:gg(n,t.concat([n]))}function vg(e){let t=[];if(e){let n=gg(e);const o=/(auto|scroll)/,i=e=>{try{let t=window.getComputedStyle(e,null);return o.test(t.getPropertyValue("overflow"))||o.test(t.getPropertyValue("overflowX"))||o.test(t.getPropertyValue("overflowY"))}catch(t){return!1}};for(let e of n){let n=1===e.nodeType&&e.dataset.scrollselectors;if(n){let o=n.split(",");for(let n of o){let o=dg(e,n);o&&i(o)&&t.push(o)}}9!==e.nodeType&&i(e)&&t.push(e)}}return t}function yg(e){return!(null==e||!e.nodeName||!hg(e))}function bg(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),t}return 0}var _g={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(e){return this._loadedStyleNames.has(e)},setLoadedStyleName:function(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName:function(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}};function wg(e){return(wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function xg(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=pn(!1),o=pn(e),i=pn(null),r="undefined"!=typeof window&&window.document&&window.document.createElement?window.document:void 0,s=t.document,a=void 0===s?r:s,l=t.immediate,c=void 0===l||l,u=t.manual,d=void 0!==u&&u,p=t.name,f=void 0===p?"style_".concat(++Cg):p,h=t.id,m=void 0===h?void 0:h,g=t.media,v=void 0===g?void 0:g,y=t.nonce,b=void 0===y?void 0:y,_=t.first,w=void 0!==_&&_,S=t.onMounted,x=void 0===S?void 0:S,k=t.onUpdated,C=void 0===k?void 0:k,A=t.onLoad,E=void 0===A?void 0:A,O=t.props,L=void 0===O?{}:O,T=function(){},N=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a){var s=xg(xg({},L),r),l=s.name||f,c=s.id||m,u=s.nonce||b;i.value=a.querySelector('style[data-primevue-style-id="'.concat(l,'"]'))||a.getElementById(c)||a.createElement("style"),i.value.isConnected||(o.value=t||e,cg(i.value,{type:"text/css",id:c,media:v,nonce:u}),w?a.head.prepend(i.value):a.head.appendChild(i.value),function(e,t="",n){lg(e)&&null!=n&&e.setAttribute(t,n)}(i.value,"data-primevue-style-id",l),cg(i.value,s),i.value.onload=function(e){return null==E?void 0:E(e,{name:l})},null==x||x(l)),n.value||(T=bi(o,(function(e){i.value.textContent=e,null==C||C(l)}),{immediate:!0}),n.value=!0)}};return c&&!d&&function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];ar()?oo(e):t?e():Pn(e)}(N),{id:m,name:f,el:i,css:o,unload:function(){a&&n.value&&(T(),yg(i.value)&&a.head.removeChild(i.value),n.value=!1)},load:N,isLoaded:Qt(n)}}function Eg(e){return(Eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Og(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t);else for(;!(l=(o=r.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lg(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lg(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e})(km(e,{dt:qm}));return n?Ag(Im(n),Ng({name:this.name},t)):{}},loadCSS:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.load(this.css,e)},loadTheme:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.load(this.theme,t,(function(n){return og.transformCSS(t.name||e.name,n)}))},getCommonTheme:function(e){return og.getCommon(this.name,e)},getComponentTheme:function(e){return og.getComponent(this.name,e)},getDirectiveTheme:function(e){return og.getDirective(this.name,e)},getPresetTheme:function(e,t,n){return og.getCustomPreset(this.name,e,t,n)},getLayerOrderThemeCSS:function(){return og.getLayerOrderCSS(this.name)},getStyleSheet:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.css){var n=km(this.css,{dt:qm}),o=Im("".concat(n).concat(e)),i=Object.entries(t).reduce((function(e,t){var n=Og(t,2),o=n[0],i=n[1];return e.push("".concat(o,'="').concat(i,'"'))&&e}),[]).join(" ");return'")}return""},getCommonThemeStyleSheet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return og.getCommonStyleSheet(this.name,e,t)},getThemeStyleSheet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[og.getStyleSheet(this.name,e,t)];if(this.theme){var o="base"===this.name?"global-style":"".concat(this.name,"-style"),i=km(this.theme,{dt:qm}),r=Im(og.transformCSS(o,i)),s=Object.entries(t).reduce((function(e,t){var n=Og(t,2),o=n[0],i=n[1];return e.push("".concat(o,'="').concat(i,'"'))&&e}),[]).join(" ");n.push('"))}return n.join("")},extend:function(e){return Ng(Ng({},this),{},{css:void 0,theme:void 0},e)}},Dg={};var jg=function(){let e=[];const t=(t,n,o=0)=>[...e].reverse().find((e=>!0))||{key:t,value:o},n=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:n,set:(n,o,i)=>{o&&(o.style.zIndex=String(((n,o,i=999)=>{const r=t(n,o,i),s=r.value+(r.key===n?0:i)+1;return e.push({key:n,value:s}),s})(n,!0,i)))},clear:t=>{var o;t&&(o=n(t),e=e.filter((e=>e.value!==o)),t.style.zIndex="")},getCurrent:e=>(e=>t(e).value)(e)}}();function Mg(e){return(Mg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rg(e,t,n){return t&&function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this.listener=n}),[{key:"bindScrollListener",value:function(){this.scrollableParents=vg(this.element);for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"pv_id_")}var Fg=Pg.extend({name:"common"});function Ug(e){return(Ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zg(e){return Zg(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Wg(e)||Hg()}function Vg(e,t){return Zg(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=r.call(n)).done)&&(a.push(o.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||Wg(e,t)||Hg()}function Hg(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Wg(e,t){if(e){if("string"==typeof e)return Yg(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yg(e,t):void 0}}function Yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:function(){};_g.clearLoadedStyleNames(),Wm.on("theme:change",e)},_getHostInstance:function(e){return e?this.$options.hostName?e.$.type.name===this.$options.hostName?e:this._getHostInstance(e.$parentInstance):e.$parentInstance:void 0},_getPropValue:function(e){var t;return this[e]||(null===(t=this._getHostInstance(this))||void 0===t?void 0:t[e])},_getOptionValue:function(e){return Em(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})},_getPTValue:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=/./g.test(n)&&!!o[n.split(".")[0]],s=this._getPropValue("ptOptions")||(null===(e=this.$primevueConfig)||void 0===e?void 0:e.ptOptions)||{},a=s.mergeSections,l=void 0===a||a,c=s.mergeProps,u=void 0!==c&&c,d=i?r?this._useGlobalPT(this._getPTClassValue,n,o):this._useDefaultPT(this._getPTClassValue,n,o):void 0,p=r?void 0:this._getPTSelf(t,this._getPTClassValue,n,Xg(Xg({},o),{},{global:d||{}})),f=this._getPTDatasets(n);return l||!l&&p?u?this._mergeProps(u,d,p,f):Xg(Xg(Xg({},d),p),f):Xg(Xg({},p),f)},_getPTSelf:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:"",o="data-pc-",i="root"===n&&Sm(null===(e=this.pt)||void 0===e?void 0:e["data-pc-section"]);return"transition"!==n&&Xg(Xg({},"root"===n&&Xg(Qg({},"".concat(o,"name"),Am(i?null===(t=this.pt)||void 0===t?void 0:t["data-pc-section"]:this.$.type.name)),i&&Qg({},"".concat(o,"extend"),Am(this.$.type.name)))),{},Qg({},"".concat(o,"section"),Am(n)))},_getPTClassValue:function(){var e=this._getOptionValue.apply(this,arguments);return Cm(e)||Om(e)?{class:e}:e},_getPT:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0,i=function(e){var i,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=o?o(e):e,a=Am(n),l=Am(t.$name);return null!==(i=r?a!==l?null==s?void 0:s[a]:void 0:null==s?void 0:s[a])&&void 0!==i?i:s};return null!=e&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:i(e.originalValue),value:i(e.value)}:i(e,!0)},_usePT:function(e,t,n,o){var i=function(e){return t(e,n,o)};if(null!=e&&e.hasOwnProperty("_usept")){var r,s=e._usept||(null===(r=this.$primevueConfig)||void 0===r?void 0:r.ptOptions)||{},a=s.mergeSections,l=void 0===a||a,c=s.mergeProps,u=void 0!==c&&c,d=i(e.originalValue),p=i(e.value);if(void 0===d&&void 0===p)return;return Cm(p)?p:Cm(d)?d:l||!l&&p?u?this._mergeProps(u,d,p):Xg(Xg({},d),p):p}return i(e)},_useGlobalPT:function(e,t,n){return this._usePT(this.globalPT,e,t,n)},_useDefaultPT:function(e,t,n){return this._usePT(this.defaultPT,e,t,n)},ptm:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._getPTValue(this.pt,e,Xg(Xg({},this.$params),t))},ptmi:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return nr(this.$_attrsWithoutPT,this.ptm(e,t))},ptmo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._getPTValue(e,t,Xg({instance:this},n),!1)},cx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,e,Xg(Xg({},this.$params),t))},sx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]){var n=this._getOptionValue(this.$style.inlineStyles,e,Xg(Xg({},this.$params),t));return[this._getOptionValue(Fg.inlineStyles,e,Xg(Xg({},this.$params),t)),n]}}},computed:{globalPT:function(){var e,t=this;return this._getPT(null===(e=this.$primevueConfig)||void 0===e?void 0:e.pt,void 0,(function(e){return km(e,{instance:t})}))},defaultPT:function(){var e,t=this;return this._getPT(null===(e=this.$primevueConfig)||void 0===e?void 0:e.pt,void 0,(function(e){return t._getOptionValue(e,t.$name,Xg({},t.$params))||km(e,Xg({},t.$params))}))},isUnstyled:function(){var e;return void 0!==this.unstyled?this.unstyled:null===(e=this.$primevueConfig)||void 0===e?void 0:e.unstyled},$theme:function(){var e;return null===(e=this.$primevueConfig)||void 0===e?void 0:e.theme},$style:function(){return Xg(Xg({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadTheme:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$styleOptions:function(){var e;return{nonce:null===(e=this.$primevueConfig)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce}},$primevueConfig:function(){var e;return null===(e=this.$primevue)||void 0===e?void 0:e.config},$name:function(){return this.$options.hostName||this.$.type.name},$params:function(){var e=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:e,props:null==e?void 0:e.$props,state:null==e?void 0:e.$data,attrs:null==e?void 0:e.$attrs}}},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter((function(e){var t=Vg(e,1)[0];return null==t?void 0:t.startsWith("pt:")})).reduce((function(e,t){var n=Vg(t,2),o=n[0],i=n[1],r=zg(o.split(":")).slice(1);return null==r||r.reduce((function(e,t,n,o){return!e[t]&&(e[t]=n===o.length-1?i:{}),e[t]}),e),e}),{})},$_attrsWithoutPT:function(){return Object.entries(this.$attrs||{}).filter((function(e){var t=Vg(e,1)[0];return!(null!=t&&t.startsWith("pt:"))})).reduce((function(e,t){var n=Vg(t,2),o=n[0],i=n[1];return e[o]=i,e}),{})},$attrSelector:function(){return Bg("pc")}}},qg=Pg.extend({name:"baseicon",css:"\n.p-icon {\n display: inline-block;\n vertical-align: baseline;\n}\n\n.p-icon-spin {\n -webkit-animation: p-icon-spin 2s infinite linear;\n animation: p-icon-spin 2s infinite linear;\n}\n\n@-webkit-keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n@keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n"});function ev(e){return(ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function nv(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=function(){var e=gv._getOptionValue.apply(gv,arguments);return Cm(e)||Om(e)?{class:e}:e},l=(null===(e=n.binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.ptOptions)||(null===(t=n.$primevueConfig)||void 0===t?void 0:t.ptOptions)||{},c=l.mergeSections,u=void 0===c||c,d=l.mergeProps,p=void 0!==d&&d,f=s?gv._useDefaultPT(n,n.defaultPT(),a,i,r):void 0,h=gv._usePT(n,gv._getPT(o,n.$name),a,i,hv(hv({},r),{},{global:f||{}})),m=gv._getPTDatasets(n,i);return u||!u&&h?p?gv._mergeProps(n,p,f,h,m):hv(hv(hv({},f),h),m):hv(hv({},h),m)},_getPTDatasets:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="data-pc-";return hv(hv({},"root"===t&&mv({},"".concat(n,"name"),Am(e.$name))),{},mv({},"".concat(n,"section"),Am(t)))},_getPT:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=function(e){var o,i=n?n(e):e,r=Am(t);return null!==(o=null==i?void 0:i[r])&&void 0!==o?o:i};return null!=e&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:o(e.originalValue),value:o(e.value)}:o(e)},_usePT:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=function(e){return n(e,o,i)};if(null!=t&&t.hasOwnProperty("_usept")){var s,a=t._usept||(null===(s=e.$primevueConfig)||void 0===s?void 0:s.ptOptions)||{},l=a.mergeSections,c=void 0===l||l,u=a.mergeProps,d=void 0!==u&&u,p=r(t.originalValue),f=r(t.value);if(void 0===p&&void 0===f)return;return Cm(f)?f:Cm(p)?p:c||!c&&f?d?gv._mergeProps(e,d,p,f):hv(hv({},p),f):f}return r(t)},_useDefaultPT:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return gv._usePT(e,t,n,o,i)},_loadStyles:function(e,t,n){var o,i=gv._getConfig(t,n),r={nonce:null==i||null===(o=i.csp)||void 0===o?void 0:o.nonce};gv._loadCoreStyles(e.$instance,r),gv._loadThemeStyles(e.$instance,r),gv._loadScopedThemeStyles(e.$instance,r),gv._themeChangeListener((function(){return gv._loadThemeStyles(e.$instance,r)}))},_loadCoreStyles:function(){var e,t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;!_g.isStyleNameLoaded(null===(e=o.$style)||void 0===e?void 0:e.name)&&null!==(t=o.$style)&&void 0!==t&&t.name&&(Pg.loadCSS(i),o.isUnstyled()&&(null===(n=o.$style)||void 0===n||n.loadCSS(i)),_g.setLoadedStyleName(o.$style.name))},_loadThemeStyles:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(null==n||!n.isUnstyled()){if(!og.isStyleNameLoaded("common")){var i,r,s=(null===(i=n.$style)||void 0===i||null===(r=i.getCommonTheme)||void 0===r?void 0:r.call(i))||{},a=s.primitive,l=s.semantic;Pg.load(null==a?void 0:a.css,hv({name:"primitive-variables"},o)),Pg.load(null==l?void 0:l.css,hv({name:"semantic-variables"},o)),Pg.loadTheme(hv({name:"global-style"},o)),og.setLoadedStyleName("common")}if(!og.isStyleNameLoaded(null===(e=n.$style)||void 0===e?void 0:e.name)&&null!==(t=n.$style)&&void 0!==t&&t.name){var c,u,d,p,f=((null===(c=n.$style)||void 0===c||null===(u=c.getDirectiveTheme)||void 0===u?void 0:u.call(c))||{}).css;null===(d=n.$style)||void 0===d||d.load(f,hv({name:"".concat(n.$style.name,"-variables")},o)),null===(p=n.$style)||void 0===p||p.loadTheme(hv({name:"".concat(n.$style.name,"-style")},o)),og.setLoadedStyleName(n.$style.name)}if(!og.isStyleNameLoaded("layer-order")){var h,m,g=null===(h=n.$style)||void 0===h||null===(m=h.getLayerOrderThemeCSS)||void 0===m?void 0:m.call(h);Pg.load(g,hv({name:"layer-order",first:!0},o)),og.setLoadedStyleName("layer-order")}}},_loadScopedThemeStyles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.preset();if(n&&e.$attrSelector){var o,i,r,s=((null===(o=e.$style)||void 0===o||null===(i=o.getPresetTheme)||void 0===i?void 0:i.call(o,n,"[".concat(e.$attrSelector,"]")))||{}).css,a=null===(r=e.$style)||void 0===r?void 0:r.load(s,hv({name:"".concat(e.$attrSelector,"-").concat(e.$style.name)},t));e.scopedStyleEl=a.el}},_themeChangeListener:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};_g.clearLoadedStyleNames(),Wm.on("theme:change",e)},_hook:function(e,t,n,o,i,r){var s,a,l,c="on".concat(Cm(l=t,!1)?l[0].toUpperCase()+l.slice(1):l),u=gv._getConfig(o,i),d=null==n?void 0:n.$instance,p=gv._usePT(d,gv._getPT(null==o||null===(s=o.value)||void 0===s?void 0:s.pt,e),gv._getOptionValue,"hooks.".concat(c)),f=gv._useDefaultPT(d,null==u||null===(a=u.pt)||void 0===a||null===(a=a.directives)||void 0===a?void 0:a[e],gv._getOptionValue,"hooks.".concat(c)),h={el:n,binding:o,vnode:i,prevVnode:r};null==p||p(d,h),null==f||f(d,h)},_mergeProps:function(){for(var e=arguments.length>1?arguments[1]:void 0,t=arguments.length,n=new Array(t>2?t-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{},n=function(n,o,i,r,s){var a,l,c;o._$instances=o._$instances||{};var u=gv._getConfig(i,r),d=o._$instances[e]||{},p=_m(d)?hv(hv({},t),null==t?void 0:t.methods):{};o._$instances[e]=hv(hv({},d),{},{$name:e,$host:o,$binding:i,$modifiers:null==i?void 0:i.modifiers,$value:null==i?void 0:i.value,$el:d.$el||o||void 0,$style:hv({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadTheme:function(){}},null==t?void 0:t.style),$primevueConfig:u,$attrSelector:o.$attrSelector,defaultPT:function(){return gv._getPT(null==u?void 0:u.pt,void 0,(function(t){var n;return null==t||null===(n=t.directives)||void 0===n?void 0:n[e]}))},isUnstyled:function(){var e,t;return void 0!==(null===(e=o.$instance)||void 0===e||null===(e=e.$binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.unstyled)?null===(t=o.$instance)||void 0===t||null===(t=t.$binding)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.unstyled:null==u?void 0:u.unstyled},theme:function(){var e;return null===(e=o.$instance)||void 0===e||null===(e=e.$primevueConfig)||void 0===e?void 0:e.theme},preset:function(){var e;return null===(e=o.$instance)||void 0===e||null===(e=e.$binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.dt},ptm:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return gv._getPTValue(o.$instance,null===(e=o.$instance)||void 0===e||null===(e=e.$binding)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.pt,t,hv({},n))},ptmo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return gv._getPTValue(o.$instance,e,t,n,!1)},cx:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null!==(e=o.$instance)&&void 0!==e&&e.isUnstyled()?void 0:gv._getOptionValue(null===(t=o.$instance)||void 0===t||null===(t=t.$style)||void 0===t?void 0:t.classes,n,hv({},i))},sx:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?gv._getOptionValue(null===(e=o.$instance)||void 0===e||null===(e=e.$style)||void 0===e?void 0:e.inlineStyles,t,hv({},n)):void 0}},p),o.$instance=o._$instances[e],null===(a=(l=o.$instance)[n])||void 0===a||a.call(l,o,i,r,s),o["$".concat(e)]=o.$instance,gv._hook(e,n,o,i,r,s),o.$pd||(o.$pd={}),o.$pd[e]=hv(hv({},null===(c=o.$pd)||void 0===c?void 0:c[e]),{},{name:e,instance:o.$instance})};return{created:function(e,t,o,i){n("created",e,t,o,i)},beforeMount:function(e,t,o,i){e.$attrSelector=Bg("pd"),gv._loadStyles(e,t,o),n("beforeMount",e,t,o,i),function(e){var t,n,o,i,r,s=null===(t=e.$instance)||void 0===t?void 0:t.watch;null==s||null===(n=s.config)||void 0===n||n.call(e.$instance,null===(o=e.$instance)||void 0===o?void 0:o.$primevueConfig),cv.on("config:change",(function(t){var n,o=t.newValue,i=t.oldValue;return null==s||null===(n=s.config)||void 0===n?void 0:n.call(e.$instance,o,i)})),null==s||null===(i=s["config.ripple"])||void 0===i||i.call(e.$instance,null===(r=e.$instance)||void 0===r||null===(r=r.$primevueConfig)||void 0===r?void 0:r.ripple),cv.on("config:ripple:change",(function(t){var n,o=t.newValue,i=t.oldValue;return null==s||null===(n=s["config.ripple"])||void 0===n?void 0:n.call(e.$instance,o,i)}))}(e)},mounted:function(e,t,o,i){gv._loadStyles(e,t,o),n("mounted",e,t,o,i)},beforeUpdate:function(e,t,o,i){n("beforeUpdate",e,t,o,i)},updated:function(e,t,o,i){gv._loadStyles(e,t,o),n("updated",e,t,o,i)},beforeUnmount:function(e,t,o,i){n("beforeUnmount",e,t,o,i)},unmounted:function(e,t,o,i){var r;null===(r=e.$instance)||void 0===r||null===(r=r.scopedStyleEl)||void 0===r||null===(r=r.value)||void 0===r||r.remove(),n("unmounted",e,t,o,i)}}},extend:function(){var e=dv(gv._getMeta.apply(gv,arguments),2),t=e[0],n=e[1];return hv({extend:function(){var e=dv(gv._getMeta.apply(gv,arguments),2),t=e[0],o=e[1];return gv.extend(t,hv(hv(hv({},n),null==n?void 0:n.methods),o))}},gv._extend(t,n))}},vv=Pg.extend({name:"ripple-directive",theme:function(e){var t=e.dt;return"\n.p-ink {\n display: block;\n position: absolute;\n background: ".concat(t("ripple.background"),";\n border-radius: 100%;\n transform: scale(0);\n pointer-events: none;\n}\n\n.p-ink-active {\n animation: ripple 0.4s linear;\n}\n\n@keyframes ripple {\n 100% {\n opacity: 0;\n transform: scale(2.5);\n }\n}\n")},classes:{root:"p-ink"}});function yv(e){return(yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bv(e){return function(e){if(Array.isArray(e))return _v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _v(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_v(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);ne.length)&&(t=e.length);for(var n=0,o=Array(t);n0||navigator.msMaxTouchPoints>0||o.hide(e),window.removeEventListener("resize",t)})),n.addEventListener("mouseleave",(function t(){o.hide(e),n.removeEventListener("mouseleave",t)})),this.bindScrollListener(e),jg.set("tooltip",n,e.$_ptooltipZIndex)}},show:function(e,t,n){var o=this;void 0!==n?this.timer=setTimeout((function(){return o.tooltipActions(e,t)}),n):this.tooltipActions(e,t)},tooltipRemoval:function(e){this.remove(e),this.unbindScrollListener(e)},hide:function(e,t){var n=this;clearTimeout(this.timer),void 0!==t?setTimeout((function(){return n.tooltipRemoval(e)}),t):this.tooltipRemoval(e)},getTooltipElement:function(e){return document.getElementById(e.$_ptooltipId)},create:function(e){var t=e.$_ptooltipModifiers,n=ug("div",{class:!this.isUnstyled()&&this.cx("arrow"),"p-bind":this.ptm("arrow",{context:t})}),o=ug("div",{class:!this.isUnstyled()&&this.cx("text"),"p-bind":this.ptm("text",{context:t})});e.$_ptooltipEscape?(o.innerHTML="",o.appendChild(document.createTextNode(e.$_ptooltipValue))):o.innerHTML=e.$_ptooltipValue;var i=ug("div",Nv(Nv({id:e.$_ptooltipIdAttr,role:"tooltip",style:{display:"inline-block",width:e.$_ptooltipFitContent?"fit-content":void 0,pointerEvents:!this.isUnstyled()&&e.$_ptooltipAutoHide&&"none"},class:[!this.isUnstyled()&&this.cx("root"),e.$_ptooltipClass]},this.$attrSelector,""),"p-bind",this.ptm("root",{context:t})),n,o);return document.body.appendChild(i),e.$_ptooltipId=i.id,this.$el=i,i},remove:function(e){if(e){var t=this.getTooltipElement(e);t&&t.parentElement&&(jg.clear(t),document.body.removeChild(t)),e.$_ptooltipId=null}},align:function(e){var t=e.$_ptooltipModifiers;t.top?(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignTop(e))):t.left?(this.alignLeft(e),this.isOutOfBounds(e)&&(this.alignRight(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignLeft(e))))):t.bottom?(this.alignBottom(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&this.alignBottom(e))):(this.alignRight(e),this.isOutOfBounds(e)&&(this.alignLeft(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignRight(e)))))},getHostOffset:function(e){var t=e.getBoundingClientRect();return{left:t.left+function(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}(),top:t.top+function(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}()}},alignRight:function(e){this.preAlign(e,"right");var t=this.getTooltipElement(e),n=this.getHostOffset(e),o=n.left+ag(e),i=n.top+(mg(e)-mg(t))/2;t.style.left=o+"px",t.style.top=i+"px"},alignLeft:function(e){this.preAlign(e,"left");var t=this.getTooltipElement(e),n=this.getHostOffset(e),o=n.left-ag(t),i=n.top+(mg(e)-mg(t))/2;t.style.left=o+"px",t.style.top=i+"px"},alignTop:function(e){this.preAlign(e,"top");var t=this.getTooltipElement(e),n=this.getHostOffset(e),o=n.left+(ag(e)-ag(t))/2,i=n.top-mg(t);t.style.left=o+"px",t.style.top=i+"px"},alignBottom:function(e){this.preAlign(e,"bottom");var t=this.getTooltipElement(e),n=this.getHostOffset(e),o=n.left+(ag(e)-ag(t))/2,i=n.top+mg(e);t.style.left=o+"px",t.style.top=i+"px"},preAlign:function(e,t){var n=this.getTooltipElement(e);n.style.left="-999px",n.style.top="-999px",sg(n,"p-tooltip-".concat(n.$_ptooltipPosition)),!this.isUnstyled()&&rg(n,"p-tooltip-".concat(t)),n.$_ptooltipPosition=t,n.setAttribute("data-p-position",t);var o=dg(n,'[data-pc-section="arrow"]');o.style.top="bottom"===t?"0":"right"===t||"left"===t||"right"!==t&&"left"!==t&&"top"!==t&&"bottom"!==t?"50%":null,o.style.bottom="top"===t?"0":null,o.style.left="right"===t||"right"!==t&&"left"!==t&&"top"!==t&&"bottom"!==t?"0":"top"===t||"bottom"===t?"50%":null,o.style.right="left"===t?"0":null},isOutOfBounds:function(e){var t=this.getTooltipElement(e),n=t.getBoundingClientRect(),o=n.top,i=n.left,r=ag(t),s=mg(t),a=function(){let e=window,t=document,n=t.documentElement,o=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||o.clientWidth,height:e.innerHeight||n.clientHeight||o.clientHeight}}();return i+r>a.width||i<0||o<0||o+s>a.height},getTarget:function(e){return ig(e,"p-inputwrapper")?dg(e,"input"):e},getModifiers:function(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&"object"===Iv(e.arg)?Object.entries(e.arg).reduce((function(e,t){var n=Lv(t,2),o=n[0],i=n[1];return"event"!==o&&"position"!==o||(e[i]=!0),e}),{}):{}}}}),Dv={name:"Card",extends:{name:"BaseCard",extends:Jg,style:Pg.extend({name:"card",theme:function(e){var t=e.dt;return"\n.p-card {\n background: ".concat(t("card.background"),";\n color: ").concat(t("card.color"),";\n box-shadow: ").concat(t("card.shadow"),";\n border-radius: ").concat(t("card.border.radius"),";\n display: flex;\n flex-direction: column;\n}\n\n.p-card-caption {\n display: flex;\n flex-direction: column;\n gap: ").concat(t("card.caption.gap"),";\n}\n\n.p-card-body {\n padding: ").concat(t("card.body.padding"),";\n display: flex;\n flex-direction: column;\n gap: ").concat(t("card.body.gap"),";\n}\n\n.p-card-title {\n font-size: ").concat(t("card.title.font.size"),";\n font-weight: ").concat(t("card.title.font.weight"),";\n}\n\n.p-card-subtitle {\n color: ").concat(t("card.subtitle.color"),";\n}\n")},classes:{root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"}}),provide:function(){return{$pcCard:this,$parentInstance:this}}},inheritAttrs:!1};Dv.render=function(e,t,n,o,i,r){return $i(),Ui("div",nr({class:e.cx("root")},e.ptmi("root")),[e.$slots.header?($i(),Ui("div",nr({key:0,class:e.cx("header")},e.ptm("header")),[_o(e.$slots,"header")],16)):Ji("",!0),Zi("div",nr({class:e.cx("body")},e.ptm("body")),[e.$slots.title||e.$slots.subtitle?($i(),Ui("div",nr({key:0,class:e.cx("caption")},e.ptm("caption")),[e.$slots.title?($i(),Ui("div",nr({key:0,class:e.cx("title")},e.ptm("title")),[_o(e.$slots,"title")],16)):Ji("",!0),e.$slots.subtitle?($i(),Ui("div",nr({key:1,class:e.cx("subtitle")},e.ptm("subtitle")),[_o(e.$slots,"subtitle")],16)):Ji("",!0)],16)):Ji("",!0),Zi("div",nr({class:e.cx("content")},e.ptm("content")),[_o(e.$slots,"content")],16),e.$slots.footer?($i(),Ui("div",nr({key:1,class:e.cx("footer")},e.ptm("footer")),[_o(e.$slots,"footer")],16)):Ji("",!0)],16)],16)};const jv={class:"no-result-placeholder"},Mv={class:"no-result-placeholder-content"},Rv={key:0},$v={__name:"noResultsPlaceholder",props:{icon:{type:String,default:"",required:!1},iconSize:{type:String,default:"3rem",required:!1},title:{type:String,required:!0},message:{type:String,required:!1},buttonLabel:{type:String,default:"",required:!1}},emits:["action"],setup:e=>(t,n)=>($i(),Ui("div",jv,[Ki(hn(Dv),null,{content:Vn((()=>[Zi("div",Mv,[Zi("i",{class:Me(e.icon),style:Ne({"font-size":e.iconSize,"margin-bottom":".5rem"})},null,6),Zi("h3",null,Be(e.title),1),e.message?($i(),Ui("p",Rv,Be(e.message),1)):Ji("",!0),e.buttonLabel?($i(),zi(hn(Ev),{key:1,label:e.buttonLabel,onClick:n[0]||(n[0]=e=>t.$emit("action")),class:"p-button-text"},null,8,["label"])):Ji("",!0)])])),_:1})]))};var Gv=Pg.extend({name:"inputtext",theme:function(e){var t=e.dt;return"\n.p-inputtext {\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: ".concat(t("inputtext.color"),";\n background: ").concat(t("inputtext.background"),";\n padding: ").concat(t("inputtext.padding.y")," ").concat(t("inputtext.padding.x"),";\n border: 1px solid ").concat(t("inputtext.border.color"),";\n transition: background ").concat(t("inputtext.transition.duration"),", color ").concat(t("inputtext.transition.duration"),", border-color ").concat(t("inputtext.transition.duration"),", outline-color ").concat(t("inputtext.transition.duration"),", box-shadow ").concat(t("inputtext.transition.duration"),";\n appearance: none;\n border-radius: ").concat(t("inputtext.border.radius"),";\n outline-color: transparent;\n box-shadow: ").concat(t("inputtext.shadow"),";\n}\n\n.p-inputtext:enabled:hover {\n border-color: ").concat(t("inputtext.hover.border.color"),";\n}\n\n.p-inputtext:enabled:focus {\n border-color: ").concat(t("inputtext.focus.border.color"),";\n box-shadow: ").concat(t("inputtext.focus.ring.shadow"),";\n outline: ").concat(t("inputtext.focus.ring.width")," ").concat(t("inputtext.focus.ring.style")," ").concat(t("inputtext.focus.ring.color"),";\n outline-offset: ").concat(t("inputtext.focus.ring.offset"),";\n}\n\n.p-inputtext.p-invalid {\n border-color: ").concat(t("inputtext.invalid.border.color"),";\n}\n\n.p-inputtext.p-variant-filled {\n background: ").concat(t("inputtext.filled.background"),";\n}\n\n.p-inputtext.p-variant-filled:enabled:focus {\n background: ").concat(t("inputtext.filled.focus.background"),";\n}\n\n.p-inputtext:disabled {\n opacity: 1;\n background: ").concat(t("inputtext.disabled.background"),";\n color: ").concat(t("inputtext.disabled.color"),";\n}\n\n.p-inputtext::placeholder {\n color: ").concat(t("inputtext.placeholder.color"),";\n}\n\n.p-inputtext-sm {\n font-size: ").concat(t("inputtext.sm.font.size"),";\n padding: ").concat(t("inputtext.sm.padding.y")," ").concat(t("inputtext.sm.padding.x"),";\n}\n\n.p-inputtext-lg {\n font-size: ").concat(t("inputtext.lg.font.size"),";\n padding: ").concat(t("inputtext.lg.padding.y")," ").concat(t("inputtext.lg.padding.x"),";\n}\n\n.p-inputtext-fluid {\n width: 100%;\n}\n")},classes:{root:function(e){var t=e.instance,n=e.props;return["p-inputtext p-component",{"p-filled":t.filled,"p-inputtext-sm":"small"===n.size,"p-inputtext-lg":"large"===n.size,"p-invalid":n.invalid,"p-variant-filled":n.variant?"filled"===n.variant:"filled"===t.$primevue.config.inputStyle||"filled"===t.$primevue.config.inputVariant,"p-inputtext-fluid":t.hasFluid}]}}}),Bv={name:"InputText",extends:{name:"BaseInputText",extends:Jg,props:{modelValue:null,size:{type:String,default:null},invalid:{type:Boolean,default:!1},variant:{type:String,default:null},fluid:{type:Boolean,default:null}},style:Gv,provide:function(){return{$pcInputText:this,$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue"],inject:{$pcFluid:{default:null}},methods:{getPTOptions:function(e){return("root"===e?this.ptmi:this.ptm)(e,{context:{filled:this.filled,disabled:this.$attrs.disabled||""===this.$attrs.disabled}})},onInput:function(e){this.$emit("update:modelValue",e.target.value)}},computed:{filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},hasFluid:function(){return _m(this.fluid)?!!this.$pcFluid:this.fluid}}},Fv=["value","aria-invalid"];Bv.render=function(e,t,n,o,i,r){return $i(),Ui("input",nr({type:"text",class:e.cx("root"),value:e.modelValue,"aria-invalid":e.invalid||void 0,onInput:t[0]||(t[0]=function(){return r.onInput&&r.onInput.apply(r,arguments)})},r.getPTOptions("root")),null,16,Fv)};const Uv={class:"left flex-1"},zv={key:1,class:"edit"},Vv={key:2,class:"label"},Hv={class:"right toolbar"},Wv={key:0,class:"nodes"},Yv={__name:"group",props:{item:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup(e){const t=e,n=np(),o=pn(!1),i=pn(null),r=pn(""),s=e=>{var o,i;let r=t.item;if(!(null==(o=r.info)?void 0:o.is_edit)&&(null==(i=r.children)?void 0:i.length)>0){let e=y.canvas.graph._groups.find((e=>e.pos[0]==r.info.pos[0]&&e.pos[1]==r.info.pos[1]));e&&(e.show_nodes=!e.show_nodes,n.setGroups(y.canvas.graph._groups))}},a=async()=>{let e=t.item,i=y.canvas.graph._groups.find((t=>t.pos[0]==e.info.pos[0]&&t.pos[1]==e.info.pos[1]));i?(i.is_edit=!1,i.title=r.value,await n.setGroups(y.canvas.graph._groups),o.value=!1):o.value=!1};return(l,c)=>{var u,d,p;return $i(),Ui(Ii,null,[Zi("div",{class:Me("comfyui-easyuse-map-nodes-group"),onClick:s},[Zi("div",Uv,[e.item.children?($i(),Ui("i",{key:0,class:Me(["icon",e.item.info.show_nodes?"pi pi-folder-open":"pi pi-folder"]),style:Ne({color:e.item.info.color})},null,6)):Ji("",!0),(null==(u=e.item.info)?void 0:u.is_edit)?($i(),Ui("div",zv,[Ki(hn(Bv),{ref_key:"modifyRef",ref:i,modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=e=>r.value=e),variant:"outline",size:"small",type:"text",onBlur:a,onKeydown:[qr(a,["enter"]),qr(a,["esc"])],style:{width:"100%"}},null,8,["modelValue"])])):($i(),Ui("div",Vv,[Zi("span",{onDblclick:c[1]||(c[1]=Qr((s=>(async()=>{var e,s;if(o.value)return;let a=t.item,l=y.canvas.graph._groups.find((e=>e.pos[0]==a.info.pos[0]&&e.pos[1]==a.info.pos[1]));l&&(l.is_edit=!l.is_edit,r.value=l.is_edit?a.info.title:"",await n.setGroups(y.canvas.graph._groups),o.value=!0,null==(s=null==(e=i.value)?void 0:e[0])||s.$el.focus())})(e.item)),["stop"]))},Be(e.item.info.title),33)]))]),Zi("div",Hv,[(null==(d=e.item.children)?void 0:d.length)>0?($i(),zi(hn(Ev),{key:0,size:"small",icon:e.item.children.find((e=>e.mode==hn(j).ALWAYS))?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:c[2]||(c[2]=Qr((e=>l.$emit("changeMode")),["stop"])),onMousedown:c[3]||(c[3]=Qr((e=>l.$emit("mousedown")),["stop"])),onMouseup:c[4]||(c[4]=Qr((e=>l.$emit("mouseup")),["stop"]))},null,8,["icon"])):Ji("",!0)])]),(null==(p=e.item.children)?void 0:p.length)>0&&e.item.info.show_nodes?($i(),Ui("div",Wv,[_o(l.$slots,"default")])):Ji("",!0)],64)}}},Zv={key:1,class:"label error"},Kv={class:"right toolbar"},Xv={__name:"node",props:{node:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup:e=>(t,n)=>($i(),Ui("div",{class:Me(["comfyui-easyuse-map-nodes-node",{never:void 0!==e.node.mode&&e.node.mode==hn(j).NEVER},{bypass:void 0!==e.node.mode&&e.node.mode==hn(j).BYPASS}])},[void 0!==e.node.title?($i(),Ui("span",{key:0,class:"label",onDblclick:n[0]||(n[0]=Qr((t=>hn(Lp)(e.node.id)),["stop"]))},Be(e.node.title),33)):($i(),Ui("span",Zv,Be(e.node.type),1)),Zi("div",Kv,[Ki(hn(Ev),{size:"small",icon:e.node.mode==hn(j).ALWAYS?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:n[1]||(n[1]=Qr((e=>t.$emit("changeMode")),["stop"])),onMousedown:n[2]||(n[2]=Qr((e=>t.$emit("mousedown")),["stop"])),onMouseup:n[3]||(n[3]=Qr((e=>t.$emit("mouseup")),["stop"]))},null,8,["icon"])])],2))},Qv={class:"title"},Jv={class:"toolbar"},qv={key:0},ey={key:1,class:"no_result",style:{height:"100%"}},ty="comfyui-easyuse-map-nodes",ny={__name:"nodesMap",setup(e){const t=np(),{groups_nodes:n,groups:o}=ws(t),i=pn(!1),r=e=>{i.value=!i.value,y.canvas.graph._groups.forEach((e=>{e.show_nodes=i.value})),t.setGroups(y.canvas.graph._groups)};let s,a=0,l=0,c=!1;const u=(e,n=!1)=>{if(c)return void(c=!1);const o=e.children.find((e=>e.mode==j.ALWAYS)),i=e.children.map((e=>e.id));y.canvas.graph._nodes.forEach((e=>{i.includes(e.id)&&(e.mode=o?n?j.NEVER:j.BYPASS:j.ALWAYS,e.graph.change())})),t.setNodes(y.canvas.graph._nodes)},d=(e,n=!1)=>{if(c)return void(c=!1);const o=e.mode==j.ALWAYS,i=y.canvas.graph._nodes.find((t=>t.id==e.id));i&&(i.mode=o?n?j.NEVER:j.BYPASS:j.ALWAYS,i.graph.change(),t.setNodes(y.canvas.graph._nodes))},p=(e,t="group")=>{a=(new Date).getTime(),clearTimeout(s),s=setTimeout((n=>{"group"==t?u(e,!0):d(e,!0)}),500)},f=e=>{l=(new Date).getTime(),l-a>500&&(c=!0),clearTimeout(s)};return(e,t)=>{var s,a;return $i(),Ui("div",{class:Me(ty)},[Zi("div",{class:Me(ty+"__header")},[Zi("div",Qv,Be(hn(V)("Nodes Map",!0)),1),Zi("div",Jv,[(null==(s=hn(o))?void 0:s.length)>0?Hn(($i(),zi(hn(Ev),{key:0,icon:i.value?"pi pi-angle-double-down":"pi pi-angle-double-up",text:"",rounded:"",severity:"secondary",onClick:r,size:"small"},null,8,["icon"])),[[hn(Pv),i.value?hn(V)("Collapse All"):hn(V)("Expand All"),void 0,{right:!0}]]):Ji("",!0)])],2),Zi("div",{class:Me(ty+"__content")},[(null==(a=hn(n))?void 0:a.length)>0?($i(),Ui("ol",qv,[($i(!0),Ui(Ii,null,bo(hn(n),((e,t)=>($i(),Ui("li",{key:t},[void 0!==e.children?($i(),zi(Yv,{key:0,item:e,onChangeMode:t=>u(e),onMousedown:t=>p(e,"group"),onMouseup:f},{default:Vn((()=>[($i(!0),Ui(Ii,null,bo(e.children,((e,t)=>($i(),zi(Xv,{key:t,node:e,onChangeMode:t=>d(e),onMousedown:t=>p(e,"node"),onMouseup:f},null,8,["node","onChangeMode","onMousedown"])))),128))])),_:2},1032,["item","onChangeMode","onMousedown"])):($i(),zi(Xv,{key:1,node:e.info,onChangeMode:t=>d(e.info),onMousedown:t=>p(e.info,"node"),onMouseup:f},null,8,["node","onChangeMode","onMousedown"]))])))),128))])):($i(),Ui("div",ey,[Ki($v,{icon:"pi pi-sitemap",title:hn(V)("No Nodes",!0),message:hn(V)("No nodes found in the map",!0)},null,8,["title","message"])]))],2)])}}},oy={__name:"index",setup(e){const t=np();return oo((e=>{t.watchGraph()})),ao((e=>{})),(e,t)=>($i(),Ui("div",{class:Me("comfyui-easyuse-map")},[Ki(ny)]))}},iy={__name:"App",setup(e){const t=e=>{y.extensionManager.registerSidebarTab({id:M,icon:"pi pi-sitemap",title:V("Nodes Map",!0),tooltip:V("Nodes Map",!0),type:"custom",render:e=>{e.style.height="100%",((...e)=>{ns().render(...e)})(function(e,t,n){const o=arguments.length;return 2===o?ue(t)&&!ie(t)?Vi(t)?Ki(e,null,[t]):Ki(e,t):Ki(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Vi(n)&&(n=[n]),Ki(e,t,n))}(oy,{}),e)}})};return oo((e=>{try{t()}catch(n){}})),(e,t)=>($i(),zi(hm))}};var ry="equals",sy="notEquals";function ay(e){return(ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ly(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function cy(e){for(var t=1;t{const t=ns().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(le(e)){return document.querySelector(e)}return e}(e);if(!o)return;const i=t._component;ae(i)||i.render||i.template||(i.template=o.innerHTML),o.innerHTML="";const r=n(o,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t})(iy);yy.use(my),yy.use(function(){const e=We(!0),t=e.run((()=>pn({})));let n=[],o=[];const i=rn({install(e){is(i),i._a=e,e.provide(rs,i),e.config.globalProperties.$pinia=i,o.forEach((e=>n.push(e))),o=[]},use(e){return this._a?n.push(e):o.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}()),yy.mount("#"+vy.id); +!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";.easyuse-model-info{color:#fff;max-width:90vw;font-family:var(--font-family)}.easyuse-model-content{display:flex;flex-direction:column;overflow:hidden}.easyuse-model-header{margin:0 0 15px}.easyuse-model-header-remark{display:flex;align-items:center;margin-top:5px}.easyuse-model-info h2{text-align:left;margin:0}.easyuse-model-info h5{text-align:left;margin:0 15px 0 0;font-weight:400;color:var(--descrip-text)}.easyuse-model-info p{margin:5px 0}.easyuse-model-info a{color:var(--theme-color-light)}.easyuse-model-info a:hover{text-decoration:underline}.easyuse-model-tags-list{display:flex;flex-wrap:wrap;list-style:none;gap:10px;max-height:200px;overflow:auto;margin:10px 0;padding:0}.easyuse-model-tag{background-color:var(--comfy-input-bg);border:2px solid var(--border-color);color:var(--input-text);display:flex;align-items:center;gap:5px;border-radius:5px;padding:2px 5px;cursor:pointer}.easyuse-model-tag--selected span:before{content:"✅";position:absolute;background-color:var(--theme-color-light);left:0;top:0;right:0;bottom:0;text-align:center}.easyuse-model-tag:hover{border:2px solid var(--theme-color-light)}.easyuse-model-tag p{margin:0}.easyuse-model-tag span{text-align:center;border-radius:5px;background-color:var(--theme-color-light);padding:2px;position:relative;min-width:20px;overflow:hidden;color:#fff}.easyuse-model-metadata .comfy-modal-content{max-width:100%}.easyuse-model-metadata label{margin-right:1ch;color:#ccc}.easyuse-model-metadata span{color:var(--theme-color-light)}.easyuse-preview{max-width:660px;margin-right:15px;position:relative}.easyuse-preview-group{position:relative;overflow:hidden;border-radius:.5rem;width:660px}.easyuse-preview-list{display:flex;flex-wrap:nowrap;width:100%;transition:all .5s ease-in-out}.easyuse-preview-list.no-transition{transition:none}.easyuse-preview-slide{display:flex;flex-basis:calc(50% - 5px);flex-grow:0;flex-shrink:0;position:relative;justify-content:center;align-items:center;padding-right:5px;padding-left:0}.easyuse-preview-slide:nth-child(2n){padding-left:5px;padding-right:0}.easyuse-preview-slide-content{position:relative;min-height:150px;width:100%}.easyuse-preview-slide-content .save{position:absolute;right:6px;z-index:12;bottom:6px;display:flex;align-items:center;height:26px;padding:0 9px;color:var(--input-text);font-size:12px;line-height:26px;background:#00000080;border-radius:13px;cursor:pointer;min-width:80px;text-align:center}.easyuse-preview-slide-content .save:hover{filter:brightness(120%);will-change:auto}.easyuse-preview-slide-content img{border-radius:14px;object-position:center center;max-width:100%;max-height:700px;border-style:none;vertical-align:middle}.easyuse-preview button{position:absolute;z-index:10;top:50%;display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:15px;border:1px solid rgba(66,63,78,.15);background-color:#423f4e80;color:#fffc;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transform:translateY(-50%)}.easyuse-preview button.left{left:10px}.easyuse-preview button.right{right:10px}.easyuse-model-detail{margin-top:16px;overflow:hidden;border:1px solid var(--border-color);border-radius:8px;width:300px}.easyuse-model-detail-head{height:40px;padding:0 10px;font-weight:500;font-size:14px;font-style:normal;line-height:40px}.easyuse-model-detail-body{box-sizing:border-box;font-size:12px}.easyuse-model-detail-item{display:flex;justify-content:flex-start;border-top:1px solid var(--border-color)}.easyuse-model-detail-item-label{flex-shrink:0;width:88px;padding-top:5px;padding-bottom:5px;padding-left:10px;border-right:1px solid var(--border-color);color:var(--input-text);font-weight:400}.easyuse-model-detail-item-value{display:flex;flex-wrap:wrap;padding:5px 10px;color:var(--input-text)}.easyuse-model-detail-textarea{border-top:1px solid var(--border-color);padding:10px;height:100px;overflow-y:auto;font-size:12px}.easyuse-model-detail-textarea textarea{width:100%;height:100%;border:0;background-color:transparent;color:var(--input-text)}.easyuse-model-detail-textarea textarea::placeholder{color:var(--descrip-text)}.easyuse-model-detail-textarea.empty{display:flex;justify-content:center;align-items:center;color:var(--descrip-text)}.easyuse-model-notes{background-color:#00000040;padding:5px;margin-top:5px}.easyuse-model-notes:empty{display:none}.easyuse-account-user{font-size:10px;color:var(--descrip-text);text-align:center}.easyuse-account-user-info{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;cursor:pointer}.easyuse-account-user-info .user{display:flex;align-items:center}.easyuse-account-user-info .edit{padding:5px 10px;background:var(--comfy-menu-bg);border-radius:4px}.easyuse-account-user-info:hover{filter:brightness(110%)}.easyuse-account-user-info h5{margin:0;font-size:10px;text-align:left}.easyuse-account-user-info h6{margin:0;font-size:8px;text-align:left;font-weight:300}.easyuse-account-user-info .remark{margin-top:4px}.easyuse-account-user-info .avatar{width:36px;height:36px;background:var(--comfy-input-bg);border-radius:50%;margin-right:5px;display:flex;justify-content:center;align-items:center;font-size:16px;overflow:hidden}.easyuse-account-user-info .avatar img{width:100%;height:100%}.easyuse-account-dialog{width:600px}.easyuse-account-dialog-main a,.easyuse-account-dialog-main a:visited{font-weight:400;color:var(--theme-color-light)}.easyuse-account-dialog-item{display:flex;justify-content:flex-start;align-items:center;padding:10px 0;border-bottom:1px solid var(--border-color)}.easyuse-account-dialog-item input{padding:5px;margin-right:5px}.easyuse-account-dialog-item input.key{flex:1}.easyuse-account-dialog-item button{cursor:pointer;margin-left:5px!important;padding:5px!important;font-size:16px!important}.easyuse-account-dialog-item button:hover{filter:brightness(120%)}.easyuse-account-dialog-item button.choose{background:var(--theme-color)}.easyuse-account-dialog-item button.delete{background:var(--error-color)}.easy-dropdown,.easy-nested-dropdown{position:relative;box-sizing:border-box;background-color:#171717;box-shadow:0 4px 4px #ffffff40;padding:0;margin:0;list-style:none;z-index:1000;overflow:visible;max-height:fit-content;max-width:fit-content}.easy-dropdown{position:absolute;border-radius:0}.easy-dropdown li.item,.easy-nested-dropdown li.item{font-weight:400;min-width:max-content}.easy-dropdown li.folder,.easy-nested-dropdown li.folder{cursor:default;position:relative;border-right:3px solid cyan}.easy-dropdown li.folder:after,.easy-nested-dropdown li.folder:after{content:">";position:absolute;right:2px;font-weight:400}.easy-dropdown li,.easy-nested-dropdown li{padding:4px 10px;cursor:pointer;font-family:system-ui;font-size:.7rem;position:relative}.easy-nested-dropdown{position:absolute;top:0;left:100%;margin:0;border:none;display:none}.easy-dropdown li.selected>.easy-nested-dropdown,.easy-nested-dropdown li.selected>.easy-nested-dropdown{display:block;border:none}.easy-dropdown li.selected,.easy-nested-dropdown li.selected{background-color:#e5e5e5;border:none}:root{--theme-color:var(--primary-bg);--theme-color-light: var(--primary-hover-bg);--success-color: #52c41a;--error-color: #ff4d4f;--warning-color: #faad14;--font-family: Inter, -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;--p-inputtext-background: var(--p-form-field-background);--p-inputtext-disabled-background: var(--p-form-field-disabled-background);--p-inputtext-filled-background: var(--p-form-field-filled-background);--p-inputtext-filled-focus-background: var(--p-form-field-filled-focus-background);--p-inputtext-border-color: var(--p-form-field-border-color);--p-inputtext-hover-border-color: var(--p-form-field-hover-border-color);--p-inputtext-focus-border-color: var(--p-form-field-focus-border-color);--p-inputtext-invalid-border-color: var(--p-form-field-invalid-border-color);--p-inputtext-color: var(--p-form-field-color);--p-inputtext-disabled-color: var(--p-form-field-disabled-color);--p-inputtext-placeholder-color: var(--p-form-field-placeholder-color);--p-inputtext-shadow: var(--p-form-field-shadow);--p-inputtext-padding-x: var(--p-form-field-padding-x);--p-inputtext-padding-y: var(--p-form-field-padding-y);--p-inputtext-border-radius: var(--p-form-field-border-radius);--p-inputtext-focus-ring-width: var(--p-form-field-focus-ring-width);--p-inputtext-focus-ring-style: var(--p-form-field-focus-ring-style);--p-inputtext-focus-ring-color: var(--p-form-field-focus-ring-color);--p-inputtext-focus-ring-offset: var(--p-form-field-focus-ring-offset);--p-inputtext-focus-ring-shadow: var(--p-form-field-focus-ring-shadow);--p-inputtext-transition-duration: var(--p-form-field-transition-duration);--p-inputtext-sm-font-size: .875rem;--p-inputtext-sm-padding-x: .625rem;--p-inputtext-sm-padding-y: .375rem;--p-inputtext-lg-font-size: 1.125rem;--p-inputtext-lg-padding-x: .875rem;--p-inputtext-lg-padding-y: .625rem;--p-tooltip-max-width: 12.5rem;--p-tooltip-gutter: .25rem;--p-tooltip-shadow: var(--p-overlay-popover-shadow);--p-tooltip-padding: .5rem .75rem;--p-tooltip-border-radius: var(--p-overlay-popover-border-radius);--p-tooltip-background: var(--p-surface-700);--p-tooltip-color: var(--p-surface-0)}.comfyui-easyuse-theme,.comfyui-easyuse-primary{color:var(--theme-color-light)}.comfyui-easyuse-theme.point:hover,.comfyui-easyuse-primary.point:hover{opacity:.8}.comfyui-easyuse-success{color:var(--success-color)}.comfyui-easyuse-success.point:hover{opacity:.8}.comfyui-easyuse-error{color:var(--error-color)}.comfyui-easyuse-error.point:hover{opacity:.8}.comfyui-easyuse-warning,.comfyui-easyuse--warn{color:var(--warning-color)}.comfyui-easyuse-warning.point:hover,.comfyui-easyuse--warn.point:hover{opacity:.8}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.grid{display:grid}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-20{gap:5rem}.gap-3{gap:.75rem}.gap-3\\.5{gap:.875rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.gap-\\[0\\.28rem\\]{gap:.28rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-6{row-gap:1.5rem}@media (min-width: 576px){.sm\\:col-span-4{grid-column:span 4/span 4}.sm\\:col-span-6{grid-column:span 6/span 6}.sm\\:ml-8{margin-left:2rem}.sm\\:mt-0{margin-top:0}.sm\\:flex{display:flex}.sm\\:h-60{height:15rem}.sm\\:\\!w-64{width:16rem!important}.sm\\:w-40{width:10rem}.sm\\:w-44{width:11rem}.sm\\:w-56{width:14rem}.sm\\:w-60{width:15rem}.sm\\:w-64{width:16rem}.sm\\:w-80{width:20rem}.sm\\:w-96{width:24rem}.sm\\:w-\\[30rem\\]{width:30rem}.sm\\:w-auto{width:auto}.sm\\:min-w-\\[30rem\\]{min-width:30rem}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:flex-nowrap{flex-wrap:nowrap}.sm\\:items-start{align-items:flex-start}.sm\\:items-end{align-items:flex-end}.sm\\:items-center{align-items:center}.sm\\:justify-center{justify-content:center}.sm\\:justify-between{justify-content:space-between}.sm\\:gap-2{gap:.5rem}.sm\\:p-20{padding:5rem}.sm\\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\\:py-10{padding-bottom:2.5rem;padding-top:2.5rem}.sm\\:py-5{padding-bottom:1.25rem;padding-top:1.25rem}.sm\\:pt-32{padding-top:8rem}.sm\\:text-left{text-align:left}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:-bottom-12{bottom:-3rem}.md\\:-bottom-28{bottom:-7rem}.md\\:-bottom-8{bottom:-2rem}.md\\:-bottom-\\[26rem\\]{bottom:-26rem}.md\\:-left-12{left:-3rem}.md\\:-left-28{left:-7rem}.md\\:-left-32{left:-8rem}.md\\:-left-4{left:-1rem}.md\\:-left-48{left:-12rem}.md\\:-left-\\[22rem\\]{left:-22rem}.md\\:bottom-0{bottom:0}.md\\:left-10{left:2.5rem}.md\\:left-\\[32rem\\]{left:32rem}.md\\:left-\\[42rem\\]{left:42rem}.md\\:top-1\\/2{top:50%}.md\\:top-32{top:8rem}.md\\:top-8{top:2rem}.md\\:col-span-2{grid-column:span 2/span 2}.md\\:col-span-4{grid-column:span 4/span 4}.md\\:col-span-6{grid-column:span 6/span 6}.md\\:ml-auto{margin-left:auto}.md\\:block{display:block}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:h-\\[20rem\\]{height:20rem}.md\\:h-\\[32rem\\]{height:32rem}.md\\:\\!w-80{width:20rem!important}.md\\:w-2\\/12{width:16.666667%}.md\\:w-40{width:10rem}.md\\:w-5\\/12{width:41.666667%}.md\\:w-56{width:14rem}.md\\:w-6\\/12{width:50%}.md\\:w-60{width:15rem}.md\\:w-8\\/12{width:66.666667%}.md\\:w-80{width:20rem}.md\\:w-\\[100rem\\]{width:100rem}.md\\:w-\\[26rem\\]{width:26rem}.md\\:w-\\[30rem\\]{width:30rem}.md\\:w-\\[50rem\\]{width:50rem}.md\\:w-\\[52rem\\]{width:52rem}.md\\:w-\\[60rem\\]{width:60rem}.md\\:w-\\[95rem\\]{width:95rem}.md\\:w-screen{width:100vw}.md\\:flex-initial{flex:0 1 auto}.md\\:-translate-y-1\\/2{--tw-translate-y: -50% }.md\\:-translate-y-1\\/2,.md\\:translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-0{--tw-translate-x: 0px }.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:flex-col{flex-direction:column}.md\\:items-end{align-items:flex-end}.md\\:items-center{align-items:center}.md\\:justify-start{justify-content:flex-start}.md\\:justify-center{justify-content:center}.md\\:gap-20{gap:5rem}.md\\:gap-4{gap:1rem}.md\\:p-5{padding:1.25rem}.md\\:p-8{padding:2rem}}@media (min-width: 992px){.lg\\:left-20{left:5rem}.lg\\:left-\\[36rem\\]{left:36rem}.lg\\:left-\\[50rem\\]{left:50rem}.lg\\:col-span-1{grid-column:span 1/span 1}.lg\\:col-span-2{grid-column:span 2/span 2}.lg\\:col-span-4{grid-column:span 4/span 4}.lg\\:col-span-6{grid-column:span 6/span 6}.lg\\:mb-0{margin-bottom:0}.lg\\:mt-0{margin-top:0}.lg\\:mt-20{margin-top:5rem}.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:h-10{height:2.5rem}.lg\\:h-32{height:8rem}.lg\\:h-\\[28rem\\]{height:28rem}.lg\\:\\!w-\\[30rem\\]{width:30rem!important}.lg\\:w-3\\/12{width:25%}.lg\\:w-32{width:8rem}.lg\\:w-\\[28rem\\]{width:28rem}.lg\\:w-\\[64rem\\]{width:64rem}.lg\\:w-fit{width:-moz-fit-content;width:fit-content}.lg\\:max-w-6xl{max-width:72rem}.lg\\:flex-row{flex-direction:row}.lg\\:gap-0{gap:0}.lg\\:rounded-2xl{border-radius:1rem}.lg\\:rounded-3xl{border-radius:1.5rem}.lg\\:rounded-xl{border-radius:.75rem}.lg\\:p-7{padding:1.75rem}.lg\\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\\:px-20{padding-left:5rem;padding-right:5rem}.lg\\:px-56{padding-left:14rem;padding-right:14rem}.lg\\:px-8{padding-left:2rem;padding-right:2rem}.lg\\:px-9{padding-left:2.25rem;padding-right:2.25rem}.lg\\:py-20{padding-bottom:5rem;padding-top:5rem}.lg\\:py-7{padding-bottom:1.75rem;padding-top:1.75rem}.lg\\:pt-0{padding-top:0}.lg\\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\\:text-5xl{font-size:3rem;line-height:1}.lg\\:text-base{font-size:1rem;line-height:1.5rem}.lg\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 1200px){.xl\\:-left-12{left:-3rem}.xl\\:-left-28{left:-7rem}.xl\\:bottom-0{bottom:0}.xl\\:left-36{left:9rem}.xl\\:left-\\[42rem\\]{left:42rem}.xl\\:left-\\[60rem\\]{left:60rem}.xl\\:col-span-3{grid-column:span 3/span 3}.xl\\:col-span-4{grid-column:span 4/span 4}.xl\\:col-span-6{grid-column:span 6/span 6}.xl\\:block{display:block}.xl\\:flex{display:flex}.xl\\:hidden{display:none}.xl\\:h-\\[36\\.25rem\\]{height:36.25rem}.xl\\:\\!w-40{width:10rem!important}.xl\\:w-3\\/12{width:25%}.xl\\:w-6\\/12{width:50%}.xl\\:w-96{width:24rem}.xl\\:w-\\[29rem\\]{width:29rem}.xl\\:max-w-36{max-width:9rem}.xl\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\\:flex-row{flex-direction:row}.xl\\:items-start{align-items:flex-start}.xl\\:items-center{align-items:center}.xl\\:gap-1{gap:.25rem}.xl\\:gap-6{gap:1.5rem}.xl\\:text-left{text-align:left}}.comfyui-easyuse-toast{position:fixed;z-index:99999;top:0;left:0;height:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:start}.comfyui-easyuse-toast-container{position:relative;height:fit-content;padding:4px;margin-top:-100px;opacity:0;z-index:3;-webkit-transition:all .3s ease-in-out;-khtml-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.comfyui-easyuse-toast-container:last-child{z-index:1}.comfyui-easyuse-toast-container.show{opacity:1;margin-top:0!important;transform:translateY(0)}.comfyui-easyuse-toast-container:not(.show){z-index:1}.comfyui-easyuse-toast-container>div{position:relative;background:var(--comfy-menu-bg);color:var(--input-text);height:fit-content;box-shadow:0 0 10px #000000e0;padding:9px 12px;border-radius:var(--border-radius);font-size:14px;pointer-events:all;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-toast-container>div>span{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-toast-container>div>span i{font-size:16px;margin-right:8px}.comfyui-easyuse-toast-container>div>span i.loading{animation:loading-rotate 1s linear infinite}.comfyui-easyuse-toast-container a{cursor:pointer;text-decoration:underline;color:var(--theme-color-light);margin-left:4px;display:inline-block;line-height:1}.comfyui-easyuse-toast-container a:hover{color:var(--theme-color-light);text-decoration:none}@keyframes loading-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.comfyui-easyuse-selector{position:relative}.comfyui-easyuse-selector.hide{display:none}.comfyui-easyuse-selector__header{--height:26px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;height:var(--height);padding-bottom:10px;border-bottom:1px solid var(--border-color-solid)}.comfyui-easyuse-selector__header_button{height:var(--height);width:var(--height);border-radius:var(--border-radius);border:1px solid var(--border-color);font-size:11px;background:var(--bg-color);box-shadow:none;cursor:pointer;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-selector__header_button:hover{filter:brightness(1.2)}.comfyui-easyuse-selector__header_button:hover i{color:var(--error-color)}.comfyui-easyuse-selector__header_button i{font-size:16px;color:var(--input-text);-webkit-transition:all .3s ease-in-out;-khtml-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.comfyui-easyuse-selector__header_search{flex:1;margin-left:10px;border-radius:var(--border-radius);border:1px solid var(--border-color);font-size:11px;background:var(--bg-color);padding:0 8px;height:var(--height);display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-selector__header_search i{font-size:16px}.comfyui-easyuse-selector__header_search .search{vertical-align:middle;margin-left:5px;outline:none;resize:none;border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;overflow-y:scroll;background:transparent;width:100%;line-height:var(--height);font-size:12px;color:var(--input-text);-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-selector__content{list-style:none;padding:0;margin:0;min-height:150px;height:calc(100% - 28px);overflow-y:auto;overflow-x:hidden}.comfyui-easyuse-selector-item{display:inline-block;position:relative}.comfyui-easyuse-selector-item__tag{display:inline-block;vertical-align:middle;margin-top:8px;margin-right:8px;padding:4px;color:var(--input-text);background-color:var(--bg-color);border-radius:var(--border-radius);border:1px solid var(--border-color);font-size:11px;cursor:pointer;overflow:hidden;position:relative}.comfyui-easyuse-selector-item__tag:hover{filter:brightness(1.2)}.comfyui-easyuse-selector-item__tag.hide{display:none}.comfyui-easyuse-selector-item__tag input{--ring-color: transparent;position:relative;box-shadow:none;border:1px solid var(--border-color);border-radius:2px;background:linear-gradient(135deg,var(--comfy-menu-bg) 0%,var(--comfy-input-bg) 60%)}.comfyui-easyuse-selector-item__tag input[type=checkbox]{display:inline-block;flex-shrink:0;vertical-align:middle;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--border-color);background-origin:border-box;padding:0;width:1rem;height:1rem;border-radius:4px;color:var(--theme-color-light);-webkit-user-select:none;user-select:none}.comfyui-easyuse-selector-item__tag input[type=checkbox]:checked{border:1px solid var(--theme-color-light);background-color:var(--theme-color-light);background-image:url("data:image/svg+xml,%3csvg viewBox=\'0 0 16 16\' fill=\'white\' xmlns=\'http://www.w3.org/2000/svg\'%3e%3cpath d=\'M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z\'/%3e%3c/svg%3e")}.comfyui-easyuse-selector-item__tag input span{margin:0 4px;vertical-align:middle}.comfyui-easyuse-selector-preview{position:absolute;left:-180px;top:-110px;z-index:2;border:1px solid var(--border-color);border-radius:var(--border-radius);background:var(--comfy-menu-bg);-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px);overflow:hidden}.comfyui-easyuse-selector-preview img{width:150px;height:150px}.comfyui-easyuse-selector-preview__text{font-size:12px;padding:5px 10px;max-width:130px;color:var(--input-text)}.comfyui-easyuse-selector-preview__text h6{line-height:1.15;font-size:10px;margin:10px 0}.comfyui-easyuse-dialog{max-width:600px}.comfyui-easyuse-dialog-title{font-size:18px;font-weight:700;text-align:center;color:var(--input-text);margin:0}.comfyui-easyuse-dialog-images{margin-top:10px;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box}.comfyui-easyuse-dialog-images img{width:50%;height:auto;cursor:pointer;box-sizing:border-box;filter:brightness(80%)}.comfyui-easyuse-dialog-images img:hover{filter:brightness(100%)}.comfyui-easyuse-dialog-images.selected{border:4px solid var(--success-color)}.comfyui-easyuse-dialog-hidden{display:none;height:0}.comfyui-easyuse-contextmenu{--height: 26px;--padding: 8px;font-family:var(--font-family);position:fixed;top:0;left:0;width:100%;max-width:200px;min-width:100px;min-height:100px;padding:var(--padding) 0;box-shadow:0 0 10px #00000040;background-color:var(--tr-odd-bg-color);border-radius:var(--border-radius);z-index:10;will-change:transform}.comfyui-easyuse-contextmenu-item-divider{height:1px;width:100%;background-color:var(--border-color);margin:var(--padding) 0}.comfyui-easyuse-contextmenu-item-content{height:var(--height);padding:0 12px;cursor:pointer;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-contextmenu-item-content span{font-size:11px;color:var(--input-text);display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-contextmenu-item-content i{color:var(--input-text);margin-left:4px;display:block;width:0;height:0;border-width:4px 4px 0;border-style:solid;border-color:var(--descrip-text) transparent transparent;-webkit-transform:scaleY(.8) rotate(-90deg);-khtml-transform:scaleY(.8) rotate(-90deg);-moz-transform:scaleY(.8) rotate(-90deg);-ms-transform:scaleY(.8) rotate(-90deg);-o-transform:scaleY(.8) rotate(-90deg);transform:scaleY(.8) rotate(-90deg)}.comfyui-easyuse-contextmenu-item-content:hover{background:var(--theme-color)}.comfyui-easyuse-contextmenu-item.disabled .comfyui-easyuse-contextmenu-item-content span{color:var(--border-color);cursor:default}.comfyui-easyuse-contextmenu-item.disabled .comfyui-easyuse-contextmenu-item-content:hover{background:transparent}.comfyui-easyuse-contextmenu-submenu{font-family:var(--font-family);position:absolute;top:0;left:200px;max-width:200px;width:200px;min-width:100px;min-height:--height;padding:var(--padding) 0;box-shadow:0 0 10px #00000040;background-color:var(--tr-odd-bg-color);border-radius:var(--border-radius);z-index:10;will-change:transform}.comfyui-easyuse-contextmenu-model{position:relative}.comfyui-easyuse-contextmenu-model:hover img{display:block;opacity:1}.comfyui-easyuse-contextmenu-model img{position:absolute;z-index:1;right:-175px;top:-75px;width:150px;height:auto;display:none;filter:brightness(70%);-webkit-filter:brightness(70%);opacity:0;-webkit-transition:all .5s cubic-bezier(.55,0,.1,1);-khtml-transition:all .5s cubic-bezier(.55,0,.1,1);-moz-transition:all .5s cubic-bezier(.55,0,.1,1);-ms-transition:all .5s cubic-bezier(.55,0,.1,1);-o-transition:all .5s cubic-bezier(.55,0,.1,1);transition:all .5s cubic-bezier(.55,0,.1,1)}.comfyui-easyuse-slider{width:100%;height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-slider-item{height:inherit;min-width:25px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-flex-direction:column;-khtml-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column}.comfyui-easyuse-slider-item-input{height:15px;font-size:10px;color:var(--input-text)}.comfyui-easyuse-slider-item-label{height:15px;border:none;color:var(--descrip-text);font-size:8px}.comfyui-easyuse-slider-item-scroll{width:5px;height:calc(100% - 30px);background:var(--comfy-input-bg);border-radius:10px;position:relative}.comfyui-easyuse-slider-item-bar{width:10px;height:10px;background:linear-gradient(to bottom,var(--input-text),var(--descrip-text));border-radius:100%;box-shadow:0 2px 10px var(--bg-color);position:absolute;top:0;left:-2.5px;cursor:pointer;z-index:1}.comfyui-easyuse-slider-item-area{width:100%;border-radius:20px;position:absolute;bottom:0;background:var(--input-text);z-index:0}.comfyui-easyuse-slider-item.positive .comfyui-easyuse-slider-item-label{color:var(--success-color)}.comfyui-easyuse-slider-item.positive .comfyui-easyuse-slider-item-area{background:var(--success-color)}.comfyui-easyuse-slider-item.negative .comfyui-easyuse-slider-item-label{color:var(--error-color)}.comfyui-easyuse-slider-item.negative .comfyui-easyuse-slider-item-area{background:var(--error-color)}.comfyui-easyuse-map{height:100%;background:var(--comfy-menu-bg)}.comfyui-easyuse-map .p-splitter-gutter-handle{height:1px!important}.comfyui-easyuse-map-nodes{height:100%;position:relative}.comfyui-easyuse-map-nodes__header{position:absolute;z-index:2;top:0;left:0;width:100%;padding:.25rem 0 .25rem 1rem;height:2.7rem;background:var(--comfy-menu-bg);border-bottom:1px solid var(--border-color);display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px)}.comfyui-easyuse-map-nodes__header .title{font-size:13px;color:var(--input-text);font-weight:400;line-height:1.5;-webkit-user-select:none;user-select:none}.comfyui-easyuse-map-nodes__header .toolbar{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes__header .toolbar .icon{font-size:.85rem;margin-left:.25rem;cursor:pointer}.comfyui-easyuse-map-nodes__content{position:relative;padding:2.7rem 0 0;height:100%;overflow:auto}.comfyui-easyuse-map-nodes__content dl .label{padding-left:1rem}.comfyui-easyuse-map-nodes__content ol,.comfyui-easyuse-map-nodes__content dl{list-style-type:none;padding:0;margin:0}.comfyui-easyuse-map-nodes__content ol .toolbar span,.comfyui-easyuse-map-nodes__content dl .toolbar span{font-size:13px}.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye{color:var(--input-text)}.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye-slash,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye-slash{color:var(--descrip-text)}.comfyui-easyuse-map-nodes__content ol .toolbar span.pi-eye-slash.never,.comfyui-easyuse-map-nodes__content dl .toolbar span.pi-eye-slash.never{opacity:.5}.comfyui-easyuse-map-nodes__content .no_result{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;text-align:center}.comfyui-easyuse-map-nodes-group{position:relative;overflow:hidden;width:100%;height:2rem;cursor:default;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;pointer-events:auto}.comfyui-easyuse-map-nodes-group .left,.comfyui-easyuse-map-nodes-group .right{height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse-map-nodes-group .left{padding-left:.5rem;margin-right:.25rem;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1}.comfyui-easyuse-map-nodes-group .icon{font-size:.85rem;margin-right:.25rem}.comfyui-easyuse-map-nodes-group .label{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;height:100%;width:100%;min-width:80px}.comfyui-easyuse-map-nodes-group .label span{font-size:14px;color:var(--input-text);font-weight:400;line-height:1.5;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.comfyui-easyuse-map-nodes-group:hover{background:var(--content-hover-bg)!important}.comfyui-easyuse-map-nodes-group.active{background:var(--theme-color)!important}.comfyui-easyuse-map-nodes-group.active .label{color:#fff;cursor:default}.comfyui-easyuse-map-nodes-group.never .label{color:var(--descrip-text);opacity:.4}.comfyui-easyuse-map-nodes-group.bypass .label{color:var(--descrip-text)}.comfyui-easyuse-map-nodes-node{height:2rem;cursor:default;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;position:relative;overflow:hidden;pointer-events:auto}.comfyui-easyuse-map-nodes-node .label{text-indent:.5rem;font-size:13px;color:var(--input-text);font-weight:400;line-height:1.5;-webkit-box-flex:1;-ms-flex:1;-webkit-flex:1;flex:1;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;margin-right:.25rem;height:2rem;line-height:2rem;width:100%;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;word-break:break-all;text-overflow:ellipsis;-webkit-box-orient:vertical}.comfyui-easyuse-map-nodes-node .label.error{color:var(--error-color)}.comfyui-easyuse-map-nodes-node:hover{background:var(--content-hover-bg)!important}.comfyui-easyuse-map-nodes-node.never .label{color:var(--descrip-text);opacity:.5}.comfyui-easyuse-map-nodes-node.bypass .label{color:#f0f;opacity:.5}.comfyui-easyuse-map-nodes .nodes .label{text-indent:1rem}.comfyui-easyuse-toolbar{border-radius:0 12px 12px 0;min-width:50px;height:24px;position:fixed;bottom:85px;left:0;display:flex;align-items:center;z-index:1000;background-color:var(--comfy-menu-bg);border:1px solid var(--bg-color);-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px)}.comfyui-easyuse-toolbar-icon{height:100%;padding:0 4px;display:flex;justify-content:center;align-items:center;font-size:12px;color:#fff;transition:all .3s ease-in-out;cursor:pointer}.comfyui-easyuse-toolbar-icon svg{width:14px;height:14px}.comfyui-easyuse-toolbar-icon:hover.group{color:var(--warning-color)}.comfyui-easyuse-toolbar-icon:hover.rocket{color:var(--theme-color)}.comfyui-easyuse-toolbar-nodes-map{position:absolute;top:50px;left:10px;width:200px;border-radius:12px;min-height:100px;max-height:600px;color:var(--descrip-text);background-color:var(--comfy-menu-bg);border:1px solid var(--bg-color);-webkit-backdrop-filter:saturate(180%) blur(40px);-khtml-backdrop-filter:saturate(180%) blur(40px);-moz-backdrop-filter:saturate(180%) blur(40px);-ms-backdrop-filter:saturate(180%) blur(40px);-o-backdrop-filter:saturate(180%) blur(40px);backdrop-filter:saturate(180%) blur(40px);z-index:399;padding-top:0;overflow:hidden}.comfyui-easyuse-toolbar-nodes-map .no-result-placeholder-content{-webkit-transform:scale(.8);-khtml-transform:scale(.8);-moz-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes{min-height:100px;max-height:600px}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes__header:before{content:"…";position:absolute;left:.25rem;top:2.75rem;transform:translateY(-2rem) rotate(90deg);width:.5rem;height:.5rem;display:inline-block;overflow:hidden;line-height:5px;padding:3px 4px;cursor:move;vertical-align:middle;font-size:12px;font-family:sans-serif;letter-spacing:2px;color:var(--drag-text);z-index:3;text-shadow:1px 0 1px black}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes__header .title{cursor:move;padding-left:.25rem}.comfyui-easyuse-toolbar-nodes-map .comfyui-easyuse-map-nodes__content{max-height:calc(600px - 2.7rem)}.no-result-placeholder{display:flex;justify-content:center;align-items:center;height:100%}.no-result-placeholder-content{text-align:center;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-khtml-flex-direction:column;-moz-flex-direction:column;-ms-flex-direction:column;-o-flex-direction:column;flex-direction:column;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-ms-justify-content:space-between;-o-justify-content:space-between;justify-content:space-between}.no-result-placeholder .p-card{background-color:transparent!important;box-shadow:none;text-align:center}.no-result-placeholder h3{color:var(--input-text);margin-bottom:.5rem}.no-result-placeholder p{color:var(--descrip-text);margin-bottom:1rem;margin-top:0}#comfyui-easyuse-components{position:absolute;top:0;left:0;z-index:3}.comfyui-easyuse{--p-datatable-header-cell-padding: .15rem 1rem;--p-datatable-body-cell-padding: .15rem 1rem;--p-primary-color: var(--theme-color-light)!important;--border-color-solid: var(--border-color);--border-radius: 8px}.comfyui-easyuse.dark-theme{--fg-color: #fff;--bg-color: #242427;--content-bg:#18181b;--content-fg:#fff;--content-hover-bg: #27272a;--comfy-menu-bg: rgba(24,24,27,.9);--comfy-input-bg: #242427;--input-text: #ffffff;--descrip-text: #71717a;--drag-text: #ccc;--error-text: #ff4444;--border-color: #3f3f46;--border-color-solid: #2a2a2e;--tr-even-bg-color: rgba(28,28,28,.9);--tr-odd-bg-color: rgba(19,19,19,.9)}.comfyui-easyuse ::-webkit-scrollbar{width:0em}.comfyui-easyuse ::-webkit-scrollbar-track{background-color:transparent}.comfyui-easyuse ::-webkit-scrollbar-thumb{background-color:transparent;border-radius:2px}.comfyui-easyuse ::-webkit-scrollbar-thumb:hover{background-color:transparent}.comfyui-easyuse body{font-family:var(--font-family)!important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.comfyui-easyuse textarea{font-family:var(--font-family)!important}.comfyui-easyuse hr{border:1px solid var(--border-color)}.comfyui-easyuse .comfy-multiline-input{background-color:transparent;border:1px solid var(--border-color-solid);border-radius:var(--border-radius);padding:8px;font-size:12px}.comfyui-easyuse #comfy-settings-dialog{border:1px solid var(--border-color);background:transparent;-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%);box-shadow:none}.comfyui-easyuse .comfy-modal{border:1px solid var(--border-color);box-shadow:none;-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .cm-title{background-color:transparent!important}.comfyui-easyuse .cm-notice-board{border-radius:10px!important;border:1px solid var(--border-color)!important}.comfyui-easyuse .cm-menu-container{margin-bottom:50px!important}.comfyui-easyuse .cn-manager-custom_milk_white .tg-column-name,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-column-name{color:var(--input-text)}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-message,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-message{text-align:center;color:var(--descrip-text)!important}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .tg-cell,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .tg-cell{color:var(--input-text)}.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .cn-node-name a,.comfyui-easyuse .cn-manager-custom_milk_white .tg-body-frame .cmm-node-name a,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .cn-node-name a,.comfyui-easyuse .cmm-manager-custom_milk_white .tg-body-frame .cmm-node-name a{color:var(--theme-color)!important}.comfyui-easyuse .comfy-menu{border-radius:16px;box-shadow:0 0 1px var(--descrip-text);-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .comfy-menu button.comfy-settings-btn{font-size:12px}.comfyui-easyuse .comfy-menu-btns{margin-bottom:4px}.comfyui-easyuse .comfy-menu button,.comfyui-easyuse .comfy-modal button{font-size:14px;padding:4px 0;margin-bottom:4px}.comfyui-easyuse .comfy-menu-btns button,.comfyui-easyuse .comfy-list-actions button{font-size:10px}.comfyui-easyuse .comfy-menu>button,.comfyui-easyuse .comfy-menu-btns button,.comfyui-easyuse .comfy-menu .comfy-list button,.comfyui-easyuse .comfy-modal button{border-width:1px}.comfyui-easyuse #comfy-dev-save-api-button{justify-content:center}.comfyui-easyuse #queue-button{position:relative;overflow:hidden;min-height:30px;z-index:1}.comfyui-easyuse #queue-button:after{clear:both;content:attr(data-attr);background:green;color:#fff;width:var(--process-bar-width);height:100%;position:absolute;top:0;left:0;z-index:0;text-align:center;display:flex;justify-content:center;align-items:center}.comfyui-easyuse #shareButton{background:linear-gradient(to left,var(--theme-color),var(--theme-color-light))!important;color:#fff!important}.comfyui-easyuse .litegraph.litecontextmenu{--height: 24px;--padding: 6px;font-family:var(--font-family);padding:var(--padding) 0;border-radius:var(--border-radius);-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .litegraph.litecontextmenu .litemenu-title{padding:var(--padding)}.comfyui-easyuse .litegraph.litecontextmenu>div:first-child.litemenu-title{margin-top:-6px}.comfyui-easyuse .litegraph.litecontextmenu .submenu{height:var(--height);line-height:var(--height);padding:0 18px 0 12px;margin:0;background:transparent!important}.comfyui-easyuse .litegraph.litecontextmenu .submenu.has_submenu{border-right:none;position:relative}.comfyui-easyuse .litegraph.litecontextmenu .submenu.has_submenu:after{content:"";display:block;width:0;height:0;border-width:4px 4px 0;border-style:solid;border-color:var(--input-text) transparent transparent;transform:translateY(-50%) rotate(-90deg);top:50%;position:absolute}.comfyui-easyuse .litegraph.litecontextmenu .submenu.separator{height:1px;width:100%;background-color:var(--border-color)!important;margin:var(--padding) 0;border:none}.comfyui-easyuse .litegraph.litecontextmenu .submenu:last-child.separator{display:none}.comfyui-easyuse .litegraph.litecontextmenu .submenu:hover:not(.separator){background:var(--theme-color)!important}.comfyui-easyuse .litegraph.lite-search-item{background-color:var(--comfy-input-bg)!important;filter:brightness(100%)}.comfyui-easyuse .litegraph.lite-search-item:hover{filter:brightness(120%);color:var(--input-text)}.comfyui-easyuse .graphdialog{-webkit-backdrop-filter:blur(8px) brightness(120%);backdrop-filter:blur(8px) brightness(120%)}.comfyui-easyuse .graphdialog button{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center}.comfyui-easyuse .comfyui-menu{border-bottom:1px solid var(--bg-color)}.comfyui-easyuse .side-tool-bar-container{border-right:1px solid var(--bg-color)}.comfyui-easyuse .comfy-modal-content{width:100%}.comfyui-easyuse-poseEditor{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-webkit-align-items:center;-khtml-align-items:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;text-align:center;font-size:18px;line-height:1.5}#comfyui-menu-monitor{width:120px}#comfyui-menu-monitor #crystools-monitor-container{margin:0 auto!important}#comfyui-menu-monitor #crystools-monitor-container>div{margin:2px 0!important}#comfyui-menu-monitor #crystools-monitor-container>div>div>div{padding:0 4px!important}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); +var e,t,s,o,n,i,a,l,r,d,u,c,p,h,m,g,f=Object.defineProperty,y=(e,t,s)=>((e,t,s)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);import{d as v,c as _,h as w,s as b,a as A,b as S,e as E,T as C,f as L}from"./assets/vendor-BEuf1XmE.js";import{r as k,w as x,e as I,b as N,c as T,I as O,d as D,F as R,C as M,J as G,K as P,L as B,M as F,z as U,G as z,o as j,N as H,D as W,O as Y,E as V,P as Z,x as X,Q,R as K,S as J}from"./assets/vue-DjzFgvDF.js";import{P as q}from"./assets/primevue-BSs2m5Wu.js";import"./assets/primeuix-Be3xdh47.js";let $=(null==(t=null==(e=window.comfyAPI)?void 0:e.app)?void 0:t.app)||null,ee=(null==(o=null==(s=window.comfyAPI)?void 0:s.api)?void 0:o.api)||null,te=(null==(i=null==(n=window.comfyAPI)?void 0:n.ui)?void 0:i.$el)||null,se=(null==(l=null==(a=window.comfyAPI)?void 0:a.dialog)?void 0:l.ComfyDialog)||null,oe=(null==(d=null==(r=window.comfyAPI)?void 0:r.widgets)?void 0:d.ComfyWidgets)||null,ne=(null==(c=null==(u=window.comfyAPI)?void 0:u.utils)?void 0:c.applyTextReplacements)||null,ie=(null==(h=null==(p=window.comfyAPI)?void 0:p.groupNode)?void 0:h.GroupNodeConfig)||null;const ae=(e,t=void 0)=>{var s,o;return e?null==(o=null==(s=null==$?void 0:$.ui)?void 0:s.settings)?void 0:o.getSettingValue(e,t):null};function le(e,t=null,s=void 0){try{let o=e?ae(e,s):null;return void 0===o&&t&&(o=localStorage[e]),o}catch(o){return null}}async function re(e,t,s=null){var o,n;try{(null==(n=null==(o=null==$?void 0:$.ui)?void 0:o.settings)?void 0:n.setSettingValue)?$.ui.settings.setSettingValue(e,t):await ee.storeSetting(e,t),s&&(localStorage[s]="object"==typeof t?JSON.stringify(t):t)}catch(i){}}function de(e,t){if(e="number"==typeof e?e:e instanceof Date?e.getTime():parseInt(e),isNaN(e))return null;let s=new Date(e);(e=s.toString().split(/[\s\:]/g).slice(0,-2))[1]=["01","02","03","04","05","06","07","08","09","10","11","12"][s.getMonth()];let o={MM:1,dd:2,yyyy:3,hh:4,mm:5,ss:6};return t.replace(/([Mmdhs]|y{2})\1/g,(t=>e[o[t]]))}const ue="comfyui-easyuse-",ce="dark-theme",pe="#236692",he={PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd"},me=0x4000000000000,ge=["loaders","latent","image","mask","sampling","_for_testing","advanced","utils","api"],fe={ALWAYS:0,NEVER:2,BYPASS:4},ye="easyuse_nodes_map",ve=LGraphCanvas.node_colors.bgcolor,_e={ColorPalette:{version:105,id:"obsidian",name:"Obsidian",colors:{node_slot:{CLIP:"#FFD500",CLIP_VISION:"#A8DADC",CLIP_VISION_OUTPUT:"#ad7452",CONDITIONING:"#FFA931",CONTROL_NET:"#6EE7B7",IMAGE:"#64B5F6",LATENT:"#FF9CF9",MASK:"#81C784",MODEL:"#B39DDB",STYLE_MODEL:"#C2FFAE",VAE:"#FF6E6E",TAESD:"#DCC274",PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd"},litegraph_base:{BACKGROUND_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQBJREFUeNrs1rEKwjAUhlETUkj3vP9rdmr1Ysammk2w5wdxuLgcMHyptfawuZX4pJSWZTnfnu/lnIe/jNNxHHGNn//HNbbv+4dr6V+11uF527arU7+u63qfa/bnmh8sWLBgwYJlqRf8MEptXPBXJXa37BSl3ixYsGDBMliwFLyCV/DeLIMFCxYsWLBMwSt4Be/NggXLYMGCBUvBK3iNruC9WbBgwYJlsGApeAWv4L1ZBgsWLFiwYJmCV/AK3psFC5bBggULloJX8BpdwXuzYMGCBctgwVLwCl7Be7MMFixYsGDBsu8FH1FaSmExVfAxBa/gvVmwYMGCZbBg/W4vAQYA5tRF9QYlv/QAAAAASUVORK5CYII=",CLEAR_BACKGROUND_COLOR:"#222222",NODE_TITLE_COLOR:"#d4d4d8",NODE_SELECTED_TITLE_COLOR:"#ffffff",NODE_TEXT_SIZE:14,NODE_TEXT_COLOR:"#ffffff",NODE_SUBTEXT_SIZE:12,NODE_DEFAULT_COLOR:"#09090b",NODE_DEFAULT_BGCOLOR:"rgba(24,24,27,.9)",NODE_DEFAULT_BOXCOLOR:"rgba(255,255,255,.75)",NODE_DEFAULT_SHAPE:"box",NODE_BOX_OUTLINE_COLOR:pe,DEFAULT_SHADOW_COLOR:"rgba(0,0,0,0)",DEFAULT_GROUP_FONT:24,WIDGET_BGCOLOR:"#242427",WIDGET_OUTLINE_COLOR:"#3f3f46",WIDGET_TEXT_COLOR:"#d4d4d8",WIDGET_SECONDARY_TEXT_COLOR:"#d4d4d8",LINK_COLOR:"#9A9",EVENT_LINK_COLOR:"#A86",CONNECTING_LINK_COLOR:"#AFA"},comfy_base:{"fg-color":"#fff","bg-color":"#09090b","comfy-menu-bg":"rgba(24,24,24,.9)","comfy-input-bg":"#262626","input-text":"#ddd","descrip-text":"#999","drag-text":"#ccc","error-text":"#ff4444","border-color":"#29292c","tr-even-bg-color":"rgba(28,28,28,.9)","tr-odd-bg-color":"rgba(19,19,19,.9)"}}},NODE_COLORS:{red:{color:"#af3535",bgcolor:ve,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:ve,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:ve,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:ve,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:ve,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:ve,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:ve,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:ve,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:ve,groupcolor:"#444"}}};let we=JSON.parse(JSON.stringify(_e));delete we.NODE_COLORS,we.ColorPalette.id="obsidian_dark",we.ColorPalette.name="Obsidian Dark",we.ColorPalette.colors.litegraph_base.BACKGROUND_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/gAIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGlmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuMTQ2Mjg5OSwgMjAyMy8wNi8yNS0yMDowMTo1NSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDI1LjEgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMy0xMS0xM1QwMDoxODowMiswMTowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjMtMTEtMTVUMDI6MDQ6NTkrMDE6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMTEtMTVUMDI6MDQ6NTkrMDE6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmIyYzRhNjA5LWJmYTctYTg0MC1iOGFlLTk3MzE2ZjM1ZGIyNyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjk0ZmNlZGU4LTE1MTctZmQ0MC04ZGU3LWYzOTgxM2E3ODk5ZiIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjIzMWIxMGIwLWI0ZmItMDI0ZS1iMTJlLTMwNTMwM2NkMDdjOCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MjMxYjEwYjAtYjRmYi0wMjRlLWIxMmUtMzA1MzAzY2QwN2M4IiBzdEV2dDp3aGVuPSIyMDIzLTExLTEzVDAwOjE4OjAyKzAxOjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjUuMSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQ4OWY1NzlmLTJkNjUtZWQ0Zi04OTg0LTA4NGE2MGE1ZTMzNSIgc3RFdnQ6d2hlbj0iMjAyMy0xMS0xNVQwMjowNDo1OSswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDI1LjEgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpiMmM0YTYwOS1iZmE3LWE4NDAtYjhhZS05NzMxNmYzNWRiMjciIHN0RXZ0OndoZW49IjIwMjMtMTEtMTVUMDI6MDQ6NTkrMDE6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyNS4xIChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4OTe6GAAAAx0lEQVR42u3WMQoAIQxFwRzJys77X8vSLiRgITif7bYbgrwYc/mKXyBoY4VVBgsWLFiwYFmOlTv+9jfDOjHmr8u6eVkGCxYsWLBgmc5S8ApewXvgYRksWLBgKXidpeBdloL3wMOCBctgwVLwCl7BuyyDBQsWLFiwTGcpeAWv4D3wsAwWLFiwFLzOUvAuS8F74GHBgmWwYCl4Ba/gXZbBggULFixYprMUvIJX8B54WAYLFixYCl5nKXiXpeA98LBgwTJYsGC9tg1o8f4TTtqzNQAAAABJRU5ErkJggg==",we.ColorPalette.colors.litegraph_base.CLEAR_BACKGROUND_COLOR="#09090b";const be=LGraphCanvas.node_colors.bgcolor,Ae={ColorPalette:{id:"milk_white",name:"Milk White",colors:{node_slot:{CLIP:"#FFA726",CLIP_VISION:"#5C6BC0",CLIP_VISION_OUTPUT:"#8D6E63",CONDITIONING:"#EF5350",CONTROL_NET:"#66BB6A",IMAGE:"#42A5F5",LATENT:"#AB47BC",MASK:"#9CCC65",MODEL:"#7E57C2",STYLE_MODEL:"#D4E157",VAE:"#FF7043",PIPE_LINE:"#7737AA",PIPE_LINE_SDXL:"#7737AA",INT:"#29699C",X_Y:"#38291f",XYPLOT:"#74DA5D",LORA_STACK:"#94dccd",CONTROL_NET_STACK:"#94dccd"},litegraph_base:{BACKGROUND_IMAGE:"data:image/gif;base64,R0lGODlhZABkALMAAAAAAP///+vr6+rq6ujo6Ofn5+bm5uXl5d3d3f///wAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAkALAAAAABkAGQAAAT/UMhJq7046827HkcoHkYxjgZhnGG6si5LqnIM0/fL4qwwIMAg0CAsEovBIxKhRDaNy2GUOX0KfVFrssrNdpdaqTeKBX+dZ+jYvEaTf+y4W66mC8PUdrE879f9d2mBeoNLfH+IhYBbhIx2jkiHiomQlGKPl4uZe3CaeZifnnijgkESBqipqqusra6vsLGys62SlZO4t7qbuby7CLa+wqGWxL3Gv3jByMOkjc2lw8vOoNSi0czAncXW3Njdx9Pf48/Z4Kbbx+fQ5evZ4u3k1fKR6cn03vHlp7T9/v8A/8Gbp4+gwXoFryXMB2qgwoMMHyKEqA5fxX322FG8tzBcRnMW/zlulPbRncmQGidKjMjyYsOSKEF2FBlJQMCbOHP6c9iSZs+UnGYCdbnSo1CZI5F64kn0p1KnTH02nSoV3dGTV7FFHVqVq1dtWcMmVQZTbNGu72zqXMuW7danVL+6e4t1bEy6MeueBYLXrNO5Ze36jQtWsOG97wIj1vt3St/DjTEORss4nNq2mDP3e7w4r1bFkSET5hy6s2TRlD2/mSxXtSHQhCunXo26NevCpmvD/UU6tuullzULH76q92zdZG/Ltv1a+W+osI/nRmyc+fRi1Xdbh+68+0vv10dH3+77KD/i6IdnX669/frn5Zsjh4/2PXju8+8bzc9/6fj27LFnX11/+IUnXWl7BJfegm79FyB9JOl3oHgSklefgxAC+FmFGpqHIYcCfkhgfCohSKKJVo044YUMttggiBkmp6KFXw1oII24oYhjiDByaKOOHcp3Y5BD/njikSkO+eBREQAAOw==",CLEAR_BACKGROUND_COLOR:"lightgray",NODE_TITLE_COLOR:"#222",NODE_SELECTED_TITLE_COLOR:"#000",NODE_TEXT_SIZE:14,NODE_TEXT_COLOR:"#444",NODE_SUBTEXT_SIZE:12,NODE_DEFAULT_COLOR:"#F7F7F7",NODE_DEFAULT_BGCOLOR:"#F5F5F5",NODE_DEFAULT_BOXCOLOR:"#555",NODE_DEFAULT_SHAPE:"box",NODE_BOX_OUTLINE_COLOR:"#000",DEFAULT_SHADOW_COLOR:"rgba(0,0,0,0.1)",DEFAULT_GROUP_FONT:24,WIDGET_BGCOLOR:"#D4D4D4",WIDGET_OUTLINE_COLOR:"#999",WIDGET_TEXT_COLOR:"#222",WIDGET_SECONDARY_TEXT_COLOR:"#555",LINK_COLOR:"#9A9",EVENT_LINK_COLOR:"#FF9800",CONNECTING_LINK_COLOR:"#222"},comfy_base:{"fg-color":"#222","bg-color":"#DDD","comfy-menu-bg":"#F5F5F5","comfy-input-bg":"#C9C9C9","input-text":"#222","descrip-text":"#444","drag-text":"#555","error-text":"#F44336","border-color":"#bbb","tr-even-bg-color":"#f9f9f9","tr-odd-bg-color":"#fff","content-bg":"#e0e0e0","content-fg":"#222","content-hover-bg":"#adadad","content-hover-fg":"#222"}}},NODE_COLORS:{red:{color:"#af3535",bgcolor:be,groupcolor:"#A88"},brown:{color:"#38291f",bgcolor:be,groupcolor:"#b06634"},green:{color:"#346434",bgcolor:be,groupcolor:"#8A8"},blue:{color:"#1f1f48",bgcolor:be,groupcolor:"#88A"},pale_blue:{color:"#006691",bgcolor:be,groupcolor:"#3f789e"},cyan:{color:"#008181",bgcolor:be,groupcolor:"#8AA"},purple:{color:"#422342",bgcolor:be,groupcolor:"#a1309b"},yellow:{color:"#c09430",bgcolor:be,groupcolor:"#b58b2a"},black:{color:"rgba(0,0,0,.8)",bgcolor:be,groupcolor:"#444"}}},Se={"Workflow created by":"工作流创建者","Watch more video content":"观看更多视频内容","Workflow Guide":"工作流指南","💎 View Checkpoint Info...":"💎 查看 Checkpoint 信息...","💎 View Lora Info...":"💎 查看 Lora 信息...","🔃 Reload Node":"🔃 刷新节点","Updated At:":"最近更新:","Created At:":"首次发布:","✏️ Edit":"✏️ 编辑","💾 Save":"💾 保存","No notes":"当前还没有备注内容","Saving Notes...":"正在保存备注...","Type your notes here":"在这里输入备注内容",ModelName:"模型名称","Models Required":"所需模型","Download Model":"下载模型","Source Url":"模型源地址",Notes:"备注",Type:"类型","Trained Words":"训练词",BaseModel:"基础算法",Details:"详情",Description:"描述",Download:"下载量",Source:"来源","Saving Preview...":"正在保存预览图...","Saving Succeed":"保存成功","Clean SuccessFully":"清理成功","Clean Failed":"清理失败","Saving Failed":"保存失败","No COMBO link":"沒有找到COMBO连接","Reboot ComfyUI":"重启ComfyUI","Are you sure you'd like to reboot the server?":"是否要重启ComfyUI?","Nodes Map":"管理节点组","Nodes map sorting mode":"管理节点组排序模式","No Nodes":"未找到节点","No nodes found in the map":"在工作流程中没有找到节点","Expand All":"展开所有组","Collapse All":"折叠所有组",Close:"关闭","Default automatic sorting, if set to manual, groups can be dragged and dropped and the sorting results saved.":"默认自动排序,如果设置为手动,组可以拖放并保存排序结果。","For drag and drop sorting, please find Nodes map sorting mode in Settings->EasyUse and change it to manual":"如需拖拽排序请在设置->EasyUse节点中找到管理节点组排序模式并修改成 manual",Queue:"队列","Cleanup Of VRAM Usage":"清理显存占用","Please stop all running tasks before cleaning GPU":"请在清理GPU之前停止所有运行中的任务",Always:"启用中",Bypass:"已忽略",Never:"已停用","Auto Sorting":"自动排序","Toggle `Show/Hide` can set mode of group, LongPress can set group nodes to never":"点击`启用中/已忽略`可设置组模式, 长按可停用该组节点","Enable Shift+Up/Down/Left/Right key to align selected nodes":"启用 `Shift+上/下/左/右` 键对齐选中的节点","Enable Shift+g to add selected nodes to a group":"启用 `Shift+g` 键将选中的节点添加一个组","Enable Shift+r to unload models and node cache":"启用 `Shift+r` 键卸载模型和节点缓存","Enable Up/Down/Left/Right key to jump nearest nodes":"启用 `上/下/左/右` 键跳转到最近的前后节点","Enable ALT+1~9 to paste nodes from nodes template":"启用 `ALT+1~9` 从节点模板粘贴到工作流中","Enable contextMenu auto nest subdirectories":"启用上下文菜单自动嵌套子目录","Enable right-click menu to add node A~Z sorting":"启用右键菜单中新建节点A~Z排序","Enable model thumbnails display":"启动模型预览图显示","Enable nodes runtime display":"启动节点运行时间显示","Enable chain get node and set node with parent nodes":"启用将获取点和设置点与父节点链在一起","Maximum number of model thumbnails displayed":"显示的模型缩略图的最大数量","Too many thumbnails will affect the first loading time, set the maximum value to not load the thumbnail function when there are too many models's thumbnail":"太多的缩略图会影响首次加载时间,当模型缩略图太多时,设置最大值以不加载缩略图功能","Too many thumbnails, have closed the display":"模型缩略图太多啦,为您关闭了显示","Get styles list Failed":"获取样式列表失败","Get style image Failed":"获取样式图片失败","Empty All":"清空所有","Type here to search styles ...":"在此处输入以搜索样式 ...","Loading UserInfo...":"正在获取用户信息...","Please set the APIKEY first":"请先设置APIKEY","Setting APIKEY":"设置APIKEY","Save Account Info":"保存账号信息",Choose:"选择",Delete:"删除",Edit:"编辑","At least one account is required":"删除失败: 至少需要一个账户","APIKEY is not Empty":"APIKEY 不能为空","Add Account":"添加账号","Getting Your APIKEY":"获取您的APIKEY","Choose Selected Images":"选择选中的图片","Choose images to continue":"选择图片以继续",Background:"背景",Hat:"帽子",Hair:"头发",Body:"身体",Face:"脸部",Clothes:"衣服",Others:"其他",Glove:"手套",Sunglasses:"太阳镜","Upper-clothes":"上衣",Dress:"连衣裙",Coat:"外套",Socks:"袜子",Pants:"裤子",Jumpsuits:"连体衣",Scarf:"围巾",Skirt:"裙子","Left-arm":"左臂","Right-arm":"右臂","Left-leg":"左腿","Right-leg":"右腿","Left-shoe":"左鞋","Right-shoe":"右鞋",s:"秒","No Node Templates Found":"未找到节点模板预设","Get Node Templates File Failed":"获取节点模板文件失败","Node template with {key} not set":"未设置快捷键为{key}的节点预设","ComfyUI Basic":"ComfyUI 基础节点","Recommend Nodes":"推荐节点","Others A~Z":"其他节点 A~Z"},Ee=le("AGL.Locale"),Ce=(e,t=!1)=>"zh-CN"===(t?navigator.language:Ee)&&Se[e]||e,Le={addGroup:{id:"EasyUse.Hotkeys.AddGroup",name:Ce("Enable Shift+g to add selected nodes to a group"),type:"boolean",defaultValue:!0},cleanVRAMUsed:{id:"EasyUse.Hotkeys.cleanVRAMUsed",name:Ce("Enable Shift+r to unload models and node cache"),type:"boolean",defaultValue:!0},alignSelectedNodes:{id:"EasyUse.Hotkeys.AlignSelectedNodes",name:Ce("Enable Shift+Up/Down/Left/Right key to align selected nodes"),type:"boolean",defaultValue:!0},nodesTemplate:{id:"EasyUse.Hotkeys.NodesTemplate",name:Ce("Enable ALT+1~9 to paste nodes from nodes template"),type:"boolean",defaultValue:!0},jumpNearestNodes:{id:"EasyUse.Hotkeys.JumpNearestNodes",name:Ce("Enable Up/Down/Left/Right key to jump nearest nodes"),type:"boolean",defaultValue:!0},subDirectories:{id:"EasyUse.ContextMenu.SubDirectories",name:Ce("Enable contextMenu auto nest subdirectories"),type:"boolean",defaultValue:!0},modelsThumbnails:{id:"EasyUse.ContextMenu.ModelsThumbnails",name:Ce("Enable model thumbnails display"),type:"boolean",defaultValue:!0},modelsThumbnailsLimit:{id:"EasyUse.ContextMenu.ModelsThumbnailsLimit",name:Ce("Maximum number of model thumbnails displayed"),tooltip:Ce("Too many thumbnails will affect the first loading time, set the maximum value to not load the thumbnail function when there are too many models's thumbnail"),type:"slider",attrs:{min:0,max:5e3,step:100},defaultValue:500},rightMenuNodesSort:{id:"EasyUse.ContextMenu.NodesSort",name:Ce("Enable right-click menu to add node A~Z sorting"),type:"boolean",defaultValue:!0},nodesRuntime:{id:"EasyUse.Nodes.Runtime",name:Ce("Enable nodes runtime display"),type:"boolean",defaultValue:!0},chainGetSet:{id:"EasyUse.Nodes.ChainGetSet",name:Ce("Enable chain get node and set node with parent nodes"),type:"boolean",defaultValue:!0},nodesMap:{id:"EasyUse.NodesMap.Sorting",name:Ce("Nodes map sorting mode"),tooltip:Ce("Default automatic sorting, if set to manual, groups can be dragged and dropped and the sorting results saved."),type:"combo",options:["Auto sorting","Manual drag&drop sorting"],defaultValue:"Auto sorting"}};function ke(e=100,t){return new Promise((s=>{setTimeout((()=>{s(t)}),e)}))}const xe=v("groups",{state:e=>({groups:[],nodes:[],isWatching:!1}),getters:{groups_nodes(){var e;let t=[],s=[];if((null==(e=this.nodes)?void 0:e.length)>0){this.nodes.map((e=>{let o=e.pos,n=!1;for(let s=0;si.pos[0]&&o[0]i.pos[1]&&o[1]e.pos[0]-t.pos[0])).sort(((e,t)=>e.pos[1]-t.pos[1])))},setNodes(e){this.nodes=_(e)},update(){($.extensionManager.activeSidebarTab===ye||this.isWatching)&&setTimeout((e=>{this.setGroups($.canvas.graph._groups),this.setNodes($.canvas.graph._nodes)}),1)},watchGraph(e=!1){e&&(this.isWatching=!0);let t=this;this.update();const s=$.graph.onNodeAdded;$.graph.onNodeAdded=function(e){t.update();const o=e.onRemoved;return e.onRemoved=function(){return t.update(),null==o?void 0:o.apply(this,arguments)},null==s?void 0:s.apply(this,arguments)},$.canvas.onNodeMoved=function(e){t.update()};const o=LGraphCanvas.onNodeAlign;LGraphCanvas.onNodeAlign=function(e){return t.update(),null==o?void 0:o.apply(this,arguments)};const n=LGraphCanvas.onGroupAdd;LGraphCanvas.onGroupAdd=function(){return t.update(),null==n?void 0:n.apply(this,arguments)};const i=LGraphCanvas.onGroupAlign;LGraphCanvas.onGroupAlign=function(e){return t.update(),null==i?void 0:i.apply(this,arguments)};const a=LGraphCanvas.onMenuNodeRemove;LGraphCanvas.onMenuNodeRemove=function(e){return t.update(),null==a?void 0:a.apply(this,arguments)}},unwatchGraph(){this.isWatching=!1}}});let Ie=null;const Ne=["custom_obsidian","custom_obsidian_dark","custom_milk_white"],Te={"easy positive":"green","easy negative":"red","easy promptList":"cyan","easy promptLine":"cyan","easy promptConcat":"cyan","easy promptReplace":"cyan","easy textSwitch":"pale_blue"};let Oe=LGraphCanvas.node_colors,De=null,Re=null,Me=null,Ge=null;for(let Xo in Le)Pe=Le[Xo],$.ui.settings.addSetting(Pe);var Pe;function Be(e,t=!1){let s="after",o="before";t&&([o,s]=[s,o]),e.label=(e.label??e.name).replace(o,s),e.name=e.label}function Fe(e,t,s,o,n,i,a){t.strokeStyle=o,t.fillStyle=n;let l=LiteGraph.NODE_TITLE_HEIGHT,r=this.ds.scale<.5,d=e._shape||e.constructor.shape||LiteGraph.ROUND_SHAPE,u=e.constructor.title_mode,c=!0;u==LiteGraph.TRANSPARENT_TITLE||u==LiteGraph.NO_TITLE?c=!1:u==LiteGraph.AUTOHIDE_TITLE&&mouse_over&&(c=!0);let p=new Float32Array(4);p=[0,c?-l:0,s[0]+1,c?s[1]+l:s[1]];let h=t.globalAlpha;if(t.lineWidth=1,t.beginPath(),d==LiteGraph.BOX_SHAPE||r?t.fillRect(p[0],p[1],p[2],p[3]):d==LiteGraph.ROUND_SHAPE||d==LiteGraph.CARD_SHAPE?t.roundRect(p[0],p[1],p[2],p[3],d==LiteGraph.CARD_SHAPE?[this.round_radius,this.round_radius,0,0]:[this.round_radius]):d==LiteGraph.CIRCLE_SHAPE&&t.arc(.5*s[0],.5*s[1],.5*s[0],0,2*Math.PI),t.strokeStyle=LiteGraph.WIDGET_OUTLINE_COLOR,t.stroke(),t.strokeStyle=o,t.fill(),!e.flags.collapsed&&c&&(t.shadowColor="transparent",t.fillStyle="rgba(0,0,0,0.2)",t.fillRect(0,-1,p[2],2)),t.shadowColor="transparent",e.onDrawBackground&&e.onDrawBackground(t,this,this.canvas,this.graph_mouse),c||u==LiteGraph.TRANSPARENT_TITLE){const n="dark"==function(e){let t=e.replace("#","");return s=parseInt(t.substring(0,2),16),o=parseInt(t.substring(2,4),16),n=parseInt(t.substring(4,6),16),.299*s+.587*o+.114*n>127.5?"light":"dark";var s,o,n}((null==e?void 0:e.color)||"#ffffff");if(e.onDrawTitleBar)e.onDrawTitleBar(t,l,s,this.ds.scale,o);else if(u!=LiteGraph.TRANSPARENT_TITLE&&(e.constructor.title_color||this.render_title_colored)){let n=e.constructor.title_color||o;if(e.flags.collapsed&&(t.shadowColor=LiteGraph.DEFAULT_SHADOW_COLOR),this.use_gradients){let e=LGraphCanvas.gradients[n];e||(e=LGraphCanvas.gradients[n]=t.createLinearGradient(0,0,400,0),e.addColorStop(0,n),e.addColorStop(1,"#000")),t.fillStyle=e}else t.fillStyle=n;t.beginPath(),d==LiteGraph.BOX_SHAPE||r?t.rect(0,-l,s[0]+1,l):d!=LiteGraph.ROUND_SHAPE&&d!=LiteGraph.CARD_SHAPE||t.roundRect(0,-l,s[0]+1,l,e.flags.collapsed?[this.round_radius]:[this.round_radius,this.round_radius,0,0]),t.fill(),t.shadowColor="transparent"}let a=!1;LiteGraph.node_box_coloured_by_mode&&LiteGraph.NODE_MODES_COLORS[e.mode]&&(a=LiteGraph.NODE_MODES_COLORS[e.mode]),LiteGraph.node_box_coloured_when_on&&(a=e.action_triggered?"#FFF":e.execute_triggered?"#AAA":a);let c=10;if(e.onDrawTitleBox)e.onDrawTitleBox(t,l,s,this.ds.scale);else if(d==LiteGraph.ROUND_SHAPE||d==LiteGraph.CIRCLE_SHAPE||d==LiteGraph.CARD_SHAPE){const s=n?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR,o=n?"#eeeeee":e.boxcolor||a||LiteGraph.NODE_DEFAULT_BOXCOLOR;t.fillStyle=i?s:o,t.beginPath(),t.fillRect(10,0-1.05*c-1,1.1*c,.125*c),t.fillRect(10,0-1.45*c-1,1.1*c,.125*c),t.fillRect(10,0-1.85*c-1,1.1*c,.125*c)}else t.fillStyle=e.boxcolor||a||LiteGraph.NODE_DEFAULT_BOXCOLOR,t.fillRect(.5*(l-c),-.5*(l+c),c,c);if(t.globalAlpha=h,e.onDrawTitleText&&e.onDrawTitleText(t,l,s,this.ds.scale,this.title_text_font,i),!r){t.font=this.title_text_font;let s=String(e.getTitle());s&&(t.fillStyle=i?n?"#ffffff":LiteGraph.NODE_SELECTED_TITLE_COLOR:n?"#ffffff":e.constructor.title_text_color||this.node_title_color,e.flags.collapsed?(t.textAlign="left",t.measureText(s),t.fillText(s.substr(0,20),l,LiteGraph.NODE_TITLE_TEXT_Y-l),t.textAlign="left"):(t.textAlign="left",t.fillText(s,l,LiteGraph.NODE_TITLE_TEXT_Y-l)))}if(!e.flags.collapsed&&e.subgraph&&!e.skip_subgraph_button){let s=LiteGraph.NODE_TITLE_HEIGHT,o=e.size[0]-s,n=LiteGraph.isInsideRectangle(this.graph_mouse[0]-e.pos[0],this.graph_mouse[1]-e.pos[1],o+2,2-s,s-4,s-4);t.fillStyle=n?"#888":"#555",d==LiteGraph.BOX_SHAPE||r?t.fillRect(o+2,2-s,s-4,s-4):(t.beginPath(),t.roundRect(o+2,2-s,s-4,s-4,[4]),t.fill()),t.fillStyle="#333",t.beginPath(),t.moveTo(o+.2*s,.6*-s),t.lineTo(o+.8*s,.6*-s),t.lineTo(o+.5*s,.3*-s),t.fill()}e.onDrawTitle&&e.onDrawTitle(t)}if(i){e.onBounding&&e.onBounding(p),u==LiteGraph.TRANSPARENT_TITLE&&(p[1]-=l,p[3]+=l),t.lineWidth=2,t.globalAlpha=.8,t.beginPath();let n=0,i=0,a=1;d==LiteGraph.BOX_SHAPE?t.rect(n+p[0],n+p[1],i+p[2],i+p[3]):d==LiteGraph.ROUND_SHAPE||d==LiteGraph.CARD_SHAPE&&e.flags.collapsed?t.roundRect(n+p[0],n+p[1],i+p[2],i+p[3],[this.round_radius*a]):d==LiteGraph.CARD_SHAPE?t.roundRect(n+p[0],n+p[1],i+p[2],i+p[3],[this.round_radius*a,a,this.round_radius*a,a]):d==LiteGraph.CIRCLE_SHAPE&&t.arc(.5*s[0],.5*s[1],.5*s[0]+6,0,2*Math.PI),t.strokeStyle=LiteGraph.NODE_BOX_OUTLINE_COLOR,t.stroke(),t.strokeStyle=o,t.globalAlpha=1}e.execute_triggered>0&&e.execute_triggered--,e.action_triggered>0&&e.action_triggered--}function Ue(e,t,s,o){if(!e.widgets||!e.widgets.length)return 0;let n=e.size[0],i=e.widgets;t+=2;let a=LiteGraph.NODE_WIDGET_HEIGHT,l=this.ds.scale>.5;s.save(),s.globalAlpha=this.editor_alpha;let r=LiteGraph.WIDGET_OUTLINE_COLOR,d=LiteGraph.WIDGET_BGCOLOR,u=LiteGraph.WIDGET_TEXT_COLOR,c=LiteGraph.WIDGET_SECONDARY_TEXT_COLOR,p=12;for(let h=0;h1&&(n=1),s.fillStyle=m.options.hasOwnProperty("slider_color")?m.options.slider_color:o==m?r:pe,s.beginPath(),s.roundRect(p,g,n*(f-24),a,[.25*a]),s.fill(),m.marker){let e=(m.marker-m.options.min)/t;e<0&&(e=0),e>1&&(e=1),s.fillStyle=m.options.hasOwnProperty("marker_color")?m.options.marker_color:"#AA9",s.roundRect(p+e*(f-24),g,2,a,[.25*a])}if(l){s.textAlign="center",s.fillStyle=u;let e=(m.label||m.name)+": "+Number(m.value).toFixed(null!=m.options.precision?m.options.precision:3).toString();s.fillText(e,.5*f,g+.7*a)}break;case"number":case"combo":if(s.textAlign="left",s.strokeStyle=r,s.fillStyle=d,s.beginPath(),l?s.roundRect(p,g,f-24,a,[.25*a]):s.rect(p,g,f-24,a),s.fill(),l){m.disabled||s.stroke(),s.fillStyle=u,m.disabled||(s.beginPath(),s.moveTo(24,g+6.5),s.lineTo(18,g+.5*a),s.lineTo(24,g+a-6.5),s.fill(),s.beginPath(),s.moveTo(f-p-12,g+6.5),s.lineTo(f-p-6,g+.5*a),s.lineTo(f-p-12,g+a-6.5),s.fill()),s.fillStyle=c,s.font="10px Inter",s.fillText(m.label||m.name,29,g+.7*a),s.fillStyle=u,s.textAlign="right";let e=6;if("number"==m.type)s.font="10px Inter",s.fillText(Number(m.value).toFixed(void 0!==m.options.precision?m.options.precision:3),f-24-e,g+.7*a);else{let t=m.value;if(m.options.values){let e=m.options.values;e.constructor===Function&&(e=e()),e&&e.constructor!==Array&&(t=e[m.value])}s.fillText(t,f-24-e,g+.7*a)}}break;case"string":case"text":if(s.textAlign="left",s.strokeStyle=r,s.fillStyle=d,s.beginPath(),l?s.roundRect(p,g,f-24,a,[.25*a]):s.rect(p,g,f-24,a),s.fill(),l){m.disabled||s.stroke(),s.save(),s.beginPath(),s.rect(p,g,f-24,a),s.clip(),s.fillStyle=c;const e=m.label||m.name;s.font="10px Inter",null!=e&&s.fillText(e,24,g+.7*a),s.fillStyle=u,s.textAlign="right",s.fillText(String(m.value).substr(0,30),f-24,g+.7*a),s.restore()}break;default:m.draw&&m.draw(s,e,f,g,a)}t+=(m.computeSize?m.computeSize(f)[1]:a)+4,s.globalAlpha=this.editor_alpha}s.restore(),s.textAlign="left"}function ze(e,t,s,o,n){return new LiteGraph.ContextMenu(LiteGraph.NODE_MODES,{event:s,callback:function(e){if(!n)return;var t=Object.values(LiteGraph.NODE_MODES).indexOf(e),s=function(e){t>=0&&LiteGraph.NODE_MODES[t]?e.changeMode(t):e.changeMode(LiteGraph.ALWAYS),Ie||(Ie=xe()),Ie.update()},o=LGraphCanvas.active_canvas;if(!o.selected_nodes||Object.keys(o.selected_nodes).length<=1)s(n);else for(var i in o.selected_nodes)s(o.selected_nodes[i])},parentMenu:o,node:n}),!1}function je(e,t,s,o,n){if(!n)throw"no node for color";var i=[];for(var a in i.push({value:null,content:"No color"}),LGraphCanvas.node_colors){var l=LGraphCanvas.node_colors[a];e={value:a,content:""+a+""};i.push(e)}return new LiteGraph.ContextMenu(i,{event:s,callback:function(e){if(!n)return;var t=e.value?LGraphCanvas.node_colors[e.value]:null,s=function(e){t?e.constructor===LiteGraph.LGraphGroup?e.color=t.groupcolor:(e.color=t.color,e.bgcolor=t.bgcolor):(delete e.color,delete e.bgcolor),Ie||(Ie=xe()),Ie.update()},o=LGraphCanvas.active_canvas;if(!o.selected_nodes||Object.keys(o.selected_nodes).length<=1)s(n);else for(var i in o.selected_nodes)s(o.selected_nodes[i]);n.setDirtyCanvas(!0,!0)},parentMenu:o,node:n}),!1}function He(e,t,s,o,n){var i=e.property||"title",a=n[i],l=document.createElement("div");l.is_modified=!1,l.className="graphdialog",l.innerHTML="",l.close=function(){l.parentNode&&l.parentNode.removeChild(l)},l.querySelector(".name").innerText=i;var r=l.querySelector(".value");r&&(r.value=a,r.addEventListener("blur",(function(e){this.focus()})),r.addEventListener("keydown",(function(e){if(l.is_modified=!0,27==e.keyCode)l.close();else if(13==e.keyCode)m();else if(13!=e.keyCode&&"textarea"!=e.target.localName)return;e.preventDefault(),e.stopPropagation()})));var d=LGraphCanvas.active_canvas.canvas,u=d.getBoundingClientRect(),c=-20,p=-20;u&&(c-=u.left,p-=u.top),event?(l.style.left=event.clientX+c+"px",l.style.top=event.clientY+p+"px"):(l.style.left=.5*d.width+c+"px",l.style.top=.5*d.height+p+"px"),l.querySelector("button").addEventListener("click",m),d.parentNode.appendChild(l),r&&r.focus();var h=null;function m(){r&&function(t){"Number"==e.type?t=Number(t):"Boolean"==e.type&&(t=Boolean(t));n[i]=t,l.parentNode&&l.parentNode.removeChild(l);n.setDirtyCanvas(!0,!0),Ie||(Ie=xe());Ie.update()}(r.value)}l.addEventListener("mouseleave",(function(e){LiteGraph.dialog_close_on_mouse_leave&&!l.is_modified&&LiteGraph.dialog_close_on_mouse_leave&&(h=setTimeout(l.close,LiteGraph.dialog_close_on_mouse_leave_delay))})),l.addEventListener("mouseenter",(function(e){LiteGraph.dialog_close_on_mouse_leave&&h&&clearTimeout(h)}))}$.registerExtension({name:"Comfy.EasyUse.UI",init(){var e,t;const s="Comfy.CustomColorPalettes",o="Comfy.Settings.Comfy.CustomColorPalettes";if(Re||(Re=le(s,o)),Me||(Me=le("Comfy.ColorPalette","Comfy.Settings.Comfy.ColorPalette")||"dark"),(!(null==(e=null==Re?void 0:Re.obsidian)?void 0:e.version)||Re.obsidian.version<_e.ColorPalette.version)&&(Re.obsidian=_e.ColorPalette,Re.obsidian_dark=we.ColorPalette,re(s,Re,o)),(!(null==(t=null==Re?void 0:Re.milk_white)?void 0:t.version)||Re.milk_white.version{(null==e?void 0:e.value)&&(null==e?void 0:e.oldValue)&&(await ke(1),Object.assign($.canvas.default_connection_color_byType,he),Object.assign(LGraphCanvas.link_type_colors,he)),"custom_milk_white"==e.value&&document.body.classList.remove(ce)})),setTimeout((e=>Ye(le("Comfy.UseNewMenu")||"Disabled")),1)},async nodeCreated(e){var t;if(Te.hasOwnProperty(e.comfyClass)){const t=Te[e.comfyClass],s=Oe[t];if(!s)return;s.color&&(e.color=s.color),s.bgcolor&&(e.bgcolor=s.bgcolor)}if(De||(De=le("Comfy.WidgetControlMode")),"before"==De){const s="before"==De;if((null==(t=e.widgets)?void 0:t.length)>0)for(const t of e.widgets)if(["control_before_generate","control_after_generate"].includes(t.name)&&(await Be(t,s),t.linkedWidgets))for(const e of t.linkedWidgets)await Be(e,s)}}});const We=null==(m=$.ui.settings.settingsLookup)?void 0:m["Comfy.UseNewMenu"];We&&(We.onChange=e=>Ye(e));const Ye=e=>{var t;const s=(null==(t=document.getElementById("crystools-root"))?void 0:t.children)||null;if((null==s?void 0:s.length)>0){if(!Ge)for(let e=0;ee.widgets.find((e=>e.name===t)),Xe=(e,t,s=!1,o="")=>{var n;if(!t||((e,t)=>!!e.inputs&&e.inputs.some((e=>e.name===t)))(e,t.name))return;Ve[t.name]||(Ve[t.name]={origType:t.type,origComputeSize:t.computeSize});const i=e.size;t.type=s?Ve[t.name].origType:"easyHidden"+o,t.computeSize=s?Ve[t.name].origComputeSize:()=>[0,-4],null==(n=t.linkedWidgets)||n.forEach((o=>Xe(e,o,":"+t.name,s)));const a=s?Math.max(e.computeSize()[1],i[1]):e.size[1];e.setSize([e.size[0],a])},Qe=(e,t=0)=>{var s,o;if(e)return(null==(s=e.widgets)?void 0:s[t])?e.widgets[t].value:e.widgets_values?null==(o=e.widgets_values)?void 0:o[t]:void 0},Ke=e=>e.setSize([e.size[0],e.computeSize()[1]]),Je=(e,t)=>graph.getNodeById(e),qe=e=>{var t;try{return Object.values(null==(t=null==graph?void 0:graph.list_of_graphcanvas[0])?void 0:t.selected_nodes)}catch(s){return[]}};function $e(e,t,s){return e+(o=s,(.5-.5*Math.cos(Math.PI*o))*(t-e));var o}const et=(e,t=!0)=>{var s,o;const n=(null==(o=null==(s=e.graph)?void 0:s.list_of_graphcanvas)?void 0:o[0])||null;if(!n)return;const[i,a]=e.pos,[l,r]=e.size;(([e,t],s)=>{const o=s.ds,n=document.body.clientWidth,i=document.body.clientHeight,a=o.scale,l=.5*n/a-e,r=.5*i/a-t,d=Date.now()+250,u=o.offset[0],c=o.offset[1],p=()=>{const e=d-Date.now();if(!(Date.now(){const t=Je(e);t&&et(t)},st=(e,t=(()=>graph.links??[])())=>t[e],ot=e=>e.toLowerCase().replace(/_./g,(e=>e.replace("_","").toUpperCase())),nt=e=>"easy getNode"===e.type,it=e=>"easy setNode"===e.type,at=e=>nt(e)||it(e),lt=(e=(()=>graph._nodes??[])())=>e.filter((e=>at(e))),rt=(e,t,s=0)=>{e.widgets_values||(e.widgets_values=[]),e.widgets_values[s]=t,e.widgets[s].value=t},dt=e=>graph.add(e),ut=e=>graph.remove(e),ct=(e,t=0)=>{var s,o;if("Reroute"!==e.type)return[e,t];const n=e,i=null==(o=null==(s=n.inputs)?void 0:s[0])?void 0:o.link;if(!i)return[n,t];const a=st(i);if(!a)return[n,t];const l=Je(a.origin_id);return l?(setTimeout((()=>{ut(n)})),ct(l,a.origin_slot)):[n,t]},pt=e=>{var t,s,o;if("Reroute"!==e.type)return e;const n=e,i=null==(s=null==(t=n.outputs)?void 0:t[0])?void 0:s.links;if(!i)return n;const a=i[0];if(!a)return n;const l=st(a);if(!l)return n;const r=Je(l.target_id);return r?(1===(null==(o=n.outputs[0].links)?void 0:o.length)&&setTimeout((()=>{ut(n)})),pt(r)):n};const ht=new class{constructor(){y(this,"element",te(`div.${ue}toast`)),y(this,"children",HTMLElement),y(this,"container",document.body),this.container.appendChild(this.element)}async show(e){let t=te(`div.${ue}toast-container`,[te("div",[te("span",[...e.icon?[te("i",{className:e.icon})]:[],te("span",e.content)])])]);t.setAttribute("toast-id",e.id),this.element.replaceChildren(t),this.container.appendChild(this.element),await ke(64),t.style.marginTop=`-${t.offsetHeight}px`,await ke(64),t.classList.add("show"),e.duration&&(await ke(e.duration),this.hide(e.id))}async hide(e){const t=document.querySelector(`.${ue}toast > [toast-id="${e}"]`);(null==t?void 0:t.classList.contains("show"))&&(t.classList.remove("show"),await ke(750)),t&&t.remove()}async clearAllMessages(){let e=document.querySelector(`.${ue}container`);e&&(e.innerHTML="")}async info(e,t=3e3,s=[]){this.show({id:"toast-info",icon:`mdi mdi-information ${ue}theme`,content:e,duration:t})}async success(e,t=3e3){this.show({id:"toast-success",icon:`mdi mdi-check-circle ${ue}success`,content:e,duration:t})}async error(e,t=3e3){this.show({id:"toast-error",icon:`mdi mdi-close-circle ${ue}error`,content:e,duration:t})}async warn(e,t=3e3){this.show({id:"toast-warn",icon:`mdi mdi-alert-circle ${ue}warning`,content:e,duration:t})}async showLoading(e,t=0){this.show({id:"toast-loading",icon:"mdi mdi-rotate-right loading",content:e,duration:t})}async hideLoading(){this.hide("toast-loading")}},mt=["rescale_after_model","rescale","lora_name","upscale_method","image_output","add_noise","info","sampler_name","ckpt_B_name","ckpt_C_name","save_model","refiner_ckpt_name","num_loras","num_controlnet","mode","toggle","resolution","ratio","target_parameter","input_count","replace_count","downscale_mode","range_mode","text_combine_mode","input_mode","lora_count","ckpt_count","conditioning_mode","preset","use_tiled","use_batch","num_embeds","easing_mode","guider","scheduler","inpaint_mode","t5_type","rem_mode"],gt=["LIGHT - SD1.5 only (low strength)","STANDARD (medium strength)","VIT-G (medium strength)","PLUS (high strength)","PLUS FACE (portraits)","FULL FACE - SD1.5 only (portraits stronger)"],ft=["FACEID","FACEID PLUS - SD1.5 only","FACEID PLUS V2","FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"],yt=["easy seed","easy latentNoisy","easy wildcards","easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingSdTurbo","easy preSamplingCascade","easy preSamplingDynamicCFG","easy preSamplingLayerDiffusion","easy fullkSampler","easy fullCascadeKSampler"],vt=["easy fullLoader","easy a1111Loader","easy comfyLoader","easy hyditLoader","easy pixArtLoader"],_t=["easy imageSize","easy imageSizeBySide","easy imageSizeByLongerSide","easy imageSizeShow","easy imageRatio","easy imagePixelPerfect"];function wt(e,t){const s=e.comfyClass,o=t.value;switch(t.name){case"range_mode":Xe(e,Ze(e,"step"),"step"==o),Xe(e,Ze(e,"num_steps"),"num_steps"==o),Ke(e);break;case"text_combine_mode":Xe(e,Ze(e,"replace_text"),"replace"==o);break;case"lora_name":["lora_model_strength","lora_clip_strength"].map((t=>Xe(e,Ze(e,t),"None"!==o)));break;case"resolution":"自定义 x 自定义"===o&&(t.value="width x height (custom)"),["empty_latent_width","empty_latent_height"].map((t=>Xe(e,Ze(e,t),"width x height (custom)"===o)));break;case"ratio":["empty_latent_width","empty_latent_height"].map((t=>Xe(e,Ze(e,t),"custom"===o)));break;case"num_loras":var n=o+1,i=Ze(e,"mode").value;for(let t=0;tXe(e,Ze(e,t),"simple"!==i)));for(let t=n;t<21;t++)["lora_"+t+"_name","lora_"+t+"_strength","lora_"+t+"_model_strength","lora_"+t+"_clip_strength"].map((t=>Xe(e,Ze(e,t),!1)));Ke(e);break;case"num_controlnet":n=o+1,i=Ze(e,"mode").value;for(let t=0;tXe(e,Ze(e,t),!0))),["start_percent_"+t,"end_percent_"+t].map((t=>Xe(e,Ze(e,t),"simple"!==i)));for(let t=n;t<21;t++)["controlnet_"+t,"controlnet_"+t+"_strength","scale_soft_weight_"+t,"start_percent_"+t,"end_percent_"+t].map((t=>Xe(e,Ze(e,t),!1)));Ke(e);break;case"mode":switch(null==e?void 0:e.comfyClass){case"easy loraStack":n=Ze(e,"num_loras").value+1,i=o;for(let t=0;tXe(e,Ze(e,t),"simple"!==i)));Ke(e);break;case"easy controlnetStack":n=Ze(e,"num_controlnet").value+1,i=o;for(let t=0;tXe(e,Ze(e,t),"simple"!==i)));Ke(e);break;case"easy icLightApply":i=o;["lighting","remove_bg"].map((t=>Xe(e,Ze(e,t),"Foreground"===i))),Xe(e,Ze(e,"source"),"Foreground"!==i),Ke(e)}break;case"toggle":t.type="toggle",t.options={on:"Enabled",off:"Disabled"};break;case"t5_type":["clip_name","padding"].map((t=>Xe(e,Ze(e,t),"sd3"==o))),["t5_name","device","dtype"].map((t=>Xe(e,Ze(e,t),"t5v11"==o))),Ke(e);break;case"preset":if(gt.includes(o)){let t=Ze(e,"use_tiled");Xe(e,Ze(e,"lora_strength")),Xe(e,Ze(e,"provider")),Xe(e,Ze(e,"weight_faceidv2")),Xe(e,Ze(e,"weight_kolors")),Xe(e,Ze(e,"use_tiled"),!0),Xe(e,Ze(e,"sharpening"),t&&t.value)}else ft.includes(o)&&(Xe(e,Ze(e,"weight_faceidv2"),!!["FACEID PLUS V2","FACEID PLUS KOLORS"].includes(o)),Xe(e,Ze(e,"weight_kolors"),!!["FACEID PLUS KOLORS"].includes(t.value)),["FACEID PLUS KOLORS","FACEID PORTRAIT (style transfer)","FACEID PORTRAIT UNNORM - SDXL only (strong)"].includes(o)?Xe(e,Ze(e,"lora_strength"),!1):Xe(e,Ze(e,"lora_strength"),!0),Xe(e,Ze(e,"provider"),!0),Xe(e,Ze(e,"use_tiled")),Xe(e,Ze(e,"sharpening")));Ke(e);break;case"use_tiled":Xe(e,Ze(e,"sharpening"),!!o),Ke(e);break;case"num_embeds":n=o+1;for(let t=0;tXe(e,Ze(e,t),!1)));break;case"brushnet_random":case"brushnet_segmentation":["dtype","scale","start_at","end_at"].map((t=>Xe(e,Ze(e,t),!0))),["fitting","function"].map((t=>Xe(e,Ze(e,t),!1)));break;case"powerpaint":["dtype","fitting","function","scale","start_at","end_at"].map((t=>Xe(e,Ze(e,t),!0)))}Ke(e);break;case"image_output":Xe(e,Ze(e,"link_id"),!!["Sender","Sender&Save"].includes(o)),Xe(e,Ze(e,"decode_vae_name"),!!["Hide","Hide&Save"].includes(o)),["save_prefix","output_path","embed_workflow","number_padding","overwrite_existing"].map((t=>Xe(e,Ze(e,t),!!["Save","Hide&Save","Sender&Save"].includes(o))));break;case"add_noise":var a=Ze(e,"control_before_generate"),l=Ze(e,"control_after_generate")||a;"disable"===o?(Xe(e,Ze(e,"seed")),l&&(l.last_value=l.value,l.value="fixed",Xe(e,l))):(Xe(e,Ze(e,"seed"),!0),l&&((null==l?void 0:l.last_value)&&(l.value=l.last_value),Xe(e,l,!0))),Ke(e);break;case"guider":switch(o){case"Basic":["cfg","cfg_negative"].map((t=>Xe(e,Ze(e,t))));break;case"CFG":Xe(e,Ze(e,"cfg"),!0),Xe(e,Ze(e,"cfg_negative"));break;case"IP2P+DualCFG":case"DualCFG":["cfg","cfg_negative"].map((t=>Xe(e,Ze(e,t),!0)))}Ke(e);break;case"scheduler":["karrasADV","exponentialADV","polyExponential"].includes(o)?(["sigma_max","sigma_min"].map((t=>Xe(e,Ze(e,t),!0))),["denoise","beta_d","beta_min","eps_s","coeff"].map((t=>Xe(e,Ze(e,t))),!1),Xe(e,Ze(e,"rho"),"exponentialADV"!=o)):"vp"==o?(["sigma_max","sigma_min","denoise","rho","coeff"].map((t=>Xe(e,Ze(e,t)))),["beta_d","beta_min","eps_s"].map((t=>Xe(e,Ze(e,t),!0)))):(["sigma_max","sigma_min","beta_d","beta_min","eps_s","rho"].map((t=>Xe(e,Ze(e,t)))),Xe(e,Ze(e,"coeff"),"gits"==o),Xe(e,Ze(e,"denoise"),!0)),Ke(e);break;case"conditioning_mode":["replace","concat","combine"].includes(o)?["average_strength","old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>Xe(e,Ze(e,t)))):"average"==o?(Xe(e,Ze(e,"average_strength"),!0),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>Xe(e,Ze(e,t),!1)))):"timestep"==o&&(["average_strength"].map((t=>Xe(e,Ze(e,t),!1))),["old_cond_start","old_cond_end","new_cond_start","new_cond_end"].map((t=>Xe(e,Ze(e,t)))));break;case"rescale":Ze(e,"rescale_after_model").value,Xe(e,Ze(e,"width"),"to Width/Height"===o),Xe(e,Ze(e,"height"),"to Width/Height"===o),Xe(e,Ze(e,"percent"),"by percentage"===o),Xe(e,Ze(e,"longer_side"),"to longer side - maintain aspect"===o),Ke(e);break;case"upscale_method":["factor","crop"].map((t=>Xe(e,Ze(e,t),"None"!==o)));break;case"target_parameter":switch(s){case"easy XYInputs: Steps":["first_step","last_step"].map((t=>Xe(e,Ze(e,t),"steps"==o))),["first_start_step","last_start_step"].map((t=>Xe(e,Ze(e,t),"start_at_step"==o))),["first_end_step","last_end_step"].map((t=>Xe(e,Ze(e,t),"end_at_step"==o)));break;case"easy XYInputs: Sampler/Scheduler":let t=Ze(e,"input_count").value+1;for(let s=0;sXe(e,Ze(e,t),"strength"==o))),["first_start_percent","last_start_percent"].map((t=>Xe(e,Ze(e,t),"start_percent"==o))),["first_end_percent","last_end_percent"].map((t=>Xe(e,Ze(e,t),"end_percent"==o))),["strength","start_percent","end_percent"].map((t=>Xe(e,Ze(e,t),o!=t))),Ke(e)}case"replace_count":n=o+1;for(let t=0;tXe(e,Ze(e,t),!r)));for(let t=n;t<11;t++)["lora_name_"+t,"model_str_"+t,"clip_str_"+t].map((t=>Xe(e,Ze(e,t),!1)));Ke(e);break;case"ckpt_count":n=o+1;var d=-1!=Ze(e,"input_mode").value.indexOf("ClipSkip"),u=-1!=Ze(e,"input_mode").value.indexOf("VAE");for(let t=0;tXe(e,Ze(e,t),!1)));Ke(e);break;case"input_count":n=o+1;var c=Ze(e,"target_parameter").value;for(let t=0;tXe(e,Ze(e,s),!t)));["model_strength","clip_strength"].map((s=>Xe(e,Ze(e,s),!t)));break;case"easy XYInputs: Checkpoint":n=Ze(e,"ckpt_count").value+1,d=-1!=Ze(e,"input_mode").value.indexOf("ClipSkip"),u=-1!=Ze(e,"input_mode").value.indexOf("VAE");for(let s=0;se.name===t));if(-1!==e){for(let t=e;t{var e;const t=this.computeSize();t[0]"info"===e.name));if(-1!==e&&this.widgets[e]){this.widgets[e].value=t}}requestAnimationFrame((()=>{var e;const t=this.computeSize();t[0]"prompt"==e.name));this.addWidget("button","get values from COMBO link","",(()=>{var t,o;const n=(null==(o=null==(t=this.outputs[1])?void 0:t.links)?void 0:o.length)>0?this.outputs[1].links[0]:null,i=s.graph._nodes.find((e=>{var t;return null==(t=e.inputs)?void 0:t.find((e=>e.link==n))}));if(n&&i){const t=i.inputs.find((e=>e.link==n)).widget.name,s=i.widgets.find((e=>e.name==t));let o=(null==s?void 0:s.options.values)||null;o&&(o=o.join("\n"),e.value=o)}else ht.error(Ce("No COMBO link"),3e3)}),{serialize:!1})}),vt.includes(t.name)){let t=function(e){var t="";for(let s=0;se.name===t+"_prompt")),o="comfy-multiline-input wildcard_"+t+"_"+this.id.toString();if(-1==s&&e){const s=document.createElement("textarea");s.className=o,s.placeholder="Wildcard Prompt ("+t+")";const n=this.addDOMWidget(t+"_prompt","customtext",s,{getValue:e=>s.value,setValue(e){s.value=e},serialize:!1});n.inputEl=s,n.inputEl.readOnly=!0,s.addEventListener("input",(()=>{var e;null==(e=n.callback)||e.call(n,n.value)})),n.value=e}else if(this.widgets[s])if(e){this.widgets[s].value=e}else{this.widgets.splice(s,1);const e=document.getElementsByClassName(o);e&&e[0]&&e[0].remove()}}};e.prototype.onExecuted=function(e){null==l||l.apply(this,arguments);const o=t(e.positive),n=t(e.negative);s.call(this,o,"positive"),s.call(this,n,"negative")}}if(["easy sv3dLoader"].includes(t.name)){let t=function(e,t,s){switch(e){case"azimuth":return s.readOnly=!0,s.style.opacity=.6,"0:(0.0,0.0)"+(t>1?`\n${t-1}:(360.0,0.0)`:"");case"elevation":return s.readOnly=!0,s.style.opacity=.6,"0:(-90.0,0.0)"+(t>1?`\n${t-1}:(90.0,0.0)`:"");case"custom":return s.readOnly=!1,s.style.opacity=1,"0:(0.0,0.0)\n9:(180.0,0.0)\n20:(360.0,0.0)"}};e.prototype.onNodeCreated=async function(){i&&i.apply(this,[]);const e=this.widgets.find((e=>"easing_mode"==e.name)),s=this.widgets.find((e=>"batch_size"==e.name)),o=this.widgets.find((e=>"scheduler"==e.name));setTimeout((n=>{o.value||(o.value=t(e.value,s.value,o.inputEl))}),1),e.callback=e=>{o.value=t(e,s.value,o.inputEl)},s.callback=s=>{o.value=t(e.value,s,o.inputEl)}}}if(yt.includes(o)&&(e.prototype.onNodeCreated=async function(){i&&i.apply(this,[]);const e=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),o=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));if("easy seed"==t.name){const t=this.addWidget("button","🎲 Manual Random Seed",null,(t=>{"fixed"!=o.value&&(o.value="fixed"),e.value=Math.floor(Math.random()*me),s.queuePrompt(0,1)}),{serialize:!1});e.linkedWidgets=[t,o]}},e.prototype.onAdded=async function(){n&&n.apply(this,[]);const e=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),t=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));setTimeout((s=>{"control_before_generate"==t.name&&0===e.value&&(e.value=Math.floor(Math.random()*me))}),1)}),"easy convertAnything"==o&&(e.prototype.onNodeCreated=async function(){i&&i.apply(this,[]);const e=this.widgets.find((e=>"output_type"==e.name)),t=t=>{this.outputs[0].type=e.value.toUpperCase(),this.outputs[0].name=e.value,this.outputs[0].label=e.value};setTimeout((e=>t()),10),e.callback=e=>t()}),"easy imageInsetCrop"==o){let t=function(e){const t=e.widgets[0];for(let s=1;s<=4;s++)"Pixels"===t.value?(e.widgets[s].options.step=80,e.widgets[s].options.max=8192):(e.widgets[s].options.step=10,e.widgets[s].options.max=99)};e.prototype.onAdded=async function(e){const s=this.widgets[0];let o=s.callback;s.callback=(...e)=>{t(this),o&&o.apply(s,[...e])},setTimeout((e=>{t(this)}),1)}}},nodeCreated(e){if(e.comfyClass.startsWith("easy ")){if(e.widgets)for(const s of e.widgets){if(!mt.includes(s.name))continue;let t=s.value;wt(e,s),Object.defineProperty(s,"value",{get:e=>t,set(o){o!==t&&(t=o,wt(e,s))}})}const t=e.comfyClass;if("easy preDetailerFix"==t){const t=e.widgets.find((e=>"customtext"===e.type));if(!t)return;t.dynamicPrompts=!1,t.inputEl.placeholder="wildcard spec: if kept empty, this option will be ignored",t.serializeValue=()=>t.value}if("easy wildcards"==t){const t=e.widgets.find((e=>"text"==e.name));let s=1;Object.defineProperty(e.widgets[s],"value",{set:e=>{if((new Error).stack.includes("inner_value_change")&&"Select the LoRA to add to the text"!=e){let s=e;s.endsWith(".safetensors")&&(s=s.slice(0,-12)),t.value+=``}},get:e=>"Select the LoRA to add to the text"}),Object.defineProperty(e.widgets[s+1],"value",{set:e=>{(new Error).stack.includes("inner_value_change")&&"Select the Wildcard to add to the text"!=e&&(""!=t.value&&(t.value+=", "),t.value+=e)},get:e=>"Select the Wildcard to add to the text"}),e.widgets[s].serializeValue=e=>"Select the LoRA to add to the text",e.widgets[s+1].serializeValue=e=>"Select the Wildcard to add to the text"}if(_t.includes(t)){const t=document.createElement("textarea");t.className="comfy-multiline-input",t.readOnly=!0;const s=e.addDOMWidget("info","customtext",t,{getValue:e=>t.value,setValue:e=>t.value=e,serialize:!1});s.inputEl=t,t.addEventListener("input",(()=>{var e;null==(e=s.callback)||e.call(s,s.value)}))}}}}),$.registerExtension({name:"easy bookmark",registerCustomNodes(){class e{constructor(){y(this,"type","easy bookmark"),y(this,"title","🔖"),y(this,"slot_start_y",-20),y(this,"___collapsed_width",0),y(this,"isVirtualNode",!0),y(this,"serialize_widgets",!0),y(this,"keypressBound",null),this.addWidget("text","shortcut_key","1",(e=>{""!==(e=e.trim()[0]||"1")&&(this.title="🔖 "+e)}),{y:8}),this.addWidget("number","zoom",1,(e=>{}),{y:8+LiteGraph.NODE_WIDGET_HEIGHT+4,max:2,min:.5,precision:2}),this.keypressBound=this.onKeypress.bind(this)}get _collapsed_width(){return this.___collapsed_width}set _collapsed_width(e){const t=$.canvas,s=t.canvas.getContext("2d");if(s){const e=s.font;s.font=t.title_text_font,this.___collapsed_width=40+s.measureText(this.title).width,s.font=e}}onAdded(){setTimeout((e=>{const t=this.widgets[0].value;t&&(this.title="🔖 "+t)}),1),window.addEventListener("keydown",this.keypressBound)}onRemoved(){window.removeEventListener("keydown",this.keypressBound)}onKeypress(e){const t=e.target;["input","textarea"].includes(t.localName)||this.widgets[0]&&e.key.toLocaleLowerCase()===this.widgets[0].value.toLocaleLowerCase()&&this.canvasToBookmark()}canvasToBookmark(){var e,t;const s=$.canvas;(null==(e=null==s?void 0:s.ds)?void 0:e.offset)&&(s.ds.offset[0]=16-this.pos[0],s.ds.offset[1]=40-this.pos[1]),null!=(null==(t=null==s?void 0:s.ds)?void 0:t.scale)&&(s.ds.scale=Number(this.widgets[1].value||1)),s.setDirty(!0,!0)}}LiteGraph.registerNodeType("easy bookmark",Object.assign(e,{title:"Bookmark 🔖"})),e.category="EasyUse/Util"}}),$.registerExtension({name:"Comfy.EasyUse.ChainNode",init(){$.canvas._mousemove_callback=e=>{if(!le("EasyUse.Nodes.ChainGetSet",null,!0))return;((e,t=!1,s={})=>{var o,n,i,a,l;if(0===e.length)return;const r=s.inputX||160,d=s.ouputX||60;if(e.filter((e=>at(e))).length>1)return;for(const c of e){let a=0,l=0;const u=s.inputY||10,p=s.outputY||30,h=[];if(c.graph){for(const e of c.inputs??[]){const t=e.link;if(!t)continue;const{origin_id:s,target_slot:o}=st(t),n=Je(s);if(!n)continue;if(!at(n))continue;const i=c.getConnectionPos(!0,o);n.pos=[i[0]-r,i[1]+15+a*u],a+=1,h.push(n),n.flags.collapsed=!0}for(const e of c.outputs??[])if(e.links&&c.graph)for(const t of e.links){const{target_id:e}=st(t),s=Je(e);if(!s)continue;if(!at(s))continue;const n=null==(o=s.outputs)?void 0:o.links;if((null==n?void 0:n.length)>1)return;const i=c.getConnectionPos(!1,0);s.pos=[i[0]+d,i[1]+15+l*p],l+=1,h.push(s),s.flags.collapsed=!0}if(t&&1===e.length){const e=[c,...h];(null==(i=null==(n=c.graph)?void 0:n.list_of_graphcanvas)?void 0:i[0]).selectNodes(e)}}}const u=e[0];if(!u)return;(null==(l=null==(a=u.graph)?void 0:a.list_of_graphcanvas)?void 0:l[0]).setDirty(!0,!0)})(qe())};const e=LGraphCanvas.prototype.showLinkMenu;LGraphCanvas.prototype.showLinkMenu=function(t,s){return s.shiftKey?(((e,t=!1)=>{var s,o,n,i,a,l,r,d,u,c;const{type:p}=e;if("*"===p)return;let{origin_id:h,target_id:m,origin_slot:g,target_slot:f}=e,y=Je(h),v=Je(m);if(!y||!v)return!1;if("Reroute"===y.type){let e=0;[y,e]=ct(y),h=null==y?void 0:y.id,g=e,void 0!==g&&-1!==g||(g=0)}if("Reroute"===v.type&&(v=pt(v),m=null==v?void 0:v.id,f=null==v?void 0:v.inputs.findIndex((e=>e.type===p)),void 0!==f&&-1!==f||(f=0)),void 0===h||void 0===m||!y||!v)return!1;if(t&&(at(y)||at(v)))return!1;let _=ot((null==(s=v.getInputInfo(f))?void 0:s.name)??p.toLowerCase());_||(_=ot((null==(n=null==(o=null==y?void 0:y.outputs)?void 0:o[g])?void 0:n.name)??(null==(a=null==(i=null==y?void 0:y.outputs)?void 0:i[g])?void 0:a.type.toString())??_+`_from_${h}_to_${m}`));let w,b=!1,A=!1;if(at(y))_=Qe(y),A=!0;else{const e=null==(r=null==(l=y.outputs)?void 0:l[g])?void 0:r.links;if(e)for(const t of e){const e=Je((null==(d=st(t))?void 0:d.target_id)??-1);e&&at(e)&&it(e)&&(_=Qe(e),A=!0)}if(!A){for(const e of lt()){if(_!==Qe(e)||!it(e))continue;const t=null==(u=e.inputs[0])?void 0:u.link;(null==(c=st(t))?void 0:c.origin_id)===y.id?A=!0:b=!0}b&&(_+=`_from_${h}_to_${m}`)}}if(!A){w=LiteGraph.createNode("easy setNode"),w.is_auto_link=!0;const e=y.getConnectionPos(!1,g);w.pos=[e[0]+20,e[1]],w.inputs[0].name=_,w.inputs[0].type=p,w.inputs[0].widget=v.inputs[f].widget,rt(w,_),dt(w),w.flags.collapsed=!0;let t=[];y.widgets?t=Object.values(y.widgets).map((e=>e.value)):y.widgets_values&&(t=JSON.parse(JSON.stringify(y.widgets_values))),y.connect(g,w,0),y.widgets_values=t,"PrimitiveNode"===y.type&&setTimeout((()=>{if(y){y.connect(g,w,0);for(const[e,s]of t.entries())rt(y,s,e);null!==w&&w.setSize(w.computeSize())}}))}const S=LiteGraph.createNode("easy getNode"),E=v.getConnectionPos(!0,f);S.pos=[E[0]-150,E[1]],S.outputs[0].name=_,S.outputs[0].type=p,S.outputs[0].widget=v.inputs[f].widget,dt(S),rt(S,_),null===S||(S.flags.collapsed=!0,S.setSize(S.computeSize()),S.connect(0,v,f))})(t),!1):(e.apply(this,[t,s]),!1)}}});const bt=async()=>{try{const{Running:e,Pending:t}=await ee.getQueue();if(e.length>0||t.length>0)return void ht.error(Ce("Clean Failed")+":"+Ce("Please stop all running tasks before cleaning GPU"));200==(await ee.fetchApi("/easyuse/cleangpu",{method:"POST"})).status?ht.success(Ce("Clean SuccessFully")):ht.error(Ce("Clean Failed"))}catch(e){}};let At=[];function St(e,t,s,o,n){var i=LGraphCanvas.active_canvas,a=i.getCanvasWindow(),l=i.graph;if(l)return function e(t,o){var r=LiteGraph.getNodeTypesCategories(i.filter||l.filter).filter((function(e){return e.startsWith(t)})),d=[];r.map((function(s){if(s){var o=new RegExp("^("+t+")"),n=s.replace(o,"").split("/")[0],i=""===t?n+"/":t+n+"/",a=n;-1!=a.indexOf("::")&&(a=a.split("::")[1]),-1===d.findIndex((function(e){return e.value===i}))&&d.push({value:i,content:a,has_submenu:!0,callback:function(t,s,o,n){e(t.value,n)}})}})),LiteGraph.getNodeTypesInCategory(t.slice(0,-1),i.filter||l.filter).map((function(e){if(!e.skip_list){var t={value:e.type,content:e.title,has_submenu:!1,callback:function(e,t,s,o){var a=o.getFirstEvent();i.graph.beforeChange();var l=LiteGraph.createNode(e.value);l&&(l.pos=i.convertEventToCanvasOffset(a),i.graph.add(l)),n&&n(l),i.graph.afterChange()}};d.push(t)}}));const u=le("EasyUse.ContextMenu.NodesSort",null,!0);""===t&&u&&(d=function(e){let t=[],s=[];return e.forEach((e=>{(null==e?void 0:e.value)&&ge.includes(e.value.split("/")[0])?t.push(e):s.push(e)})),[{title:Ce("ComfyUI Basic"),is_category_title:!0},...t,{title:Ce("Others A~Z"),is_category_title:!0},...s.sort(((e,t)=>e.content.localeCompare(t.content)))]}(d)),new LiteGraph.ContextMenu(d,{event:s,parentMenu:o},a)}("",o),!1}function Et(e,t,s){var o=this;s=s||{};var n=document.createElement("div");n.className="litemenu-entry submenu";var i=!1;function a(e){var t=this.value,n=!0;(o.current_submenu&&o.current_submenu.close(e),s.callback)&&(!0===s.callback.call(this,t,s,e,o,s.node)&&(n=!1));if(t){if(t.callback&&!s.ignore_item_callbacks&&!0!==t.disabled)!0===t.callback.call(this,t,s,e,o,s.extra)&&(n=!1);if(t.submenu){if(!t.submenu.options)throw"ContextMenu submenu needs options";new o.constructor(t.submenu.options,{callback:t.submenu.callback,event:e,parentMenu:o,ignore_item_callbacks:t.submenu.ignore_item_callbacks,title:t.submenu.title,extra:t.submenu.extra,autoopen:s.autoopen}),n=!1}}n&&!o.lock&&o.close()}return null===t?n.classList.add("separator"):t.is_category_title?(n.classList.remove("litemenu-entry"),n.classList.remove("submenu"),n.classList.add("litemenu-title"),n.innerHTML=t.title):(n.innerHTML=t&&t.title?t.title:e,n.value=t,t&&(t.disabled&&(i=!0,n.classList.add("disabled")),(t.submenu||t.has_submenu)&&n.classList.add("has_submenu")),"function"==typeof t?(n.dataset.value=e,n.onclick_callback=t):n.dataset.value=t,t.className&&(n.className+=" "+t.className)),this.root.appendChild(n),i||n.addEventListener("click",a),!i&&s.autoopen&&LiteGraph.pointerListenerAdd(n,"enter",(function(e){var t=this.value;if(!t||!t.has_submenu)return;a.call(this,e)})),n}function Ct(e){return null==e?void 0:e.substring(0,e.lastIndexOf("."))}function Lt(e){return null==e?void 0:e.substring(e.lastIndexOf(".")+1)}$.registerExtension({name:"Comfy.EasyUse.ContextMenu",async setup(){LGraphCanvas.onMenuAdd=St;const e=le("EasyUse.ContextMenu.ModelsThumbnailsLimit",null,500),t=await ee.fetchApi(`/easyuse/models/thumbnail?limit=${e}`);if(200===t.status){let e=await t.json();At=e}else ht.error(Ce("Too many thumbnails, have closed the display"));const s=LiteGraph.ContextMenu;LiteGraph.ContextMenu=function(e,t){if(le("EasyUse.ContextMenu.SubDirectories",null,!0)&&(null==t?void 0:t.callback)&&!e.some((e=>"string"!=typeof e))){const o=function(e,t){const s=e,o=[...s],n={},i=[],a=[],l=["ckpt","pt","bin","pth","safetensors"];if((null==e?void 0:e.length)>0){const t=Lt(e[e.length-1]);if(!l.includes(t))return null}for(const r of s){const e=r.indexOf("/")>-1?"/":"\\",t=r.split(e);if(t.length>1){const s=t.shift();n[s]=n[s]||[],n[s].push(t.join(e))}else"CHOOSE"===r||r.startsWith("DISABLE ")?i.push(r):a.push(r)}if(Object.values(n).length>0){const e=t.callback;t.callback=null;const s=(t,s)=>{["None","无","無","なし"].includes(t.content)?e("None",s):e(o.find((e=>e.endsWith(t.content)),s))},r=(e,t="")=>{const o=t?t+"\\"+Ct(e):Ct(e),n=Lt(e),i=(new Date).getTime();let a,r="";if(l.includes(n))for(let s=0;s{let s=[],o=[];const i=e.map((e=>{const i={},a=e.indexOf("/")>-1?"/":"\\",l=e.split(a);if(l.length>1){const e=l.shift();i[e]=i[e]||[],i[e].push(l.join(a))}if(Object.values(n).length>0){let t=Object.keys(i)[0];t&&i[t]?s.push({key:t,value:i[t][0]}):o.push(r(e,t))}return r(e,t)}));if(s.length>0){let e={};return s.forEach((t=>{e[t.key]=e[t.key]||[],e[t.key].push(t.value)})),[...Object.entries(e).map((e=>({content:e[0],has_submenu:!0,callback:()=>{},submenu:{options:u(e[1],e[0])}}))),...o]}return i};for(const[t,o]of Object.entries(n))d.push({content:t,has_submenu:!0,callback:()=>{},submenu:{options:u(o,t)}});return d.push(...a.map((e=>r(e,"")))),i.length>0&&d.push(...i.map((e=>r(e,"")))),d}return null}(e,t);return o?s.call(this,o,t):s.apply(this,[...arguments])}return t.parentMenu||t.extra||t.scale||t.hasOwnProperty("extra")&&(e.unshift(null),o=window.location.host,["192.168.","10.","127.",/^172\.((1[6-9]|2[0-9]|3[0-1])\.)/].some((e=>"string"==typeof e?o.startsWith(e):e.test(o)))&&e.unshift({content:`${Ce("Reboot ComfyUI")}`,callback:e=>(async()=>{if(confirm(Ce("Are you sure you'd like to reboot the server?")))try{ee.fetchApi("/easyuse/reboot")}catch(e){}})()}),e.unshift({content:`${Ce("Cleanup Of VRAM Usage")}`,callback:e=>bt()})),s.apply(this,[...arguments]);var o},LiteGraph.ContextMenu.prototype=s.prototype,LiteGraph.ContextMenu.prototype.addItem=Et}});class kt extends se{constructor(){super(),this.element.classList.add("easyuse-model-metadata")}show(e){super.show(te("div",Object.keys(e).map((t=>te("div",[te("label",{textContent:t}),te("span",{textContent:e[t]})])))))}}class xt extends se{constructor(e){super(),this.name=e,this.element.classList.add("easyuse-model-info")}get customNotes(){return this.metadata["easyuse.notes"]}set customNotes(e){this.metadata["easyuse.notes"]=e}get hash(){return this.metadata["easyuse.sha256"]}async show(e,t){this.type=e;const s=ee.fetchApi("/easyuse/metadata/"+encodeURIComponent(`${e}/${t}`));this.info=te("div",{style:{flex:"auto"}}),this.imgCurrent=0,this.imgList=te("div.easyuse-preview-list",{style:{display:"none"}}),this.imgWrapper=te("div.easyuse-preview",[te("div.easyuse-preview-group",[this.imgList])]),this.main=te("main",{style:{display:"flex"}},[this.imgWrapper,this.info]),this.content=te("div.easyuse-model-content",[te("div.easyuse-model-header",[te("h2",{textContent:this.name})]),this.main]);const o=te("div",{textContent:"ℹ️ Loading...",parent:this.content});super.show(this.content),this.metadata=await(await s).json(),this.viewMetadata.style.cursor=this.viewMetadata.style.opacity="",this.viewMetadata.removeAttribute("disabled"),o.remove(),this.addInfo()}createButtons(){const e=super.createButtons();return this.viewMetadata=te("button",{type:"button",textContent:"View raw metadata",disabled:"disabled",style:{opacity:.5,cursor:"not-allowed"},onclick:e=>{this.metadata&&(new kt).show(this.metadata)}}),e.unshift(this.viewMetadata),e}parseNote(){if(!this.customNotes)return[];let e=[];const t=new RegExp("(\\bhttps?:\\/\\/[^\\s]+)","g");let s,o=0;do{let n;s=t.exec(this.customNotes);let i=0;s?(n=s.index,i=s.index+s[0].length):n=this.customNotes.length;let a=this.customNotes.substring(o,n);a&&(a=a.replaceAll("\n","
"),e.push(te("span",{innerHTML:a}))),s&&e.push(te("a",{href:s[0],textContent:s[0],target:"_blank"})),o=i}while(s);return e}addInfoEntry(e,t){return te("p",{parent:this.info},["string"==typeof e?te("label",{textContent:e+": "}):e,"string"==typeof t?te("span",{textContent:t}):t])}async getCivitaiDetails(){const e=await fetch("https://civitai.com/api/v1/model-versions/by-hash/"+this.hash);if(200===e.status)return await e.json();throw 404===e.status?new Error("Model not found"):new Error(`Error loading info (${e.status}) ${e.statusText}`)}addCivitaiInfo(){const e=this.getCivitaiDetails(),t=te("span",{textContent:"ℹ️ Loading..."});return this.addInfoEntry(te("label",[te("img",{style:{width:"18px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),te("span",{textContent:"Civitai: "})]),t),e.then((e=>{var t,s;this.imgWrapper.style.display="block";let o=this.element.querySelector(".easyuse-model-header");o&&o.replaceChildren(te("h2",{textContent:this.name}),te("div.easyuse-model-header-remark",[te("h5",{textContent:Ce("Updated At:")+de(new Date(e.updatedAt),"yyyy/MM/dd")}),te("h5",{textContent:Ce("Created At:")+de(new Date(e.updatedAt),"yyyy/MM/dd")})]));let n=null,i=this.parseNote.call(this),a=Ce("✏️ Edit"),l=te("div.easyuse-model-detail-textarea",[te("p",(null==i?void 0:i.length)>0?i:{textContent:Ce("No notes")})]);if(i&&0!=i.length?l.classList.remove("empty"):l.classList.add("empty"),this.info.replaceChildren(te("div.easyuse-model-detail",[te("div.easyuse-model-detail-head.flex-b",[te("span",Ce("Notes")),te("a",{textContent:a,href:"#",style:{fontSize:"12px",float:"right",color:"var(--warning-color)",textDecoration:"none"},onclick:async e=>{if(e.preventDefault(),n){if(n.value!=this.customNotes){toast.showLoading(Ce("Saving Notes...")),this.customNotes=n.value;const e=await ee.fetchApi("/easyuse/metadata/notes/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:this.customNotes});if(toast.hideLoading(),200!==e.status)return toast.error(Ce("Saving Failed")),void alert(`Error saving notes (${e.status}) ${e.statusText}`);toast.success(Ce("Saving Succeed")),i=this.parseNote.call(this),l.replaceChildren(te("p",(null==i?void 0:i.length)>0?i:{textContent:Ce("No notes")})),n.value?l.classList.remove("empty"):l.classList.add("empty")}else l.replaceChildren(te("p",{textContent:Ce("No notes")})),l.classList.add("empty");e.target.textContent=a,n.remove(),n=null}else e.target.textContent="💾 Save",n=te("textarea",{placeholder:Ce("Type your notes here"),style:{width:"100%",minWidth:"200px",minHeight:"50px",height:"100px"},textContent:this.customNotes}),l.replaceChildren(n),n.focus()}})]),l]),te("div.easyuse-model-detail",[te("div.easyuse-model-detail-head",{textContent:Ce("Details")}),te("div.easyuse-model-detail-body",[te("div.easyuse-model-detail-item",[te("div.easyuse-model-detail-item-label",{textContent:Ce("Type")}),te("div.easyuse-model-detail-item-value",{textContent:e.model.type})]),te("div.easyuse-model-detail-item",[te("div.easyuse-model-detail-item-label",{textContent:Ce("BaseModel")}),te("div.easyuse-model-detail-item-value",{textContent:e.baseModel})]),te("div.easyuse-model-detail-item",[te("div.easyuse-model-detail-item-label",{textContent:Ce("Download")}),te("div.easyuse-model-detail-item-value",{textContent:(null==(t=e.stats)?void 0:t.downloadCount)||0})]),te("div.easyuse-model-detail-item",[te("div.easyuse-model-detail-item-label",{textContent:Ce("Trained Words")}),te("div.easyuse-model-detail-item-value",{textContent:(null==e?void 0:e.trainedWords.join(","))||"-"})]),te("div.easyuse-model-detail-item",[te("div.easyuse-model-detail-item-label",{textContent:Ce("Source")}),te("div.easyuse-model-detail-item-value",[te("label",[te("img",{style:{width:"14px",position:"relative",top:"3px",margin:"0 5px 0 0"},src:"https://civitai.com/favicon.ico"}),te("a",{href:"https://civitai.com/models/"+e.modelId,textContent:"View "+e.model.name,target:"_blank"})])])])])])),null==(s=e.images)?void 0:s.length){this.imgCurrent=0,this.isSaving=!1,e.images.map((e=>e.url&&this.imgList.appendChild(te("div.easyuse-preview-slide",[te("div.easyuse-preview-slide-content",[te("img",{src:e.url}),te("div.save",{textContent:"Save as preview",onclick:async()=>{if(this.isSaving)return;this.isSaving=!0,toast.showLoading(Ce("Saving Preview..."));const t=await(await fetch(e.url)).blob(),s="temp_preview."+new URL(e.url).pathname.split(".")[1],o=new FormData;o.append("image",new File([t],s)),o.append("overwrite","true"),o.append("type","temp");if(200!==(await ee.fetchApi("/upload/image",{method:"POST",body:o})).status)return this.isSaving=!1,toast.error(Ce("Saving Failed")),toast.hideLoading(),void alert(`Error saving preview (${req.status}) ${req.statusText}`);await ee.fetchApi("/easyuse/save/"+encodeURIComponent(`${this.type}/${this.name}`),{method:"POST",body:JSON.stringify({filename:s,type:"temp"}),headers:{"content-type":"application/json"}}).then((e=>{toast.success(Ce("Saving Succeed")),toast.hideLoading()})),this.isSaving=!1,app.refreshComboInNodes()}})])]))));let t=this;this.imgDistance=(-660*this.imgCurrent).toString(),this.imgList.style.display="",this.imgList.style.transform="translate3d("+this.imgDistance+"px, 0px, 0px)",this.slides=this.imgList.querySelectorAll(".easyuse-preview-slide"),this.slideLeftButton=te("button.left",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',onclick:()=>{e.images.length<=2||(t.imgList.classList.remove("no-transition"),0==t.imgCurrent?(t.imgCurrent=e.images.length/2-1,this.slides[this.slides.length-1].style.transform="translate3d("+(-660*(this.imgCurrent+1)).toString()+"px, 0px, 0px)",this.slides[this.slides.length-2].style.transform="translate3d("+(-660*(this.imgCurrent+1)).toString()+"px, 0px, 0px)",t.imgList.style.transform="translate3d(660px, 0px, 0px)",setTimeout((e=>{this.slides[this.slides.length-1].style.transform="translate3d(0px, 0px, 0px)",this.slides[this.slides.length-2].style.transform="translate3d(0px, 0px, 0px)",t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)",t.imgList.classList.add("no-transition")}),500)):(t.imgCurrent=t.imgCurrent-1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"))}}),this.slideRightButton=te("button.right",{parent:this.imgWrapper,style:{display:e.images.length<=2?"none":"block"},innerHTML:'',onclick:()=>{if(!(e.images.length<=2))if(t.imgList.classList.remove("no-transition"),t.imgCurrent>=e.images.length/2-1){t.imgCurrent=0;const s=e.images.length/2;this.slides[0].style.transform="translate3d("+(660*s).toString()+"px, 0px, 0px)",this.slides[1].style.transform="translate3d("+(660*s).toString()+"px, 0px, 0px)",t.imgList.style.transform="translate3d("+(-660*s).toString()+"px, 0px, 0px)",setTimeout((e=>{this.slides[0].style.transform="translate3d(0px, 0px, 0px)",this.slides[1].style.transform="translate3d(0px, 0px, 0px)",t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)",t.imgList.classList.add("no-transition")}),500)}else t.imgCurrent=t.imgCurrent+1,t.imgDistance=(-660*this.imgCurrent).toString(),t.imgList.style.transform="translate3d("+t.imgDistance+"px, 0px, 0px)"}})}return e.description&&te("div",{parent:this.content,innerHTML:e.description,style:{marginTop:"10px"}}),e})).catch((e=>{this.imgWrapper.style.display="none",t.textContent="⚠️ "+e.message})).finally((e=>{}))}}class It extends xt{async addInfo(){await this.addCivitaiInfo()}}class Nt extends xt{getTagFrequency(){if(!this.metadata.ss_tag_frequency)return[];const e=JSON.parse(this.metadata.ss_tag_frequency),t={};for(const s in e){const o=e[s];for(const e in o)e in t?t[e]+=o[e]:t[e]=o[e]}return Object.entries(t).sort(((e,t)=>t[1]-e[1]))}getResolutions(){let e=[];if(this.metadata.ss_bucket_info){const t=JSON.parse(this.metadata.ss_bucket_info);if(null==t?void 0:t.buckets)for(const{resolution:s,count:o}of Object.values(t.buckets))e.push([o,`${s.join("x")} * ${o}`])}e=e.sort(((e,t)=>t[0]-e[0])).map((e=>e[1]));let t=this.metadata.ss_resolution;if(t){const s=t.split(","),o=s[0].replace("(",""),n=s[1].replace(")","");e.push(`${o.trim()}x${n.trim()} (Base res)`)}else(t=this.metadata["modelspec.resolution"])&&e.push(t+" (Base res");return e.length||e.push("⚠️ Unknown"),e}getTagList(e){return e.map((e=>te("li.easyuse-model-tag",{dataset:{tag:e[0]},$:e=>{e.onclick=()=>{e.classList.toggle("easyuse-model-tag--selected")}}},[te("p",{textContent:e[0]}),te("span",{textContent:e[1]})])))}addTags(){let e,t=this.getTagFrequency();if(null==t?void 0:t.length){const s=t.length;let o;s>500&&(t=t.slice(0,500),e=te("p",[te("span",{textContent:"⚠️ Only showing first 500 tags "}),te("a",{href:"#",textContent:`Show all ${s}`,onclick:()=>{o.replaceChildren(...this.getTagList(this.getTagFrequency())),e.remove()}})])),o=te("ol.easyuse-model-tags-list",this.getTagList(t)),this.tags=te("div",[o])}else this.tags=te("p",{textContent:"⚠️ No tag frequency metadata found"});this.content.append(this.tags),e&&this.content.append(e)}async addInfo(){const e=this.addCivitaiInfo();this.addTags();const t=await e;t&&te("div",{parent:this.content,innerHTML:t.description,style:{maxHeight:"250px",overflow:"auto"}})}createButtons(){const e=super.createButtons();function t(e,t){const s=te("textarea",{parent:document.body,style:{position:"fixed"},textContent:t.map((e=>e.dataset.tag)).join(", ")});s.select();try{document.execCommand("copy"),e.target.dataset.text||(e.target.dataset.text=e.target.textContent),e.target.textContent="Copied "+t.length+" tags",setTimeout((()=>{e.target.textContent=e.target.dataset.text}),1e3)}catch(o){prompt("Copy to clipboard: Ctrl+C, Enter",text)}finally{document.body.removeChild(s)}}return e.unshift(te("button",{type:"button",textContent:"Copy Selected",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag--selected")])}}),te("button",{type:"button",textContent:"Copy All",onclick:e=>{t(e,[...this.tags.querySelectorAll(".easyuse-model-tag")])}})),e}}const Tt=["easy fullLoader","easy a1111Loader","easy comfyLoader","easy kolorsLoader","easy hunyuanDiTLoader","easy pixArtLoader"],Ot=["easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingLayerDiffusion","easy fullkSampler"],Dt=["KSamplerSelect","SamplerEulerAncestral","SamplerEulerAncestralCFG++","SamplerLMS","SamplerDPMPP_3M_SDE","SamplerDPMPP_2M_SDE","SamplerDPMPP_SDE","SamplerDPMAdaptative","SamplerLCMUpscale","SamplerTCD","SamplerTCD EulerA"],Rt=["BasicScheduler","KarrasScheduler","ExponentialScheduler","PolyexponentialScheduler","VPScheduler","BetaSamplingScheduler","SDTurboScheduler","SplitSigmas","SplitSigmasDenoise","FlipSigmas","AlignYourStepsScheduler","GITSScheduler"],Mt=["easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerLayerDiffusion"],Gt=["easy controlnetLoader","easy controlnetLoaderADV","easy controlnetLoader++","easy instantIDApply","easy instantIDApplyADV"],Pt=["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition","easy ipadapterApplyFromParams","easy pulIDApply","easy pulIDApplyADV"],Bt=["easy positive","easy wildcards"],Ft=["easy loadImageBase64","LoadImage","LoadImageMask"],Ut=["easy applyBrushNet","easy applyPowerPaint","easy applyInpaint"],zt={positive_prompt:{text:"positive",positive:"text"},loaders:{ckpt_name:"ckpt_name",vae_name:"vae_name",clip_skip:"clip_skip",lora_name:"lora_name",resolution:"resolution",empty_latent_width:"empty_latent_width",empty_latent_height:"empty_latent_height",positive:"positive",negative:"negative",batch_size:"batch_size",a1111_prompt_style:"a1111_prompt_style"},preSampling:{steps:"steps",cfg:"cfg",cfg_scale_min:"cfg",sampler_name:"sampler_name",scheduler:"scheduler",denoise:"denoise",seed_num:"seed_num",seed:"seed"},kSampler:{image_output:"image_output",save_prefix:"save_prefix",link_id:"link_id"},controlnet:{control_net_name:"control_net_name",strength:["strength","cn_strength"],scale_soft_weights:["scale_soft_weights","cn_soft_weights"],cn_strength:["strength","cn_strength"],cn_soft_weights:["scale_soft_weights","cn_soft_weights"]},ipadapter:{preset:"preset",lora_strength:"lora_strength",provider:"provider",weight:"weight",weight_faceidv2:"weight_faceidv2",start_at:"start_at",end_at:"end_at",cache_mode:"cache_mode",use_tiled:"use_tiled",insightface:"insightface",pulid_file:"pulid_file"},load_image:{image:"image",base64_data:"base64_data",channel:"channel"},inpaint:{dtype:"dtype",fitting:"fitting",function:"function",scale:"scale",start_at:"start_at",end_at:"end_at"},sampler:{},sigmas:{}},jt={loaders:{optional_lora_stack:"optional_lora_stack",positive:"positive",negative:"negative"},preSampling:{pipe:"pipe",image_to_latent:"image_to_latent",latent:"latent"},kSampler:{pipe:"pipe",model:"model"},controlnet:{pipe:"pipe",image:"image",image_kps:"image_kps",control_net:"control_net",positive:"positive",negative:"negative",mask:"mask"},positive_prompt:{},ipadapter:{model:"model",image:"image",image_style:"image",attn_mask:"attn_mask",optional_ipadapter:"optional_ipadapter"},inpaint:{pipe:"pipe",image:"image",mask:"mask"},sampler:{},sigmas:{}},Ht={loaders:{pipe:"pipe",model:"model",vae:"vae",clip:null,positive:null,negative:null,latent:null},preSampling:{pipe:"pipe"},kSampler:{pipe:"pipe",image:"image"},controlnet:{pipe:"pipe",positive:"positive",negative:"negative"},positive_prompt:{text:"positive",positive:"text"},load_image:{IMAGE:"IMAGE",MASK:"MASK"},ipadapter:{model:"model",tiles:"tiles",masks:"masks",ipadapter:"ipadapter"},inpaint:{pipe:"pipe"},sampler:{SAMPLER:"SAMPLER"},sigmas:{SIGMAS:"SIGMAS"}};function Wt(e,t,s){return function(){!function(e,t,s){const o=LiteGraph.createNode(t);if(o){if($.graph.add(o),o.pos=e.pos.slice(),o.size=e.size.slice(),e.widgets.forEach((e=>{if(zt[s][e.name]){const n=zt[s][e.name];if(n){const s=(t=n,o.widgets.find((e=>"object"==typeof t?t.includes(e.name):e.name===t)));s&&(s.value=e.value,"seed_num"==e.name&&(s.linkedWidgets[0].value=e.linkedWidgets[0].value),"converted-widget"==e.type&&Jt(o,s,e))}}var t})),e.inputs&&e.inputs.forEach(((t,n)=>{if(t&&t.link&&jt[s][t.name]){const n=jt[s][t.name];if(null===n)return;const i=o.findInputSlot(n);if(-1!==i){const s=e.graph.links[t.link];if(s){const t=e.graph.getNodeById(s.origin_id);t&&t.connect(s.origin_slot,o,i)}}}})),e.outputs&&e.outputs.forEach(((t,n)=>{if(t&&t.links&&Ht[s]&&Ht[s][t.name]){const n=Ht[s][t.name];if(null===n)return;const i=o.findOutputSlot(n);-1!==i&&t.links.forEach((t=>{const s=e.graph.links[t];if(s){const t=e.graph.getNodeById(s.target_id);t&&o.connect(i,t,s.target_slot)}}))}})),$.graph.remove(e),"easy fullkSampler"==o.type){const e=o.outputs[0].links;if(e&&e[0]){const t=$.graph._nodes.find((t=>t.inputs&&t.inputs[0]&&t.inputs[0].link==e[0]));t&&$.graph.remove(t)}}else if(Ot.includes(o.type)){const e=o.outputs[0].links;if(!e||!e[0]){const e=LiteGraph.createNode("easy kSampler");$.graph.add(e),e.pos=o.pos.slice(),e.pos[0]=e.pos[0]+o.size[0]+20;const t=o.findInputSlot("pipe");-1!==t&&o&&o.connect(0,e,t)}}o.setSize([o.size[0],o.computeSize()[1]])}}(e,t,s)}}const Yt=(e,t)=>{const s=e.prototype.getExtraMenuOptions;e.prototype.getExtraMenuOptions=function(){const e=s.apply(this,arguments);return t.apply(this,arguments),e}},Vt=(e,t,s,o,n=!0)=>{Yt(o,(function(o,i){i.unshift({content:e,has_submenu:n,callback:(e,o,n,i,a)=>Zt(e,o,n,i,a,t,s)}),"loaders"==t&&(i.unshift({content:Ce("💎 View Lora Info..."),callback:(e,t,s,o,n)=>{let i=n.widgets.find((e=>"lora_name"==e.name)).value;i&&"None"!=i&&new Nt(i).show("loras",i)}}),i.unshift({content:Ce("💎 View Checkpoint Info..."),callback:(e,t,s,o,n)=>{let i=n.widgets[0].value;i&&"None"!=i&&new It(i).show("checkpoints",i)}}))}))},Zt=(e,t,s,o,n,i,a)=>{const l=[];return a.map((e=>{n.type!==e&&l.push({content:`${e}`,callback:Wt(n,e,i)})})),new LiteGraph.ContextMenu(l,{event:s,callback:null,parentMenu:o,node:n}),!1},Xt="converted-widget",Qt=Symbol();function Kt(e,t,s=""){if(t.origType=t.type,t.origComputeSize=t.computeSize,t.origSerializeValue=t.serializeValue,t.computeSize=()=>[0,-4],t.type=Xt+s,t.serializeValue=()=>{if(!e.inputs)return;let s=e.inputs.find((e=>{var s;return(null==(s=e.widget)?void 0:s.name)===t.name}));return s&&s.link?t.origSerializeValue?t.origSerializeValue():t.value:void 0},t.linkedWidgets)for(const o of t.linkedWidgets)Kt(e,o,":"+t.name)}function Jt(e,t,s){Kt(e,t);const{type:o}=function(e){let t=e[0];t instanceof Array&&(t="COMBO");return{type:t}}(s),n=e.size;t.options&&t.options.forceInput||e.addInput(t.name,o,{widget:{name:t.name,[Qt]:()=>s}});for(const i of e.widgets)i.last_y+=LiteGraph.NODE_SLOT_HEIGHT;e.setSize([Math.max(n[0],e.size[0]),Math.max(n[1],e.size[1])])}const qt=function(e){var t,s,o,n;const i=e.constructor.type,a=e.properties.origVals||{},l=a.title||e.title,r=a.color||e.color,d=a.bgcolor||e.bgcolor,u=e,c={size:[...e.size],color:r,bgcolor:d,pos:[...e.pos]};let p=[],h=[];if(e.inputs)for(const b of e.inputs)if(b.link){const t=b.name,s=e.findInputSlot(t),o=e.getInputNode(s),n=e.getInputLink(s);p.push([n.origin_slot,o,t])}if(e.outputs)for(const b of e.outputs)if(b.links){const e=b.name;for(const t of b.links){const s=graph.links[t],o=graph._nodes_by_id[s.target_id];h.push([e,o,s.target_slot])}}$.graph.remove(e);const m=$.graph.add(LiteGraph.createNode(i,l,c));function g(){if(u.widgets)for(let e of u.widgets)if("converted-widget"===e.type){const t=m.widgets.find((t=>t.name===e.name));for(let s of u.inputs)s.name===e.name&&Jt(m,t,s.widget)}for(let e of p){const[t,s,o]=e;s.connect(t,m.id,o)}for(let e of h){const[t,s,o]=e;m.connect(t,s,o)}}let f=u.widgets_values;if(!f&&(null==(t=m.widgets)?void 0:t.length)>0)return m.widgets.forEach(((e,t)=>{const s=u.widgets[t];e.name===s.name&&e.type===s.type&&(e.value=s.value)})),void g();const y=(null==f?void 0:f.length)<=(null==(s=m.widgets)?void 0:s.length);let v=y?0:f.length-1;function _(e,t){var s,o,n,i,a,l;if(!0===e||!1===e){if((null==(s=t.options)?void 0:s.on)&&(null==(o=t.options)?void 0:o.off))return{value:e,pass:!0}}else if("number"==typeof e){if((null==(n=t.options)?void 0:n.min)<=e&&e<=(null==(i=t.options)?void 0:i.max))return{value:e,pass:!0}}else{if(null==(l=null==(a=t.options)?void 0:a.values)?void 0:l.includes(e))return{value:e,pass:!0};if(t.inputEl&&"string"==typeof e)return{value:e,pass:!0}}return{value:t.value,pass:!1}}const w=e=>{var t;const s=u.widgets[e];let o=m.widgets[e];if(o.name===s.name&&o.type===s.type){for(;y?v=0;){let{value:e,pass:t}=_(f[v],o);if(t&&null!==e){o.value=e;break}v+=y?1:-1}v++,y||(v=f.length-((null==(t=m.widgets)?void 0:t.length)-1-e))}};if(y&&(null==(o=m.widgets)?void 0:o.length)>0)for(let b=0;b0)for(let b=m.widgets.length-1;b>=0;b--)w(b);g()};$.registerExtension({name:"Comfy.EasyUse.ExtraMenu",async beforeRegisterNodeDef(e,t,s){Yt(e,(function(e,s){s.unshift({content:Ce("🔃 Reload Node"),callback:(e,t,s,o,n)=>{let i=LGraphCanvas.active_canvas;if(!i.selected_nodes||Object.keys(i.selected_nodes).length<=1)qt(n);else for(let a in i.selected_nodes)qt(i.selected_nodes[a])}}),"easy ckptNames"==t.name&&s.unshift({content:Ce("💎 View Checkpoint Info..."),callback:(e,t,s,o,n)=>{n.widgets[0].value}})})),Bt.includes(t.name)&&Vt("↪️ Swap EasyPrompt","positive_prompt",Bt,e),Tt.includes(t.name)&&Vt("↪️ Swap EasyLoader","loaders",Tt,e),Ot.includes(t.name)&&Vt("↪️ Swap EasyPreSampling","preSampling",Ot,e),Mt.includes(t.name)&&Vt("↪️ Swap EasyKSampler","preSampling",Mt,e),Dt.includes(t.name)&&Vt("↪️ Swap Custom Sampler","sampler",Dt,e),Rt.includes(t.name)&&Vt("↪️ Swap Custom Sigmas","sigmas",Rt,e),Gt.includes(t.name)&&Vt("↪️ Swap EasyControlnet","controlnet",Gt,e),Pt.includes(t.name)&&Vt("↪️ Swap EasyAdapater","ipadapter",Pt,e),Ft.includes(t.name)&&Vt("↪️ Swap LoadImage","load_image",Ft,e),Ut.includes(t.name)&&Vt("↪️ Swap InpaintNode","inpaint",Ut,e)}});const $t="➡️";$.registerExtension({name:"easy setNode",registerCustomNodes(){class e{constructor(){y(this,"defaultVisibility",!0),y(this,"serialize_widgets",!0),this.properties||(this.properties={previousName:""}),this.properties.showOutputText=e.defaultVisibility;const t=this;t.color=LGraphCanvas.node_colors.blue.color,this.addWidget("text","Constant","",((e,s,o,n,i)=>{t.validateName(t.graph),""!==this.widgets[0].value&&(this.title=$t+this.widgets[0].value),this.update(),this.properties.previousName=this.widgets[0].value}),{}),this.addInput("*","*"),this.onConnectionsChange=function(e,s,o,n,i){if(1!=e||o||(this.inputs[s].type="*",this.inputs[s].name="*",this.title="Set"),n&&t.graph&&1==e&&o){const e=t.graph._nodes.find((e=>e.id==n.origin_id)).outputs[n.origin_slot],s=e.type,o=t.is_auto_link?this.widgets[0].value:e.name;"Set"===this.title&&(this.title=$t+o,this.widgets[0].value=o),"*"===this.widgets[0].value&&(this.widgets[0].value=o),this.validateName(t.graph),this.inputs[0].type=s,this.inputs[0].name=o,setTimeout((e=>{this.title=$t+this.widgets[0].value}),1)}this.update()},this.validateName=function(e){let s=t.widgets[0].value;if(""!=s){let o=0,n=[];do{n=e._nodes.filter((e=>e!=this&&("easy setNode"==e.type&&e.widgets[0].value===s))),n.length>0&&(s=t.widgets[0].value+o),o++}while(n.length>0);t.widgets[0].value=s,this.update()}},this.clone=function(){const t=e.prototype.clone.apply(this);return t.inputs[0].name="*",t.inputs[0].type="*",t.properties.previousName="",t.size=t.computeSize(),t},this.onAdded=function(e){this.validateName(e)},this.update=function(){if(t.graph){this.findGetters(t.graph).forEach((e=>{e.setType(this.inputs[0].type)})),this.widgets[0].value&&this.findGetters(t.graph,!0).forEach((e=>{e.setName(this.widgets[0].value)}));t.graph._nodes.filter((e=>"easy getNode"==e.type)).forEach((e=>{e.setComboValues&&e.setComboValues()}))}},this.findGetters=function(e,t){const s=t?this.properties.previousName:this.widgets[0].value;return e._nodes.filter((e=>"easy getNode"==e.type&&e.widgets[0].value===s&&""!=s))},this.isVirtualNode=!0}onRemoved(){this.graph._nodes.filter((e=>"easy getNode"==e.type)).forEach((e=>{e.setComboValues&&e.setComboValues([this])}))}}LiteGraph.registerNodeType("easy setNode",Object.assign(e,{title:"Set"})),e.category="EasyUse/Util"}}),$.registerExtension({name:"easy getNode",registerCustomNodes(){class e{constructor(){y(this,"defaultVisibility",!0),y(this,"serialize_widgets",!0),this.properties||(this.properties={}),this.properties.showOutputText=e.defaultVisibility;const t=this;t.color=LGraphCanvas.node_colors.blue.color,this.addWidget("combo","Constant","",(e=>{this.onRename()}),{values:()=>t.graph._nodes.filter((e=>"easy setNode"==e.type)).map((e=>e.widgets[0].value)).sort()}),this.addOutput("*","*"),this.onConnectionsChange=function(e,t,s,o,n){this.validateLinks(),2!=e||s?(this.onRename(),setTimeout((e=>{this.title="⬅️"+this.widgets[0].value}),1)):(this.outputs[t].type="*",this.outputs[t].name="*",this.title="Get")},this.setName=function(e){t.widgets[0].value=e,t.onRename(),t.serialize()},this.onRename=function(e=0){const s=this.findSetter(t.graph);if(s){const t=s.inputs[0].type,o=s.inputs[0].name;this.setType(t,o),this.outputs[e].type=t,this.outputs[e].name=o,this.title="⬅️"+s.widgets[0].value}else this.setType("*","*"),this.outputs[e].type="*",this.outputs[e].name="*"},this.clone=function(){const t=e.prototype.clone.apply(this);return t.size=t.computeSize(),t},this.validateLinks=function(){"*"!=this.outputs[0].type&&this.outputs[0].links&&this.outputs[0].links.forEach((e=>{const s=t.graph.links[e];s&&s.type!=this.outputs[0].type&&"*"!=s.type&&t.graph.removeLink(e)}))},this.setType=function(e,t){this.outputs[0].name=t,this.outputs[0].type=e,this.validateLinks()},this.findSetter=function(e){const t=this.widgets[0].value;return e._nodes.find((e=>"easy setNode"==e.type&&e.widgets[0].value===t&&""!=t))},this.isVirtualNode=!0}getInputLink(e){const t=this.findSetter(this.graph);if(t){const s=t.inputs[e];return this.graph.links[s.link]}throw new Error("No setter found for "+this.widgets[0].value+"("+this.type+")")}onAdded(e){}}LiteGraph.registerNodeType("easy getNode",Object.assign(e,{title:"Get"})),e.category="EasyUse/Util"}}),ee.addEventListener("easyuse-global-seed",(function(e){let t=app.graph._nodes_by_id;for(let s in t){let o=t[s];if("easy globalSeed"==o.type){if(o.widgets){const t=o.widgets.find((e=>"value"==e.name));o.widgets.find((e=>"last_seed"==e.name)).value=t.value,t.value=e.detail.value}}else if(o.widgets){const t=o.widgets.find((e=>"seed_num"==e.name||"seed"==e.name||"noise_seed"==e.name));t&&null!=e.detail.seed_map[o.id]&&(t.value=e.detail.seed_map[o.id])}}}));const es=ee.queuePrompt;ee.queuePrompt=async function(e,{output:t,workflow:s}){s.seed_widgets={};for(let o in app.graph._nodes_by_id){let e=app.graph._nodes_by_id[o].widgets;if(e)for(let t in e)"seed_num"!=e[t].name&&"seed"!=e[t].name&&"noise_seed"!=e[t].name||"converted-widget"==e[t].type||(s.seed_widgets[o]=parseInt(t))}return await es.call(ee,e,{output:t,workflow:s})};const ts=["easy imageSave","easy fullkSampler","easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo","easy detailerFix"];$.registerExtension({name:"Comfy.EasyUse.SaveImageExtraOutput",async beforeRegisterNodeDef(e,t,s){if(ts.includes(t.name)){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0,o=this.widgets.find((e=>"filename_prefix"===e.name||"save_prefix"===e.name));return o.serializeValue=()=>ne(s,o.value),e}}else{const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=function(){const e=t?t.apply(this,arguments):void 0;return this.properties&&"Node name for S&R"in this.properties||this.addProperty("Node name for S&R",this.constructor.type,"string"),e}}}});const ss=["easy wildcards","easy positive","easy negative","easy stylesSelector","easy promptConcat","easy promptReplace"],os=["easy preSampling","easy preSamplingAdvanced","easy preSamplingNoiseIn","easy preSamplingCustom","easy preSamplingDynamicCFG","easy preSamplingSdTurbo","easy preSamplingLayerDiffusion"],ns=["easy kSampler","easy kSamplerTiled","easy kSamplerInpainting","easy kSamplerDownscaleUnet","easy kSamplerSDTurbo"],is=["easy controlnetLoader","easy controlnetLoaderADV"],as=["easy instantIDApply","easy instantIDApplyADV"],ls=["easy ipadapterApply","easy ipadapterApplyADV","easy ipadapterApplyFaceIDKolors","easy ipadapterStyleComposition"],rs=["easy pipeIn","easy pipeOut","easy pipeEdit"],ds=["easy XYPlot","easy XYPlotAdvanced"],us=["easy setNode"],cs=["Reroute","RescaleCFG","LoraLoaderModelOnly","LoraLoader","FreeU","FreeU_v2",...ls,...us],ps={"easy seed":{from:{INT:["Reroute",...os,"easy fullkSampler"]}},"easy positive":{from:{STRING:["Reroute",...ss]}},"easy negative":{from:{STRING:["Reroute",...ss]}},"easy wildcards":{from:{STRING:["Reroute","easy showAnything",...ss]}},"easy stylesSelector":{from:{STRING:["Reroute","easy showAnything",...ss]}},"easy promptConcat":{from:{STRING:["Reroute","easy showAnything",...ss]}},"easy promptReplace":{from:{STRING:["Reroute","easy showAnything",...ss]}},"easy fullLoader":{from:{PIPE_LINE:["Reroute",...os,"easy fullkSampler",...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy a1111Loader":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy comfyLoader":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy hunyuanDiTLoader":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy kolorsLoader":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy pixArtLoader":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy svdLoader":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy zero123Loader":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy sv3dLoader":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced","easy preSamplingDynamicCFG",...rs,...us],MODEL:cs},to:{STRING:["Reroute",...ss]}},"easy preSampling":{from:{PIPE_LINE:["Reroute",...ns,...rs,...is,...ds,...us]}},"easy preSamplingAdvanced":{from:{PIPE_LINE:["Reroute",...ns,...rs,...is,...ds,...us]}},"easy preSamplingDynamicCFG":{from:{PIPE_LINE:["Reroute",...ns,...rs,...is,...ds,...us]}},"easy preSamplingCustom":{from:{PIPE_LINE:["Reroute",...ns,...rs,...is,...ds,...us]}},"easy preSamplingLayerDiffusion":{from:{PIPE_LINE:["Reroute","easy kSamplerLayerDiffusion",...ns,...rs,...is,...ds,...us]}},"easy preSamplingNoiseIn":{from:{PIPE_LINE:["Reroute",...ns,...rs,...is,...ds,...us]}},"easy fullkSampler":{from:{PIPE_LINE:["Reroute",...rs.reverse(),"easy preDetailerFix","easy preMaskDetailerFix",...os,...us]}},"easy kSampler":{from:{PIPE_LINE:["Reroute",...rs.reverse(),"easy preDetailerFix","easy preMaskDetailerFix","easy hiresFix",...os,...us]}},"easy controlnetLoader":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us]}},"easy controlnetLoaderADV":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us]}},"easy instantIDApply":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us],MODEL:cs},to:{COMBO:["Reroute","easy promptLine"]}},"easy instantIDApplyADV":{from:{PIPE_LINE:["Reroute",...os,...is,...as,...rs,...us],MODEL:cs},to:{COMBO:["Reroute","easy promptLine"]}},"easy ipadapterApply":{to:{COMBO:["Reroute","easy promptLine"]}},"easy ipadapterApplyADV":{to:{STRING:["Reroute","easy sliderControl",...ss],COMBO:["Reroute","easy promptLine"]}},"easy ipadapterStyleComposition":{to:{COMBO:["Reroute","easy promptLine"]}},"easy preDetailerFix":{from:{PIPE_LINE:["Reroute","easy detailerFix",...rs,...us]},to:{PIPE_LINE:["Reroute","easy ultralyticsDetectorPipe","easy samLoaderPipe","easy kSampler","easy fullkSampler"]}},"easy preMaskDetailerFix":{from:{PIPE_LINE:["Reroute","easy detailerFix",...rs,...us]}},"easy samLoaderPipe":{from:{PIPE_LINE:["Reroute","easy preDetailerFix",...rs,...us]}},"easy ultralyticsDetectorPipe":{from:{PIPE_LINE:["Reroute","easy preDetailerFix",...rs,...us]}},"easy cascadeLoader":{from:{PIPE_LINE:["Reroute","easy fullCascadeKSampler","easy preSamplingCascade",...is,...rs,...us],MODEL:cs.filter((e=>!ls.includes(e)))}},"easy fullCascadeKSampler":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced",...rs,...us]}},"easy preSamplingCascade":{from:{PIPE_LINE:["Reroute","easy cascadeKSampler",...rs,...us]}},"easy cascadeKSampler":{from:{PIPE_LINE:["Reroute","easy preSampling","easy preSamplingAdvanced",...rs,...us]}}};$.registerExtension({name:"Comfy.EasyUse.Suggestions",async setup(e){LGraphCanvas.prototype.createDefaultNodeForSlot=function(e){e=e||{};var t,s=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,position:[],nodeType:null,posAdd:[0,0],posSizeFix:[0,0]},e),o=s.nodeFrom&&null!==s.slotFrom,n=!o&&s.nodeTo&&null!==s.slotTo;if(!o&&!n)return!1;if(!s.nodeType)return!1;var i=o?s.nodeFrom:s.nodeTo,a=o?s.slotFrom:s.slotTo,l=i.type,r=!1;switch(typeof a){case"string":r=o?i.findOutputSlot(a,!1):i.findInputSlot(a,!1),a=o?i.outputs[a]:i.inputs[a];break;case"object":r=o?i.findOutputSlot(a.name):i.findInputSlot(a.name);break;case"number":r=a,a=o?i.outputs[a]:i.inputs[a];break;default:return!1}var d=a.type==LiteGraph.EVENT?"_event_":a.type,u=o?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in;if(u&&u[d]){a.link;let e=!1;const n=o?"from":"to";if(ps[l]&&ps[l][n]&&(null==(t=ps[l][n][d])?void 0:t.length)>0){for(var c in ps[l][n][d])if(s.nodeType==ps[l][n][d][c]||"AUTO"==s.nodeType){e=ps[l][n][d][c];break}}else if("object"==typeof u[d]||"array"==typeof u[d]){for(var c in u[d])if(s.nodeType==u[d][c]||"AUTO"==s.nodeType){e=u[d][c];break}}else s.nodeType!=u[d]&&"AUTO"!=s.nodeType||(e=u[d]);if(e){var p=!1;"object"==typeof e&&e.node&&(p=e,e=e.node);var h=LiteGraph.createNode(e);if(h){if(p){if(p.properties)for(var m in p.properties)h.addProperty(m,p.properties[m]);if(p.inputs)for(var m in h.inputs=[],p.inputs)h.addOutput(p.inputs[m][0],p.inputs[m][1]);if(p.outputs)for(var m in h.outputs=[],p.outputs)h.addOutput(p.outputs[m][0],p.outputs[m][1]);p.title&&(h.title=p.title),p.json&&h.configure(p.json)}return this.graph.add(h),h.pos=[s.position[0]+s.posAdd[0]+(s.posSizeFix[0]?s.posSizeFix[0]*h.size[0]:0),s.position[1]+s.posAdd[1]+(s.posSizeFix[1]?s.posSizeFix[1]*h.size[1]:0)],o?s.nodeFrom.connectByType(r,h,d):s.nodeTo.connectByTypeOutput(r,h,d),!0}}}return!1},LGraphCanvas.prototype.showConnectionMenu=function(e){e=e||{};var t,s=Object.assign({nodeFrom:null,slotFrom:null,nodeTo:null,slotTo:null,e:null},e),o=this,n=s.nodeFrom&&s.slotFrom,i=!n&&s.nodeTo&&s.slotTo;if(!n&&!i)return!1;var a=n?s.nodeFrom:s.nodeTo,l=n?s.slotFrom:s.slotTo,r=!1;switch(typeof l){case"string":r=n?a.findOutputSlot(l,!1):a.findInputSlot(l,!1),l=n?a.outputs[l]:a.inputs[l];break;case"object":r=n?a.findOutputSlot(l.name):a.findInputSlot(l.name);break;case"number":r=l,l=n?a.outputs[l]:a.inputs[l];break;default:return!1}var d=["Add Node",null];o.allow_searchbox&&(d.push("Search"),d.push(null));var u=l.type==LiteGraph.EVENT?"_event_":l.type,c=n?LiteGraph.slot_types_default_out:LiteGraph.slot_types_default_in,p=a.type;if(c&&c[u]){const e=n?"from":"to";if(ps[p]&&ps[p][e]&&(null==(t=ps[p][e][u])?void 0:t.length)>0)for(var h in ps[p][e][u])d.push(ps[p][e][u][h]);else if("object"==typeof c[u]||"array"==typeof c[u])for(var h in c[u])d.push(c[u][h]);else d.push(c[u])}var m=new LiteGraph.ContextMenu(d,{event:s.e,title:(l&&""!=l.name?l.name+(u?" | ":""):"")+(l&&u?u:""),callback:function(e,t,i){switch(e){case"Add Node":LGraphCanvas.onMenuAdd(null,null,i,m,(function(e){n?s.nodeFrom.connectByType(r,e,u):s.nodeTo.connectByTypeOutput(r,e,u)}));break;case"Search":n?o.showSearchBox(i,{node_from:s.nodeFrom,slot_from:l,type_filter_in:u}):o.showSearchBox(i,{node_to:s.nodeTo,slot_from:l,type_filter_out:u});break;default:o.createDefaultNodeForSlot(Object.assign(s,{position:[s.e.canvasX,s.e.canvasY],nodeType:e}))}}});return!1}}}),$.registerExtension({name:"Comfy.EasyUse.TimeTaken",setup(){const e=new Map;let t=0;ee.addEventListener("executing",(s=>{if(!le("EasyUse.Nodes.Runtime",null,!0))return;const o=(null==s?void 0:s.node)||(null==s?void 0:s.detail)||null,n=Je(o);n&&(n.executionDuration="");const i=e.get(t);if(e.delete(t),t&&i){const e=Date.now()-i,s=Je(t);s&&(s.executionDuration=`${(e/1e3).toFixed(2)}${Ce("s")}`)}t=o,e.set(o,Date.now())}))},beforeRegisterNodeDef(e,t){const s=e.prototype.onDrawForeground;e.prototype.onDrawForeground=function(...e){const[t]=e;return function(e,t){if(!t)return;e.save(),e.fillStyle=LiteGraph.NODE_DEFAULT_BGCOLOR,function(e,t,s,o,n,i){e.beginPath(),e.moveTo(t+i,s),e.lineTo(t+o-i,s),e.arcTo(t+o,s,t+o,s+i,i),e.lineTo(t+o,s+n-i),e.arcTo(t+o,s+n,t+o-i,s+n,i),e.lineTo(t+i,s+n),e.arcTo(t,s+n,t,s+n-i,i),e.lineTo(t,s+i),e.arcTo(t,s,t+i,s,i),e.closePath()}(e,0,-LiteGraph.NODE_TITLE_HEIGHT-20,e.measureText(t).width+10,LiteGraph.NODE_TITLE_HEIGHT-10,4),e.fill(),function(e,t,s,o,n="#000",i=12,a="Inter"){e.font=`${i}px ${a}`,e.fillStyle=n,e.fillText(t,s,o)}(e,t,8,-LiteGraph.NODE_TITLE_HEIGHT-6,LiteGraph.NODE_TITLE_COLOR),e.restore()}(t,this.executionDuration||""),null==s?void 0:s.apply(this,e)}}});let hs=null;$.registerExtension({name:"Comfy.EasyUse.HotKeys",setup(){if(void 0!==w){w("up,down,left,right",(function(e,t){var s,o,n,i,a,l,r,d,u,c,p,h,m,g,f;e.preventDefault();if(!le("EasyUse.Hotkeys.JumpNearestNodes",null,!0))return;const y=qe();if(0===y.length)return;const v=y[0];switch(t.key){case"up":case"left":let e=null;if(nt(v)){const e=null==(s=v.widgets_values)?void 0:s[0],t=null==(o=v.graph)?void 0:o._nodes,n=null==t?void 0:t.find((t=>{var s;if(it(t)){if((null==(s=t.widgets_values)?void 0:s[0])===e)return t}return null}));n&&et(n)}else if((null==(n=v.inputs)?void 0:n.length)>0){for(let t=0;t{var s;if(nt(t)){if((null==(s=t.widgets_values)?void 0:s[0])===e)return t}return null}));s&&et(s)}else if((null==(c=v.outputs)?void 0:c.length)>0){for(let e=0;e0&&v.outputs[e].links[0]){t=v.outputs[e].links[0];break}if(t){const e=null==(h=v.graph)?void 0:h.links;if(e[t]){const s=null==(m=e[t])?void 0:m.target_id,o=null==(f=null==(g=v.graph)?void 0:g._nodes_by_id)?void 0:f[s];o&&et(o)}}}}})),w("shift+up,shift+down,shift+left,shift+right",(function(e,t){e.preventDefault();if(!le("EasyUse.Hotkeys.AlignSelectedNodes",null,!0))return;const s=qe();if(s.length<=1)return;const o=s;switch(t.key){case"shift+up":LGraphCanvas.alignNodes(o,"top",o[0]);break;case"shift+down":LGraphCanvas.alignNodes(o,"bottom",o[0]);break;case"shift+left":LGraphCanvas.alignNodes(o,"left",o[0]);break;case"shift+right":LGraphCanvas.alignNodes(o,"right",o[0])}hs||(hs=xe()),hs&&hs.update()})),w("shift+g",(function(e,t){e.preventDefault();le("EasyUse.Hotkeys.AddGroup",null,!0)&&(gs(),hs||(hs=xe()),hs&&hs.update())})),w("shift+r",(function(e,t){e.preventDefault();le("EasyUse.Hotkeys.cleanVRAMused",null,!0)&&bt()}));const e=[];Array.from(Array(10).keys()).forEach((t=>e.push(`alt+${t}`))),w(e.join(","),(async function(e,t){e.preventDefault();if(!le("EasyUse.Hotkeys.NodesTemplate",null,!0))return;const s=t.key;let o=parseInt(s.split("+")[1]);const n=await ee.getUserData("comfy.templates.json");let i=null;if(200==n.status)try{i=await n.json()}catch(l){ht.error(Ce("Get Node Templates File Failed"))}else localStorage["Comfy.NodeTemplates"]?i=JSON.parse(localStorage["Comfy.NodeTemplates"]):ht.warn(Ce("No Node Templates Found"));if(!i)return void ht.warn(Ce("No Node Templates Found"));o=0===o?9:o-1;const a=i[o];if(a)try{const e=(null==a?void 0:a.name)||"Group",t=(null==a?void 0:a.data)?JSON.parse(a.data):[];ms((async()=>{await ie.registerFromWorkflow(t.groupNodes,{}),localStorage.litegrapheditor_clipboard=a.data,$.canvas.pasteFromClipboard(),t.groupNodes||gs(e)}))}catch(l){ht.error(l)}else ht.warn(Ce("Node template with {key} not set").replace("{key}",s))}));const t=async function(e){if(("b"===e.key||"m"==e.key)&&(e.metaKey||e.ctrlKey)){if(0===qe().length)return;hs||(hs=xe()),hs&&hs.update()}};window.addEventListener("keydown",t,!0)}}});const ms=async e=>{const t=localStorage.litegrapheditor_clipboard;await e(),localStorage.litegrapheditor_clipboard=t},gs=e=>{const t=qe();if(0===t.length)return;const s=t;let o=new LiteGraph.LGraphGroup;o.title=e||"Group",((e,t=[],s=20)=>{var o,n,i,a,l,r,d,u,c,p;for(var h of(n=i=a=l=-1,r=d=u=c=-1,[e._nodes,t]))for(var m in h)r=(p=h[m]).pos[0],d=p.pos[1],u=p.pos[0]+p.size[0],c=p.pos[1]+p.size[1],"Reroute"!=p.type&&(d-=LiteGraph.NODE_TITLE_HEIGHT),(null==(o=p.flags)?void 0:o.collapsed)&&(c=d+LiteGraph.NODE_TITLE_HEIGHT,(null==p?void 0:p._collapsed_width)&&(u=r+Math.round(p._collapsed_width))),(-1==n||ra)&&(a=u),(-1==l||c>l)&&(l=c);i-=Math.round(1.4*e.font_size),e.pos=[n-s,i-s],e.size=[a-n+2*s,l-i+2*s]})(o,s),$.canvas.graph.add(o)};function fs(e,t,s,o){const n=[];return e.workflow.links.forEach((e=>{s&&e[1]===t&&!n.includes(e[3])&&n.push(e[3]),o&&e[3]===t&&!n.includes(e[1])&&n.push(e[1])})),n}async function ys(e,t=!1){const s=structuredClone(await $.graphToPrompt()),o=[];if(s.workflow.nodes.forEach((e=>{o.push(e.id)})),s.workflow.links=s.workflow.links.filter((e=>o.includes(e[1])&&o.includes(e[3]))),t)for(;!$.graph._nodes_by_id[e].isChooser;)e=fs(s,e,!0,!1)[0];const n=function(e,t){const s=[],o=[t];for(;o.length>0;){const t=o.pop();s.push(t),o.push(...fs(e,t,!0,!1).filter((e=>!(s.includes(e)||o.includes(e)))))}o.push(...s.filter((e=>e!=t)));const n=[t];for(;o.length>0;){const t=o.pop();n.push(t),o.push(...fs(e,t,!1,!0).filter((e=>!(n.includes(e)||o.includes(e)))))}const i=[];return i.push(...s),i.push(...n.filter((e=>!i.includes(e)))),i}(s,e);s.workflow.nodes=s.workflow.nodes.filter((t=>(t.id===e&&t.inputs.forEach((e=>{e.link=null})),n.includes(t.id)))),s.workflow.links=s.workflow.links.filter((e=>n.includes(e[1])&&n.includes(e[3])));const i={};for(const[r,d]of Object.entries(s.output))n.includes(parseInt(r))&&(i[r]=d);const a={};for(const[r,d]of Object.entries(i[e.toString()].inputs))Array.isArray(d)||(a[r]=d);i[e.toString()].inputs=a,s.output=i;const l=$.graphToPrompt;$.graphToPrompt=()=>($.graphToPrompt=l,s),$.queuePrompt(0)}const vs=new class{constructor(){this.current_node_id=void 0,this.class_of_current_node=null,this.current_node_is_chooser=!1}update(){var e,t;return $.runningNodeId!=this.current_node_id&&(this.current_node_id=$.runningNodeId,this.current_node_id?(this.class_of_current_node=null==(t=null==(e=$.graph)?void 0:e._nodes_by_id[$.runningNodeId.toString()])?void 0:t.comfyClass,this.current_node_is_chooser="easy imageChooser"===this.class_of_current_node):(this.class_of_current_node=void 0,this.current_node_is_chooser=!1),!0)}},_s=class e{constructor(){}static idle(){return!$.runningNodeId}static paused(){return!0}static paused_here(t){return e.here(t)}static running(){return!e.idle()}static here(e){return $.runningNodeId==e}static state(){return"Paused"}};y(_s,"cancelling",!1);let ws=_s;function bs(e,t){const s=new FormData;s.append("message",t),s.append("id",e),ee.fetchApi("/easyuse/image_chooser_message",{method:"POST",body:s})}function As(){bs(-1,"__cancel__"),ws.cancelling=!0,ee.interrupt(),ws.cancelling=!1}var Ss=0;function Es(){Ss+=1}const Cs=["easy kSampler","easy kSamplerTiled","easy fullkSampler"];function Ls(e){const t=$.graph._nodes_by_id[e.detail.id];if(t){t.selected=new Set,t.anti_selected=new Set;const s=function(e,t){var s;return e.imgs=[],t.forEach((t=>{const s=new Image;e.imgs.push(s),s.onload=()=>{$.graph.setDirtyCanvas(!0)},s.src=`/view?filename=${encodeURIComponent(t.filename)}&type=temp&subfolder=${$.getPreviewFormatParam()}`})),null==(s=e.setSizeForImage)||s.call(e),e.imgs}(t,e.detail.urls);return{node:t,image:s,isKSampler:Cs.includes(t.type)}}}function ks(e,t,s){var o;if(e.imageRects)o=e.imageRects[t];else{const t=e.imagey;o=[1,t+1,e.size[0]-2,e.size[1]-t-2]}s.strokeRect(o[0]+1,o[1]+1,o[2]-2,o[3]-2)}class xs extends se{constructor(){super(),this.node=null,this.select_index=[],this.dialog_div=null}show(e,t){this.select_index=[],this.node=t;const s=e.map(((e,s)=>{const o=te("img",{src:e.src,onclick:e=>{this.select_index.includes(s)?(this.select_index=this.select_index.filter((e=>e!==s)),o.classList.remove("selected")):(this.select_index.push(s),o.classList.add("selected")),t.selected.has(s)?t.selected.delete(s):t.selected.add(s)}});return o}));super.show(te("div.comfyui-easyuse-chooser-dialog",[te("h5.comfyui-easyuse-chooser-dialog-title",Ce("Choose images to continue")),te("div.comfyui-easyuse-chooser-dialog-images",s)]))}createButtons(){const e=super.createButtons();return e[0].onclick=e=>{ws.running()&&As(),super.close()},e.unshift(te("button",{type:"button",textContent:Ce("Choose Selected Images"),onclick:e=>{bs(this.node.id,[...this.node.selected,-1,...this.node.anti_selected]),ws.idle()&&(Es(),ys(this.node.id).then((()=>{bs(this.node.id,[...this.node.selected,-1,...this.node.anti_selected])}))),super.close()}})),e}}function Is(){const e=$.graph._nodes_by_id[this.node_id];if(e){const t=[...e.selected];(null==t?void 0:t.length)>0&&e.setProperty("values",t),bs(e.id,[...e.selected,-1,...e.anti_selected]),ws.idle()&&(Es(),ys(e.id).then((()=>{bs(e.id,[...e.selected,-1,...e.anti_selected])})))}}function Ns(){ws.running()&&As()}function Ts(e){Object.defineProperty(e,"clicked",{get:function(){return this._clicked},set:function(e){this._clicked=e&&""!=this.name}})}function Os(e){e.options||(e.options={}),e.options.serialize=!1}$.registerExtension({name:"Comfy.EasyUse.imageChooser",init(){window.addEventListener("beforeunload",As,!0)},setup(e){const t=LGraphCanvas.prototype.draw;LGraphCanvas.prototype.draw=function(){vs.update()&&e.graph._nodes.forEach((e=>{e.update&&e.update()})),t.apply(this,arguments)},ee.addEventListener("easyuse-image-choose",(function(e){const{node:t,image:s,isKSampler:o}=Ls(e);if(o){(new xs).show(s,t)}}));const s=ee.interrupt;ee.interrupt=function(){ws.cancelling||As(),s.apply(this,arguments)},ee.addEventListener("execution_start",(function(){(Ss>0?(Ss-=1,0):(bs(-1,"__start__"),1))&&e.graph._nodes.forEach((e=>{(e.selected||e.anti_selected)&&(e.selected.clear(),e.anti_selected.clear(),e.update())}))}))},async nodeCreated(e,t){if("easy imageChooser"==e.comfyClass){e.setProperty("values",[]),void 0===(null==e?void 0:e.imageIndex)&&Object.defineProperty(e,"imageIndex",{get:function(){return null},set:function(t){e.overIndex=t}}),void 0===(null==e?void 0:e.imagey)&&Object.defineProperty(e,"imagey",{get:function(){return null},set:function(t){return e.widgets[e.widgets.length-1].last_y+LiteGraph.NODE_WIDGET_HEIGHT}});const t=e.onMouseDown;e.onMouseDown=function(s,o,n){if(s.isPrimary){const t=function(e,t){var s,o;if((null==(s=e.imgs)?void 0:s.length)>1)for(var n=0;n0&&s0&&oe.imagey)return 0;return-1}(e,o);t>=0&&this.imageClicked(t)}return t&&t.apply(this,arguments)},e.send_button_widget=e.addWidget("button","","",Is),e.cancel_button_widget=e.addWidget("button","","",Ns),Ts(e.cancel_button_widget),Ts(e.send_button_widget),Os(e.cancel_button_widget),Os(e.send_button_widget)}},beforeRegisterNodeDef(e,t,s){if("easy imageChooser"==(null==t?void 0:t.name)){const t=e.prototype.onDrawBackground;e.prototype.onDrawBackground=function(e){t.apply(this,arguments),function(e,t){var s,o;if(e.imgs){if(e.imageRects)for(let s=0;s{ks(e,s,t)})),t.strokeStyle="#F88",null==(o=null==e?void 0:e.anti_selected)||o.forEach((s=>{ks(e,s,t)}))}}(this,e)},e.prototype.imageClicked=function(t){"easy imageChooser"===(null==e?void 0:e.comfyClass)&&(this.selected.has(t)?this.selected.delete(t):this.selected.add(t),this.update())};const s=e.prototype.update;e.prototype.update=function(){var e;if(s&&s.apply(this,arguments),this.send_button_widget){this.send_button_widget.node_id=this.id;const t=(this.selected?this.selected.size:0)+(this.anti_selected?this.anti_selected.size:0),s=(null==(e=this.imgs)?void 0:e.length)||0;ws.paused_here(this.id)&&t>0?this.send_button_widget.name=t>1?"Progress selected ("+t+"/"+s+")":"Progress selected image":this.send_button_widget.name=t>0?t>1?"Progress selected ("+t+"/"+s+")":"Progress selected image as restart":""}if(this.cancel_button_widget){const e=ws.running();this.cancel_button_widget.name=e?"Cancel current run":""}this.setDirtyCanvas(!0,!0)}}}}),Number.prototype.div=function(e){return function(e,t){let s,o,n=0,i=0,a="string"==typeof e?e:e.toString(),l="string"==typeof t?t:t.toString();try{n=a.toString().split(".")[1].length}catch(r){}try{i=l.toString().split(".")[1].length}catch(r){}return s=Number(a.toString().replace(".","")),o=Number(l.toString().replace(".","")),s/o*Math.pow(10,i-n)}(this,e)};let Ds=[],Rs=0;const Ms={sd3:6.5,"sd3-turbo":4};class Gs extends se{constructor(){super(),this.lists=[],this.dialog_div=null,this.user_div=null}addItem(e,t){return te("div.easyuse-account-dialog-item",[te("input",{type:"text",placeholder:"Enter name",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);Ds[t].name=e.target.value},value:Ds[e].name}),te("input.key",{type:"text",oninput:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);Ds[t].key=e.target.value},placeholder:"Enter APIKEY",value:Ds[e].key}),te("button.choose",{textContent:Ce("Choose"),onclick:async e=>{var s,o,n;const i=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);let a=Ds[i].name,l=Ds[i].key;if(!a)return void ht.error(Ce("Please enter the account name"));if(!l)return void ht.error(Ce("Please enter the APIKEY"));let r=!0;for(let t=0;t{(new Gs).show(t)}},[te("div.user",[te("div.avatar",i?[te("img",{src:i})]:"😀"),te("div.info",[te("h5.name",a),te("h6.remark","Credits: "+l)])]),te("div.edit",{textContent:Ce("Edit")})])),ht.success(Ce("Save Succeed"))}else ht.success(Ce("Save Succeed"));this.close()}else ht.error(Ce("Save Failed"))}}),te("button.delete",{textContent:Ce("Delete"),onclick:e=>{const t=Array.prototype.indexOf.call(this.dialog_div.querySelectorAll(".easyuse-account-dialog-item"),e.target.parentNode);Ds.length<=1?ht.error(Ce("At least one account is required")):(Ds.splice(t,1),this.dialog_div.removeChild(e.target.parentNode))}})])}show(e){Ds.forEach(((t,s)=>{this.lists.push(this.addItem(s,e))})),this.dialog_div=te("div.easyuse-account-dialog",this.lists),super.show(te("div.easyuse-account-dialog-main",[te("div",[te("a",{href:"https://platform.stability.ai/account/keys",target:"_blank",textContent:Ce("Getting Your APIKEY")})]),this.dialog_div]))}createButtons(){const e=super.createButtons();return e.unshift(te("button",{type:"button",textContent:Ce("Save Account Info"),onclick:e=>{let t=!0;for(let s=0;s{200==e.status?ht.success(Ce("Save Succeed")):ht.error(Ce("Save Failed"))}))}else ht.error(Ce("APIKEY is not Empty"))}})),e.unshift(te("button",{type:"button",textContent:Ce("Add Account"),onclick:e=>{const t="Account "+Ds.length.toString();Ds.push({name:t,key:""});const s=this.addItem(Ds.length-1);this.lists.push(s),this.dialog_div.appendChild(s)}})),e}}$.registerExtension({name:"Comfy.EasyUse.API.SD3",async beforeRegisterNodeDef(e,t,s){if("easy stableDiffusion3API"==t.name){const t=e.prototype.onNodeCreated;e.prototype.onNodeCreated=async function(){var e,s,o;t&&(null==t||t.apply(this,arguments));const n=this.widgets.find((e=>["seed_num","seed"].includes(e.name))),i=this.widgets.find((e=>["control_before_generate","control_after_generate"].includes(e.name)));let a=this.widgets.find((e=>"model"==e.name));a.callback=e=>{l.value="-"+Ms[e]};const l=this.addWidget("text","cost_credit","0",(e=>{}),{serialize:!1});l.disabled=!0,setTimeout((e=>{"control_before_generate"==i.name&&0===n.value&&(n.value=Math.floor(4294967294*Math.random())),l.value="-"+Ms[a.value]}),100);let r=te("div.easyuse-account-user",[Ce("Loading UserInfo...")]);this.addDOMWidget("account","btn",te("div.easyuse-account",r)),ee.addEventListener("stable-diffusion-api-generate-succeed",(async({detail:e})=>{var t;let s=r.querySelectorAll(".remark");if(s&&s[0]){const t=(null==e?void 0:e.model)?Ms[e.model]:0;if(t){let e=function(e,t){let s,o,n,i,a,l;a="string"==typeof e?e:e.toString(),l="string"==typeof t?t:t.toString();try{s=a.split(".")[1].length}catch(r){s=0}try{o=l.split(".")[1].length}catch(r){o=0}return n=Math.pow(10,Math.max(s,o)),i=s>=o?s:o,((e*n-t*n)/n).toFixed(i)}(parseFloat(s[0].innerText.replace(/Credits: /g,"")),t);e>0&&(s[0].innerText="Credits: "+e.toString())}}await ke(1e4);const o=await ee.fetchApi("/easyuse/stability/balance");if(200==o.status){const e=await o.json();if(null==e?void 0:e.balance){const o=(null==(t=e.balance)?void 0:t.credits)||0;s&&s[0]&&(s[0].innerText="Credits: "+o)}}}));const d=await ee.fetchApi("/easyuse/stability/api_keys");if(200==d.status){let t=await d.json();if(Ds=t.keys,Rs=t.current,Ds.length>0&&void 0!==Rs){const t=Ds[Rs].key,n=Ds[Rs].name;if(t){const t=await ee.fetchApi("/easyuse/stability/user_info");if(200==t.status){const n=await t.json();if((null==n?void 0:n.account)&&(null==n?void 0:n.balance)){const t=(null==(e=n.account)?void 0:e.profile_picture)||null,i=(null==(s=n.account)?void 0:s.email)||null,a=(null==(o=n.balance)?void 0:o.credits)||0;r.replaceChildren(te("div.easyuse-account-user-info",{onclick:e=>{(new Gs).show(r)}},[te("div.user",[te("div.avatar",t?[te("img",{src:t})]:"😀"),te("div.info",[te("h5.name",i),te("h6.remark","Credits: "+a)])]),te("div.edit",{textContent:Ce("Edit")})]))}}}else r.replaceChildren(te("div.easyuse-account-user-info",{onclick:e=>{(new Gs).show(r)}},[te("div.user",[te("div.avatar","😀"),te("div.info",[te("h5.name",n),te("h6.remark",Ce("Click to set the APIKEY first"))])]),te("div.edit",{textContent:Ce("Edit")})]))}}}}}});let Ps=null;function Bs(){Ps&&(Ps.removeEventListeners(),Ps.dropdown.remove(),Ps=null)}function Fs(e,t,s,o=!1){Bs(),new Us(e,t,s,o)}class Us{constructor(e,t,s,o=!1){this.dropdown=document.createElement("ul"),this.dropdown.setAttribute("role","listbox"),this.dropdown.classList.add("easy-dropdown"),this.selectedIndex=-1,this.inputEl=e,this.suggestions=t,this.onSelect=s,this.isDict=o,this.focusedDropdown=this.dropdown,this.buildDropdown(),this.onKeyDownBound=this.onKeyDown.bind(this),this.onWheelBound=this.onWheel.bind(this),this.onClickBound=this.onClick.bind(this),this.addEventListeners()}buildDropdown(){this.isDict?this.buildNestedDropdown(this.suggestions,this.dropdown):this.suggestions.forEach(((e,t)=>{this.addListItem(e,t,this.dropdown)}));const e=this.inputEl.getBoundingClientRect();this.dropdown.style.top=e.top+e.height-10+"px",this.dropdown.style.left=e.left+"px",document.body.appendChild(this.dropdown),Ps=this}buildNestedDropdown(e,t){let s=0;Object.keys(e).forEach((o=>{const n=e[o];if("object"==typeof n&&null!==n){const e=document.createElement("ul");e.setAttribute("role","listbox"),e.classList.add("easy-nested-dropdown");const i=document.createElement("li");i.classList.add("folder"),i.textContent=o,i.appendChild(e),i.addEventListener("mouseover",this.onMouseOver.bind(this,s,t)),t.appendChild(i),this.buildNestedDropdown(n,e),s+=1}else{const e=document.createElement("li");e.classList.add("item"),e.setAttribute("role","option"),e.textContent=o,e.addEventListener("mouseover",this.onMouseOver.bind(this,s,t)),e.addEventListener("mousedown",this.onMouseDown.bind(this,o)),t.appendChild(e),s+=1}}))}addListItem(e,t,s){const o=document.createElement("li");o.setAttribute("role","option"),o.textContent=e,o.addEventListener("mouseover",this.onMouseOver.bind(this,t)),o.addEventListener("mousedown",this.onMouseDown.bind(this,e)),s.appendChild(o)}addEventListeners(){document.addEventListener("keydown",this.onKeyDownBound),this.dropdown.addEventListener("wheel",this.onWheelBound),document.addEventListener("click",this.onClickBound)}removeEventListeners(){document.removeEventListener("keydown",this.onKeyDownBound),this.dropdown.removeEventListener("wheel",this.onWheelBound),document.removeEventListener("click",this.onClickBound)}onMouseOver(e,t){t&&(this.focusedDropdown=t),this.selectedIndex=e,this.updateSelection()}onMouseOut(){this.selectedIndex=-1,this.updateSelection()}onMouseDown(e,t){t.preventDefault(),this.onSelect(e),this.dropdown.remove(),this.removeEventListeners()}onKeyDown(e){const t=Array.from(this.focusedDropdown.children),s=t[this.selectedIndex];if(Ps)if(38===e.keyCode)e.preventDefault(),this.selectedIndex=Math.max(0,this.selectedIndex-1),this.updateSelection();else if(40===e.keyCode)e.preventDefault(),this.selectedIndex=Math.min(t.length-1,this.selectedIndex+1),this.updateSelection();else if(39===e.keyCode){if(e.preventDefault(),s&&s.classList.contains("folder")){const e=s.querySelector(".easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=0,this.updateSelection())}}else if(37===e.keyCode&&this.focusedDropdown!==this.dropdown){const e=this.focusedDropdown.closest(".easy-dropdown, .easy-nested-dropdown").parentNode.closest(".easy-dropdown, .easy-nested-dropdown");e&&(this.focusedDropdown=e,this.selectedIndex=Array.from(e.children).indexOf(this.focusedDropdown.parentNode),this.updateSelection())}else if((13===e.keyCode||9===e.keyCode)&&this.selectedIndex>=0){e.preventDefault(),s.classList.contains("item")&&(this.onSelect(t[this.selectedIndex].textContent),this.dropdown.remove(),this.removeEventListeners());const o=s.querySelector(".easy-nested-dropdown");o&&(this.focusedDropdown=o,this.selectedIndex=0,this.updateSelection())}else 27===e.keyCode&&(this.dropdown.remove(),this.removeEventListeners())}onWheel(e){const t=parseInt(this.dropdown.style.top);localStorage.getItem("Comfy.Settings.Comfy.InvertMenuScrolling")?this.dropdown.style.top=t+(e.deltaY<0?10:-10)+"px":this.dropdown.style.top=t+(e.deltaY<0?-10:10)+"px"}onClick(e){this.dropdown.contains(e.target)||e.target===this.inputEl||(this.dropdown.remove(),this.removeEventListeners())}updateSelection(){Array.from(this.focusedDropdown.children).forEach(((e,t)=>{t===this.selectedIndex?e.classList.add("selected"):e.classList.remove("selected")}))}}function zs(e){const t=e.min||0,s=e.max||0,o=e.step||1;if(0===o)return[];const n=[];let i=t;for(;i<=s;){if(Number.isInteger(o))n.push(Math.round(i)+"; ");else{let e=i.toFixed(3);-0==e&&(e="0.000"),/\.\d{3}$/.test(e)||(e+="0"),n.push(e+"; ")}i+=o}return s>=0&&t>=0?n:n.reverse()}let js={},Hs={};function Ws(e,t){String(e.id);const s=t.name,o=t.value.replace(/^(loader|preSampling):\s/,"");Hs[s]?Hs[s]!=js[o]&&(Hs[s]=js[o]):Hs={...Hs,[s]:js[o]}}$.registerExtension({name:"Comfy.EasyUse.XYPlot",async beforeRegisterNodeDef(e,t,s){if("easy XYPlot"===t.name){js=t.input.hidden.plot_dict[0];for(const e in js){const t=js[e];if(Array.isArray(t)){let s=[];for(const e of t)s.push(e+"; ");js[e]=s}else js[e]="object"==typeof t?"seed"==e?t+"; ":zs(t):t+"; "}js.None=[],js["---------------------"]=[]}},nodeCreated(e){"easy XYPlot"===e.comfyClass&&(function(e){if(e.widgets)for(const t of e.widgets)if("x_axis"===t.name||"y_axis"===t.name){let s=t.value;Object.defineProperty(t,"value",{get:()=>s,set(o){o!==s&&(s=o,Ws(e,t))}})}}(e),function(e){if(e.widgets){const t=e.widgets.filter((e=>"customtext"===e.type&&!1!==e.dynamicPrompts||e.dynamicPrompts));for(const e of t){let t=function(e,t,o,n){return e&&(t[o]=e),t.map((e=>s(e,n))).filter((e=>""!==e)).join("")},s=function(e,t){if(e=o(e),n(e,t))return e+"; ";let s=i(e,t);return 1===s.length||2===s.length?s[0]:n(a(e),t)?a(e)+"; ":""},o=function(e){return e.replace(/(\n|;| )/g,"")},n=function(e,t){return t.includes(e+"; ")},i=function(e,t){return t.filter((t=>t.toLowerCase().includes(e.toLowerCase())))},a=function(e){return Number(e)?Number(e).toFixed(3):["0","0.","0.0","0.00","00"].includes(e)?"0.000":e};const l=function(){const s=e.name[0]+"_axis";let o=(null==Hs?void 0:Hs[s])||[];if(0===o.length)return;const n=e.inputEl.value,i=e.inputEl.selectionStart;let a=n.split("; ");const l=n.substring(0,i).split("; ").length-1,r=a[l].replace(/\n/g,"").toLowerCase(),d=o.filter((e=>e.toLowerCase().includes(r))).map((e=>e.replace(/; /g,"")));if(d.length>0)Fs(e.inputEl,d,(s=>{const n=t(s,a,l,o);e.inputEl.value=n}));else{Bs();const s=t(null,a,l,o);e.inputEl.value=s}};e.inputEl.removeEventListener("input",l),e.inputEl.addEventListener("input",l),e.inputEl.removeEventListener("mouseup",l),e.inputEl.addEventListener("mouseup",l)}}}(e))}});const Ys=v("graphStore",{state:e=>({selectors:[],selectors_styles:{},seg_selectors:[],slider_controls:[]}),actions:{setSelectors(e){this.selectors=_(e)},setStyles(e,t){this.selectors_styles[e]||(this.selectors_styles[e]=t)},setSegSelectors(e){this.seg_selectors=_(e)},setSliderControls(e){this.slider_controls=_(e)}}}),Vs=["data-id"],Zs=[D("i",{class:"mdi mdi-trash-can"},null,-1)],Xs=D("i",{class:"mdi mdi-magnify"},null,-1),Qs=["placeholder"],Ks=["onMouseenter","onMouseleave"],Js=["onClick"],qs=["name","checked"],$s=["src"],eo={key:0},to=D("span",{class:"comfyui-easyuse-success"},"positive:",-1),so={key:1},oo=D("span",{class:"comfyui-easyuse-error"},"negative:",-1),no="comfyui-easyuse-selector",io={__name:"stylesSelector",props:{id:{type:String|Number,default:""},type:{type:String,default:""},selectedStyles:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["chooseStyle"],setup(e,{emit:t}){const s=e,o=Ys(),{selectors_styles:n}=b(o),i=k([]);x((e=>s.type),(async e=>{i.value=[],e&&await(async e=>{if(n.value[s.type])return!0;const t=await ee.fetchApi(`/easyuse/prompt/styles?name=${e}`);if(200===t.status){let e=(await t.json()).map(((e,t)=>(e.index=t,e)));return await o.setStyles(s.type,e),!0}return ht.error(Ce("Get styles list Failed")),!1})(e)&&l()}),{immediate:!0});const a=t,l=e=>{const t=s.selectedStyles,o=_(n.value[s.type]);i.value=o.sort(((e,t)=>e.index-t.index)).sort(((e,s)=>t.includes(s.name)-t.includes(e.name)))},r=k(""),d=e=>e.toLowerCase(),u=I({}),c=e=>{u.src="",u.name="",u.positive="",u.negative=""},p=async e=>{const t=await ee.fetchApi(`/easyuse/prompt/styles/image?name=${e}&styles_name=${s.type}`);if(200===t.status){const o=await t.text();if(o.startsWith("http"))return o;return`/easyuse/prompt/styles/image?name=${e}&styles_name=${s.type}`}},h=e=>{e.target.src="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QNLaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA5LjEtYzAwMSA3OS4xNDYyODk5Nzc3LCAyMDIzLzA2LzI1LTIzOjU3OjE0ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuMSAoMjAyMzA5MDUubS4yMzE2IDk3OWM4NmQpICAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjA3NEU1QzNCNUJBMTFFRUExMUVDNkZDRjI0NzlBN0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjA3NEU1QzRCNUJBMTFFRUExMUVDNkZDRjI0NzlBN0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGMDc0RTVDMUI1QkExMUVFQTExRUM2RkNGMjQ3OUE3RCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGMDc0RTVDMkI1QkExMUVFQTExRUM2RkNGMjQ3OUE3RCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/uAA5BZG9iZQBkwAAAAAH/2wCEAAYEBAQFBAYFBQYJBgUGCQsIBgYICwwKCgsKCgwQDAwMDAwMEAwODxAPDgwTExQUExMcGxsbHB8fHx8fHx8fHx8BBwcHDQwNGBAQGBoVERUaHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fH//AABEIAIAAgAMBEQACEQEDEQH/xACLAAEAAgMBAQEAAAAAAAAAAAAABAUCAwYBBwgBAQADAQEBAAAAAAAAAAAAAAABAgMEBQYQAAEEAgECAwUHAwUAAAAAAAEAAgMEEQUhEgYxEwdBYSIyFFFxgVJyIxWRoTOxwdFiJBEBAAICAQQBBAIDAAAAAAAAAAECEQMxIUESBBOB0SIyUXGCIwX/2gAMAwEAAhEDEQA/AP1SgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDXJYgj+d4afsVopM8KWvEcy8it1pXdMcjXO/Lnn+im2u0cwV2VniW1UXEBAQEBAQEBAQEBAQRNlc+mgyDh7zhv+5WunX5Sw37fCHM2dh48r06ank7N6rn2Ja7qa4hw5BBwQV010uK+/DsO29v/J68SOI86Jxjl95HIP4gryPc0fHfHaXu+j7Py68zzHSVquV2iAgICAgICAgICDyTr6HdHz4PTnwypjnqic46OauNbY6mGX99p+L8w9xaeV6OufHt0eXtr59M9VFb194E9LmuH3kf6rv17avO2ets7YVcuuuk/uOa3PgBlxP4BdMbq9nLPqbJ5xDbSM9azFXpyujuSO+Bo5kcf0NPyj25We2YtEzaPxdfr6519Kz+UvqEIlELBKQZQ0eYRwC7HOPxXzVsZ6cPpK5x15ZKEiAgICAgICAgICCNc1tG40CzA2XHg4j4h9zhyFpr22p+s4Z7NNL/ALRlTX+1dVFBJOJrcTI2lxZHYcBx+sldWv3bzOMVn6fZy39OkRnNo+v3aoOx9JOxks8tqwHDPS+1IW8+IzGWZVrf9DZHSMR/j9yvo656zMz9V1rdLqdYwsoVIqwd87mNAc79Tvmd+JXJt332ftMy6temlP1jCasmggICAgICAgICAgwlmiib1SPDB7zhWrWZ4VtaI5QXb2l5ojYHvLjjIGB/dbR61sZlhPtVziFb3PYdd0luCvAZbXludVZ1huZQPgyTx4/atvWj4rxaZ6d/6Ye1/t1zSI6zx/bzti5YqaOpBeg8u41n/oa14cA4ccH7lPs1jZebVn8eyPUtOrXFbR+XdYx9xa90pjeXROaSCXDj+oysZ9S+Mx1bR7uvOJ6LGOWKVgfG8PafAtOQueazHLqraJjMMlCRAQEBAQEBAQRLNp4HTFx/2/4WtKR3Y32T2Udl8j3knk/aeSu6kREPPvaZlpY3DmyY8DyrzPZWv8tkvmFv7bg12RyR1DGeeMj2KnjE9JaeUx1hi1sgaet/U7JIOMcE8Dj7FMREcK2zPKMasr5XO6fmOVt5xEOadVplYU45IAOhxa72kLm2TFuXXqrNeF1WtlwDZeHfmHguO+vHDupszylLJsICAgICAg8cMjCQiYR5IVpFmc1Q5qLXHPgfbhbV2MLaYlqNQAYA4V/kV+PDA1fcp81fjYurtYMu4CmLZRNYhtZWBAI8CqzdaKN8df3LObtIokxwe5ZzZrFUloIGFnLWHqhIgICAgICAgxMbSpyjDAwAq3kr4MTWCnzR4MX02PGHDISNmETqieWba7QABwB4KJumKNgjaFXK0VZYChYQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEHzvuv1G7k1W9s6/Xamtaq15oaonmnsCR008HntaI4K8/s4HOeEGXZXqTud7uqtG7r6kNa5HdMU9aaw9zZde+FkrHsnr1+M2MZBPIKDRe9cO2K2mjs/V0m7X61lWzq32W+ZFEbfkSSO4B+GL9zw4QWm99TqFVmjsaSu7fUtxeNM2aTmSMBbHI9zWHqHVJlnDTxjPKCJL6sea502t1D7Ouhr0rNqxNM2CSNuwnkgjAi6ZOotdEc/Egibf1j/j+7JNL9DWdWg84TWn2ywtdFKyMZb5Tg0nLyG55x48IJ3bXqe/ea/a26dFtyTXtldDUqyOdNL5VqaDHS5gwXRxMe3xz1Y9iDKP1Sa7uefUnR7TyYqUVoEU5jY6pJZIz1RY4ZiMYd7TkexBA749Wr2gtCKlrIpGs17NjK29LLWmPmMsyiFkbIZsPEdKQu6y0eAQWdD1E2L93W1tzRyCDY3paev2NaxVlhIjidMfMb5vmse1kbi9pZ7MeKDt0BAQEBAQfEPU+lFY2++q2K1uSSezTnrReVsTTmiZVYHOd9LVuQyubIwANkbxz4FA7FsQ0NrrLNXX7N0eo1+3darGDYPjb5j6prxVRajjDetsRAjj4yM4CDre2uxO7q2hqtm7nua6w9rp5tfXgoSxwyTOMr42PlrPe4Nc8jJJQRDb3Oz1fYFrcV7As0mu3u7nbWkBZ9LSfG5nlxs/yySWRiNozwcBBx9EXadGTXz62+LG41+jZS6adhzS6vfnlkEjgzEZax7T8ePFBu3nbPdUXqJZsw6S5cqbCW1YdIY2lxhhfEGMjfHtoG9HxucwPEZy4/A7kMC87aq2Kmv7mdvxuqGmklFjUU4G2Yp21rdyW00t+kJkFl88pY9vDgwNDvEoK9np73FBcHdkrt2+rZd5FjQx7O0b8WvbzDKZhN1SSse573QdeAHkN+Ichj3p2rBvZq9vUnY2tcNQPqpZYZpJ44GxXqzHdVlzZZpib73mLHViI85c1BZ6OpsIe/6/XSuntevdsz6+8+pI0/yM1dtWVr2Z644P8rmyuj6S53jxkh9aQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBB/9k="};return(t,o)=>(N(),T("div",{class:R(no+` ${no}-styles`),"data-id":e.id,onMouseleave:c},[i.value.length>0&&e.show?(N(),T(O,{key:0},[D("div",{class:R(no+"__header")},[D("div",{class:R(no+"__header_button"),onClick:o[0]||(o[0]=e=>(a("chooseStyle",[]),void(r.value="")))},Zs,2),D("div",{class:R(no+"__header_search")},[Xs,M(D("textarea",{class:"search","onUpdate:modelValue":o[1]||(o[1]=e=>r.value=e),dir:"ltr",rows:1,placeholder:P(Ce)("Type here to search styles ...")},null,8,Qs),[[G,r.value]])],2)],2),D("div",{class:R(no+"__content"),onMouseleave:l},[(N(!0),T(O,null,B(i.value,((t,o)=>(N(),T("div",{class:R(no+"-item"),key:o,onMouseenter:e=>(async e=>{if(!e.imageSrc){if(e.imageLoading)return;e.imageLoading=!0;const t=await p(e.imgName).finally((()=>e.imageLoading=!1));e.imageSrc=t}u.name="zh-CN"==Ee&&e.name_cn?e.name_cn:e.name,u.positive=e.prompt,u.negative=e.negative_prompt,u.src=e.imageSrc})(t),onMouseleave:F((e=>c()),["stop"])},[D("span",{class:R([no+"-item__tag",{hide:!(e.selectedStyles.includes(t.name)||-1!=d(t.name).indexOf(d(r.value))||t.name_cn&&-1!=d(t.name_cn).indexOf(d(r.value)))}]),onClick:e=>(e=>{let t=s.selectedStyles;t.includes(e.name)?t=t.filter((t=>t!==e.name)):t.push(e.name),a("chooseStyle",t)})(t)},[D("input",{type:"checkbox",name:t.name,checked:e.selectedStyles.includes(t.name)},null,8,qs),D("span",null,U("zh-CN"==P(Ee)&&t.name_cn?t.name_cn:t.name),1)],10,Js)],42,Ks)))),128))],34),(null==u?void 0:u.src)?(N(),T("div",{key:0,class:R(no+"-preview")},[D("img",{src:u.src,ref:"image",alt:"preview",onError:h},null,40,$s),D("div",{class:R(no+"-preview__text")},[D("b",null,U(u.name),1),D("div",{class:R(no+"-preview__prompt")},[u.positive?(N(),T("h6",eo,[to,D("span",null,U(u.positive),1)])):z("",!0),u.negative?(N(),T("h6",so,[oo,D("span",null,U(u.negative),1)])):z("",!0)],2)],2)],2)):z("",!0)],64)):z("",!0)],42,Vs))}},ao=["data-id"],lo=["onClick"],ro=["name","checked"],uo="comfyui-easyuse-selector",co={__name:"segSelector",props:{id:{type:String|Number,default:""},type:{type:String,default:""},selected:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const s=e,o=k([]);x((e=>s.type),(async e=>{switch(e){case"selfie_multiclass_256x256":o.value=["Background","Hair","Body","Face","Clothes","Others"];break;case"human_parsing_lip":o.value=["Background","Hat","Hair","Glove","Sunglasses","Upper-clothes","Dress","Coat","Socks","Pants","Jumpsuits","Scarf","Skirt","Face","Left-arm","Right-arm","Left-leg","Right-leg","Left-shoe","Right-shoe"]}}),{immediate:!0});const n=t;return(t,i)=>{var a;return N(),T("div",{class:R(uo+` ${uo}-seg`),"data-id":e.id},[(null==(a=o.value)?void 0:a.length)>0&&e.show?(N(!0),T(O,{key:0},B(o.value,((t,o)=>(N(),T("div",{class:R(uo+"-item"),key:o},[D("span",{class:R(uo+"-item__tag"),onClick:e=>(e=>{let t=_(s.selected);t.includes(e)?t=t.filter((t=>t!==e)):t.push(e),n("select",t)})(o)},[D("input",{type:"checkbox",name:t,checked:e.selected.includes(o)},null,8,ro),D("span",null,U(P(Ce)(t)),1)],10,lo)],2)))),128)):z("",!0)],10,ao)}}},po=["data-id"],ho=["onMousedown","onDblclick"],mo="comfyui-easyuse-slider",go="ipadapter layer weights",fo={__name:"sliderControl",props:{id:{type:String|Number,default:""},mode:{type:String,default:""},type:{type:String,default:""},values:{type:Array,default:[]},show:{type:Boolean,default:!1}},emits:["changeValues","showSlider"],setup(e,{emit:t}){const s=e,o=t,n=(e,t,s)=>(e-t)/(s-t)*100,i=(e,t,o=void 0)=>{if(s.mode===go){let s={3:2.5,6:1}[t]||0;return{default:12==e?s:0,min:-1,max:3,step:.05,value:void 0!==o?o:12==e?s:0,top:void 0!==o?100-n(o,-1,3)+"%":null,height:void 0!==o?n(o,-1,3)+"%":null}}};x((e=>s.mode),(async(e,t)=>{var n;if(e!==t&&e===go)if(!t&&(null==(n=s.values)?void 0:n.length)>0){const e=s.values.map((e=>{const t=e.split(":");return i(s.values.length,t[0],parseFloat(t[1]))}));await o("changeValues",e)}else{let e="sd1"==s.type?16:12,t=Array.from({length:e},((t,s)=>i(e,s)));await o("changeValues",t)}o("showSlider")}),{immediate:!0}),x((e=>s.type),((e,t)=>{if(e!=t&&s.mode==go){let e="sd1"==s.type?16:12,t=Array.from({length:e},((t,s)=>i(e,s)));o("changeValues",t)}}));const a=k(null),l=k(null);return j((()=>{document.onmouseup=e=>document.onmousemove=null})),(t,i)=>{var r;return N(),T("div",{class:R(mo),"data-id":e.id},[(null==(r=e.values)?void 0:r.length)>0&&e.show?(N(!0),T(O,{key:0},B(e.values,((t,i)=>(N(),T("div",{class:R([mo+"-item",{positive:3==i&&"sdxl"==e.type&&e.mode==go},{negative:6==i&&"sdxl"==e.type&&e.mode==go}]),key:i},[D("div",{class:R(mo+"-item-input")},U(t.value),3),D("div",{class:R(mo+"-item-scroll"),ref_for:!0,ref_key:"scroll",ref:a},[D("div",{class:R(mo+"-item-bar"),ref_for:!0,ref_key:"bar",ref:l,style:H({top:t.top||100-n(t.default,t.min,t.max)+"%"}),onMousedown:e=>((e,t,n)=>{let i=e||window.event,r=a.value[n],d=l.value[n],u=_(s.values),c=i.clientY-d.offsetTop;document.onmousemove=e=>{let s=(e||window.event).clientY-c;s<0?s=0:s>r.offsetHeight-d.offsetHeight&&(s=r.offsetHeight-d.offsetHeight);let i=(t.max-t.min)/t.step,a=(r.offsetHeight-d.offsetHeight)/i;s=Math.round(s/a)*a;const l=Math.floor(s/(r.offsetHeight-d.offsetHeight)*100)+"%",p=Math.floor((r.offsetHeight-d.offsetHeight-s)/(r.offsetHeight-d.offsetHeight)*100)+"%",h=parseFloat(parseFloat(t.max-(t.max-t.min)*(s/(r.offsetHeight-d.offsetHeight))).toFixed(2));u[n]={...u[n],top:l,height:p,value:h},o("changeValues",u),window.getSelection?window.getSelection().removeAllRanges():document.selection.empty()}})(e,t,i),onDblclick:e=>((e,t,n)=>{let i=_(s.values);i[n]={...i[n],top:null,height:null,value:t.default},o("changeValues",i)})(0,t,i)},null,46,ho),D("div",{class:R(mo+"-item-area"),style:H({height:t.height||n(t.default,t.min,t.max)+"%"})},null,6)],2),D("div",{class:R(mo+"-item-label")},[D("span",null,U(t.label),1)],2)],2)))),128)):z("",!0)],8,po)}}},yo={__name:"index",setup(e){const t=Ys(),{selectors:s,seg_selectors:o,slider_controls:n}=b(t),i=k({}),a=async e=>{var o,n,a,l,r,d;await ke(1);const u=Ze(e,"styles"),c=(null==(o=e.properties.values)?void 0:o.length)>0?e.properties.values:[];let p=_(s.value);p.push({id:e.id,type:u.value,value:c,show:!1});const h=p.length-1;await t.setSelectors(p);let m=null==(l=null==(a=null==(n=i.value[e.id])?void 0:n._)?void 0:a.vnode)?void 0:l.el;if(!m)return;let g=e.addDOMWidget("select_styles","btn",m);e.properties.values||e.setProperty("values",[]),p[h].show=!0,await t.setSelectors(p);let f=u.value;Object.defineProperty(u,"value",{set:s=>{f=s,p[h].type=s,e.properties.values=[],p[h].value=[],t.setSelectors(p)},get:e=>f}),Object.defineProperty(g,"value",{set:e=>{setTimeout((s=>{p[h].value=e.split(","),t.setSelectors(p)}),150)},get:t=>{var o,n;return e.properties.values=(null==(n=null==(o=s.value)?void 0:o[h])?void 0:n.value)||[],e.properties.values.join(",")}}),((null==(r=e.size)?void 0:r[0])<150||(null==(d=e.size)?void 0:d[1])<150)&&e.setSize([425,500]);const y=e.onRemoved;e.onRemoved=function(){if(y&&(null==y||y.apply(this,arguments)),void 0!==s.value.findIndex((t=>t.id==e.id))){let e=_(s.value);e.splice(h,1),t.setSelectors(e)}return y}},l=k({}),r=async e=>{var s,n,i,a;await ke(1);const r=Ze(e,"method"),d=(null==(s=e.properties.values)?void 0:s.length)>0?e.properties.values:[];let u=_(o.value);u.push({id:e.id,type:r.value,value:d,show:!1});const c=u.length-1;await t.setSegSelectors(u);let p=null==(a=null==(i=null==(n=l.value[e.id])?void 0:n._)?void 0:i.vnode)?void 0:a.el;if(!p)return;let h=e.addDOMWidget("mask_components","btn",p);e.properties.values||e.setProperty("values",[]),u[c].show=!0,await t.setSegSelectors(u);let m=r.value;Object.defineProperty(r,"value",{set:s=>{m=s,u[c].type=s,e.properties.values=[],u[c].value=[],Xe(e,Ze(e,"confidence"),"selfie_multiclass_256x256"===m),e.setSize([300,"selfie_multiclass_256x256"===m?260:500]),t.setSegSelectors(u)},get:e=>m}),Object.defineProperty(h,"value",{set:e=>{setTimeout((s=>{u[c].value=e.split(","),t.setSegSelectors(u)}),150)},get:t=>{var s;return e.properties.values=(null==(s=o.value)?void 0:s[c].value)||[],e.properties.values.join(",")}}),Xe(e,Ze(e,"confidence"),"selfie_multiclass_256x256"===m),e.setSize([300,"selfie_multiclass_256x256"===m?260:500]);const g=e.onRemoved;e.onRemoved=function(){if(g&&(null==g||g.apply(this,arguments)),void 0!==o.value.findIndex((t=>t.id==e.id))){let e=_(o.value);e.splice(c,1),t.setSegSelectors(e)}return g}},d=k({}),u=async e=>{var s,o,i,a;await ke(1);const l=Ze(e,"mode"),r=Ze(e,"model_type"),u=(null==(s=e.properties.values)?void 0:s.length)>0?e.properties.values:[];let c=_(n.value);c.push({id:e.id,type:r.value,mode:l.value,value:u,show:!1});const p=c.length-1;await t.setSliderControls(c);let h=null==(a=null==(i=null==(o=d.value[e.id])?void 0:o._)?void 0:i.vnode)?void 0:a.el;if(!h)return;let m=e.addDOMWidget("values","btn",h);e.properties.values||e.setProperty("values",[]),Object.defineProperty(m,"value",{set:function(){},get:t=>{var s;const o=(null==(s=n.value)?void 0:s[p].value)||[];return e.properties.values=o.map(((e,t)=>`${t}:${e.value}`)),e.properties.values.join(",")}}),e.setSize("sdxl"==r.value?[375,320]:[455,320]),r.callback=s=>{c=_(n.value),c[p].type!=s&&(e.setSize("sdxl"==s?[375,320]:[455,320]),c[p].value=[],c[p].type=s,t.setSliderControls(c))};const g=e.onRemoved;e.onRemoved=function(){if(g&&(null==g||g.apply(this,arguments)),void 0!==n.value.findIndex((t=>t.id==e.id))){let e=_(n.value);e.splice(p,1),t.setSliderControls(e)}return g}};return j((e=>{$.registerExtension({name:"Comfy.EasyUse.Components",async beforeRegisterNodeDef(e,t){const s=e.prototype.onNodeCreated;"easy stylesSelector"==t.name&&(e.prototype.onNodeCreated=async function(){return s&&(null==s||s.apply(this,arguments)),await a(this),s}),"easy humanSegmentation"==t.name&&(e.prototype.onNodeCreated=async function(){return s&&(null==s||s.apply(this,arguments)),await r(this),s}),"easy sliderControl"==t.name&&(e.prototype.onNodeCreated=async function(){return s&&(null==s||s.apply(this,arguments)),await u(this),s}),"easy poseEditor"==t.name&&(e.prototype.onNodeCreated=async function(){s&&(null==s||s.apply(this,arguments));const e=document.createElement("div");return e.className="comfyui-easyuse-poseEditor",e.innerHTML='
This node is about to be removed, you can use ComfyUI_Custom_Nodes_AlekPet to replace it.
',this.addDOMWidget("editor","btn",e),s})}})})),(e,a)=>(N(),T(O,null,[(N(!0),T(O,null,B(P(s),((e,o)=>(N(),W(io,{ref_for:!0,ref:t=>{t&&(i.value[e.id]=t)},type:e.type,key:o,id:e.id,show:e.show,selectedStyles:e.value,onChooseStyle:e=>((e,o)=>{let n=_(s.value);n[o].value=e,t.setSelectors(n)})(e,o)},null,8,["type","id","show","selectedStyles","onChooseStyle"])))),128)),(N(!0),T(O,null,B(P(o),((e,s)=>(N(),W(co,{ref_for:!0,ref:t=>{t&&(l.value[e.id]=t)},type:e.type,key:s,id:e.id,show:e.show,selected:e.value,onSelect:e=>((e,s)=>{let n=_(o.value);n[s].value=e,t.setSegSelectors(n)})(e,s)},null,8,["type","id","show","selected","onSelect"])))),128)),(N(!0),T(O,null,B(P(n),((e,s)=>(N(),W(fo,{ref_for:!0,ref:t=>{t&&(d.value[e.id]=t)},type:e.type,key:s,id:e.id,show:e.show,mode:e.mode,values:e.value,onChangeValues:e=>((e,s)=>{let o=_(n.value);o[s].value=e,t.setSliderControls(o)})(e,s),onShowSlider:e=>(e=>{let s=_(n.value);s[e].show=!0,t.setSliderControls(s)})(s)},null,8,["type","id","show","mode","values","onChangeValues","onShowSlider"])))),128))],64))}},vo={class:"no-result-placeholder"},_o={class:"no-result-placeholder-content"},wo={key:0},bo={__name:"noResultsPlaceholder",props:{icon:{type:String,default:"",required:!1},iconSize:{type:String,default:"3rem",required:!1},title:{type:String,required:!0},message:{type:String,required:!1},buttonLabel:{type:String,default:"",required:!1}},emits:["action"],setup:e=>(t,s)=>(N(),T("div",vo,[Y(P(S),null,{content:V((()=>[D("div",_o,[D("i",{class:R(e.icon),style:H({"font-size":e.iconSize,"margin-bottom":".5rem"})},null,6),D("h3",null,U(e.title),1),e.message?(N(),T("p",wo,U(e.message),1)):z("",!0),e.buttonLabel?(N(),W(P(A),{key:1,label:e.buttonLabel,onClick:s[0]||(s[0]=e=>t.$emit("action")),class:"p-button-text"},null,8,["label"])):z("",!0)])])),_:1})]))},Ao={class:"left flex-1"},So={key:1,class:"edit"},Eo={key:2,class:"label"},Co={class:"right toolbar"},Lo={key:0,class:"nodes"},ko={__name:"group",props:{item:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup(e){const t=e,s=xe(),o=k(!1),n=k(null),i=k(""),a=e=>{var o,n;let i=t.item;if(!(null==(o=i.info)?void 0:o.is_edit)&&(null==(n=i.children)?void 0:n.length)>0){let e=$.canvas.graph._groups.find((e=>e.pos[0]==i.info.pos[0]&&e.pos[1]==i.info.pos[1]));e&&(e.show_nodes=!e.show_nodes,s.setGroups($.canvas.graph._groups))}},l=async()=>{let e=t.item,n=$.canvas.graph._groups.find((t=>t.pos[0]==e.info.pos[0]&&t.pos[1]==e.info.pos[1]));n?(n.is_edit=!1,n.title=i.value,await s.setGroups($.canvas.graph._groups),o.value=!1):o.value=!1};return(r,d)=>{var u,c,p;return N(),T(O,null,[D("div",{class:R("comfyui-easyuse-map-nodes-group"),onClick:a},[D("div",Ao,[e.item.children?(N(),T("i",{key:0,class:R(["icon",e.item.info.show_nodes?"pi pi-folder-open":"pi pi-folder"]),style:H({color:e.item.info.color})},null,6)):z("",!0),(null==(u=e.item.info)?void 0:u.is_edit)?(N(),T("div",So,[Y(P(E),{ref_key:"modifyRef",ref:n,modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=e=>i.value=e),variant:"outline",size:"small",type:"text",onBlur:l,onKeydown:[Z(l,["enter"]),Z(l,["esc"])],style:{width:"100%"}},null,8,["modelValue"])])):(N(),T("div",Eo,[D("span",{onDblclick:d[1]||(d[1]=F((a=>(async()=>{var e,a;if(o.value)return;let l=t.item,r=$.canvas.graph._groups.find((e=>e.pos[0]==l.info.pos[0]&&e.pos[1]==l.info.pos[1]));r&&(r.is_edit=!r.is_edit,i.value=r.is_edit?l.info.title:"",await s.setGroups($.canvas.graph._groups),o.value=!0,null==(a=null==(e=n.value)?void 0:e[0])||a.$el.focus())})(e.item)),["stop"]))},U(e.item.info.title),33)]))]),D("div",Co,[(null==(c=e.item.children)?void 0:c.length)>0?(N(),W(P(A),{key:0,size:"small",icon:e.item.children.find((e=>e.mode==P(fe).ALWAYS))?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:d[2]||(d[2]=F((e=>r.$emit("changeMode")),["stop"])),onMousedown:d[3]||(d[3]=F((e=>r.$emit("mousedown")),["stop"])),onMouseup:d[4]||(d[4]=F((e=>r.$emit("mouseup")),["stop"]))},null,8,["icon"])):z("",!0)])]),(null==(p=e.item.children)?void 0:p.length)>0&&e.item.info.show_nodes?(N(),T("div",Lo,[X(r.$slots,"default")])):z("",!0)],64)}}},xo={key:1,class:"label error"},Io={class:"right toolbar"},No={__name:"node",props:{node:{type:Object,default:{}}},emits:["mousedown","mouseup","changeMode"],setup:e=>(t,s)=>(N(),T("div",{draggable:!1,class:R(["comfyui-easyuse-map-nodes-node",{never:void 0!==e.node.mode&&e.node.mode==P(fe).NEVER},{bypass:void 0!==e.node.mode&&e.node.mode==P(fe).BYPASS}])},[void 0!==e.node.title?(N(),T("span",{key:0,class:"label",onDblclick:s[0]||(s[0]=F((t=>P(tt)(e.node.id)),["stop"]))},U(e.node.title),33)):(N(),T("span",xo,U(e.node.type),1)),D("div",Io,[Y(P(A),{size:"small",icon:e.node.mode==P(fe).ALWAYS?"pi pi-eye":"pi pi-eye-slash",text:"",rounded:"",severity:"secondary",onClick:s[1]||(s[1]=F((e=>t.$emit("changeMode")),["stop"])),onMousedown:s[2]||(s[2]=F((e=>t.$emit("mousedown")),["stop"])),onMouseup:s[3]||(s[3]=F((e=>t.$emit("mouseup")),["stop"]))},null,8,["icon"])])],2))},To={class:"title"},Oo={class:"toolbar"},Do={key:0},Ro=["onDragstart","onDragend","onDragover"],Mo={key:1,class:"no_result",style:{height:"100%"}},Go="comfyui-easyuse-map-nodes",Po={__name:"nodesMap",emits:["handleHeader"],setup(e){const t=xe(),{groups_nodes:s,groups:o}=b(t),n=k(!1),i=e=>{n.value=!n.value,$.canvas.graph._groups.forEach((e=>{e.show_nodes=n.value})),t.setGroups($.canvas.graph._groups)};let a,l=0,r=0,d=!1;const u=(e,s=!1)=>{if(d)return void(d=!1);const o=e.children.find((e=>e.mode==fe.ALWAYS)),n=e.children.map((e=>e.id));$.canvas.graph._nodes.forEach((e=>{n.includes(e.id)&&(e.mode=o?s?fe.NEVER:fe.BYPASS:fe.ALWAYS,e.graph.change())})),t.setNodes($.canvas.graph._nodes)},c=(e,s=!1)=>{if(d)return void(d=!1);const o=e.mode==fe.ALWAYS,n=$.canvas.graph._nodes.find((t=>t.id==e.id));n&&(n.mode=o?s?fe.NEVER:fe.BYPASS:fe.ALWAYS,n.graph.change(),t.setNodes($.canvas.graph._nodes))},p=(e,t="group")=>{l=(new Date).getTime(),clearTimeout(a),a=setTimeout((s=>{"group"==t?u(e,!0):c(e,!0)}),500)},h=e=>{r=(new Date).getTime(),r-l>500&&(d=!0),clearTimeout(a)};let m=k(null),g=k(null);k(!1);return(e,a)=>{var l,r;return N(),T("div",{class:R(Go)},[D("div",{class:R(Go+"__header"),onMousedown:a[0]||(a[0]=t=>e.$emit("handleHeader",t))},[D("div",To,U(P(Ce)("Nodes Map",!0)),1),D("div",Oo,[(null==(l=P(o))?void 0:l.length)>0?M((N(),W(P(A),{key:0,icon:n.value?"pi pi-angle-double-down":"pi pi-angle-double-up",text:"",rounded:"",severity:"secondary",onClick:F(i,["stop"]),size:"small"},null,8,["icon"])),[[P(C),n.value?P(Ce)("Collapse All"):P(Ce)("Expand All"),void 0,{top:!0}]]):z("",!0),X(e.$slots,"icon")])],34),D("div",{class:R(Go+"__content")},[(null==(r=P(s))?void 0:r.length)>0?(N(),T("ol",Do,[(N(!0),T(O,null,B(P(s),((e,s)=>(N(),T("li",{key:s,onDragstart:e=>((e,t)=>{m.value=t,e.currentTarget.style.opacity="0.6",e.currentTarget.style.border="1px dashed yellow",e.dataTransfer.effectAllowed="move"})(e,s),onDragend:e=>(e=>{if(e.target.style.opacity="1",e.currentTarget.style.border="1px dashed transparent","Manual drag&drop sorting"!==le("EasyUse.NodesMap.Sorting"))return void ht.warn(Ce("For drag and drop sorting, please find Nodes map sorting mode in Settings->EasyUse and change it to manual"));let s=$.canvas.graph._groups,o=s[m.value],n=s[g.value];$.canvas.graph._groups[m.value]=n,$.canvas.graph._groups[g.value]=o,t.setGroups($.canvas.graph._groups)})(e),onDragover:e=>((e,t)=>{e.preventDefault(),e.currentIndex!=m.value&&(g.value=t)})(e,s),draggable:!0},[void 0!==e.children?(N(),W(ko,{key:0,item:e,onChangeMode:t=>u(e),onMousedown:t=>p(e,"group"),onMouseup:h},{default:V((()=>[(N(!0),T(O,null,B(e.children,((e,t)=>(N(),W(No,{key:t,node:e,onChangeMode:t=>c(e),onMousedown:t=>p(e,"node"),onMouseup:h},null,8,["node","onChangeMode","onMousedown"])))),128))])),_:2},1032,["item","onChangeMode","onMousedown"])):(N(),W(No,{key:1,node:e.info,onChangeMode:t=>c(e.info),onMousedown:t=>p(e.info,"node"),onMouseup:h},null,8,["node","onChangeMode","onMousedown"]))],40,Ro)))),128))])):(N(),T("div",Mo,[Y(bo,{icon:"pi pi-sitemap",title:P(Ce)("No Nodes",!0),message:P(Ce)("No nodes found in the map",!0)},null,8,["title","message"])]))],2)])}}},Bo=[D("svg",{class:"icon",t:"1714565543756",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"22538",width:"200",height:"200"},[D("path",{d:"M871.616 64H152.384c-31.488 0-60.416 25.28-60.416 58.24v779.52c0 32.896 26.24 58.24 60.352 58.24h719.232c34.112 0 60.352-25.344 60.352-58.24V122.24c0.128-32.96-28.8-58.24-60.288-58.24zM286.272 512c-23.616 0-44.672-20.224-44.672-43.008 0-22.784 20.992-43.008 44.608-43.008 23.616 0 44.608 20.224 44.608 43.008A43.328 43.328 0 0 1 286.272 512z m0-202.496c-23.616 0-44.608-20.224-44.608-43.008 0-22.784 20.992-43.008 44.608-43.008 23.616 0 44.608 20.224 44.608 43.008a43.456 43.456 0 0 1-44.608 43.008zM737.728 512H435.904c-23.68 0-44.672-20.224-44.672-43.008 0-22.784 20.992-43.008 44.608-43.008h299.264c23.616 0 44.608 20.224 44.608 43.008a42.752 42.752 0 0 1-41.984 43.008z m0-202.496H435.904c-23.616 0-44.608-20.224-44.608-43.008 0-22.784 20.992-43.008 44.608-43.008h299.264c23.616 0 44.608 20.224 44.608 43.008a42.88 42.88 0 0 1-42.048 43.008z","p-id":"22539",fill:"currentColor"})],-1)],Fo=[D("svg",{class:"icon",t:"1714565020764",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7999",width:"200",height:"200"},[D("path",{d:"M810.438503 379.664884l-71.187166-12.777183C737.426025 180.705882 542.117647 14.602496 532.991087 7.301248c-12.777184-10.951872-32.855615-10.951872-47.45811 0-9.12656 7.301248-204.434938 175.229947-206.26025 359.586453l-67.536542 10.951871c-18.253119 3.650624-31.030303 18.253119-31.030303 36.506239v189.832442c0 10.951872 5.475936 21.903743 12.777184 27.379679 7.301248 5.475936 14.602496 9.12656 23.729055 9.12656h5.475936l133.247772-23.729055c40.156863 47.458111 91.265597 73.012478 151.500891 73.012477 60.235294 0 111.344029-27.379679 151.500891-74.837789l136.898396 23.729055h5.475936c9.12656 0 16.427807-3.650624 23.729055-9.12656 9.12656-7.301248 12.777184-16.427807 12.777184-27.379679V412.520499c1.825312-14.602496-10.951872-29.204991-27.379679-32.855615zM620.606061 766.631016H401.568627c-20.078431 0-36.506239 16.427807-36.506238 36.506239v109.518716c0 14.602496 9.12656 29.204991 23.729055 34.680927 14.602496 5.475936 31.030303 1.825312 40.156863-9.126559l16.427807-18.25312 32.855615 80.313726c5.475936 14.602496 18.253119 23.729055 34.680927 23.729055 16.427807 0 27.379679-9.12656 34.680927-23.729055l32.855615-80.313726 16.427807 18.25312c10.951872 10.951872 25.554367 14.602496 40.156863 9.126559 14.602496-5.475936 23.729055-18.253119 23.729055-34.680927v-109.518716c-3.650624-20.078431-20.078431-36.506239-40.156862-36.506239z",fill:"currentColor","p-id":"8000"})],-1)],Uo="comfyui-easyuse-toolbar",zo={__name:"index",setup(e){const t=xe(),s=k(!1);x((e=>s.value),(e=>{e?t.watchGraph(!0):t.unwatchGraph()}));const o=k(null),n=e=>{const t=o.value;var s=e.clientX||0,n=e.clientY||0,i=t.offsetLeft,a=t.offsetTop;function l(e){var o=e.clientX,l=e.clientY,r=o-s,d=l-n;t.style.left=i+r+"px",t.style.top=a+d+"px"}document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",e)}))};return(e,t)=>(N(),T(O,null,[D("div",{class:R(["flex-c",Uo])},[D("div",{class:R(["group flex-c",Uo+"-icon"]),onClick:t[0]||(t[0]=e=>s.value=!s.value)},Bo,2),D("div",{class:R(["rocket flex-c",Uo+"-icon"]),onClick:t[1]||(t[1]=(...e)=>P(bt)&&P(bt)(...e))},Fo,2)]),s.value?(N(),T("div",{key:0,ref_key:"nodesMapRef",ref:o,class:R(Uo+"-nodes-map")},[Y(Po,{onHandleHeader:n},{icon:V((()=>[M(Y(P(A),{icon:"pi pi-times",text:"",rounded:"",severity:"secondary",onClick:t[2]||(t[2]=e=>s.value=!1),size:"small"},null,512),[[P(C),P(Ce)("Close"),void 0,{top:!0}]])])),_:1})],2)):z("",!0)],64))}},jo={__name:"index",setup(e){const t=xe();return j((e=>{t.watchGraph()})),(e,t)=>(N(),T("div",{class:R("comfyui-easyuse-map")},[Y(Po)]))}},Ho="Comfy.UseNewMenu",Wo={__name:"App",setup(e){const t=k(le(Ho)),s=e=>{$.extensionManager.registerSidebarTab({id:ye,icon:"pi pi-sitemap",title:Ce("Nodes Map",!0),tooltip:Ce("Nodes Map",!0),type:"custom",render:e=>{e.style.height="100%",Q(K(jo,{}),e)}}),function(e,t=e=>{}){var s;const o=null==(s=$.ui.settings.settingsLookup)?void 0:s[e];o&&(o.onChange=e=>t(e))}(Ho,(e=>{t.value=e}))};return j((e=>{try{s()}catch(t){}})),(e,s)=>(N(),T(O,null,[Y(yo),"Disabled"==t.value?(N(),W(zo,{key:0})):z("",!0)],64))}},Yo=null==(g=document.getElementsByClassName("graph-canvas-container"))?void 0:g[0],Vo=document.createElement("div");Vo.id="comfyui-easyuse-components",Yo?Yo.append(Vo):document.body.append(Vo);const Zo=J(Wo);Zo.use(q),Zo.use(L()),Zo.mount("#"+Vo.id);