Initial Home Assistant commit

This commit is contained in:
francop committed 2026-06-05 22:34:31 -04:00
commit 6a58b10e6c
4494 files changed
+297833

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
"""C.A.F.E. - Visual automation editor for Home Assistant."""
from __future__ import annotations
import logging
from pathlib import Path
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType
from .const import DOMAIN
from .panel import async_register_panel, async_unregister_panel
_LOGGER = logging.getLogger(__name__)
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the C.A.F.E. component."""
# This will be called when the integration is loaded
# But actual setup happens in async_setup_entry
return True
async def async_setup_entry(hass: HomeAssistant, entry) -> bool:
"""Set up C.A.F.E. from a config entry."""
# Register the panel (frontend)
await async_register_panel(hass)
_LOGGER.info("C.A.F.E. integration set up successfully")
return True
async def async_unload_entry(hass: HomeAssistant, entry) -> bool:
"""Unload a config entry."""
async_unregister_panel(hass)
return True
+53
View File
@@ -0,0 +1,53 @@
"""Config flow for C.A.F.E. integration."""
from __future__ import annotations
import logging
from typing import Any
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
STEP_USER_DATA_SCHEMA = vol.Schema({})
class CafeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for C.A.F.E."""
VERSION = 1
async def async_step_user(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
"""Handle the initial step."""
if user_input is not None:
# Check if already configured
await self.async_set_unique_id(DOMAIN)
self._abort_if_unique_id_configured()
return self.async_create_entry(
title="C.A.F.E.",
data={}
)
return self.async_show_form(
step_id="user",
data_schema=STEP_USER_DATA_SCHEMA,
description_placeholders={
"name": "C.A.F.E.",
"description": "Visual automation editor for Home Assistant"
}
)
async def async_step_import(self, user_input: dict[str, Any]) -> FlowResult:
"""Handle import from configuration.yaml."""
await self.async_set_unique_id(DOMAIN)
self._abort_if_unique_id_configured()
return self.async_create_entry(title="C.A.F.E.", data={})
+6
View File
@@ -0,0 +1,6 @@
"""Constants for C.A.F.E.."""
DOMAIN = "cafe"
PANEL_URL = "/cafe_panel"
PANEL_TITLE = "C.A.F.E."
PANEL_ICON = "mdi:coffee-to-go"
+14
View File
@@ -0,0 +1,14 @@
{
"domain": "cafe",
"name": "C.A.F.E.",
"version": "0.6.0",
"codeowners": [],
"config_flow": true,
"dependencies": ["frontend", "http"],
"documentation": "https://github.com/FezVrasta/cafe-hass",
"documentation_url": "https://github.com/FezVrasta/cafe-hass",
"integration_type": "service",
"iot_class": "local_push",
"issue_tracker": "https://github.com/FezVrasta/cafe-hass/issues",
"requirements": []
}
+66
View File
@@ -0,0 +1,66 @@
"""Panel for C.A.F.E."""
import os
import logging
from pathlib import Path
from homeassistant.core import HomeAssistant
from homeassistant.components import frontend, panel_custom
from homeassistant.components.http import StaticPathConfig
from .const import DOMAIN, PANEL_TITLE, PANEL_ICON
_LOGGER = logging.getLogger(__name__)
PANEL_URL = f"/api/{DOMAIN}_panel"
PANEL_NAME = f"{DOMAIN}-panel"
async def async_register_panel(hass: HomeAssistant) -> None:
"""Register the C.A.F.E. panel."""
# Get the path to the www folder within the component
www_path = Path(__file__).parent / "www"
# Register static path for the frontend assets
await hass.http.async_register_static_paths([
StaticPathConfig("/cafe-hass", str(www_path), False)
])
# The panel wrapper has a fixed name (not hashed)
wrapper_path = www_path / "assets" / "panel-wrapper.js"
if not wrapper_path.exists():
_LOGGER.error("panel-wrapper.js not found in assets directory")
_LOGGER.error(f"www path: {www_path}, assets exist: {(www_path / 'assets').exists()}")
return
# Add cache-busting parameter to force fresh load
import time
cache_bust = int(time.time())
module_url = f"/cafe-hass/assets/panel-wrapper.js?v={cache_bust}"
# First try to unregister any existing panel
try:
hass.data.get("frontend_panels", {}).pop(DOMAIN, None)
_LOGGER.info("Removed any existing panel registration")
except:
pass
# Register the panel as a custom panel with module_url
await panel_custom.async_register_panel(
hass,
webcomponent_name=PANEL_NAME,
frontend_url_path=DOMAIN,
module_url=module_url,
sidebar_title=PANEL_TITLE,
sidebar_icon=PANEL_ICON,
require_admin=True,
config={},
config_panel_domain=DOMAIN,
)
_LOGGER.info("C.A.F.E. panel registered successfully with iframe wrapper")
def async_unregister_panel(hass: HomeAssistant) -> None:
"""Unregister the C.A.F.E. panel."""
frontend.async_remove_panel(hass, DOMAIN)
_LOGGER.info("C.A.F.E. panel unregistered")
+14
View File
@@ -0,0 +1,14 @@
{
"config": {
"title": "C.A.F.E.",
"step": {
"user": {
"title": "Set up C.A.F.E.",
"description": "C.A.F.E. is a visual automation editor for Home Assistant. It allows you to create and manage your automations using a visual flow editor.\n\nClick Submit to add C.A.F.E. to your Home Assistant."
}
},
"abort": {
"already_configured": "C.A.F.E. is already configured"
}
}
}
@@ -0,0 +1,14 @@
{
"config": {
"title": "C.A.F.E.",
"step": {
"user": {
"title": "Set up C.A.F.E.",
"description": "C.A.F.E. is a visual automation editor for Home Assistant. It allows you to create and manage your automations using a visual flow editor.\n\nClick Submit to add C.A.F.E. to your Home Assistant."
}
},
"abort": {
"already_configured": "C.A.F.E. is already configured"
}
}
}
@@ -0,0 +1,552 @@
var Y3n=Object.defineProperty;var J3n=(n,i,a)=>i in n?Y3n(n,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[i]=a;var Xf=(n,i,a)=>J3n(n,typeof i!="symbol"?i+"":i,a);function X3n(n,i){for(var a=0;a<i.length;a++){const c=i[a];if(typeof c!="string"&&!Array.isArray(c)){for(const d in c)if(d!=="default"&&!(d in n)){const g=Object.getOwnPropertyDescriptor(c,d);g&&Object.defineProperty(n,d,g.get?g:{enumerable:!0,get:()=>c[d]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const g of d)if(g.type==="childList")for(const b of g.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&c(b)}).observe(document,{childList:!0,subtree:!0});function a(d){const g={};return d.integrity&&(g.integrity=d.integrity),d.referrerPolicy&&(g.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?g.credentials="include":d.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function c(d){if(d.ep)return;d.ep=!0;const g=a(d);fetch(d.href,g)}})();var xM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vR(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var L$t={exports:{}},Tse={},M$t={exports:{}},Rs={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var dz=Symbol.for("react.element"),Z3n=Symbol.for("react.portal"),Q3n=Symbol.for("react.fragment"),eCn=Symbol.for("react.strict_mode"),tCn=Symbol.for("react.profiler"),nCn=Symbol.for("react.provider"),rCn=Symbol.for("react.context"),iCn=Symbol.for("react.forward_ref"),oCn=Symbol.for("react.suspense"),sCn=Symbol.for("react.memo"),aCn=Symbol.for("react.lazy"),MLt=Symbol.iterator;function uCn(n){return n===null||typeof n!="object"?null:(n=MLt&&n[MLt]||n["@@iterator"],typeof n=="function"?n:null)}var P$t={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j$t=Object.assign,F$t={};function R5(n,i,a){this.props=n,this.context=i,this.refs=F$t,this.updater=a||P$t}R5.prototype.isReactComponent={};R5.prototype.setState=function(n,i){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,i,"setState")};R5.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function $$t(){}$$t.prototype=R5.prototype;function dLe(n,i,a){this.props=n,this.context=i,this.refs=F$t,this.updater=a||P$t}var fLe=dLe.prototype=new $$t;fLe.constructor=dLe;j$t(fLe,R5.prototype);fLe.isPureReactComponent=!0;var PLt=Array.isArray,B$t=Object.prototype.hasOwnProperty,hLe={current:null},U$t={key:!0,ref:!0,__self:!0,__source:!0};function H$t(n,i,a){var c,d={},g=null,b=null;if(i!=null)for(c in i.ref!==void 0&&(b=i.ref),i.key!==void 0&&(g=""+i.key),i)B$t.call(i,c)&&!U$t.hasOwnProperty(c)&&(d[c]=i[c]);var w=arguments.length-2;if(w===1)d.children=a;else if(1<w){for(var E=Array(w),S=0;S<w;S++)E[S]=arguments[S+2];d.children=E}if(n&&n.defaultProps)for(c in w=n.defaultProps,w)d[c]===void 0&&(d[c]=w[c]);return{$$typeof:dz,type:n,key:g,ref:b,props:d,_owner:hLe.current}}function cCn(n,i){return{$$typeof:dz,type:n.type,key:i,ref:n.ref,props:n.props,_owner:n._owner}}function pLe(n){return typeof n=="object"&&n!==null&&n.$$typeof===dz}function lCn(n){var i={"=":"=0",":":"=2"};return"$"+n.replace(/[=:]/g,function(a){return i[a]})}var jLt=/\/+/g;function J3e(n,i){return typeof n=="object"&&n!==null&&n.key!=null?lCn(""+n.key):i.toString(36)}function Mie(n,i,a,c,d){var g=typeof n;(g==="undefined"||g==="boolean")&&(n=null);var b=!1;if(n===null)b=!0;else switch(g){case"string":case"number":b=!0;break;case"object":switch(n.$$typeof){case dz:case Z3n:b=!0}}if(b)return b=n,d=d(b),n=c===""?"."+J3e(b,0):c,PLt(d)?(a="",n!=null&&(a=n.replace(jLt,"$&/")+"/"),Mie(d,i,a,"",function(S){return S})):d!=null&&(pLe(d)&&(d=cCn(d,a+(!d.key||b&&b.key===d.key?"":(""+d.key).replace(jLt,"$&/")+"/")+n)),i.push(d)),1;if(b=0,c=c===""?".":c+":",PLt(n))for(var w=0;w<n.length;w++){g=n[w];var E=c+J3e(g,w);b+=Mie(g,i,a,E,d)}else if(E=uCn(n),typeof E=="function")for(n=E.call(n),w=0;!(g=n.next()).done;)g=g.value,E=c+J3e(g,w++),b+=Mie(g,i,a,E,d);else if(g==="object")throw i=String(n),Error("Objects are not valid as a React child (found: "+(i==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.");return b}function Gre(n,i,a){if(n==null)return n;var c=[],d=0;return Mie(n,c,"","",function(g){return i.call(a,g,d++)}),c}function dCn(n){if(n._status===-1){var i=n._result;i=i(),i.then(function(a){(n._status===0||n._status===-1)&&(n._status=1,n._result=a)},function(a){(n._status===0||n._status===-1)&&(n._status=2,n._result=a)}),n._status===-1&&(n._status=0,n._result=i)}if(n._status===1)return n._result.default;throw n._result}var qg={current:null},Pie={transition:null},fCn={ReactCurrentDispatcher:qg,ReactCurrentBatchConfig:Pie,ReactCurrentOwner:hLe};function z$t(){throw Error("act(...) is not supported in production builds of React.")}Rs.Children={map:Gre,forEach:function(n,i,a){Gre(n,function(){i.apply(this,arguments)},a)},count:function(n){var i=0;return Gre(n,function(){i++}),i},toArray:function(n){return Gre(n,function(i){return i})||[]},only:function(n){if(!pLe(n))throw Error("React.Children.only expected to receive a single React element child.");return n}};Rs.Component=R5;Rs.Fragment=Q3n;Rs.Profiler=tCn;Rs.PureComponent=dLe;Rs.StrictMode=eCn;Rs.Suspense=oCn;Rs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fCn;Rs.act=z$t;Rs.cloneElement=function(n,i,a){if(n==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+n+".");var c=j$t({},n.props),d=n.key,g=n.ref,b=n._owner;if(i!=null){if(i.ref!==void 0&&(g=i.ref,b=hLe.current),i.key!==void 0&&(d=""+i.key),n.type&&n.type.defaultProps)var w=n.type.defaultProps;for(E in i)B$t.call(i,E)&&!U$t.hasOwnProperty(E)&&(c[E]=i[E]===void 0&&w!==void 0?w[E]:i[E])}var E=arguments.length-2;if(E===1)c.children=a;else if(1<E){w=Array(E);for(var S=0;S<E;S++)w[S]=arguments[S+2];c.children=w}return{$$typeof:dz,type:n.type,key:d,ref:g,props:c,_owner:b}};Rs.createCoLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var hCn=z,pCn=Symbol.for("react.element"),gCn=Symbol.for("react.fragment"),bCn=Object.prototype.hasOwnProperty,mCn=hCn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,wCn={key:!0,ref:!0,__self:!0,__source:!0};function G$t(n,i,a){var c,d={},g=null,b=null;a!==void 0&&(g=""+a),i.key!==void 0&&(g=""+i.key),i.ref!==void 0&&(b=i.ref);for(c in i)bCn.call(i,c)&&!wCn.hasOwnProperty(c)&&(d[c]=i[c]);if(n&&n.defaultProps)for(c in i=n.defaultProps,i)d[c]===void 0&&(d[c]=i[c]);return{$$typeof:pCn,type:n,key:g,ref:b,props:d,_owner:mCn.current}}Tse.Fragment=gCn;Tse.jsx=G$t;Tse.jsxs=G$t;L$t.exports=Tse;var O=L$t.exports,uoe={},q$t={exports:{}},Hm={},V$t={exports:{}},W$t={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(n){function i(Te,ke){var Je=Te.length;Te.push(ke);e:for(;0<Je;){var bt=Je-1>>>1,qe=Te[bt];if(0<d(qe,ke))Te[bt]=ke,Te[Je]=qe,Je=bt;else break e}}function a(Te){return Te.length===0?null:Te[0]}function c(Te){if(Te.length===0)return null;var ke=Te[0],Je=Te.pop();if(Je!==ke){Te[0]=Je;e:for(var bt=0,qe=Te.length,_t=qe>>>1;bt<_t;){var At=2*(bt+1)-1,ft=Te[At],Kt=At+1,kt=Te[Kt];if(0>d(ft,Je))Kt<qe&&0>d(kt,ft)?(Te[bt]=kt,Te[Kt]=Je,bt=Kt):(Te[bt]=ft,Te[At]=Je,bt=At);else if(Kt<qe&&0>d(kt,Je))Te[bt]=kt,Te[Kt]=Je,bt=Kt;else break e}}return ke}function d(Te,ke){var Je=Te.sortIndex-ke.sortIndex;return Je!==0?Je:Te.id-ke.id}if(typeof performance=="object"&&typeof performance.now=="function"){var g=performance;n.unstable_now=function(){return g.now()}}else{var b=Date,w=b.now();n.unstable_now=function(){return b.now()-w}}var E=[],S=[],k=1,_=null,C=3,R=!1,M=!1,D=!1,B=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(Te){for(var ke=a(S);ke!==null;){if(ke.callback===null)c(S);else if(ke.startTime<=Te)c(S),ke.sortIndex=ke.expirationTime,i(E,ke);else break;ke=a(S)}}function H(Te){if(D=!1,P(Te),!M)if(a(E)!==null)M=!0,Se(Q);else{var ke=a(S);ke!==null&&$e(H,ke.startTime-Te)}}function Q(Te,ke){M=!1,D&&(D=!1,F(ae),ae=-1),R=!0;var Je=C;try{for(P(ke),_=a(E);_!==null&&(!(_.expirationTime>ke)||Te&&!de());){var bt=_.callback;if(typeof bt=="function"){_.callback=null,C=_.priorityLevel;var qe=bt(_.expirationTime<=ke);ke=n.unstable_now(),typeof qe=="function"?_.callback=qe:_===a(E)&&c(E),P(ke)}else c(E);_=a(E)}if(_!==null)var _t=!0;else{var At=a(S);At!==null&&$e(H,At.startTime-ke),_t=!1}return _t}finally{_=null,C=Je,R=!1}}var re=!1,ee=null,ae=-1,he=5,ve=-1;function de(){return!(n.unstable_now()-ve<he)}function ge(){if(ee!==null){var Te=n.unstable_now();ve=Te;var ke=!0;try{ke=ee(!0,Te)}finally{ke?Y():(re=!1,ee=null)}}else re=!1}var Y;if(typeof $=="function")Y=function(){$(ge)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,De=fe.port2;fe.port1.onmessage=ge,Y=function(){De.postMessage(null)}}else Y=function(){B(ge,0)};function Se(Te){ee=Te,re||(re=!0,Y())}function $e(Te,ke){ae=B(function(){Te(n.unstable_now())},ke)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Te){Te.callback=null},n.unstable_continueExecution=function(){M||R||(M=!0,Se(Q))},n.unstable_forceFrameRate=function(Te){0>Te||125<Te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<Te?Math.floor(1e3/Te):5},n.unstable_getCurrentPriorityLevel=function(){return C},n.unstable_getFirstCallbackNode=function(){return a(E)},n.unstable_next=function(Te){switch(C){case 1:case 2:case 3:var ke=3;break;default:ke=C}var Je=C;C=ke;try{return Te()}finally{C=Je}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(Te,ke){switch(Te){case 1:case 2:case 3:case 4:case 5:break;default:Te=3}var Je=C;C=Te;try{return ke()}finally{C=Je}},n.unstable_scheduleCallback=function(Te,ke,Je){var bt=n.unstable_now();switch(typeof Je=="object"&&Je!==null?(Je=Je.delay,Je=typeof Je=="number"&&0<Je?bt+Je:bt):Je=bt,Te){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=Je+qe,Te={id:k++,callback:ke,priorityLevel:Te,startTime:Je,expirationTime:qe,sortIndex:-1},Je>bt?(Te.sortIndex=Je,i(S,Te),a(E)===null&&Te===a(S)&&(D?(F(ae),ae=-1):D=!0,$e(H,Je-bt))):(Te.sortIndex=qe,i(E,Te),M||R||(M=!0,Se(Q))),Te},n.unstable_shouldYield=de,n.unstable_wrapCallback=function(Te){var ke=C;return function(){var Je=C;C=ke;try{return Te.apply(this,arguments)}finally{C=Je}}}})(W$t);V$t.exports=W$t;var yCn=V$t.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var vCn=z,Bm=yCn;function ir(n){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var K$t=new Set,AH={};function ER(n,i){c5(n,i),c5(n+"Capture",i)}function c5(n,i){for(AH[n]=i,n=0;n<i.length;n++)K$t.add(i[n])}var hA=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JOe=Object.prototype.hasOwnProperty,ECn=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,FLt={},$Lt={};function SCn(n){return JOe.call($Lt,n)?!0:JOe.call(FLt,n)?!1:ECn.test(n)?$Lt[n]=!0:(FLt[n]=!0,!1)}function TCn(n,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function ACn(n,i,a,c){if(i===null||typeof i>"u"||TCn(n,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function Vg(n,i,a,c,d,g,b){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=d,this.mustUseProperty=a,this.propertyName=n,this.type=i,this.sanitizeURL=g,this.removeEmptyString=b}var $h={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){$h[n]=new Vg(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var i=n[0];$h[i]=new Vg(i,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){$h[n]=new Vg(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){$h[n]=new Vg(n,2,!1,n,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){$h[n]=new Vg(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){$h[n]=new Vg(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){$h[n]=new Vg(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){$h[n]=new Vg(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){$h[n]=new Vg(n,5,!1,n.toLowerCase(),null,!1,!1)});var bLe=/[\-:]([a-z])/g;function mLe(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var i=n.replace(bLe,mLe);$h[i]=new Vg(i,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var i=n.replace(bLe,mLe);$h[i]=new Vg(i,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var i=n.replace(bLe,mLe);$h[i]=new Vg(i,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){$h[n]=new Vg(n,1,!1,n.toLowerCase(),null,!1,!1)});$h.xlinkHref=new Vg("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){$h[n]=new Vg(n,1,!1,n.toLowerCase(),null,!0,!0)});function wLe(n,i,a,c){var d=$h.hasOwnProperty(i)?$h[i]:null;(d!==null?d.type!==0:c||!(2<i. Line truncated
`+X3e+n}var Z3e=!1;function Q3e(n,i){if(!n||Z3e)return"";Z3e=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(S){var c=S}Reflect.construct(n,[],i)}else{try{i.call()}catch(S){c=S}n.call(i.prototype)}else{try{throw Error()}catch(S){c=S}n()}}catch(S){if(S&&c&&typeof S.stack=="string"){for(var d=S.stack.split(`
`),g=c.stack.split(`
`),b=d.length-1,w=g.length-1;1<=b&&0<=w&&d[b]!==g[w];)w--;for(;1<=b&&0<=w;b--,w--)if(d[b]!==g[w]){if(b!==1||w!==1)do if(b--,w--,0>w||d[b]!==g[w]){var E=`
`+d[b].replace(" at new "," at ");return n.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",n.displayName)),E}while(1<=b&&0<=w);break}}}finally{Z3e=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?GU(n):""}function _Cn(n){switch(n.tag){case 5:return GU(n.type);case 16:return GU("Lazy");case 13:return GU("Suspense");case 19:return GU("SuspenseList");case 0:case 2:case 15:return n=Q3e(n.type,!1),n;case 11:return n=Q3e(n.type.render,!1),n;case 1:return n=Q3e(n.type,!0),n;default:return""}}function e6e(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case CM:return"Fragment";case NM:return"Portal";case XOe:return"Profiler";case yLe:return"StrictMode";case ZOe:return"Suspense";case QOe:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case J$t:return(n.displayName||"Context")+".Consumer";case Y$t:return(n._context.displayName||"Context")+".Provider";case vLe:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case ELe:return i=n.displayName||null,i!==null?i:e6e(n.type)||"Memo";case Mx:i=n._payload,n=n._init;try{return e6e(n(i))}catch{}}return null}function kCn(n){var i=n.type;switch(n.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=i.render,n=n.displayName||n.name||"",i.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return e6e(i);case 8:return i===yLe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function tN(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Z$t(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function xCn(n){var i=Z$t(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,i),c=""+n[i];if(!n.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,g=a.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return d.call(this)},set:function(b){c=""+b,g.call(this,b)}}),Object.defineProperty(n,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(b){c=""+b},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function Vre(n){n._valueTracker||(n._valueTracker=xCn(n))}function Q$t(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return n&&(c=Z$t(n)?n.checked?"true":"false":n.value),n=c,n!==a?(i.setValue(n),!0):!1}function coe(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function t6e(n,i){var a=i.checked;return fl({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function ULt(n,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=tN(i.value!=null?i.value:a),n._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function eBt(n,i){i=i.checked,i!=null&&wLe(n,"checked",i,!1)}function n6e(n,i){eBt(n,i);var a=tN(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}i.hasOwnProperty("value")?r6e(n,i.type,a):i.hasOwnProperty("defaultValue")&&r6e(n,i.type,tN(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(n.defaultChecked=!!i.defaultChecked)}function HLt(n,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+n._wrapperState.initialValue,a||i===n.value||(n.value=i),n.defaultValue=i}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function r6e(n,i,a){(i!=="number"||coe(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var qU=Array.isArray;function WM(n,i,a,c){if(n=n.options,i){i={};for(var d=0;d<a.length;d++)i["$"+a[d]]=!0;for(a=0;a<n.length;a++)d=i.hasOwnProperty("$"+n[a].value),n[a].selected!==d&&(n[a].selected=d),d&&c&&(n[a].defaultSelected=!0)}else{for(a=""+tN(a),i=null,d=0;d<n.length;d++){if(n[d].value===a){n[d].selected=!0,c&&(n[d].defaultSelected=!0);return}i!==null||n[d].disabled||(i=n[d])}i!==null&&(i.s Line truncated
`).replace(jIn,"")}function eie(n,i,a){if(i=dMt(i),dMt(n)!==i&&a)throw Error(ir(425))}function moe(){}var m6e=null,w6e=null;function y6e(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var v6e=typeof setTimeout=="function"?setTimeout:void 0,FIn=typeof clearTimeout=="function"?clearTimeout:void 0,fMt=typeof Promise=="function"?Promise:void 0,$In=typeof queueMicrotask=="function"?queueMicrotask:typeof fMt<"u"?function(n){return fMt.resolve(null).then(n).catch(BIn)}:v6e;function BIn(n){setTimeout(function(){throw n})}function fCe(n,i){var a=i,c=0;do{var d=a.nextSibling;if(n.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"){if(c===0){n.removeChild(d),CH(i);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=d}while(a);CH(i)}function Wx(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return n}function hMt(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return n;i--}else a==="/$"&&i++}n=n.previousSibling}return null}var D5=Math.random().toString(36).slice(2),R2="__reactFiber$"+D5,LH="__reactProps$"+D5,pA="__reactContainer$"+D5,E6e="__reactEvents$"+D5,UIn="__reactListeners$"+D5,HIn="__reactHandles$"+D5;function V4(n){var i=n[R2];if(i)return i;for(var a=n.parentNode;a;){if(i=a[pA]||a[R2]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(n=hMt(n);n!==null;){if(a=n[R2])return a;n=hMt(n)}return i}n=a,a=n.parentNode}return null}function pz(n){return n=n[R2]||n[pA],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function DM(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(ir(33))}function Nse(n){return n[LH]||null}var S6e=[],LM=-1;function gN(n){return{current:n}}function dc(n){0>LM||(n.current=S6e[LM],S6e[LM]=null,LM--)}function Vu(n,i){LM++,S6e[LM]=n.current,n.current=i}var nN={},Bp=gN(nN),cb=gN(!1),nR=nN;function l5(n,i){var a=n.type.contextTypes;if(!a)return nN;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var d={},g;for(g in a)d[g]=i[g];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=d),d}function lb(n){return n=n.childContextTypes,n!=null}function woe(){dc(cb),dc(Bp)}function pMt(n,i,a){if(Bp.current!==nN)throw Error(ir(168));Vu(Bp,i),Vu(cb,a)}function HBt(n,i,a){var c=n.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var d in c)if(!(d in i))throw Error(ir(108,kCn(n)||"Unknown",d));return fl({},a,c)}function yoe(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||nN,nR=Bp.current,Vu(Bp,n),Vu(cb,cb.current),!0}function gMt(n,i,a){var c=n.stateNode;if(!c)throw Error(ir(169));a?(n=HBt(n,i,nR),c.__reactInternalMemoizedMergedChildContext=n,dc(cb),dc(Bp),Vu(Bp,n)):dc(cb),Vu(cb,a)}var rA=null,Cse=!1,hCe=!1;function zBt(n){rA===null?rA=[n]:rA.push(n)}function zIn(n){Cse=!0,zBt(n)}function bN(){if(!hCe&&rA!==null){hCe=!0;var n=0,i=cu;try{var a=rA;for(cu=1;n<a.length;n++){var c=a[n];do c=c(!0);while(c!==null)}rA=null,Cse=!1}catch(d){throw rA!==null&&(rA=rA.slice(n+1)),pBt(TLe,bN),d}finally{cu=i,hCe=!1}}return null}var MM=[],PM=0,voe=null,Eoe=0,gw=[],bw=0,rR=null,sA=1,aA="";function H4(n,i){MM[PM++]=Eoe,MM[PM++]=voe,voe=n,Eoe=i}function GBt(n,i,a){gw[bw++]=sA,gw[bw++]=aA,gw[bw++]=rR,rR=n;var c=sA;n=aA;var d=32-Ov(c)-1;c&=~(1<<d),a+=1;var g=32-Ov(i)+d;if(30<g){var b=d-d%5;g=(c&(1<<b)-1).toString(32),c>>=b,d-=b,sA=1<<32-Ov(i)+d|a<<d|c,aA=g+n}else sA=1<<g|a<<d|c,aA=n}function OLe(n){n.return!==null&&(H4(n,1),GBt(n,1,0))}function DLe(n){for(;n===voe;)voe=MM[--PM],MM[PM]=null,Eoe=MM[--PM],MM[PM]=null;for(;n===rR;)rR=gw[--bw],gw[bw]=null,aA=gw[--bw],gw[bw]=null,sA=gw[--bw],gw[bw]=null}var Fm=null,Pm=null,Dc=!1,Nv=null;function qBt(n,i){var a=ww(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=n,i=n.deletions,i===null?(n.deletions=[a],n.flags|=16):i.push(a)}function bMt(n,i){switch(n.tag){case 5:var a=n.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(n.stateNode=i,Fm=n,Pm=Wx(i.firstChild),!0):!1;case 6:return i=n.pendingProps===""||i.nodeType!==3?null:i,i!==null?(n.stateNode=i,Fm=n,Pm=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=rR!==null?{id:sA,overflow:aA}:null,n.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=ww(18,null,null,0),a.stateNode=i,a.return=n,n.child=a,Fm=n,Pm=null,!0):!1;default:return!1}}function T6e(n){return(n.mode&1)!==0&&(n.flags&128)===0}function A6e(n){if(Dc){var i=Pm;if(i){var a=i;if(!bMt(n,i)){if(T6e(n))throw Error(ir(418));i=Wx(a.nextSibling);var c=Fm;i&&bMt(n,i)?qBt(c,a):(n.flags=n.flags&-4097|2,Dc=!1,Fm=n)}}else{if(T6e(n))thr Line truncated
Error generating stack: `+g.message+`
`+g.stack}return{value:n,source:i,stack:d,digest:null}}function wCe(n,i,a){return{value:n,source:null,stack:a??null,digest:i??null}}function N6e(n,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var ZIn=typeof WeakMap=="function"?WeakMap:Map;function wUt(n,i,a){a=dA(-1,a),a.tag=3,a.payload={element:null};var c=i.value;return a.callback=function(){Coe||(Coe=!0,F6e=c),N6e(n,i)},a}function yUt(n,i,a){a=dA(-1,a),a.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var d=i.value;a.payload=function(){return c(d)},a.callback=function(){N6e(n,i)}}var g=n.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){N6e(n,i),typeof c!="function"&&(Yx===null?Yx=new Set([this]):Yx.add(this));var b=i.stack;this.componentDidCatch(i.value,{componentStack:b!==null?b:""})}),a}function _Mt(n,i,a){var c=n.pingCache;if(c===null){c=n.pingCache=new ZIn;var d=new Set;c.set(i,d)}else d=c.get(i),d===void 0&&(d=new Set,c.set(i,d));d.has(a)||(d.add(a),n=f4n.bind(null,n,i,a),i.then(n,n))}function kMt(n){do{var i;if((i=n.tag===13)&&(i=n.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return n;n=n.return}while(n!==null);return null}function xMt(n,i,a,c,d){return n.mode&1?(n.flags|=65536,n.lanes=d,n):(n===i?n.flags|=65536:(n.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=dA(-1,1),i.tag=2,Kx(a,i,1))),a.lanes|=1),n)}var QIn=SA.ReactCurrentOwner,sb=!1;function $g(n,i,a,c){i.child=n===null?KBt(i,null,a,c):f5(i,n.child,a,c)}function NMt(n,i,a,c,d){a=a.render;var g=i.ref;return XM(i,d),c=GLe(n,i,a,c,g,d),a=qLe(),n!==null&&!sb?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~d,bA(n,i,d)):(Dc&&a&&OLe(i),i.flags|=1,$g(n,i,c,d),i.child)}function CMt(n,i,a,c,d){if(n===null){var g=a.type;return typeof g=="function"&&!tMe(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=g,vUt(n,i,g,c,d)):(n=Vie(a.type,null,c,i,i.mode,d),n.ref=i.ref,n.return=i,i.child=n)}if(g=n.child,!(n.lanes&d)){var b=g.memoizedProps;if(a=a.compare,a=a!==null?a:RH,a(b,c)&&n.ref===i.ref)return bA(n,i,d)}return i.flags|=1,n=Xx(g,c),n.ref=i.ref,n.return=i,i.child=n}function vUt(n,i,a,c,d){if(n!==null){var g=n.memoizedProps;if(RH(g,c)&&n.ref===i.ref)if(sb=!1,i.pendingProps=c=g,(n.lanes&d)!==0)n.flags&131072&&(sb=!0);else return i.lanes=n.lanes,bA(n,i,d)}return C6e(n,i,a,c,d)}function EUt(n,i,a){var c=i.pendingProps,d=c.children,g=n!==null?n.memoizedState:null;if(c.mode==="hidden")if(!(i.mode&1))i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Vu($M,Om),Om|=a;else{if(!(a&1073741824))return n=g!==null?g.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:n,cachePool:null,transitions:null},i.updateQueue=null,Vu($M,Om),Om|=n,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:a,Vu($M,Om),Om|=c}else g!==null?(c=g.baseLanes|a,i.memoizedState=null):c=a,Vu($M,Om),Om|=c;return $g(n,i,d,a),i.child}function SUt(n,i){var a=i.ref;(n===null&&a!==null||n!==null&&n.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function C6e(n,i,a,c,d){var g=lb(a)?nR:Bp.current;return g=l5(i,g),XM(i,d),a=GLe(n,i,a,c,g,d),c=qLe(),n!==null&&!sb?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~d,bA(n,i,d)):(Dc&&c&&OLe(i),i.flags|=1,$g(n,i,a,d),i.child)}function IMt(n,i,a,c,d){if(lb(a)){var g=!0;yoe(i)}else g=!1;if(XM(i,d),i.stateNode===null)zie(n,i),mUt(i,a,c),x6e(i,a,c,d),c=!0;else if(n===null){var b=i.stateNode,w=i.memoizedProps;b.props=w;var E=b.context,S=a.contextType;typeof S=="object"&&S!==null?S=Sw(S):(S=lb(a)?nR:Bp.current,S=l5(i,S));var k=a.getDerivedStateFromProps,_=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function";_||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==c||E!==S)&&AMt(i,b,c,S),Px=!1;var C=i.memoizedState;b.state=C,Aoe(i,c,b,d),E=i.memoizedState,w!==c||C!==E||cb.current||Px?(typeof k=="function"&&(k6e(i,a,k,c),E=i.memoizedState),(w=Px||TMt(i,a,w,c,C,E,S))?(_||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=E),b.props=c,b.state=E,b.context=S,c=w):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{b=i.stateNode,JBt(n,i),w=i.memoizedProps,S=i.type===i.elementType?w:_v(i.type,w),b.props=S,_=i.pendingProps,C=b.context,E=a.contextType,typeof E=="object"&&E!==null?E=Sw(E):(E=lb(a)?nR:Bp.current,E=l5(i,E));var R=a.getDerivedStateFromProps;(k=typeof R=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==_||C!==E)&&AMt(i,b,c,E),Px=!1,C=i.memoized Line truncated
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var b5=z;function nRn(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var rRn=typeof Object.is=="function"?Object.is:nRn,iRn=b5.useState,oRn=b5.useEffect,sRn=b5.useLayoutEffect,aRn=b5.useDebugValue;function uRn(n,i){var a=i(),c=iRn({inst:{value:a,getSnapshot:i}}),d=c[0].inst,g=c[1];return sRn(function(){d.value=a,d.getSnapshot=i,_Ce(d)&&g({inst:d})},[n,a,i]),oRn(function(){return _Ce(d)&&g({inst:d}),n(function(){_Ce(d)&&g({inst:d})})},[n]),aRn(a),a}function _Ce(n){var i=n.getSnapshot;n=n.value;try{var a=i();return!rRn(n,a)}catch{return!0}}function cRn(n,i){return i()}var lRn=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cRn:uRn;tHt.useSyncExternalStore=b5.useSyncExternalStore!==void 0?b5.useSyncExternalStore:lRn;eHt.exports=tHt;var nHt=eHt.exports;const dRn=(n,i)=>aR(i)?i:q4n(i)&&aR(i.defaultValue)?i.defaultValue:Array.isArray(n)?n[n.length-1]:n,fRn={t:dRn,ready:!1},hRn=()=>()=>{},zs=(n,i={})=>{var he,ve,de;const{i18n:a}=i,{i18n:c,defaultNS:d}=z.useContext(QUt)||{},g=a||c||Q4n();g&&!g.reportNamespaces&&(g.reportNamespaces=new tRn),g||JUt(g,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const b=z.useMemo(()=>{var ge;return{...X4n(),...(ge=g==null?void 0:g.options)==null?void 0:ge.react,...i}},[g,i]),{useSuspense:w,keyPrefix:E}=b,S=n||d||((he=g==null?void 0:g.options)==null?void 0:he.defaultNS),k=aR(S)?[S]:S||["translation"],_=z.useMemo(()=>k,k);(de=(ve=g==null?void 0:g.reportNamespaces)==null?void 0:ve.addUsedNamespaces)==null||de.call(ve,_);const C=z.useRef(0),R=z.useCallback(ge=>{if(!g)return hRn;const{bindI18n:Y,bindI18nStore:fe}=b,De=()=>{C.current+=1,ge()};return Y&&g.on(Y,De),fe&&g.store.on(fe,De),()=>{Y&&Y.split(" ").forEach(Se=>g.off(Se,De)),fe&&fe.split(" ").forEach(Se=>g.store.off(Se,De))}},[g,b]),M=z.useRef(),D=z.useCallback(()=>{if(!g)return fRn;const ge=!!(g.isInitialized||g.initializedStoreOnce)&&_.every(Te=>G4n(Te,g,b)),Y=i.lng||g.language,fe=C.current,De=M.current;if(De&&De.ready===ge&&De.lng===Y&&De.keyPrefix===E&&De.revision===fe)return De;const $e={t:g.getFixedT(Y,b.nsMode==="fallback"?_:_[0],E),ready:ge,lng:Y,keyPrefix:E,revision:fe};return M.current=$e,$e},[g,_,E,b,i.lng]),[B,F]=z.useState(0),{t:$,ready:P}=nHt.useSyncExternalStore(R,D,D);z.useEffect(()=>{if(g&&!P&&!w){const ge=()=>F(Y=>Y+1);i.lng?i5t(g,i.lng,_,ge):q6e(g,_,ge)}},[g,i.lng,_,P,w,B]);const H=g||{},Q=z.useRef(null),re=z.useRef(),ee=ge=>{const Y=Object.getOwnPropertyDescriptors(ge);Y.__original&&delete Y.__original;const fe=Object.create(Object.getPrototypeOf(ge),Y);if(!Object.prototype.hasOwnProperty.call(fe,"__original"))try{Object.defineProperty(fe,"__original",{value:ge,writable:!1,enumerable:!1,configurable:!1})}catch{}return fe},ae=z.useMemo(()=>{const ge=H,Y=ge==null?void 0:ge.language;let fe=ge;ge&&(Q.current&&Q.current.__original===ge?re.current!==Y?(fe=ee(ge),Q.current=fe,re.current=Y):fe=Q.current:(fe=ee(ge),Q.current=fe,re.current=Y));const De=[$,fe,P];return De.t=$,De.i18n=fe,De.ready=P,De},[$,H,P,H.resolvedLanguage,H.language,H.languages]);if(g&&w&&!P)throw new Promise(ge=>{const Y=()=>ge();i.lng?i5t(g,i.lng,_,Y):q6e(g,_,Y)});return ae};function o5t({i18n:n,defaultNS:i,children:a}){const c=z.useMemo(()=>({i18n:n,defaultNS:i}),[n,i]);return z.createElement(QUt.Provider,{value:c},a)}function Bd(n){if(typeof n=="string"||typeof n=="number")return""+n;let i="";if(Array.isArray(n))for(let a=0,c;a<n.length;a++)(c=Bd(n[a]))!==""&&(i+=(i&&" ")+c);else for(let a in n)n[a]&&(i+=(i&&" ")+a);return i}var pRn={value:()=>{}};function Bse(){for(var n=0,i=arguments.length,a={},c;n<i;++n){if(!(c=arguments[n]+"")||c in a||/[\s.]/.test(c))throw new Error("illegal type: "+c);a[c]=[]}return new Kie(a)}function Kie(n){this._=n}function gRn(n,i){return n.trim().split(/^|\s+/).map(function(a){var c="",d=a.indexOf(".");if(d>=0&&(c=a.slice(d+1),a=a.slice(0,d)),a&&!i.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:c}})}Kie.prototype=Bse.prototype={constructor:Kie,on:function(n,i){var a=this._,c=gRn(n+"",a),d,g=-1,b=c.length;if(arguments.length<2){for(;++g<b;)if((d=(n=c[g]).type)&&(d=bRn(a[d],n.name)))return d;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++g<b;)if(d=(n=c[g]).type)a[d]=s5t(a[d],n.name,i);else if(i==null)for(d in a)a[d]=s5t(a[d],n.name,null);return this},copy:function(){var n={},i=this._;for(var a in i)n[a]=i[a].slice();return new Kie(n)},call:function(n,i){if((d=arguments.length-2)>0)for(var a=new Array(d),c=0,d,g;c<d;++c)a[c]=arguments[c+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(g=this._[n],c=0,d=g.length;c<d;++c)g[c].value.apply(i,a)},apply:function(n,i,a){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var c=this._[n],d=0,g=c.length;d<g;++d)c[d].value.apply(i,a)}};function bRn(n,i){for(var a=0,c=n.length,d;a<c;++a)if((d=n[a]).name===i)return d.value}function s5t(n,i,a){for(var c=0,d=n.length;c<dLine truncated
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Kse=z,qLn=nHt;function VLn(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var WLn=typeof Object.is=="function"?Object.is:VLn,KLn=qLn.useSyncExternalStore,YLn=Kse.useRef,JLn=Kse.useEffect,XLn=Kse.useMemo,ZLn=Kse.useDebugValue;lzt.useSyncExternalStoreWithSelector=function(n,i,a,c,d){var g=YLn(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=XLn(function(){function E(R){if(!S){if(S=!0,k=R,R=c(R),d!==void 0&&b.hasValue){var M=b.value;if(d(M,R))return _=M}return _=R}if(M=_,WLn(k,R))return M;var D=c(R);return d!==void 0&&d(M,D)?(k=R,M):(k=R,_=D)}var S=!1,k,_,C=a===void 0?null:a;return[function(){return E(i())},C===null?void 0:function(){return E(C())}]},[i,a,c,d]);var w=KLn(n,g[0],g[1]);return JLn(function(){b.hasValue=!0,b.value=w},[w]),ZLn(w),w};czt.exports=lzt;var QLn=czt.exports;const eMn=vR(QLn),tMn={},F5t=n=>{let i;const a=new Set,c=(k,_)=>{const C=typeof k=="function"?k(i):k;if(!Object.is(C,i)){const R=i;i=_??(typeof C!="object"||C===null)?C:Object.assign({},i,C),a.forEach(M=>M(i,R))}},d=()=>i,E={setState:c,getState:d,getInitialState:()=>S,subscribe:k=>(a.add(k),()=>a.delete(k)),destroy:()=>{(tMn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),a.clear()}},S=i=n(c,d,E);return E},nMn=n=>n?F5t(n):F5t,{useDebugValue:rMn}=Hn,{useSyncExternalStoreWithSelector:iMn}=eMn,oMn=n=>n;function dzt(n,i=oMn,a){const c=iMn(n.subscribe,n.getState,n.getServerState||n.getInitialState,i,a);return rMn(c),c}const $5t=(n,i)=>{const a=nMn(n),c=(d,g=i)=>dzt(a,d,g);return Object.assign(c,a),c},sMn=(n,i)=>n?$5t(n,i):$5t;function Lc(n,i){if(Object.is(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;if(n instanceof Map&&i instanceof Map){if(n.size!==i.size)return!1;for(const[c,d]of n)if(!Object.is(d,i.get(c)))return!1;return!0}if(n instanceof Set&&i instanceof Set){if(n.size!==i.size)return!1;for(const c of n)if(!i.has(c))return!1;return!0}const a=Object.keys(n);if(a.length!==Object.keys(i).length)return!1;for(const c of a)if(!Object.prototype.hasOwnProperty.call(i,c)||!Object.is(n[c],i[c]))return!1;return!0}const Yse=z.createContext(null),aMn=Yse.Provider,fzt=H2.error001();function Js(n,i){const a=z.useContext(Yse);if(a===null)throw new Error(fzt);return dzt(a,n,i)}function Mc(){const n=z.useContext(Yse);if(n===null)throw new Error(fzt);return z.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe}),[n])}const B5t={display:"none"},uMn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},hzt="react-flow__node-desc",pzt="react-flow__edge-desc",cMn="react-flow__aria-live",lMn=n=>n.ariaLiveMessage,dMn=n=>n.ariaLabelConfig;function fMn({rfId:n}){const i=Js(lMn);return O.jsx("div",{id:`${cMn}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:uMn,children:i})}function hMn({rfId:n,disableKeyboardA11y:i}){const a=Js(dMn);return O.jsxs(O.Fragment,{children:[O.jsx("div",{id:`${hzt}-${n}`,style:B5t,children:i?a["node.a11yDescription.default"]:a["node.a11yDescription.keyboardDisabled"]}),O.jsx("div",{id:`${pzt}-${n}`,style:B5t,children:a["edge.a11yDescription.default"]}),!i&&O.jsx(fMn,{rfId:n})]})}const fR=z.forwardRef(({position:n="top-left",children:i,className:a,style:c,...d},g)=>{const b=`${n}`.split("-");return O.jsx("div",{className:Bd(["react-flow__panel",a,...b]),style:c,ref:g,...d,children:i})});fR.displayName="Panel";function pMn({proOptions:n,position:i="bottom-right"}){return n!=null&&n.hideAttribution?null:O.jsx(fR,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:O.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const gMn=n=>{const i=[],a=[];for(const[,c]of n.nodeLookup)c.selected&&i.push(c.internals.userNode);for(const[,c]of n.edgeLookup)c.selected&&a.push(c);return{selectedNodes:i,selectedEdges:a}},gie=n=>n.id;function bMn(n,i){return Lc(n.selectedNodes.map(gie),i.selectedNodes.map(gie))&&Lc(n.selectedEdges.map(gie),i.selectedEdges.map(gie))}function mMn({onSelectionChange:n}){const i=Mc(),{selectedNodes:a,selectedEdges:c}=Js(gMn,bMn);return z.useEffect(()=>{const d={nodes:a,edges:c};n==null||n(d),i.getState().onSelectionChangeHandlers.forEach(g=>g(d))},[a,c,n]),null}const wMn=n=>!!n.onSelectionChangeHandlers;function yMn({onSelectionChange:n}){const i=Js(wMn);return n||i?O.jsx(mMn,{onSelectionChange:n}):null}const gzt=[0,0],vMn={x:0,y:0,zoom:1},EMn=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodLine truncated
`).replace(`
`,`
+`).split(`
`)),k=S.reduce((_,C)=>_.concat(...C),[]);return[S,k]}return[[],[]]},[n]);return z.useEffect(()=>{const E=(i==null?void 0:i.target)??G5t,S=(i==null?void 0:i.actInsideInputWithModifier)??!0;if(n!==null){const k=R=>{var B,F;if(d.current=R.ctrlKey||R.metaKey||R.shiftKey||R.altKey,(!d.current||d.current&&!S)&&qHt(R))return!1;const D=V5t(R.code,w);if(g.current.add(R[D]),q5t(b,g.current,!1)){const $=((F=(B=R.composedPath)==null?void 0:B.call(R))==null?void 0:F[0])||R.target,P=($==null?void 0:$.nodeName)==="BUTTON"||($==null?void 0:$.nodeName)==="A";i.preventDefault!==!1&&(d.current||!P)&&R.preventDefault(),c(!0)}},_=R=>{const M=V5t(R.code,w);q5t(b,g.current,!0)?(c(!1),g.current.clear()):g.current.delete(R[M]),R.key==="Meta"&&g.current.clear(),d.current=!1},C=()=>{g.current.clear(),c(!1)};return E==null||E.addEventListener("keydown",k),E==null||E.addEventListener("keyup",_),window.addEventListener("blur",C),window.addEventListener("contextmenu",C),()=>{E==null||E.removeEventListener("keydown",k),E==null||E.removeEventListener("keyup",_),window.removeEventListener("blur",C),window.removeEventListener("contextmenu",C)}}},[n,c]),a}function q5t(n,i,a){return n.filter(c=>a||c.length===i.size).some(c=>c.every(d=>i.has(d)))}function V5t(n,i){return i.includes(n)?"code":"key"}const _Mn=()=>{const n=Mc();return z.useMemo(()=>({zoomIn:i=>{const{panZoom:a}=n.getState();return a?a.scaleBy(1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomOut:i=>{const{panZoom:a}=n.getState();return a?a.scaleBy(1/1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomTo:(i,a)=>{const{panZoom:c}=n.getState();return c?c.scaleTo(i,{duration:a==null?void 0:a.duration}):Promise.resolve(!1)},getZoom:()=>n.getState().transform[2],setViewport:async(i,a)=>{const{transform:[c,d,g],panZoom:b}=n.getState();return b?(await b.setViewport({x:i.x??c,y:i.y??d,zoom:i.zoom??g},a),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[i,a,c]=n.getState().transform;return{x:i,y:a,zoom:c}},setCenter:async(i,a,c)=>n.getState().setCenter(i,a,c),fitBounds:async(i,a)=>{const{width:c,height:d,minZoom:g,maxZoom:b,panZoom:w}=n.getState(),E=gMe(i,c,d,g,b,(a==null?void 0:a.padding)??.1);return w?(await w.setViewport(E,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(i,a={})=>{const{transform:c,snapGrid:d,snapToGrid:g,domNode:b}=n.getState();if(!b)return i;const{x:w,y:E}=b.getBoundingClientRect(),S={x:i.x-w,y:i.y-E},k=a.snapGrid??d,_=a.snapToGrid??g;return Ez(S,c,_,k)},flowToScreenPosition:i=>{const{transform:a,domNode:c}=n.getState();if(!c)return i;const{x:d,y:g}=c.getBoundingClientRect(),b=zoe(i,a);return{x:b.x+d,y:b.y+g}}}),[])};function bzt(n,i){const a=[],c=new Map,d=[];for(const g of n)if(g.type==="add"){d.push(g);continue}else if(g.type==="remove"||g.type==="replace")c.set(g.id,[g]);else{const b=c.get(g.id);b?b.push(g):c.set(g.id,[g])}for(const g of i){const b=c.get(g.id);if(!b){a.push(g);continue}if(b[0].type==="remove")continue;if(b[0].type==="replace"){a.push({...b[0].item});continue}const w={...g};for(const E of b)kMn(E,w);a.push(w)}return d.length&&d.forEach(g=>{g.index!==void 0?a.splice(g.index,0,{...g.item}):a.push({...g.item})}),a}function kMn(n,i){switch(n.type){case"select":{i.selected=n.selected;break}case"position":{typeof n.position<"u"&&(i.position=n.position),typeof n.dragging<"u"&&(i.dragging=n.dragging);break}case"dimensions":{typeof n.dimensions<"u"&&(i.measured={...n.dimensions},n.setAttributes&&((n.setAttributes===!0||n.setAttributes==="width")&&(i.width=n.dimensions.width),(n.setAttributes===!0||n.setAttributes==="height")&&(i.height=n.dimensions.height))),typeof n.resizing=="boolean"&&(i.resizing=n.resizing);break}}}function mzt(n,i){return bzt(n,i)}function wzt(n,i){return bzt(n,i)}function G4(n,i){return{id:n,type:"select",selected:i}}function UM(n,i=new Set,a=!1){const c=[];for(const[d,g]of n){const b=i.has(d);!(g.selected===void 0&&!b)&&g.selected!==b&&(a&&(g.selected=b),c.push(G4(g.id,b)))}return c}function W5t({items:n=[],lookup:i}){var d;const a=[],c=new Map(n.map(g=>[g.id,g]));for(const[g,b]of n.entries()){const w=i.get(b.id),E=((d=w==null?void 0:w.internals)==null?void 0:d.userNode)??w;E!==void 0&&E!==b&&a.push({id:b.id,item:b,type:"replace"}),E===void 0&&a.push({item:b,type:"add",index:g})}for(const[g]of i)c.get(g)===void 0&&a.push({id:g,type:"remove"});return a}function K5t(n){return{id:n.id,type:"remove"}}const Y5t=n=>WDn(n),xMn=n=>jHt(n);function yzt(n){return z.forwardRef(n)}const NMn=typeof window<"u"?z.useLayoutEffect:z.useEffect;function J5t(n){const[i,a]=z.useState(BigInt(0)),[c]=z.useState(()=>CMn(()=>a(d=>d+BigInt(1))));return NMn(()=>{const d=c.get();d.length&&(n(d),c.reset())},[i]),c}function CMn(n){let i=[];return{get:()=>i,reset:()=>{i=[]},push:a=>{i.push(a),n()}}}const vzt=z.createContext(null);function IMn({children:n}){const i=Mc(),a=z.useCallback(w=>{const{nodes Line truncated
M${ae.x},${ae.y}h${ae.width}v${ae.height}h${-ae.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Vzt.displayName="MiniMap";const w9n=z.memo(Vzt),y9n=n=>i=>n?`${Math.max(1/i.transform[2],1)}`:void 0,v9n={[T5.Line]:"right",[T5.Handle]:"bottom-right"};function E9n({nodeId:n,position:i,variant:a=T5.Handle,className:c,style:d=void 0,children:g,color:b,minWidth:w=10,minHeight:E=10,maxWidth:S=Number.MAX_VALUE,maxHeight:k=Number.MAX_VALUE,keepAspectRatio:_=!1,resizeDirection:C,autoScale:R=!0,shouldResize:M,onResizeStart:D,onResize:B,onResizeEnd:F}){const $=Tzt(),P=typeof n=="string"?n:$,H=Mc(),Q=z.useRef(null),re=a===T5.Handle,ee=Js(z.useCallback(y9n(re&&R),[re,R]),Lc),ae=z.useRef(null),he=i??v9n[a];z.useEffect(()=>{if(!(!Q.current||!P))return ae.current||(ae.current=GLn({domNode:Q.current,nodeId:P,getStoreItems:()=>{const{nodeLookup:de,transform:ge,snapGrid:Y,snapToGrid:fe,nodeOrigin:De,domNode:Se}=H.getState();return{nodeLookup:de,transform:ge,snapGrid:Y,snapToGrid:fe,nodeOrigin:De,paneDomNode:Se}},onChange:(de,ge)=>{const{triggerNodeChanges:Y,nodeLookup:fe,parentLookup:De,nodeOrigin:Se}=H.getState(),$e=[],Te={x:de.x,y:de.y},ke=fe.get(P);if(ke&&ke.expandParent&&ke.parentId){const Je=ke.origin??Se,bt=de.width??ke.measured.width??0,qe=de.height??ke.measured.height??0,_t={id:ke.id,parentId:ke.parentId,rect:{width:bt,height:qe,...zHt({x:de.x??ke.position.x,y:de.y??ke.position.y},{width:bt,height:qe},ke.parentId,fe,Je)}},At=EMe([_t],fe,De,Se);$e.push(...At),Te.x=de.x?Math.max(Je[0]*bt,de.x):void 0,Te.y=de.y?Math.max(Je[1]*qe,de.y):void 0}if(Te.x!==void 0&&Te.y!==void 0){const Je={id:P,type:"position",position:{...Te}};$e.push(Je)}if(de.width!==void 0&&de.height!==void 0){const bt={id:P,type:"dimensions",resizing:!0,setAttributes:C?C==="horizontal"?"width":"height":!0,dimensions:{width:de.width,height:de.height}};$e.push(bt)}for(const Je of ge){const bt={...Je,type:"position"};$e.push(bt)}Y($e)},onEnd:({width:de,height:ge})=>{const Y={id:P,type:"dimensions",resizing:!1,dimensions:{width:de,height:ge}};H.getState().triggerNodeChanges([Y])}})),ae.current.update({controlPosition:he,boundaries:{minWidth:w,minHeight:E,maxWidth:S,maxHeight:k},keepAspectRatio:_,resizeDirection:C,onResizeStart:D,onResize:B,onResizeEnd:F,shouldResize:M}),()=>{var de;(de=ae.current)==null||de.destroy()}},[he,w,E,S,k,_,D,B,F,M]);const ve=he.split("-");return O.jsx("div",{className:Bd(["react-flow__resize-control","nodrag",...ve,a,c]),ref:Q,style:{...d,scale:ee,...b&&{[re?"backgroundColor":"borderColor"]:b}},children:g})}z.memo(E9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wzt=(...n)=>n.filter((i,a,c)=>!!i&&i.trim()!==""&&c.indexOf(i)===a).join(" ").trim();/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S9n=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const T9n=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,a,c)=>c?c.toUpperCase():a.toLowerCase());/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c9t=n=>{const i=T9n(n);return i.charAt(0).toUpperCase()+i.slice(1)};/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var A9n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _9n=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k9n=z.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:c,className:d="",children:g,iconNode:b,...w},E)=>z.createElement("svg",{ref:E,...A9n,width:i,height:i,stroke:n,strokeWidth:c?Number(a)*24/Number(i):a,className:Wzt("lucide",d),...!g&&!_9n(w)&&{"aria-hidden":"true"},...w},[...b.map(([S,k])=>z.createElement(S,k)),...Array.isArray(g)?g:[g]]));/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Li=(n,i)=>{const a=z.forwardRef(({className:c,...d},g)=>z.createElement(k9n,{ref:g,iconNode:i,className:Wzt(`lucide-${S9n(c9t(n))}`,`lucide-${n}`,c),...d}));return a.displayName=c9t(n),a};/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const x9n=[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]],N9n=Li("align-end-horizontal",x9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C9n=[["rect",{width:"16",height:"6",x:"2",y:"4",rx:"2",key:"10wcwx"}],["rect",{width:"9",height:"6",x:"9",y:"14",rx:"2",key:"4p5bwg"}],["path",{d:"M22 22V2",key:"12ipfv"}]],I9n=Li("align-end-vertical",C9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R9n=[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]],O9n=Li("align-start-horizontal",R9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D9n=[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]],L9n=Li("align-start-vertical",D9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M9n=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],P9n=Li("arrow-down",M9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j9n=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],F9n=Li("arrow-up-down",j9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $9n=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],B9n=Li("arrow-up",$9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U9n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],_R=Li("ban",U9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H9n=[["path",{d:"m16 22-1-4",key:"1ow2iv"}],["path",{d:"M19 14a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v1a1 1 0 0 0 1 1",key:"11gii7"}],["path",{d:"M19 14H5l-1.973 6.767A1 1 0 0 0 4 22h16a1 1 0 0 0 .973-1.233z",key:"bju7h4"}],["path",{d:"m8 22 1-4",key:"s3unb"}]],z9n=Li("brush-cleaning",H9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G9n=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],L5=Li("check",G9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q9n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xse=Li("chevron-down",q9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V9n=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],W9n=Li("chevron-right",V9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K9n=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Y9n=Li("chevron-up",K9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const J9n=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],X9n=Li("chevrons-up-down",J9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z9n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Pv=Li("circle-alert",Z9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Q9n=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Kzt=Li("circle-check-big",Q9n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const e8n=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],t8n=Li("circle-play",e8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const n8n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],r8n=Li("circle",n8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const i8n=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],o8n=Li("clipboard",i8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const s8n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],TMe=Li("clock",s8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const a8n=[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],u8n=Li("copy-plus",a8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const c8n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],AMe=Li("copy",c8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const l8n=[["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z",key:"1ey20j"}],["path",{d:"M8 12h8",key:"1wcyev"}]],Yzt=Li("diamond-plus",l8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const d8n=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],l9t=Li("download",d8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const f8n=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],h8n=Li("external-link",f8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const p8n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],g8n=Li("file-code",p8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const b8n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],m8n=Li("file-down",b8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const w8n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]],y8n=Li("file-up",w8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const v8n=[["path",{d:"m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2",key:"1nmvlm"}],["circle",{cx:"14",cy:"15",r:"1",key:"1gm4qj"}]],E8n=Li("folder-open-dot",v8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const S8n=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Jzt=Li("git-branch",S8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const T8n=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],A8n=Li("history",T8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _8n=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],Xzt=Li("hourglass",_8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k8n=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],x8n=Li("layers",k8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const N8n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],XH=Li("loader-circle",N8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C8n=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],I8n=Li("menu",C8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R8n=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],O8n=Li("mouse-pointer-click",R8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D8n=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Zse=Li("play",D8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const L8n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qse=Li("plus",L8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M8n=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Zzt=Li("rotate-ccw",M8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const P8n=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Qzt=Li("save",P8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j8n=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],F8n=Li("scissors",j8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $8n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],eGt=Li("search",$8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const B8n=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],U8n=Li("settings",B8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H8n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],tGt=Li("square",H8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const z8n=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],d9t=Li("toggle-left",z8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G8n=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],M5=Li("trash-2",G8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q8n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],f9t=Li("triangle-alert",q8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V8n=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],W8n=Li("unplug",V8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K8n=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Y8n=Li("upload",K8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const J8n=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],nGt=Li("variable",J8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X8n=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Z8n=Li("wifi",X8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Q8n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],eae=Li("x",Q8n);/**
* @license lucide-react v0.577.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ePn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],rGt=Li("zap",ePn),tPn=z.createContext(null),MCe={didCatch:!1,error:null};let nPn=class extends z.Component{constructor(i){super(i),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=MCe}static getDerivedStateFromError(i){return{didCatch:!0,error:i}}resetErrorBoundary(...i){var c,d;const{error:a}=this.state;a!==null&&((d=(c=this.props).onReset)==null||d.call(c,{args:i,reason:"imperative-api"}),this.setState(MCe))}componentDidCatch(i,a){var c,d;(d=(c=this.props).onError)==null||d.call(c,i,a)}componentDidUpdate(i,a){var g,b;const{didCatch:c}=this.state,{resetKeys:d}=this.props;c&&a.error!==null&&rPn(i.resetKeys,d)&&((b=(g=this.props).onReset)==null||b.call(g,{next:d,prev:i.resetKeys,reason:"keys"}),this.setState(MCe))}render(){const{children:i,fallbackRender:a,FallbackComponent:c,fallback:d}=this.props,{didCatch:g,error:b}=this.state;let w=i;if(g){const E={error:b,resetErrorBoundary:this.resetErrorBoundary};if(typeof a=="function")w=a(E);else if(c)w=z.createElement(c,E);else if(d!==void 0)w=d;else throw b}return z.createElement(tPn.Provider,{value:{didCatch:g,error:b,resetErrorBoundary:this.resetErrorBoundary}},w)}};function rPn(n=[],i=[]){return n.length!==i.length||n.some((a,c)=>!Object.is(a,i[c]))}function iPn(n){if(typeof document>"u")return;let i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",i.appendChild(a),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(document.createTextNode(n))}const oPn=n=>{switch(n){case"success":return uPn;case"info":return lPn;case"warning":return cPn;case"error":return dPn;default:return null}},sPn=Array(12).fill(0),aPn=({visible:n,className:i})=>Hn.createElement("div",{className:["sonner-loading-wrapper",i].filter(Boolean).join(" "),"data-visible":n},Hn.createElement("div",{className:"sonner-spinner"},sPn.map((a,c)=>Hn.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${c}`})))),uPn=Hn.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Hn.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),cPn=Hn.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Hn.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),lPn=Hn.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Hn.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),dPn=Hn.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Hn.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fPn=Hn.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Hn.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Hn.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hPn=()=>{const[n,i]=Hn.useState(document.hidden);return Hn.useEffect(()=>{const a=()=>{i(document.hidden)};return document.addEventListener("visibilitychange",a),()=>window.removeEventListener("visibilitychange",a)},[]),n};let sDe=1;class pPn{constructor(){this.subscribe=i=>(this.subscribers.push(i),()=>{const a=this.subscribers.indexOf(i);this.subscribers.splice(a,1)}),this.publish=i=>{this.subscribers.forEach(a=>a(i))},this.addToast=i=>{this.publish(i),this.toasts=[...this.toasts,i]},this.create=i=>{var a;const{message:c,...d}=i,g=typeof(i==null?void 0:i.id)=="number"||((a=i.id)==null?void 0:a.length)>0?i.id:sDe++,b=this.toasts.find(E=>E.id===g),w=i.dismissible===void 0?!0:i.dismissible;return this.dismissedToasts.has(g)&&this.dismissedToasts.delete(g),b?this.toasts=this.toasts.map(E=>E.id===g?(this.publish({...E,...i,id:g,title:c}),{...E,...i,id:g,dismissible:w,title:c}):E):this.addToast({title:c,...d,dismissible:w,id:g}),g},this.dismiss=i=>(i?(this.dismissedToasts.add(i),requestAnimaLine truncated
`).filter(b=>b),d=Math.min(...c.map(b=>b.length-b.trimStart().length)),g=c.map(b=>b.slice(d)).map(b=>" ".repeat(this.indent*2)+b);for(const b of g)this.content.push(b)}compile(){const i=Function,a=this==null?void 0:this.args,d=[...((this==null?void 0:this.content)??[""]).map(g=>` ${g}`)];return new i(...a,d.join(`
`))}}const N7n={major:4,minor:3,patch:5},Wu=cn("$ZodType",(n,i)=>{var d;var a;n??(n={}),n._zod.def=i,n._zod.bag=n._zod.bag||{},n._zod.version=N7n;const c=[...n._zod.def.checks??[]];n._zod.traits.has("$ZodCheck")&&c.unshift(n);for(const g of c)for(const b of g._zod.onattach)b(n);if(c.length===0)(a=n._zod).deferred??(a.deferred=[]),(d=n._zod.deferred)==null||d.push(()=>{n._zod.run=n._zod.parse});else{const g=(w,E,S)=>{let k=HM(w),_;for(const C of E){if(C._zod.def.when){if(!C._zod.def.when(w))continue}else if(k)continue;const R=w.issues.length,M=C._zod.check(w);if(M instanceof Promise&&(S==null?void 0:S.async)===!1)throw new t5;if(_||M instanceof Promise)_=(_??Promise.resolve()).then(async()=>{await M,w.issues.length!==R&&(k||(k=HM(w,R)))});else{if(w.issues.length===R)continue;k||(k=HM(w,R))}}return _?_.then(()=>w):w},b=(w,E,S)=>{if(HM(w))return w.aborted=!0,w;const k=g(E,c,S);if(k instanceof Promise){if(S.async===!1)throw new t5;return k.then(_=>n._zod.parse(_,S))}return n._zod.parse(k,S)};n._zod.run=(w,E)=>{if(E.skipChecks)return n._zod.parse(w,E);if(E.direction==="backward"){const k=n._zod.parse({value:w.value,issues:[]},{...E,skipChecks:!0});return k instanceof Promise?k.then(_=>b(_,w,E)):b(k,w,E)}const S=n._zod.parse(w,E);if(S instanceof Promise){if(E.async===!1)throw new t5;return S.then(k=>g(k,c,E))}return g(S,c,E)}}Ys(n,"~standard",()=>({validate:g=>{var b;try{const w=Djn(n,g);return w.success?{value:w.data}:{issues:(b=w.error)==null?void 0:b.issues}}catch{return Ljn(n,g).then(E=>{var S;return E.success?{value:E.data}:{issues:(S=E.error)==null?void 0:S.issues}})}},vendor:"zod",version:1}))}),IMe=cn("$ZodString",(n,i)=>{var a;Wu.init(n,i),n._zod.pattern=[...((a=n==null?void 0:n._zod.bag)==null?void 0:a.patterns)??[]].pop()??c7n(n._zod.bag),n._zod.parse=(c,d)=>{if(i.coerce)try{c.value=String(c.value)}catch{}return typeof c.value=="string"||c.issues.push({expected:"string",code:"invalid_type",input:c.value,inst:n}),c}}),Pc=cn("$ZodStringFormat",(n,i)=>{oae.init(n,i),IMe.init(n,i)}),C7n=cn("$ZodGUID",(n,i)=>{i.pattern??(i.pattern=Jjn),Pc.init(n,i)}),I7n=cn("$ZodUUID",(n,i)=>{if(i.version){const c={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(c===void 0)throw new Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=y9t(c))}else i.pattern??(i.pattern=y9t());Pc.init(n,i)}),R7n=cn("$ZodEmail",(n,i)=>{i.pattern??(i.pattern=Xjn),Pc.init(n,i)}),O7n=cn("$ZodURL",(n,i)=>{Pc.init(n,i),n._zod.check=a=>{try{const c=a.value.trim(),d=new URL(c);i.hostname&&(i.hostname.lastIndex=0,i.hostname.test(d.hostname)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:a.value,inst:n,continue:!i.abort})),i.protocol&&(i.protocol.lastIndex=0,i.protocol.test(d.protocol.endsWith(":")?d.protocol.slice(0,-1):d.protocol)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:a.value,inst:n,continue:!i.abort})),i.normalize?a.value=d.href:a.value=c;return}catch{a.issues.push({code:"invalid_format",format:"url",input:a.value,inst:n,continue:!i.abort})}}}),D7n=cn("$ZodEmoji",(n,i)=>{i.pattern??(i.pattern=Qjn()),Pc.init(n,i)}),L7n=cn("$ZodNanoID",(n,i)=>{i.pattern??(i.pattern=Kjn),Pc.init(n,i)}),M7n=cn("$ZodCUID",(n,i)=>{i.pattern??(i.pattern=zjn),Pc.init(n,i)}),P7n=cn("$ZodCUID2",(n,i)=>{i.pattern??(i.pattern=Gjn),Pc.init(n,i)}),j7n=cn("$ZodULID",(n,i)=>{i.pattern??(i.pattern=qjn),Pc.init(n,i)}),F7n=cn("$ZodXID",(n,i)=>{i.pattern??(i.pattern=Vjn),Pc.init(n,i)}),$7n=cn("$ZodKSUID",(n,i)=>{i.pattern??(i.pattern=Wjn),Pc.init(n,i)}),B7n=cn("$ZodISODateTime",(n,i)=>{i.pattern??(i.pattern=u7n(i)),Pc.init(n,i)}),U7n=cn("$ZodISODate",(n,i)=>{i.pattern??(i.pattern=s7n),Pc.init(n,i)}),H7n=cn("$ZodISOTime",(n,i)=>{i.pattern??(i.pattern=a7n(i)),Pc.init(n,i)}),z7n=cn("$ZodISODuration",(n,i)=>{i.pattern??(i.pattern=Yjn),Pc.init(n,i)}),G7n=cn("$ZodIPv4",(n,i)=>{i.pattern??(i.pattern=e7n),Pc.init(n,i),n._zod.bag.format="ipv4"}),q7n=cn("$ZodIPv6",(n,i)=>{i.pattern??(i.pattern=t7n),Pc.init(n,i),n._zod.bag.format="ipv6",n._zod.check=a=>{try{new URL(`http://[${a.value}]`)}catch{a.issues.push({code:"invalid_format",format:"ipv6",input:a.value,inst:n,continue:!i.abort})}}}),V7n=cn("$ZodCIDRv4",(n,i)=>{i.pattern??(i.pattern=n7n),Pc.init(n,i)}),W7n=cn("$ZodCIDRv6",(n,i)=>{i.pattern??(i.pattern=r7n),Pc.init(n,i),n._zod.check=a=>{const c=a.value.split("/");try{if(c.length!==2)throw new Error;const[d,g]=c;if(!g)throw new Error;const b=Number(g);if(`${b}`!==g)throw new Error;if(b<0||b>128)throw new Error;new URL(`http://[${d}]`)}catch{a.issues.push({code:"invalid_format",format:"cidrv6",input:a.value,inst:n,continue:!i.abort})}}});function TGt(n){if(n==="")return!0;if(n.length%4!==0)return!1;try{return atob(n),!0}catch{return!1}}const K7n=cn("$ZodBase64",(n,i)=>{i.pattern??(i.pattern=i7n),Pc.init(n,i),n._zod.bag.contentEncoding="base64",n._zod.check=a=>{TGt(a.value)||a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst: Line truncated
if (${Q}.issues.length) {
if (${re} in input) {
payload.issues = payload.issues.concat(${Q}.issues.map(iss => ({
...iss,
path: iss.path ? [${re}, ...iss.path] : [${re}]
})));
}
}
if (${Q}.value === undefined) {
if (${re} in input) {
newResult[${re}] = undefined;
}
} else {
newResult[${re}] = ${Q}.value;
}
`):R.write(`
if (${Q}.issues.length) {
payload.issues = payload.issues.concat(${Q}.issues.map(iss => ({
...iss,
path: iss.path ? [${re}, ...iss.path] : [${re}]
})));
}
if (${Q}.value === undefined) {
if (${re} in input) {
newResult[${re}] = undefined;
}
} else {
newResult[${re}] = ${Q}.value;
}
`)}R.write("payload.value = newResult;"),R.write("return payload;");const $=R.compile();return(H,Q)=>$(C,H,Q)};let g;const b=ZH,w=!cGt.jitless,S=w&&vjn.value,k=i.catchall;let _;n._zod.parse=(C,R)=>{_??(_=c.value);const M=C.value;return b(M)?w&&S&&(R==null?void 0:R.async)===!1&&R.jitless!==!0?(g||(g=d(i.shape)),C=g(C,R),k?kGt([],M,C,R,_,n):C):a(C,R):(C.issues.push({expected:"object",code:"invalid_type",input:M,inst:n}),C)}});function E9t(n,i,a,c){for(const g of n)if(g.issues.length===0)return i.value=g.value,i;const d=n.filter(g=>!HM(g));return d.length===1?(i.value=d[0].value,d[0]):(i.issues.push({code:"invalid_union",input:i.value,inst:a,errors:n.map(g=>g.issues.map(b=>iN(b,c,rN())))}),i)}const xGt=cn("$ZodUnion",(n,i)=>{Wu.init(n,i),Ys(n._zod,"optin",()=>i.options.some(d=>d._zod.optin==="optional")?"optional":void 0),Ys(n._zod,"optout",()=>i.options.some(d=>d._zod.optout==="optional")?"optional":void 0),Ys(n._zod,"values",()=>{if(i.options.every(d=>d._zod.values))return new Set(i.options.flatMap(d=>Array.from(d._zod.values)))}),Ys(n._zod,"pattern",()=>{if(i.options.every(d=>d._zod.pattern)){const d=i.options.map(g=>g._zod.pattern);return new RegExp(`^(${d.map(g=>kMe(g.source)).join("|")})$`)}});const a=i.options.length===1,c=i.options[0]._zod.run;n._zod.parse=(d,g)=>{if(a)return c(d,g);let b=!1;const w=[];for(const E of i.options){const S=E._zod.run({value:d.value,issues:[]},g);if(S instanceof Promise)w.push(S),b=!0;else{if(S.issues.length===0)return S;w.push(S)}}return b?Promise.all(w).then(E=>E9t(E,d,n,g)):E9t(w,d,n,g)}}),cFn=cn("$ZodDiscriminatedUnion",(n,i)=>{i.inclusive=!1,xGt.init(n,i);const a=n._zod.parse;Ys(n._zod,"propValues",()=>{const d={};for(const g of i.options){const b=g._zod.propValues;if(!b||Object.keys(b).length===0)throw new Error(`Invalid discriminated union option at index "${i.options.indexOf(g)}"`);for(const[w,E]of Object.entries(b)){d[w]||(d[w]=new Set);for(const S of E)d[w].add(S)}}return d});const c=nae(()=>{var b;const d=i.options,g=new Map;for(const w of d){const E=(b=w._zod.propValues)==null?void 0:b[i.discriminator];if(!E||E.size===0)throw new Error(`Invalid discriminated union option at index "${i.options.indexOf(w)}"`);for(const S of E){if(g.has(S))throw new Error(`Duplicate discriminator value "${String(S)}"`);g.set(S,w)}}return g});n._zod.parse=(d,g)=>{const b=d.value;if(!ZH(b))return d.issues.push({code:"invalid_type",expected:"object",input:b,inst:n}),d;const w=c.value.get(b==null?void 0:b[i.discriminator]);return w?w._zod.run(d,g):i.unionFallback?a(d,g):(d.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:i.discriminator,input:b,path:[i.discriminator],inst:n}),d)}}),lFn=cn("$ZodIntersection",(n,i)=>{Wu.init(n,i),n._zod.parse=(a,c)=>{const d=a.value,g=i.left._zod.run({value:d,issues:[]},c),b=i.right._zod.run({value:d,issues:[]},c);return g instanceof Promise||b instanceof Promise?Promise.all([g,b]).then(([E,S])=>S9t(a,E,S)):S9t(a,g,b)}});function cDe(n,i){if(n===i)return{valid:!0,data:n};if(n instanceof Date&&i instanceof Date&&+n==+i)return{valid:!0,data:n};if(A5(n)&&A5(i)){const a=Object.keys(i),c=Object.keys(n).filter(g=>a.indexOf(g)!==-1),d={...n,...i};for(const g of c){const b=cDe(n[g],i[g]);if(!b.valid)return{valid:!1,mergeErrorPath:[g,...b.mergeErrorPath]};d[g]=b.data}return{valid:!0,data:d}}if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return{valid:!1,mergeErrorPath:[]};const a=[];for(let c=0;c<n.length;c++){const d=n[c],g=i[c],b=cDe(d,g);if(!b.valid)return{valid:!1,mergeErrorPath:[c,...b.mergeErrorPath]};a.push(b.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function S9t(n,i,a){const c=new Map;let d;for(const w of i.issues)if(w.code==="unrecognized_keys"){d??(d=w);for(const E of w.keys)c.has(E)||c.set(E,{}),c.get(E).l=!0}else n.issues.push(w);for(const w of a.issues)if(w.code==="unrecognized_keys")for(const E of w.keys)c.has(E)||c.set(E,{}),c.get(E).r=!0;else n.issues.push(w);const g=[...c].filter(([,w])=>w.l&&w.r).map(([w])=>w);if(g.length&&d&&n.issues.push({...d,keys:g}),HM(n))return n;const b=cDe(i.value,a.value);if(!b.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(b.mergeErrorPath)}`);return n.value=b.data,n}const dFn=cn("$ZodRecord",(n,i)=>{Wu.init(n,i),n._zod.parse=(a,c)=>{const d=a.value;if(!A5(d))return a.issues.push({expected:"record",code:"invalid_type",input:d,inst:n}),a;const g=[],b=i.keyType._zod.values;if(b){a.value={};const w=new Set;for(const S of b)if(typeof S=="string"||typeof S=="number"||typeof S=="symbol"){w.add(typeof S=="number"?S.toString():S);const k=i.valueType._zod.run({value:d[S],issues:[]},c);k instanceof Promise?g.push(k.then(_=>{_.issues.length&&a.issues.push(...zM(S,_.issues)),a.value[S]=_.value})):(k.issues.length&&a.issues.push(...zM(S,k.issues)),a.value[S]=k.value)}let E;for(const S in d)w.has(S)||(E=E??[],E.push(S));E&&E.length>0&&a.issues.push({code:"unrecognized_keys",input:d,inst:n,keys:E})}else{a.value={};for(c Line truncated
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const k of n.seen.entries()){const _=k[1];if(i===k[0]){g(k);continue}if(n.external){const R=(E=n.external.registry.get(k[0]))==null?void 0:E.id;if(i!==k[0]&&R){g(k);continue}}if((S=n.metadataRegistry.get(k[0]))==null?void 0:S.id){g(k);continue}if(_.cycle){g(k);continue}if(_.count>1&&n.reused==="ref"){g(k);continue}}}function DGt(n,i){var b,w,E;const a=n.seen.get(i);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const c=S=>{const k=n.seen.get(S);if(k.ref===null)return;const _=k.def??k.schema,C={..._},R=k.ref;if(k.ref=null,R){c(R);const D=n.seen.get(R),B=D.schema;if(B.$ref&&(n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0")?(_.allOf=_.allOf??[],_.allOf.push(B)):Object.assign(_,B),Object.assign(_,C),S._zod.parent===R)for(const $ in _)$==="$ref"||$==="allOf"||$ in C||delete _[$];if(B.$ref)for(const $ in _)$==="$ref"||$==="allOf"||$ in D.def&&JSON.stringify(_[$])===JSON.stringify(D.def[$])&&delete _[$]}const M=S._zod.parent;if(M&&M!==R){c(M);const D=n.seen.get(M);if(D!=null&&D.schema.$ref&&(_.$ref=D.schema.$ref,D.def))for(const B in _)B==="$ref"||B==="allOf"||B in D.def&&JSON.stringify(_[B])===JSON.stringify(D.def[B])&&delete _[B]}n.override({zodSchema:S,jsonSchema:_,path:k.path??[]})};for(const S of[...n.seen.entries()].reverse())c(S[0]);const d={};if(n.target==="draft-2020-12"?d.$schema="https://json-schema.org/draft/2020-12/schema":n.target==="draft-07"?d.$schema="http://json-schema.org/draft-07/schema#":n.target==="draft-04"?d.$schema="http://json-schema.org/draft-04/schema#":n.target,(b=n.external)!=null&&b.uri){const S=(w=n.external.registry.get(i))==null?void 0:w.id;if(!S)throw new Error("Schema is missing an `id` property");d.$id=n.external.uri(S)}Object.assign(d,a.def??a.schema);const g=((E=n.external)==null?void 0:E.defs)??{};for(const S of n.seen.entries()){const k=S[1];k.def&&k.defId&&(g[k.defId]=k.def)}n.external||Object.keys(g).length>0&&(n.target==="draft-2020-12"?d.$defs=g:d.definitions=g);try{const S=JSON.parse(JSON.stringify(d));return Object.defineProperty(S,"~standard",{value:{...i["~standard"],jsonSchema:{input:Yoe(i,"input",n.processors),output:Yoe(i,"output",n.processors)}},enumerable:!1,writable:!1}),S}catch{throw new Error("Error converting schema to JSON.")}}function Fg(n,i){const a=i??{seen:new Set};if(a.seen.has(n))return!1;a.seen.add(n);const c=n._zod.def;if(c.type==="transform")return!0;if(c.type==="array")return Fg(c.element,a);if(c.type==="set")return Fg(c.valueType,a);if(c.type==="lazy")return Fg(c.getter(),a);if(c.type==="promise"||c.type==="optional"||c.type==="nonoptional"||c.type==="nullable"||c.type==="readonly"||c.type==="default"||c.type==="prefault")return Fg(c.innerType,a);if(c.type==="intersection")return Fg(c.left,a)||Fg(c.right,a);if(c.type==="record"||c.type==="map")return Fg(c.keyType,a)||Fg(c.valueType,a);if(c.type==="pipe")return Fg(c.in,a)||Fg(c.out,a);if(c.type==="object"){for(const d in c.shape)if(Fg(c.shape[d],a))return!0;return!1}if(c.type==="union"){for(const d of c.options)if(Fg(d,a))return!0;return!1}if(c.type==="tuple"){for(const d of c.items)if(Fg(d,a))return!0;return!!(c.rest&&Fg(c.rest,a))}return!1}const E$n=(n,i={})=>a=>{const c=RGt({...a,processors:i});return gd(n,c),OGt(c,n),DGt(c,n)},Yoe=(n,i,a={})=>c=>{const{libraryOptions:d,target:g}=c??{},b=RGt({...d??{},target:g,io:i,processors:a});return gd(n,b),OGt(b,n),DGt(b,n)},S$n={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},T$n=(n,i,a,c)=>{const d=a;d.type="string";const{minimum:g,maximum:b,format:w,patterns:E,contentEncoding:S}=n._zod.bag;if(typeof g=="number"&&(d.minLength=g),typeof b=="number"&&(d.maxLength=b),w&&(d.format=S$n[w]??w,d.format===""&&delete d.format,w==="time"&&delete d.format),S&&(d.contentEncoding=S),E&&E.size>0){const k=[...E];k.length===1?d.pattern=k[0].source:k.length>1&&(d.allOf=[...k.map(_=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}},A$n=(n,i,a,c)=>{const d=a,{minimum:g,maximum:b,format:w,multipleOf:E,exclusiveMaximum:S,exclusiveMinimum:k}=n._zod.bag;typeof w=="string"&&w.includes("int")?d.type="integer":d.type="number",typeof k=="number"&&(i.target==="draft-04"||i.target==="openapi-3.0"?(d.minimum=k,d.exclusiveMinimum=!0):d.exclusiveMinimum=k),typeof g=="number"&&(d.minimum=g,typeof k=="number"&&i.target!=="draft-04"&&(k>=g?delete d.minimum:delete d.exclusiveMinimum)),typeof S=="number"&&(i.target==="draft-04"||i.target==="openapi-3.0"?(d.maximum=S,d.exclusiveMaximum=!0):d.exclusiveMaximum=S),typeof b=="number"&&(d.maximum=b,typeof S=="number"&&i.target!=="draft-04"&&(S<=b?delete d.maximum:delete d.exclusiveMaximum)),typeof E=="number"&&(d.multipleOf=E)},_$n=(n,i,a,c)=>{a.type="boolean"},k$n=(n,i,a,c)=>{i.target==="openapi-3.0"?(a.type="string",a.nullable=!0,a.enum=[null]):a.type="null"},x$n=(n,i,a,c)=>{a.not={}},N$n=(n,i,a,c)=>{},C$n=(n,i,a,c)=Line truncated
`+n.mark.snippet),c+" "+a):c}function ez(n,i){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=i,this.message=Iqt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ez.prototype=Object.create(Error.prototype);ez.prototype.constructor=ez;ez.prototype.toString=function(i){return this.name+": "+Iqt(this,i)};var ib=ez;function pOe(n,i,a,c,d){var g="",b="",w=Math.floor(d/2)-1;return c-i>w&&(g=" ... ",i=c-w+g.length),a-c>w&&(b=" ...",a=c+w-b.length),{str:g+n.slice(i,a).replace(/\t/g,"→")+b,pos:c-i+g.length}}function gOe(n,i){return vf.repeat(" ",i-n.length)+n}function pqn(n,i){if(i=Object.create(i||null),!n.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);for(var a=/\r?\n|\r|\0/g,c=[0],d=[],g,b=-1;g=a.exec(n.buffer);)d.push(g.index),c.push(g.index+g[0].length),n.position<=g.index&&b<0&&(b=c.length-2);b<0&&(b=c.length-1);var w="",E,S,k=Math.min(n.line+i.linesAfter,d.length).toString().length,_=i.maxLength-(i.indent+k+3);for(E=1;E<=i.linesBefore&&!(b-E<0);E++)S=pOe(n.buffer,c[b-E],d[b-E],n.position-(c[b]-c[b-E]),_),w=vf.repeat(" ",i.indent)+gOe((n.line-E+1).toString(),k)+" | "+S.str+`
`+w;for(S=pOe(n.buffer,c[b],d[b],n.position,_),w+=vf.repeat(" ",i.indent)+gOe((n.line+1).toString(),k)+" | "+S.str+`
`,w+=vf.repeat("-",i.indent+k+3+S.pos)+`^
`,E=1;E<=i.linesAfter&&!(b+E>=d.length);E++)S=pOe(n.buffer,c[b+E],d[b+E],n.position-(c[b]-c[b+E]),_),w+=vf.repeat(" ",i.indent)+gOe((n.line+E+1).toString(),k)+" | "+S.str+`
`;return w.replace(/\n$/,"")}var gqn=pqn,bqn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],mqn=["scalar","sequence","mapping"];function wqn(n){var i={};return n!==null&&Object.keys(n).forEach(function(a){n[a].forEach(function(c){i[String(c)]=a})}),i}function yqn(n,i){if(i=i||{},Object.keys(i).forEach(function(a){if(bqn.indexOf(a)===-1)throw new ib('Unknown option "'+a+'" is met in definition of "'+n+'" YAML type.')}),this.options=i,this.tag=n,this.kind=i.kind||null,this.resolve=i.resolve||function(){return!0},this.construct=i.construct||function(a){return a},this.instanceOf=i.instanceOf||null,this.predicate=i.predicate||null,this.represent=i.represent||null,this.representName=i.representName||null,this.defaultStyle=i.defaultStyle||null,this.multi=i.multi||!1,this.styleAliases=wqn(i.styleAliases||null),mqn.indexOf(this.kind)===-1)throw new ib('Unknown kind "'+this.kind+'" is specified for "'+n+'" YAML type.')}var $p=yqn;function C7t(n,i){var a=[];return n[i].forEach(function(c){var d=a.length;a.forEach(function(g,b){g.tag===c.tag&&g.kind===c.kind&&g.multi===c.multi&&(d=b)}),a[d]=c}),a}function vqn(){var n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},i,a;function c(d){d.multi?(n.multi[d.kind].push(d),n.multi.fallback.push(d)):n[d.kind][d.tag]=n.fallback[d.tag]=d}for(i=0,a=arguments.length;i<a;i+=1)arguments[i].forEach(c);return n}function dDe(n){return this.extend(n)}dDe.prototype.extend=function(i){var a=[],c=[];if(i instanceof $p)c.push(i);else if(Array.isArray(i))c=c.concat(i);else if(i&&(Array.isArray(i.implicit)||Array.isArray(i.explicit)))i.implicit&&(a=a.concat(i.implicit)),i.explicit&&(c=c.concat(i.explicit));else throw new ib("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(g){if(!(g instanceof $p))throw new ib("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(g.loadKind&&g.loadKind!=="scalar")throw new ib("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(g.multi)throw new ib("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(g){if(!(g instanceof $p))throw new ib("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var d=Object.create(dDe.prototype);return d.implicit=(this.implicit||[]).concat(a),d.explicit=(this.explicit||[]).concat(c),d.compiledImplicit=C7t(d,"implicit"),d.compiledExplicit=C7t(d,"explicit"),d.compiledTypeMap=vqn(d.compiledImplicit,d.compiledExplicit),d};var Eqn=dDe,Sqn=new $p("tag:yaml.org,2002:str",{kind:"scalar",construct:function(n){return n!==null?n:""}}),Tqn=new $p("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(n){return n!==null?n:[]}}),Aqn=new $p("tag:yaml.org,2002:map",{kind:"mapping",construct:function(n){return n!==null?n:{}}}),_qn=new Eqn({explicit:[Sqn,Tqn,Aqn]});function kqn(n){if(n===null)return!0;var i=n.length;return i===1&&n==="~"||i===4&&(n==="null"||n==="Null"||n==="NULL")}function xqn(){return null}function Nqn(n){return n===null}var Cqn=new $p("tag:yaml.org,2002:null",{kind:"scalar",resolve:kqn,construct:xqn,predicate:Nqn,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Iqn(n){if(n===null)return!1;var i=n.length;return i===4&&(n==="true"||n==="True"||n==="TRUE")||i===5&&(n==="false"||n==="False"||n==="FALSE")}function Rqn(n){return n==="true"||n==="True"||n==="TRUE"}function Oqn(n){return Object.prototype.toString.call(n)==="[object Boolean]"}var Dqn=new $p("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Iqn,construct:Rqn,predicate:Oqn,represent:{lowercase:function(n){return n?"true":"false"},uppercase:function(n){return n?"TRUE":"FALSE"},camelcase:function(n){return n?"True":"False"}},defaultStyle:"lowercase"});function Lqn(n){return 48<=n&&n<=57||65<=n&&n<=70||97<=n&&n<=102}function Mqn(n){return 48<=n&&n<=55}function Pqn(n){return 48<=n&&n<=57}function jqn(n){if(n===null)return!1;var i=n.length,a=0,c=!1,d;if(!i)return!1;if(d=n[a],(d==="-"||d==="+")&&(d=n[++a]),d==="0"){if(a+1===i)return!0;if(d=n[++a],d==="b"){for(a++;a<i;a++)if(d=n[a],d!=="_"){if(d!=="0"&&d!=="1")return!1;c=!0}return c&&d!=="_"}if(d==="x"){for(a++;a<i;a++)if(d=n[a],d!=="_"){if(!Lqn(n.charCodeAt(a)))return!1;c=!0}return c&&d!=="_"}if(d==="o"){for(a++;a<i;a++)if(d=n[a],d!=="_"){if(!Mqn(n.charCodeAt(a)))return!1;c=!0}return c&&d!=="_"}}if(d==="_")return!1;for(;a<i;a++)if(d=n[a],d!=="_"){if(!Pqn(n.charCodeAt(a)))return!1;c=!0}return!(!c||d==="_")}function Fqn(n){var i=n,a=1,c;if(i.indexOf("_")!==-1&&(i=i.replace(/_/g,"")),c=i[0],(c==="-"||c==="+")&&(c==="-"&&(a=-1),i=i.slice(1),c=i[0]),i==="0")retur Line truncated
\r`;function nVn(n){if(n===null)return!1;var i,a,c=0,d=n.length,g=QMe;for(a=0;a<d;a++)if(i=g.indexOf(n.charAt(a)),!(i>64)){if(i<0)return!1;c+=6}return c%8===0}function rVn(n){var i,a,c=n.replace(/[\r\n=]/g,""),d=c.length,g=QMe,b=0,w=[];for(i=0;i<d;i++)i%4===0&&i&&(w.push(b>>16&255),w.push(b>>8&255),w.push(b&255)),b=b<<6|g.indexOf(c.charAt(i));return a=d%4*6,a===0?(w.push(b>>16&255),w.push(b>>8&255),w.push(b&255)):a===18?(w.push(b>>10&255),w.push(b>>2&255)):a===12&&w.push(b>>4&255),new Uint8Array(w)}function iVn(n){var i="",a=0,c,d,g=n.length,b=QMe;for(c=0;c<g;c++)c%3===0&&c&&(i+=b[a>>18&63],i+=b[a>>12&63],i+=b[a>>6&63],i+=b[a&63]),a=(a<<8)+n[c];return d=g%3,d===0?(i+=b[a>>18&63],i+=b[a>>12&63],i+=b[a>>6&63],i+=b[a&63]):d===2?(i+=b[a>>10&63],i+=b[a>>4&63],i+=b[a<<2&63],i+=b[64]):d===1&&(i+=b[a>>2&63],i+=b[a<<4&63],i+=b[64],i+=b[64]),i}function oVn(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}var sVn=new $p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:nVn,construct:rVn,predicate:oVn,represent:iVn}),aVn=Object.prototype.hasOwnProperty,uVn=Object.prototype.toString;function cVn(n){if(n===null)return!0;var i=[],a,c,d,g,b,w=n;for(a=0,c=w.length;a<c;a+=1){if(d=w[a],b=!1,uVn.call(d)!=="[object Object]")return!1;for(g in d)if(aVn.call(d,g))if(!b)b=!0;else return!1;if(!b)return!1;if(i.indexOf(g)===-1)i.push(g);else return!1}return!0}function lVn(n){return n!==null?n:[]}var dVn=new $p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:cVn,construct:lVn}),fVn=Object.prototype.toString;function hVn(n){if(n===null)return!0;var i,a,c,d,g,b=n;for(g=new Array(b.length),i=0,a=b.length;i<a;i+=1){if(c=b[i],fVn.call(c)!=="[object Object]"||(d=Object.keys(c),d.length!==1))return!1;g[i]=[d[0],c[d[0]]]}return!0}function pVn(n){if(n===null)return[];var i,a,c,d,g,b=n;for(g=new Array(b.length),i=0,a=b.length;i<a;i+=1)c=b[i],d=Object.keys(c),g[i]=[d[0],c[d[0]]];return g}var gVn=new $p("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:hVn,construct:pVn}),bVn=Object.prototype.hasOwnProperty;function mVn(n){if(n===null)return!0;var i,a=n;for(i in a)if(bVn.call(a,i)&&a[i]!==null)return!1;return!0}function wVn(n){return n!==null?n:{}}var yVn=new $p("tag:yaml.org,2002:set",{kind:"mapping",resolve:mVn,construct:wVn}),Dqt=Yqn.extend({implicit:[Qqn,tVn],explicit:[sVn,dVn,gVn,yVn]}),sN=Object.prototype.hasOwnProperty,Qoe=1,Lqt=2,Mqt=3,ese=4,bOe=1,vVn=2,I7t=3,EVn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,SVn=/[\x85\u2028\u2029]/,TVn=/[,\[\]\{\}]/,Pqt=/^(?:!|!!|![a-z\-]+!)$/i,jqt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function R7t(n){return Object.prototype.toString.call(n)}function B2(n){return n===10||n===13}function eR(n){return n===9||n===32}function ub(n){return n===9||n===32||n===10||n===13}function GM(n){return n===44||n===91||n===93||n===123||n===125}function AVn(n){var i;return 48<=n&&n<=57?n-48:(i=n|32,97<=i&&i<=102?i-97+10:-1)}function _Vn(n){return n===120?2:n===117?4:n===85?8:0}function kVn(n){return 48<=n&&n<=57?n-48:-1}function O7t(n){return n===48?"\0":n===97?"\x07":n===98?"\b":n===116||n===9?" ":n===110?`
`:n===118?"\v":n===102?"\f":n===114?"\r":n===101?"\x1B":n===32?" ":n===34?'"':n===47?"/":n===92?"\\":n===78?"…":n===95?" ":n===76?"\u2028":n===80?"\u2029":""}function xVn(n){return n<=65535?String.fromCharCode(n):String.fromCharCode((n-65536>>10)+55296,(n-65536&1023)+56320)}function Fqt(n,i,a){i==="__proto__"?Object.defineProperty(n,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):n[i]=a}var $qt=new Array(256),Bqt=new Array(256);for(var mM=0;mM<256;mM++)$qt[mM]=O7t(mM)?1:0,Bqt[mM]=O7t(mM);function NVn(n,i){this.input=n,this.filename=i.filename||null,this.schema=i.schema||Dqt,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=n.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Uqt(n,i){var a={name:n.filename,buffer:n.input.slice(0,-1),position:n.position,line:n.line,column:n.position-n.lineStart};return a.snippet=gqn(a),new ib(i,a)}function ki(n,i){throw Uqt(n,i)}function tse(n,i){n.onWarning&&n.onWarning.call(null,Uqt(n,i))}var D7t={YAML:function(i,a,c){var d,g,b;i.version!==null&&ki(i,"duplication of %YAML directive"),c.length!==1&&ki(i,"YAML directive accepts exactly one argument"),d=/^([0-9]+)\.([0-9]+)$/.exec(c[0]),d===null&&ki(i,"ill-formed argument of the YAML directive"),g=parseInt(d[1],10),b=parseInt(d[2],10),g!==1&&ki(i,"unacceptable YAML version of the document"),i.version=c[0],i.checkLineBreaks=b<2,b!==1&&b!==2&&tse(i,"unsupported YAML version of the document")},TAG:function(i,a,c){var d,g;c.length!==2&&ki(i,"TAG directive accepts exactly two arguments"),d=c[0],g=c[1],Pqt.test(d)||ki(i,"ill-formed tag handle (first argument) of the TAG directive"),sN.call(i.tagMap,d)&&ki(i,'there is a previously declared suffix for "'+d+'" tag handle'),jqt.test(g)||ki(i,"ill-formed tag prefix (second argument) of the TAG directive");try{g=decodeURIComponent(g)}catch{ki(i,"tag prefix is malformed: "+g)}i.tagMap[d]=g}};function Zx(n,i,a,c){var d,g,b,w;if(i<a){if(w=n.input.slice(i,a),c)for(d=0,g=w.length;d<g;d+=1)b=w.charCodeAt(d),b===9||32<=b&&b<=1114111||ki(n,"expected valid JSON character");else EVn.test(w)&&ki(n,"the stream contains non-printable characters");n.result+=w}}function L7t(n,i,a,c){var d,g,b,w;for(vf.isObject(a)||ki(n,"cannot merge mappings; the provided source object is unacceptable"),d=Object.keys(a),b=0,w=d.length;b<w;b+=1)g=d[b],sN.call(i,g)||(Fqt(i,g,a[g]),c[g]=!0)}function qM(n,i,a,c,d,g,b,w,E){var S,k;if(Array.isArray(d))for(d=Array.prototype.slice.call(d),S=0,k=d.length;S<k;S+=1)Array.isArray(d[S])&&ki(n,"nested arrays are not supported inside keys"),typeof d=="object"&&R7t(d[S])==="[object Object]"&&(d[S]="[object Object]");if(typeof d=="object"&&R7t(d)==="[object Object]"&&(d="[object Object]"),d=String(d),i===null&&(i={}),c==="tag:yaml.org,2002:merge")if(Array.isArray(g))for(S=0,k=g.length;S<k;S+=1)L7t(n,i,g[S],a);else L7t(n,i,g,a);else!n.json&&!sN.call(a,d)&&sN.call(i,d)&&(n.line=b||n.line,n.lineStart=w||n.lineStart,n.position=E||n.position,ki(n,"duplicated mapping key")),Fqt(i,d,g),delete a[d];return i}function e5e(n){var i;i=n.input.charCodeAt(n.position),i===10?n.position++:i===13?(n.position++,n.input.charCodeAt(n.position)===10&&n.position++):ki(n,"a line break is expected"),n.line+=1,n.lineStart=n.position,n.firstTabInLine=-1}function $d(n,i,a){for(var c=0,d=n.input.charCodeAt(n.position);d!==0;){for(;eR(d);)d===9&&n.firstTabInLine===-1&&(n.firstTabInLine=n.position),d=n.input.charCodeAt(++n.position);if(i&&d===35)do d=n.input.charCodeAt(++n.position);while(d!==10&&d!==13&&d!==0);if(B2(d))for(e5e(n),d=n.input.charCodeAt(n.position),c++,n.lineIndent=0;d===32;)n.lineIndent++,d=n.input.charCodeAt(++n.position);else break}return a!==-1&&c!==0&&n.lineIndent<a&&tse(n,"deficient indentation"),c}function yae(n){var i=n.position,a;return a=n.input.charCodeAt(i),!!((a===45||a===46)&&a===n.input.charCodeAt(i+1)&&a===n.input.charCodeAt(i+2)&&(i+=3,a=n.input.charCodeAt(i),a===0||ub(a)))}function t5e(n,i){i===1?n.result+=" ":i>1&&(n.result+=vf.repeat(`
`,i-1))}function CVn(n,i,a){var c,d,g,b,w,E,S,k,_=n.kind,C=n.result,R;if(R=n.input.charCodeAt(n.position),ub(R)||GM(R)||R===35||R===38||R===42||R===33||R===124||R===62||R===39||R===34||R===37||R===64||R===96||(R===63||R===45)&&(d=n.input.charCodeAt(n.position+1),ub(d)||a&&GM(d)))return!1;for(n.kind="scalar",n.result="",g=b=n.position,w=!1;R!==0;){if(R===58){if(d=n.input.charCodeAt(n.position+1),ub(d)||a&&GM(d))break}else if(R===35){if(c=n.input.charCodeAt(n.position-1),ub(c))break}else{if(n.position===n.lineStart&&yae(n)||a&&GM(R))break;if(B2(R))if(E=n.line,S=n.lineStart,k=n.lineIndent,$d(n,!1,-1),n.lineIndent>=i){w=!0,R=n.input.charCodeAt(n.position);continue}else{n.position=b,n.line=E,n.lineStart=S,n.lineIndent=k;break}}w&&(Zx(n,g,b,!1),t5e(n,n.line-E),g=b=n.position,w=!1),eR(R)||(b=n.position+1),R=n.input.charCodeAt(++n.position)}return Zx(n,g,b,!1),n.result?!0:(n.kind=_,n.result=C,!1)}function IVn(n,i){var a,c,d;if(a=n.input.charCodeAt(n.position),a!==39)return!1;for(n.kind="scalar",n.result="",n.position++,c=d=n.position;(a=n.input.charCodeAt(n.position))!==0;)if(a===39)if(Zx(n,c,n.position,!0),a=n.input.charCodeAt(++n.position),a===39)c=n.position,n.position++,d=n.position;else return!0;else B2(a)?(Zx(n,c,d,!0),t5e(n,$d(n,!1,i)),c=d=n.position):n.position===n.lineStart&&yae(n)?ki(n,"unexpected end of the document within a single quoted scalar"):(n.position++,d=n.position);ki(n,"unexpected end of the stream within a single quoted scalar")}function RVn(n,i){var a,c,d,g,b,w;if(w=n.input.charCodeAt(n.position),w!==34)return!1;for(n.kind="scalar",n.result="",n.position++,a=c=n.position;(w=n.input.charCodeAt(n.position))!==0;){if(w===34)return Zx(n,a,n.position,!0),n.position++,!0;if(w===92){if(Zx(n,a,n.position,!0),w=n.input.charCodeAt(++n.position),B2(w))$d(n,!1,i);else if(w<256&&$qt[w])n.result+=Bqt[w],n.position++;else if((b=_Vn(w))>0){for(d=b,g=0;d>0;d--)w=n.input.charCodeAt(++n.position),(b=AVn(w))>=0?g=(g<<4)+b:ki(n,"expected hexadecimal character");n.result+=xVn(g),n.position++}else ki(n,"unknown escape sequence");a=c=n.position}else B2(w)?(Zx(n,a,c,!0),t5e(n,$d(n,!1,i)),a=c=n.position):n.position===n.lineStart&&yae(n)?ki(n,"unexpected end of the document within a double quoted scalar"):(n.position++,c=n.position)}ki(n,"unexpected end of the stream within a double quoted scalar")}function OVn(n,i){var a=!0,c,d,g,b=n.tag,w,E=n.anchor,S,k,_,C,R,M=Object.create(null),D,B,F,$;if($=n.input.charCodeAt(n.position),$===91)k=93,R=!1,w=[];else if($===123)k=125,R=!0,w={};else return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=w),$=n.input.charCodeAt(++n.position);$!==0;){if($d(n,!0,i),$=n.input.charCodeAt(n.position),$===k)return n.position++,n.tag=b,n.anchor=E,n.kind=R?"mapping":"sequence",n.result=w,!0;a?$===44&&ki(n,"expected the node content, but found ','"):ki(n,"missed comma between flow collection entries"),B=D=F=null,_=C=!1,$===63&&(S=n.input.charCodeAt(n.position+1),ub(S)&&(_=C=!0,n.position++,$d(n,!0,i))),c=n.line,d=n.lineStart,g=n.position,k5(n,i,Qoe,!1,!0),B=n.tag,D=n.result,$d(n,!0,i),$=n.input.charCodeAt(n.position),(C||n.line===c)&&$===58&&(_=!0,$=n.input.charCodeAt(++n.position),$d(n,!0,i),k5(n,i,Qoe,!1,!0),F=n.result),R?qM(n,w,M,B,D,F,c,d,g):_?w.push(qM(n,null,M,B,D,F,c,d,g)):w.push(D),$d(n,!0,i),$=n.input.charCodeAt(n.position),$===44?(a=!0,$=n.input.charCodeAt(++n.position)):a=!1}ki(n,"unexpected end of the stream within a flow collection")}function DVn(n,i){var a,c,d=bOe,g=!1,b=!1,w=i,E=0,S=!1,k,_;if(_=n.input.charCodeAt(n.position),_===124)c=!1;else if(_===62)c=!0;else return!1;for(n.kind="scalar",n.result="";_!==0;)if(_=n.input.charCodeAt(++n.position),_===43||_===45)bOe===d?d=_===43?I7t:vVn:ki(n,"repeat of a chomping mode identifier");else if((k=kVn(_))>=0)k===0?ki(n,"bad explicit indentation width of a block scalar; it cannot be less than one"):b?ki(n,"repeat of an indentation width identifier"):(w=i+k-1,b=!0);else break;if(eR(_)){do _=n.input.charCodeAt(++n.position);while(eR(_));if(_===35)do _=n.input.charCodeAt(++n.position);while(!B2(_)&&_!==0)}for(;_!==0;){for(e5e(n),n.lineIndent=0,_=n.input.charCodeAt(n.position);(!b||n.lineIndent<w)&&_===32;)n.lineIndent++,_=n.input.charCodeAt(++n.position);if(!b&&n.lineIndent>w&&(w=n.lineIndent),B2(_)){E++;continue}if(n.lineIndent<w){d===I7t?n.result+=vf.repeat(`
`,g?1+E:E):d===bOe&&g&&(n.result+=`
`);break}for(c?eR(_)?(S=!0,n.result+=vf.repeat(`
`,g?1+E:E)):S?(S=!1,n.result+=vf.repeat(`
`,E+1)):E===0?g&&(n.result+=" "):n.result+=vf.repeat(`
`,E):n.result+=vf.repeat(`
`,g?1+E:E),g=!0,b=!0,E=0,a=n.position;!B2(_)&&_!==0;)_=n.input.charCodeAt(++n.position);Zx(n,a,n.position,!1)}return!0}function M7t(n,i){var a,c=n.tag,d=n.anchor,g=[],b,w=!1,E;if(n.firstTabInLine!==-1)return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=g),E=n.input.charCodeAt(n.position);E!==0&&(n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,ki(n,"tab characters must not be used in indentation")),!(E!==45||(b=n.input.charCodeAt(n.position+1),!ub(b))));){if(w=!0,n.position++,$d(n,!0,-1)&&n.lineIndent<=i){g.push(null),E=n.input.charCodeAt(n.position);continue}if(a=n.line,k5(n,i,Mqt,!1,!0),g.push(n.result),$d(n,!0,-1),E=n.input.charCodeAt(n.position),(n.line===a||n.lineIndent>i)&&E!==0)ki(n,"bad indentation of a sequence entry");else if(n.lineIndent<i)break}return w?(n.tag=c,n.anchor=d,n.kind="sequence",n.result=g,!0):!1}function LVn(n,i,a){var c,d,g,b,w,E,S=n.tag,k=n.anchor,_={},C=Object.create(null),R=null,M=null,D=null,B=!1,F=!1,$;if(n.firstTabInLine!==-1)return!1;for(n.anchor!==null&&(n.anchorMap[n.anchor]=_),$=n.input.charCodeAt(n.position);$!==0;){if(!B&&n.firstTabInLine!==-1&&(n.position=n.firstTabInLine,ki(n,"tab characters must not be used in indentation")),c=n.input.charCodeAt(n.position+1),g=n.line,($===63||$===58)&&ub(c))$===63?(B&&(qM(n,_,C,R,M,null,b,w,E),R=M=D=null),F=!0,B=!0,d=!0):B?(B=!1,d=!0):ki(n,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),n.position+=1,$=c;else{if(b=n.line,w=n.lineStart,E=n.position,!k5(n,a,Lqt,!1,!0))break;if(n.line===g){for($=n.input.charCodeAt(n.position);eR($);)$=n.input.charCodeAt(++n.position);if($===58)$=n.input.charCodeAt(++n.position),ub($)||ki(n,"a whitespace character is expected after the key-value separator within a block mapping"),B&&(qM(n,_,C,R,M,null,b,w,E),R=M=D=null),F=!0,B=!1,d=!1,R=n.tag,M=n.result;else if(F)ki(n,"can not read an implicit mapping pair; a colon is missed");else return n.tag=S,n.anchor=k,!0}else if(F)ki(n,"can not read a block mapping entry; a multiline key may not be an implicit key");else return n.tag=S,n.anchor=k,!0}if((n.line===g||n.lineIndent>i)&&(B&&(b=n.line,w=n.lineStart,E=n.position),k5(n,i,ese,!0,d)&&(B?M=n.result:D=n.result),B||(qM(n,_,C,R,M,D,b,w,E),R=M=D=null),$d(n,!0,-1),$=n.input.charCodeAt(n.position)),(n.line===g||n.lineIndent>i)&&$!==0)ki(n,"bad indentation of a mapping entry");else if(n.lineIndent<i)break}return B&&qM(n,_,C,R,M,null,b,w,E),F&&(n.tag=S,n.anchor=k,n.kind="mapping",n.result=_),F}function MVn(n){var i,a=!1,c=!1,d,g,b;if(b=n.input.charCodeAt(n.position),b!==33)return!1;if(n.tag!==null&&ki(n,"duplication of a tag property"),b=n.input.charCodeAt(++n.position),b===60?(a=!0,b=n.input.charCodeAt(++n.position)):b===33?(c=!0,d="!!",b=n.input.charCodeAt(++n.position)):d="!",i=n.position,a){do b=n.input.charCodeAt(++n.position);while(b!==0&&b!==62);n.position<n.length?(g=n.input.slice(i,n.position),b=n.input.charCodeAt(++n.position)):ki(n,"unexpected end of the stream within a verbatim tag")}else{for(;b!==0&&!ub(b);)b===33&&(c?ki(n,"tag suffix cannot contain exclamation marks"):(d=n.input.slice(i-1,n.position+1),Pqt.test(d)||ki(n,"named tag handle cannot contain such characters"),c=!0,i=n.position+1)),b=n.input.charCodeAt(++n.position);g=n.input.slice(i,n.position),TVn.test(g)&&ki(n,"tag suffix cannot contain flow indicator characters")}g&&!jqt.test(g)&&ki(n,"tag name cannot contain such characters: "+g);try{g=decodeURIComponent(g)}catch{ki(n,"tag name is malformed: "+g)}return a?n.tag=g:sN.call(n.tagMap,d)?n.tag=n.tagMap[d]+g:d==="!"?n.tag="!"+g:d==="!!"?n.tag="tag:yaml.org,2002:"+g:ki(n,'undeclared tag handle "'+d+'"'),!0}function PVn(n){var i,a;if(a=n.input.charCodeAt(n.position),a!==38)return!1;for(n.anchor!==null&&ki(n,"duplication of an anchor property"),a=n.input.charCodeAt(++n.position),i=n.position;a!==0&&!ub(a)&&!GM(a);)a=n.input.charCodeAt(++n.position);return n.position===i&&ki(n,"name of an anchor node must contain at least one character"),n.anchor=n.input.slice(i,n.position),!0}function jVn(n){var i,a,c;if(c=n.input.charCodeAt(n.position),c!==42)return!1;for(c=n.input.charCodeAt(++n.position),i=n.position;c!==0&&!ub(c)&&!GM(c);)c=n.input.charCodeAt(++n.position);return n.position===i&&ki(n,"name of an alias node must contain at least one character"),a=n.input.slice(i,n.position),sN.call(n.anchorMap,a)||ki(n,'unidentified alias "'+a+'"'),n.result=n.anchorMap[a],$d(n,!0,-1),!0}function k5(n,i,a,c,d){var g,b,w,E=1,S=!1,k=!1,_,C,R,M,D,B;if(n.listener!==null&&n.listener("open",n),n.tag=null,n.anchor=null,n.kind=null,n.result=null,g=b=w=ese===a||Mqt===a,c&&$d(n,!0,-1)&&(S=!0,n.lineIndent>i?E=1:n.lineIndent===i?E=0:n.lineIndent<i&&(E=-1)),E===1)for(;MVn(n)||PVn(n);)$d(n,!0,-1)?(S=!0,w=g,n.lineIndent>i?E=1:n.lineIndent===i?E=0:n.lineIndent<i&&(E=-1)):w=!1;if(w&&(w=S||d),(E===1||ese===a)&&(Qoe===a||Lqt===a?D=i:D=i+1,B=n.position-n.lineStart,E===1?w&&(M7t(n,B)||LVn(n,B,D))||OVn(n,D)?k=!0:(b&&DVn(n,D)||IVn(n,D)||RVn(n,D)?k=!0:jVn(n)?(k=!0,(n.tag!==null Line truncated
`),n.charCodeAt(0)===65279&&(n=n.slice(1)));var a=new NVn(n,i),c=n.indexOf("\0");for(c!==-1&&(a.position=c,ki(a,"null byte is not allowed in input")),a.input+="\0";a.input.charCodeAt(a.position)===32;)a.lineIndent+=1,a.position+=1;for(;a.position<a.length-1;)FVn(a);return a.documents}function BVn(n,i){var a=$Vn(n,i);if(a.length!==0){if(a.length===1)return a[0];throw new ib("expected a single document in the stream, but found more")}}var UVn=BVn,HVn={load:UVn},Hqt=Object.prototype.toString,zqt=Object.prototype.hasOwnProperty,n5e=65279,zVn=9,tz=10,GVn=13,qVn=32,VVn=33,WVn=34,fDe=35,KVn=37,YVn=38,JVn=39,XVn=42,Gqt=44,ZVn=45,nse=58,QVn=61,eWn=62,tWn=63,nWn=64,qqt=91,Vqt=93,rWn=96,Wqt=123,iWn=124,Kqt=125,Gp={};Gp[0]="\\0";Gp[7]="\\a";Gp[8]="\\b";Gp[9]="\\t";Gp[10]="\\n";Gp[11]="\\v";Gp[12]="\\f";Gp[13]="\\r";Gp[27]="\\e";Gp[34]='\\"';Gp[92]="\\\\";Gp[133]="\\N";Gp[160]="\\_";Gp[8232]="\\L";Gp[8233]="\\P";var oWn=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],sWn=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function aWn(n,i){var a,c,d,g,b,w,E;if(i===null)return{};for(a={},c=Object.keys(i),d=0,g=c.length;d<g;d+=1)b=c[d],w=String(i[b]),b.slice(0,2)==="!!"&&(b="tag:yaml.org,2002:"+b.slice(2)),E=n.compiledTypeMap.fallback[b],E&&zqt.call(E.styleAliases,w)&&(w=E.styleAliases[w]),a[b]=w;return a}function uWn(n){var i,a,c;if(i=n.toString(16).toUpperCase(),n<=255)a="x",c=2;else if(n<=65535)a="u",c=4;else if(n<=4294967295)a="U",c=8;else throw new ib("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+a+vf.repeat("0",c-i.length)+i}var cWn=1,nz=2;function lWn(n){this.schema=n.schema||Dqt,this.indent=Math.max(1,n.indent||2),this.noArrayIndent=n.noArrayIndent||!1,this.skipInvalid=n.skipInvalid||!1,this.flowLevel=vf.isNothing(n.flowLevel)?-1:n.flowLevel,this.styleMap=aWn(this.schema,n.styles||null),this.sortKeys=n.sortKeys||!1,this.lineWidth=n.lineWidth||80,this.noRefs=n.noRefs||!1,this.noCompatMode=n.noCompatMode||!1,this.condenseFlow=n.condenseFlow||!1,this.quotingType=n.quotingType==='"'?nz:cWn,this.forceQuotes=n.forceQuotes||!1,this.replacer=typeof n.replacer=="function"?n.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function P7t(n,i){for(var a=vf.repeat(" ",i),c=0,d=-1,g="",b,w=n.length;c<w;)d=n.indexOf(`
`,c),d===-1?(b=n.slice(c),c=w):(b=n.slice(c,d+1),c=d+1),b.length&&b!==`
`&&(g+=a),g+=b;return g}function hDe(n,i){return`
`+vf.repeat(" ",n.indent*i)}function dWn(n,i){var a,c,d;for(a=0,c=n.implicitTypes.length;a<c;a+=1)if(d=n.implicitTypes[a],d.resolve(i))return!0;return!1}function rse(n){return n===qVn||n===zVn}function rz(n){return 32<=n&&n<=126||161<=n&&n<=55295&&n!==8232&&n!==8233||57344<=n&&n<=65533&&n!==n5e||65536<=n&&n<=1114111}function j7t(n){return rz(n)&&n!==n5e&&n!==GVn&&n!==tz}function F7t(n,i,a){var c=j7t(n),d=c&&!rse(n);return(a?c:c&&n!==Gqt&&n!==qqt&&n!==Vqt&&n!==Wqt&&n!==Kqt)&&n!==fDe&&!(i===nse&&!d)||j7t(i)&&!rse(i)&&n===fDe||i===nse&&d}function fWn(n){return rz(n)&&n!==n5e&&!rse(n)&&n!==ZVn&&n!==tWn&&n!==nse&&n!==Gqt&&n!==qqt&&n!==Vqt&&n!==Wqt&&n!==Kqt&&n!==fDe&&n!==YVn&&n!==XVn&&n!==VVn&&n!==iWn&&n!==QVn&&n!==eWn&&n!==JVn&&n!==WVn&&n!==KVn&&n!==nWn&&n!==rWn}function hWn(n){return!rse(n)&&n!==nse}function tH(n,i){var a=n.charCodeAt(i),c;return a>=55296&&a<=56319&&i+1<n.length&&(c=n.charCodeAt(i+1),c>=56320&&c<=57343)?(a-55296)*1024+c-56320+65536:a}function Yqt(n){var i=/^\n* /;return i.test(n)}var Jqt=1,pDe=2,Xqt=3,Zqt=4,SM=5;function pWn(n,i,a,c,d,g,b,w){var E,S=0,k=null,_=!1,C=!1,R=c!==-1,M=-1,D=fWn(tH(n,0))&&hWn(tH(n,n.length-1));if(i||b)for(E=0;E<n.length;S>=65536?E+=2:E++){if(S=tH(n,E),!rz(S))return SM;D=D&&F7t(S,k,w),k=S}else{for(E=0;E<n.length;S>=65536?E+=2:E++){if(S=tH(n,E),S===tz)_=!0,R&&(C=C||E-M-1>c&&n[M+1]!==" ",M=E);else if(!rz(S))return SM;D=D&&F7t(S,k,w),k=S}C=C||R&&E-M-1>c&&n[M+1]!==" "}return!_&&!C?D&&!b&&!d(n)?Jqt:g===nz?SM:pDe:a>9&&Yqt(n)?SM:b?g===nz?SM:pDe:C?Zqt:Xqt}function gWn(n,i,a,c,d){n.dump=function(){if(i.length===0)return n.quotingType===nz?'""':"''";if(!n.noCompatMode&&(oWn.indexOf(i)!==-1||sWn.test(i)))return n.quotingType===nz?'"'+i+'"':"'"+i+"'";var g=n.indent*Math.max(1,a),b=n.lineWidth===-1?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-g),w=c||n.flowLevel>-1&&a>=n.flowLevel;function E(S){return dWn(n,S)}switch(pWn(i,w,n.indent,b,E,n.quotingType,n.forceQuotes&&!c,d)){case Jqt:return i;case pDe:return"'"+i.replace(/'/g,"''")+"'";case Xqt:return"|"+$7t(i,n.indent)+B7t(P7t(i,g));case Zqt:return">"+$7t(i,n.indent)+B7t(P7t(bWn(i,b),g));case SM:return'"'+mWn(i)+'"';default:throw new ib("impossible error: invalid scalar style")}}()}function $7t(n,i){var a=Yqt(n)?String(i):"",c=n[n.length-1]===`
`,d=c&&(n[n.length-2]===`
`||n===`
`),g=d?"+":c?"":"-";return a+g+`
`}function B7t(n){return n[n.length-1]===`
`?n.slice(0,-1):n}function bWn(n,i){for(var a=/(\n+)([^\n]*)/g,c=function(){var S=n.indexOf(`
`);return S=S!==-1?S:n.length,a.lastIndex=S,U7t(n.slice(0,S),i)}(),d=n[0]===`
`||n[0]===" ",g,b;b=a.exec(n);){var w=b[1],E=b[2];g=E[0]===" ",c+=w+(!d&&!g&&E!==""?`
`:"")+U7t(E,i),d=g}return c}function U7t(n,i){if(n===""||n[0]===" ")return n;for(var a=/ [^ ]/g,c,d=0,g,b=0,w=0,E="";c=a.exec(n);)w=c.index,w-d>i&&(g=b>d?b:w,E+=`
`+n.slice(d,g),d=g+1),b=w;return E+=`
`,n.length-d>i&&b>d?E+=n.slice(d,b)+`
`+n.slice(b+1):E+=n.slice(d),E.slice(1)}function mWn(n){for(var i="",a=0,c,d=0;d<n.length;a>=65536?d+=2:d++)a=tH(n,d),c=Gp[a],!c&&rz(a)?(i+=n[d],a>=65536&&(i+=n[d+1])):i+=c||uWn(a);return i}function wWn(n,i,a){var c="",d=n.tag,g,b,w;for(g=0,b=a.length;g<b;g+=1)w=a[g],n.replacer&&(w=n.replacer.call(a,String(g),w)),(wA(n,i,w,!1,!1)||typeof w>"u"&&wA(n,i,null,!1,!1))&&(c!==""&&(c+=","+(n.condenseFlow?"":" ")),c+=n.dump);n.tag=d,n.dump="["+c+"]"}function H7t(n,i,a,c){var d="",g=n.tag,b,w,E;for(b=0,w=a.length;b<w;b+=1)E=a[b],n.replacer&&(E=n.replacer.call(a,String(b),E)),(wA(n,i+1,E,!0,!0,!1,!0)||typeof E>"u"&&wA(n,i+1,null,!0,!0,!1,!0))&&((!c||d!=="")&&(d+=hDe(n,i)),n.dump&&tz===n.dump.charCodeAt(0)?d+="-":d+="- ",d+=n.dump);n.tag=g,n.dump=d||"[]"}function yWn(n,i,a){var c="",d=n.tag,g=Object.keys(a),b,w,E,S,k;for(b=0,w=g.length;b<w;b+=1)k="",c!==""&&(k+=", "),n.condenseFlow&&(k+='"'),E=g[b],S=a[E],n.replacer&&(S=n.replacer.call(a,E,S)),wA(n,i,E,!1,!1)&&(n.dump.length>1024&&(k+="? "),k+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),wA(n,i,S,!1,!1)&&(k+=n.dump,c+=k));n.tag=d,n.dump="{"+c+"}"}function vWn(n,i,a,c){var d="",g=n.tag,b=Object.keys(a),w,E,S,k,_,C;if(n.sortKeys===!0)b.sort();else if(typeof n.sortKeys=="function")b.sort(n.sortKeys);else if(n.sortKeys)throw new ib("sortKeys must be a boolean or a function");for(w=0,E=b.length;w<E;w+=1)C="",(!c||d!=="")&&(C+=hDe(n,i)),S=b[w],k=a[S],n.replacer&&(k=n.replacer.call(a,S,k)),wA(n,i+1,S,!0,!0,!0)&&(_=n.tag!==null&&n.tag!=="?"||n.dump&&n.dump.length>1024,_&&(n.dump&&tz===n.dump.charCodeAt(0)?C+="?":C+="? "),C+=n.dump,_&&(C+=hDe(n,i)),wA(n,i+1,k,!0,_)&&(n.dump&&tz===n.dump.charCodeAt(0)?C+=":":C+=": ",C+=n.dump,d+=C));n.tag=g,n.dump=d||"{}"}function z7t(n,i,a){var c,d,g,b,w,E;for(d=a?n.explicitTypes:n.implicitTypes,g=0,b=d.length;g<b;g+=1)if(w=d[g],(w.instanceOf||w.predicate)&&(!w.instanceOf||typeof i=="object"&&i instanceof w.instanceOf)&&(!w.predicate||w.predicate(i))){if(a?w.multi&&w.representName?n.tag=w.representName(i):n.tag=w.tag:n.tag="?",w.represent){if(E=n.styleMap[w.tag]||w.defaultStyle,Hqt.call(w.represent)==="[object Function]")c=w.represent(i,E);else if(zqt.call(w.represent,E))c=w.represent[E](i,E);else throw new ib("!<"+w.tag+'> tag resolver accepts not "'+E+'" style');n.dump=c}return!0}return!1}function wA(n,i,a,c,d,g,b){n.tag=null,n.dump=a,z7t(n,a,!1)||z7t(n,a,!0);var w=Hqt.call(n.dump),E=c,S;c&&(c=n.flowLevel<0||n.flowLevel>i);var k=w==="[object Object]"||w==="[object Array]",_,C;if(k&&(_=n.duplicates.indexOf(a),C=_!==-1),(n.tag!==null&&n.tag!=="?"||C||n.indent!==2&&i>0)&&(d=!1),C&&n.usedDuplicates[_])n.dump="*ref_"+_;else{if(k&&C&&!n.usedDuplicates[_]&&(n.usedDuplicates[_]=!0),w==="[object Object]")c&&Object.keys(n.dump).length!==0?(vWn(n,i,n.dump,d),C&&(n.dump="&ref_"+_+n.dump)):(yWn(n,i,n.dump),C&&(n.dump="&ref_"+_+" "+n.dump));else if(w==="[object Array]")c&&n.dump.length!==0?(n.noArrayIndent&&!b&&i>0?H7t(n,i-1,n.dump,d):H7t(n,i,n.dump,d),C&&(n.dump="&ref_"+_+n.dump)):(wWn(n,i,n.dump),C&&(n.dump="&ref_"+_+" "+n.dump));else if(w==="[object String]")n.tag!=="?"&&gWn(n,n.dump,i,g,E);else{if(w==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new ib("unacceptable kind of an object to dump "+w)}n.tag!==null&&n.tag!=="?"&&(S=encodeURI(n.tag[0]==="!"?n.tag.slice(1):n.tag).replace(/!/g,"%21"),n.tag[0]==="!"?S="!"+S:S.slice(0,18)==="tag:yaml.org,2002:"?S="!!"+S.slice(18):S="!<"+S+">",n.dump=S+" "+n.dump)}return!0}function EWn(n,i){var a=[],c=[],d,g;for(gDe(n,a,c),d=0,g=c.length;d<g;d+=1)i.duplicates.push(a[c[d]]);i.usedDuplicates=new Array(g)}function gDe(n,i,a){var c,d,g;if(n!==null&&typeof n=="object")if(d=i.indexOf(n),d!==-1)a.indexOf(d)===-1&&a.push(d);else if(i.push(n),Array.isArray(n))for(d=0,g=n.length;d<g;d+=1)gDe(n[d],i,a);else for(c=Object.keys(n),d=0,g=c.length;d<g;d+=1)gDe(n[c[d]],i,a)}function SWn(n,i){i=i||{};var a=new lWn(i);a.noRefs||EWn(n,a);var c=n;return a.replacer&&(c=a.replacer.call({"":c},"",c)),wA(a,0,c,!0,!0)?a.dump+`
`:""}var TWn=SWn,AWn={dump:TWn},_Wn=HVn.load,ise=AWn.dump;const Mh=[];for(let n=0;n<256;++n)Mh.push((n+256).toString(16).slice(1));function kWn(n,i=0){return(Mh[n[i+0]]+Mh[n[i+1]]+Mh[n[i+2]]+Mh[n[i+3]]+"-"+Mh[n[i+4]]+Mh[n[i+5]]+"-"+Mh[n[i+6]]+Mh[n[i+7]]+"-"+Mh[n[i+8]]+Mh[n[i+9]]+"-"+Mh[n[i+10]]+Mh[n[i+11]]+Mh[n[i+12]]+Mh[n[i+13]]+Mh[n[i+14]]+Mh[n[i+15]]).toLowerCase()}let mOe;const xWn=new Uint8Array(16);function NWn(){if(!mOe){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");mOe=crypto.getRandomValues.bind(crypto)}return mOe(xWn)}const CWn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),G7t={randomUUID:CWn};function IWn(n,i,a){var d;n=n||{};const c=n.random??((d=n.rng)==null?void 0:d.call(n))??NWn();if(c.length<16)throw new Error("Random bytes length must be >= 16");return c[6]=c[6]&15|64,c[8]=c[8]&63|128,kWn(c)}function RWn(n,i,a){return G7t.randomUUID&&!n?G7t.randomUUID():IWn(n)}let OWn=0;function q7t(n,i){return`${n}_${Date.now()}_${i}_${OWn++}`}function DWn(){return RWn()}function LWn(n,i){return`e-${n}-${i}-${Date.now()}`}var Qqt={exports:{}};(function(n,i){(function(a){n.exports=a()})(function(){return function(){function a(c,d,g){function b(S,k){if(!d[S]){if(!c[S]){var _=typeof XU=="function"&&XU;if(!k&&_)return _(S,!0);if(w)return w(S,!0);var C=new Error("Cannot find module '"+S+"'");throw C.code="MODULE_NOT_FOUND",C}var R=d[S]={exports:{}};c[S][0].call(R.exports,function(M){var D=c[S][1][M];return b(D||M)},R,R.exports,a,c,d,g)}return d[S].exports}for(var w=typeof XU=="function"&&XU,E=0;E<g.length;E++)b(g[E]);return b}return a}()({1:[function(a,c,d){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;function g(C){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},g(C)}function b(C,R){if(!(C instanceof R))throw new TypeError("Cannot call a class as a function")}function w(C,R){for(var M=0;M<R.length;M++){var D=R[M];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(C,S(D.key),D)}}function E(C,R,M){return R&&w(C.prototype,R),Object.defineProperty(C,"prototype",{writable:!1}),C}function S(C){var R=k(C,"string");return g(R)=="symbol"?R:R+""}function k(C,R){if(g(C)!="object"||!C)return C;var M=C[Symbol.toPrimitive];if(M!==void 0){var D=M.call(C,R);if(g(D)!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(C)}d.default=function(){function C(){var R=this,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=M.defaultLayoutOptions,B=D===void 0?{}:D,F=M.algorithms,$=F===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking","vertiflex"]:F,P=M.workerFactory,H=M.workerUrl;if(b(this,C),this.defaultLayoutOptions=B,this.initialized=!1,typeof H>"u"&&typeof P>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var Q=P;typeof H<"u"&&typeof P>"u"&&(Q=function(ae){return new Worker(ae)});var re=Q(H);if(typeof re.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new _(re),this.worker.postMessage({cmd:"register",algorithms:$}).then(function(ee){return R.initialized=!0}).catch(console.err)}return E(C,[{key:"layout",value:function(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=D.layoutOptions,F=B===void 0?this.defaultLayoutOptions:B,$=D.logging,P=$===void 0?!1:$,H=D.measureExecutionTime,Q=H===void 0?!1:H;return M?this.worker.postMessage({cmd:"layout",graph:M,layoutOptions:F,options:{logging:P,measureExecutionTime:Q}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}])}();var _=function(){function C(R){var M=this;if(b(this,C),R===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=R,this.worker.onmessage=function(D){setTimeout(function(){M.receive(M,D)},0)}}return E(C,[{key:"postMessage",value:function(M){var D=this.id||0;this.id=D+1,M.id=D;var B=this;return new Promise(function(F,$){B.resolvers[D]=function(P,H){P?(B.convertGwtStyleError(P),$(P)):F(H)},B.worker.postMessage(M)})}},{key:"receive",value:function(M,D){var B=D.data,F=M.resolvers[B.id];F&&(delete M.resolvers[B.id],B.error?F(B.error):F(null,B.data))}},{key:"terminate",value:function(){this.worker&&this.worke Line truncated
`,Qa(uo(e,t[0])))>=0;)++t[0]}function Odt(e,t){h2e=new qm,Hkt=t,mI=e,l(mI.b,68),bpe(mI,h2e,null),yvt(mI)}function U3(){U3=Y,oee=new xq("XY",0),iee=new xq("X",1),see=new xq("Y",2)}function Za(){Za=Y,Nd=new kq("TOP",0),M1=new kq(hk,1),rd=new kq(cwe,2)}function up(){up=Y,cL=new Dq(_d,0),ZE=new Dq("TOP",1),_T=new Dq(cwe,2)}function h6(){h6=Y,Fte=new _le("INPUT_ORDER",0),$te=new _le("PORT_DEGREE",1)}function b_(){b_=Y,jEe=Ua(Uu,Uu,524287),P_t=Ua(0,0,yD),FEe=HW(1),HW(2),$Ee=HW(0)}function Cpe(e){var t;return t=BS(qt(e,32)),t==null&&(Ha(e),t=BS(qt(e,32))),t}function Ipe(e){var t;return e.Lh()||(t=ln(e.Ah())-e.gi(),e.Xh().Kk(t)),e.wh()}function Ddt(e){(this.q?this.q:(St(),St(),kh)).zc(e.q?e.q:(St(),St(),kh))}function Ldt(e,t){ya(e,t==null||G8((Mt(t),t))||isNaN((Mt(t),t))?0:(Mt(t),t))}function Mdt(e,t){gu(e,t==null||G8((Mt(t),t))||isNaN((Mt(t),t))?0:(Mt(t),t))}function Pdt(e,t){Bb(e,t==null||G8((Mt(t),t))||isNaN((Mt(t),t))?0:(Mt(t),t))}function jdt(e,t){$b(e,t==null||G8((Mt(t),t))||isNaN((Mt(t),t))?0:(Mt(t),t))}function Ldn(e,t){SS(l(l(e.f,19).mf((_n(),gx)),103))&&lgt(dhe(l(e.f,19)),t)}function rK(e,t){var r;return r=Ur(e.d,t),r>=0?i7(e,r,!0,!0):R0(e,t,!0)}function sj(e,t){var r;return r=e.bd(t),r>=0?(e.ed(r),!0):!1}function iK(e,t,r){var o;return o=e.g[t],g3(e,t,e.Xi(t,r)),e.Pi(t,r,o),e.Li(),o}function oK(e){var t;return e.d!=e.r&&(t=Sl(e),e.e=!!t&&t.jk()==PAt,e.d=t),e.e}function sK(e,t){var r;for(xn(e),xn(t),r=!1;t.Ob();)r=r|e.Ec(t.Pb());return r}function gs(e,t){var r,o;return y1(e),o=new lpe(t,e.a),r=new Nit(o),new yt(e,r)}function Wd(e,t){var r;return r=l(Ut(e.e,t),395),r?(trt(e,r),r.e):null}function Mdn(e,t){var r,o,s;s=t.c.i,r=l(Ut(e.f,s),60),o=r.d.c-r.e.c,uge(t.a,o,0)}function bh(e,t,r){var o,s;for(o=10,s=0;s<r-1;s++)t<o&&(e.a+="0"),o*=10;e.a+=t}function Rpe(e,t){var r;for(++e.d,++e.c[t],r=t+1;r<e.a.length;)++e.a[r],r+=r&-r}function aK(e){var t;return t=e.b.c.length==0?null:He(e.b,0),t!=null&&bK(e,0),t}function Pdn(e){switch(e.g){case 0:return sr;case 1:return Zi;default:return 0}}function jdn(e){return nbe(e,(b_(),$Ee))<0?-_tn(k_(e)):e.l+e.m*lT+e.h*em}function Fdt(e){var t,r;return t=e/60|0,r=e%60,r==0?""+t:""+t+":"+(""+r)}function sy(e,t){var r=e.a[t],o=(RK(),$Q)[typeof r];return o?o(r):qge(typeof r)}function Fdn(e,t){return se(t,104)&&l(t,20).Bb&xo?new nV(t,e):new T_(t,e)}function $dn(e,t){return se(t,104)&&l(t,20).Bb&xo?new nV(t,e):new T_(t,e)}function Bdn(e,t,r){return mS(new Le(r.e.a+r.f.a/2,r.e.b+r.f.b/2),e)==(Mt(t),t)}function Ope(e){if(!e.c)throw K(new ys);return e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function $dt(e){if(!e.e)throw K(new ys);return e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function Bdt(e,t,r,o){if(!e)throw K(new jt(kC(t,Z(X(Ci,1),Rt,1,5,[r,o]))))}function Udt(){Udt=Y,oDt=yn((Ue(),Z(X(Co,1),ea,64,0,[Cs,Vt,Zt,dn,Wt])))}function Hdt(){Hdt=Y,V6t=yn((vi(),Z(X(w4,1),Ce,87,0,[hf,cs,is,ff,il])))}function zdt(){zdt=Y,kxt=yn((Vi(),Z(X(O2e,1),Ce,364,0,[id,xh,la,da,$o])))}function H3(){H3=Y,Lxt=new nG,Mxt=new i9,Oxt=new rG,Dxt=new iG,Pxt=new oG}function aj(){aj=Y,tee=new gle("EADES",0),b$=new gle("FRUCHTERMAN_REINGOLD",1)}function Gdt(e){this.g=e,this.f=new Pe,this.a=b.Math.min(this.g.c.c,this.g.d.c)}function qdt(e,t,r,o){fr(),Wm.call(this,26),this.c=e,this.a=t,this.d=r,this.b=o}function Udn(e,t){var r,o;for(o=t.c,r=o+1;r<=t.f;r++)e.a[r]>e.a[o]&&(o=r);return o}function Vdt(e){var t;for(++e.a,t=e.c.a.length;e.a<t;++e.a)if(e.c.b[e.a])return}function Hdn(e,t){var r;return r=_0(e.e.c,t.e.c),r==0?yr(e.e.d,t.e.d):r}function Wdt(e){var t;return t=l(j(e,(Ie(),Q0)),318),t?t.a==e:!1}function Kdt(e){var t;return t=l(j(e,(Ie(),Q0)),318),t?t.i==e:!1}function Ydt(e,t){return t==(xV(),xV(),Y_t)?e.toLocaleLowerCase():e.toLowerCase()}function p6(e){return e.__elementTypeCategory$==null?10:e.__elementTypeCategory$}function zdn(e){var t,r;if(e.a){r=null;do t=e.a,e.a=null,r=fmt(t,r);while(e.a);e.a=r}}function Gdn(e){var t,r;if(e.b){r=null;do t=e.b,e.b=null,r=fmt(t,r);while(e.b);e.b=r}}function qdn(e,t){var r;for(r=0;e.e!=e.i.gc();)usn(t,rn(e),Re(r)),r!=sr&&++r}function uK(e,t){var r;return r=l(Ut(e.a,t),151),r||(r=new X2,Yn(e.a,t,r)),r}function Vdn(e,t,r){var o;return o=e.a.e[l(t.a,9).p]-e.a.e[l(r.a,9).p],po(HO(o))}function Nt(e,t){var r;return r=(e.i==null&&jf(e),e.i),t>=0&&t<r.length?r[t]:null}function Dpe(e){return(e.i&2?"interface ":e.i&1?"":"class ")+(ep(e),e.o)}function uj(e){return va(e,sr)>0?sr:va(e,Zi)<0?Zi:On(e)}function Kl(e,t,r){var o;if(t==null)throw K(new tS);return o=rp(e,t),uln(e,t,r),o}function Jdt(e,t){return Mt(t),Ufe(e),e.d.Ob()?(t.Ad(e.d.Pb()),!0):!1}function Xdt(e){this.b=new Pe,this.a=new Pe,this.c=new Pe,this.d=new Pe,this.e=e}function Zdt(e,t,r){H8.call(this),Lpe(this),this.a=e,this.c=r,this.b=t.d,this.f=t.e}function Wdn(){return Ht(),Z(X(hee,1),Ce,252,0,[Xr,gi,mi,Aa,ta,af,tL,EI])}function Qdt(){Qdt=Y,nDt=yn((vE(),Z(X(S4,1),Ce,260,0,[V1,qL,jNe,E4,FNe])))}function eft(){eft=Y,d6t=yn((Jd(),Z(X(cf,1),Ce,161,0,[xt,ri,Rd,Ng,kp])))}function tft(){tft=Y,cNt=yn((wy(),Z(X(uNt,1),Ce,372,0,[iL,z$,G$,H$,U$])))}fun Line truncated
`)}return t&&(t.stack||r(e[XJ]))}function w1e(e,t){switch(t){case 3:return e.f!=0;case 4:return e.g!=0;case 5:return e.i!=0;case 6:return e.j!=0}return fge(e,t)}function y1e(e,t){switch(t){case 3:$b(e,0);return;case 4:Bb(e,0);return;case 5:ya(e,0);return;case 6:gu(e,0);return}Vge(e,t)}function Hgn(e){switch(e.g){case 0:return new hze;case 1:return new pze;default:throw K(new jt(OZ+(e.f!=null?e.f:""+e.g)))}}function ggt(e){switch(e.g){case 0:return new fze;case 1:return new gze;default:throw K(new jt(LX+(e.f!=null?e.f:""+e.g)))}}function zgn(e){switch(e.g){case 1:return new oze;case 2:return new Wrt;default:throw K(new jt(OZ+(e.f!=null?e.f:""+e.g)))}}function bgt(e){switch(e.g){case 0:return new Rce;case 1:return new kZe;default:throw K(new jt(PF+(e.f!=null?e.f:""+e.g)))}}function k0(e,t){switch(t.g){case 1:return TS(e.j,(bu(),$2e));case 2:return TS(e.j,(bu(),U2e));default:return St(),St(),No}}function mgt(e,t){var r,o;if(t){for(r=0;r<e.i;++r)if(o=l(e.g[r],374),o.kj(t))return!1;return Tn(e,t)}else return!1}function v1e(e){var t,r,o,s;for(t=new yb,s=new Gv(e.b.Jc());s.b.Ob();)o=l(s.b.Pb(),697),r=eyn(o),lsn(t,t.a.length,r);return t.a}function Wj(e){var t;return e.Db&64?tC(e):(t=new ml(tC(e)),t.a+=" (instanceClassName: ",zo(t,e.D),t.a+=")",t.a)}function E1e(e,t){var r;return e.i>0&&(t.length<e.i&&(r=m6(nc(t).c,e.i),t=r),ua(e.g,0,t,0,e.i)),t.length>e.i&&ii(t,e.i,null),t}function Ggn(e,t,r){var o,s;return o=ue(e.p[t.i.p])+ue(e.d[t.i.p])+t.n.b+t.a.b,s=ue(e.p[r.i.p])+ue(e.d[r.i.p])+r.n.b+r.a.b,s-o}function Ur(e,t){var r,o,s;if(r=(e.i==null&&jf(e),e.i),o=t.Jj(),o!=-1){for(s=r.length;o<s;++o)if(r[o]==t)return o}return-1}function iY(e,t){var r,o,s;return e.f>0?(e.Zj(),o=t==null?0:Ir(t),s=(o&sr)%e.d.length,r=G0t(e,s,o,t),r!=-1):!1}function Kj(e){var t,r,o,s;for(s=0,r=0,o=e.length;r<o;r++)t=(Yt(r,e.length),e.charCodeAt(r)),t<64&&(s=Rf(s,fh(1,t)));return s}function qgn(e){var t,r,o,s,u;for(r=l(e.g,686),o=e.i-1;o>=0;--o)for(t=r[o],s=0;s<o;++s)if(u=r[s],$yt(e,t,u)){JS(e,o);break}}function P6(e,t){var r,o,s,u;for(u=za(e.e.Ah(),t),r=l(e.g,123),s=0;s<e.i;++s)if(o=r[s],u.$l(o.Jk()))return!1;return!0}function wgt(e,t){var r,o;if(o=new CA(e.a.$c(t,!0)),o.a.gc()<=1)throw K(new tS);return r=o.a.ec().Jc(),r.Pb(),l(r.Pb(),41)}function Vgn(e,t,r){var o,s;for(o=Gi(r,Po),s=0;va(o,0)!=0&&s<t;s++)o=To(o,Gi(e[s],Po)),e[s]=On(o),o=a0(o,32);return On(o)}function Yj(e,t){Xle();var r,o;return r=MO((O9(),O9(),hI)),o=null,t==r&&(o=l(ma(PEe,e),622)),o||(o=new Sst(e),t==r&&Qo(PEe,e,o)),o}function ygt(e){Gw();var t;return t=new Eo(l(e.e.mf((_n(),b2)),8)),e.B.Gc((Bu(),Sx))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function Wgn(e){ej(),l(e.mf((_n(),G1)),185).Gc((Bu(),dU))&&(l(e.mf(uv),185).Ec((ku(),VT)),l(e.mf(G1),185).Kc(dU))}function vgt(e){var t,r;t=e.d==(ZS(),Vk),r=gbe(e),t&&!r||!t&&r?Ae(e.a,(Be(),Wf),(mh(),PL)):Ae(e.a,(Be(),Wf),(mh(),ML))}function Kgn(e){var t,r,o,s;for(o=kyn(e),_i(o,Gxt),s=e.d,s.c.length=0,r=new V(o);r.a<r.c.c.length;)t=l(q(r),458),li(s,t.b)}function oY(){oY=Y,q9(),EB=(Be(),wm),SIt=Wl(Z(X(nre,1),Gye,149,0,[wL,od,o2,mm,Qy,Ste,ix,ox,Tte,UI,Zy,$1,ev]))}function Ygn(e,t){var r;return r=l(Au(e,Pu(new Jo,new as,new xi,Z(X(ru,1),Ce,132,0,[(Yc(),nu)]))),16),r.Oc(mot(r.gc()))}function Td(e,t){var r,o,s;return e.f>0&&(e.Zj(),o=t==null?0:Ir(t),s=(o&sr)%e.d.length,r=sme(e,s,o,t),r)?r.kd():null}function Egt(e,t){var r,o,s;return se(t,45)?(r=l(t,45),o=r.jd(),s=hy(e.Pc(),o),tp(s,r.kd())&&(s!=null||e.Pc()._b(o))):!1}function La(e,t,r){var o,s,u;return e.Nj()?(o=e.i,u=e.Oj(),R6(e,o,t),s=e.Gj(3,null,t,o,u),r?r.lj(s):r=s):R6(e,e.i,t),r}function Jgn(e,t,r){var o,s;return o=new ap(e.e,4,10,(s=t.c,se(s,89)?l(s,29):(Tt(),Ml)),null,pg(e,t),!1),r?r.lj(o):r=o,r}function Xgn(e,t,r){var o,s;return o=new ap(e.e,3,10,null,(s=t.c,se(s,89)?l(s,29):(Tt(),Ml)),pg(e,t),!1),r?r.lj(o):r=o,r}function Sgt(e){my();var t;return(e.q?e.q:(St(),St(),kh))._b((Be(),iw))?t=l(j(e,iw),205):t=l(j(ji(e),BI),205),t}function v1(e){Pf();var t,r;return r=On(e),t=On(Cb(e,32)),t!=0?new Wut(r,t):r>10||r<0?new op(1,r):H_t[r]}function Tgt(e){if(e.b==null){for(;e.a.Ob();)if(e.b=e.a.Pb(),!l(e.b,52).Gh())return!0;return e.b=null,!1}else return!0}function Agt(e,t,r){pft(),_Ze.call(this),this.a=Kw(dkt,[Me,awe],[599,219],0,[p$,XQ],2),this.c=new bS,this.g=e,this.f=t,this.d=r}function _gt(e){this.e=me(Rn,Xn,30,e.length,15,1),this.c=me(uu,Ad,30,e.length,16,1),this.b=me(uu,Ad,30,e.length,16,1),this.f=0}function Zgn(e){var t,r;for(e.j=me(Ki,Wo,30,e.p.c.length,15,1),r=new V(e.p);r.a<r.c.c.length;)t=l(q(r),9),e.j[t.p]=t.o.b/e.i}function kgt(e,t){var r,o;e.a=To(e.a,1),e.c=b.Math.min(e.c,t),e.b=b.Math.max(e.b,t),e.d+=t,r=t-e.f,o=e.e+r,e.f=o-e.e-r,e.e=o}function Qgn(e,t){t.Tg("Min Size Postprocessing",1),Vn(e,(yh(),rv),b.Math.max(ue(ce(ye(e,rv))),ue(ce(ye(e,o4))))),t.Ug()}function xgt(e,t){e.Vj();try{e.d._c(e.e++,t),e.f=e.d.j,e.g=-1}catch(r){throw r=ci(r),se(r,99)?K(new $c):K(r)}}function sY(){sY=Y,Pre=new XGe,v3e=new ZGe,E3e=new QGe,S3e=new eqe,T3e=new tqe,A3e=new nqe,_3e=new rqe,k3e=new iqe,x3e=new o Line truncated
`;return r.substring(0,o.length)==o&&(r=r.substring(o.length)),r.split(`
`)}return[]}function Gbn(e){var t;return t=(zft(),j_t),t[e>>>28]|t[e>>24&15]<<4|t[e>>20&15]<<8|t[e>>16&15]<<12|t[e>>12&15]<<16|t[e>>8&15]<<20|t[e>>4&15]<<24|t[e&15]<<28}function $1t(e){var t,r,o;e.b==e.c&&(o=e.a.length,r=_ge(b.Math.max(8,o))<<1,e.b!=0?(t=Gl(e.a,r),Yft(e,t,o),e.a=t,e.b=0):Lw(e.a,r),e.c=o)}function qbn(e,t){var r;return r=e.b,r.nf((_n(),Hu))?r.$f()==(Ue(),Wt)?-r.Kf().a-ue(ce(r.mf(Hu))):t+ue(ce(r.mf(Hu))):r.$f()==(Ue(),Wt)?-r.Kf().a:t}function U6(e){var t;return e.b.c.length!=0&&l(He(e.b,0),70).a?l(He(e.b,0),70).a:(t=gW(e),t??""+(e.c?As(e.c.a,e,0):-1))}function f7(e){var t;return e.f.c.length!=0&&l(He(e.f,0),70).a?l(He(e.f,0),70).a:(t=gW(e),t??""+(e.i?As(e.i.j,e,0):-1))}function Vbn(e,t){var r,o;if(t<0||t>=e.gc())return null;for(r=t;r<e.gc();++r)if(o=l(e.Xb(r),134),r==e.gc()-1||!o.o)return new ko(Re(r),o);return null}function G1e(e){var t,r,o,s,u;for(u=0,s=Oi,o=0,r=new V(e.a);r.a<r.c.c.length;)t=l(q(r),175),u+=t.r+(o>0?e.c:0),s=b.Math.max(s,t.d),++o;e.e=u,e.b=s}function Wbn(e){var t,r;if(!e.b)for(e.b=jP(l(e.f,127).jh().i),r=new en(l(e.f,127).jh());r.e!=r.i.gc();)t=l(rn(r),158),je(e.b,new oq(t));return e.b}function Kbn(e,t){var r,o,s;if(t.dc())return YA(),YA(),aM;for(r=new tit(e,t.gc()),s=new en(e);s.e!=s.i.gc();)o=rn(s),t.Gc(o)&&Tn(r,o);return r}function q1e(e,t,r,o){return t==0?o?(!e.o&&(e.o=new pu((Qs(),Dh),Ig,e,0)),e.o):(!e.o&&(e.o=new pu((Qs(),Dh),Ig,e,0)),i6(e.o)):i7(e,t,r,o)}function DY(e){var t,r;if(e.rb)for(t=0,r=e.rb.i;t<r;++t)IO(ie(e.rb,t));if(e.vb)for(t=0,r=e.vb.i;t<r;++t)IO(ie(e.vb,t));S3((mu(),so),e),e.Bb|=1}function Mr(e,t,r,o,s,u,f,p,m,y,v,T,N,I){return kmt(e,t,o,null,s,u,f,p,m,y,N,!0,I),o1e(e,v),se(e.Cb,89)&&Ey(Mu(l(e.Cb,89)),2),r&&nge(e,r),i1e(e,T),e}function Ybn(e){var t,r;if(e==null)return null;r=0;try{r=Ec(e,Zi,sr)&Ei}catch(o){if(o=ci(o),se(o,133))t=oj(e),r=t[0];else throw K(o)}return S6(r)}function Jbn(e){var t,r;if(e==null)return null;r=0;try{r=Ec(e,Zi,sr)&Ei}catch(o){if(o=ci(o),se(o,133))t=oj(e),r=t[0];else throw K(o)}return S6(r)}function Xbn(e,t){var r,o,s;return s=e.h-t.h,s<0||(r=e.l-t.l,o=e.m-t.m+(r>>22),s+=o>>22,s<0)?!1:(e.l=r&Uu,e.m=o&Uu,e.h=s&yp,!0)}function LY(e,t,r,o,s,u,f){var p,m;return!(t.Re()&&(m=e.a.Le(r,o),m<0||!s&&m==0)||t.Se()&&(p=e.a.Le(r,u),p>0||!f&&p==0))}function Zbn(e,t){x_();var r;if(r=e.j.g-t.j.g,r!=0)return 0;switch(e.j.g){case 2:return tY(t,xSe)-tY(e,xSe);case 4:return tY(e,kSe)-tY(t,kSe)}return 0}function Qbn(e){switch(e.g){case 0:return $ee;case 1:return Bee;case 2:return Uee;case 3:return Hee;case 4:return W$;case 5:return zee;default:return null}}function ns(e,t,r){var o,s;return o=(s=new QG,Wb(s,t),Da(s,r),Tn((!e.c&&(e.c=new xe(cw,e,12,10)),e.c),s),s),ug(o,0),uy(o,1),hg(o,!0),fg(o,!0),o}function JS(e,t){var r,o;if(t>=e.i)throw K(new tV(t,e.i));return++e.j,r=e.g[t],o=e.i-t-1,o>0&&ua(e.g,t+1,e.g,t,o),ii(e.g,--e.i,null),e.Oi(t,r),e.Li(),r}function B1t(e,t){var r,o;return e.Db>>16==17?e.Cb.Qh(e,21,Ol,t):(o=Do(l(Nt((r=l(qt(e,16),29),r||e.fi()),e.Db>>16),20)),e.Cb.Qh(e,o.n,o.f,t))}function emn(e){var t,r,o,s;for(St(),_i(e.c,e.a),s=new V(e.c);s.a<s.c.c.length;)for(o=q(s),r=new V(e.b);r.a<r.c.c.length;)t=l(q(r),690),t._e(o)}function tmn(e){var t,r,o,s;for(St(),_i(e.c,e.a),s=new V(e.c);s.a<s.c.c.length;)for(o=q(s),r=new V(e.b);r.a<r.c.c.length;)t=l(q(r),378),t._e(o)}function nmn(e){var t,r,o,s,u;for(s=sr,u=null,o=new V(e.d);o.a<o.c.c.length;)r=l(q(o),220),r.d.j^r.e.j&&(t=r.e.e-r.d.e-r.a,t<s&&(s=t,u=r));return u}function V1e(){V1e=Y,gxt=new ht(bwe,(Lt(),!1)),fxt=new ht(mwe,100),A2e=(U3(),oee),hxt=new ht(wwe,A2e),pxt=new ht(ywe,Uf),bxt=new ht(vwe,Re(sr))}function U1t(e,t){var r,o,s;for(o=new Ft(Gt(Df(e).a.Jc(),new D));an(o);)return r=l(Qt(o),17),s=l(t.Kb(r),9),new w9(xn(s.n.b+s.o.b/2));return jN(),jN(),IQ}function H1t(e,t,r){var o,s,u,f,p,m,y,v;for(y=0,s=e.a[t],u=0,f=s.length;u<f;++u)for(o=s[u],v=nC(o,r),m=v.Jc();m.Ob();)p=l(m.Pb(),12),Yn(e.f,p,Re(y++))}function z1t(e,t,r){var o,s,u,f;if(r)for(s=r.a.length,o=new Nb(s),f=(o.b-o.a)*o.c<0?(r1(),eb):new s1(o);f.Ob();)u=l(f.Pb(),15),wt(e,t,eT(sy(r,u.a)))}function G1t(e,t,r){var o,s,u,f;if(r)for(s=r.a.length,o=new Nb(s),f=(o.b-o.a)*o.c<0?(r1(),eb):new s1(o);f.Ob();)u=l(f.Pb(),15),wt(e,t,eT(sy(r,u.a)))}function W1e(e){S1();var t;return t=l(dC(_S(e.k),me(Co,ea,64,2,0,1)),128),p_(t,0,t.length,null),t[0]==(Ue(),Vt)&&t[1]==Wt&&(ii(t,0,Wt),ii(t,1,Vt)),t}function q1t(e,t,r){var o,s,u;return s=L2n(e,t,r),u=Bme(e,s),ZW(e.b),OW(e,t,r),St(),_i(s,new hJe(e)),o=Bme(e,s),ZW(e.b),OW(e,r,t),new ko(Re(u),Re(o))}function V1t(){V1t=Y,u4t=Fn(new ui,(Vi(),$o),(Xi(),SI)),IB=new Pr("linearSegments.inputPrio",Re(0)),RB=new Pr("linearSegments.outputPrio",Re(0))}function rmn(e){var t,r,o,s;for(r=0,t=0,s=new en(e);s.e!=s.i.gc();)o=l(rn(s),19),r=b.Math.max(o.g+o.i,r),t=b.Math.max(o.f+o.j,t);return new Le(r,t)}function imn(e,t){var r,o,s,u;for(u=0,o=new V(e);o.a<o.c.c.length;)r=l(q(o),19),u+=b.Math.pow(r.g*r.f-t,2);return s=b.Math.sqrt(u/(e.c.length-1)),s}function vc(){vc=Y,GL=new y8("UNKNOWN",0),Ih=new y8("ABOVE",1),q1=new y8("BELOW" Line truncated
\r\f]+`);try{N4=Z(X(V3n,1),Rt,2093,0,[new ZR((Xle(),Yj("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",MO((O9(),O9(),hI))))),new ZR(Yj("yyyy-MM-dd'T'HH:mm:ss'.'SSS",MO(hI))),new ZR(Yj("yyyy-MM-dd'T'HH:mm:ss",MO(hI))),new ZR(Yj("yyyy-MM-dd'T'HH:mm",MO(hI))),new ZR(Yj("yyyy-MM-dd",MO(hI)))])}catch(e){if(e=ci(e),!se(e,81))throw K(e)}}function a_n(e){var t,r,o,s,u,f,p;for(r=null,p=null,o=l(j(e.b,(Be(),pte)),349),o==(Q3(),SL)&&(r=new Pe,p=new Pe),f=new V(e.d);f.a<f.c.c.length;)if(u=l(q(f),108),s=u.i,!!s)switch(u.e.g){case 0:t=l(F3(new lS(u.b)),64),o==SL&&t==(Ue(),Vt)?Ot(r.c,u):o==SL&&t==(Ue(),dn)?Ot(p.c,u):Dvn(u,t);break;case 1:r2n(u);break;case 2:case 3:vTn(u);break;case 4:hyn(u)}r&&(r.c.length==0||Xyt(r,(Ue(),Vt)),p.c.length==0||Xyt(p,(Ue(),dn)))}function u_n(e,t){var r,o,s,u;if(s=$u(e.d,1)!=0,o=s0e(e,t),o==0&&Ke(We(j(t.j,(Ie(),j1)))))return 0;!Ke(We(j(t.j,(Ie(),j1))))&&!Ke(We(j(t.j,e2)))||be(j(t.j,(Be(),Ch)))===be((pp(),B1))?t.c.kg(t.e,s):s=Ke(We(j(t.j,j1))),rD(e,t,s,!0),Ke(We(j(t.j,e2)))&&Ae(t.j,e2,(Lt(),!1)),Ke(We(j(t.j,j1)))&&(Ae(t.j,j1,(Lt(),!1)),Ae(t.j,e2,!0)),r=s0e(e,t);do{if(oge(e),r==0)return 0;s=!s,u=r,rD(e,t,s,!1),r=s0e(e,t)}while(u>r);return u}function svt(e,t){var r,o,s,u;if(s=$u(e.d,1)!=0,o=A7(e,t),o==0&&Ke(We(j(t.j,(Ie(),j1)))))return 0;!Ke(We(j(t.j,(Ie(),j1))))&&!Ke(We(j(t.j,e2)))||be(j(t.j,(Be(),Ch)))===be((pp(),B1))?t.c.kg(t.e,s):s=Ke(We(j(t.j,j1))),rD(e,t,s,!0),Ke(We(j(t.j,e2)))&&Ae(t.j,e2,(Lt(),!1)),Ke(We(j(t.j,j1)))&&(Ae(t.j,j1,(Lt(),!1)),Ae(t.j,e2,!0)),r=A7(e,t);do{if(oge(e),r==0)return 0;s=!s,u=r,rD(e,t,s,!1),r=A7(e,t)}while(u>r);return u}function c_n(e,t,r){var o,s,u,f,p;if(o=l(j(e,(Be(),dte)),24),r.a>t.a&&(o.Gc((Jb(),f4))?e.c.a+=(r.a-t.a)/2:o.Gc(h4)&&(e.c.a+=r.a-t.a)),r.b>t.b&&(o.Gc((Jb(),g4))?e.c.b+=(r.b-t.b)/2:o.Gc(p4)&&(e.c.b+=r.b-t.b)),l(j(e,(Ie(),_a)),24).Gc((Mo(),rl))&&(r.a>t.a||r.b>t.b))for(p=new V(e.a);p.a<p.c.c.length;)f=l(q(p),9),f.k==(Ht(),mi)&&(s=l(j(f,Us),64),s==(Ue(),Zt)?f.n.a+=r.a-t.a:s==dn&&(f.n.b+=r.b-t.b));u=e.d,e.f.a=r.a-u.b-u.c,e.f.b=r.b-u.d-u.a}function l_n(e,t,r){var o,s,u,f,p;if(o=l(j(e,(Be(),dte)),24),r.a>t.a&&(o.Gc((Jb(),f4))?e.c.a+=(r.a-t.a)/2:o.Gc(h4)&&(e.c.a+=r.a-t.a)),r.b>t.b&&(o.Gc((Jb(),g4))?e.c.b+=(r.b-t.b)/2:o.Gc(p4)&&(e.c.b+=r.b-t.b)),l(j(e,(Ie(),_a)),24).Gc((Mo(),rl))&&(r.a>t.a||r.b>t.b))for(f=new V(e.a);f.a<f.c.c.length;)u=l(q(f),9),u.k==(Ht(),mi)&&(s=l(j(u,Us),64),s==(Ue(),Zt)?u.n.a+=r.a-t.a:s==dn&&(u.n.b+=r.b-t.b));p=e.d,e.f.a=r.a-p.b-p.c,e.f.b=r.b-p.d-p.a}function d_n(e){var t,r,o,s,u,f,p,m,y,v,T,N;for(t=f0t(e),v=(p=new Yh(t).a.vc().Jc(),new E9(p));v.a.Ob();){for(y=(s=l(v.a.Pb(),45),l(s.jd(),9)),T=0,N=0,T=y.d.d,N=y.o.b+y.d.a,e.d[y.p]=0,r=y;(u=e.a[r.p])!=y;)o=g1n(r,u),m=0,e.c==(Cf(),kg)?m=o.d.n.b+o.d.a.b-o.c.n.b-o.c.a.b:m=o.c.n.b+o.c.a.b-o.d.n.b-o.d.a.b,f=ue(e.d[r.p])+m,e.d[u.p]=f,T=b.Math.max(T,u.d.d-f),N=b.Math.max(N,f+u.o.b+u.d.a),r=u;r=y;do e.d[r.p]=ue(e.d[r.p])+T,r=e.a[r.p];while(r!=y);e.b[y.p]=T+N}}function E0e(e,t,r,o){var s,u,f,p,m,y,v,T,N;return m=Ri(new Le(r.a,r.b),e),y=m.a*t.b-m.b*t.a,v=t.a*o.b-t.b*o.a,T=(m.a*o.b-m.b*o.a)/v,N=y/v,v==0?y==0?(s=br(new Le(r.a,r.b),Qh(new Le(o.a,o.b),.5)),u=f1(e,s),f=f1(br(new Le(e.a,e.b),t),s),p=b.Math.sqrt(o.a*o.a+o.b*o.b)*.5,u<f&&u<=p?new Le(e.a,e.b):f<=p?br(new Le(e.a,e.b),t):null):null:T>=0&&T<=1&&N>=0&&N<=1?br(new Le(e.a,e.b),Qh(new Le(t.a,t.b),T)):null}function OC(e,t,r){var o,s,u,f,p,m,y,v,T,N;for(u=0,f=e.t,s=0,o=0,m=0,N=0,T=0,r&&(e.n.c.length=0,je(e.n,new DP(e.s,e.t,e.i))),p=0,v=new V(e.b);v.a<v.c.c.length;)y=l(q(v),19),u+y.g+(p>0?e.i:0)>t&&m>0&&(u=0,f+=m+e.i,s=b.Math.max(s,N),o+=m+e.i,m=0,N=0,r&&(++T,je(e.n,new DP(e.s,f,e.i))),p=0),N+=y.g+(p>0?e.i:0),m=b.Math.max(m,y.f),r&&U1e(l(He(e.n,T),211),y),u+=y.g+(p>0?e.i:0),++p;return s=b.Math.max(s,N),o+=m,r&&(e.r=s,e.d=o,G1e(e.j)),new ql(e.s,e.t,s,o)}function G7(e){var t,r,o;return r=be(ye(e,(Be(),MT)))===be((Q6(),Pee))||be(ye(e,MT))===be(Ree)||be(ye(e,MT))===be(Oee)||be(ye(e,MT))===be(Lee)||be(ye(e,MT))===be(jee)||be(ye(e,MT))===be(sL),o=be(ye(e,hB))===be((tD(),xte))||be(ye(e,hB))===be(Cte)||be(ye(e,bL))===be((_1(),sx))||be(ye(e,bL))===be((_1(),qI)),t=be(ye(e,Ch))!==be((pp(),B1))||Ke(We(ye(e,ex)))||be(ye(e,LI))!==be((WS(),vI))||ue(ce(ye(e,pL)))!=0||ue(ce(ye(e,ute)))!=0,r||o||t}function CE(e){var t,r,o,s,u,f,p,m;if(!e.a){if(e.o=null,m=new UXe(e),t=new VGe,r=R4,p=r.a.yc(e,r),p==null){for(f=new en(us(e));f.e!=f.i.gc();)u=l(rn(f),29),ti(m,CE(u));r.a.Ac(e)!=null,r.a.gc()==0}for(s=(!e.s&&(e.s=new xe(au,e,21,17)),new en(e.s));s.e!=s.i.gc();)o=l(rn(s),182),se(o,336)&&Tn(t,l(o,38));fy(t),e.k=new iot(e,(l(ie(Ne((a1(),Bt).o),7),20),t.i),t.g),ti(m,e.k),fy(m),e.a=new Qv((l(ie(Ne(Bt.o),4),20),m.i),m.g),Mu(e).b&=-2}return e.a}function f_n(e){var t,r,o,s,u,f,p,m,y,v,T,N;if(p=e.d,T=l(j(e,(Ie(),DT)),16),t=l(j(e,kT),16),!(!T&&!t)){if(u=ue(ce(gy(e,(Be(),Ete)))),f=ue(ce(gy(e,RAe))),N=0,T){for(y=0,s=T.Jc();s.Ob();)o=l(s.Pb(),9),y=b.Math.max(y,o.o.b),N+=o.o.a;N+=u*(T.gc()-1),p.d+=y+f}if(r=0,t){for(y=0,s=t.Jc();s.Ob();)o=l(s.Pb(),9),y=b.Math.max(y,o.o.b),r+=o.o.a;r+=u*(t.gc()-1),p.a+=y+f}m=b.M Line truncated
\r\r `),Qo(E2,AQ,o),Qo(Ax,AQ,_y(o)),o=new bc(4),j6(o,g_t),Qo(E2,fI,o),Qo(Ax,fI,_y(o)),o=new bc(4),j6(o,g_t),Qo(E2,fI,o),Qo(Ax,fI,_y(o)),o=new bc(4),j6(o,b_t),xy(o,l(ma(E2,fI),122)),Qo(E2,TQ,o),Qo(Ax,TQ,_y(o)),o=new bc(4),j6(o,"-.0:AZ__az··ÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁːˑ̀͠͡ͅΆΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁ҃҆ҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆֹֻֽֿֿׁׂ֑֣֡ׄׄאתװײءغـْ٠٩ٰڷںھۀێېۓە۪ۭۨ۰۹ँःअह़्॑॔क़ॣ०९ঁঃঅঌএঐওনপরললশহ়়াৄেৈো্ৗৗড়ঢ়য়ৣ০ৱਂਂਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹ਼਼ਾੂੇੈੋ੍ਖ਼ੜਫ਼ਫ਼੦ੴઁઃઅઋઍઍએઑઓનપરલળવહ઼ૅેૉો્ૠૠ૦૯ଁଃଅଌଏଐଓନପରଲଳଶହ଼ୃେୈୋ୍ୖୗଡ଼ଢ଼ୟୡ୦୯ஂஃஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹாூெைொ்ௗௗ௧௯ఁఃఅఌఎఐఒనపళవహాౄెైొ్ౕౖౠౡ౦౯ಂಃಅಌಎಐಒನಪಳವಹಾೄೆೈೊ್ೕೖೞೞೠೡ೦೯ംഃഅഌഎഐഒനപഹാൃെൈൊ്ൗൗൠൡ൦൯กฮะฺเ๎๐๙ກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະູົຽເໄໆໆ່ໍ໐໙༘༙༠༩༹༹༵༵༷༷༾ཇཉཀྵ྄ཱ྆ྋྐྕྗྗྙྭྱྷྐྵྐྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼ⃐⃜⃡⃡ΩΩKÅ℮℮ↀↂ々々〇〇〡〯〱〵ぁゔ゙゚ゝゞァヺーヾㄅㄬ一龥가힣"),Qo(E2,_Q,o),Qo(Ax,_Q,_y(o)),o=new bc(4),j6(o,b_t),Ea(o,95,95),Ea(o,58,58),Qo(E2,kQ,o),Qo(Ax,kQ,_y(o))),r=l(ma(t?E2:Ax,e),140),r}function MEt(e){t0(e,new Xb(fq(nO(Zm(Ym(Xm(Jm(new wb,$t),"ELK Layered"),"Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level."),new sUe),$t),Ar((iT(),Ire),Z(X(iM,1),Ce,235,0,[mU,rM,nM,Cre,bU,gU]))))),Oe(e,$t,dye,ze(Ete)),Oe(e,$t,fye,ze(RAe)),Oe(e,$t,hye,ze(wL)),Oe(e,$t,pye,ze(od)),Oe(e,$t,RX,ze(o2)),Oe(e,$t,yZ,ze(mm)),Oe(e,$t,gye,ze(Qy)),Oe(e,$t,bye,ze(ix)),Oe(e,$t,mye,ze(ox)),Oe(e,$t,wye,ze(Ste)),Oe(e,$t,F0,ze(wm)),Oe(e,$t,yye,ze(Tte)),Oe(e,$t,vye,ze(UI)),Oe(e,$t,Eye,ze(yB)),Oe(e,$t,zwe,ze(mL)),Oe(e,$t,qwe,ze(Zy)),Oe(e,$t,Gwe,ze($1)),Oe(e,$t,Vwe,ze(ev)),Oe(e,$t,xD,Re(0)),Oe(e,$t,Wwe,ze(rx)),Oe(e,$t,Kwe,ze(IAe)),Oe(e,$t,Ywe,ze(PT)),Oe(e,$t,vp,ze(BAe)),Oe(e,$t,yF,ze(DAe)),Oe(e,$t,vF,ze(LAe)),Oe(e,$t,YC,ze(_te)),Oe(e,$t,tZ,ze(MAe)),Oe(e,$t,nZ,ze(PAe)),Oe(e,$t,EF,ze(vB)),Oe(e,$t,SF,ze(kte)),Oe(e,$t,TF,ze(FAe)),Oe(e,$t,AF,ze(jAe)),Oe(e,$t,rZ,ze($Ae)),Oe(e,$t,iZ,ze(yAe)),Oe(e,$t,oZ,ze(mte)),Oe(e,$t,sZ,ze(pB)),Oe(e,$t,aZ,ze(wte)),Oe(e,$t,YX,ze(iw)),Oe(e,$t,JX,ze(BI)),Oe(e,$t,bF,ze(gte)),Oe(e,$t,mF,ze(uAe)),Oe(e,$t,CD,ze(yIt)),Oe(e,$t,ID,ze(vIt)),Oe(e,$t,RD,ze(wIt)),Oe(e,$t,OD,ze(mIt)),Oe(e,$t,B0,OAe),Oe(e,$t,$0,_Ae),Oe(e,$t,FD,oAe),Oe(e,$t,Sye,0),Oe(e,$t,aF,Re(1)),Oe(e,$t,bk,gk),Oe(e,$t,Tye,ze(bm)),Oe(e,$t,uF,ze(Zr)),Oe(e,$t,Aye,ze(nx)),Oe(e,$t,$D,ze(aIt)),Oe(e,$t,_ye,ze(Wf)),Oe(e,$t,kF,ze(Vy)),Oe(e,$t,GC,(Lt(),!0)),Oe(e,$t,kye,ze(Wy)),Oe(e,$t,xye,ze(pm)),Oe(e,$t,ME,ze(gm)),Oe(e,$t,pT,ze(wB)),Oe(e,$t,yk,ze(vte)),Oe(e,$t,vZ,iAe),Oe(e,$t,vk,ze(rw)),Oe(e,$t,Nye,ze(bB)),Oe(e,$t,Ek,ze(Jy)),Oe(e,$t,Cye,ze(hIt)),Oe(e,$t,Iye,ze(NAe)),Oe(e,$t,Rye,xAe),Oe(e,$t,Oye,ze(lIt)),Oe(e,$t,Dye,ze(dIt)),Oe(e,$t,Lye,ze(fIt)),Oe(e,$t,Mye,ze(cIt)),Oe(e,$t,Iwe,ze(Ate)),Oe(e,$t,PD,ze(hB)),Oe(e,$t,BX,ze(bL)),Oe(e,$t,Cwe,ze(HI)),Oe(e,$t,Owe,ze(Ns)),Oe(e,$t,MD,ze(MT)),Oe(e,$t,KC,ze(jI)),Oe(e,$t,Mwe,ze(ex)),Oe(e,$t,Bwe,ze(tAe)),Oe(e,$t,qX,ze(fte)),Oe(e,$t,pF,ze(gL)),Oe(e,$t,GX,ze(hte)),Oe(e,$t,_we,ze(vAe)),Oe(e,$t,kwe,ze(EAe)),Oe(e,$t,hF,ze(pAe)),Oe(e,$t,PE,ze(mB)),Oe(e,$t,WX,ze(yte)),Oe(e,$t,Awe,ze(bte)),Oe(e,$t,KX,ze(TAe)),Oe(e,$t,Uwe,ze(aAe)),Oe(e,$t,Hwe,ze(pte)),Oe(e,$t,xF,ze(dte)),Oe(e,$t,VX,ze(SAe)),Oe(e,$t,Jwe,ze(aB)),Oe(e,$t,Xwe,ze(XTe)),Oe(e,$t,ZX,ze(sB)),Oe(e,$t,wF,ze(dAe)),Oe(e,$t,QX,ze(lAe)),Oe(e,$t,eZ,ze(fAe)),Oe(e,$t,gT,ze(tx)),Oe(e,$t,Pye,ze(rs)),Oe(e,$t,jye,ze(Ag)),Oe(e,$t,Fye,ze(Kf)),Oe(e,$t,ND,ze(i2)),Oe(e,$t,zX,ze(nAe)),Oe(e,$t,$ye,ze(_g)),Oe(e,$t,Bye,ze(DI)),Oe(e,$t,Uye,ze(fB)),Oe(e,$t,Hye,ze(ow)),Oe(e,$t,EZ,ze(kAe)),Oe(e,$t,SZ,ze(Ky)),Oe(e,$t,FX,ze(bAe)),Oe(e,$t,$X,ze(mAe)),Oe(e,$t,NF,ze(Xy)),Oe(e,$t,xwe,ze(ate)),Oe(e Line truncated
`,H2t=`)]}"' \r
`,z2t="The given string contains parts that cannot be parsed as numbers.",LD="org.eclipse.elk.core.math",G2t={3:1,4:1,125:1,216:1,419:1},q2t={3:1,4:1,100:1,216:1,419:1},vg="org.eclipse.elk.alg.layered.graph.transform",V2t="ElkGraphImporter",W2t="ElkGraphImporter/lambda$1$Type",K2t="ElkGraphImporter/lambda$2$Type",Y2t="ElkGraphImporter/lambda$4$Type",Jt="org.eclipse.elk.alg.layered.intermediate",J2t="Node margin calculation",X2t="ONE_SIDED_GREEDY_SWITCH",Z2t="TWO_SIDED_GREEDY_SWITCH",LX="No implementation is available for the layout processor ",MX="IntermediateProcessorStrategy",PX="Node '",Q2t="FIRST_SEPARATE",eSt="LAST_SEPARATE",tSt="Odd port side processing",di="org.eclipse.elk.alg.layered.intermediate.compaction",VC="org.eclipse.elk.alg.layered.intermediate.greedyswitch",_h="org.eclipse.elk.alg.layered.p3order.counting",WC={223:1},mT="org.eclipse.elk.alg.layered.intermediate.loops",Ac="org.eclipse.elk.alg.layered.intermediate.loops.ordering",C1="org.eclipse.elk.alg.layered.intermediate.loops.routing",fF="org.eclipse.elk.alg.layered.intermediate.preserveorder",Hf="org.eclipse.elk.alg.layered.intermediate.wrapping",Fs="org.eclipse.elk.alg.layered.options",jX="INTERACTIVE",Swe="GREEDY",nSt="DEPTH_FIRST",rSt="EDGE_LENGTH",iSt="SELF_LOOPS",oSt="firstTryWithInitialOrder",Twe="org.eclipse.elk.layered.directionCongruency",Awe="org.eclipse.elk.layered.feedbackEdges",hF="org.eclipse.elk.layered.interactiveReferencePoint",_we="org.eclipse.elk.layered.mergeEdges",kwe="org.eclipse.elk.layered.mergeHierarchyEdges",xwe="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",Nwe="org.eclipse.elk.layered.portSortingStrategy",Cwe="org.eclipse.elk.layered.thoroughness",Iwe="org.eclipse.elk.layered.unnecessaryBendpoints",Rwe="org.eclipse.elk.layered.generatePositionAndLayerIds",MD="org.eclipse.elk.layered.cycleBreaking.strategy",PD="org.eclipse.elk.layered.layering.strategy",Owe="org.eclipse.elk.layered.layering.layerConstraint",Dwe="org.eclipse.elk.layered.layering.layerChoiceConstraint",Lwe="org.eclipse.elk.layered.layering.layerId",FX="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",$X="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",BX="org.eclipse.elk.layered.layering.nodePromotion.strategy",UX="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",HX="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",KC="org.eclipse.elk.layered.crossingMinimization.strategy",Mwe="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",zX="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",GX="org.eclipse.elk.layered.crossingMinimization.semiInteractive",Pwe="org.eclipse.elk.layered.crossingMinimization.inLayerPredOf",jwe="org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf",Fwe="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",$we="org.eclipse.elk.layered.crossingMinimization.positionId",Bwe="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",qX="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",pF="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",PE="org.eclipse.elk.layered.nodePlacement.strategy",gF="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",VX="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",WX="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",KX="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",YX="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",JX="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",Uwe="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",Hwe="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",bF="org.eclipse.elk.layered.edgeRouting.splines.mode",mF="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",XX="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",zwe="org.eclipse.elk.layered.spacing.baseValue",Gwe="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",qwe="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",Vwe="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",Wwe="org.eclipse.elk.layered.priority.direction",Kwe="org.eclipse.elk.layered.priority.shortness",Ywe="org.eclipse.elk.layered.priority.straightness",ZX="org.eclipse.elk.layered.compaction.connectedComponents",Jwe="org.eclipse.elk.layered.compaction.postCompaction.strategy",Xwe="org.eclipse.elk.layered.compaction.postCompaction.constraints",wF="org.eclipse.elk.layered.highDegreeNodes.treatment",QX="org.eclipse.elk.layered.highDegreeNodes.threshold",eZ="org.eclipse.elk.layered.highDegreeNodes.treeHeight",vp="org.eclipse.elk.layered.wrapping.strategy",yF="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",vF="org.eclipse.elk.layered.wrapping.correctionFactor",YC="org.eclipse.elk.layered.wrapping.cutting.strategy",tZ="org.eclipse.elk.layered.wrapping.cutting.cuts",nZ="org.eclipse.elk.layered.wrapping.cut Line truncated
start=`,ga(t,this.i),t.a+=`
end=`,ga(t,this.a),t.a+=`
nodeStartEdge=`,ga(t,this.e),t.a+=`
startEndEdge=`,ga(t,this.j),t.a+=`
originalEdge=`,ga(t,this.f),t.a+=`
startInLayerDummy=`,ga(t,this.k),t.a+=`
startInLayerEdge=`,ga(t,this.n),t.a+=`
endInLayerDummy=`,ga(t,this.b),t.a+=`
endInLayerEdge=`,ga(t,this.c),t.a},x(Hf,"BreakingPointInserter/BPInfo",318),A(657,1,{657:1},aJe),h.a=!1,h.b=0,h.c=0,x(Hf,"BreakingPointInserter/Cut",657),A(1523,1,_r,eUe),h.If=function(t,r){FEn(l(t,37),r)},x(Hf,"BreakingPointProcessor",1523),A(1524,1,Ln,XBe),h.Mb=function(t){return Wdt(l(t,9))},x(Hf,"BreakingPointProcessor/0methodref$isEnd$Type",1524),A(1525,1,Ln,tUe),h.Mb=function(t){return Kdt(l(t,9))},x(Hf,"BreakingPointProcessor/1methodref$isStart$Type",1525),A(1526,1,_r,nUe),h.If=function(t,r){a2n(this,l(t,37),r)},x(Hf,"BreakingPointRemover",1526),A(1527,1,tn,rUe),h.Ad=function(t){l(t,134).k=!0},x(Hf,"BreakingPointRemover/lambda$0$Type",1527),A(805,1,{},bme),h.b=0,h.e=0,h.f=0,h.j=0,x(Hf,"GraphStats",805),A(806,1,{},Tue),h.Te=function(t,r){return b.Math.max(ue(ce(t)),ue(ce(r)))},x(Hf,"GraphStats/0methodref$max$Type",806),A(807,1,{},Aue),h.Te=function(t,r){return b.Math.max(ue(ce(t)),ue(ce(r)))},x(Hf,"GraphStats/2methodref$max$Type",807),A(1709,1,{},iUe),h.Te=function(t,r){return Jrn(ce(t),ce(r))},x(Hf,"GraphStats/lambda$1$Type",1709),A(1710,1,{},ZYe),h.Kb=function(t){return Qgt(this.a,l(t,26))},x(Hf,"GraphStats/lambda$2$Type",1710),A(1711,1,{},QYe),h.Kb=function(t){return rwt(this.a,l(t,26))},x(Hf,"GraphStats/lambda$6$Type",1711),A(808,1,{},_ue),h.mg=function(t,r){var o;return o=l(j(t,(Be(),MAe)),16),o||(St(),St(),No)},h.ng=function(){return!1},x(Hf,"ICutIndexCalculator/ManualCutIndexCalculator",808),A(810,1,{},kue),h.mg=function(t,r){var o,s,u,f,p,m,y,v,T,N,I,L,U,G,J,ne,oe,le,Ee;for(Ee=(r.n==null&&k1t(r),r.n),y=(r.d==null&&k1t(r),r.d),le=me(Ki,Wo,30,Ee.length,15,1),le[0]=Ee[0],ne=Ee[0],v=1;v<Ee.length;v++)le[v]=le[v-1]+Ee[v],ne+=Ee[v];for(u=nmt(r)-1,p=l(j(t,(Be(),PAe)),15).a,s=Oi,o=new Pe,I=b.Math.max(0,u-p);I<=b.Math.min(r.f-1,u+p);I++){if(G=ne/(I+1),J=0,T=1,f=new Pe,oe=Oi,N=0,m=0,U=y[0],I==0)oe=ne,m=(r.g==null&&(r.g=oht(r,new Aue)),ue(r.g));else{for(;T<r.f;)le[T-1]-J>=G&&(je(f,Re(T)),oe=b.Math.max(oe,le[T-1]-N),m+=U,J+=le[T-1]-J,N=le[T-1],U=y[T]),U=b.Math.max(U,y[T]),++T;m+=U}L=b.Math.min(1/oe,1/r.b/m),L>s&&(s=L,o=f)}return o},h.ng=function(){return!1},x(Hf,"MSDCutIndexHeuristic",810),A(1664,1,_r,oUe),h.If=function(t,r){KAn(l(t,37),r)},x(Hf,"SingleEdgeGraphWrapper",1664),A(233,23,{3:1,34:1,23:1,233:1},QN);var KE,Vk,Wk,Hy,TI,YE,Kk=fn(Fs,"CenterEdgeLabelPlacementStrategy",233,bn,ldn,hrn),bNt;A(427,23,{3:1,34:1,23:1,427:1},vle);var CSe,Cee,ISe=fn(Fs,"ConstraintCalculationStrategy",427,bn,Ian,frn),mNt;A(302,23,{3:1,34:1,23:1,302:1,173:1,177:1},u8),h.bg=function(){return H0t(this)},h.og=function(){return H0t(this)};var oL,AI,RSe,OSe,DSe=fn(Fs,"CrossingMinimizationStrategy",302,bn,Bcn,brn),wNt;A(351,23,{3:1,34:1,23:1,351:1},Cq);var LSe,Iee,q$,MSe=fn(Fs,"CuttingStrategy",351,bn,xun,mrn),yNt;A(268,23,{3:1,34:1,23:1,268:1,173:1,177:1},Kv),h.bg=function(){return Wwt(this)},h.og=function(){return Wwt(this)};var Ree,PSe,Oee,Dee,Lee,Mee,Pee,jee,sL,jSe=fn(Fs,"CycleBreakingStrategy",268,bn,Efn,wrn),vNt;A(424,23,{3:1,34:1,23:1,424:1},Ele);var V$,FSe,$Se=fn(Fs,"DirectionCongruency",424,bn,Ran,yrn),ENt;A(452,23,{3:1,34:1,23:1,452:1},Iq);var Yk,Fee,JE,SNt=fn(Fs,"EdgeConstraint",452,bn,Nun,vrn),TNt;A(286,23,{3:1,34:1,23:1,286:1},e3);var $ee,Bee,Uee,Hee,W$,zee,BSe=fn(Fs,"EdgeLabelSideSelection",286,bn,adn,Ern),ANt;A(479,23,{3:1,34:1,23:1,479:1},Sle);var K$,USe,HSe=fn(Fs,"EdgeStraighteningStrategy",479,bn,Oan,Srn),_Nt;A(284,23,{3:1,34:1,23:1,284:1},t3);var Gee,zSe,GSe,Y$,qSe,VSe,WSe=fn(Fs,"FixedAlignment",284,bn,udn,Trn),kNt;A(285,23,{3:1,34:1,23:1,285:1},n3);var KSe,YSe,JSe,XSe,_I,ZSe,QSe=fn(Fs,"GraphCompactionStrategy",285,bn,cdn,Arn),xNt;A(262,23,{3:1,34:1,23:1,262:1},jw);var Jk,J$,Xk,rl,kI,X$,Zk,XE,Z$,xI,qee=fn(Fs,"GraphProperties",262,bn,Hfn,_rn),NNt;A(303,23,{3:1,34:1,23:1,303:1},Rq);var aL,Vee,Wee,Kee=fn(Fs,"GreedySwitchType",303,bn,kun,krn),CNt;A(330,23,{3:1,34:1,23:1,330:1},Oq);var zy,eTe,uL,Yee=fn(Fs,"GroupOrderStrategy",330,bn,Aun,xrn),INt;A(316,23,{3:1,34:1,23:1,316:1},Dq);var _T,cL,ZE,RNt=fn(Fs,"InLayerConstraint",316,bn,_un,Nrn),ONt;A(425,23,{3:1,34:1,23:1,425:1},Tle);var Jee,tTe,nTe=fn(Fs,"InteractiveReferencePoint",425,bn,xan,Crn),DNt,rTe,kT,Q0,lL,Q$,iTe,oTe,eB,sTe,xT,tB,NI,NT,Tp,Xee,nB,Us,aTe,j1,_a,Zee,Qee,dL,dm,ew,CT,uTe,LNt,IT,fL,Gy,Cd,Nl,ete,QE,F1,Nr,mr,cTe,lTe,dTe,fTe,hTe,tte,rB,Nu,tw,nte,RT,CI,Tg,e2,nw,t2,n2,Qk,fm,pTe,rte,ite,II,OT,iB,DT,r2;A(166,23,{3:1,34:1,23:1,166:1},pO);var RI,Ap,OI,hm,hL,gTe=fn(Fs,"LayerConstraint",166,bn,Mln,Irn),MNt;A(428,23,{3:1,34:1,23:1,428:1},Ale);var ote,ste,bTe=fn(Fs,"LayerUnzippingStrategy",428,bn,Nan,Rrn),PNt;A(851,1,td,mWe),h.tf=function(t){st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,Twe),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),CTe),(A1(),$r)),$Se),ct((Jd(),xt))))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,Awe),""),"Feedback Edges"),"Whether feedback edges should be highlighted by Line truncated
`;for(r=An(this.a,0);r.b!=r.d.c;)t=l(Sn(r),65),u+=(t.b&&t.c?Pb(t.b)+"->"+Pb(t.c):"e_"+Ir(t))+`
`;return u};var j3n=x(XC,"TGraph",121);A(640,497,{3:1,497:1,640:1,105:1,151:1}),x(XC,"TShape",640),A(41,640,{3:1,497:1,41:1,640:1,105:1,151:1},MK),h.Ib=function(){return Pb(this)};var DB=x(XC,"TNode",41);A(239,1,Eh,Xh),h.Ic=function(t){co(this,t)},h.Jc=function(){var t;return t=An(this.a.d,0),new qv(t)},x(XC,"TNode/2",239),A(335,1,Wi,qv),h.Nb=function(t){oo(this,t)},h.Pb=function(){return l(Sn(this.a),65).c},h.Ob=function(){return rO(this.a)},h.Qb=function(){cK(this.a)},x(XC,"TNode/2/1",335),A(1910,1,_r,hHe),h.If=function(t,r){ZNn(this,l(t,121),r)},x(Ta,"CompactionProcessor",1910),A(1911,1,Un,MJe),h.Le=function(t,r){return dhn(this.a,l(t,41),l(r,41))},h.Fb=function(t){return this===t},h.Me=function(){return new Mn(this)},x(Ta,"CompactionProcessor/lambda$0$Type",1911),A(1912,1,Ln,Ett),h.Mb=function(t){return Aan(this.b,this.a,l(t,49))},h.a=0,h.b=0,x(Ta,"CompactionProcessor/lambda$1$Type",1912),A(1921,1,Un,pHe),h.Le=function(t,r){return hsn(l(t,41),l(r,41))},h.Fb=function(t){return this===t},h.Me=function(){return new Mn(this)},x(Ta,"CompactionProcessor/lambda$10$Type",1921),A(1922,1,Un,gHe),h.Le=function(t,r){return Otn(l(t,41),l(r,41))},h.Fb=function(t){return this===t},h.Me=function(){return new Mn(this)},x(Ta,"CompactionProcessor/lambda$11$Type",1922),A(1923,1,Un,bHe),h.Le=function(t,r){return psn(l(t,41),l(r,41))},h.Fb=function(t){return this===t},h.Me=function(){return new Mn(this)},x(Ta,"CompactionProcessor/lambda$12$Type",1923),A(1913,1,Ln,PJe),h.Mb=function(t){return wtn(this.a,l(t,49))},h.a=0,x(Ta,"CompactionProcessor/lambda$2$Type",1913),A(1914,1,Ln,jJe),h.Mb=function(t){return ytn(this.a,l(t,49))},h.a=0,x(Ta,"CompactionProcessor/lambda$3$Type",1914),A(1915,1,Ln,mHe),h.Mb=function(t){return l(t,41).c.indexOf(RF)==-1},x(Ta,"CompactionProcessor/lambda$4$Type",1915),A(1916,1,{},FJe),h.Kb=function(t){return Scn(this.a,l(t,41))},h.a=0,x(Ta,"CompactionProcessor/lambda$5$Type",1916),A(1917,1,{},$Je),h.Kb=function(t){return Rdn(this.a,l(t,41))},h.a=0,x(Ta,"CompactionProcessor/lambda$6$Type",1917),A(1918,1,Un,BJe),h.Le=function(t,r){return Bln(this.a,l(t,243),l(r,243))},h.Fb=function(t){return this===t},h.Me=function(){return new Mn(this)},x(Ta,"CompactionProcessor/lambda$7$Type",1918),A(1919,1,Un,UJe),h.Le=function(t,r){return Uln(this.a,l(t,41),l(r,41))},h.Fb=function(t){return this===t},h.Me=function(){return new Mn(this)},x(Ta,"CompactionProcessor/lambda$8$Type",1919),A(1920,1,Un,wHe),h.Le=function(t,r){return Dtn(l(t,41),l(r,41))},h.Fb=function(t){return this===t},h.Me=function(){return new Mn(this)},x(Ta,"CompactionProcessor/lambda$9$Type",1920),A(1908,1,_r,yHe),h.If=function(t,r){qSn(l(t,121),r)},x(Ta,"DirectionProcessor",1908),A(x1,1,_r,hit),h.If=function(t,r){dAn(this,l(t,121),r)},x(Ta,"FanProcessor",x1),A(1263,1,_r,vHe),h.If=function(t,r){Fwt(l(t,121),r)},x(Ta,"GraphBoundsProcessor",1263),A(1264,1,{},EHe),h.We=function(t){return l(t,41).e.a},x(Ta,"GraphBoundsProcessor/lambda$0$Type",1264),A(1265,1,{},SHe),h.We=function(t){return l(t,41).e.b},x(Ta,"GraphBoundsProcessor/lambda$1$Type",1265),A(1266,1,{},THe),h.We=function(t){return QQt(l(t,41))},x(Ta,"GraphBoundsProcessor/lambda$2$Type",1266),A(1267,1,{},AHe),h.We=function(t){return een(l(t,41))},x(Ta,"GraphBoundsProcessor/lambda$3$Type",1267),A(265,23,{3:1,34:1,23:1,265:1,177:1},n0),h.bg=function(){switch(this.g){case 0:return new $Ze;case 1:return new hit;case 2:return new FZe;case 3:return new CHe;case 4:return new kHe;case 8:return new _He;case 5:return new yHe;case 6:return new RHe;case 7:return new hHe;case 9:return new vHe;case 10:return new OHe;default:throw K(new jt(LX+(this.f!=null?this.f:""+this.g)))}};var y_e,v_e,E_e,S_e,T_e,A_e,__e,k_e,x_e,N_e,Wte,F3n=fn(Ta,MX,265,bn,wht,Qrn),$4t;A(1907,1,_r,_He),h.If=function(t,r){Jxn(l(t,121),r)},x(Ta,"LevelCoordinatesProcessor",1907),A(1905,1,_r,kHe),h.If=function(t,r){g2n(this,l(t,121),r)},h.a=0,x(Ta,"LevelHeightProcessor",1905),A(1906,1,Eh,xHe),h.Ic=function(t){co(this,t)},h.Jc=function(){return St(),HA(),Uk},x(Ta,"LevelHeightProcessor/1",1906),A(1901,1,_r,FZe),h.If=function(t,r){NSn(this,l(t,121),r)},x(Ta,"LevelProcessor",1901),A(1902,1,Ln,NHe),h.Mb=function(t){return Ke(We(j(l(t,41),(xr(),z1))))},x(Ta,"LevelProcessor/lambda$0$Type",1902),A(1903,1,_r,CHe),h.If=function(t,r){vyn(this,l(t,121),r)},h.a=0,x(Ta,"NeighborsProcessor",1903),A(1904,1,Eh,IHe),h.Ic=function(t){co(this,t)},h.Jc=function(){return St(),HA(),Uk},x(Ta,"NeighborsProcessor/1",1904),A(1909,1,_r,RHe),h.If=function(t,r){cAn(this,l(t,121),r)},h.a=0,x(Ta,"NodePositionProcessor",1909),A(1899,1,_r,$Ze),h.If=function(t,r){J_n(this,l(t,121),r)},x(Ta,"RootProcessor",1899),A(1924,1,_r,OHe),h.If=function(t,r){ibn(l(t,121),r)},x(Ta,"Untreeifyer",1924),A(386,23,{3:1,34:1,23:1,386:1},Hq);var _L,Kte,C_e,I_e=fn(BD,"EdgeRoutingMode",386,bn,Pun,ein),B4t,kL,ux,Yte,R_e,O_e,Jte,Xte,D_e,Zte,L_e,Qte,e4,ene,LB,MB,sd,Id,cx,t4,n4,xg,M_e,U4t,tne,z1,xL,NL;A(854,1,td,jWe),h.tf=function(t){st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,Yye),""),NSt),"Turns on Tree c Line truncated
`),u.length!=2)throw K(new jt("Exactly two numbers are expected, "+u.length+" were found."));try{this.a=yy(vy(u[0])),this.b=yy(vy(u[1]))}catch(f){throw f=ci(f),se(f,133)?(o=f,K(new jt(z2t+o))):K(f)}},h.Ib=function(){return"("+this.a+","+this.b+")"},h.a=0,h.b=0;var $i=x(LD,"KVector",8);A(79,66,{3:1,4:1,22:1,32:1,56:1,18:1,66:1,16:1,79:1,419:1},Du,F9,Prt),h.Nc=function(){return lpn(this)},h.ag=function(t){var r,o,s,u,f,p;s=ky(t,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | |
`),ec(this);try{for(o=0,f=0,u=0,p=0;o<s.length;)s[o]!=null&&vy(s[o]).length>0&&(f%2==0?u=yy(s[o]):p=yy(s[o]),f>0&&f%2!=0&&Gn(this,new Le(u,p)),++f),++o}catch(m){throw m=ci(m),se(m,133)?(r=m,K(new jt("The given string does not match the expected format for vectors."+r))):K(m)}},h.Ib=function(){var t,r,o;for(t=new fc("("),r=An(this,0);r.b!=r.d.c;)o=l(Sn(r),8),zn(t,o.a+","+o.b),r.b!=r.d.c&&(t.a+="; ");return(t.a+=")",t).a};var Rxe=x(LD,"KVectorChain",79);A(259,23,{3:1,34:1,23:1,259:1},r3);var rre,ZB,QB,ML,PL,eU,Oxe=fn(Pa,"Alignment",259,bn,hdn,Oin),p6t;A(984,1,td,YWe),h.tf=function(t){Nyt(t)};var Dxe,ire,g6t,Lxe,Mxe,b6t,Pxe,m6t,w6t,jxe,Fxe,y6t;x(Pa,"BoxLayouterOptions",984),A(985,1,{},mGe),h.uf=function(){var t;return t=new vGe,t},h.vf=function(t){},x(Pa,"BoxLayouterOptions/BoxFactory",985),A(300,23,{3:1,34:1,23:1,300:1},i3);var f4,ore,h4,p4,g4,sre,are=fn(Pa,"ContentAlignment",300,bn,fdn,Din),v6t;A(696,1,td,Lue),h.tf=function(t){st(t,new Ze(it(rt(ot(Qe(nt(et(tt(new Xe,eTt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(A1(),BT)),Ye),ct((Jd(),xt))))),st(t,new Ze(it(rt(ot(Qe(nt(et(tt(new Xe,tTt),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),lf),H3n),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,_ye),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),$xe),$r),Oxe),ct(ri)))),st(t,new Ze(it(rt(ot(Qe(nt(et(tt(new Xe,bk),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),Qi),fi),ct(xt)))),st(t,new Ze(it(rt(ot(Qe(nt(et(tt(new Xe,Vve),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),lf),Rxe),ct(Rd)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,xF),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),Uxe),$T),are),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,$D),""),"Debug Mode"),"Whether additional debug information shall be generated."),(Lt(),!1)),Ai),Yr),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,vZ),""),"Direction"),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),Hxe),$r),w4),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,FD),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),qxe),$r),vre),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,Gve),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),Ai),Yr),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,kF),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),Wxe),$r),PNe),Ar(xt,Z(X(cf,1),Ce,161,0,[ri]))))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,$0),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),iNe),lf),j2e),Ar(xt,Z(X(cf,1),Ce,161,0,[ri]))))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,mk),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),Ai),Yr),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,CF),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),Ai),Yr),ct(xt)))),st(t,new Ze(it(rt(ot(pt(Qe(nt(et(tt(new Xe,wk),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node l Line truncated
Consider installing the package or pass your own 'workerFactory' to ELK's constructor.
... Falling back to non-web worker version.`);if(!H.workerFactory){var ee=a("./elk-worker.min.js"),ae=ee.Worker;H.workerFactory=function(he){return new ae(he)}}return E(this,$,[H])}return R($,F),b($)}(D);Object.defineProperty(c.exports,"__esModule",{value:!0}),c.exports=B,B.default=B},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(a,c,d){var g=typeof Worker<"u"?Worker:void 0;c.exports=g},{}]},{},[3])(3)})})(Qqt);var MWn=Qqt.exports;const PWn=vR(MWn),jWn=new PWn;async function FWn(n,i){try{const a=n.map(b=>({id:b.id,width:BWn(b.type),height:UWn(b.type)})),c=i.map(b=>({id:b.id,sources:[b.source],targets:[b.target]})),d={id:"root",layoutOptions:{"elk.algorithm":"layered","elk.direction":"RIGHT","elk.spacing.nodeNode":"80","elk.layered.spacing.nodeNodeBetweenLayers":"100","elk.spacing.edgeNode":"40","elk.layered.nodePlacement.strategy":"SIMPLE"},children:a,edges:c},g=await jWn.layout(d);return n.map(b=>{var E;const w=(E=g.children)==null?void 0:E.find(S=>S.id===b.id);return w&&w.x!==void 0&&w.y!==void 0?{...b,position:{x:w.x,y:w.y}}:b})}catch{return $Wn(n)}}function $Wn(n){return n.map((b,w)=>{const E=w%3,S=Math.floor(w/3);return{...b,position:{x:100+E*300,y:100+S*150}}})}function BWn(n){switch(n){case"trigger":return 200;case"condition":return 220;case"action":return 200;case"delay":return 180;case"wait":return 180;default:return 200}}function UWn(n){switch(n){case"trigger":return 80;case"condition":return 100;case"action":return 80;case"delay":return 70;case"wait":return 70;default:return 80}}function HWn(n){return typeof n=="object"&&n!==null&&"delay"in n&&(typeof n.delay=="string"||typeof n.delay=="number"||typeof n.delay=="object"&&n.delay!==null)}function zWn(n){return typeof n=="object"&&n!==null&&("wait_template"in n||"wait_for_trigger"in n)}function GWn(n){return typeof n=="object"&&n!==null&&"choose"in n}function qWn(n){return typeof n=="object"&&n!==null&&"parallel"in n&&Array.isArray(n.parallel)}function VWn(n){return typeof n=="object"&&n!==null&&"if"in n&&Array.isArray(n.if)&&"then"in n&&Array.isArray(n.then)}function WWn(n){return typeof n=="object"&&n!==null&&(typeof n.service=="string"||typeof n.action=="string")}function KWn(n){return typeof n=="object"&&n!==null&&"condition"in n&&typeof n.condition=="string"}function YWn(n){return typeof n=="object"&&n!==null&&"variables"in n&&typeof n.variables=="object"&&!("service"in n)&&!("action"in n)&&!("delay"in n)&&!("wait_template"in n)&&!("choose"in n)&&!("if"in n)}function JWn(n){return typeof n=="object"&&n!==null&&"set_conversation_response"in n}function XWn(n){return typeof n=="object"&&n!==null&&"repeat"in n&&typeof n.repeat=="object"&&n.repeat!==null}function ZWn(n){return typeof n=="object"&&n!==null&&"event"in n&&typeof n.event=="string"}const TM=["state","numeric_state","template","time","sun","zone","and","or","not","device","trigger"];function bDe(n){return n.map(i=>QWn(i))}function QWn(n){const{condition:i,conditions:a,...c}=n,d=i||"template",g=TM.includes(d)?d:"template",b=Array.isArray(a)?bDe(a):void 0;return{...c,condition:g,conditions:b}}class eKn{async parse(i){const a=[];try{let c=_Wn(i);if(Array.isArray(c)){if(c.length===0)return{success:!1,errors:["Empty automation array"],warnings:a,hadMetadata:!1};c=c[0]}if(!c||typeof c!="object")return{success:!1,errors:["Invalid YAML structure"],warnings:a,hadMetadata:!1};const d=this.extractMetadata(c),g=d!==null,b=this.extractUserVariables(c),w=c;if(typeof w!="object"||w===null)return{success:!1,errors:["Invalid YAML content structure"],warnings:a,hadMetadata:g};const E=d?Object.keys(d.nodes):[],S=(d==null?void 0:d.strategy)==="state-machine"||this.detectStateMachineFormat(w),{nodes:k,edges:_}=S?this.parseStateMachineStructure(w,a,E):this.parseAutomationStructure(w,a,E);let C;g&&d?C=this.applyMetadataPositions(k,d):C=await FWn(k,_);const R={mode:w.mode,max:w.max,max_exceeded:w.max_exceeded,initial_state:w.initial_state,hide_entity:w.hide_entity,trace:w.trace},M=B9t.safeParse(R),D=M.success?M.data:B9t.parse({}),B={id:(d==null?void 0:d.graph_id)||DWn(),name:typeof w.alias=="string"?w.alias:"Imported Automation",description:typeof w.description=="string"?w.description:"",nodes:C,edges:_,metadata:D,version:1,userVariables:Object.keys(b).length>0?b:void 0},F=GGt.safeParse(B);if(!F.success){const P=F.error.issues.map(H=>{let Q="";if(H.path&&H.path.length>0&&H.path[0]==="nodes"&&typeof H.path[1]=="number"){const re=H.path[1],ee=B.nodes[re];Q=`Node index ${re} (id: ${ee==null?void 0:ee.id}, type: ${ee==null?void 0:ee.type})
Data: ${JSON.stringify(ee==null?void 0:ee.data,null,2)}`}return`Schema path: ${H.path.join(".")}
Message: ${H.message}${Q?`
${Q}`:""}`});return console.error("Zod validation error details:",P),{success:!1,errors:P,warnings:a,hadMetadata:g}}const $=qGt(F.data);return $.valid?{success:!0,graph:F.data,warnings:a,hadMetadata:g}:{success:!1,errors:$.errors,warnings:a,hadMetadata:g}}catch(c){return console.error("YAML parsing error:",c),console.error("YAML string:",i),{success:!1,errors:[c instanceof Error?c.message:"Unknown parsing error"],warnings:a,hadMetadata:!1}}}extractMetadata(i){try{let a;if(typeof i.variables=="object"&&i.variables!==null&&(a=i.variables),a&&typeof a=="object"&&"_cafe_metadata"in a&&typeof a._cafe_metadata=="object"&&a._cafe_metadata!==null){const c=a._cafe_metadata,d=zGt.safeParse(c);if(d.success)return d.data}}catch{}return null}extractUserVariables(i){const a={};if(typeof i.variables=="object"&&i.variables!==null){const c=i.variables;for(const[d,g]of Object.entries(c))d!=="_cafe_metadata"&&(a[d]=g)}return a}detectStateMachineFormat(i){const a=i.actions||i.action;if(!Array.isArray(a))return!1;let c=!1,d=!1;for(const g of a){const b=g;if(b.variables){const w=b.variables;"current_node"in w&&"flow_context"in w&&(c=!0)}if(b.repeat){const E=b.repeat.sequence;if(Array.isArray(E))for(const S of E){const k=S;if(Array.isArray(k.choose)){d=!0;break}}}}return c&&d}parseStateMachineStructure(i,a,c){const d=[],g=[],b=i.actions||i.action;if(!Array.isArray(b))return a.push("No actions found in automation"),{nodes:d,edges:g};let w=null;const E=new Map;for(const F of b){const $=F;if($.variables){const P=$.variables;typeof P.current_node=="string"&&P.current_node!=="END"&&(w=P.current_node)}if($.repeat){const H=$.repeat.sequence;if(Array.isArray(H))for(const Q of H){const re=Q;if(Array.isArray(re.choose))for(const ee of re.choose){const ae=this.parseStateMachineChooseBlock(ee);ae&&E.set(ae.nodeId,ae)}}}}const S=new Set(E.keys()),k=c.filter(F=>!S.has(F));let _=0,C=0;const R=F=>_<k.length?k[_++]:q7t(F,C++),M=i.triggers||i.trigger;if(!M)return a.push("No triggers found in automation"),{nodes:d,edges:g};const D=Array.isArray(M)?M:[M],B=this.parseTriggers(D,a,R);d.push(...B);for(const[F,$]of E)switch($.nodeType){case"condition":d.push({id:F,type:"condition",position:{x:0,y:0},data:$.data});break;case"action":d.push({id:F,type:"action",position:{x:0,y:0},data:$.data});break;case"delay":d.push({id:F,type:"delay",position:{x:0,y:0},data:$.data});break;case"wait":d.push({id:F,type:"wait",position:{x:0,y:0},data:$.data});break}if(w){const F=this.parseEntryNodeTemplate(w);if(F&&F.size>0)for(let $=0;$<B.length;$++){const P=F.get($);P&&g.push(this.createEdge(B[$].id,P))}else for(const $ of B)g.push(this.createEdge($.id,w))}for(const[F,$]of E)$.trueTarget&&$.trueTarget!=="END"&&g.push({id:`edge-${F}-${$.trueTarget}`,source:F,target:$.trueTarget,sourceHandle:$.falseTarget?"true":void 0}),$.falseTarget&&$.falseTarget!=="END"&&g.push({id:`edge-${F}-${$.falseTarget}`,source:F,target:$.falseTarget,sourceHandle:"false"});return{nodes:d,edges:g}}parseEntryNodeTemplate(i){if(!i.includes("{%")||!i.includes("trigger.idx"))return null;const a=new Map,c=/{%\s*(?:if|elif)\s+trigger\.idx\s*==\s*["'](\d+)["']\s*%}\s*([^{%]+?)(?={%|$)/g,d=i.matchAll(c);for(const b of d){const w=parseInt(b[1],10),E=b[2].trim();a.set(w,E)}const g=i.match(/{%\s*else\s*%}\s*([^{%]+?)(?={%|$)/);if(g&&a.size>0){const b=Math.max(...a.keys());a.set(b+1,g[1].trim())}return a.size>0?a:null}parseStateMachineChooseBlock(i){const a=i.conditions;if(!Array.isArray(a)||a.length===0)return null;const d=a[0].value_template;if(!d)return null;const g=d.match(/current_node\s*==\s*["']([^"']+)["']/);if(!g)return null;const b=g[1],w=i.sequence;if(!Array.isArray(w)||w.length===0)return null;let E="action";const S={};let k=null,_=null;for(const C of w){const R=C;if(R.variables){const D=R.variables.current_node;if(typeof D=="string")if(D.includes("{%")&&D.includes("%}")){E="condition";const B=D.match(/{%\s*if[^%]*%}\s*"?([^"'{%]+?)"?(?=\s*{%)/),F=D.match(/{%\s*else\s*%}\s*"?([^"'{%]+?)"?(?=\s*{%)/);k=B?B[1]:null,_=F?F[1]:null;const $=D.match(/{%\s*if\s+(.+?)\s*%}/);if($){const P=$[1];Object.assign(S,this.parseJinjaCondition(P))}}else k=D==="END"?null:D}else R.delay!==void 0?(E="delay",S.delay=R.delay,R.alias&&(S.alias=R.alias)):R.wait_template!==void 0?(E="wait",S.wait_template=R.wait_template,R.timeout&&(S.timeout=R.timeout),R.continue_on_timeout!==void 0&&(S.continue_on_timeout=R.continue_on_timeout),R.alias&&(S.alias=R.alias)):(R.service||R.action)&&(E="action",S.service=R.service||R.action,R.target&&(S.target=R.target),R.data&&(S.data=R.data),R.alias&&(S.alias=R.alias))}return{nodeId:b,nodeType:E,data:S,trueTarget:k,falseTarget:_}}parseJinjaCondition(i){const a=i.match(/is_state\s*\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/);if(a){const d=a[1],g=a[2];if(d==="sun.sun"){if(g==="above_horizon")return{condition:"sun",after:"sunrise",before:"sunset"};if(g==="below_horizon")return{condition:"sun",after:"sunset",before:"sunrise"}}return{condition:"state",entity_id:d,state:g}}const c=i.match(Line truncated
`),children:O.jsx(Pv,{className:"h-3 w-3"})}),_&&!w&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-gray-500 text-white shadow-sm",children:O.jsx(_R,{className:"h-3 w-3"})}),O.jsx(jp,{type:"target",position:Vr.Left,className:"!w-3 !h-3 !bg-green-500 !border-green-700"}),O.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[O.jsx("div",{className:"rounded bg-green-200 p-1",children:O.jsx(Zse,{className:"h-4 w-4 text-green-700"})}),O.jsx("span",{className:"font-semibold text-green-900 text-sm",children:a.alias||(M?a.event:R)||"Action"}),k&&O.jsx("div",{className:"ml-auto flex h-5 w-5 items-center justify-center rounded-full bg-green-600 font-bold text-white text-xs",children:k})]}),O.jsxs("div",{className:"space-y-0.5 text-green-700 text-xs",children:[O.jsx("div",{className:"font-medium",children:M?O.jsx("span",{className:"opacity-60",children:d("nodes:actions.fireEvent")}):O.jsxs(O.Fragment,{children:[O.jsxs("span",{className:"opacity-60",children:[C,"."]}),R]})}),D&&O.jsx("div",{className:"truncate opacity-75",children:D})]}),O.jsx(jp,{type:"source",position:Vr.Right,className:"!w-3 !h-3 !bg-green-500 !border-green-700"})]})}),YKn=z.memo(function({id:i,data:a,selected:c}){const d=ds(C=>C.activeNodeId),g=ds(C=>C.getExecutionStepNumber),{hasErrors:b,errorMessages:w}=xw(i),E=d===i,S=g(i),k=a.enabled===!1,_={state:"State",numeric_state:"Numeric",template:"Template",time:"Time",zone:"Zone",sun:"Sun",and:"AND",or:"OR",not:"NOT",device:"Device",trigger:"Trigger"};return O.jsxs("div",{className:kr("group relative min-w-[180px] rounded-lg border-2 border-blue-400 bg-blue-50 px-4 py-3","transition-all duration-200",c&&"ring-2 ring-blue-500 ring-offset-2",E&&"node-active ring-4 ring-green-500",k&&"border-dashed opacity-50 grayscale",b&&"border-red-500 ring-2 ring-red-400"),children:[b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-white shadow-sm",title:w.join(`
`),children:O.jsx(Pv,{className:"h-3 w-3"})}),k&&!b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-gray-500 text-white shadow-sm",children:O.jsx(_R,{className:"h-3 w-3"})}),O.jsx(jp,{type:"target",position:Vr.Left,className:"!w-3 !h-3 !bg-blue-500 !border-blue-700"}),O.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[O.jsx("div",{className:"rounded bg-blue-200 p-1",children:O.jsx(Jzt,{className:"h-4 w-4 text-blue-700"})}),O.jsx("span",{className:"font-semibold text-blue-900 text-sm",children:a.alias||_[a.condition]||"Condition"}),S&&O.jsx("div",{className:"ml-auto flex h-5 w-5 items-center justify-center rounded-full bg-blue-600 font-bold text-white text-xs",children:S})]}),O.jsxs("div",{className:"space-y-0.5 text-blue-700 text-xs",children:[O.jsx("div",{className:"font-medium",children:_[a.condition]||a.condition}),a.entity_id&&O.jsx("div",{className:"truncate opacity-75",children:Array.isArray(a.entity_id)?a.entity_id.join(", "):a.entity_id}),a.state&&O.jsxs("div",{className:"opacity-75",children:["= ",a.state]}),a.above!==void 0&&O.jsxs("div",{className:"opacity-75",children:["> ",a.above]}),a.below!==void 0&&O.jsxs("div",{className:"opacity-75",children:["< ",a.below]}),a.after&&O.jsxs("div",{className:"opacity-75",children:["after: ",a.after]}),a.before&&O.jsxs("div",{className:"opacity-75",children:["before: ",a.before]}),a.zone&&O.jsxs("div",{className:"opacity-75",children:["zone: ",a.zone]}),a.attribute&&O.jsxs("div",{className:"opacity-75",children:["attr: ",a.attribute]}),a.for&&O.jsxs("div",{className:"opacity-75",children:["for: ",typeof a.for=="string"?a.for:`${a.for.hours||0}h ${a.for.minutes||0}m ${a.for.seconds||0}s`]}),a.template&&O.jsxs("div",{className:"truncate font-mono text-[10px] opacity-75",children:[a.template.slice(0,30),"..."]}),a.value_template&&O.jsxs("div",{className:"truncate font-mono text-[10px] opacity-75",children:[a.value_template.slice(0,30),"..."]}),typeof a.id=="string"&&O.jsxs("div",{className:"opacity-75",children:["id: ",a.id]}),Array.isArray(a.conditions)&&a.conditions.length>0&&O.jsx("div",{className:"opacity-75",children:Wie("nodes:conditions.nestedConditions",{count:a.conditions.length})})]}),O.jsx(jp,{type:"source",position:Vr.Right,id:"true",style:{top:"30%"},className:"!w-3 !h-3 !bg-green-500 !border-green-700"}),O.jsx(jp,{type:"source",position:Vr.Right,id:"false",style:{top:"70%"},className:"!w-3 !h-3 !bg-red-500 !border-red-700"}),O.jsx("div",{className:"absolute top-[30%] right-[-40px] -translate-y-1/2 transform rounded border border-green-200 bg-white px-1 py-0.5 font-medium text-[10px] text-green-700 opacity-0 shadow-sm transition-opacity group-hover:opacity-100",children:Wie("nodes:conditions.yes")}),O.jsx("div",{className:"absolute top-[70%] right-[-36px] -translate-y-1/2 transform rounded border border-red-200 bg-white px-1 py-0.5 font-medium text-[10px] text-red-700 opacity-0 shadow-sm transition-opacity group-hover:opacity-100",children:Wie("nodes:conditions.no")})]})});function uVt(n){if(!n)return"";if(typeof n=="string")return n;if(typeof n=="object"){const i=[];return n.hours&&i.push(`${n.hours}h`),n.minutes&&i.push(`${n.minutes}m`),n.seconds&&i.push(`${n.seconds}s`),n.milliseconds&&i.push(`${n.milliseconds}ms`),i.join(" ")||"0s"}return String(n)}const JKn=z.memo(function({id:i,data:a,selected:c}){const d=ds(C=>C.activeNodeId),g=ds(C=>C.getExecutionStepNumber),{hasErrors:b,errorMessages:w}=xw(i),E=d===i,S=g(i),k=a.enabled===!1,_=uVt(a.delay);return O.jsxs("div",{className:kr("relative min-w-[140px] rounded-lg border-2 border-purple-400 bg-purple-50 px-4 py-3","transition-all duration-200",c&&"ring-2 ring-purple-500 ring-offset-2",E&&"node-active ring-4 ring-green-500",k&&"border-dashed opacity-50 grayscale",b&&"border-red-500 ring-2 ring-red-400"),children:[b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-white shadow-sm",title:w.join(`
`),children:O.jsx(Pv,{className:"h-3 w-3"})}),k&&!b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-gray-500 text-white shadow-sm",children:O.jsx(_R,{className:"h-3 w-3"})}),O.jsx(jp,{type:"target",position:Vr.Left,className:"!w-3 !h-3 !bg-purple-500 !border-purple-700"}),O.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[O.jsx("div",{className:"rounded bg-purple-200 p-1",children:O.jsx(TMe,{className:"h-4 w-4 text-purple-700"})}),O.jsx("span",{className:"font-semibold text-purple-900 text-sm",children:a.alias||"Delay"}),S&&O.jsx("div",{className:"ml-auto flex h-5 w-5 items-center justify-center rounded-full bg-purple-600 font-bold text-white text-xs",children:S})]}),O.jsx("div",{className:"text-purple-700 text-xs",children:O.jsx("div",{className:"font-mono",children:_})}),O.jsx(jp,{type:"source",position:Vr.Right,className:"!w-3 !h-3 !bg-purple-500 !border-purple-700"})]})}),XKn=z.memo(function({id:i,data:a,selected:c}){const d=ds(C=>C.activeNodeId),g=ds(C=>C.getExecutionStepNumber),{hasErrors:b,errorMessages:w}=xw(i),E=d===i,S=g(i),k=a.enabled===!1,_=Object.keys(a.variables||{}).length;return O.jsxs("div",{className:kr("relative min-w-[160px] rounded-lg border-2 border-cyan-400 bg-cyan-50 px-4 py-3","transition-all duration-200",c&&"ring-2 ring-cyan-500 ring-offset-2",E&&"node-active ring-4 ring-green-500",k&&"border-dashed opacity-50 grayscale",b&&"border-red-500 ring-2 ring-red-400"),children:[b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-white shadow-sm",title:w.join(`
`),children:O.jsx(Pv,{className:"h-3 w-3"})}),k&&!b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-gray-500 text-white shadow-sm",children:O.jsx(_R,{className:"h-3 w-3"})}),O.jsx(jp,{type:"target",position:Vr.Left,className:"!w-3 !h-3 !bg-cyan-500 !border-cyan-700"}),O.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[O.jsx("div",{className:"rounded bg-cyan-200 p-1",children:O.jsx(nGt,{className:"h-4 w-4 text-cyan-700"})}),O.jsx("span",{className:"font-semibold text-cyan-900 text-sm",children:a.alias||"Set Variables"}),S&&O.jsx("div",{className:"ml-auto flex h-5 w-5 items-center justify-center rounded-full bg-cyan-600 font-bold text-white text-xs",children:S})]}),O.jsx("div",{className:"text-cyan-700 text-xs",children:O.jsx("div",{className:"font-medium opacity-75",children:Wie("nodes:variables.variableCount",{count:_})})}),O.jsx(jp,{type:"source",position:Vr.Right,className:"!w-3 !h-3 !bg-cyan-500 !border-cyan-700"})]})}),ZKn=z.memo(function({id:i,data:a,selected:c}){const d=ds(M=>M.activeNodeId),g=ds(M=>M.getExecutionStepNumber),{hasErrors:b,errorMessages:w}=xw(i),E=d===i,S=g(i),k=a.enabled===!1,_={state:"State Change",time:"Time",time_pattern:"Time Pattern",event:"Event",mqtt:"MQTT",webhook:"Webhook",sun:"Sun",zone:"Zone",numeric_state:"Numeric State",template:"Template",homeassistant:"Home Assistant",device:"Device"},R=(()=>{const M=a.trigger;switch(M){case"device":return{title:a.alias||"Device Trigger",subtitle:a.type?`${a.domain||"device"}: ${a.type}`:"Device",detail:a.device_id?`Device: ${String(a.device_id).substring(0,8)}...`:null};case"state":return{title:a.alias||"State Change",subtitle:Array.isArray(a.entity_id)?`${a.entity_id.length} entities:
${a.entity_id.join(", ")}`:a.entity_id||"State",detail:a.to?`to: ${a.to}`:null};case"numeric_state":return{title:a.alias||"Numeric State",subtitle:Array.isArray(a.entity_id)?a.entity_id.join(", "):a.entity_id||"Numeric State",detail:a.above||a.below?`${a.above?`>${a.above}`:""}${a.above&&a.below?" ":""}${a.below?`<${a.below}`:""}`:null};case"event":return{title:a.alias||"Event",subtitle:_[M],detail:a.event_type||null};case"time":return{title:a.alias||"Time",subtitle:_[M],detail:a.at||null};case"sun":return{title:a.alias||"Sun",subtitle:_[M],detail:a.event?`${a.event}${a.offset?` ${a.offset}`:""}`:null};case"mqtt":return{title:a.alias||"MQTT",subtitle:_[M],detail:a.topic||null};case"webhook":return{title:a.alias||"Webhook",subtitle:_[M],detail:a.webhook_id||null};case"zone":return{title:a.alias||"Zone",subtitle:_[M],detail:a.zone||(Array.isArray(a.entity_id)?a.entity_id.join(", "):a.entity_id)||null};default:return{title:a.alias||_[M]||"Trigger",subtitle:_[M]||M,detail:null}}})();return O.jsxs("div",{className:kr("relative min-w-[180px] max-w-[300px] rounded-lg border-2 border-amber-400 bg-amber-50 px-4 py-3","transition-all duration-200",c&&"ring-2 ring-amber-500 ring-offset-2",E&&"node-active ring-4 ring-green-500",k&&"border-dashed opacity-50 grayscale",b&&"border-red-500 ring-2 ring-red-400"),children:[b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-white shadow-sm",title:w.join(`
`),children:O.jsx(Pv,{className:"h-3 w-3"})}),k&&!b&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-gray-500 text-white shadow-sm",children:O.jsx(_R,{className:"h-3 w-3"})}),O.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[O.jsx("div",{className:"rounded bg-amber-200 p-1",children:O.jsx(rGt,{className:"h-4 w-4 text-amber-700"})}),O.jsx("span",{className:"font-semibold text-amber-900 text-sm",children:R.title}),S&&O.jsx("div",{className:"ml-auto flex h-5 w-5 items-center justify-center rounded-full bg-amber-600 font-bold text-white text-xs",children:S})]}),O.jsxs("div",{className:"space-y-0.5 text-amber-700 text-xs",children:[O.jsx("div",{className:"line-clamp-2 truncate whitespace-pre-line font-medium",children:R.subtitle}),R.detail&&O.jsx("div",{className:"truncate opacity-75",children:String(R.detail)})]}),O.jsx(jp,{type:"source",position:Vr.Right,className:"!w-3 !h-3 !bg-amber-500 !border-amber-700"})]})}),QKn=z.memo(function({id:i,data:a,selected:c}){const{t:d}=zs(["common","nodes"]),g=ds(R=>R.activeNodeId),b=ds(R=>R.getExecutionStepNumber),{hasErrors:w,errorMessages:E}=xw(i),S=g===i,k=b(i),_=a.enabled===!1,C=uVt(a.timeout);return O.jsxs("div",{className:kr("relative min-w-[140px] rounded-lg border-2 border-orange-400 bg-orange-50 px-4 py-3","transition-all duration-200",c&&"ring-2 ring-orange-500 ring-offset-2",S&&"node-active ring-4 ring-green-500",_&&"border-dashed opacity-50 grayscale",w&&"border-red-500 ring-2 ring-red-400"),children:[w&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-white shadow-sm",title:E.join(`
`),children:O.jsx(Pv,{className:"h-3 w-3"})}),_&&!w&&O.jsx("div",{className:"absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full bg-gray-500 text-white shadow-sm",children:O.jsx(_R,{className:"h-3 w-3"})}),O.jsx(jp,{type:"target",position:Vr.Left,className:"!w-3 !h-3 !bg-orange-500 !border-orange-700"}),O.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[O.jsx("div",{className:"rounded bg-orange-200 p-1",children:O.jsx(Xzt,{className:"h-4 w-4 text-orange-700"})}),O.jsx("span",{className:"font-semibold text-orange-900 text-sm",children:a.alias||"Wait for"}),k&&O.jsx("div",{className:"ml-auto flex h-5 w-5 items-center justify-center rounded-full bg-orange-600 font-bold text-white text-xs",children:k})]}),O.jsxs("div",{className:"space-y-0.5 text-orange-700 text-xs",children:[a.wait_template&&O.jsxs("div",{className:"truncate font-mono text-[10px] opacity-75",children:[a.wait_template.slice(0,30),"..."]}),a.wait_for_trigger&&O.jsx("div",{className:"truncate text-[10px] opacity-75",children:d("nodes:wait.waitsForNTrigger",{count:a.wait_for_trigger.length})}),C&&O.jsxs("div",{className:"opacity-75",children:[d("nodes:wait.timeoutLabel")," ",C]})]}),O.jsx(jp,{type:"source",position:Vr.Right,className:"!w-3 !h-3 !bg-orange-500 !border-orange-700"})]})}),X7t=n=>Symbol.iterator in n,Z7t=n=>"entries"in n,Q7t=(n,i)=>{const a=n instanceof Map?n:new Map(n.entries()),c=i instanceof Map?i:new Map(i.entries());if(a.size!==c.size)return!1;for(const[d,g]of a)if(!c.has(d)||!Object.is(g,c.get(d)))return!1;return!0},eYn=(n,i)=>{const a=n[Symbol.iterator](),c=i[Symbol.iterator]();let d=a.next(),g=c.next();for(;!d.done&&!g.done;){if(!Object.is(d.value,g.value))return!1;d=a.next(),g=c.next()}return!!d.done&&!!g.done};function tYn(n,i){return Object.is(n,i)?!0:typeof n!="object"||n===null||typeof i!="object"||i===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(i)?!1:X7t(n)&&X7t(i)?Z7t(n)&&Z7t(i)?Q7t(n,i):eYn(n,i):Q7t({entries:()=>Object.entries(n)},{entries:()=>Object.entries(i)})}function nYn(n){const i=Hn.useRef(void 0);return a=>{const c=n(a);return tYn(i.current,c)?i.current:i.current=c}}function eFt(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function Gg(...n){return i=>{let a=!1;const c=n.map(d=>{const g=eFt(d,i);return!a&&typeof g=="function"&&(a=!0),g});if(a)return()=>{for(let d=0;d<c.length;d++){const g=c[d];typeof g=="function"?g():eFt(n[d],null)}}}}function hs(...n){return z.useCallback(Gg(...n),n)}var rYn=Symbol.for("react.lazy"),ose=gLe[" use ".trim().toString()];function iYn(n){return typeof n=="object"&&n!==null&&"then"in n}function cVt(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===rYn&&"_payload"in n&&iYn(n._payload)}function vae(n){const i=sYn(n),a=z.forwardRef((c,d)=>{let{children:g,...b}=c;cVt(g)&&typeof ose=="function"&&(g=ose(g._payload));const w=z.Children.toArray(g),E=w.find(uYn);if(E){const S=E.props.children,k=w.map(_=>_===E?z.Children.count(S)>1?z.Children.only(null):z.isValidElement(S)?S.props.children:null:_);return O.jsx(i,{...b,ref:d,children:z.isValidElement(S)?z.cloneElement(S,void 0,k):null})}return O.jsx(i,{...b,ref:d,children:g})});return a.displayName=`${n}.Slot`,a}var oYn=vae("Slot");function sYn(n){const i=z.forwardRef((a,c)=>{let{children:d,...g}=a;if(cVt(d)&&typeof ose=="function"&&(d=ose(d._payload)),z.isValidElement(d)){const b=lYn(d),w=cYn(g,d.props);return d.type!==z.Fragment&&(w.ref=c?Gg(c,b):b),z.cloneElement(d,w)}return z.Children.count(d)>1?z.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var aYn=Symbol("radix.slottable");function uYn(n){return z.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===aYn}function cYn(n,i){const a={...i};for(const c in i){const d=n[c],g=i[c];/^on[A-Z]/.test(c)?d&&g?a[c]=(...w)=>{const E=g(...w);return d(...w),E}:d&&(a[c]=d):c==="style"?a[c]={...d,...g}:c==="className"&&(a[c]=[d,g].filter(Boolean).join(" "))}return{...n,...a}}function lYn(n){var c,d;let i=(c=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:c.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?n.ref:(i=(d=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:d.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?n.props.ref:n.props.ref||n.ref)}const tFt=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,nFt=nVt,Eae=(n,i)=>a=>{var c;if((i==null?void 0:i.variants)==null)return nFt(n,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:d,defaultVariants:g}=i,b=Object.keys(d).map(S=>{const k=a==null?void 0:a[S],_=g==null?void 0:g[S];if(k===null)return null;const C=tFt(k)||tFt(_);return d[S][C]}),w=a&&Object.entries(a).reduce((S,k)=>{let[_,C]=k;return C===void 0||(S[_]=C),S},{}),E=i==null||(c=i.compoundVariants)===null||c===void 0?void 0:c.reduce((S,k)=>{let{class:_,className:C,...R}=k;return Object.entries(R).every(M=>{let[D,B]=M;return Array.isArray(B)?B.includes({...g,...w}[D]):{...g,...w}[D]===B})?[...S,_,C]:S},[]);return nFt(n,b, Line truncated
.`.concat(yJn,` {
overflow: hidden `).concat(c,`;
padding-right: `).concat(w,"px ").concat(c,`;
}
body[`).concat(i5,`] {
overflow: hidden `).concat(c,`;
overscroll-behavior: contain;
`).concat([i&&"position: relative ".concat(c,";"),a==="margin"&&`
padding-left: `.concat(d,`px;
padding-top: `).concat(g,`px;
padding-right: `).concat(b,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(w,"px ").concat(c,`;
`),a==="padding"&&"padding-right: ".concat(w,"px ").concat(c,";")].filter(Boolean).join(""),`
}
.`).concat(Qie,` {
right: `).concat(w,"px ").concat(c,`;
}
.`).concat(eoe,` {
margin-right: `).concat(w,"px ").concat(c,`;
}
.`).concat(Qie," .").concat(Qie,` {
right: 0 `).concat(c,`;
}
.`).concat(eoe," .").concat(eoe,` {
margin-right: 0 `).concat(c,`;
}
body[`).concat(i5,`] {
`).concat(vJn,": ").concat(w,`px;
}
`)},fFt=function(){var n=parseInt(document.body.getAttribute(i5)||"0",10);return isFinite(n)?n:0},$Jn=function(){z.useEffect(function(){return document.body.setAttribute(i5,(fFt()+1).toString()),function(){var n=fFt()-1;n<=0?document.body.removeAttribute(i5):document.body.setAttribute(i5,n.toString())}},[])},BJn=function(n){var i=n.noRelative,a=n.noImportant,c=n.gapMode,d=c===void 0?"margin":c;$Jn();var g=z.useMemo(function(){return PJn(d)},[d]);return z.createElement(jJn,{styles:FJn(g,!i,d,a?"":"!important")})},TDe=!1;if(typeof window<"u")try{var Tie=Object.defineProperty({},"passive",{get:function(){return TDe=!0,!0}});window.addEventListener("test",Tie,Tie),window.removeEventListener("test",Tie,Tie)}catch{TDe=!1}var yM=TDe?{passive:!1}:!1,UJn=function(n){return n.tagName==="TEXTAREA"},CVt=function(n,i){if(!(n instanceof Element))return!1;var a=window.getComputedStyle(n);return a[i]!=="hidden"&&!(a.overflowY===a.overflowX&&!UJn(n)&&a[i]==="visible")},HJn=function(n){return CVt(n,"overflowY")},zJn=function(n){return CVt(n,"overflowX")},hFt=function(n,i){var a=i.ownerDocument,c=i;do{typeof ShadowRoot<"u"&&c instanceof ShadowRoot&&(c=c.host);var d=IVt(n,c);if(d){var g=RVt(n,c),b=g[1],w=g[2];if(b>w)return!0}c=c.parentNode}while(c&&c!==a.body);return!1},GJn=function(n){var i=n.scrollTop,a=n.scrollHeight,c=n.clientHeight;return[i,a,c]},qJn=function(n){var i=n.scrollLeft,a=n.scrollWidth,c=n.clientWidth;return[i,a,c]},IVt=function(n,i){return n==="v"?HJn(i):zJn(i)},RVt=function(n,i){return n==="v"?GJn(i):qJn(i)},VJn=function(n,i){return n==="h"&&i==="rtl"?-1:1},WJn=function(n,i,a,c,d){var g=VJn(n,window.getComputedStyle(i).direction),b=g*c,w=a.target,E=i.contains(w),S=!1,k=b>0,_=0,C=0;do{if(!w)break;var R=RVt(n,w),M=R[0],D=R[1],B=R[2],F=D-B-g*M;(M||F)&&IVt(n,w)&&(_+=F,C+=M);var $=w.parentNode;w=$&&$.nodeType===Node.DOCUMENT_FRAGMENT_NODE?$.host:$}while(!E&&w!==document.body||E&&(i.contains(w)||i===w));return(k&&Math.abs(_)<1||!k&&Math.abs(C)<1)&&(S=!0),S},Aie=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},pFt=function(n){return[n.deltaX,n.deltaY]},gFt=function(n){return n&&"current"in n?n.current:n},KJn=function(n,i){return n[0]===i[0]&&n[1]===i[1]},YJn=function(n){return`
.block-interactivity-`.concat(n,` {pointer-events: none;}
.allow-interactivity-`).concat(n,` {pointer-events: all;}
`)},JJn=0,vM=[];function XJn(n){var i=z.useRef([]),a=z.useRef([0,0]),c=z.useRef(),d=z.useState(JJn++)[0],g=z.useState(NVt)[0],b=z.useRef(n);z.useEffect(function(){b.current=n},[n]),z.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(d));var D=wJn([n.lockRef.current],(n.shards||[]).map(gFt),!0).filter(Boolean);return D.forEach(function(B){return B.classList.add("allow-interactivity-".concat(d))}),function(){document.body.classList.remove("block-interactivity-".concat(d)),D.forEach(function(B){return B.classList.remove("allow-interactivity-".concat(d))})}}},[n.inert,n.lockRef.current,n.shards]);var w=z.useCallback(function(D,B){if("touches"in D&&D.touches.length===2||D.type==="wheel"&&D.ctrlKey)return!b.current.allowPinchZoom;var F=Aie(D),$=a.current,P="deltaX"in D?D.deltaX:$[0]-F[0],H="deltaY"in D?D.deltaY:$[1]-F[1],Q,re=D.target,ee=Math.abs(P)>Math.abs(H)?"h":"v";if("touches"in D&&ee==="h"&&re.type==="range")return!1;var ae=window.getSelection(),he=ae&&ae.anchorNode,ve=he?he===re||he.contains(re):!1;if(ve)return!1;var de=hFt(ee,re);if(!de)return!0;if(de?Q=ee:(Q=ee==="v"?"h":"v",de=hFt(ee,re)),!de)return!1;if(!c.current&&"changedTouches"in D&&(P||H)&&(c.current=Q),!Q)return!0;var ge=c.current||Q;return WJn(ge,B,D,ge==="h"?P:H)},[]),E=z.useCallback(function(D){var B=D;if(!(!vM.length||vM[vM.length-1]!==g)){var F="deltaY"in B?pFt(B):Aie(B),$=i.current.filter(function(Q){return Q.name===B.type&&(Q.target===B.target||B.target===Q.shadowParent)&&KJn(Q.delta,F)})[0];if($&&$.should){B.cancelable&&B.preventDefault();return}if(!$){var P=(b.current.shards||[]).map(gFt).filter(Boolean).filter(function(Q){return Q.contains(B.target)}),H=P.length>0?w(B,P[0]):!b.current.noIsolation;H&&B.cancelable&&B.preventDefault()}}},[]),S=z.useCallback(function(D,B,F,$){var P={name:D,delta:B,target:F,should:$,shadowParent:ZJn(F)};i.current.push(P),setTimeout(function(){i.current=i.current.filter(function(H){return H!==P})},1)},[]),k=z.useCallback(function(D){a.current=Aie(D),c.current=void 0},[]),_=z.useCallback(function(D){S(D.type,pFt(D),D.target,w(D,n.lockRef.current))},[]),C=z.useCallback(function(D){S(D.type,Aie(D),D.target,w(D,n.lockRef.current))},[]);z.useEffect(function(){return vM.push(g),n.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:C}),document.addEventListener("wheel",E,yM),document.addEventListener("touchmove",E,yM),document.addEventListener("touchstart",k,yM),function(){vM=vM.filter(function(D){return D!==g}),document.removeEventListener("wheel",E,yM),document.removeEventListener("touchmove",E,yM),document.removeEventListener("touchstart",k,yM)}},[]);var R=n.removeScrollBar,M=n.inert;return z.createElement(z.Fragment,null,M?z.createElement(g,{styles:YJn(d)}):null,R?z.createElement(BJn,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function ZJn(n){for(var i=null;n!==null;)n instanceof ShadowRoot&&(i=n.host,n=n.host),n=n.parentNode;return i}const QJn=xJn(xVt,XJn);var Cz=z.forwardRef(function(n,i){return z.createElement(kae,O2({},n,{ref:i,sideCar:QJn}))});Cz.classNames=kae.classNames;var eXn=function(n){if(typeof document>"u")return null;var i=Array.isArray(n)?n[0]:n;return i.ownerDocument.body},EM=new WeakMap,_ie=new WeakMap,kie={},xOe=0,OVt=function(n){return n&&(n.host||OVt(n.parentNode))},tXn=function(n,i){return i.map(function(a){if(n.contains(a))return a;var c=OVt(a);return c&&n.contains(c)?c:(console.error("aria-hidden",a,"in not contained inside",n,". Doing nothing"),null)}).filter(function(a){return!!a})},nXn=function(n,i,a,c){var d=tXn(i,Array.isArray(n)?n:[n]);kie[a]||(kie[a]=new WeakMap);var g=kie[a],b=[],w=new Set,E=new Set(d),S=function(_){!_||w.has(_)||(w.add(_),S(_.parentNode))};d.forEach(S);var k=function(_){!_||E.has(_)||Array.prototype.forEach.call(_.children,function(C){if(w.has(C))k(C);else try{var R=C.getAttribute(c),M=R!==null&&R!=="false",D=(EM.get(C)||0)+1,B=(g.get(C)||0)+1;EM.set(C,D),g.set(C,B),b.push(C),D===1&&M&&_ie.set(C,!0),B===1&&C.setAttribute(a,"true"),M||C.setAttribute(c,"true")}catch(F){console.error("aria-hidden: cannot operate on ",C,F)}})};return k(i),w.clear(),xOe++,function(){b.forEach(function(_){var C=EM.get(_)-1,R=g.get(_)-1;EM.set(_,C),g.set(_,R),C||(_ie.has(_)||_.removeAttribute(c),_ie.delete(_)),R||_.removeAttribute(a)}),xOe--,xOe||(EM=new WeakMap,EM=new WeakMap,_ie=new WeakMap,kie={})}},xae=function(n,i,a){a===void 0&&(a="data-aria-hidden");var c=Array.from(Array.isArray(n)?n:[n]),d=eXn(n);return d?(c.push.apply(c,Array.from(d.querySelectorAll("[aria-live], script"))),nXn(c,d,a,"aria-hidden")):function(){return null}};function rXn(n){const i=iXn(n),a=z.forwardRef((c,d)=>{const{children:g,...b}=c,w=z.Children.toArray(g),E=w.find(sXn);if(E){const S=E.props.children,k=w.map(_=>_===E?z.Children.count(S)>1?z.Children.only(null):z.isValidElement(S)?S.props.children:null:_);return O.jsx(i,{...b,ref:d,children:z.isValidElement(S)?z.cloneElement(S,void 0,k):null})}return O.jsx(i,{...b,ref:d,children:g})});return a.di Line truncated
If you want to hide the \`${i.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;return z.useEffect(()=>{n&&(document.getElementById(n)||console.error(a))},[a,n]),null},mXn="DialogDescriptionWarning",wXn=({contentRef:n,descriptionId:i})=>{const c=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${WVt(mXn).contentName}}.`;return z.useEffect(()=>{var g;const d=(g=n.current)==null?void 0:g.getAttribute("aria-describedby");i&&d&&(document.getElementById(i)||console.warn(c))},[c,n,i]),null},KVt=LVt,YVt=jVt,p5e=FVt,g5e=$Vt,JVt=UVt,XVt=zVt,yXn=qVt;const gR=KVt,vXn=YVt,ZVt=z.forwardRef(({className:n,...i},a)=>O.jsx(p5e,{ref:a,className:kr("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-black/80 data-[state=closed]:animate-out data-[state=open]:animate-in",n),...i}));ZVt.displayName=p5e.displayName;const aN=z.forwardRef(({className:n,children:i,container:a,...c},d)=>{const{t:g}=zs(["common"]);return O.jsxs(vXn,{container:a,children:[O.jsx(ZVt,{}),O.jsxs(g5e,{ref:d,className:kr("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg",n),...c,children:[i,O.jsxs(yXn,{className:"absolute top-4 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[O.jsx(eae,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:g("buttons.close")})]})]})]})});aN.displayName=g5e.displayName;const uN=({className:n,...i})=>O.jsx("div",{className:kr("flex flex-col space-y-1.5 text-center sm:text-left",n),...i});uN.displayName="DialogHeader";const cN=z.forwardRef(({className:n,...i},a)=>O.jsx(JVt,{ref:a,className:kr("font-semibold text-lg leading-none tracking-tight",n),...i}));cN.displayName=JVt.displayName;const lN=z.forwardRef(({className:n,...i},a)=>O.jsx(XVt,{ref:a,className:kr("text-muted-foreground text-sm",n),...i}));lN.displayName=XVt.displayName;const Ba=z.forwardRef(({className:n,type:i,...a},c)=>O.jsx("input",{type:i,className:kr("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:c,...a}));Ba.displayName="Input";var Cae="Switch",[EXn]=Nw(Cae),[SXn,TXn]=EXn(Cae),QVt=z.forwardRef((n,i)=>{const{__scopeSwitch:a,name:c,checked:d,defaultChecked:g,required:b,disabled:w,value:E="on",onCheckedChange:S,form:k,..._}=n,[C,R]=z.useState(null),M=hs(i,P=>R(P)),D=z.useRef(!1),B=C?k||!!C.closest("form"):!0,[F,$]=z2({prop:d,defaultProp:g??!1,onChange:S,caller:Cae});return O.jsxs(SXn,{scope:a,checked:F,disabled:w,children:[O.jsx(eo.button,{type:"button",role:"switch","aria-checked":F,"aria-required":b,"data-state":rWt(F),"data-disabled":w?"":void 0,disabled:w,value:E,..._,ref:M,onClick:Or(n.onClick,P=>{$(H=>!H),B&&(D.current=P.isPropagationStopped(),D.current||P.stopPropagation())})}),B&&O.jsx(nWt,{control:C,bubbles:!D.current,name:c,value:E,checked:F,required:b,disabled:w,form:k,style:{transform:"translateX(-100%)"}})]})});QVt.displayName=Cae;var eWt="SwitchThumb",tWt=z.forwardRef((n,i)=>{const{__scopeSwitch:a,...c}=n,d=TXn(eWt,a);return O.jsx(eo.span,{"data-state":rWt(d.checked),"data-disabled":d.disabled?"":void 0,...c,ref:i})});tWt.displayName=eWt;var AXn="SwitchBubbleInput",nWt=z.forwardRef(({__scopeSwitch:n,control:i,checked:a,bubbles:c=!0,...d},g)=>{const b=z.useRef(null),w=hs(b,g),E=Sae(a),S=Tae(i);return z.useEffect(()=>{const k=b.current;if(!k)return;const _=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(_,"checked").set;if(E!==a&&R){const M=new Event("click",{bubbles:c});R.call(k,a),k.dispatchEvent(M)}},[E,a,c]),O.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...d,tabIndex:-1,ref:w,style:{...d.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nWt.displayName=AXn;function rWt(n){return n?"checked":"unchecked"}var iWt=QVt,_Xn=tWt;const _A=z.forwardRef(({className:n,...i},a)=>O.jsx(iWt,{className:kr("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-vis Line truncated
`))||a("errors:import.parseFailed"));Q(Bn.graph),setTimeout(()=>{ee({padding:.2,duration:300})},50),$(ft.friendly_name||ft.automation_id),P(ft.automation_id),N2.success(a("dialogs:import.importSuccess",{name:ft.friendly_name||ft.automation_id}))}else $(ft.friendly_name||ft.automation_id),P(ft.automation_id),N2.warning(a("dialogs:import.openedWarning",{name:ft.friendly_name||ft.automation_id}),{description:a("dialogs:import.openedWarningDescription")});i()}catch(kt){console.error("C.A.F.E.: Failed to open automation:",kt),N2.error(a("dialogs:import.importFailed",{message:kt.message}))}},bt=()=>{ve.length===1&&Y(()=>{Je(ve[0])})},qe=ft=>{const Kt=ft.map(kt=>kt.friendly_name).filter(Boolean);return Kt.length===0?a("dialogs:import.defaultMergedName"):Kt.length<=2?Kt.join(" + "):`${Kt[0]} + ${Kt.length-1} more`},_t=async()=>{if(!(ve.length<2))try{const ft=Lv(D,B);if(!ft.isConnected())throw new Error(a("errors:connection.noConnection"));const Kt=await ft.getAutomationConfigsBatch(ve.map(Xt=>Xt.automation_id)),kt=[];for(const Xt of ve){let Bn=Kt[Xt.automation_id];if(Bn||(Bn=await ft.getAutomationConfigWithFallback(Xt.automation_id,Xt.friendly_name)),!Bn)throw new Error(a("dialogs:import.mergeFailedMissingConfig",{name:Xt.friendly_name}));const tr=ise(Bn,{indent:2,lineWidth:-1,quotingType:'"',forceQuotes:!1}),Zn=await mDe.fromYaml(tr);if(!Zn.success||!Zn.graph)throw new Error(a("dialogs:import.mergeFailedInvalidYaml",{name:Xt.friendly_name}));kt.push({graph:Zn.graph,automationId:Xt.automation_id,entityId:Xt.entity_id,alias:Xt.friendly_name||Xt.automation_id})}const It=EZn(kt);Q(It),$(qe(ve)),P(null),k(new Set),setTimeout(()=>{ee({padding:.2,duration:300})},50),N2.success(a("dialogs:import.mergeSuccess",{count:ve.length})),i()}catch(ft){console.error("C.A.F.E.: Failed to merge automations:",ft),N2.error(a("dialogs:import.mergeFailed",{message:ft.message}))}},At=ft=>{if(!ft)return a("dialogs:import.never");const Kt=new Date(ft),It=new Date().getTime()-Kt.getTime(),Xt=Math.floor(It/(1e3*60)),Bn=Math.floor(Xt/60),tr=Math.floor(Bn/24);return Xt<1?a("dialogs:import.justNow"):Xt<60?a("dialogs:import.minutesAgo",{count:Xt}):Bn<24?a("dialogs:import.hoursAgo",{count:Bn}):tr<7?a("dialogs:import.daysAgo",{count:tr}):Kt.toLocaleDateString()};return n?O.jsxs(gR,{open:n,onOpenChange:i,children:[O.jsxs(aN,{className:"flex max-h-[90vh] max-w-4xl flex-col",children:[O.jsx(uN,{className:"space-y-3",children:O.jsxs("div",{className:"flex items-center justify-between pr-8",children:[O.jsxs("div",{children:[O.jsx(cN,{children:a("dialogs:import.title")}),O.jsx(lN,{children:a("dialogs:import.descriptionFull")})]}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsxs(Di,{variant:"outline",onClick:ve.length===1?bt:()=>Y(()=>void _t()),disabled:ve.length===0,children:[ve.length>1?O.jsx(x8n,{className:"mr-2 h-4 w-4"}):O.jsx(l9t,{className:"mr-2 h-4 w-4"}),ve.length>1?a("dialogs:import.openTogether"):a("dialogs:import.openSingle")]}),O.jsxs(Di,{onClick:()=>{Y(()=>{H(),$(a("defaults.newAutomation")),i()})},className:"bg-green-600 hover:bg-green-700",children:[O.jsx(Yzt,{className:"mr-2 h-4 w-4"}),a("dialogs:import.createNew")]})]})]})}),O.jsxs("div",{className:"flex min-h-0 flex-col",children:[O.jsxs("div",{className:"relative mb-4",children:[O.jsx(eGt,{className:"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-muted-foreground"}),O.jsx(Ba,{type:"text",placeholder:a("dialogs:import.searchPlaceholder"),value:c,onChange:ft=>d(ft.target.value),className:"pl-10"})]}),O.jsx("div",{className:"max-h-[70vh] overflow-auto rounded-t-md",children:O.jsxs("div",{className:"min-w-full",children:[O.jsx("div",{className:"sticky top-0 z-20 bg-background before:absolute before:-top-px before:right-0 before:left-0 before:h-px before:bg-background",children:O.jsxs("div",{className:"flex",children:[O.jsx("div",{className:"flex w-[44px] items-center justify-center border-b bg-muted px-2 py-2",children:O.jsx(EDe,{checked:de,onCheckedChange:ke,title:a(de?"dialogs:import.unselectAll":"dialogs:import.selectAll")})}),O.jsxs("button",{type:"button",onClick:()=>Se("name"),className:"flex-1 cursor-pointer whitespace-nowrap border-b bg-muted px-3 py-2 text-left font-semibold text-muted-foreground text-xs hover:bg-muted/80",children:[a("dialogs:import.columns.name"),$e("name")]}),O.jsxs("button",{type:"button",onClick:()=>Se("lastTriggered"),className:"w-[120px] cursor-pointer whitespace-nowrap border-b bg-muted px-3 py-2 text-left font-semibold text-muted-foreground text-xs hover:bg-muted/80",children:[a("dialogs:import.columns.lastTriggered"),$e("lastTriggered")]}),O.jsxs("button",{type:"button",onClick:()=>Se("enabled"),className:"w-[80px] cursor-pointer whitespace-nowrap border-b bg-muted px-3 py-2 text-center font-semibold text-muted-foreground text-xs hover:bg-muted/80",children:[a("dialogs:import.columns.enabled"),$e("enabled")]}),O.jsx("div",{className:"w-[60px] border-b bg-muted px-3 py-2 text-center font-semibold text-muted-foreground Line truncated
cors_allowed_origins:
- https://my-home-assistant.example.com`})]})}),O.jsx(Di,{variant:"link",asChild:!0,className:"h-auto p-0 text-sm",children:O.jsxs("a",{href:"https://www.home-assistant.io/docs/authentication/#your-account-profile",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1",children:[O.jsx(h8n,{className:"h-4 w-4"}),d("dialogs:settings.tokenGuideLink")]})})]}),O.jsxs("div",{className:"flex items-center justify-between pt-4",children:[O.jsx(Di,{variant:"destructive",onClick:D,size:"sm",children:d("dialogs:settings.disconnect")}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Di,{variant:"outline",onClick:i,size:"sm",children:d("buttons.cancel")}),O.jsx(Di,{onClick:M,disabled:!g||!w,size:"sm",children:d("buttons.save")})]})]})]})})}function IZn({isOpen:n,onClose:i,onImportSuccess:a}){const{t:c}=zs(["common","dialogs"]),[d,g]=z.useState(""),[b,w]=z.useState(!1),[E,S]=z.useState(null),[k,_]=z.useState([]),{fromFlowGraph:C}=ds(),{fitView:R}=AR();if(!n)return null;const M=async()=>{var B;w(!0),S(null),_([]);try{const F=await mDe.fromYaml(d);if(!F.success){S(((B=F.errors)==null?void 0:B.join(`
`))||"Failed to parse YAML. Please check the format."),w(!1);return}F.warnings.length>0&&(yf.warn("Import warnings:",F.warnings),_(F.warnings)),F.graph&&(C(F.graph),setTimeout(()=>{R({padding:.2,duration:300})},50),setTimeout(()=>{a==null||a(),D()},1e3))}catch(F){S(F instanceof Error?F.message:"Unknown error occurred")}finally{w(!1)}},D=()=>{g(""),S(null),_([]),i()};return O.jsx(gR,{open:n,onOpenChange:()=>D(),children:O.jsxs(aN,{className:"flex max-h-[90vh] max-w-3xl flex-col",children:[O.jsxs(uN,{children:[O.jsx(cN,{children:c("dialogs:importYaml.title")}),O.jsx(lN,{children:c("dialogs:importYaml.description")})]}),O.jsxs("div",{className:"flex-1 space-y-4",children:[O.jsx(jv,{value:d,onChange:B=>g(B.target.value),placeholder:`alias: My Automation
description: An example automation
trigger:
- platform: state
entity_id: light.living_room
to: "on"
action:
- service: notify.mobile_app
data:
message: "Light turned on!"`,className:"h-64 resize-none font-mono text-sm",disabled:b}),E&&O.jsxs(cA,{variant:"destructive",children:[O.jsx(Pv,{className:"h-4 w-4"}),O.jsxs(lA,{className:"font-medium",children:[c("dialogs:importYaml.importFailed"),O.jsx("pre",{className:"mt-1 whitespace-pre-wrap font-mono text-xs",children:E})]})]}),k.length>0&&O.jsxs(cA,{children:[O.jsx(Pv,{className:"h-4 w-4"}),O.jsxs(lA,{children:[O.jsx("p",{className:"mb-1 font-medium",children:c("dialogs:importYaml.warnings")}),O.jsx("ul",{className:"space-y-1 text-xs",children:k.map((B,F)=>O.jsxs("li",{children:["•"," ",B]},`warning-${F}-${B.slice(0,20)}`))})]})]}),b&&!E&&O.jsxs(cA,{children:[O.jsx(Kzt,{className:"h-4 w-4"}),O.jsx(lA,{children:c("dialogs:importYaml.successLoading")})]}),O.jsx(cA,{children:O.jsxs(lA,{className:"text-xs",children:[O.jsx("strong",{children:c("dialogs:importYaml.tipLabel")})," ",c("dialogs:importYaml.tipText")]})})]}),O.jsxs("div",{className:"flex items-center justify-end gap-2 pt-4",children:[O.jsx(Di,{variant:"outline",onClick:D,disabled:b,children:c("buttons.cancel")}),O.jsxs(Di,{onClick:M,disabled:!d.trim()||b,children:[O.jsx(Y8n,{className:"mr-2 h-4 w-4"}),c(b?"dialogs:importYaml.importing":"dialogs:importYaml.import")]})]})]})})}const RZn=[{type:"trigger",labelKey:"nodes:types.trigger",icon:rGt,color:"bg-amber-100 border-amber-400 text-amber-700 hover:bg-amber-200",defaultData:{trigger:"state",entity_id:""}},{type:"condition",labelKey:"nodes:types.condition",icon:Jzt,color:"bg-blue-100 border-blue-400 text-blue-700 hover:bg-blue-200",defaultData:{condition:"state",entity_id:""}},{type:"action",labelKey:"nodes:types.action",icon:Zse,color:"bg-green-100 border-green-400 text-green-700 hover:bg-green-200",defaultData:{service:"light.turn_on"}},{type:"delay",labelKey:"nodes:types.delay",icon:TMe,color:"bg-purple-100 border-purple-400 text-purple-700 hover:bg-purple-200",defaultData:{delay:"00:00:05"}},{type:"wait",labelKey:"nodes:types.wait",icon:Xzt,color:"bg-orange-100 border-orange-400 text-orange-700 hover:bg-orange-200",defaultData:{wait_template:"",timeout:"00:01:00"}},{type:"set_variables",labelKey:"nodes:types.set_variables",icon:nGt,color:"bg-cyan-100 border-cyan-400 text-cyan-700 hover:bg-cyan-200",defaultData:{variables:{}}}];function OZn(){const{t:n}=zs(["common","nodes"]),i=ds(g=>g.addNode),a=ds(g=>g.nodes),c=z.useCallback(g=>{const b=a.length*250+250;i({id:o5e(g.type),type:g.type,position:{x:b,y:150},data:{...g.defaultData}})},[i,a.length]),d=z.useCallback((g,b)=>{g.dataTransfer.setData("application/reactflow",JSON.stringify({type:b.type,defaultData:b.defaultData})),g.dataTransfer.effectAllowed="move"},[]);return O.jsxs("div",{className:"space-y-2 p-4",children:[O.jsx("h3",{className:"mb-3 font-semibold text-muted-foreground text-sm",children:n("labels.addNode")}),O.jsx("div",{className:"space-y-2",children:RZn.map(g=>O.jsxs(Di,{variant:"outline",onClick:()=>c(g),onDragStart:b=>d(b,g),draggable:!0,className:kr("h-auto w-full justify-start gap-3 py-3","cursor-grab transition-colors active:cursor-grabbing",g.color),children:[O.jsx(g.icon,{className:"h-4 w-4"}),O.jsx("span",{className:"font-medium text-sm",children:n(g.labelKey)})]},g.type))})]})}function fs({label:n,required:i,description:a,children:c}){return O.jsxs("div",{className:"flex flex-col gap-2",children:[O.jsxs(ll,{className:"font-medium text-muted-foreground text-xs",children:[n,i&&O.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),c,a&&O.jsx("p",{className:"text-muted-foreground text-xs",children:a})]})}const EFt={common:["id","alias","enabled","_conditionId"],trigger:["trigger","entity_id","to","from","for","at","event_type","event_data","event","offset","above","below","value_template","template","webhook_id","zone","topic","payload","hours","minutes","seconds","device_id","domain","type","subtype"],condition:["condition","entity_id","state","attribute","above","below","value_template","template","after","before","weekday","device_id","domain","type","subtype","zone","condition","for","conditions"],action:["service","data","target","response_variable","entity_id","action","metadata"],delay:["delay"],wait:["wait_template","timeout","wait_for_trigger","continue_on_timeout"],set_variables:["variables"]};function SFt(n,i=[]){const a=[...EFt.common,...EFt[n]||[]];return new Set([...a,...i])}function cse(n,[i,a]){return Math.min(a,Math.max(i,n))}function TFt(n){const i=DZn(n),a=z.forwardRef((c,d)=>{const{children:g,...b}=c,w=z.Children.toArray(g),E=w.find(MZn);if(E){const S=E.props.children,k=w.map(_=>_===E?z.Children.count(S)>1?z.Children.only(null):z.isValidElement(S)?S.props.children:null:_);return O.jsx(i,{...b,ref:d,children:z.isValidElement(S)?z.cloneElement(S,void 0,k):null})}return O.jsx(i,{...b,ref:d,children:g})});return a.displayName=`${n}.Slot`,a}function DZn(n){const i=z.forwardRef((a,c)=>{const{children:d,...g}=a;if(z.isValidElement(d)){const b=jZn(d),w=PZn(g,d.props);return d.type!==z.Fragment Line truncated
`,i);return c===-1?a:a===-1||a+1===c?c:a<c?a:c}const dir={svg:"http://www.w3.org/2000/svg"},hJt={}.hasOwnProperty,fir=Object.prototype;function hir(n,i){const a=i||{};return V5e({file:a.file||void 0,location:!1,schema:a.space==="svg"?$z:Vae,verbose:a.verbose||!1},n)}function V5e(n,i){let a;switch(i.nodeName){case"#comment":{const c=i;return a={type:"comment",value:c.data},noe(n,c,a),a}case"#document":case"#document-fragment":{const c=i,d="mode"in c?c.mode==="quirks"||c.mode==="limited-quirks":!1;if(a={type:"root",children:pJt(n,i.childNodes),data:{quirksMode:d}},n.file&&n.location){const g=String(n.file),b=lir(g),w=b.toPoint(0),E=b.toPoint(g.length);a.position={start:w,end:E}}return a}case"#documentType":{const c=i;return a={type:"doctype"},noe(n,c,a),a}case"#text":{const c=i;return a={type:"text",value:c.value},noe(n,c,a),a}default:return a=pir(n,i),a}}function pJt(n,i){let a=-1;const c=[];for(;++a<i.length;){const d=V5e(n,i[a]);c.push(d)}return c}function pir(n,i){const a=n.schema;n.schema=i.namespaceURI===dir.svg?$z:Vae;let c=-1;const d={};for(;++c<i.attrs.length;){const w=i.attrs[c],E=(w.prefix?w.prefix+":":"")+w.name;hJt.call(fir,E)||(d[E]=w.value)}const b=(n.schema.space==="svg"?cir:uir)(i.tagName,d,pJt(n,i.childNodes));if(noe(n,i,b),b.tagName==="template"){const w=i,E=w.sourceCodeLocation,S=E&&E.startTag&&VM(E.startTag),k=E&&E.endTag&&VM(E.endTag),_=V5e(n,w.content);S&&k&&n.file&&(_.position={start:S.end,end:k.start}),b.content=_}return n.schema=a,b}function noe(n,i,a){if("sourceCodeLocation"in i&&i.sourceCodeLocation&&n.file){const c=gir(n,a,i.sourceCodeLocation);c&&(n.location=!0,a.position=c)}}function gir(n,i,a){const c=VM(a);if(i.type==="element"){const d=i.children[i.children.length-1];if(c&&!a.endTag&&d&&d.position&&d.position.end&&(c.end=Object.assign({},d.position.end)),n.verbose){const g={};let b;if(a.attrs)for(b in a.attrs)hJt.call(a.attrs,b)&&(g[q5e(n.schema,b).property]=VM(a.attrs[b]));a.startTag;const w=VM(a.startTag),E=a.endTag?VM(a.endTag):void 0,S={opening:w};E&&(S.closing=E),S.properties=g,i.data={position:S}}}return c}function VM(n){const i=qFt({line:n.startLine,column:n.startCol,offset:n.startOffset}),a=qFt({line:n.endLine,column:n.endCol,offset:n.endOffset});return i||a?{start:i,end:a}:void 0}function qFt(n){return n.line&&n.column?n:void 0}const bir=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Oc="�";var Fe;(function(n){n[n.EOF=-1]="EOF",n[n.NULL=0]="NULL",n[n.TABULATION=9]="TABULATION",n[n.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",n[n.LINE_FEED=10]="LINE_FEED",n[n.FORM_FEED=12]="FORM_FEED",n[n.SPACE=32]="SPACE",n[n.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",n[n.QUOTATION_MARK=34]="QUOTATION_MARK",n[n.AMPERSAND=38]="AMPERSAND",n[n.APOSTROPHE=39]="APOSTROPHE",n[n.HYPHEN_MINUS=45]="HYPHEN_MINUS",n[n.SOLIDUS=47]="SOLIDUS",n[n.DIGIT_0=48]="DIGIT_0",n[n.DIGIT_9=57]="DIGIT_9",n[n.SEMICOLON=59]="SEMICOLON",n[n.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",n[n.EQUALS_SIGN=61]="EQUALS_SIGN",n[n.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",n[n.QUESTION_MARK=63]="QUESTION_MARK",n[n.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",n[n.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",n[n.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",n[n.GRAVE_ACCENT=96]="GRAVE_ACCENT",n[n.LATIN_SMALL_A=97]="LATIN_SMALL_A",n[n.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(Fe||(Fe={}));const tb={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gJt(n){return n>=55296&&n<=57343}function mir(n){return n>=56320&&n<=57343}function wir(n,i){return(n-55296)*1024+9216+i}function bJt(n){return n!==32&&n!==10&&n!==13&&n!==9&&n!==12&&n>=1&&n<=31||n>=127&&n<=159}function mJt(n){return n>=64976&&n<=65007||bir.has(n)}var sn;(function(n){n.controlCharacterInInputStream="control-character-in-input-stream",n.noncharacterInInputStream="noncharacter-in-input-stream",n.surrogateInInputStream="surrogate-in-input-stream",n.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",n.endTagWithAttributes="end-tag-with-attributes",n.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",n.unexpectedSolidusInTag="unexpected-solidus-in-tag",n.unexpectedNullCharacter="unexpected-null-character",n.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",n.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",n.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",n.missingEndTagName="missing-end-tag-name",n.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",n.unknownNamedCharacterReference="unknown-named-character-reference",n.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",n.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected- Line truncated
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function uur(n,i,a,c){const d=c.schema,g=d.space==="svg"?!1:c.settings.omitOptionalTags;let b=d.space==="svg"?c.settings.closeEmptyElements:c.settings.voids.includes(n.tagName.toLowerCase());const w=[];let E;d.space==="html"&&n.tagName==="svg"&&(c.schema=$z);const S=cur(c,n.properties),k=c.all(d.space==="html"&&n.tagName==="template"?n.content:n);return c.schema=d,k&&(b=!1),(S||!g||!nur(n,i,a))&&(w.push("<",n.tagName,S?" "+S:""),b&&(d.space==="svg"||c.settings.closeSelfClosing)&&(E=S.charAt(S.length-1),(!c.settings.tightSelfClosing||E==="/"||E&&E!=='"'&&E!=="'")&&w.push(" "),w.push("/")),w.push(">")),w.push(k),!b&&(!g||!Z5e(n,i,a))&&w.push("</"+n.tagName+">"),w.join("")}function cur(n,i){const a=[];let c=-1,d;if(i){for(d in i)if(i[d]!==null&&i[d]!==void 0){const g=lur(n,d,i[d]);g&&a.push(g)}}for(;++c<a.length;){const g=n.settings.tightAttributes?a[c].charAt(a[c].length-1):void 0;c!==a.length-1&&g!=='"'&&g!=="'"&&(a[c]+=" ")}return a.join("")}function lur(n,i,a){const c=q5e(n.schema,i),d=n.settings.allowParseErrors&&n.schema.space==="html"?0:1,g=n.settings.allowDangerousCharacters?0:1;let b=n.quote,w;if(c.overloadedBoolean&&(a===c.attribute||a==="")?a=!0:(c.boolean||c.overloadedBoolean)&&(typeof a!="string"||a===c.attribute||a==="")&&(a=!!a),a==null||a===!1||typeof a=="number"&&Number.isNaN(a))return"";const E=a5(c.attribute,Object.assign({},n.settings.characterReferences,{subset:Rie.name[d][g]}));return a===!0||(a=Array.isArray(a)?(c.commaSeparated?eir:nir)(a,{padLeft:!n.settings.tightCommaSeparatedLists}):String(a),n.settings.collapseEmptyAttributes&&!a)?E:(n.settings.preferUnquoted&&(w=a5(a,Object.assign({},n.settings.characterReferences,{attribute:!0,subset:Rie.unquoted[d][g]}))),w!==a&&(n.settings.quoteSmart&&u$t(a,b)>u$t(a,n.alternative)&&(b=n.alternative),w=b+a5(a,Object.assign({},n.settings.characterReferences,{subset:(b==="'"?Rie.single:Rie.double)[d][g],attribute:!0}))+b),E+(w&&"="+w))}const dur=["<","&"];function KJt(n,i,a,c){return a&&a.type==="element"&&(a.tagName==="script"||a.tagName==="style")?n.value:a5(n.value,Object.assign({},c.settings.characterReferences,{subset:dur}))}function fur(n,i,a,c){return c.settings.allowDangerousHtml?n.value:KJt(n,i,a,c)}function hur(n,i,a,c){return c.all(n)}const pur=yar("type",{invalid:gur,unknown:bur,handlers:{comment:$ar,doctype:Bar,element:uur,raw:fur,root:hur,text:KJt}});function gur(n){throw new Error("Expected node, not `"+n+"`")}function bur(n){const i=n;throw new Error("Cannot compile unknown node `"+i.type+"`")}const mur={},wur={},yur=[];function vur(n,i){const a=i||mur,c=a.quote||'"',d=c==='"'?"'":'"';if(c!=='"'&&c!=="'")throw new Error("Invalid quote `"+c+"`, expected `'` or `\"`");return{one:Eur,all:Sur,settings:{omitOptionalTags:a.omitOptionalTags||!1,allowParseErrors:a.allowParseErrors||!1,allowDangerousCharacters:a.allowDangerousCharacters||!1,quoteSmart:a.quoteSmart||!1,preferUnquoted:a.preferUnquoted||!1,tightAttributes:a.tightAttributes||!1,upperDoctype:a.upperDoctype||!1,tightDoctype:a.tightDoctype||!1,bogusComments:a.bogusComments||!1,tightCommaSeparatedLists:a.tightCommaSeparatedLists||!1,tightSelfClosing:a.tightSelfClosing||!1,collapseEmptyAttributes:a.collapseEmptyAttributes||!1,allowDangerousHtml:a.allowDangerousHtml||!1,voids:a.voids||war,characterReferences:a.characterReferences||wur,closeSelfClosing:a.closeSelfClosing||!1,closeEmptyElements:a.closeEmptyElements||!1},schema:a.space==="svg"?$z:Vae,quote:c,alternative:d}.one(Array.isArray(n)?{type:"root",children:n}:n,void 0,void 0)}function Eur(n,i,a){return pur(n,i,a,this)}function Sur(n){const i=[],a=n&&n.children||yur;let c=-1;for(;++c<a.length;)i[c]=this.one(a[c],c,n);return i.join("")}function Tur(n){const i=this,a={...i.data("settings"),...n};i.compiler=c;function c(d){return vur(d,a)}}function f$t(n){if(n)throw n}var ioe=Object.prototype.hasOwnProperty,YJt=Object.prototype.toString,h$t=Object.defineProperty,p$t=Object.getOwnPropertyDescriptor,g$t=function(i){return typeof Array.isArray=="function"?Array.isArray(i):YJt.call(i)==="[object Array]"},b$t=function(i){if(!i||YJt.call(i)!=="[object Object]")return!1;var a=ioe.call(i,"constructor"),c=i.constructor&&i.constructor.prototype&&ioe.call(i.constructor.prototype,"isPrototypeOf");if(i.constructor&&!a&&!c)return!1;var d;for(d in i);return typeof d>"u"||ioe.call(i,d)},m$t=function(i,a){h$t&&a.name==="__proto__"?h$t(i,a.name,{enumerable:!0,configurable:!0,value:a.newValue,writable:!0}):i[a.name]=a.newValue},w$t=function(i,a){if(a==="__proto__")if(ioe.call(i,a)){if(p$t)return p$t(i,a).value}else return;return i[a]},Aur=function n(){var i,a,c,d,g,b,w=arguments[0],E=1,S=arguments.length,k=!1;for(typeof w=="boolean"&&(k=w,w=arguments[1]||{},E=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});E<S;++E)if(i=arguments[E],i!=null)for(aLine truncated
`){i++;break}return i}getIndentText(){var i=this.getLineStartNumber(),a=this.getSelectedValue(i),c="";return a.replace(/(^(\s)+)/,(d,g)=>c=g),c}lineStarInstert(i){if(i){var a=this.start,c=this.getLineStartNumber(),d=this.getSelectedValue(c);this.position(c,this.end).insertText(d.split(`
`).map(g=>i+g).join(`
`)).position(a+i.length,this.end)}return this}lineStarRemove(i){if(i){var a=this.start,c=this.getLineStartNumber(),d=this.getSelectedValue(c),g=new RegExp("^"+i,"g"),b=a-i.length;g.test(d)||(b=a),this.position(c,this.end).insertText(d.split(`
`).map(w=>w.replace(g,"")).join(`
`)).position(b,this.end)}}notifyChange(){var i=new Event("input",{bubbles:!0,cancelable:!1});this.elm.dispatchEvent(i)}}function jur(n,i){i===void 0&&(i=2);var a=new Pur(n.target),c=(n.code||n.nativeEvent.code).toLocaleLowerCase(),d=" ".repeat(i);if(c==="tab")WOe(n),a.start===a.end?n.shiftKey?a.lineStarRemove(d):a.insertText(d).position(a.start+i,a.end+i):a.getSelectedValue().indexOf(`
`)>-1&&n.shiftKey?a.lineStarRemove(d):a.getSelectedValue().indexOf(`
`)>-1?a.lineStarInstert(d):a.insertText(d).position(a.start+i,a.end),a.notifyChange();else if(c==="enter"){WOe(n);var g=`
`+a.getIndentText();a.insertText(g).position(a.start+g.length,a.start+g.length),a.notifyChange()}else if(c&&/^(quote|backquote|bracketleft|digit9|comma)$/.test(c)&&a.getSelectedValue()){WOe(n);var b=a.getSelectedValue(),w="";switch(c){case"quote":w="'"+b+"'",n.shiftKey&&(w='"'+b+'"');break;case"backquote":w="`"+b+"`";break;case"bracketleft":w="["+b+"]",n.shiftKey&&(w="{"+b+"}");break;case"digit9":w="("+b+")";break;case"comma":w="<"+b+">";break}a.insertText(w),a.notifyChange()}}var Fur={position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},$ur={position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",opacity:.8,overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},E$t={margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word",outline:0},Bur=["prefixCls","value","padding","minHeight","placeholder","language","data-color-mode","className","style","rehypePlugins","onChange","indentWidth"];const Uur=Hn.forwardRef((n,i)=>{var{prefixCls:a="w-tc-editor",padding:c=10,minHeight:d=16,placeholder:g,language:b,"data-color-mode":w,className:E,style:S,rehypePlugins:k,onChange:_,indentWidth:C=2}=n,R=iJt(n,Bur),[M,D]=z.useState(n.value||"");z.useEffect(()=>D(n.value||""),[n.value]);var B=z.useRef(null);z.useImperativeHandle(i,()=>B.current,[B]);var F={paddingTop:c,paddingRight:c,paddingBottom:c,paddingLeft:c},$=z.useMemo(()=>Lur("<pre aria-hidden=true><code "+(b&&M?'class="language-'+b+'"':"")+" >"+Mur(String(M||""))+"</code><br /></pre>",k),[M,b,k]),P=z.useMemo(()=>O.jsx("div",{style:Bx({},E$t,F,{minHeight:d}),className:a+"-preview "+(b?"language-"+b:""),dangerouslySetInnerHTML:{__html:$}}),[a,b,$]),H=ee=>{D(ee.target.value),_&&_(ee)},Q=ee=>{R.readOnly||(!R.onKeyDown||R.onKeyDown(ee)!==!1)&&jur(ee,C)},re=Bx({autoComplete:"off",autoCorrect:"off",spellCheck:"false",autoCapitalize:"off"},R,{placeholder:g,onKeyDown:Q,style:Bx({},E$t,$ur,F,{minHeight:d},g&&!M?{WebkitTextFillColor:"inherit"}:{}),onChange:H,className:a+"-text",value:M});return O.jsxs("div",{style:Bx({},Fur,S),className:a+" "+(E||""),"data-color-mode":w,children:[O.jsx("textarea",Bx({},re,{ref:B})),P]})}),e9e=function(n){if(n==null)return qur;if(typeof n=="function")return Zae(n);if(typeof n=="object")return Array.isArray(n)?Hur(n):zur(n);if(typeof n=="string")return Gur(n);throw new Error("Expected function, string, or object as test")};function Hur(n){const i=[];let a=-1;for(;++a<n.length;)i[a]=e9e(n[a]);return Zae(c);function c(...d){let g=-1;for(;++g<i.length;)if(i[g].apply(this,d))return!0;return!1}}function zur(n){const i=n;return Zae(a);function a(c){const d=c;let g;for(g in n)if(d[g]!==i[g])return!1;return!0}}function Gur(n){return Zae(i);function i(a){return a&&a.type===n}}function Zae(n){return i;function i(a,c,d){return!!(Vur(a)&&n.call(this,a,typeof c=="number"?c:void 0,d||void 0))}}function qur(){return!0}function Vur(n){return n!==null&&typeof n=="object"&&"type"in n}const JJt=[],Wur=!0,S$t=!1,Kur="skip";function Yur(n,i,a,c){let d;typeof i=="function"&&typeof a!="function"?(c=a,a=i):d=i;const g=e9e(d),b=c?-1:1;w(n,void 0,[])();function w(E,S,k){const _=E&&typeof E=="object"?E:{};if(typeof _.type=="string"){const R=typeof _.tagName=="string"?_.tagName:typeof _.name=="string"?_.name:void 0;Object.defineProperty(C,"name",{value:"node ("+(E.type+(R?"<"+R+">":""))+")"})}return C;function C(){let R=JJt,M,D,B;if((!i||g(E,S,k[k.length-1]||void 0))&&(R=Jur(a(E,k)),R[0]===S$t))return R;if("children"in E&&E.children){const F=E;if(F.children&&R[0]!==Kur)for(D=(c?F.children.length:-1)+b,B=k.concat(F);D>-1&&D<F.children.length;){const $=F.children[D];if(M=w($,D,B)(),M[0]===S$t)return M;D=typeof M[1]=="number"?M[1]:D+b}}return R}}}function Jur(n){return Array.isArray(n)?n:typeof n=="number"?[Wur,n]:n==null?JJt:[n]}function Xur(n,i,a,c){let d,g,b;g=i,b=a,d=c,Yur(n,g,w,d);function w(E,S){const k=S[S.length-1],_=k?k.children.indexOf(E):void 0;return b(E,_,k)}}function Die(n){return"children"in n?XJt(n):"value"in n?n.value:""}function Zur(n){return n.type==="text"?n.value:"children"in n?XJt(n):""}function XJt(n){let i=-1;const a=[];for(;++i<n.children.length;)a[i]=Zur(n.children[i]);return a.join("")}const Qur={}.hasOwnProperty;function ecr(n,i,a){const c=e9e(i),d=i&&typeof i=="object"&&"cascade"in i?i.cascade:void 0,g=d??!0;return b(n);function b(w,E,S){const k=[];if(!c(w,E,S))return;if(tcr(w)){let R=-1;for(;++R<w.children.length;){const M=b(w.children[R],R,w);M&&k.push(M)}if(g&&w.children.length>0&&k.length===0)return}const _={};let C;for(C in w)Qur.call(w,C)&&(_[C]=C==="children"?k:w[C]);return _}}function tcr( Line truncated
?|
|(?![\\s\\S])))+`,"m"),alias:g,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(c)[0]}}}}),Object.defineProperty(i.languages.diff,"PREFIXES",{value:a})})(n)}tue.displayName="go";tue.aliases=[];function tue(n){n.register(Os),n.languages.go=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),n.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete n.languages.go["class-name"]}nue.displayName="ini";nue.aliases=[];function nue(n){n.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}FR.displayName="java";FR.aliases=[];function FR(n){n.register(Os),function(i){var a=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,c=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,d={pattern:RegExp(/(^|[^\w.])/.source+c+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};i.languages.java=i.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[d,{pattern:RegExp(/(^|[^\w.])/.source+c+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:d.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+c+/[A-Z]\w*\b/.source),lookbehind:!0,inside:d.inside}],keyword:a,function:[i.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),i.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),i.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":d,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+c+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:d.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+c+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:d.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return a.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(n)}rue.displayName="regex";rue.aliases=[];function rue(n){(function(i){var a={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},c=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,d={pattern:/\.|\\[wsLine truncated
]))(?:`+(/[^\s\\]/.source+'|[ ]+(?:(?![ "])|'+c+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source)+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:a,quoted:{pattern:RegExp(/(^|\s)/.source+c),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}})(n)}Xz.displayName="t4-templating";Xz.aliases=[];function Xz(n){(function(i){function a(d,g,b){return{pattern:RegExp("<#"+d+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+d+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:g,alias:b}}}}function c(d){var g=i.languages[d],b="language-"+d;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:a("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:a("=",g,b),"class-feature":a("\\+",g,b),standard:a("",g,b)}}}}i.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:c})})(n)}l7e.displayName="t4-cs";l7e.aliases=["t4"];function l7e(n){n.register(jR),n.register(Xz),n.languages.t4=n.languages["t4-cs"]=n.languages["t4-templating"].createT4("csharp")}d7e.displayName="t4-vb";d7e.aliases=[];function d7e(n){n.register(Xz),n.register(Wz),n.languages["t4-vb"]=n.languages["t4-templating"].createT4("vbnet")}f7e.displayName="tap";f7e.aliases=[];function f7e(n){n.register(Gz),n.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:n.languages.yaml,alias:"language-yaml"}}}h7e.displayName="tcl";h7e.aliases=[];function h7e(n){n.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}p7e.displayName="tt2";p7e.aliases=[];function p7e(n){n.register(Os),n.register(Gh),function(i){i.languages.tt2=i.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),i.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),i.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),i.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete i.languages.tt2.string,i.hooks.add("before-tokenize",function(a){var c=/\[%[\s\S]+?%\]/g;i.languages["markup-templating"].buildPlaceholders(a,"tt2",c)}),i.hooks.add("after-tokenize",function(a){i.languages["markup-templating"].tokenizePlaceholders(a,"tt2")})}(n)}g7e.displayName="toml";g7e.aliases=[];function g7e(n){(function(i){var a=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function c(d){return d.replace(/__/g,function(){return a})}i.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(c(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Fcr=function(n){return function(i){return i===void 0&&(i={}),function(c,d){if(d&&!c.registered(d))throw new Error('The default language "'+d+'" is not registered with refractor.')}(n,i.defaultLanguage),function(c){Xur(c,"element",a)};function a(c,d,g){var b,w;if(g&&g.tagName==="pre"&&c.tagName==="code"){var E=(c==null||(b=c.data)==null?void 0:b.meta)||(c==null||(w=c.properties)==null?void 0:w.metastring)||"";c.properties.className?typeof c.properties.className=="boolean"?c.properties.className=[]:Array.isArray(c.properties.className)||(c.properties.className=[c.properties.className]):c.properties.className=[];var S,k,_=function(Q){for(var re,ee=YOe(Q.properties.className);!(re=ee()).done;){var ae=re.value;if(ae.slice(0,9)==="language-")return ae.slice(9).toLowerCase()}return null}(c);if(!_&&i.defaultLanguage&&c.properties.className.push("language-"+(_=i.defaultLanguage)),c.properties.className.push("code-highlight"),_)try{var C,R;R=(C=_)!=null&&C.includes("diff-")?_.split("-")[1]:_,S=n.highlight(Die(c),R),g.properties.className=(g.properties.className||[]).concat("language-"+R)}catch(Q){if(!i.ignoreMissing||!/Unknown language/.test(Q.message))throw Q;S=c}else S=c;S.children=(k=1,function Q(re){return re.reduce(function(ee,ae){if(ae.type==="text"){var he=ae.value,ve=(he.match(/\n/g)||"").length;if(ve===0)ae.position={start:{line:k,column:1},end:{line:k,column:1}},ee.push(ae);else for(var de,ge=he.split(`
`),Y=YOe(ge.entries());!(de=Y()).done;){var fe=de.value,De=fe[0],Se=fe[1];ee.push({type:"text",value:De===ge.length-1?Se:Se+`
`,position:{start:{line:k+De,column:1},end:{line:k+De,column:1}}})}return k+=ve,ee}if(Object.prototype.hasOwnProperty.call(ae,"children")){var $e=k;return ae.children=Q(ae.children),ee.push(ae),ae.position={start:{line:$e,column:1},end:{line:k,column:1}},ee}return ee.push(ae),ee},[])})(S.children),S.position=S.children.length>0?{start:{line:S.children[0].position.start.line,column:0},end:{line:S.children[S.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var M,D=function(Q){var re=/{([\d,-]+)}/,ee=Q.split(",").map(function(ve){return ve.trim()}).join();if(re.test(ee)){var ae=re.exec(ee)[1],he=rcr(ae);return function(ve){return he.includes(ve+1)}}return function(){return!1}}(E),B=function(Q){var re=aLe(/showLineNumbers=(\d+)/i,{lines:1});if(re.test(Q)){var ee=re.exec(Q);return Number(ee.groups.lines)}return 1}(E),F=function(Q){for(var re=new Array(Q),ee=0;ee<Q;ee++)re[ee]={type:"element",tagName:"span",properties:{className:[]},children:[]};return re}(S.position.end.line),$=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],P=function(){var Q,re,ee=M.value,ae=ee[0],he=ee[1];he.properties.className=["code-line"];var ve=ecr(S,function(de){return de.position.start.line<=ae+1&&de.position.end.line>=ae+1});he.children=ve.children,!E.toLowerCase().includes("showLineNumbers".toLowerCase())&&!i.showLineNumbers||$.some(function(de){return E.toLowerCase().includes(de)})||(he.properties.line=[(ae+B).toString()],he.properties.className.push("line-number")),D(ae)&&he.properties.className.push("highlight-line"),(_==="diff"||(Q=_)!=null&&Q.includes("diff-"))&&Die(he).substring(0,1)==="-"?he.properties.className.push("deleted"):(_==="diff"||(re=_)!=null&&re.includes("diff-"))&&Die(he).substring(0,1)==="+"&&he.properties.className.push("inserted")},H=YOe(F.entries());!(M=H()).done;)P();F.length>0&&Die(F[F.length-1]).trim()===""&&F.pop(),c.children=F}}}},$cr=Fcr(_e),Bcr=["rehypePlugins"];const Ucr=Hn.forwardRef((n,i)=>{var{rehypePlugins:a=[[$cr,{ignoreMissing:!0}]]}=n,c=iJt(n,Bcr);return O.jsx(Uur,Bx({},c,{rehypePlugins:a,ref:i}))});function Hcr({yaml:n,errors:i,warnings:a,onYamlChange:c}){const d=ds(w=>w.fromFlowGraph),g=tae();z.useEffect(()=>{},[]);const b=async w=>{const E=w.target.value;c&&c(E);try{const k=await new x5().fromYaml(E);if(!k.success||!k.graph)return;d(k.graph)}catch{}};return O.jsxs("div",{className:"flex h-full flex-col",children:[O.jsx(Ucr,{value:n,language:"yaml",placeholder:"Enter YAML...",onChange:b,"data-color-mode":g?"dark":"light",padding:12,style:{fontFamily:"ui-monospace, SFMono-Regular, SF Mono, Consolas, Liberation Mono, Menlo, monospace",fontSize:13,height:"100%",resize:"none",whiteSpace:"pre-wrap",overflow:"auto"}}),i&&i.length>0&&O.jsx("div",{className:"border-red-200 border-t bg-red-50 px-3 py-2 text-red-600 text-xs",children:i.join(`
`)}),a&&a.length>0&&O.jsx("div",{className:"border-yellow-200 border-t bg-yellow-50 px-3 py-2 text-xs text-yellow-600",children:a.join(`
`)})]})}function zcr(){const{t:n}=zs(["common","errors"]),i=ds(M=>M.nodes),a=ds(M=>M.toFlowGraph),[c,d]=z.useState(!1),[g,b]=z.useState("auto"),w=z.useRef(null),{yaml:E,errors:S,warnings:k,strategy:_,isStale:C}=z.useMemo(()=>{var M;if(i.length===0)return w.current=null,{yaml:n("placeholders.addNodesForYaml"),warnings:[],errors:[],strategy:null,isStale:!1};try{const D=a(),F=new x5().transpile(D,{forceStrategy:g==="auto"?void 0:g});if(!F.success){const H=w.current;return{yaml:(H==null?void 0:H.yaml)||"",warnings:[],errors:F.errors||[n("errors:api.unknownError")],strategy:(H==null?void 0:H.strategy)||null,isStale:!!H}}const $=F.yaml||"",P=((M=F.output)==null?void 0:M.strategy)||null;return w.current={yaml:$,strategy:P},{yaml:$,warnings:F.warnings,errors:[],strategy:P,isStale:!1}}catch(D){const B=w.current;return{yaml:(B==null?void 0:B.yaml)||"",warnings:[],errors:[D instanceof Error?D.message:n("errors:api.transpileFailed")],strategy:(B==null?void 0:B.strategy)||null,isStale:!!B}}},[i,a,g,n]),R=async()=>{try{await Vrr(E),d(!0),setTimeout(()=>d(!1),2e3)}catch(M){console.error(n("errors:common.failedToCopy"),M)}};return O.jsxs("div",{className:"flex h-full flex-col",children:[O.jsxs("div",{className:"flex items-center justify-between border-b p-3",children:[O.jsx("h3",{className:"font-semibold text-foreground text-sm",children:n("labels.yamlOutput")}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsxs(Hp,{value:g,onValueChange:M=>b(M),children:[O.jsx(Uh,{className:"h-7 w-[120px] text-xs",children:O.jsx(zp,{})}),O.jsxs(Hh,{children:[O.jsx(io,{value:"auto",children:n("strategy.auto")}),O.jsx(io,{value:"native",children:n("strategy.native")}),O.jsx(io,{value:"state-machine",children:n("strategy.stateMachine")})]})]}),O.jsx(Di,{variant:"ghost",size:"sm",onClick:R,disabled:!E,className:kr("h-7 w-7 p-0",c?"bg-green-100 text-green-600 hover:bg-green-100":"text-muted-foreground"),children:c?O.jsx(L5,{className:"h-4 w-4"}):O.jsx(AMe,{className:"h-4 w-4"})})]})]}),_&&O.jsxs("div",{className:"flex items-center gap-2 border-b bg-muted/50 px-3 py-1.5",children:[O.jsx("span",{className:"text-muted-foreground text-xs",children:n("labels.strategy")}),O.jsx(u5e,{variant:"secondary",className:"text-xs",children:_})]}),O.jsx("div",{className:"min-h-0 flex-1",children:O.jsx(Hcr,{yaml:E,errors:S,warnings:C?[n("errors:yaml.staleWarning"),...k]:k})})]})}function Gcr(){const{t:n}=zs(["common","dialogs"]),{hass:i}=Gm(),{automationId:a,traceData:c,isShowingTrace:d,traceExecutionPath:g,traceTimestamps:b,showTrace:w,hideTrace:E,setActiveNode:S,simulationSpeed:k,isSimulating:_}=ds(),[C,R]=z.useState([]),[M,D]=z.useState(""),[B,F]=z.useState(!1),[$,P]=z.useState(!1),H=z.useCallback(async()=>{if(!(!a||!i)){F(!0);try{const ge=Lv(i),Y=await ge.getAutomationTraces(a);if(yf.info("Loaded automation traces:",Y),R(Y||[]),Y&&Y.length>0){const fe=Y[0].run_id;D(fe);const De=await ge.getAutomationTraceDetails(a,fe);De&&w(De)}}catch(ge){yf.error("Failed to load automation traces:",ge),R([])}F(!1)}},[a,i,w]);z.useEffect(()=>{a&&i&&H()},[a,i,H]);const Q=z.useCallback(async ge=>{if(!(!a||!i||!ge)){F(!0);try{const fe=await Lv(i).getAutomationTraceDetails(a,ge);yf.info("Loaded trace details:",fe),fe&&w(fe)}catch(Y){yf.error("Failed to load trace details:",Y)}F(!1)}},[a,i,w]),re=z.useCallback(ge=>{D(ge),Q(ge)},[Q]),ee=z.useCallback(()=>{E(),S(null),P(!1)},[E,S]),ae=z.useCallback(async()=>{if(!(!g.length||_)){P(!0);try{for(const ge of g)if(S(ge),await new Promise(Y=>setTimeout(Y,k)),!d)break;S(null)}catch(ge){yf.error("Trace animation error:",ge)}P(!1)}},[g,k,S,d,_]),he=z.useCallback(()=>{P(!1),S(null)},[S]),ve=ge=>{try{return new Date(ge).toLocaleTimeString()}catch{return ge}},de=(ge,Y)=>{try{const fe=new Date(ge);return`${(((Y?new Date(Y):new Date).getTime()-fe.getTime())/1e3).toFixed(1)}s`}catch{return n("labels.notApplicable")}};return a?O.jsxs("div",{className:"h-full space-y-4 p-4",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsx("h3",{className:"font-semibold text-foreground text-sm",children:n("labels.automationTrace")}),O.jsxs("div",{className:"flex gap-1",children:[d&&!$&&O.jsx(Di,{variant:"outline",size:"sm",onClick:ae,disabled:!g.length||_,className:kr("h-8 w-8 p-0",!g.length||_?"text-muted-foreground":"border-orange-200 text-orange-600 hover:bg-orange-50"),children:O.jsx(Zse,{className:"h-4 w-4"})}),$&&O.jsx(Di,{variant:"outline",size:"sm",onClick:he,className:"h-8 w-8 border-orange-200 p-0 text-orange-600 hover:bg-orange-50",children:O.jsx(tGt,{className:"h-4 w-4"})}),d?O.jsx(Di,{variant:"outline",size:"sm",onClick:ee,className:"h-8 w-8 border-blue-200 p-0 text-blue-600 hover:bg-blue-50",children:O.jsx(Zzt,{className:"h-4 w-4"})}):O.jsx(Di,{variant:"outline",size:"sm",onClick:H,disabled:B,className:kr("h-8 w-8 p-0",B?"text-muted-foreground":"border-blue-200 text-blue-600 hover:bg-blue-50"),children:O.jsx(A8n,{className:"h-4 w-4"})})]})]}),C.length===0&&!B&&O.jsx("div",{className:"text-center te Line truncated
//# sourceMappingURL=main-BIzscans.js.map
@@ -0,0 +1 @@
{"version":3,"file":"main-BIzscans.js","sources":["../../../../node_modules/react/cjs/react.production.min.js","../../../../node_modules/react/index.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/scheduler/index.js","../../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/client.js","../../../../node_modules/i18next/dist/esm/i18next.js","../../../../node_modules/react-i18next/dist/es/utils.js","../../../../node_modules/react-i18next/dist/es/unescape.js","../../../../node_modules/react-i18next/dist/es/defaults.js","../../../../node_modules/react-i18next/dist/es/i18nInstance.js","../../../../node_modules/react-i18next/dist/es/initReactI18next.js","../../../../node_modules/react-i18next/dist/es/context.js","../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../node_modules/use-sync-external-store/shim/index.js","../../../../node_modules/react-i18next/dist/es/useTranslation.js","../../../../node_modules/react-i18next/dist/es/I18nextProvider.js","../../../../node_modules/classcat/index.js","../../../../node_modules/d3-dispatch/src/dispatch.js","../../../../node_modules/d3-selection/src/namespaces.js","../../../../node_modules/d3-selection/src/namespace.js","../../../../node_modules/d3-selection/src/creator.js","../../../../node_modules/d3-selection/src/selector.js","../../../../node_modules/d3-selection/src/selection/select.js","../../../../node_modules/d3-selection/src/array.js","../../../../node_modules/d3-selection/src/selectorAll.js","../../../../node_modules/d3-selection/src/selection/selectAll.js","../../../../node_modules/d3-selection/src/matcher.js","../../../../node_modules/d3-selection/src/selection/selectChild.js","../../../../node_modules/d3-selection/src/selection/selectChildren.js","../../../../node_modules/d3-selection/src/selection/filter.js","../../../../node_modules/d3-selection/src/selection/sparse.js","../../../../node_modules/d3-selection/src/selection/enter.js","../../../../node_modules/d3-selection/src/constant.js","../../../../node_modules/d3-selection/src/selection/data.js","../../../../node_modules/d3-selection/src/selection/exit.js","../../../../node_modules/d3-selection/src/selection/join.js","../../../../node_modules/d3-selection/src/selection/merge.js","../../../../node_modules/d3-selection/src/selection/order.js","../../../../node_modules/d3-selection/src/selection/sort.js","../../../../node_modules/d3-selection/src/selection/call.js","../../../../node_modules/d3-selection/src/selection/nodes.js","../../../../node_modules/d3-selection/src/selection/node.js","../../../../node_modules/d3-selection/src/selection/size.js","../../../../node_modules/d3-selection/src/selection/empty.js","../../../../node_modules/d3-selection/src/selection/each.js","../../../../node_modules/d3-selection/src/selection/attr.js","../../../../node_modules/d3-selection/src/window.js","../../../../node_modules/d3-selection/src/selection/style.js","../../../../node_modules/d3-selection/src/selection/property.js","../../../../node_modules/d3-selection/src/selection/classed.js","../../../../node_modules/d3-selection/src/selection/text.js","../../../../node_modules/d3-selection/src/selection/html.js","../../../../node_modules/d3-selection/src/selection/raise.js","../../../../node_modules/d3-selection/src/selection/lower.js","../../../../node_modules/d3-selection/src/selection/append.js","../../../../node_modules/d3-selection/src/selection/insert.js","../../../../node_modules/d3-selection/src/selection/remove.js","../../../../node_modules/d3-selection/src/selection/clone.js","../../../../node_modules/d3-selection/src/selection/datum.js","../../../../node_modules/d3-selection/src/selection/on.js","../../../../node_modules/d3-selection/src/selection/dispatch.js","../../../../node_modules/d3-selection/src/selection/iterator.js","../../../../node_modules/d3-selection/src/selection/index.js","../../../../node_modules/d3-selection/src/select.js","../../../../node_modules/d3-selection/src/sourceEvent.js","../../../../node_modules/d3-selection/src/pointer.js","../../../../node_modules/d3-drag/src/noevent.js","../../../../node_modules/d3-drag/src/nodrag.js","../../../../node_modules/d3-drag/src/constant.js","../../../../node_modules/d3-drag/src/event.js","../../../../node_modules/d3-drag/src/drag.js","../../../../node_modules/d3-color/src/define.js","../../../../node_modules/d3-color/src/color.js","../../../../node_modules/d3-interpolate/src/constant.js","../../../../node_modules/d3-interpolate/src/color.js","../../../../node_modules/d3-interpolate/src/rgb.js","../../../../node_modules/d3-interpolate/src/numberArray.js","../../../../node_modules/d3-interpolate/src/array.js","../../../../node_modules/d3-interLine truncated
@@ -0,0 +1 @@
.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{strokLine truncated
@@ -0,0 +1,2 @@
var d=Object.defineProperty;var o=(t,s,e)=>s in t?d(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var a=(t,s,e)=>o(t,typeof s!="symbol"?s+"":s,e);class m extends HTMLElement{constructor(){super(...arguments);a(this,"_messageHandler");a(this,"iframe",null);a(this,"_hass")}set hass(e){var i;this._hass=e,window.hass=e,(i=this.iframe)!=null&&i.contentWindow&&this.iframe.contentWindow.setHass&&this.iframe.contentWindow.setHass(e)}get hass(){return this._hass}connectedCallback(){var n,r;this.style.display="block",this.style.width="100%",this.style.height="100%",this.style.position="relative";const i=((r=(n=this._hass)==null?void 0:n.themes)==null?void 0:r.darkMode)??!1?"hsl(222.2, 84%, 4.9%)":"hsl(0, 0%, 100%)";this.iframe=document.createElement("iframe"),this.iframe.src="/cafe-hass/index.html",this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none",this.iframe.style.display="block",this.iframe.style.background=i,this.iframe.setAttribute("allow","clipboard-read *; clipboard-write *"),this.appendChild(this.iframe),this._messageHandler=h=>{var l;h.source===((l=this.iframe)==null?void 0:l.contentWindow)&&h.data&&h.data.type==="CAFE_TOGGLE_SIDEBAR"&&this.dispatchEvent(new Event("hass-toggle-menu",{bubbles:!0,composed:!0}))},window.addEventListener("message",this._messageHandler)}disconnectedCallback(){this.iframe&&(this.removeChild(this.iframe),this.iframe=null),window.hass=void 0,this._messageHandler&&(window.removeEventListener("message",this._messageHandler),this._messageHandler=void 0)}}customElements.get("cafe-panel")||customElements.define("cafe-panel",m);
//# sourceMappingURL=panel-wrapper.js.map
@@ -0,0 +1 @@
{"version":3,"file":"panel-wrapper.js","sources":["../../src/panel-wrapper.ts"],"sourcesContent":["/**\n * Minimal wrapper for Home Assistant panel integration.\n * This web component receives the hass object from HA, exposes it on window,\n * and loads the actual app in an iframe for proper document isolation.\n */\nimport type { HomeAssistant } from './types/hass';\n\n// Type for window with hass\ndeclare const window: Window & {\n hass?: HomeAssistant;\n};\n\nclass CafePanelWrapper extends HTMLElement {\n private _messageHandler?: (event: MessageEvent) => void;\n private iframe: HTMLIFrameElement | null = null;\n private _hass: HomeAssistant | undefined = undefined;\n\n // Properties that HA will set\n set hass(value: HomeAssistant | undefined) {\n this._hass = value;\n // Expose hass on window so iframe can access via window.parent.hass\n window.hass = value;\n\n // Notify the iframe of the update if it has registered a listener\n if (this.iframe?.contentWindow && (this.iframe.contentWindow as any).setHass) {\n (this.iframe.contentWindow as any).setHass(value);\n }\n }\n\n get hass() {\n return this._hass;\n }\n\n connectedCallback() {\n // Style the wrapper to fill the container\n this.style.display = 'block';\n this.style.width = '100%';\n this.style.height = '100%';\n this.style.position = 'relative';\n\n // Detect dark mode from hass to set initial background and avoid white flash\n const isDarkMode = this._hass?.themes?.darkMode ?? false;\n // These match the CSS variables in index.css:\n // Light: --background: 0 0% 100% (white)\n // Dark: --background: 222.2 84% 4.9% (dark blue)\n const bgColor = isDarkMode ? 'hsl(222.2, 84%, 4.9%)' : 'hsl(0, 0%, 100%)';\n\n // Create iframe pointing to the app\n this.iframe = document.createElement('iframe');\n this.iframe.src = '/cafe-hass/index.html';\n this.iframe.style.width = '100%';\n this.iframe.style.height = '100%';\n this.iframe.style.border = 'none';\n this.iframe.style.display = 'block';\n this.iframe.style.background = bgColor;\n // Allow same-origin access\n this.iframe.setAttribute('allow', 'clipboard-read *; clipboard-write *');\n\n this.appendChild(this.iframe);\n\n // Listen for messages from the iframe to trigger sidebar toggle\n this._messageHandler = (event: MessageEvent) => {\n // Only accept messages from our iframe\n if (event.source !== this.iframe?.contentWindow) return;\n if (event.data && event.data.type === 'CAFE_TOGGLE_SIDEBAR') {\n this.dispatchEvent(new Event('hass-toggle-menu', { bubbles: true, composed: true }));\n }\n };\n window.addEventListener('message', this._messageHandler);\n }\n\n disconnectedCallback() {\n if (this.iframe) {\n this.removeChild(this.iframe);\n this.iframe = null;\n }\n // Clean up window properties\n window.hass = undefined;\n if (this._messageHandler) {\n window.removeEventListener('message', this._messageHandler);\n this._messageHandler = undefined;\n }\n }\n}\n\n// Register the custom element\nif (!customElements.get('cafe-panel')) {\n customElements.define('cafe-panel', CafePanelWrapper);\n}\n"],"names":["CafePanelWrapper","__publicField","value","_a","_b","bgColor","event"],"mappings":"oKAYA,MAAMA,UAAyB,WAAY,CAA3C,kCACUC,EAAA,wBACAA,EAAA,cAAmC,MACnCA,EAAA,cAGR,IAAI,KAAKC,EAAkC,CAN7C,IAAAC,EAOI,KAAK,MAAQD,EAEb,OAAO,KAAOA,GAGVC,EAAA,KAAK,SAAL,MAAAA,EAAa,eAAkB,KAAK,OAAO,cAAsB,SAClE,KAAK,OAAO,cAAsB,QAAQD,CAAK,CAEpD,CAEA,IAAI,MAAO,CACT,OAAO,KAAK,KACd,CAEA,mBAAoB,CArBtB,IAAAC,EAAAC,EAuBI,KAAK,MAAM,QAAU,QACrB,KAAK,MAAM,MAAQ,OACnB,KAAK,MAAM,OAAS,OACpB,KAAK,MAAM,SAAW,WAOtB,MAAMC,IAJaD,GAAAD,EAAA,KAAK,QAAL,YAAAA,EAAY,SAAZ,YAAAC,EAAoB,WAAY,GAItB,wBAA0B,mBAGvD,KAAK,OAAS,SAAS,cAAc,QAAQ,EAC7C,KAAK,OAAO,IAAM,wBAClB,KAAK,OAAO,MAAM,MAAQ,OAC1B,KAAK,OAAO,MAAM,OAAS,OAC3B,KAAK,OAAO,MAAM,OAAS,OAC3B,KAAK,OAAO,MAAM,QAAU,QAC5B,KAAK,OAAO,MAAM,WAAaC,EAE/B,KAAK,OAAO,aAAa,QAAS,qCAAqC,EAEvE,KAAK,YAAY,KAAK,MAAM,EAG5B,KAAK,gBAAmBC,GAAwB,CAjDpD,IAAAH,EAmDUG,EAAM,WAAWH,EAAA,KAAK,SAAL,YAAAA,EAAa,gBAC9BG,EAAM,MAAQA,EAAM,KAAK,OAAS,uBACpC,KAAK,cAAc,IAAI,MAAM,mBAAoB,CAAE,QAAS,GAAM,SAAU,EAAA,CAAM,CAAC,CAEvF,EACA,OAAO,iBAAiB,UAAW,KAAK,eAAe,CACzD,CAEA,sBAAuB,CACjB,KAAK,SACP,KAAK,YAAY,KAAK,MAAM,EAC5B,KAAK,OAAS,MAGhB,OAAO,KAAO,OACV,KAAK,kBACP,OAAO,oBAAoB,UAAW,KAAK,eAAe,EAC1D,KAAK,gBAAkB,OAE3B,CACF,CAGK,eAAe,IAAI,YAAY,GAClC,eAAe,OAAO,aAAcN,CAAgB"}
+30
View File
@@ -0,0 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>C.A.F.E. - Home Assistant</title>
<script>
// Set background color immediately to avoid white flash in dark mode
// This runs before CSS loads, checking parent window's hass dark mode setting
(function() {
try {
var isDark = window.parent && window.parent.hass && window.parent.hass.themes && window.parent.hass.themes.darkMode;
// Match CSS variables: light = hsl(0, 0%, 100%), dark = hsl(222.2, 84%, 4.9%)
var bg = isDark ? 'hsl(222.2, 84%, 4.9%)' : 'hsl(0, 0%, 100%)';
document.documentElement.style.background = bg;
// Inject style for body since it doesn't exist yet
var style = document.createElement('style');
style.textContent = 'body { background: ' + bg + ' !important; }';
document.head.appendChild(style);
} catch (e) {}
})();
</script>
<script type="module" crossorigin src="/cafe-hass/assets/main-BIzscans.js"></script>
<link rel="stylesheet" crossorigin href="/cafe-hass/assets/main-DfXhj31a.css">
</head>
<body>
<div id="root"></div>
</body>
</html>