From c0032fed760d9bcf1aedf460a8c9474dca9b7f11 Mon Sep 17 00:00:00 2001 From: barsdeveloper Date: Mon, 16 Dec 2024 00:44:10 +0200 Subject: [PATCH] WIP --- dist/ueblueprint.js | 282 +++++++++++++++------------ dist/ueblueprint.min.js | 12 +- js/entity/ObjectEntity.js | 61 ++++-- js/entity/ObjectReferenceEntity.js | 12 +- js/template/pin/PinTemplate.js | 4 +- package.json | 8 +- tests/issues.spec.js | 8 +- tests/niagaraScriptVariables.spec.js | 249 +++++++++++++---------- 8 files changed, 373 insertions(+), 263 deletions(-) diff --git a/dist/ueblueprint.js b/dist/ueblueprint.js index 9eea1ca..82fd8eb 100755 --- a/dist/ueblueprint.js +++ b/dist/ueblueprint.js @@ -3,42 +3,42 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const t$2=window,e$3=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),n$4=new WeakMap;class o$4{constructor(t,e,n){if(this._$cssResult$=!0,n!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n$4.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n$4.set(s,t));}return t}toString(){return this.cssText}}const r$2=t=>new o$4("string"==typeof t?t:t+"",void 0,s$3),i$3=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[n+1]),t[0]);return new o$4(n,t,s$3)},S$1=(s,n)=>{e$3?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),o=t$2.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=e.cssText,s.appendChild(n);}));},c$1=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t; +const t$2=globalThis,e$3=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$1=Symbol(),o$3=new WeakMap;class n$3{constructor(t,e,o){if(this._$cssResult$=!0,o!==s$1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$3.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$3.set(s,t));}return t}toString(){return this.cssText}}const r$3=t=>new n$3("string"==typeof t?t:t+"",void 0,s$1),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$1)},S$1=(s,o)=>{if(e$3)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$2=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$3(e)})(t):t; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var s$2;const e$2=window,r$1=e$2.trustedTypes,h$1=r$1?r$1.emptyScript:"",o$3=e$2.reactiveElementPolyfillSupport,n$3={toAttribute(t,i){switch(i){case Boolean:t=t?h$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t);}catch(t){s=null;}}return s}},a$1=(t,i)=>i!==t&&(i==i||t==t),l$2={attribute:!0,type:String,converter:n$3,reflect:!1,hasChanged:a$1},d$1="finalized";class u$1 extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu();}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t);}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e));})),t}static createProperty(t,i=l$2){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e);}}static getPropertyDescriptor(t,i,s){return {get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l$2}static finalize(){if(this.hasOwnProperty(d$1))return !1;this[d$1]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s]);}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(c$1(i));}else void 0!==i&&s.push(c$1(i));return s}static _$Ep(t,i){const s=i.attribute;return !1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)));}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t));}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1);}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i]);}));}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return S$1(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}));}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}));}attributeChangedCallback(t,i,s){this._$AK(t,s);}_$EO(t,i,s=l$2){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n$3).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null;}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n$3;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null;}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a$1)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej());}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek();}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s);}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return !0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek();}updated(t){}firstUpdated(t){}}u$1[d$1]=!0,u$1.elementProperties=new Map,u$1.elementStyles=[],u$1.shadowRootOptions={mode:"open"},null==o$3||o$3({ReactiveElement:u$1}),(null!==(s$2=e$2.reactiveElementVersions)&&void 0!==s$2?s$2:e$2.reactiveElementVersions=[]).push("1.6.3"); + */const{is:i$4,defineProperty:e$2,getOwnPropertyDescriptor:r$2,getOwnPropertyNames:h$1,getOwnPropertySymbols:o$2,getPrototypeOf:n$2}=Object,a$1=globalThis,c$1=a$1.trustedTypes,l$1=c$1?c$1.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),y$1={attribute:!0,type:String,converter:u$1,reflect:!1,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$1.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y$1){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e$2(this.prototype,t,r);}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r$2(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...h$1(t),...o$2(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return !1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u$1).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$1;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f$1)(this[t],s))return;this.P(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$ET());}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t);}async _$ET(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i);}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU();}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU();}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[d$1("elementProperties")]=new Map,b[d$1("finalized")]=new Map,p$1?.({ReactiveElement:b}),(a$1.reactiveElementVersions??=[]).push("2.0.4"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var t$1;const i$2=window,s$1=i$2.trustedTypes,e$1=s$1?s$1.createPolicy("lit-html",{createHTML:t=>t}):void 0,o$2="$lit$",n$2=`lit$${(Math.random()+"").slice(9)}$`,l$1="?"+n$2,h=`<${l$1}>`,r=document,u=()=>r.createComment(""),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1);function P(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$1?e$1.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,e=[];let l,r=2===i?"":"",u=f;for(let i=0;i"===c[0]?(u=null!=l?l:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,d=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,l=void 0);const w=u===p&&t[i+1].startsWith("/>")?" ":"";r+=u===f?s+h:v>=0?(e.push(d),s.slice(0,v)+o$2+s.slice(v)+n$2+w):s+n$2+(-2===v?(e.push(void 0),i):w);}return [P(t,r+(t[s]||"")+(2===i?"":"")),e]};class N{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,d=0;const c=t.length-1,v=this.parts,[a,f]=V(t,i);if(this.el=N.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes);}for(;null!==(h=C.nextNode())&&v.length0){h.textContent=s$1?s$1.emptyScript:"";for(let s=0;s2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=S(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else {const e=t;let l,h;for(t=o[0],l=0;l{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new R(i.insertBefore(u(),t),t,void 0,null!=s?s:{});}return l._$AI(t),l}; +const t$1=globalThis,i$3=t$1.trustedTypes,s=i$3?i$3.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$1="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o$1="?"+h,n$1=`<${o$1}>`,r$1=document,l=()=>r$1.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a=Array.isArray,u=t=>a(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap,C=r$1.createTreeWalker(r$1,129);function P(t,i){if(!a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"":3===i?"":"",c=f;for(let i=0;i"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith("/>")?" ":"";l+=c===f?s+n$1:d>=0?(o.push(a),s.slice(0,d)+e$1+s.slice(d)+h+x):s+h+(-2===d?i:x);}return [P(t,l+(t[s]||"")+(2===i?"":3===i?"":"")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length0){r.textContent=i$3?i$3.emptyScript:"";for(let i=0;i2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{});}return h._$AI(t),h}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */var l,o$1;class s extends u$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(i,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1);}render(){return T}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n$1=globalThis.litElementPolyfillSupport;null==n$1||n$1({LitElement:s});(null!==(o$1=globalThis.litElementVersions)&&void 0!==o$1?o$1:globalThis.litElementVersions=[]).push("3.3.3"); + */class r extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(s,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T}}r._$litElement$=!0,r["finalized"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r});const i$2=globalThis.litElementPolyfillSupport;i$2?.({LitElement:r});(globalThis.litElementVersions??=[]).push("4.1.1"); class Configuration { static nodeColors = { - black: i$3`20, 20, 20`, - blue: i$3`84, 122, 156`, - darkBlue: i$3`32, 80, 128`, - darkerBlue: i$3`18, 18, 130`, - darkTurquoise: i$3`19, 100, 137`, - gray: i$3`150,150,150`, - green: i$3`95, 129, 90`, - intenseGreen: i$3`42, 140, 42`, - lime: i$3`150, 160, 30`, - red: i$3`151, 33, 32`, - turquoise: i$3`46, 104, 106`, - violet: i$3`126, 28, 150`, - yellow: i$3`148, 116, 24`, + black: i$5`20, 20, 20`, + blue: i$5`84, 122, 156`, + darkBlue: i$5`32, 80, 128`, + darkerBlue: i$5`18, 18, 130`, + darkTurquoise: i$5`19, 100, 137`, + gray: i$5`150,150,150`, + green: i$5`95, 129, 90`, + intenseGreen: i$5`42, 140, 42`, + lime: i$5`150, 160, 30`, + red: i$5`151, 33, 32`, + turquoise: i$5`46, 104, 106`, + violet: i$5`126, 28, 150`, + yellow: i$5`148, 116, 24`, } static alphaPattern = "repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px" static colorDragEventName = "ueb-color-drag" @@ -60,13 +60,13 @@ class Configuration { begin: "blueprint-focus", end: "blueprint-unfocus", } - static fontSize = i$3`13px` - static gridAxisLineColor = i$3`black` + static fontSize = i$5`13px` + static gridAxisLineColor = i$5`black` static gridExpandThreshold = 0.25 // remaining size factor threshold to cause an expansion event - static gridLineColor = i$3`#353535` + static gridLineColor = i$5`#353535` static gridLineWidth = 1 // px static gridSet = 8 - static gridSetLineColor = i$3`#161616` + static gridSetLineColor = i$5`#161616` static gridShrinkThreshold = 4 // exceding size factor threshold to cause a shrink event static gridSize = 16 // px static hexColorRegex = /^\s*#(?[0-9a-fA-F]{2})(?[0-9a-fA-F]{2})(?[0-9a-fA-F]{2})([0-9a-fA-F]{2})?|#(?[0-9a-fA-F])(?[0-9a-fA-F])(?[0-9a-fA-F])\s*$/ @@ -805,7 +805,7 @@ class Utility { * @template {IEntity} EntityT * @template {ITemplate} TemplateT */ -class IElement extends s { +class IElement extends r { /** @type {Blueprint} */ #blueprint @@ -3635,7 +3635,7 @@ class LinearColorEntity extends IEntity { const r = Math.round(this.R.value * 255); const g = Math.round(this.G.value * 255); const b = Math.round(this.B.value * 255); - return i$3`${r}, ${g}, ${b}` + return i$5`${r}, ${g}, ${b}` } toRGBA() { @@ -4775,58 +4775,58 @@ class NaturalNumberEntity extends IntegerEntity { } const colors = { - "Any": i$3`132, 132, 132`, - "Any[]": i$3`132, 132, 132`, - "audio": i$3`252, 148, 252`, - "blue": i$3`0, 0, 255`, - "bool": i$3`146, 0, 0`, - "byte": i$3`0, 110, 100`, - "class": i$3`88, 0, 186`, - "default": i$3`255, 255, 255`, - "delegate": i$3`255, 56, 56`, - "enum": i$3`0, 109, 99`, - "exec": i$3`240, 240, 240`, - "float": i$3`160, 252, 70`, - "green": i$3`0, 255, 0`, - "int": i$3`30, 224, 172`, - "int32": i$3`30, 224, 172`, - "int64": i$3`170, 224, 172`, - "interface": i$3`238, 252, 168`, - "name": i$3`200, 128, 252`, - "object": i$3`0, 168, 242`, - "Param": i$3`255, 166, 40`, - "Param[]": i$3`255, 166, 40`, - "Point": i$3`64, 138, 255`, - "Point[]": i$3`64, 137, 255`, - "real": i$3`54, 208, 0`, - "red": i$3`255, 0, 0`, - "string": i$3`251, 0, 208`, - "struct": i$3`0, 88, 200`, - "Surface": i$3`69, 196, 126`, - "Surface[]": i$3`69, 196, 126`, - "text": i$3`226, 121, 167`, - "time": i$3`148, 252, 252`, - "Volume": i$3`230, 69, 188`, - "Volume[]": i$3`230, 69, 188`, - "wildcard": i$3`128, 120, 120`, - [Configuration.paths.linearColor]: i$3`0, 88, 200`, - [Configuration.paths.niagaraBool]: i$3`146, 0, 0`, - [Configuration.paths.niagaraDataInterfaceCollisionQuery]: i$3`0, 168, 242`, - [Configuration.paths.niagaraDataInterfaceCurlNoise]: i$3`0, 168, 242`, - [Configuration.paths.niagaraDataInterfaceVolumeTexture]: i$3`0, 168, 242`, - [Configuration.paths.niagaraFloat]: i$3`160, 250, 68`, - [Configuration.paths.niagaraInt32]: i$3`30, 224, 172`, - [Configuration.paths.niagaraPosition]: i$3`251, 146, 251`, - [Configuration.paths.quat4f]: i$3`0, 88, 200`, - [Configuration.paths.rotator]: i$3`157, 177, 251`, - [Configuration.paths.transform]: i$3`227, 103, 0`, - [Configuration.paths.vector]: i$3`251, 198, 34`, - [Configuration.paths.vector2f]: i$3`0, 88, 200`, - [Configuration.paths.vector3f]: i$3`250, 200, 36`, - [Configuration.paths.vector4f]: i$3`0, 88, 200`, + "Any": i$5`132, 132, 132`, + "Any[]": i$5`132, 132, 132`, + "audio": i$5`252, 148, 252`, + "blue": i$5`0, 0, 255`, + "bool": i$5`146, 0, 0`, + "byte": i$5`0, 110, 100`, + "class": i$5`88, 0, 186`, + "default": i$5`255, 255, 255`, + "delegate": i$5`255, 56, 56`, + "enum": i$5`0, 109, 99`, + "exec": i$5`240, 240, 240`, + "float": i$5`160, 252, 70`, + "green": i$5`0, 255, 0`, + "int": i$5`30, 224, 172`, + "int32": i$5`30, 224, 172`, + "int64": i$5`170, 224, 172`, + "interface": i$5`238, 252, 168`, + "name": i$5`200, 128, 252`, + "object": i$5`0, 168, 242`, + "Param": i$5`255, 166, 40`, + "Param[]": i$5`255, 166, 40`, + "Point": i$5`64, 138, 255`, + "Point[]": i$5`64, 137, 255`, + "real": i$5`54, 208, 0`, + "red": i$5`255, 0, 0`, + "string": i$5`251, 0, 208`, + "struct": i$5`0, 88, 200`, + "Surface": i$5`69, 196, 126`, + "Surface[]": i$5`69, 196, 126`, + "text": i$5`226, 121, 167`, + "time": i$5`148, 252, 252`, + "Volume": i$5`230, 69, 188`, + "Volume[]": i$5`230, 69, 188`, + "wildcard": i$5`128, 120, 120`, + [Configuration.paths.linearColor]: i$5`0, 88, 200`, + [Configuration.paths.niagaraBool]: i$5`146, 0, 0`, + [Configuration.paths.niagaraDataInterfaceCollisionQuery]: i$5`0, 168, 242`, + [Configuration.paths.niagaraDataInterfaceCurlNoise]: i$5`0, 168, 242`, + [Configuration.paths.niagaraDataInterfaceVolumeTexture]: i$5`0, 168, 242`, + [Configuration.paths.niagaraFloat]: i$5`160, 250, 68`, + [Configuration.paths.niagaraInt32]: i$5`30, 224, 172`, + [Configuration.paths.niagaraPosition]: i$5`251, 146, 251`, + [Configuration.paths.quat4f]: i$5`0, 88, 200`, + [Configuration.paths.rotator]: i$5`157, 177, 251`, + [Configuration.paths.transform]: i$5`227, 103, 0`, + [Configuration.paths.vector]: i$5`251, 198, 34`, + [Configuration.paths.vector2f]: i$5`0, 88, 200`, + [Configuration.paths.vector3f]: i$5`250, 200, 36`, + [Configuration.paths.vector4f]: i$5`0, 88, 200`, }; -const pinColorMaterial = i$3`120, 120, 120`; +const pinColorMaterial = i$5`120, 120, 120`; /** @param {PinEntity} entity */ function pinColor(entity) { @@ -5242,30 +5242,31 @@ class ObjectReferenceEntity extends IEntity { return this.#path } set path(value) { + this.#name = ""; this.#path = value; } - #full + #serializer get full() { - return this.#full + return this.#serializer } set full(value) { - this.#full = value; + this.#serializer = value; } #name = "" - /** @param {(t: String, p: String) => String} full */ + /** @param {(t: String, p: String) => String} serializer */ constructor( type = "None", path = "", - full = type.includes("/") || path + serializer = type.includes("/") || path ? (t, p) => `"${t + (p ? (`'${p}'`) : "")}"` : (t, p) => t) { super(); this.#type = type; this.#path = path; - this.#full = full; + this.#serializer = serializer; } /** @returns {P} */ @@ -6406,7 +6407,10 @@ class ObjectEntity extends IEntity { ScriptVariables: ArrayEntity.flagInlined().of(ScriptVariableEntity), Node: MirroredEntity.of(ObjectReferenceEntity), ExportedNodes: StringEntity, - CustomProperties: ArrayEntity.of(AlternativesEntity.accepting(PinEntity, UnknownPinEntity)).withDefault().flagSilent(), + CustomProperties: ArrayEntity + .of(AlternativesEntity.accepting(PinEntity, UnknownPinEntity)) + .withDefault() + .flagSilent(), } static customPropertyGrammar = Parsernostrum.seq( Parsernostrum.reg(/CustomProperties\s+/), @@ -6631,16 +6635,41 @@ class ObjectEntity extends IEntity { ? outputIndex++ : i; }); - const reference = this.ExportPath?.valueOf(); - if (reference?.path.endsWith(this.Name?.toString())) { + + // Mirror name part of the object in ExportPath + const exportPath = this.ExportPath?.valueOf(); + if (exportPath?.path.endsWith(this.Name?.toString())) { const mirroredEntity = /** @type {typeof ObjectEntity} */(this.constructor).attributes.ExportPath; - const objectReferenceEntity = /** @type {typeof ObjectReferenceEntity} */(mirroredEntity.type); - const nameLength = this.Name.valueOf().length; - this.ExportPath = new mirroredEntity(() => new objectReferenceEntity( - reference.type, - reference.path.substring(0, reference.path.length - nameLength) + this.Name, - reference.full, - )); + const prefix = exportPath.path.substring(0, exportPath.path.length - this.Name.toString().length); + this.ExportPath = new mirroredEntity( + () => new (mirroredEntity.type)(exportPath.type, prefix + this.Name.toString(), exportPath.full) + ); + } + + // Mirror name part of the nested object in ExportPath + if (this.Name) { + for (const k of Object.keys(this)) { + if (!k.startsWith(Configuration.subObjectAttributeNamePrefix)) { + continue + } + /** @type {ObjectEntity} */ + const subObject = this[k]; + if (!subObject.ExportPath?.valueOf().path.includes(this.Name.toString())) { + continue + } + const originalExportPath = subObject.ExportPath.valueOf(); + const position = originalExportPath.path.indexOf(this.Name.toString()); + const prefix = originalExportPath.path.substring(0, position); + const suffix = originalExportPath.path.substring(position + this.Name.toString().length); + const mirroredEntity = /** @type {typeof ObjectEntity} */(subObject.constructor).attributes.ExportPath; + subObject.ExportPath = new mirroredEntity( + () => new (mirroredEntity.type)( + originalExportPath.type, + prefix + (this.Name ?? "").toString() + suffix, + originalExportPath.full + ) + ); + } } } @@ -6928,9 +6957,10 @@ class ObjectEntity extends IEntity { attributeSeparator = Self.attributeSeparator, wrap = Self.wrap, ) { + const isSelfOverriden = Self !== this.constructor; const deeperIndentation = indentation + Configuration.indentation; const initial_trailing = this.trailing; - this.trailing = false; + this.trailing = true; const content = super.doSerialize(insideString, deeperIndentation, Self, printKey, keySeparator, attributeSeparator, wrap); this.trailing = initial_trailing; let result = indentation + "Begin Object" @@ -6958,21 +6988,21 @@ class ObjectEntity extends IEntity { ? ` ExportPath${keySeparator}${this.ExportPath.serialize(insideString)}` : "" ) - + (content ? attributeSeparator + content : "") + + attributeSeparator + + content + (Self.attributes.CustomProperties.ignored !== true && this.CustomProperties.ignored !== true ? this.getCustomproperties() .map(pin => - attributeSeparator - + deeperIndentation + deeperIndentation + printKey("CustomProperties ") + pin.serialize(insideString) + + attributeSeparator ) .join("") : "" ) - + attributeSeparator + indentation + "End Object" - + (this.trailing ? attributeSeparator : ""); + + (isSelfOverriden && Self.trailing || this.trailing ? attributeSeparator : ""); return result } } @@ -7761,14 +7791,14 @@ class LinkTemplate extends IFromToPositionedTemplate { ${this.element.linkMessageIcon || this.element.linkMessageText ? x` - ` : A} + ` : E} ` } } @@ -7891,9 +7921,9 @@ class LinkElement extends IFromToPositionedElement { #nodeReflowDestinatonHandler = e => this.setDestinationLocation() /** @type {TemplateResult | nothing} */ - linkMessageIcon = A + linkMessageIcon = E /** @type {TemplateResult | nothing} */ - linkMessageText = A + linkMessageText = E /** @type {SVGPathElement} */ pathElement @@ -8084,8 +8114,8 @@ class LinkElement extends IFromToPositionedElement { } removeMessage() { - this.linkMessageIcon = A; - this.linkMessageText = A; + this.linkMessageIcon = E; + this.linkMessageText = E; } setMessageConvertType() { @@ -8095,12 +8125,12 @@ class LinkElement extends IFromToPositionedElement { setMessageCorrect() { this.linkMessageIcon = SVGIcon.correct; - this.linkMessageText = A; + this.linkMessageText = E; } setMessageReplace() { this.linkMessageIcon = SVGIcon.correct; - this.linkMessageText = A; + this.linkMessageText = E; } setMessageDirectionsIncompatible() { @@ -8109,7 +8139,7 @@ class LinkElement extends IFromToPositionedElement { } setMessagePlaceNode() { - this.linkMessageIcon = A; + this.linkMessageIcon = E; this.linkMessageText = x`Place a new node.`; } @@ -8854,17 +8884,17 @@ class NodeTemplate extends ISelectableDraggableTemplate {
Add pin ${SVGIcon.plusCircle}
- `: A} + `: E} ${this.element.entity.isDevelopmentOnly() ? x`
Development Only
- ` : A} + ` : E} ${this.element.advancedPinDisplay ? x`
${SVGIcon.expandIcon}
- ` : A} + ` : E} ` @@ -8885,15 +8915,15 @@ class NodeTemplate extends ISelectableDraggableTemplate {
${icon ? x`
${icon}
- ` : A} + ` : E} ${name ? x`
${name} ${this.#subtitle ? x`
${this.#subtitle}
- `: A} + `: E}
- ` : A} + ` : E}
` } @@ -9364,18 +9394,18 @@ class VariableManagementNodeTemplate extends NodeTemplate { - ` : A} + ` : E} ${this.#hasInput ? x`
- ` : A} + ` : E} ${this.#hasOutput ? x`
- ` : A} + ` : E} ${this.pinInserter ? x`
Add pin ${SVGIcon.plusCircle}
- `: A} + `: E} ` @@ -9475,7 +9505,7 @@ class PinTemplate extends ITemplate { const icon = x`
${this.renderIcon()}
`; const content = x`
- ${this.isNameRendered ? this.renderName() : A} + ${this.isNameRendered ? this.renderName() : E} ${this.isInputRendered() ? this.renderInput() : x``}
`; @@ -9543,7 +9573,9 @@ class PinTemplate extends ITemplate { } isInputRendered() { - return this.element.isInput() && !this.element.entity.PinType.bIsReference?.valueOf() + return this.element.isInput() + && !this.element.entity.bDefaultValueIsIgnored?.valueOf() + && !this.element.entity.PinType.bIsReference?.valueOf() } renderInput() { @@ -9617,7 +9649,7 @@ class EventNodeTemplate extends NodeTemplate {
${icon ? x`
${icon}
- ` : A} + ` : E} ${name ? x`
${name} @@ -9625,9 +9657,9 @@ class EventNodeTemplate extends NodeTemplate {
Custom Event
- `: A} + `: E}
- ` : A} + ` : E}
` } @@ -12324,7 +12356,7 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const i="important",n=" !"+i,o=e(class extends i$1{constructor(t$1){var e;if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||(null===(e=t$1.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ht){this.ht=new Set;for(const t in r)this.ht.add(t);return this.render(r)}this.ht.forEach((t=>{null==r[t]&&(this.ht.delete(t),t.includes("-")?s.removeProperty(t):s[t]="");}));for(const t in r){const e=r[t];if(null!=e){this.ht.add(t);const r="string"==typeof e&&e.endsWith(n);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?i:""):s[t]=e;}}return T}}); + */const n="important",i=" !"+n,o=e(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"style"!==t$1.name||t$1.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(r)),this.render(r);for(const t of this.ft)null==r[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in r){const e=r[t];if(null!=e){this.ft.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e;}}return T}}); /** @extends {IDraggablePositionedTemplate} */ class WindowTemplate extends IDraggablePositionedTemplate { @@ -12786,9 +12818,9 @@ class LinearColorPinTemplate extends PinTemplate { renderInput() { return x` - + style="--ueb-linear-color: rgba(${this.element.getDefaultValue()?.toString() ?? E})"> ` } diff --git a/dist/ueblueprint.min.js b/dist/ueblueprint.min.js index 1bc599e..329a02c 100755 --- a/dist/ueblueprint.min.js +++ b/dist/ueblueprint.min.js @@ -3,31 +3,31 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const e=window,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;class n{constructor(e,t,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const i=this.t;if(t&&void 0===e){const t=void 0!==i&&1===i.length;t&&(e=s.get(i)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&s.set(i,e))}return e}toString(){return this.cssText}}const r=(e,...t)=>{const s=1===e.length?e[0]:t.reduce(((t,i,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1]),e[0]);return new n(s,e,i)},a=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new n("string"==typeof e?e:e+"",void 0,i))(t)})(e):e +const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;class r{constructor(e,t,s){if(this._$cssResult$=!0,s!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const i=this.t;if(t&&void 0===e){const t=void 0!==i&&1===i.length;t&&(e=s.get(i)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&s.set(i,e))}return e}toString(){return this.cssText}}const n=(e,...t)=>{const s=1===e.length?e[0]:t.reduce(((t,i,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1]),e[0]);return new r(s,e,i)},a=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new r("string"==typeof e?e:e+"",void 0,i))(t)})(e):e /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */;var o;const l=window,c=l.trustedTypes,u=c?c.emptyScript:"",h=l.reactiveElementPolyfillSupport,p={toAttribute(e,t){switch(t){case Boolean:e=e?u:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},d=(e,t)=>t!==e&&(t==t||e==e),m={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:d},g="finalized";class b extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,i)=>{const s=this._$Ep(i,t);void 0!==s&&(this._$Ev.set(s,i),e.push(s))})),e}static createProperty(e,t=m){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const i="symbol"==typeof e?Symbol():"__"+e,s=this.getPropertyDescriptor(e,i,t);void 0!==s&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(s){const n=this[e];this[t]=s,this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||m}static finalize(){if(this.hasOwnProperty(g))return!1;this[g]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of t)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(a(e))}else void 0!==e&&t.push(a(e));return t}static _$Ep(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,i;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(i=e.hostConnected)||void 0===i||i.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var i;const s=null!==(i=this.shadowRoot)&&void 0!==i?i:this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{t?i.adoptedStyleSheets=s.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):s.forEach((t=>{const s=document.createElement("style"),n=e.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=t.cssText,i.appendChild(s)}))})(s,this.constructor.elementStyles),s}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EO(e,t,i=m){var s;const n=this.constructor._$Ep(e,i);if(void 0!==n&&!0===i.reflect){const r=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:p).toAttribute(t,i.type);this._$El=e,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(e,t){var i;const s=this.constructor,n=s._$Ev.get(e);if(void 0!==n&&this._$El!==n){const e=s.getPropertyOptions(n),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(i=e.converter)||void 0===i?void 0:i.fromAttribute)?e.converter:p;this._$El=n,this[n]=r.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,i){let s=!0;void 0!==e&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||d)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(i)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}} + */,{is:o,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:u,getOwnPropertySymbols:h,getPrototypeOf:p}=Object,d=globalThis,m=d.trustedTypes,g=m?m.emptyScript:"",b=d.reactiveElementPolyfillSupport,v=(e,t)=>e,f={toAttribute(e,t){switch(t){case Boolean:e=e?g:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},y=(e,t)=>!o(e,t),w={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),d.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=w){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(e,i,t);void 0!==s&&l(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:r}=c(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return s?.call(this)},set(t){const n=s?.call(this);r.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??w}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const e=p(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const e=this.properties,t=[...u(e),...h(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(a(e))}else void 0!==e&&t.push(a(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,s)=>{if(t)i.adoptedStyleSheets=s.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const t of s){const s=document.createElement("style"),r=e.litNonce;void 0!==r&&s.setAttribute("nonce",r),s.textContent=t.cssText,i.appendChild(s)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){const i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:f).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){const i=this.constructor,s=i._$Eh.get(e);if(void 0!==s&&this._$Em!==s){const e=i.getPropertyOptions(s),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:f;this._$Em=s,this[s]=r.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??y)(this[e],t))return;this.P(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),!0===i.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e)!0!==i.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],i)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[v("elementProperties")]=new Map,S[v("finalized")]=new Map,b?.({ReactiveElement:S}),(d.reactiveElementVersions??=[]).push("2.0.4"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var v;b[g]=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:b}),(null!==(o=l.reactiveElementVersions)&&void 0!==o?o:l.reactiveElementVersions=[]).push("1.6.3");const f=window,y=f.trustedTypes,w=y?y.createPolicy("lit-html",{createHTML:e=>e}):void 0,S="$lit$",E=`lit$${(Math.random()+"").slice(9)}$`,C="?"+E,N=`<${C}>`,x=document,P=()=>x.createComment(""),k=e=>null===e||"object"!=typeof e&&"function"!=typeof e,A=Array.isArray,L="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,I=/>/g,O=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,$=/"/g,B=/^(?:script|style|textarea|title)$/i,R=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),G=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),H=new WeakMap,z=x.createTreeWalker(x,129,null,!1);function _(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==w?w.createHTML(t):t}const F=(e,t)=>{const i=e.length-1,s=[];let n,r=2===t?"":"",a=M;for(let t=0;t"===l[0]?(a=null!=n?n:M,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?O:'"'===l[3]?$:D):a===$||a===D?a=O:a===T||a===I?a=M:(a=O,n=void 0);const h=a===O&&e[t+1].startsWith("/>")?" ":"";r+=a===M?i+N:c>=0?(s.push(o),i.slice(0,c)+S+i.slice(c)+E+h):i+E+(-2===c?(s.push(void 0),t):h)}return[_(e,r+(e[i]||"")+(2===t?"":"")),s]};class j{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let n=0,r=0;const a=e.length-1,o=this.parts,[l,c]=F(e,t);if(this.el=j.createElement(l,i),z.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(s=z.nextNode())&&o.length0){s.textContent=y?y.emptyScript:"";for(let i=0;iA(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==V&&k(this._$AH)?this._$AA.nextSibling.data=e:this.$(x.createTextNode(e)),this._$AH=e}g(e){var t;const{values:i,_$litType$:s}=e,n="number"==typeof s?this._$AC(e):(void 0===s.el&&(s.el=j.createElement(_(s.h,s.h[0]),this.options)),s);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===n)this._$AH.v(i);else{const e=new Y(n,this),t=e.u(this.options);e.v(i),this.$(t),this._$AH=e}}_$AC(e){let t=H.get(e.strings);return void 0===t&&H.set(e.strings,t=new j(e)),t}T(e){A(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const n of e)s===t.length?t.push(i=new q(this.k(P()),this.k(P()),this,this.options)):i=t[s],i._$AI(n),s++;s2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,i,s){const n=this.strings;let r=!1;if(void 0===n)e=U(this,e,t,0),r=!k(e)||e!==this._$AH&&e!==G,r&&(this._$AH=e);else{const s=e;let a,o;for(e=n[0],a=0;ae}):void 0,x="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,k="?"+P,A=`<${k}>`,L=document,M=()=>L.createComment(""),T=e=>null===e||"object"!=typeof e&&"function"!=typeof e,I=Array.isArray,O="[ \t\n\f\r]",D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,B=/>/g,R=RegExp(`>|${O}(?:([^\\s"'>=/]+)(${O}*=${O}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,V=/"/g,H=/^(?:script|style|textarea|title)$/i,z=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),_=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),j=new WeakMap,U=L.createTreeWalker(L,129);function Y(e,t){if(!I(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==N?N.createHTML(t):t}const q=(e,t)=>{const i=e.length-1,s=[];let r,n=2===t?"":3===t?"":"",a=D;for(let t=0;t"===l[0]?(a=r??D,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?R:'"'===l[3]?V:G):a===V||a===G?a=R:a===$||a===B?a=D:(a=R,r=void 0);const h=a===R&&e[t+1].startsWith("/>")?" ":"";n+=a===D?i+A:c>=0?(s.push(o),i.slice(0,c)+x+i.slice(c)+P+h):i+P+(-2===c?t:h)}return[Y(e,n+(e[i]||"")+(2===t?"":3===t?"":"")),s]};class K{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,n=0;const a=e.length-1,o=this.parts,[l,c]=q(e,t);if(this.el=K.createElement(l,i),U.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=U.nextNode())&&o.length0){s.textContent=C?C.emptyScript:"";for(let i=0;iI(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==F&&T(this._$AH)?this._$AA.nextSibling.data=e:this.T(L.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,s="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=K.createElement(Y(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{const e=new W(s,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=j.get(e.strings);return void 0===t&&j.set(e.strings,t=new K(e)),t}k(e){I(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,s=0;for(const r of e)s===t.length?t.push(i=new Z(this.O(M()),this.O(M()),this,this.options)):i=t[s],i._$AI(r),s++;s2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=F}_$AI(e,t=this,i,s){const r=this.strings;let n=!1;if(void 0===r)e=X(this,e,t,0),n=!T(e)||e!==this._$AH&&e!==_,n&&(this._$AH=e);else{const s=e;let a,o;for(e=r[0],a=0;a{var s,n;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:t;let a=r._$litPart$;if(void 0===a){const e=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=a=new q(t.insertBefore(P(),e),e,void 0,null!=i?i:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return G}}se.finalized=!0,se._$litElement$=!0,null===(te=globalThis.litElementHydrateSupport)||void 0===te||te.call(globalThis,{LitElement:se});const ne=globalThis.litElementPolyfillSupport;null==ne||ne({LitElement:se}),(null!==(ie=globalThis.litElementVersions)&&void 0!==ie?ie:globalThis.litElementVersions=[]).push("3.3.3");class re{static nodeColors={black:r``,blue:r``,darkBlue:r``,darkerBlue:r``,darkTurquoise:r``,gray:r``,green:r``,intenseGreen:r``,lime:r``,red:r``,turquoise:r``,violet:r``,yellow:r``};static alphaPattern="repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px";static colorDragEventName="ueb-color-drag";static colorPickEventName="ueb-color-pick";static colorWindowEventName="ueb-color-window";static colorWindowName="Color Picker";static defaultCommentHeight=96;static defaultCommentWidth=400;static distanceThreshold=5;static dragEventName="ueb-drag";static dragGeneralEventName="ueb-drag-general";static edgeScrollThreshold=50;static editTextEventName={begin:"ueb-edit-text-begin",end:"ueb-edit-text-end"};static expandGridSize=400;static focusEventName={begin:"blueprint-focus",end:"blueprint-unfocus"};static fontSize=r``;static gridAxisLineColor=r``;static gridExpandThreshold=.25;static gridLineColor=r``;static gridLineWidth=1;static gridSet=8;static gridSetLineColor=r``;static gridShrinkThreshold=4;static gridSize=16;static hexColorRegex=/^\s*#(?[0-9a-fA-F]{2})(?[0-9a-fA-F]{2})(?[0-9a-fA-F]{2})([0-9a-fA-F]{2})?|#(?[0-9a-fA-F])(?[0-9a-fA-F])(?[0-9a-fA-F])\s*$/;static indentation=" ";static keysSeparator=/[\.\(\)]/;static knotOffset=[-re.gridSize,-.5*re.gridSize];static lineTracePattern=/LineTrace(Single|Multi)(\w*)/;static linkCurveHeight=15;static linkCurveWidth=80;static linkMinWidth=100;static nameRegexSpaceReplacement=new RegExp("^K2(?:[Nn]ode)?_|(?<=[a-z])(?=[A-Z0-9])|(?<=[A-Z])(?{let s=100-e;return`M ${e} 0 C ${t.toFixed(3)} 0, ${i.toFixed(3)} 0, 50 50 S ${(s-t+e).toFixed(3)} 100, ${s.toFixed(3)} 100`};static maxZoom=7;static minZoom=-12;static mouseClickButton=0;static mouseRightClickButton=2;static mouseWheelZoomThreshold=80;static nodeDragEventName="ueb-node-drag";static nodeDragGeneralEventName="ueb-node-drag-general";static nodeTitle=(e,t)=>`${e}_${t}`;static nodeRadius=8;static nodeReflowEventName="ueb-node-reflow";static paths={actorBoundEvent:"/Script/BlueprintGraph.K2Node_ActorBoundEvent",addDelegate:"/Script/BlueprintGraph.K2Node_AddDelegate",ambientSound:"/Script/Engine.AmbientSound",asyncAction:"/Script/BlueprintGraph.K2Node_AsyncAction",blueprint:"/Script/Engine.Blueprint",blueprintGameplayTagLibrary:"/Script/GameplayTags.BlueprintGameplayTagLibrary",blueprintMapLibrary:"/Script/Engine.BlueprintMapLibrary",blueprintSetLibrary:"/Script/Engine.BlueprintSetLibrary",callArrayFunction:"/Script/BlueprintGraph.K2Node_CallArrayFunction",callDelegate:"/Script/BlueprintGraph.K2Node_CallDelegate",callFunction:"/Script/BlueprintGraph.K2Node_CallFunction",clearDelegate:"/Script/BlueprintGraph.K2Node_ClearDelegate",comment:"/Script/UnrealEd.EdGraphNode_Comment",commutativeAssociativeBinaryOperator:"/Script/BlueprintGraph.K2Node_CommutativeAssociativeBinaryOperator",componentBoundEvent:"/Script/BlueprintGraph.K2Node_ComponentBoundEvent",createDelegate:"/Script/BlueprintGraph.K2Node_CreateDelegate",customEvent:"/Script/BlueprintGraph.K2Node_CustomEvent",doN:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:Do N",doOnce:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:DoOnce",dynamicCast:"/Script/BlueprintGraph.K2Node_DynamicCast",eAttachmentRule:"/Script/Engine.EAttachmentRule",edGraph:"/Script/Engine.EdGraph",eDrawDebugTrace:"/Script/Engine.EDrawDebugTrace",eMaterialSamplerType:"/Script/Engine.EMaterialSamplerType",eNiagara_Float4Channel:"/Niagara/Enums/ENiagara_Float4Channel.ENiagara_Float4Channel",enum:"/Script/CoreUObject.Enum",enumLiteral:"/Script/BlueprintGraph.K2Node_EnumLiteral",eSamplerSourceMode:"/Script/Engine.ESamplerSourceMode",eSearchCase:"/Script/CoreUObject.ESearchCase",eSearchDir:"/Script/CoreUObject.ESearchDir",eSpawnActorCollisionHandlingMethod:"/Script/Engine.ESpawnActorCollisionHandlingMethod",eTextureMipValueMode:"/Script/Engine.ETextureMipValueMode",eTraceTypeQuery:"/Script/Engine.ETraceTypeQuery",event:"/Script/BlueprintGraph.K2Node_Event",eWorldPositionIncludedOffsets:"/Script/Engine.EWorldPositionIncludedOffsets",executionSequence:"/Script/BlueprintGraph.K2Node_ExecutionSequence",flipflop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:FlipFlop",forEachElementInEnum:"/Script/BlueprintGraph.K2Node_ForEachElementInEnum",forEachLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoop",forEachLoopWithBreak:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoopWithBreak",forLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoop",forLoopWithBreak:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoopWithBreak",functionEntry:"/Script/BlueprintGraph.K2Node_FunctionEntry",functionResult:"/Script/BlueprintGraph.K2Node_FunctionResult",gameplayTag:"/Script/GameplayTags.GameplayTag",getInputAxisKeyValue:"/Script/BlueprintGraph.K2Node_GetInputAxisKeyValue",ifThenElse:"/Script/BlueprintGraph.K2Node_IfThenElse",inputAxisKeyEvent:"/Script/BlueprintGraph.K2Node_InputAxisKeyEvent",inputDebugKey:"/Script/InputBlueprintNodes.K2Node_InputDebugKey",inputKey:"/Script/BlueprintGraph.K2Node_InputKey",inputVectorAxisEvent:"/Script/BlueprintGraph.K2Node_InputVectorAxisEvent",isValid:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:IsValid",kismetArrayLibrary:"/Script/Engine.KismetArrayLibrary",kismetMathLibrary:"/Script/Engine.KismetMathLibrary",knot:"/Script/BlueprintGraph.K2Node_Knot",linearColor:"/Script/CoreUObject.LinearColor",literal:"/Script/BlueprintGraph.K2Node_Literal",macro:"/Script/BlueprintGraph.K2Node_MacroInstance",makeArray:"/Script/BlueprintGraph.K2Node_MakeArray",makeMap:"/Script/BlueprintGraph.K2Node_MakeMap",makeSet:"/Script/BlueprintGraph.K2Node_MakeSet",makeStruct:"/Script/BlueprintGraph.K2Node_MakeStruct",materialExpressionComponentMask:"/Script/Engine.MaterialExpressionComponentMask",materialExpressionConstant:"/Script/Engine.MaterialExpressionConstant",materialExpressionConstant2Vector:"/Script/Engine.MaterialExpressionConstant2Vector",materialExpressionConstant3Vector:"/Script/Engine.MaterialExpressionConstant3Vector",materialExpressionConstant4Vector:"/Script/Engine.MaterialExpressionConstant4Vector",materialExpressionFunctionInput:"/Script/Engine.MaterialExpressionFunctionInput",materialExpressionLogarithm:"/Script/InterchangeImport.MaterialExpressionLogarithm",materialExpressionLogarithm10:"/Script/Engine.MaterialExpressionLogarithm10",materialExpressionLogarithm2:"/Script/Engine.MaterialExpressionLogarithm2",materialExpressionMaterialFunctionCall:"/Script/Engine.MaterialExpressionMaterialFunctionCall",materialExpressionSquareRoot:"/Script/Engine.MaterialExpressionSquareRoot",materialExpressionSubtract:"/Script/Engine.MaterialExpressionSubtract",materialExpressionTextureCoordinate:"/Script/Engine.MaterialExpressionTextureCoordinate",materialExpressionTextureSample:"/Script/Engine.MaterialExpressionTextureSample",materialExpressionWorldPosition:"/Script/Engine.MaterialExpressionWorldPosition",materialGraphNode:"/Script/UnrealEd.MaterialGraphNode",materialGraphNodeComment:"/Script/UnrealEd.MaterialGraphNode_Comment",metasoundEditorGraphExternalNode:"/Script/MetasoundEditor.MetasoundEditorGraphExternalNode",multiGate:"/Script/BlueprintGraph.K2Node_MultiGate",niagaraBool:"/Script/Niagara.NiagaraBool",niagaraClipboardContent:"/Script/NiagaraEditor.NiagaraClipboardContent",niagaraDataInterfaceCollisionQuery:"/Script/Niagara.NiagaraDataInterfaceCollisionQuery",niagaraDataInterfaceCurlNoise:"/Script/Niagara.NiagaraDataInterfaceCurlNoise",niagaraDataInterfaceVolumeTexture:"/Script/Niagara.NiagaraDataInterfaceVolumeTexture",niagaraFloat:"/Script/Niagara.NiagaraFloat",niagaraInt32:"/Script/Niagara.NiagaraInt32",niagaraNodeConvert:"/Script/NiagaraEditor.NiagaraNodeConvert",niagaraNodeFunctionCall:"/Script/NiagaraEditor.NiagaraNodeFunctionCall",niagaraNodeInput:"/Script/NiagaraEditor.NiagaraNodeInput",niagaraNodeOp:"/Script/NiagaraEditor.NiagaraNodeOp",niagaraParameterMap:"/Script/Niagara.NiagaraParameterMap",niagaraPosition:"/Script/Niagara.NiagaraPosition",pawn:"/Script/Engine.Pawn",pcgEditorGraphNode:"/Script/PCGEditor.PCGEditorGraphNode",pcgEditorGraphNodeInput:"/Script/PCGEditor.PCGEditorGraphNodeInput",pcgEditorGraphNodeOutput:"/Script/PCGEditor.PCGEditorGraphNodeOutput",pcgHiGenGridSizeSettings:"/Script/PCG.PCGHiGenGridSizeSettings",pcgSubgraphSettings:"/Script/PCG.PCGSubgraphSettings",promotableOperator:"/Script/BlueprintGraph.K2Node_PromotableOperator",quat4f:"/Script/CoreUObject.Quat4f",removeDelegate:"/Script/BlueprintGraph.K2Node_RemoveDelegate",reverseForEachLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ReverseForEachLoop",rotator:"/Script/CoreUObject.Rotator",select:"/Script/BlueprintGraph.K2Node_Select",self:"/Script/BlueprintGraph.K2Node_Self",slateBlueprintLibrary:"/Script/UMG.SlateBlueprintLibrary",spawnActorFromClass:"/Script/BlueprintGraph.K2Node_SpawnActorFromClass",switchEnum:"/Script/BlueprintGraph.K2Node_SwitchEnum",switchGameplayTag:"/Script/GameplayTagsEditor.GameplayTagsK2Node_SwitchGameplayTag",switchInteger:"/Script/BlueprintGraph.K2Node_SwitchInteger",switchName:"/Script/BlueprintGraph.K2Node_SwitchName",switchString:"/Script/BlueprintGraph.K2Node_SwitchString",timeline:"/Script/BlueprintGraph.K2Node_Timeline",timeManagementBlueprintLibrary:"/Script/TimeManagement.TimeManagementBlueprintLibrary",transform:"/Script/CoreUObject.Transform",userDefinedEnum:"/Script/Engine.UserDefinedEnum",variableGet:"/Script/BlueprintGraph.K2Node_VariableGet",variableSet:"/Script/BlueprintGraph.K2Node_VariableSet",vector:"/Script/CoreUObject.Vector",vector2D:"/Script/CoreUObject.Vector2D",vector2f:"/Script/CoreUObject.Vector2f",vector3f:"/Script/CoreUObject.Vector3f",vector4f:"/Script/CoreUObject.Vector4f",whileLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:WhileLoop"};static pinInputWrapWidth=145;static removeEventName="ueb-element-delete";static scale={[-12]:.133333,[-11]:.166666,[-10]:.2,[-9]:.233333,[-8]:.266666,[-7]:.3,[-6]:.333333,[-5]:.375,[-4]:.5,[-3]:.675,[-2]:.75,[-1]:.875,0:1,1:1.25,2:1.375,3:1.5,4:1.675,5:1.75,6:1.875,7:2};static smoothScrollTime=1e3;static stringEscapedCharacters=/["\\]/g;static subObjectAttributeNamePrefix="#SubObject";static subObjectAttributeNameFromEntity=(e,t=!1)=>this.subObjectAttributeNamePrefix+(!t&&e.Class?`_${e.Class.type}`:"")+"_"+e.Name;static subObjectAttributeNameFromReference=(e,t=!1)=>this.subObjectAttributeNamePrefix+(t?"":"_"+e.type)+"_"+e.path;static subObjectAttributeNameFromName=e=>this.subObjectAttributeNamePrefix+"_"+e;static switchTargetPattern=/\/Script\/[\w\.\/\:]+K2Node_Switch([A-Z]\w+)+/;static trackingMouseEventName={begin:"ueb-tracking-mouse-begin",end:"ueb-tracking-mouse-end"};static unescapedBackslash=/(?<=(?:[^\\]|^)(?:\\\\)*)\\(?!\\)/;static windowApplyEventName="ueb-window-apply";static windowApplyButtonText="OK";static windowCancelEventName="ueb-window-cancel";static windowCancelButtonText="Cancel";static windowCloseEventName="ueb-window-close";static CommonEnums={[this.paths.eAttachmentRule]:["KeepRelative","KeepWorld","SnapToTarget"],[this.paths.eDrawDebugTrace]:["None","ForOneFrame","ForDuration","Persistent"],[this.paths.eMaterialSamplerType]:["Color","Grayscale","Alpha","Normal","Masks","Distance Field Font","Linear Color","Linear Grayscale","Data","External","Virtual Color","Virtual Grayscale","Virtual Alpha","Virtual Normal","Virtual Mask","Virtual Linear Color","Virtual Linear Grayscal"],[this.paths.eNiagara_Float4Channel]:[["NewEnumerator0","R"],["NewEnumerator1","G"],["NewEnumerator2","B"],["NewEnumerator3","A"]],[this.paths.eSamplerSourceMode]:["From texture asset","Shared: Wrap","Shared: Clamp","Hidden"],[this.paths.eSearchCase]:["CaseSensitive","IgnoreCase"],[this.paths.eWorldPositionIncludedOffsets]:["Absolute World Position (Including Material Shader Offsets)","Absolute World Position (Excluding Material Shader Offsets)","Camera Relative World Position (Including Material Shader Offsets)","Camera Relative World Position (Excluding Material Shader Offsets)"],[this.paths.eSearchDir]:["FromStart","FromEnd"],[this.paths.eSpawnActorCollisionHandlingMethod]:[["Undefined","Default"],["AlwaysSpawn","Always Spawn, Ignore Collisions"],["AdjustIfPossibleButAlwaysSpawn","Try To Adjust Location, But Always Spawn"],["AdjustIfPossibleButDontSpawnIfColliding","Try To Adjust Location, Don't Spawn If Still Colliding"],["DontSpawnIfColliding","Do Not Spawn"]],[this.paths.eTextureMipValueMode]:["None (use computed mip level)","MipLevel (absolute, 0 is full resolution)","MipBias (relative to the computed mip level)","Derivative (explicit derivative to compute mip level)"],[this.paths.eTraceTypeQuery]:[["TraceTypeQuery1","Visibility"],["TraceTypeQuery2","Camera"]]};static ModifierKeys=["Ctrl","Shift","Alt","Meta"];static rgba=["R","G","B","A"];static Keys={Backspace:"Backspace",Tab:"Tab",LeftControl:"ControlLeft",RightControl:"ControlRight",LeftShift:"ShiftLeft",RightShift:"ShiftRight",LeftAlt:"AltLeft",RightAlt:"AltRight",Enter:"Enter",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Space:"Space",PageUp:"PageUp",PageDown:"PageDown",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",PrintScreen:"PrintScreen",Insert:"Insert",Delete:"Delete",Zero:"Digit0",One:"Digit1",Two:"Digit2",Three:"Digit3",Four:"Digit4",Five:"Digit5",Six:"Digit6",Seven:"Digit7",Eight:"Digit8",Nine:"Digit9",A:"KeyA",B:"KeyB",C:"KeyC",D:"KeyD",E:"KeyE",F:"KeyF",G:"KeyG",H:"KeyH",I:"KeyI",K:"KeyK",L:"KeyL",M:"KeyM",N:"KeyN",O:"KeyO",P:"KeyP",Q:"KeyQ",R:"KeyR",S:"KeyS",T:"KeyT",U:"KeyU",V:"KeyV",W:"KeyW",X:"KeyX",Y:"KeyY",Z:"KeyZ",NumPadZero:"Numpad0",NumPadOne:"Numpad1",NumPadTwo:"Numpad2",NumPadThree:"Numpad3",NumPadFour:"Numpad4",NumPadFive:"Numpad5",NumPadSix:"Numpad6",NumPadSeven:"Numpad7",NumPadEight:"Numpad8",NumPadNine:"Numpad9",Multiply:"NumpadMultiply",Add:"NumpadAdd",Subtract:"NumpadSubtract",Decimal:"NumpadDecimal",Divide:"NumpadDivide",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",NumLock:"NumLock",ScrollLock:"ScrollLock"}}class ae{static clamp(e,t=-1/0,i=1/0){return Math.min(Math.max(e,t),i)}static getScale(e){const t=e.blueprint?.getScale()??getComputedStyle(e).getPropertyValue("--ueb-scale");return""!=t?parseFloat(t):1}static minDecimals(e,t=1,i=1e-8){const s=e*10**t;return Math.abs(s%1)>i?e.toString():e.toFixed(t)}static roundDecimals(e,t=1){const i=10**t;return Math.round(e*i)/i}static printExponential(e){if(e==Number.POSITIVE_INFINITY)return"inf";if(e==Number.NEGATIVE_INFINITY)return"-inf";const t=Math.round(e);if(t>=1e3){const i=Math.floor(Math.log10(t));return`${Math.round(e/10**(i-2))/100}e+${i<10?"0":""}${i}`}return 0==Math.floor(e)?e.toString():this.roundDecimals(e,Math.max(0,3-Math.floor(e).toString().length)).toString()}static approximatelyEqual(e,t,i=1e-8){return!(Math.abs(e-t)>i)}static convertLocation(e,t,i=!1){const s=i?1:1/ae.getScale(t),n=t.getBoundingClientRect();return[Math.round((e[0]-n.x)*s),Math.round((e[1]-n.y)*s)]}static isSerialized(e,t){return e.attributes?.[t]?.serialized??e.constructor.attributes?.[t]?.serialized??!1}static objectGet(e,t,i=void 0){if(void 0!==e){if(!(t instanceof Array))throw new TypeError("UEBlueprint: Expected keys to be an array");return 0!=t.length&&t[0]in e&&void 0!==e[t[0]]?1==t.length?e[t[0]]:ae.objectGet(e[t[0]],t.slice(1),i):i}}static objectSet(e,t,i,s=Object){if(!(t instanceof Array))throw new TypeError("Expected keys to be an array.");if(1==t.length){if(t[0]in e||void 0===e[t[0]])return e[t[0]]=i,!0}else if(t.length>0)return e[t[0]]instanceof Object||(e[t[0]]=new s),ae.objectSet(e[t[0]],t.slice(1),i,s);return!1}static snapToGrid(e,t,i){return 1===i?[e,t]:[i*Math.floor(e/i),i*Math.floor(t/i)]}static mergeArrays(e=[],t=[],i=(e,t)=>e==t,s=e=>{}){let n=[];e=[...e],t=[...t];e:for(;;){for(let r=0;r(s(e),e))),...e.splice(0,1)),t.shift();continue e}break e}return n.push(...e),n.push(...t.filter((e=>!n.some((t=>i(t,e)))))),n}static escapeNewlines(e){return e.replaceAll("\n","\\n").replaceAll("\t","\\t")}static escapeString(e,t=!0){let i=e.replaceAll(new RegExp(`(${re.stringEscapedCharacters.source})`,"g"),"\\$1");return t&&(i=i.replaceAll("\n","\\n").replaceAll("\t","\\t")),i}static unescapeString(e){return e.replaceAll(new RegExp(re.unescapedBackslash.source+"t","g"),"\t").replaceAll(new RegExp(re.unescapedBackslash.source+"n","g"),"\n").replaceAll(new RegExp(`\\\\(${re.stringEscapedCharacters.source})`,"g"),"$1")}static clearHTMLWhitespace(e){return e.replaceAll(" "," ").replaceAll(/|
/g,"\n").replaceAll(/(\)/g,"")}static encodeHTMLWhitespace(e){return e.replaceAll(" "," ")}static capitalFirstLetter(e){return 0===e.length?e:e.charAt(0).toUpperCase()+e.slice(1)}static formatStringName(e=""){return e.replace(/^\s*b(?=[A-Z])/,"").replaceAll(re.nameRegexSpaceReplacement," ").trim().split(" ").map((e=>ae.capitalFirstLetter(e))).join(" ")}static getIdFromReference(e){return e.replace(/(?:.+\.)?([^\.]+)$/,"$1").replaceAll(/(?<=[a-z\d])(?=[A-Z])|(?<=[a-zA-Z])(?=\d)|(?<=[A-Z]{2})(?=[A-Z][a-z])/g,"-").toLowerCase()}static getNameFromPath(e,t=!1){const i=t?/([^\.\/]+?)(?:_\d+)$/:/([^\.\/]+)$/;return e.match(i)?.[1]??""}static getPolarCoordinates(e,t,i=!1){let s=Math.atan2(t,e);return i&&s<0&&(s=2*Math.PI+s),[Math.sqrt(e*e+t*t),s]}static getCartesianCoordinates(e,t){return[e*Math.cos(t),e*Math.sin(t)]}static range(e=0,t=0,i=(t>=e?1:-1)){return Array.from({length:Math.ceil((t-e)/i)},((t,s)=>e+s*i))}static getFirstWordOrder(e){return new RegExp(/\s*/.source+e.join(/[^\n]+\n\s*/.source)+/\s*/.source)}static paste(e,t){const i=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0,clipboardData:new DataTransfer});i.clipboardData.setData("text",t),e.dispatchEvent(i)}static async copy(e){const t=new ClipboardEvent("copy",{bubbles:!0,cancelable:!0,clipboardData:new DataTransfer});e.dispatchEvent(t)}static animate(e,t,i,s,n=e=>{},r=e=>{const t=e**3.5;return t/(t+(1-e)**3.5)}){let a;const o=l=>{void 0===a&&(a=l);let c=(l-a)/i;ae.approximatelyEqual(c,1)||c>1?c=1:n(requestAnimationFrame(o));const u=e+(t-e)*r(c);s(u)};n(requestAnimationFrame(o))}}class oe extends se{#e;get blueprint(){return this.#e}set blueprint(e){this.#e=e}#t;get entity(){return this.#t}set entity(e){this.#t=e}#i;get template(){return this.#i}isInitialized=!1;isSetup=!1;inputObjects=[];initialize(e,t){this.requestUpdate(),this.#t=e,this.#i=t,this.#i.initialize(this),this.isConnected&&this.updateComplete.then((()=>this.setup())),this.isInitialized=!0}connectedCallback(){super.connectedCallback(),this.blueprint=this.closest("ueb-blueprint"),this.isInitialized&&(this.requestUpdate(),this.updateComplete.then((()=>this.setup())))}disconnectedCallback(){super.disconnectedCallback(),this.isSetup&&this.updateComplete.then((()=>this.cleanup())),this.acknowledgeDelete()}createRenderRoot(){return this}setup(){this.template.setup(),this.isSetup=!0}cleanup(){this.template.cleanup(),this.isSetup=!1}willUpdate(e){super.willUpdate(e),this.template.willUpdate(e)}update(e){super.update(e),this.template.update(e)}render(){return this.template.render()}firstUpdated(e){super.firstUpdated(e),this.template.firstUpdated(e),this.template.inputSetup()}updated(e){super.updated(e),this.template.updated(e)}acknowledgeDelete(){let e=new CustomEvent(re.removeEventName);this.dispatchEvent(e)}isSameGraph(e){return this.blueprint&&this.blueprint==e?.blueprint}}class le{static arrayPin=R``;static branchNode=R``;static breakStruct=R``;static cast=R``;static close=R``;static convert=R``;static correct=R``;static delegate=R``;static doN=R``;static doOnce=R``;static enum=R``;static event=R``;static execPin=R``;static expandIcon=R``;static flipflop=R``;static forEachLoop=R``;static functionSymbol=R``;static gamepad=R``;static genericPin=R``;static keyboard=R``;static loop=R``;static macro=R``;static mapPin=R``;static makeArray=R``;static makeMap=R``;static makeSet=R``;static makeStruct=R``;static metasoundFunction=R``;static mouse=R``;static node=R``;static operationPin=R``;static pcgStackPin=R``;static pcgPin=R``;static pcgParamPin=R``;static pcgSpatialPin=R``;static plusCircle=R``;static questionMark=R``;static referencePin=R``;static reject=R``;static setPin=R``;static select=R``;static sequence=R``;static sound=R``;static spawnActor=R``;static staticPin=R``;static switch=R``;static timer=R``;static touchpad=R``}class ce{static makeSuccess(e,t,i=null,s=0){return{status:!0,value:t,position:e,bestParser:i,bestPosition:s}}static makeFailure(e=0,t=null,i=0){return{status:!1,value:null,position:e,bestParser:t,bestPosition:i}}static makeContext(e=null,t=""){return{parsernostrum:e,input:t,highlighted:null}}static makePathNode(e,t=0,i=null){return{parent:i,current:e,index:t}}}class ue{static indentation=" ";static highlight="Last valid parser";Self;static frame(e,t="",i=""){t=e?"[ "+t+" ]":"";let s=e.split("\n");const n=Math.max(...s.map((e=>e.length))),r=n";const n=this.isVisited(i),r=this.isHighlighted(e,i);let a=n?"<...>":this.doToString(e,r?"":t,i,s);return r&&(a=ue.frame(a,ue.highlight,t)),a}doToString(e,t,i,s){return`${this.constructor.name} does not implement toString()`}}class he extends ue{#s;get value(){return this.#s}constructor(e){super(),this.#s=e}parse(e,t,i,s){i=this.makePath(i,s);const n=t+this.#s.length,r=e.input.substring(t,n);return this.#s===r?ce.makeSuccess(n,this.#s,i,n):ce.makeFailure()}doToString(e,t,i,s){return`"${this.value.replaceAll("\n","\\n").replaceAll('"','\\"')}"`}}class pe extends ue{static instance=new pe;parse(e,t,i,s){return i=this.makePath(i,s),ce.makeSuccess(t,"",i,0)}doToString(e,t,i,s){return""}}class de extends ue{#n;get parsers(){return this.#n}constructor(...e){super(),this.#n=e}parse(e,t,i,s){i=this.makePath(i,s);const n=ce.makeSuccess(0,"");for(let s=0;sn.bestPosition&&(n.bestParser=r.bestParser,n.bestPosition=r.bestPosition),r.status)return n.value=r.value,n.position=r.position,n}return n.status=!1,n.value=null,n}doToString(e,t,i,s){if(2===this.#n.length&&this.#n[1]instanceof pe){let s=this.#n[0].toString(e,t,i,0);return this.#n[0]instanceof he||(s="<"+s+">"),s+="?",s}const n=t+ue.indentation;let r="ALT<\n"+n+this.#n.map(((t,s)=>t.toString(e,n+" ".repeat(0===s?0:ue.indentation.length-2),i,s))).join("\n"+n+"| ")+"\n"+t+">";return r}}class me extends ue{#r;get parser(){return this.#r}#a;constructor(e,t){super(),this.#r=e,this.#a=t}parse(e,t,i,s){i=this.makePath(i,s);const n=this.#r.parse(e,t,i,0);if(!n.status)return n;const r=this.#a(n.value,e.input,n.position).getParser().parse(e,n.position,i,0);return n.bestPosition>r.bestPosition&&(r.bestParser=n.bestParser,r.bestPosition=n.bestPosition),r}doToString(e,t,i,s){return this.#r.toString(e,t,i,0)+" => chained"}}class ge extends ue{static instance=new ge;parse(e,t,i,s){return ce.makeFailure()}doToString(e,t,i,s){return""}}class be extends ue{#r;get parser(){return this.#r}#o="";constructor(e,t){super(),this.#r=e,this.#o=t}makePath(e,t){return e}parse(e,t,i,s){return this.parse=this.#r.parse.bind(this.#r),this.parse(e,t,i,s)}doToString(e,t,i,s){let n=this.#r.toString(e,"",i,s);return n=ue.frame(n,this.#o,t),n}}class ve extends ue{#r;#l;constructor(e){super(),this.#r=e}makePath(e,t){return e}isHighlighted(e,t){if(super.isHighlighted(e,t)){const i={parent:t,parser:this.#l,index:0};e.highlighted=e.highlighted instanceof ue?this.#l:i}return!1}resolve(){return this.#l||(this.#l=this.#r().getParser()),this.#l}parse(e,t,i,s){return this.resolve(),this.parse=this.#l.parse.bind(this.#l),this.parse(e,t,i,s)}doToString(e,t,i,s){return this.resolve(),this.doToString=this.#l.toString.bind(this.#l),this.doToString(e,t,i,s)}}class fe extends ue{#r;get parser(){return this.#r}#c;get type(){return this.#c}static Type={NEGATIVE_AHEAD:"?!",NEGATIVE_BEHIND:"?String.raw`[^${e}\\]*(?:\\.[^${e}\\]*)*`;static#m=/[-\+]?(?:\d*\.)?\d+/;static common={number:new RegExp(this.#m.source+String.raw`(?!\.)`),numberInteger:/[\-\+]?\d+(?!\.\d)/,numberNatural:/\d+/,numberExponential:new RegExp(this.#m.source+String.raw`(?:[eE][\+\-]?\d+)?(?!\.)`),numberUnit:/\+?(?:0(?:\.\d+)?|1(?:\.0+)?)(?![\.\d])/,numberByte:/0*(?:25[0-5]|2[0-4]\d|1?\d?\d)(?!\d|\.)/,whitespace:/\s+/,whitespaceOpt:/\s*/,whitespaceInline:/[^\S\n]+/,whitespaceInlineOpt:/[^\S\n]*/,whitespaceMultiline:/\s*?\n\s*/,doubleQuotedString:new RegExp(`"(${this.#d('"')})"`),singleQuotedString:new RegExp(`'(${this.#d("'")})'`),backtickQuotedString:new RegExp("`("+this.#d("`")+")`")};constructor(e,t){super(),this.#u=e,this.#h=new RegExp(`^(?:${e.source})`,e.flags),this.#p=t}parse(e,t,i,s){i=this.makePath(i,s);const n=this.#h.exec(e.input.substring(t));n&&(t+=n[0].length);return n?ce.makeSuccess(t,this.#p(n),i,t):ce.makeFailure()}doToString(e,t,i,s){let n="/"+this.#u.source+"/";const r=Object.entries(ye.common).find((([e,t])=>t.source===this.#u.source))?.[0];return r&&(n="P."+r),n}}class we extends ue{#r;get parser(){return this.#r}#g;get mapper(){return this.#g}constructor(e,t){super(),this.#r=e,this.#g=t}isHighlighted(e,t){if(super.isHighlighted(e,t)){const i={parent:t,parser:this.#r,index:0};e.highlighted=e.highlighted instanceof ue?this.#r:i}return!1}parse(e,t,i,s){i=this.makePath(i,s);const n=this.#r.parse(e,t,i,0);return n.status&&(n.value=this.#g(n.value)),n}doToString(e,t,i,s){let n=this.#r.toString(e,t,i,0);if(this.#r instanceof ye&&Object.values(ye.common).includes(this.#r.regexp))return this.#r.regexp===ye.common.numberInteger&&this.#g===BigInt?"P.numberBigInteger":n;let r=this.#g.toString();return(r.length>60||r.includes("\n"))&&(r="(...) => { ... }"),n+=` -> map<${r}>`,n}}class Se extends ye{static#g=e=>e;constructor(e){super(e,Se.#g)}}class Ee extends ye{constructor(e,t=0){super(e,(e=>e[t]))}}class Ce extends ue{#n;get parsers(){return this.#n}constructor(...e){super(),this.#n=e}parse(e,t,i,s){i=this.makePath(i,s);const n=new Array(this.#n.length),r=ce.makeSuccess(t,n);for(let t=0;tr.bestPosition&&(r.bestParser=s.bestParser,r.bestPosition=s.bestPosition),!s.status){r.status=!1,r.value=null;break}r.value[t]=s.value,r.position=s.position}return r}doToString(e,t,i,s){const n=t+ue.indentation,r="SEQ<\n"+n+this.#n.map(((t,s)=>t.toString(e,n,i,s))).join("\n"+n)+"\n"+t+">";return r}}class Ne extends ue{#r;get parser(){return this.#r}#b;get min(){return this.#b}#v;get max(){return this.#v}constructor(e,t=0,i=Number.POSITIVE_INFINITY){if(super(),t>i)throw new Error("Min is greater than max");this.#r=e,this.#b=t,this.#v=i}parse(e,t,i,s){i=this.makePath(i,s);const n=ce.makeSuccess(t,[],i);for(let t=0;tn.bestPosition&&(n.bestParser=s.bestParser,n.bestPosition=s.bestPosition),!s.status){te;static#y=([e,t])=>t;static#w=([e,t])=>[e,...t];static#S=e=>e instanceof Array?e.join(""):e;static number=this.reg(ye.common.number).map(Number);static numberInteger=this.reg(ye.common.numberInteger).map(Number);static numberBigInteger=this.reg(this.numberInteger.getParser().parser.regexp).map(BigInt);static numberNatural=this.reg(ye.common.numberNatural).map(Number);static numberExponential=this.reg(ye.common.numberExponential).map(Number);static numberUnit=this.reg(ye.common.numberUnit).map(Number);static numberByte=this.reg(ye.common.numberByte).map(Number);static whitespace=this.reg(ye.common.whitespace);static whitespaceOpt=this.reg(ye.common.whitespaceOpt);static whitespaceInline=this.reg(ye.common.whitespaceInline);static whitespaceInlineOpt=this.reg(ye.common.whitespaceInlineOpt);static whitespaceMultiline=this.reg(ye.common.whitespaceMultiline);static doubleQuotedString=this.reg(ye.common.doubleQuotedString,1);static singleQuotedString=this.reg(ye.common.singleQuotedString,1);static backtickQuotedString=this.reg(ye.common.backtickQuotedString,1);constructor(e,t=!1){this.#r=e}static#E(e){const t=[];for(;e;)t.push(e),e=e.parent;t.reverse();let i=new Map;for(let e=1;ei<=s||i>e))),i.set(t[e].current,s),t.splice(s+1,e-s),e=s):i.set(t[e].current,e)}return t[t.length-1]}getParser(){return this.#r}run(e){const t=this.#r.parse(ce.makeContext(this,e),0,ce.makePathNode(),0);return t.position!==e.length&&(t.status=!1),t}parse(e,t=!0){const i=this.run(e);if(i.status)return i.value;const s=[Math.ceil(30),Math.floor(30)],n=xe.lineColumnFromOffset(e,i.bestPosition);let r=i.bestPosition;const a=e.replaceAll(/^(\s)+|\s{6,}|\s*?\n\s*/g,((e,t,s)=>{let n=t?"...":" ... ";return s<=i.bestPosition&&(i.bestPosition0&&(u="..."+u,c+=3),s[1]e.getParser()))))}static alt(...e){return new this(new de(...e.map((e=>e.getParser()))))}static lookahead(e){return new this(new fe(e.getParser(),fe.Type.POSITIVE_AHEAD))}static lazy(e){return new this(new ve(e))}times(e,t=e){return new xe(new Ne(this.#r,e,t))}many(){return this.times(0,Number.POSITIVE_INFINITY)}atLeast(e){return this.times(e,Number.POSITIVE_INFINITY)}atMost(e){return this.times(0,e)}opt(e=""){let t=xe.success();return""!==e&&(t=t.map((()=>e))),xe.alt(this,t)}sepBy(e,t=1,i=!1){let s=xe.seq(this,xe.seq(e,this).map(xe.#y).atLeast(t-1),...i?[e.opt([])]:[]).map(xe.#w);return 0===t&&(s=s.opt([])),s}skipSpace(){return xe.seq(this,xe.whitespaceOpt).map(xe.#f)}map(e){return new xe(new we(this.#r,e))}chain(e){return new xe(new me(this.#r,e))}assert(e){return this.chain(((t,i,s)=>e(t,i,s)?xe.success().map((()=>t)):xe.failure()))}join(e=""){return this.map(xe.#S)}label(e=""){return new xe(new be(this.#r,e))}toString(e="",t=!1,i=null){i instanceof xe&&(i=i.getParser());const s=ce.makeContext(this,"");s.highlighted=i;const n=ce.makePathNode();return(t?"\n"+e:"")+this.#r.toString(s,e,n)}}class Pe{static same=e=>e;static notWrapped=(e,t)=>t;static defaultWrapped=(e,t)=>`${e.#C}(${t})`;static wrap=this.defaultWrapped;static attributeSeparator=",";static keySeparator="=";static printKey=e=>e;static grammar=xe.lazy((()=>this.createGrammar()));static unknownEntityGrammar;static unknownEntity;static attributes={};static lookbehind="";static default;static nullable=!1;static ignored=!1;static serialized=!1;static expected=!1;static inlined=!1;static quoted;static silent=!1;static trailing=!1;#N;get keys(){return this.#N??Object.keys(this)}set keys(e){this.#N=[...new Set(e)]}#C=this.constructor.lookbehind;get lookbehind(){return this.#C.trim()}set lookbehind(e){this.#C=e}#x=this.constructor.ignored;get ignored(){return this.#x}set ignored(e){this.#x=e}#P=this.constructor.inlined;get inlined(){return this.#P}set inlined(e){this.#P=e}#k;get quoted(){return this.#k??this.constructor.quoted??!1}set quoted(e){this.#k=e}#A;get trailing(){return this.#A??this.constructor.trailing??!1}set trailing(e){this.#A=e}constructor(e={}){const t=this.constructor.attributes,i=ae.mergeArrays(Object.keys(e),Object.entries(t).filter((([e,t])=>void 0!==t.default)).map((([e,t])=>e)));for(const s of i){if(void 0!==e[s]){e[s].constructor===Object&&(e[s]=new(void 0!==t[s]?t[s]:Pe.unknownEntity)(e[s]));const i=t[s];if(this[s]=e[s],i?.compute){const t=i.compute(this).grammar.run(e[s].toString());t.status&&(this[s]=t.value)}continue}const i=t[s];void 0===i.default||(this[s]=i.default(i))}}static createGrammar(){return this.unknownEntityGrammar}static actualClass(){let e=this;for(;!e.name;)e=Object.getPrototypeOf(e);return e}static className(){return this.actualClass().name}static asUniqueClass(e=!1){let t=this;return(this.name.length||e)&&(t=class extends(this){},t.grammar=t.createGrammar()),t}static withLookbehind(e){const t=this.asUniqueClass();return t.lookbehind=e,t}static withDefault(e=e=>new e){const t=this.asUniqueClass();return t.default=e,t}static flagNullable(e=!0){const t=this.asUniqueClass();return t.nullable=e,t}static flagIgnored(e=!0){const t=this.asUniqueClass();return t.ignored=e,t}static flagSerialized(e=!0){const t=this.asUniqueClass();return t.serialized=e,t}static flagInlined(e=!0){const t=this.asUniqueClass();return t.inlined=e,t}static flagQuoted(e=!0){const t=this.asUniqueClass();return t.quoted=e,t}static flagSilent(e=!0){const t=this.asUniqueClass();return t.silent=e,t}static flagTrailing(e=!0){const t=this.asUniqueClass();return t.trailing=e,t}static asSerializedString(e){return`"${e.replaceAll(/(?<=(?:[^\\]|^)(?:\\\\)*?)"/g,'\\"')}"`}showProperty(e){let t=this[e];const i=t.constructor;if(i.silent&&void 0!==i.default){void 0===i["#default"]&&(i["#default"]=i.default(i));const e=i["#default"];return!t.equals(e)}return!0}listenAttribute(e,t){const i=Object.getOwnPropertyDescriptor(this,e),s=i.set;s?(i.set=e=>{s(e),t(e)},Object.defineProperties(this,{[e]:i})):i.value&&Object.defineProperties(this,{["#"+e]:{value:i.value,writable:!0,enumerable:!1},[e]:{enumerable:!0,get(){return this["#"+e]},set(i){t(i),this["#"+e]=i}}})}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,n=i.keySeparator,r=i.attributeSeparator,a=i.wrap){const o=i!==this.constructor;let l="",c=!0;const u=this instanceof Pe?this.keys:Object.keys(this);for(const a of u){const o=this[a],u=o?.constructor;if(void 0===o||this instanceof Pe&&!this.showProperty(a))continue;c?c=!1:l+=r;let h=this instanceof Array?`(${a})`:a;if(h.length&&(i.attributes[a]?.quoted||o.quoted)&&(h=`"${h}"`),o.inlined){const a="ArrayEntity"===u.className()?e=>s(`${h}${e}`):e=>s(`${h}.${e}`);l+=o.serialize(e,t,void 0,a,n,r,i.notWrapped);continue}h=s(h),h.length&&(l+=(r.includes("\n")?t:"")+h+n);let p=o?.serialize(e,t);l+=p}return this instanceof Pe&&(o&&i.trailing||this.trailing)&&l.length&&(l+=r),a(this,l)}serialize(e=!1,t="",i=this.constructor,s=i.printKey,n=i.keySeparator,r=i.attributeSeparator,a=i.wrap){this.constructor;let o=this instanceof Array?Pe.prototype.doSerialize.bind(this)(e,t,i,s,n,r,a):this.doSerialize(e,t,i,s,n,r,a);return i.serialized&&(o=Pe.asSerializedString(o)),o}equals(e){if(!(e instanceof Pe))return!1;const t=Object.keys(this),i=Object.keys(e),s=this.constructor.actualClass(),n=e.constructor.actualClass();if(!(t.length===i.length&&this.lookbehind==e.lookbehind&&(e instanceof s||this instanceof n)))return!1;for(let s=0;s{},toAttribute:(e,t)=>!0===e?"true":!1===e?"false":""};#L=!0;get uppercase(){return this.#L}set uppercase(e){this.#L=e}static createGrammar(){return xe.regArray(/(true)|(True)|(false)|(False)/).map((e=>{const t=e[1]??e[2]?new this(!0):new this(!1);return t.uppercase=void 0!==(e[2]??e[4]),t})).label("BooleanEntity")}constructor(e=!1){super(),this.value=e}serialize(e=!1,t="",i=this.constructor){let s=this.value?this.#L?"True":"true":this.#L?"False":"false";return i.serialized&&(s=`"${s}"`),s}valueOf(){return this.value}}class Ae{static#M=new Map;static registerElement(e,t){Ae.#M.set(e,t)}static getConstructor(e){return Ae.#M.get(e)}}class Le extends Pe{static alternatives=[];static className(){let e=super.className();return this.alternatives.length&&(e+=".accepting("+this.alternatives.map((e=>e.className())).join(", ")+")"),e}static createGrammar(){const e=this.alternatives.map((e=>e.grammar));return 0==this.alternatives.length||e.includes(this.unknownEntityGrammar)?this.unknownEntityGrammar:xe.alt(...e)}static accepting(...e){const t=this.asUniqueClass();return t.alternatives=e,t.grammar=t.createGrammar(),t}}class Me{static numberRegexSource=xe.number.getParser().parser.regexp.source;static separatedBy=(e,t,i=1)=>new RegExp(e+"(?:"+t+e+")"+(1===i?"*":2===i?"+":`{${i},}`));static Regex=class{static HexDigit=/[0-9a-fA-F]/;static InsideString=/(?:[^"\\]|\\.)*/;static InsideSingleQuotedString=/(?:[^'\\]|\\.)*/;static Integer=/[\-\+]?\d+(?!\d|\.)/;static Number=/[-\+]?(?:\d*\.)?\d+(?!\d|\.)/;static RealUnit=/\+?(?:0(?:\.\d+)?|1(?:\.0+)?)(?![\.\d])/;static Word=Me.separatedBy("[a-zA-Z]","_");static Symbol=/[a-zA-Z_]\w*/;static DotSeparatedSymbols=Me.separatedBy(this.Symbol.source,"\\.");static MultipleWordsSymbols=Me.separatedBy(this.Symbol.source,"(?:\\.|\\ +)");static PathFragment=Me.separatedBy(this.Symbol.source,"[\\.:]");static PathSpaceFragment=Me.separatedBy(this.Symbol.source,"[\\.:\\ ]");static Path=new RegExp(`(?:\\/${this.PathFragment.source}){2,}`)};static null=xe.reg(/\(\s*\)/).map((()=>null));static true=xe.reg(/true/i).map((()=>!0));static false=xe.reg(/false/i).map((()=>!1));static number=xe.regArray(new RegExp(`(${xe.number.getParser().parser.regexp.source})|(\\+?inf)|(-inf)`)).map((([e,t,i,s])=>t?Number(t):i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY));static bigInt=xe.reg(new RegExp(xe.number.getParser().parser.regexp.source)).map(BigInt).map((e=>void 0!==e[2]?Number.POSITIVE_INFINITY:void 0!==e[3]?Number.NEGATIVE_INFINITY:Number(e[1])));static naturalNumber=xe.lazy((()=>xe.reg(/\d+/).map(Number)));static string=xe.doubleQuotedString.map((e=>ae.unescapeString(e)));static colorValue=xe.numberByte;static word=xe.reg(Me.Regex.Word);static symbol=xe.reg(Me.Regex.Symbol);static symbolQuoted=xe.reg(new RegExp('"('+Me.Regex.Symbol.source+')"'),1);static attributeName=xe.reg(Me.Regex.DotSeparatedSymbols);static attributeNameQuoted=xe.reg(new RegExp('"('+Me.Regex.InsideString.source+')"'),1);static guid=xe.reg(new RegExp(`${Me.Regex.HexDigit.source}{32}`));static commaSeparation=xe.reg(/\s*,\s*(?!\))/);static commaOrSpaceSeparation=xe.reg(/\s*,\s*(?!\))|\s+/);static equalSeparation=xe.reg(/\s*=\s*/);static hexColorChannel=xe.reg(new RegExp(Me.Regex.HexDigit.source+"{2}"));static getAttribute(e,[t,...i]){const s=e?.attributes?.[t];if(s){if(s.prototype instanceof Le)for(const e of s.alternatives){const t=this.getAttribute(e,i);if(t)return t}return i.length>0?this.getAttribute(s,i):s}}static createAttributeGrammar(e,t=this.attributeName,i=this.equalSeparation,s=(e,t,i)=>{}){return xe.seq(t,i).chain((([t,i])=>{const n=t.split(re.keysSeparator),r=this.getAttribute(e,n),a=r?r.grammar:Pe.unknownEntityGrammar,o=n.length>1;return a.map((e=>t=>{ae.objectSet(t,n,e),n.reduce(((e,t,i)=>(e[t].inlined=o&&i{let s={};return e.length&&(s.lookbehind=e),t.forEach((e=>e(s))),s.trailing=void 0!==i,s})).chain((t=>{(e.lookbehind instanceof Array||e.lookbehind!==n)&&(e=e.withLookbehind(n));const s=Object.keys(t),r=Object.keys(e.attributes);return null!=i?xe.success().assert((e=>s.filter((e=>r.includes(e))).length/r.length>=i)).map((()=>new e(t))):xe.success().map((()=>new e(t)))}))}}class Te extends Pe{static grammar=this.createGrammar();constructor(e=0){super(),this.value=e}static createGrammar(){return xe.number.map((e=>new this(e)))}serialize(e=!1,t="",i=this.constructor){let s=this.value.toFixed(6);return i.serialized&&(s=`"${s}"`),s}valueOf(){return this.value}toString(){return this.value.toString()}}class Ie extends Pe{static attributes={...super.attributes,R:Te.withDefault(),G:Te.withDefault(),B:Te.withDefault(),A:Te.withDefault((e=>new e(1)))};static grammar=this.createGrammar();#T=new Te;get H(){return this.#T}set H(e){this.#T=e}#I=new Te;get S(){return this.#I}set S(e){this.#I=e}#O=new Te;get V(){return this.#O}set V(e){this.#O=e}constructor(e){super(e),e instanceof Array&&(e={R:e[0]??0,G:e[1]??0,B:e[2]??0,A:e[3]??1}),this.R,this.G,this.B,this.A,this.#D()}static createGrammar(){return Me.createEntityGrammar(this,Me.commaSeparation,.5).label("LinearColorEntity")}static printLinearColor(e){return`${Math.round(255*e.R.valueOf())}, ${Math.round(255*e.G.valueOf())}, ${Math.round(255*e.B.valueOf())}`}static linearToSRGB(e){return e<=0?0:e>=1?1:e<.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}static sRGBtoLinear(e){return e<=0?0:e>=1?1:e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}static getWhite(){return new Ie({R:new Te(1),G:new Te(1),B:new Te(1)})}static getLinearColorFromHexGrammar(){const e=/[0-9a-fA-F]/;return xe.regArray(new RegExp("#("+e.source+"{2})("+e.source+"{2})("+e.source+"{2})("+e.source+"{2})?")).map((([e,t,i,s,n])=>new this({R:parseInt(t,16)/255,G:parseInt(i,16)/255,B:parseInt(s,16)/255,A:parseInt(n??"FF",16)/255})))}static getLinearColorRGBListGrammar(){return xe.seq(xe.numberByte,Me.commaSeparation,xe.numberByte,Me.commaSeparation,xe.numberByte).map((([e,t,i,s,n])=>new this({R:e/255,G:i/255,B:n/255,A:1})))}static getLinearColorRGBGrammar(){return xe.seq(xe.reg(/rgb\s*\(\s*/),this.getLinearColorRGBListGrammar(),xe.reg(/\s*\)/)).map((([e,t,i])=>t))}static getLinearColorRGBAGrammar(){return xe.seq(xe.reg(/rgba\s*\(\s*/),this.getLinearColorRGBListGrammar(),xe.reg(/\s*\)/)).map((([e,t,i])=>t))}static getLinearColorFromAnyFormat(){return xe.alt(this.getLinearColorFromHexGrammar(),this.getLinearColorRGBAGrammar(),this.getLinearColorRGBGrammar(),this.getLinearColorRGBListGrammar())}#D(){const e=this.R.value,t=this.G.value,i=this.B.value;if(ae.approximatelyEqual(e,t)&&ae.approximatelyEqual(e,i)&&ae.approximatelyEqual(t,i))return this.S.value=0,void(this.V.value=e);const s=Math.max(e,t,i),n=Math.min(e,t,i),r=s-n;let a;switch(s){case n:a=0;break;case e:a=(t-i)/r+(te.toString(16).toUpperCase().padStart(2,"0"))).join("")}toSRGBAString(){return this.toSRGBA().map((e=>e.toString(16).toUpperCase().padStart(2,"0"))).join("")}toHSVA(){return[this.H.value,this.S.value,this.V.value,this.A.value]}toNumber(){return(Math.round(255*this.R.value)<<24)+(Math.round(255*this.G.value)<<16)+(Math.round(255*this.B.value)<<8)+Math.round(255*this.A.value)}toArray(){return[this.R.value,this.G.value,this.B.value,this.A.value]}setFromRGBANumber(e){this.A.value=(255&e)/255,this.B.value=(e>>8&255)/255,this.G.value=(e>>16&255)/255,this.R.value=(e>>24&255)/255,this.#D()}setFromSRGBANumber(e){this.A.value=(255&e)/255,this.B.value=Ie.sRGBtoLinear((e>>8&255)/255),this.G.value=Ie.sRGBtoLinear((e>>16&255)/255),this.R.value=Ie.sRGBtoLinear((e>>24&255)/255),this.#D()}toString(){return Ie.printLinearColor(this)}}class Oe extends Pe{static type;constructor(e=null){super();const t=this.constructor;e??=void 0!==t.default?t.default(t).getter:e,this.getter=e}static createGrammar(e=this.type?.grammar??xe.lazy((()=>this.unknownEntityGrammar))){return this.type?.grammar.map((e=>new this((()=>e))))}static withDefault(e=e=>new e((()=>new e.type))){return super.withDefault(e)}static of(e){const t=this.asUniqueClass();return t.type=e,t.grammar=t.createGrammar(),t}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,n=i.keySeparator,r=i.attributeSeparator,a=i.wrap){return this.getter().serialize(e,t,i.type,s,n,r,a)}equals(e){return e instanceof Oe&&(e=e.getter?.()),this.getter?.().equals(e)}valueOf(){return this.getter().valueOf()}toString(){return this.getter().toString()}}class De extends Pe{static numberRegexSource=String.raw`${Me.numberRegexSource}(?<=(?:\.(\d*0+))?)`;static grammar=this.createGrammar();static precision;#$;get precision(){return this.constructor.precision??this.#$}set precision(e){this.#$=e}_value;get value(){return this._value}set value(e){-0===e&&(e=0),this._value=e}constructor(e=0,t=null){super(),this.value=Number(e),null!==t&&(this.#$=Number(t))}static createGrammar(){return xe.regArray(new RegExp(`(?${this.numberRegexSource})|(?\\+?inf)|(?-inf)`)).map((({2:e,groups:{n:t,posInf:i,negInf:s}})=>new this(t?Number(t):i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,e?.length))).label("NumberEntity")}static withPrecision(e=0){const t=this.asUniqueClass();return t.precision=e,t}static printNumber(e){return e==Number.POSITIVE_INFINITY?"inf":e==Number.NEGATIVE_INFINITY?"-inf":ae.minDecimals(e)}serialize(e=!1,t="",i=this.constructor){if(this.value===Number.POSITIVE_INFINITY)return"+inf";if(this.value===Number.NEGATIVE_INFINITY)return"-inf";const s=i.precision??this.precision;let n=void 0!==s?this.value.toFixed(s):this.value.toString();return i.serialized&&(n=`"${n}"`),n}valueOf(){return this.value}toString(){return this.value.toString()}}class $e extends Pe{static attributes={...super.attributes,X:De.withDefault(),Y:De.withDefault(),Z:De.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.X,this.Y,this.Z}static createGrammar(){return Me.createEntityGrammar(this,Me.commaSeparation,1).label("VectorEntity")}toArray(){return[this.X.valueOf(),this.Y.valueOf(),this.Z.valueOf()]}}const Be=re.paths,Re=/\/Script\/SequencerScripting\.MovieSceneScripting(.+)Channel/,Ge={A_AccentGrave:"à",Add:"Num +",C_Cedille:"ç",Decimal:"Num .",Divide:"Num /",E_AccentAigu:"é",E_AccentGrave:"è",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",Gamepad_Special_Left_X:"Touchpad Button X Axis",Gamepad_Special_Left_Y:"Touchpad Button Y Axis",Mouse2D:"Mouse XY 2D-Axis",Multiply:"Num *",Section:"§",Subtract:"Num -",Tilde:"`"},Ve={"Boolean::LogicAnd":"Logic AND","Boolean::LogicEq":"==","Boolean::LogicNEq":"!=","Boolean::LogicNot":"Logic NOT","Boolean::LogicOr":"Logic OR","Integer::BitAnd":"Bitwise AND","Integer::BitLShift":"Bitwise Left Shift","Integer::BitNot":"Bitwise NOT","Integer::BitOr":"Bitwise OR","Integer::BitRShift":"Bitwise Right Shift","Integer::BitXOr":"Bitwise XOR","Integer::EnumEq":"==","Integer::EnumNEq":"!=","Matrix::MatrixMultiply":"Multiply (Matrix * Matrix)","Matrix::MatrixVectorMultiply":"Multiply (Matrix * Vector4)",...Object.fromEntries(Object.entries({Add:"+",ArcCosine:"ArcCosine","ArcCosine(Degrees)":"ArcCos(D)","ArcCosine(Radians)":"ArcCos(R)",ArcSine:"ArcSine","ArcSine(Degrees)":"ArcSin(D)","ArcSine(Radians)":"ArcSin(R)","ArcTangent(Degrees)":"ArcTan(D)","ArcTangent(Radians)":"ArcTan(R)",CmpEQ:"==",CmpGE:">=",CmpGT:">",CmpLE:"<=",CmpLT:"<",CmpNEQ:"!=","Cosine(Degrees)":"Cos(D)","Cosine(Radians)":"Cos(R)",DegreesToRadians:"DegToRad",DistancePos:"Distance",Div:String.fromCharCode(247),FMod:"%",FModFast:"Modulo Fast",Length:"Len",Madd:`(A${String.fromCharCode(10799)}B)+C`,Mul:String.fromCharCode(10799),Negate:"-A",OneMinus:"1-A",PI:String.fromCharCode(960),RadiansToDegrees:"RadToDeg","Rand Float":"Random Float","Rand Integer":"Random Integer",Rand:"Random",Rcp:"Reciprocal",RSqrt:"Rcp Sqrt","Sine(Degrees)":"Sin(D)","Sine(Radians)":"Sin(R)",Subtract:"-","Tangent(Degrees)":"Tan(D)","Tangent(Radians)":"Tan(R)",TWO_PI:`2 ${String.fromCharCode(960)}`}).map((([e,t])=>["Numeric::"+e,t])))};function He(e=""){switch(e=e.toLowerCase()){case"zero":return 0;case"one":return 1;case"two":return 2;case"three":return 3;case"four":return 4;case"five":return 5;case"six":return 6;case"seven":return 7;case"eight":return 8;case"nine":return 9}}function ze(e){let t;switch(e.getType()){case Be.addDelegate:t??="Bind Event to ";case Be.clearDelegate:t??="Unbind all Events from ";case Be.removeDelegate:return t??="Unbind Event from ",t+ae.formatStringName(e.DelegateReference?.MemberName?.toString().replace(/Delegate$/,"")??"None");case Be.asyncAction:if(e.ProxyFactoryFunctionName)return ae.formatStringName(e.ProxyFactoryFunctionName?.toString());case Be.actorBoundEvent:case Be.componentBoundEvent:return`${ae.formatStringName(e.DelegatePropertyName?.toString())} (${e.ComponentPropertyName?.toString()??"Unknown"})`;case Be.callDelegate:return`Call ${e.DelegateReference?.MemberName?.toString()??"None"}`;case Be.createDelegate:return"Create Event";case Be.customEvent:if(e.CustomFunctionName)return e.CustomFunctionName?.toString();case Be.dynamicCast:return e.TargetType?`Cast To ${e.TargetType?.getName()}`:"Bad cast node";case Be.enumLiteral:return`Literal enum ${e.Enum?.getName()}`;case Be.event:return`Event ${(e.EventReference?.MemberName?.toString()??"").replace(/^Receive/,"")}`;case Be.executionSequence:return"Sequence";case Be.forEachElementInEnum:return`For Each ${e.Enum?.getName()}`;case Be.forEachLoopWithBreak:return"For Each Loop with Break";case Be.functionEntry:return"UserConstructionScript"===e.FunctionReference?.MemberName?.toString()?"Construction Script":e.FunctionReference?.MemberName?.toString();case Be.functionResult:return"Return Node";case Be.ifThenElse:return"Branch";case Be.makeStruct:if(e.StructType)return`Make ${e.StructType.getName()}`;case Be.materialExpressionComponentMask:{const t=e.getMaterialSubobject();if(t)return`Mask ( ${re.rgba.filter((e=>!0===t[e].getter().value)).map((e=>e+" ")).join("")})`}case Be.materialExpressionConstant:t??=[e.getCustomproperties().find((e=>"Value"==e.PinName.toString()))?.DefaultValue];case Be.materialExpressionConstant2Vector:t??=[e.getCustomproperties().find((e=>"X"==e.PinName?.toString()))?.DefaultValue,e.getCustomproperties().find((e=>"Y"==e.PinName?.toString()))?.DefaultValue];case Be.materialExpressionConstant3Vector:case Be.materialExpressionConstant4Vector:if(!t){const i=e.getCustomproperties().find((e=>"Constant"==e.PinName?.toString()))?.DefaultValue;t=i instanceof $e?[i.X,i.Y,i.Z].map((e=>e.valueOf())):i instanceof Ie?[i.R,i.G,i.B,i.A].map((e=>e.valueOf())):[]}if(t?.length>0)return t.map((e=>ae.printExponential(e))).join(",");t=void 0;break;case Be.materialExpressionFunctionInput:{const t=e.getMaterialSubobject();return`Input ${t?.InputName??"In"} (${t?.InputType?.value.match(/^.+?_(\w+)$/)?.[1]??"Vector3"})`}case Be.materialExpressionLogarithm:return"Ln";case Be.materialExpressionLogarithm10:return"Log10";case Be.materialExpressionLogarithm2:return"Log2";case Be.materialExpressionMaterialFunctionCall:const i=e.getMaterialSubobject()?.MaterialFunction;if(i)return i.getName();break;case Be.materialExpressionSquareRoot:return"Sqrt";case Be.materialExpressionSubtract:const s=e.getMaterialSubobject();if(s)return`Subtract(${s.ConstA??"1"},${s.ConstB??"1"})`;case Be.metasoundEditorGraphExternalNode:{const t=e.ClassName?.Name;if(t)return"Add"===t?"+":t}case Be.niagaraNodeConvert:return`Make ${(e.AutowireMakeType?.ClassStructOrEnum??"").toString().match(/(?:Niagara)?(\w+)['"]*$/)?.[1]??""}`;case Be.pcgEditorGraphNodeInput:return"Input";case Be.pcgEditorGraphNodeOutput:return"Output";case Be.spawnActorFromClass:let n=e.getCustomproperties().find((e=>"ReturnValue"==e.PinName.toString()))?.PinType?.PinSubCategoryObject?.getName();return"Actor"===n&&(n=null),`SpawnActor ${ae.formatStringName(n??"NONE")}`;case Be.switchEnum:return`Switch on ${e.Enum?.getName()??"Enum"}`;case Be.switchInteger:return"Switch on Int";case Be.variableGet:return"";case Be.variableSet:return"SET"}const i=e.getClass();let s=e.switchTarget();if(s)return"E"!==s[0]&&(s=ae.formatStringName(s)),`Switch on ${s}`;if(e.isComment())return e.NodeComment.toString();const n=e.getHIDAttribute();if(n){const e=n.toString();let t=function(e){let t=Ge[e];if(t)return t;if(t=He(e)?.toString(),t)return t;const i=e.match(/NumPad([a-zA-Z]+)/);return i&&(t=He(i[1]).toString(),t)?"Num "+t:void 0}(e)??ae.formatStringName(e);return i===Be.inputDebugKey?t="Debug Key "+t:i===Be.getInputAxisKeyValue&&(t="Get "+t),t}if(i===Be.macro)return ae.formatStringName(e.MacroGraphReference?.getMacroName());const r=e.getMaterialSubobject();if(r){let e=ze(r);return e=e.match(/Material Expression (.+)/)?.[1]??e,e}if(e.isPcg()&&e.getPcgSubobject()){let t=e.getPcgSubobject();return t.NodeTitle?t.NodeTitle.toString():ze(t)}const a=e.getSubgraphObject();if(a)return a.Graph.getName();const o=e.getSettingsObject();if(o){if(o.ExportPath?.valueOf()?.type===Be.pcgHiGenGridSizeSettings)return`Grid Size: ${o.HiGenGridSize?.toString().match(/\d+/)?.[0]?.concat("00")??o.HiGenGridSize?.toString().match(/^\w+$/)?.[0]??"256"}`;if(o.BlueprintElementInstance)return ae.formatStringName(o.BlueprintElementType.getName());if(o.Operation){const e=o.Name?.toString().match(/PCGMetadata(\w+)Settings_\d+/);if(e)return ae.formatStringName(e[1]+": "+o.Operation)}const e=o.getSubgraphObject();if(e&&e.Graph)return e.Graph.getName()}let l,c=e.FunctionReference?.MemberName?.toString();if(c){const t=e.FunctionReference.MemberParent?.path??"";switch(c){case"AddKey":let e=t.match(Re);if(e)return`Add Key (${ae.formatStringName(e[1])})`;case"Concat_StrStr":return"Append"}const i=c.match(re.lineTracePattern);if(i)return"Line Trace"+("Multi"===i[1]?" Multi ":" ")+(""===i[2]?"By Channel":ae.formatStringName(i[2]));switch(t){case Be.blueprintGameplayTagLibrary:case Be.kismetMathLibrary:case Be.slateBlueprintLibrary:case Be.timeManagementBlueprintLibrary:const e=c.match(/[BF]([A-Z]\w+)/);switch(e&&(c=e[1]),c){case"Abs":return"ABS";case"BooleanAND":return"AND";case"BooleanNAND":return"NAND";case"BooleanOR":return"OR";case"Exp":return"e";case"LineTraceSingle":return"Line Trace By Channel";case"Max":case"MaxInt64":return"MAX";case"Min":case"MinInt64":return"MIN";case"Not_PreBool":return"NOT";case"Sin":return"SIN";case"Sqrt":return"SQRT";case"Square":return"^2";case"CrossProduct2D":return"cross";case"Vector4_CrossProduct3":return"cross3";case"DotProduct2D":case"Vector4_DotProduct":return"dot";case"Vector4_DotProduct3":return"dot3"}if(c.startsWith("Add_"))return"+";if(c.startsWith("And_"))return"&";if(c.startsWith("Conv_"))return"";if(c.startsWith("Cross_"))return"cross";if(c.startsWith("Divide_"))return String.fromCharCode(247);if(c.startsWith("Dot_"))return"dot";if(c.startsWith("EqualEqual_"))return"==";if(c.startsWith("Greater_"))return">";if(c.startsWith("GreaterEqual_"))return">=";if(c.startsWith("Less_"))return"<";if(c.startsWith("LessEqual_"))return"<=";if(c.startsWith("Multiply_"))return String.fromCharCode(10799);if(c.startsWith("Not_"))return"~";if(c.startsWith("NotEqual_"))return"!=";if(c.startsWith("Or_"))return"|";if(c.startsWith("Percent_"))return"%";if(c.startsWith("Subtract_"))return"-";if(c.startsWith("Xor_"))return"^";break;case Be.blueprintSetLibrary:{const e=c.match(/Set_(\w+)/);if(e)return ae.formatStringName(e[1]).toUpperCase()}break;case Be.blueprintMapLibrary:{const e=c.match(/Map_(\w+)/);if(e)return ae.formatStringName(e[1]).toUpperCase()}break;case Be.kismetArrayLibrary:{const e=c.match(/Array_(\w+)/);if(e)return e[1].toUpperCase()}}return ae.formatStringName(c)}return e.OpName?Ve[e.OpName.toString()]??ae.formatStringName(e.OpName.toString().replaceAll(/(?:^\w+(?this.unknownEntityGrammar))){return this.inlined?e:xe.seq(xe.reg(/\(\s*/),e.sepBy(Me.commaSeparation).opt(),xe.reg(/\s*(,\s*)?\)/,1)).map((([e,t,i])=>{t=t instanceof Array?t:[];let s=this;return void 0!==i!==s.trailing&&(s=s.flagTrailing(void 0!==i)),new s(t)})).label(`ArrayEntity of ${this.type?.className()??"unknown values"}`)}static flagInlined(e=!0){const t=this.asUniqueClass();return t.inlined=e,t.grammar=t.createGrammar(),t}static of(e){const t=this.asUniqueClass();return t.type=e,t.grammar=t.createGrammar(),t}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,n=i.keySeparator,r=i.attributeSeparator,a=i.wrap){if(i.inlined)return super.serialize.bind(this.values,e,t,i,s,n,r,a)();let o=this.values.map((t=>t?.serialize(e))).join(i.attributeSeparator);return this.trailing&&(o+=i.attributeSeparator),`(${o})`}valueOf(){return this.values}equals(e){if(!(e instanceof _e)||this.values.length!==e.values.length)return!1;for(let t=0;tFe=e.default)).catch():Fe=window.crypto;class je extends Pe{static grammar=this.createGrammar();static generateGuid(){let e=new Uint32Array(4);Fe.getRandomValues(e);let t="";return e.forEach((e=>{t+=("0".repeat(8)+e.toString(16).toUpperCase()).slice(-8)})),t}constructor(e=je.generateGuid()){super(),this.value=e}static createGrammar(){return xe.reg(/[0-9A-F]{32}/i).map((e=>new this(e))).label("GuidEntity")}serialize(e=!1,t="",i=this.constructor){let s=this.value;return i.serialized&&(s=`"${s}"`),s}toString(){return this.value}}class Ue extends De{static grammar=this.createGrammar();get value(){return super.value}set value(e){(e=Math.trunc(e))>=1<<31&&e<-(1<<31)&&(e=Math.floor(e),super.value=e)}static createGrammar(){return xe.numberInteger.map((e=>new this(e)))}}class Ye extends Ue{static grammar=this.createGrammar();get value(){return super.value}set value(e){e=Math.round(ae.clamp(e,0)),super.value=e}static createGrammar(){return xe.numberNatural.map((e=>new this(e)))}}const qe={Any:r``,"Any[]":r``,audio:r``,blue:r``,bool:r``,byte:r``,class:r``,default:r``,delegate:r``,enum:r``,exec:r``,float:r``,green:r``,int:r``,int32:r``,int64:r``,interface:r``,name:r``,object:r``,Param:r``,"Param[]":r``,Point:r``,"Point[]":r``,real:r``,red:r``,string:r``,struct:r``,Surface:r``,"Surface[]":r``,text:r``,time:r``,Volume:r``,"Volume[]":r``,wildcard:r``,[re.paths.linearColor]:r``,[re.paths.niagaraBool]:r``,[re.paths.niagaraDataInterfaceCollisionQuery]:r``,[re.paths.niagaraDataInterfaceCurlNoise]:r``,[re.paths.niagaraDataInterfaceVolumeTexture]:r``,[re.paths.niagaraFloat]:r``,[re.paths.niagaraInt32]:r``,[re.paths.niagaraPosition]:r``,[re.paths.quat4f]:r``,[re.paths.rotator]:r``,[re.paths.transform]:r``,[re.paths.vector]:r``,[re.paths.vector2f]:r``,[re.paths.vector3f]:r``,[re.paths.vector4f]:r``},Ke=r``;function Xe(e){let t,i=e.PinFriendlyName?e.PinFriendlyName.toString():ae.formatStringName(e.PinName?.toString()??"");return(t=e.PinToolTip?.toString().match(/\s*(.+?(?=\n)|.+\S)\s*/))&&t[1].toLowerCase()===i.toLowerCase()?t[1]:(i=i.replace(/^Module\./,""),i)}class Ze extends Ue{static grammar=this.createGrammar();get value(){return super.value}set value(e){(e=Math.trunc(e))>=0&&e<256&&(super.value=e)}createGrammar(){return xe.numberByte.map((e=>new this(e)))}}class We extends Pe{static grammar=this.createGrammar();static escapedCharacters=/['"\\]/g;static unescapedBackslash=/(?<=(?:[^\\]|^)(?:\\\\)*)\\(?!\\)/;constructor(e=""){super(),this.value=e}static createGrammar(){return xe.doubleQuotedString.map((e=>new this(We.unescape(e)))).label("StringEntity")}static escape(e,t=!0){let i=e.replaceAll(new RegExp(`(${We.escapedCharacters.source})`,"g"),"\\$1");return t&&(i=i.replaceAll("\n","\\n").replaceAll("\t","\\t")),i}static unescape(e){return e.replaceAll(new RegExp(We.unescapedBackslash.source+"t","g"),"\t").replaceAll(new RegExp(We.unescapedBackslash.source+"n","g"),"\n").replaceAll(new RegExp(`\\\\(${We.escapedCharacters.source})`,"g"),"$1")}doSerialize(e=!1){let t=`"${We.escape(this.value)}"`;return e&&(t=We.escape(t,!1)),t}valueOf(){return this.value}toString(){return this.value}}class Qe extends Pe{static grammar=this.createGrammar();static f;static createGrammar(){return We.grammar}static from(e){const t=this.asUniqueClass();return t.f=e,t}static compute(e){return this.f(e)}}class Je extends Pe{static attributeConverter={fromAttribute:(e,t)=>new this(e),toAttribute:(e,t)=>e.toString()};static grammar=this.createGrammar();static createGrammar(){return Me.symbol.map((e=>new this(e))).label("SymbolEntity")}constructor(e=""){super(),this.value=e}serialize(e=!1,t="",i=this.constructor){let s=this.value;return i.serialized&&(s=`"${s}"`),s}toString(){return this.value}}class et extends Je{static grammar=this.createGrammar();static createGrammar(){return Me.symbol.map((e=>new this(e)))}}class tt extends et{static grammar=this.createGrammar();static createGrammar(){return xe.reg(Me.Regex.InsideString).map((e=>new this(e)))}}class it extends Pe{static lookbehind="INVTEXT";static grammar=this.createGrammar();constructor(e=""){super(),this.value=e}static createGrammar(){return xe.alt(xe.seq(xe.reg(new RegExp(`${this.lookbehind}\\s*\\(`)),xe.doubleQuotedString,xe.reg(/\s*\)/)).map((([e,t,i])=>t)),xe.reg(new RegExp(this.lookbehind)).map((()=>""))).map((e=>new this(e))).label("InvariantTextEntity")}doSerialize(){return this.lookbehind+'("'+this.value+'")'}valueOf(){return this.value}toString(){return this.value}}class st extends Pe{static attributeSeparator=", ";static printKey=e=>"";static lookbehind="NSLOCTEXT";static attributes={...super.attributes,namespace:We.withDefault(),key:We.withDefault(),value:We.withDefault()};static grammar=this.createGrammar();constructor(e={}){super(e),this.namespace,this.key,this.value}static createGrammar(){return xe.regArray(new RegExp(String.raw`${st.lookbehind}\s*\(`+String.raw`\s*"(?${Me.Regex.InsideString.source})"\s*,`+String.raw`\s*"(?${Me.Regex.InsideString.source})"\s*,`+String.raw`\s*"(?${Me.Regex.InsideString.source})"\s*`+String.raw`(?,\s+)?`+String.raw`\)`,"m")).map((({groups:{namespace:e,key:t,value:i,trailing:s}})=>new this({namespace:new this.attributes.namespace(ae.unescapeString(e)),key:new this.attributes.namespace(ae.unescapeString(t)),value:new this.attributes.namespace(ae.unescapeString(i)),trailing:void 0!==s}))).label("LocalizedTextEntity")}toString(){return ae.capitalFirstLetter(this.value.valueOf())}}class nt extends Pe{static attributeSeparator=", ";static lookbehind=["LOCGEN_FORMAT_NAMED","LOCGEN_FORMAT_ORDERED"];static grammar=this.createGrammar();constructor(e){super(),this.values=e}static createGrammar(){return xe.lazy((()=>xe.seq(xe.reg(new RegExp(String.raw`(${this.lookbehind.join("|")})\s*\(\s*`),1),xe.alt(...[We,st,it,nt].map((e=>e.grammar))).sepBy(xe.reg(/\s*\,\s*/)),xe.reg(/\s*\)/)).map((([e,t])=>{const i=new this(t);return i.lookbehind=e,i})))).label("FormatTextEntity")}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,n=i.keySeparator,r=i.attributeSeparator,a=i.wrap){const o=i.attributeSeparator;return this.lookbehind+"("+this.values.map((t=>t.serialize(e))).join(o)+(i.trailing?o:"")+")"}toString(){const e=this.values?.[0]?.toString();if(!e)return"";const t=this.values.slice(1).map((e=>e?.valueOf()));return"LOCGEN_FORMAT_NAMED"==this.lookbehind?e.replaceAll(/\{([a-zA-Z]\w*)\}/g,((e,i)=>{const s=t.indexOf(i)+1;return s>0&&s{const s=Number(i);return s=-(1n<<63n)&&e<1n<<63n&&(this._value=e)}constructor(e=0n){super(),this.value=BigInt(e)}static createGrammar(){return xe.numberBigInteger.map((e=>new this(e)))}serialize(e=!1,t="",i=this.constructor){let s=this.value.toString();return i.serialized&&(s=`"${s}"`),s}valueOf(){return this.value}toString(){return this.value.toString()}}class at extends Pe{static typeReference=xe.reg(new RegExp(Me.Regex.Path.source+"|"+Me.symbol.getParser().regexp.source));static fullReferenceGrammar=this.createFullReferenceGrammar();static grammar=this.createGrammar();#c;get type(){return this.#c}set type(e){this.#c=e}#B;get path(){return this.#B}set path(e){this.#B=e}#R;get full(){return this.#R}set full(e){this.#R=e}#G="";constructor(e="None",t="",i=(e.includes("/")||t?(e,t)=>`"${e+(t?`'${t}'`:"")}"`:(e,t)=>e)){super(),this.#c=e,this.#B=t,this.#R=i}static createGrammar(){return xe.alt(this.createFullReferenceSerializedGrammar(),this.createFullReferenceGrammar(),this.createTypeReferenceGrammar()).label("ObjectReferenceEntity")}static createFullReferenceGrammar(){return xe.regArray(new RegExp("("+this.typeReference.getParser().regexp.source+")(?:"+`'"(${Me.Regex.InsideString.source})"'|`+`'(${Me.Regex.InsideSingleQuotedString.source})')`)).map((([e,t,i,s])=>{let n=!!i,r=n?["'\"","\"'"]:["'","'"];return new this(t,n?i:s,((e,t)=>e+r[0]+t+r[1]))}))}static createFullReferenceSerializedGrammar(){return xe.regArray(new RegExp('"('+Me.Regex.InsideString.source+"?)(?:'("+Me.Regex.InsideSingleQuotedString.source+"?)')?\"")).map((([e,t,i])=>new this(t,i,((e,t)=>`"${e}${t?`'${t}'`:""}"`))))}static createTypeReferenceGrammar(){return this.typeReference.map((e=>new this(e,"",((e,t)=>e))))}static createNoneInstance(){return new this("None")}getName(e=!1){return this.#G?this.#G:e?ae.getNameFromPath(this.path.replace(/_C$/,""),e):this.#G=ae.getNameFromPath(this.path.replace(/_C$/,""),e)}doSerialize(e=!1){let t=this.full(this.type,this.path);return e&&(t=ae.escapeString(t,!1)),t}equals(e){return e instanceof at&&(this.type==e.type&&this.path==e.path)}toString(){return this.full(this.type,this.path)}}class ot extends Pe{static grammar=this.createGrammar();constructor(e=null,t=null){super(),this.objectName=e,this.pinGuid=t}static createGrammar(){return xe.seq(Je.grammar,xe.whitespace,je.grammar).map((([e,t,i])=>new this(e,i))).label("PinReferenceEntity")}doSerialize(){return this.objectName.serialize()+" "+this.pinGuid.serialize()}}class lt extends Pe{static attributes={...super.attributes,MemberParent:at,MemberName:We,MemberGuid:je};static grammar=this.createGrammar();constructor(e){super(e),this.MemberParent,this.MemberName,this.MemberGuid}static createGrammar(){return Me.createEntityGrammar(this,Me.commaSeparation,0,0)}}class ct extends Pe{static attributes={...super.attributes,PinCategory:We.withDefault(),PinSubCategory:We,PinSubCategoryObject:at,PinSubCategoryMemberReference:lt,ContainerType:Je,bIsReference:ke,bIsConst:ke,bIsWeakPointer:ke,bIsUObjectWrapper:ke,bSerializeAsSinglePrecisionFloat:ke};static grammar=this.createGrammar();constructor(e={}){super(e),this.PinCategory,this.PinSubCategory,this.PinSubCategoryObject,this.PinSubCategoryMemberReference,this.ContainerType,this.bIsReference,this.bIsConst,this.bIsWeakPointer,this.bIsUObjectWrapper,this.bIsUObjectWrapper,this.bSerializeAsSinglePrecisionFloat}static createGrammar(){return Me.createEntityGrammar(this).label("PinTypeEntity")}copyTypeFrom(e){for(const t of this.keys)void 0!==e[t]&&(this[t]=e[t])}}class ut extends Pe{static attributes={...super.attributes,X:De.withDefault(),Y:De.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.X,this.Y}static createGrammar(){return Me.createEntityGrammar(this,Me.commaSeparation,1).label("Vector2DEntity")}toArray(){return[this.X.valueOf(),this.Y.valueOf()]}}class ht extends ut{static grammar=this.createGrammar();static createGrammar(){return xe.alt(xe.regArray(new RegExp(/X\s*=\s*/.source+"(?"+Me.numberRegexSource+")\\s+"+/Y\s*=\s*/.source+"(?"+Me.numberRegexSource+")")).map((({groups:{x:e,y:t}})=>new this({X:new ut.attributes.X(e),Y:new ut.attributes.Y(t)}))),ut.grammar.map((e=>new this({X:e.X,Y:e.Y})))).label("RBSerializationVector2DEntity")}}class pt extends Pe{static attributes={...super.attributes,R:De.withDefault(),P:De.withDefault(),Y:De.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.R,this.P,this.Y}static createGrammar(){return Me.createEntityGrammar(this,Me.commaSeparation,1).label("RotatorEntity")}getRoll(){return this.R}getPitch(){return this.P}getYaw(){return this.Y}}class dt extends pt{static attributeSeparator=", ";static grammar=this.createGrammar();static createGrammar(){return xe.alt(xe.regArray(new RegExp(`(${De.numberRegexSource})`+String.raw`\s*,\s*`+`(${De.numberRegexSource})`+String.raw`\s*,\s*`+`(${De.numberRegexSource})`)).map((([e,t,i,s,n,r,a])=>new this({R:new pt.attributes.R(r,a?.length),P:new pt.attributes.P(t,i?.length),Y:new pt.attributes.Y(s,n?.length)}))),pt.grammar.map((e=>new this({R:e.R,P:e.P,Y:e.Y})))).label("SimpleSerializationRotatorEntity")}doSerialize(){const e=this.constructor.attributeSeparator;return this.P.serialize()+e+this.Y.serialize()+e+this.R.serialize()+(this.trailing?e:"")}}class mt extends ut{static attributeSeparator=", ";static grammar=this.createGrammar();static createGrammar(){return xe.alt(xe.regArray(new RegExp(`(${De.numberRegexSource})`+String.raw`\s*,\s*`+`(${De.numberRegexSource})`)).map((([e,t,i,s,n])=>new this({X:new ut.attributes.X(t,i?.length),Y:new ut.attributes.Y(s,n?.length)}))),ut.grammar.map((e=>new this({X:e.X,Y:e.Y})))).label("SimpleSerializationVector2DEntity")}doSerialize(){const e=this.constructor.attributeSeparator;return this.X.serialize()+e+this.Y.serialize()+(this.trailing?e:"")}}class gt extends Pe{static attributes={...super.attributes,X:De.withDefault(),Y:De.withDefault(),Z:De.withDefault(),W:De.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.X,this.Y,this.Z,this.W}static createGrammar(){return Me.createEntityGrammar(this,Me.commaSeparation,1).label("Vector4DEntity")}toArray(){return[this.X.valueOf(),this.Y.valueOf(),this.Z.valueOf(),this.W.valueOf()]}}class bt extends gt{static grammar=this.createGrammar();static createGrammar(){return xe.alt(xe.regArray(new RegExp(`(${Me.numberRegexSource})`+String.raw`\s*,\s*`+`(${Me.numberRegexSource})`+String.raw`\s*,\s*`+`(${Me.numberRegexSource})`+String.raw`\s*,\s*`+`(${Me.numberRegexSource})`)).map((([e,t,i,s,n])=>new this({X:new gt.attributes.X(t),Y:new gt.attributes.Y(i),Z:new gt.attributes.Z(s),W:new gt.attributes.W(n)}))),gt.grammar)}}class vt extends $e{static allowShortSerialization=!1;static attributeSeparator=", ";static grammar=this.createGrammar();static createGrammar(){return xe.alt(xe.regArray(new RegExp(`(${De.numberRegexSource})`+(this.allowShortSerialization?"(?:":"")+String.raw`\s*,\s*`+`(${De.numberRegexSource})`+String.raw`\s*,\s*`+`(${De.numberRegexSource})`+(this.allowShortSerialization?")?":""))).map((([e,t,i,s,n,r,a])=>new this({X:new $e.attributes.X(t,i?.length),Y:new $e.attributes.Y(s,n?.length),Z:new $e.attributes.Z(r,a?.length)}))),$e.grammar.map((e=>new this({X:e.X,Y:e.Y,Z:e.Z}))))}static flagAllowShortSerialization(e=!0){const t=this.asUniqueClass();return e!==t.allowShortSerialization&&(t.allowShortSerialization=e,t.grammar=t.createGrammar()),t}doSerialize(){const e=this.constructor.attributeSeparator;return this.X.serialize()+e+this.Y.serialize()+e+this.Z.serialize()+(this.trailing?e:"")}}class ft extends Pe{static lookbehind="Pin";static#V={bool:ke,byte:Ze,enum:et,exec:We,float:De,int:Ue,int64:rt,name:We,real:De,string:We,[re.paths.linearColor]:Ie,[re.paths.niagaraBool]:ke,[re.paths.niagaraFloat]:De,[re.paths.niagaraPosition]:$e,[re.paths.rotator]:pt,[re.paths.vector]:$e,[re.paths.vector2D]:ut,[re.paths.vector4f]:gt};static#H={enum:tt,rg:ht,[re.paths.niagaraPosition]:vt.flagAllowShortSerialization(),[re.paths.rotator]:dt,[re.paths.vector]:vt,[re.paths.vector2D]:mt,[re.paths.vector3f]:vt,[re.paths.vector4f]:bt};static attributes={PinId:je.withDefault(),PinName:We.withDefault(),PinFriendlyName:Le.accepting(st,nt,it,We),PinToolTip:We,Direction:We,PinType:ct.withDefault().flagInlined(),LinkedTo:_e.of(ot).withDefault().flagSilent(),SubPins:_e.of(ot),ParentPin:ot,DefaultValue:Qe.from((e=>e.getEntityType(!0)?.flagSerialized()??We)),AutogeneratedDefaultValue:We,DefaultObject:at,PersistentGuid:je,bHidden:ke,bNotConnectable:ke,bDefaultValueIsReadOnly:ke,bDefaultValueIsIgnored:ke,bAdvancedView:ke,bOrphanedPin:ke};static grammar=this.createGrammar();#z=!1;set recomputesNodeTitleOnChange(e){this.#z=e}get recomputesNodeTitleOnChange(){return this.#z}#_=null;get objectEntity(){try{return this.#_}catch(e){return null}}set objectEntity(e){this.#_=e}#F;get pinIndex(){return this.#F}set pinIndex(e){this.#F=e}constructor(e={}){super(e),this.PinId,this.PinName,this.PinFriendlyName,this.PinToolTip,this.Direction,this.PinType,this.LinkedTo,this.DefaultValue,this.AutogeneratedDefaultValue,this.DefaultObject,this.PersistentGuid,this.bHidden,this.bNotConnectable,this.bDefaultValueIsReadOnly,this.bDefaultValueIsIgnored,this.bAdvancedView,this.bOrphanedPin,this.objectEntity}static createGrammar(){return Me.createEntityGrammar(this)}static fromLegacyObject(e){return new ft(e)}getType(){const e=this.PinType.PinCategory?.toString().toLocaleLowerCase();if(["struct","class","object","type","statictype"].includes(e))return this.PinType.PinSubCategoryObject?.path;if(this.isEnum())return"enum";if(this.objectEntity?.isPcg()){const e=this.objectEntity.getPcgSubobject(),t=this.isInput()?e.InputPins?.valueOf()[this.pinIndex]:e.OutputPins?.valueOf()[this.pinIndex];if(t){const i=e[re.subObjectAttributeNameFromReference(t,!0)];let s=i.Properties?.AllowedTypes?.toString()??"";if(""==s&&(s=this.PinType.PinCategory??"",""==s&&(s="Any")),s)return!1!==i.Properties.bAllowMultipleData?.valueOf()&&!1!==i.Properties.bAllowMultipleConnections?.valueOf()&&(s+="[]"),s}}if("optional"===e){const e=this.PinType.PinSubCategory?.toString();switch(e){case"red":return"real";case"rg":return"rg";case"rgb":return re.paths.vector;case"rgba":return re.paths.linearColor;default:return e}}return e}getEntityType(e=!1){const t=this.getType(),i=ft.#V[t],s=ft.#H[t];return e&&void 0!==s?s:i}pinTitle(){return Xe(this)}copyTypeFrom(e){this.PinType=e.PinType}getDefaultValue(e=!1){return void 0===this.DefaultValue&&e&&(this.DefaultValue=new(this.getEntityType(!0))),this.DefaultValue}isEnum(){const e=this.PinType.PinSubCategoryObject?.type;return e===re.paths.enum||e===re.paths.userDefinedEnum||"enum"===e?.toLowerCase()}isExecution(){return"exec"===this.PinType.PinCategory.toString()||this.getType()===re.paths.niagaraParameterMap}isHidden(){return this.bHidden?.valueOf()}isInput(){return!this.isHidden()&&"EGPD_Output"!=this.Direction?.toString()}isOutput(){return!this.isHidden()&&"EGPD_Output"==this.Direction?.toString()}isLinked(){return this.LinkedTo?.length>0??!1}linkTo(e,t){const i=this.LinkedTo.values?.some((i=>i.objectName.toString()==e&&i.pinGuid.toString()==t.PinId.toString()));return!i&&(this.LinkedTo.values.push(new ot(new Je(e),t.PinId)),!0)}unlinkFrom(e,t){const i=this.LinkedTo.values?.findIndex((i=>i.objectName.toString()==e&&i.pinGuid.toString()==t.PinId.toString()));return i>=0&&(this.LinkedTo.values.splice(i,1),0===this.LinkedTo.length&&void 0===ft.attributes.LinkedTo.default&&(this.LinkedTo.values=[]),!0)}getSubCategory(){return this.PinType.PinSubCategoryObject?.path}pinColor(){return function(e){if("mask"===e.PinType.PinCategory?.toString()){const t=qe[e.PinType.PinSubCategory?.toString()];if(t)return t}else if("optional"===e.PinType.PinCategory?.toString())return Ke;const t=e.getType();return qe[t]??qe[e.PinType.PinCategory?.toString().toLowerCase()]??(t.startsWith("/Script/Niagara.")?qe.struct:qe.default)}(this)}}const yt=e=>e.PinName?.toString().match(/^\s*([A-Z])\s*$/)?.[1]?.charCodeAt(0)-"A".charCodeAt(0);class wt extends Pe{static attributes={...super.attributes,MacroGraph:at,GraphBlueprint:at,GraphGuid:je};static grammar=this.createGrammar();constructor(e){super(e),this.MacroGraph,this.GraphBlueprint,this.GraphGuid}static createGrammar(){return Me.createEntityGrammar(this)}getMacroName(){const e=this.MacroGraph.path.search(":");return this.MacroGraph.path.substring(e+1)}}class St extends Pe{static grammar=this.createGrammar();static createGrammar(){return xe.reg(new RegExp(String.raw`\(${xe.whitespaceInlineOpt.getParser().regexp.source}\)`)).map((e=>new this)).label("NullEntity")}serialize(e=!1,t="",i=this.constructor){let s="()";return i.serialized&&(s=`"${s}"`),s}}class Et extends Pe{static attributes={...super.attributes,ScriptVariable:at,OriginalChangeId:je};static grammar=this.createGrammar();constructor(e={}){super(e),this.ScriptVariable,this.OriginalChangeId}static createGrammar(){return Me.createEntityGrammar(this).label("ScriptVariableEntity")}}class Ct extends ft{static attributes={...super.attributes,PinId:je};static grammar=this.createGrammar();static createGrammar(){return xe.seq(xe.reg(new RegExp(`(${Me.Regex.Symbol.source}\\s*)?\\(\\s*`),1),Me.createAttributeGrammar(this).sepBy(Me.commaSeparation),xe.reg(/\s*(?:,\s*)?\)/)).map((([e,t,i])=>{e??="";let s={};return e.length&&(s.lookbehind=e),t.forEach((e=>e(s))),new this(s)})).label("UnknownPinEntity")}}class Nt extends Pe{static attributes={...super.attributes,MemberScope:We,MemberName:We.withDefault(),MemberGuid:je,bSelfContext:ke};static grammar=this.createGrammar();constructor(e){super(e),this.MemberScope,this.MemberName,this.MemberGuid,this.bSelfContext}static createGrammar(){return Me.createEntityGrammar(this).label("VariableReferenceEntity")}}class xt extends Pe{#j=!1;get exported(){return this.#j}set exported(e){this.#j=e}static#U=/^(\w+?)(?:_(\d+))?$/;static printKey=e=>e.startsWith(re.subObjectAttributeNamePrefix)?"":e;static attributeSeparator="\n";static wrap=this.notWrapped;static trailing=!0;static attributes={...super.attributes,Class:at,Name:We,Archetype:at,ExportPath:Oe.of(at),ObjectRef:at,BlueprintElementType:at,BlueprintElementInstance:at,ConstA:Oe.of(De),ConstB:Oe.of(De),PinTags:_e.of(St).flagInlined(),PinNames:_e.of(We).flagInlined(),AxisKey:Je,InputAxisKey:Je,InputName:We,InputType:Je,NumAdditionalInputs:Ye,bIsPureFunc:ke,bIsConstFunc:ke,bIsCaseSensitive:ke,VariableReference:Nt,SelfContextInfo:Je,DelegatePropertyName:We,DelegateOwnerClass:at,ComponentPropertyName:We,EventReference:lt,FunctionReference:lt,FunctionScript:at,CustomFunctionName:We,TargetType:at,MacroGraphReference:wt,Enum:at,EnumEntries:_e.of(We).flagInlined(),InputKey:Je,OpName:We,CachedChangeId:je,FunctionDisplayName:We,AddedPins:_e.of(Ct).withDefault().flagInlined().flagSilent(),ChangeId:je,MaterialFunction:at,bOverrideFunction:ke,bInternalEvent:ke,bConsumeInput:ke,bExecuteWhenPaused:ke,bOverrideParentBinding:ke,bControl:ke,bAlt:ke,bShift:ke,bCommand:ke,CommentColor:Ie,bCommentBubbleVisible_InDetailsPanel:ke,bColorCommentBubble:ke,ProxyFactoryFunctionName:We,ProxyFactoryClass:at,ProxyClass:at,StructType:at,MaterialExpression:at,MaterialExpressionComment:at,MoveMode:Je,TimelineName:We,TimelineGuid:je,SizeX:Oe.of(Ue),SizeY:Oe.of(Ue),Text:Oe.of(We),ParameterName:We,ExpressionGUID:je,MaterialExpressionEditorX:Oe.of(Ue),MaterialExpressionEditorY:Oe.of(Ue),MaterialExpressionGuid:je,NodeTitle:We,NodeTitleColor:Ie,PositionX:Oe.of(Ue),PositionY:Oe.of(Ue),SettingsInterface:at,PCGNode:at,HiGenGridSize:Je,Operation:Je,NodePosX:Ue,NodePosY:Ue,NodeHeight:Ue,NodeWidth:Ue,Graph:at,SubgraphInstance:We,InputPins:_e.of(at).flagInlined(),OutputPins:_e.of(at).flagInlined(),bExposeToLibrary:ke,bCanRenameNode:ke,bCommentBubblePinned:ke,bCommentBubbleVisible:ke,NodeComment:We,AdvancedPinDisplay:Je,DelegateReference:Nt,EnabledState:Je,NodeGuid:je,ErrorType:Ue,ErrorMsg:We,ScriptVariables:_e.flagInlined().of(Et),Node:Oe.of(at),ExportedNodes:We,CustomProperties:_e.of(Le.accepting(ft,Ct)).withDefault().flagSilent()};static customPropertyGrammar=xe.seq(xe.reg(/CustomProperties\s+/),this.attributes.CustomProperties.type.grammar).map((([e,t])=>e=>{(e.CustomProperties??=new this.attributes.CustomProperties).values.push(t)}));static inlinedArrayEntryGrammar=xe.seq(xe.alt(Me.symbolQuoted.map((e=>[e,!0])),Me.symbol.map((e=>[e,!1]))),xe.reg(new RegExp(String.raw`\s*\(\s*(\d+)\s*\)\s*\=\s*`),1).map(Number)).chain((([[e,t],i])=>(this.attributes[e]?.grammar??Pe.unknownEntityGrammar).map((s=>n=>{if(void 0===n[e]){let i=_e;t!=i.quoted&&(i=i.flagQuoted(t)),i.inlined||(i=i.flagInlined()),n[e]=new i}n[e].values[i]=s}))));static grammar=this.createGrammar();static grammarMultipleObjects=xe.seq(xe.whitespaceOpt,this.grammar,xe.seq(xe.whitespace,this.grammar).map((([e,t])=>t)).many(),xe.whitespaceOpt).map((([e,t,i,s])=>[t,...i]));constructor(e={}){if("NodePosX"in e!="NodePosY"in e){const t=Object.entries(e),[i,s]="NodePosX"in e?["NodePosY",Object.keys(e).indexOf("NodePosX")+1]:["NodePosX",Object.keys(e).indexOf("NodePosY")];t.splice(s,0,[i,new Ue(0)]),e=Object.fromEntries(t)}super(e),this.CustomProperties,this.AddedPins,this.AdvancedPinDisplay,this.Archetype,this.AxisKey,this.bIsPureFunc,this.BlueprintElementInstance,this.BlueprintElementType,this.Class,this.CommentColor,this.ComponentPropertyName,this.ConstA,this.ConstB,this.CustomFunctionName,this.DelegatePropertyName,this.DelegateReference,this.EnabledState,this.Enum,this.EnumEntries,this.EventReference,this.ExportedNodes,this.ExportPath,this.FunctionDisplayName,this.FunctionReference,this.FunctionScript,this.Graph,this.HiGenGridSize,this.InputAxisKey,this.InputKey,this.InputName,this.InputPins,this.InputType,this.MacroGraphReference,this.MaterialExpression,this.MaterialExpressionComment,this.MaterialExpressionEditorX,this.MaterialExpressionEditorY,this.MaterialFunction,this.Name,this.Node,this.NodeComment,this.NodeHeight,this.NodePosX,this.NodePosY,this.NodeTitle,this.NodeTitleColor,this.NodeWidth,this.NumAdditionalInputs,this.ObjectRef,this.Operation,this.OpName,this.OutputPins,this.ParameterName,this.PCGNode,this.PinNames,this.PinTags,this.PositionX,this.PositionY,this.ProxyFactoryFunctionName,this.ScriptVariables,this.SettingsInterface,this.SizeX,this.SizeY,this.StructType,this.SubgraphInstance,this.TargetType,this.Text,this.Text,this.VariableReference,this.Pins instanceof _e&&this.Pins.valueOf().forEach((e=>{const t=this[re.subObjectAttributeNameFromReference(e,!0)];if(t){const e=ft.fromLegacyObject(t);e.LinkedTo=new ft.attributes.LinkedTo,this.getCustomproperties(!0).push(e),this.CustomProperties.ignored=!0}}));const t=this.getMaterialSubobject();if(t){const e=t;if(void 0!==e.SizeX&&(e.SizeX.getter=()=>this.NodeWidth),e.SizeY&&(e.SizeY.getter=()=>this.NodeHeight),e.Text&&(e.Text.getter=()=>this.NodeComment),e.MaterialExpressionEditorX&&(e.MaterialExpressionEditorX.getter=()=>this.NodePosX),e.MaterialExpressionEditorY&&(e.MaterialExpressionEditorY.getter=()=>this.NodePosY),this.getType()===re.paths.materialExpressionComponentMask){const t=re.rgba.map((e=>{const t=this.getPinEntities().find((t=>t.PinName.toString()===e));return t.recomputesNodeTitleOnChange=!0,t}));e.keys=[...re.rgba,...e.keys];const i=Oe.of(ke).withDefault().flagSilent();e.R=new i((()=>t[0].DefaultValue)),e.G=new i((()=>t[1].DefaultValue)),e.B=new i((()=>t[2].DefaultValue)),e.A=new i((()=>t[3].DefaultValue))}else if(this.getType()===re.paths.materialExpressionSubtract){const t=Oe.of(De.withPrecision(6)).withDefault((()=>new Oe((()=>new De(1))))).flagSilent(),i=this.getCustomproperties().find((e=>"A"===e.PinName?.toString())),s=this.getCustomproperties().find((e=>"B"===e.PinName?.toString()));(i||s)&&(e.keys=["ConstA","ConstB",...e.keys],i&&(i.recomputesNodeTitleOnChange=!0,e.ConstA=new t((()=>i.DefaultValue))),s&&(s.recomputesNodeTitleOnChange=!0,e.ConstB=new t((()=>s.DefaultValue))))}}const i=this.getPcgSubobject();i&&(i.PositionX&&(i.PositionX.getter=()=>this.NodePosX),i.PositionY&&(i.PositionY.getter=()=>this.NodePosY),i.getSubobjects().forEach((e=>{if(void 0!==e.Node){const t=e.Node.getter();t.type===this.PCGNode.type&&t.path===`${this.Name}.${this.PCGNode.path}`&&(e.Node.getter=()=>new at(this.PCGNode.type,`${this.Name}.${this.PCGNode.path}`,t.full))}})));let s=0,n=0;this.getCustomproperties().forEach(((e,t)=>{e.objectEntity=this,e.pinIndex=e.isInput()?s++:e.isOutput()?n++:t}));const r=this.ExportPath?.valueOf();if(r?.path.endsWith(this.Name?.toString())){const e=this.constructor.attributes.ExportPath,t=e.type,i=this.Name.valueOf().length;this.ExportPath=new e((()=>new t(r.type,r.path.substring(0,r.path.length-i)+this.Name,r.full)))}}static createGrammar(){return xe.seq(xe.reg(/Begin +Object/),xe.seq(xe.whitespace,xe.alt(this.createSubObjectGrammar(),this.customPropertyGrammar,Me.createAttributeGrammar(this,xe.reg(Me.Regex.MultipleWordsSymbols)),Me.createAttributeGrammar(this,Me.attributeNameQuoted,void 0,((e,t,i)=>{ae.objectSet(e,[...t,"quoted"],!0)})),this.inlinedArrayEntryGrammar)).map((([e,t])=>t)).many(),xe.reg(/\s+End +Object/)).map((([e,t,i])=>{const s={};return t.forEach((e=>e(s))),new this(s)})).label("ObjectEntity")}static createSubObjectGrammar(){return xe.lazy((()=>this.grammar)).map((e=>t=>{e.trailing=!1,t[re.subObjectAttributeNameFromEntity(e)]=e}))}#Y;getClass(){if(!this.#Y&&(this.#Y=(this.Class?.path?this.Class.path:this.Class?.type)??this.ExportPath?.valueOf()?.type??"",this.#Y&&!this.#Y.startsWith("/"))){let e=Object.values(re.paths).find((e=>e.endsWith("."+this.#Y)));e&&(this.#Y=e)}return this.#Y}getType(){const e=this.MacroGraphReference?.MacroGraph?.path;return e||(this.MaterialExpression?this.MaterialExpression.type:this.getClass())}getObjectName(e=!1){return e?this.getNameAndCounter()[0]:this.Name.toString()}getNameAndCounter(){const e=this.getObjectName().match(xt.#U);return e?[e[1]??"",parseInt(e[2]??"0")]:["",0]}getCounter(){return this.getNameAndCounter()[1]}getNodeWidth(){return this.NodeWidth??this.isComment()?re.defaultCommentWidth:void 0}setNodeWidth(e){this.NodeWidth||(this.NodeWidth=new Ue),this.NodeWidth.value=e}getNodeHeight(){return this.NodeHeight??this.isComment()?re.defaultCommentHeight:void 0}setNodeHeight(e){this.NodeHeight||(this.NodeHeight=new Ue),this.NodeHeight.value=e}getNodePosX(){return this.NodePosX?.value??0}setNodePosX(e){this.NodePosX||(this.NodePosX=new Ue),this.NodePosX.value=Math.round(e)}getNodePosY(){return this.NodePosY?.value??0}setNodePosY(e){this.NodePosY||(this.NodePosY=new Ue),this.NodePosY.value=Math.round(e)}getCustomproperties(e=!1){return this.CustomProperties.values}getPinEntities(){return this.getCustomproperties().filter((e=>e.constructor===ft))}getSubobjects(){return Object.keys(this).filter((e=>e.startsWith(re.subObjectAttributeNamePrefix))).flatMap((e=>[this[e],...this[e].getSubobjects()]))}switchTarget(){const e=this.getClass().match(re.switchTargetPattern);if(e)return e[1]}isEvent(){switch(this.getClass()){case re.paths.actorBoundEvent:case re.paths.componentBoundEvent:case re.paths.customEvent:case re.paths.event:case re.paths.inputAxisKeyEvent:case re.paths.inputVectorAxisEvent:return!0}return!1}isComment(){switch(this.getClass()){case re.paths.comment:case re.paths.materialGraphNodeComment:return!0}return!1}isMaterial(){const e=this.getClass();return e.startsWith("/Script/Engine.MaterialExpression")||e.startsWith("/Script/InterchangeImport.MaterialExpression")||e.startsWith("/Script/UnrealEd.MaterialGraph")}getMaterialSubobject(){const e=this.MaterialExpression??this.MaterialExpressionComment;return e?this[re.subObjectAttributeNameFromReference(e,!0)]:null}isPcg(){return this.getClass()===re.paths.pcgEditorGraphNode||null!=this.getPcgSubobject()}isNiagara(){return this.Class&&(this.Class.type?this.Class.type:this.Class.path)?.startsWith("/Script/NiagaraEditor.")}getPcgSubobject(){const e=this.PCGNode;return e?this[re.subObjectAttributeNameFromReference(e,!0)]:null}getSettingsObject(){const e=this.SettingsInterface;return e?this[re.subObjectAttributeNameFromReference(e,!0)]:null}getSubgraphObject(){const e=this.SubgraphInstance;return e?this[re.subObjectAttributeNameFromName(e)]:null}isDevelopmentOnly(){const e=this.getClass();return"DevelopmentOnly"===this.EnabledState?.toString()||e.includes("Debug",Math.max(0,e.lastIndexOf(".")))}getHIDAttribute(){return this.InputKey??this.AxisKey??this.InputAxisKey}getDelegatePin(){return this.getCustomproperties().find((e=>"delegate"===e.PinType.PinCategory.toString()))}nodeColor(){return function(e){switch(e.getType()){case re.paths.materialExpressionConstant2Vector:case re.paths.materialExpressionConstant3Vector:case re.paths.materialExpressionConstant4Vector:return re.nodeColors.yellow;case re.paths.materialExpressionFunctionInput:case re.paths.materialExpressionTextureCoordinate:case re.paths.materialExpressionWorldPosition:case re.paths.pcgEditorGraphNodeInput:case re.paths.pcgEditorGraphNodeOutput:return re.nodeColors.red;case re.paths.makeStruct:return re.nodeColors.darkBlue;case re.paths.materialExpressionMaterialFunctionCall:return re.nodeColors.blue;case re.paths.materialExpressionTextureSample:return re.nodeColors.darkTurquoise;case re.paths.niagaraNodeInput:switch(e.Usage?.toString()){case"Attribute":return re.nodeColors.intenseGreen;case"Parameter":default:return re.nodeColors.red;case"RapidIterationParameter":return re.nodeColors.black;case"SystemConstant":case"TranslatorConstant":return re.nodeColors.gray}}switch(e.getClass()){case re.paths.callFunction:return e.bIsPureFunc?.valueOf()?re.nodeColors.green:re.nodeColors.blue;case re.paths.niagaraNodeFunctionCall:return re.nodeColors.darkerBlue;case re.paths.dynamicCast:return re.nodeColors.turquoise;case re.paths.inputDebugKey:case re.paths.inputKey:return re.nodeColors.red;case re.paths.createDelegate:case re.paths.enumLiteral:case re.paths.makeArray:case re.paths.makeMap:case re.paths.materialGraphNode:case re.paths.select:return re.nodeColors.green;case re.paths.executionSequence:case re.paths.ifThenElse:case re.paths.macro:case re.paths.multiGate:return re.nodeColors.gray;case re.paths.functionEntry:case re.paths.functionResult:return re.nodeColors.violet;case re.paths.timeline:return re.nodeColors.yellow}if(e.switchTarget())return re.nodeColors.lime;if(e.isEvent())return re.nodeColors.red;if(e.isComment())return(e.CommentColor?e.CommentColor:Ie.getWhite()).toDimmedColor().toCSSRGBValues();const t=e.getPcgSubobject();if(t){if(t.NodeTitleColor)return t.NodeTitleColor.toDimmedColor(.1).toCSSRGBValues();switch(e.PCGNode?.getName(!0)){case"Branch":case"Select":return re.nodeColors.intenseGreen}}return e.bIsPureFunc?.valueOf()?re.nodeColors.green:e.Input?.Name?re.nodeColors.gray:re.nodeColors.blue}(this)}nodeIcon(){return function(e){if(e.isMaterial()||e.isPcg()||e.isNiagara())return null;switch(e.getType()){case re.paths.addDelegate:case re.paths.asyncAction:case re.paths.callDelegate:case re.paths.clearDelegate:case re.paths.createDelegate:case re.paths.functionEntry:case re.paths.functionResult:case re.paths.removeDelegate:return le.node;case re.paths.customEvent:return le.event;case re.paths.doN:return le.doN;case re.paths.doOnce:return le.doOnce;case re.paths.dynamicCast:return le.cast;case re.paths.enumLiteral:return le.enum;case re.paths.event:return le.event;case re.paths.executionSequence:case re.paths.multiGate:return le.sequence;case re.paths.flipflop:return le.flipflop;case re.paths.forEachElementInEnum:case re.paths.forLoop:case re.paths.forLoopWithBreak:case re.paths.whileLoop:return le.loop;case re.paths.forEachLoop:case re.paths.forEachLoopWithBreak:return le.forEachLoop;case re.paths.ifThenElse:return le.branchNode;case re.paths.isValid:return le.questionMark;case re.paths.makeArray:return le.makeArray;case re.paths.makeMap:return le.makeMap;case re.paths.makeSet:return le.makeSet;case re.paths.makeStruct:return le.makeStruct;case re.paths.metasoundEditorGraphExternalNode:return le.metasoundFunction;case re.paths.select:return le.select;case re.paths.spawnActorFromClass:return le.spawnActor;case re.paths.timeline:return le.timer}if(e.switchTarget())return le.switch;if(ze(e).startsWith("Break"))return le.breakStruct;if(e.getClass()===re.paths.macro)return le.macro;const t=e.getHIDAttribute()?.toString();return t?t.includes("Mouse")?le.mouse:t.includes("Gamepad_Special")?le.keyboard:t.includes("Gamepad")||t.includes("Steam")?le.gamepad:t.includes("Touch")?le.touchpad:le.keyboard:e.getDelegatePin()?le.event:e.ObjectRef?.type===re.paths.ambientSound?le.sound:le.functionSymbol}(this)}additionalPinInserter(){return function(e){let t,i,s,n,r;switch(e.getType()){case re.paths.commutativeAssociativeBinaryOperator:case re.paths.promotableOperator:switch(r=e.FunctionReference?.MemberName?.toString(),r){default:if(!(r?.startsWith("Add_")||r?.startsWith("Subtract_")||r?.startsWith("Multiply_")||r?.startsWith("Divide_")))break;case"And_Int64Int64":case"And_IntInt":case"BMax":case"BMin":case"BooleanAND":case"BooleanNAND":case"BooleanOR":case"Concat_StrStr":case"FMax":case"FMin":case"Max":case"MaxInt64":case"Min":case"MinInt64":case"Or_Int64Int64":case"Or_IntInt":t??=()=>e.getPinEntities().filter((e=>e.isInput())),i??=yt,s??=(i,s=-1,n=-1)=>{const r=String.fromCharCode(i>=0?i:n+"A".charCodeAt(0)+1);return e.NumAdditionalInputs=new Ye(t().length-1),r}}break;case re.paths.executionSequence:n??="Then";case re.paths.multiGate:n??="Out",t??=()=>e.getPinEntities().filter((e=>e.isOutput())),i??=e=>Number(e.PinName?.toString().match(new RegExp(String.raw`^\s*${n}[_\s]+(\d+)\s*$`,"i"))?.[1]),s??=(e,t=-1,i=-1,s)=>`${n} ${e>=0?e:t>0?`${n} 0`:i+1}`;break;case re.paths.switchInteger:t??=()=>e.getPinEntities().filter((e=>e.isOutput())),i??=e=>Number(e.PinName?.toString().match(/^\s*(\d+)\s*$/)?.[1]),s??=(e,t=-1,i=-1,s)=>(e<0?i+1:e).toString();break;case re.paths.switchGameplayTag:s??=(t,i=-1,s=-1,n)=>{const r=`Case_${t>=0?t:i>0?"0":s+1}`;return e.PinNames??=new _e,e.PinNames.valueOf().push(new We(r)),delete e.PinTags.valueOf()[e.PinTags.length-1],e.PinTags.valueOf()[e.PinTags.length]=null,r};case re.paths.switchName:case re.paths.switchString:t??=()=>e.getPinEntities().filter((e=>e.isOutput())),i??=e=>Number(e.PinName.toString().match(/^\s*Case[_\s]+(\d+)\s*$/i)?.[1]),s??=(t,i=-1,s=-1,n)=>{const r=`Case_${t>=0?t:i>0?"0":s+1}`;return e.PinNames??=new _e,e.PinNames.valueOf().push(new We(r)),r}}if(t)return()=>{let n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,a=[];const o=t().reduce(((e,t)=>{const s=i(t);if(isNaN(s)){if(void 0===e)return t}else if(a.push(s),n=Math.min(s,n),s>r)return r=s,t;return e}),void 0);if(n!==Number.MAX_SAFE_INTEGER&&r!==Number.MIN_SAFE_INTEGER||(n=void 0,r=void 0),!o)return null;a.sort(((e,t)=>e{const t=e-l>1;return l=e,t}));const u=new ft(o);return u.PinId=new je,u.PinName=new We(s(c,n,r,u)),u.PinToolTip=void 0,u.DefaultValue&&(u.DefaultValue=new u.DefaultValue.constructor),e.getCustomproperties(!0).push(u),u}}(this)}showProperty(e){switch(e){case"Class":case"Name":case"Archetype":case"ExportPath":case"CustomProperties":return!1}return super.showProperty(e)}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,n=i.keySeparator,r=i.attributeSeparator,a=i.wrap){const o=t+re.indentation,l=this.trailing;this.trailing=!1;const c=super.doSerialize(e,o,i,s,n,r,a);return this.trailing=l,t+"Begin Object"+(this.Class?.type||this.Class?.path?` Class${n}${this.Class.serialize(e)}`:"")+(this.Name?` Name${n}${this.Name.serialize(e)}`:"")+(this.Archetype?` Archetype${n}${this.Archetype.serialize(e)}`:"")+(this.ExportPath?.valueOf()?.type||this.ExportPath?.valueOf()?.path?` ExportPath${n}${this.ExportPath.serialize(e)}`:"")+(c?r+c:"")+(!0!==i.attributes.CustomProperties.ignored&&!0!==this.CustomProperties.ignored?this.getCustomproperties().map((t=>r+o+s("CustomProperties ")+t.serialize(e))).join(""):"")+r+t+"End Object"+(this.trailing?r:"")}}class Pt extends xt{constructor(e={},t=void 0){e.Class=new at(re.paths.knot),e.Name=new xt.attributes.Name("K2Node_Knot");const i=new ft({PinName:new ft.attributes.PinName("InputPin")}),s=new ft({PinName:new ft.attributes.PinName("OutputPin"),Direction:new ft.attributes.Direction("EGPD_Output")});t&&(i.copyTypeFrom(t),s.copyTypeFrom(t)),e.CustomProperties=new xt.attributes.CustomProperties([i,s]),super(e)}}class kt{#q;get target(){return this.#q}#e;get blueprint(){return this.#e}consumeEvent;options;listenHandler=()=>this.listenEvents();unlistenHandler=()=>this.unlistenEvents();constructor(e,t,i={}){i.consumeEvent??=!1,i.listenOnFocus??=!1,i.unlistenOnTextEdit??=!1,this.#q=e,this.#e=t,this.consumeEvent=i.consumeEvent,this.options=i}setup(){this.options.listenOnFocus&&(this.blueprint.addEventListener(re.focusEventName.begin,this.listenHandler),this.blueprint.addEventListener(re.focusEventName.end,this.unlistenHandler)),this.options.unlistenOnTextEdit&&(this.blueprint.addEventListener(re.editTextEventName.begin,this.unlistenHandler),this.blueprint.addEventListener(re.editTextEventName.end,this.listenHandler)),this.blueprint.focused&&this.listenEvents()}cleanup(){this.unlistenEvents(),this.blueprint.removeEventListener(re.focusEventName.begin,this.listenHandler),this.blueprint.removeEventListener(re.focusEventName.end,this.unlistenHandler),this.blueprint.removeEventListener(re.editTextEventName.begin,this.unlistenHandler),this.blueprint.removeEventListener(re.editTextEventName.end,this.listenHandler)}listenEvents(){}unlistenEvents(){}}class At extends Pe{static attributes={...super.attributes,ActionName:We,bShift:ke,bCtrl:ke,bAlt:ke,bCmd:ke,Key:Je};static grammar=this.createGrammar();constructor(e){super(e),this.ActionName,this.bShift,this.bCtrl,this.bAlt,this.bCmd,this.Key}static createGrammar(){return xe.alt(Je.grammar.map((e=>new this({Key:e}))),Me.createEntityGrammar(this))}}class Lt extends kt{static#K=e=>{};#X;pressedKey="";constructor(e,t,i={},s=Lt.#K,n=Lt.#K){i.activationKeys??=[],i.consumeEvent??=!0,i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,i.activationKeys instanceof Array||(i.activationKeys=[i.activationKeys]),i.activationKeys=i.activationKeys.map((e=>{if(e instanceof At)return e;if(e.constructor===String){const t=At.grammar.run(e);if(t.status)return t.value}throw new Error("Unexpected key value")})),super(e,t,i),this.onKeyDown=s,this.onKeyUp=n,this.#X=this.options.activationKeys??[];let r=this;this.keyDownHandler=e=>{r.#X.some((t=>(e=>e.bShift?.valueOf()||"LeftShift"==e.Key.valueOf()||"RightShift"==e.Key.valueOf())(t)==e.shiftKey&&(e=>e.bCtrl?.valueOf()||"LeftControl"==e.Key.valueOf()||"RightControl"==e.Key.valueOf())(t)==e.ctrlKey&&(e=>e.bAlt?.valueOf()||"LeftAlt"==e.Key.valueOf()||"RightAlt"==e.Key.valueOf())(t)==e.altKey&&re.Keys[t.Key.value]==e.code))&&(this.consumeEvent&&(e.preventDefault(),e.stopImmediatePropagation()),this.pressedKey=e.code,r.fire(),document.removeEventListener("keydown",r.keyDownHandler),document.addEventListener("keyup",r.keyUpHandler))},this.keyUpHandler=e=>{r.#X.some((t=>t.bShift?.valueOf()&&"Shift"==e.key||t.bCtrl?.valueOf()&&"Control"==e.key||t.bAlt?.valueOf()&&"Alt"==e.key||t.bCmd?.valueOf()&&"Meta"==e.key||re.Keys[t.Key.value]==e.code))&&(this.consumeEvent&&e.stopImmediatePropagation(),r.unfire(),this.pressedKey="",document.removeEventListener("keyup",this.keyUpHandler),document.addEventListener("keydown",this.keyDownHandler))}}listenEvents(){document.addEventListener("keydown",this.keyDownHandler)}unlistenEvents(){document.removeEventListener("keydown",this.keyDownHandler)}fire(){this.onKeyDown(this)}unfire(){this.onKeyUp(this)}}class Mt extends kt{#Z=[0,0];get location(){return this.#Z}#W;get enablerKey(){return this.#W}#Q=!0;get enablerActivated(){return this.#Q}constructor(e,t,i={}){i.ignoreTranslateCompensate??=!1,i.ignoreScale??=!1,i.movementSpace??=t.getGridDOMElement()??document.documentElement,super(e,t,i),this.movementSpace=i.movementSpace,i.enablerKey&&(this.#W=i.enablerKey,this.#W.onKeyDown=()=>this.#Q=!0,this.#W.onKeyUp=()=>this.#Q=!1,this.#W.consumeEvent=!1,this.#W.listenEvents(),this.#Q=!1)}setLocationFromEvent(e){let t=ae.convertLocation([e.clientX,e.clientY],this.movementSpace,this.options.ignoreScale);return t=this.options.ignoreTranslateCompensate?t:this.blueprint.compensateTranslation(t[0],t[1]),this.#Z=[...t],this.#Z}}class Tt extends Mt{static#K=e=>{};#J=e=>{if(this.blueprint.setFocused(!0),!this.enablerKey||this.enablerActivated)if(e.button===this.options.clickButton)this.options.strictTarget&&e.target!==e.currentTarget||(this.consumeEvent&&e.stopImmediatePropagation(),document.addEventListener("mouseup",this.#ee),this.setLocationFromEvent(e),this.clickedPosition[0]=this.location[0],this.clickedPosition[1]=this.location[1],this.blueprint.mousePosition[0]=this.location[0],this.blueprint.mousePosition[1]=this.location[1],this.clicked(this.clickedPosition));else this.options.exitAnyButton||this.#ee(e)};#ee=e=>{this.options.exitAnyButton&&e.button!=this.options.clickButton||(this.consumeEvent&&e.stopImmediatePropagation(),document.removeEventListener("mouseup",this.#ee),this.unclicked())};clickedPosition=[0,0];constructor(e,t,i={},s=Tt.#K,n=Tt.#K){i.clickButton??=re.mouseClickButton,i.consumeEvent??=!0,i.exitAnyButton??=!0,i.strictTarget??=!1,super(e,t,i),this.onClick=s,this.onUnclick=n,this.listenEvents()}listenEvents(){this.target.addEventListener("mousedown",this.#J),this.options.clickButton===re.mouseRightClickButton&&this.target.addEventListener("contextmenu",(e=>e.preventDefault()))}unlistenEvents(){this.target.removeEventListener("mousedown",this.#J)}clicked(e){this.onClick(this)}unclicked(e){this.onUnclick(this)}}class It extends Mt{static ignoreDbClick=e=>{};#te=e=>{this.options.strictTarget&&e.target!==e.currentTarget||(this.consumeEvent&&e.stopImmediatePropagation(),this.clickedPosition=this.setLocationFromEvent(e),this.blueprint.mousePosition=[...this.clickedPosition],this.dbclicked(this.clickedPosition))};#ie;get onDbClick(){return this.#ie}set onDbClick(e){this.#ie=e}clickedPosition=[0,0];constructor(e,t,i={},s=It.ignoreDbClick){i.consumeEvent??=!0,i.strictTarget??=!1,super(e,t,i),this.#ie=s,this.listenEvents()}listenEvents(){this.target.addEventListener("dblclick",this.#te)}unlistenEvents(){this.target.removeEventListener("dblclick",this.#te)}dbclicked(e){this.onDbClick(e)}}class Ot{static deleteNodes="Delete";static duplicateNodes="(bCtrl=True,Key=D)";static enableLinkDelete="LeftAlt";static enableZoomIn=["LeftControl","RightControl"];static selectAllNodes="(bCtrl=True,Key=A)"}class Dt{element;get blueprint(){return this.element.blueprint}#se=[];get inputObjects(){return this.#se}initialize(e){this.element=e}createInputObjects(){return[]}setup(){this.#se.forEach((e=>e.setup()))}cleanup(){this.#se.forEach((e=>e.cleanup()))}willUpdate(e){}update(e){}render(){return R``}firstUpdated(e){}updated(e){}inputSetup(){this.#se=this.createInputObjects()}}class $t extends Dt{update(e){super.update(e);const[t,i,s,n]=[Math.round(this.element.fromX),Math.round(this.element.fromY),Math.round(this.element.toX),Math.round(this.element.toY)],[r,a,o,l]=[Math.min(t,s),Math.min(i,n),Math.abs(t-s),Math.abs(i-n)];(e.has("fromX")||e.has("toX"))&&(this.element.style.left=`${r}px`,this.element.style.width=`${o}px`),(e.has("fromY")||e.has("toY"))&&(this.element.style.top=`${a}px`,this.element.style.height=`${l}px`)}}class Bt extends $t{static sigmoidPositive(e,t=3.7,i=1.1){return 1-Math.exp(-((e/i)**t))}static decreasingValue(e,t){const i=-e*t[0]**2,s=t[1]-i/t[0];return e=>i/e+s}static clampedLine(e,t){if(e[0]>t[0]){const i=e;e=t,t=i}const i=(t[1]-e[1])/(t[0]-e[0]),s=e[1]-i*e[0];return n=>nt[0]?t[1]:i*n+s}static c1DecreasingValue=Bt.decreasingValue(-.15,[100,15]);static c2DecreasingValue=Bt.decreasingValue(-.05,[500,130]);static c2Clamped=Bt.clampedLine([0,80],[200,40]);#ne=`ueb-id-${Math.floor(1e12*Math.random())}`;#re=e=>{const t=new Pt({},this.element.source.entity),i=Ae.getConstructor("ueb-node").newObject(t);i.setLocation(...this.blueprint.snapToGrid(...e));const s=i.template;this.blueprint.addGraphElement(i);const n=this.element.getInputPin(),r=this.element.getOutputPin();this.element.source=null,this.element.destination=null;const a=Ae.getConstructor("ueb-link").newObject(r,s.inputPin);this.blueprint.addGraphElement(a),this.element.source=s.outputPin,this.element.destination=n};createInputObjects(){const e=this.element.querySelector(".ueb-link-area");return[...super.createInputObjects(),new It(e,this.blueprint,void 0,(e=>{e[0]+=re.knotOffset[0],e[1]+=re.knotOffset[1],e=ae.snapToGrid(e[0],e[1],re.gridSize),this.#re(e)})),new Tt(e,this.blueprint,{enablerKey:new Lt(this.blueprint,this.blueprint,{activationKeys:Ot.enableLinkDelete})},(()=>this.blueprint.removeGraphElement(this.element)))]}willUpdate(e){super.willUpdate(e);const t=this.element.source,i=this.element.destination;if(e.has("fromX")||e.has("toX")){const e=this.element.fromX,s=this.element.toX,n=t?.nodeElement.getType()==re.paths.knot,r=i?.nodeElement.getType()==re.paths.knot;!n||i&&!r||(t?.isInput()&&s>e+re.distanceThreshold?this.element.source=t.nodeElement.template.outputPin:t?.isOutput()&&se+re.distanceThreshold&&(this.element.destination=i.nodeElement.template.inputPin))}const s=Math.max(Math.abs(this.element.fromX-this.element.toX),1),n=Math.max(Math.abs(this.element.fromY-this.element.toY),1),r=Math.max(s,re.linkMinWidth),a=s/r,o=this.element.originatesFromInput?this.element.fromXthis.element.toY?1:0)),this.element.style.setProperty("--ueb-start-percentage",`${Math.round(this.element.startPercentage)}%`),this.element.style.setProperty("--ueb-link-start",`${Math.round(this.element.startPixels)}`)}render(){return R` ${this.element.linkMessageIcon||this.element.linkMessageText?R``:V}`}}class Rt extends oe{static properties={...super.properties,fromX:{type:Number,attribute:!1},fromY:{type:Number,attribute:!1},toX:{type:Number,attribute:!1},toY:{type:Number,attribute:!1}};constructor(){super(),this.fromX=0,this.fromY=0,this.toX=0,this.toY=0}setBothLocations([e,t]){this.fromX=e,this.fromY=t,this.toX=e,this.toY=t}addSourceLocation(e,t){this.fromX+=e,this.fromY+=t}addDestinationLocation(e,t){this.toX+=e,this.toY+=t}}class Gt extends Rt{static properties={...super.properties,dragging:{type:Boolean,attribute:"data-dragging",converter:ke.booleanConverter,reflect:!0},originatesFromInput:{type:Boolean,attribute:!1},svgPathD:{type:String,attribute:!1},linkMessageIcon:{type:String,attribute:!1},linkMessageText:{type:String,attribute:!1}};#ae;get source(){return this.#ae}set source(e){this.#oe(e,!1)}#le;get destination(){return this.#le}set destination(e){this.#oe(e,!0)}#ce=()=>this.remove();#ue=e=>this.addSourceLocation(...e.detail.value);#he=e=>this.addDestinationLocation(...e.detail.value);#pe=e=>this.setSourceLocation();#de=e=>this.setDestinationLocation();linkMessageIcon=V;linkMessageText=V;pathElement;constructor(){super(),this.dragging=!1,this.originatesFromInput=!1,this.startPercentage=0,this.svgPathD="",this.startPixels=0}static newObject(e,t){const i=new Gt;return i.initialize(e,t),i}initialize(e,t){super.initialize({},new Bt),e&&(this.source=e,t||(this.toX=this.fromX,this.toY=this.fromY)),t&&(this.destination=t,e||(this.fromX=this.toX,this.fromY=this.toY))}#oe(e,t){const i=()=>t?this.destination:this.source;if(i()!=e){if(i()){const e=i().getNodeElement();e.removeEventListener(re.removeEventName,this.#ce),e.removeEventListener(re.nodeDragEventName,t?this.#he:this.#ue),e.removeEventListener(re.nodeReflowEventName,t?this.#de:this.#pe),this.#me()}if(t?this.#le=e:this.#ae=e,i()){const e=i().getNodeElement();e.addEventListener(re.removeEventName,this.#ce),e.addEventListener(re.nodeDragEventName,t?this.#he:this.#ue),e.addEventListener(re.nodeReflowEventName,t?this.#de:this.#pe),t?this.setDestinationLocation():(this.setSourceLocation(),this.originatesFromInput=this.source.isInput()),this.#ge()}}}#ge(){this.source&&this.destination&&(this.source.linkTo(this.destination),this.destination.linkTo(this.source))}#me(){this.source&&this.destination&&(this.source.unlinkFrom(this.destination,!1),this.destination.unlinkFrom(this.source,!1))}cleanup(){super.cleanup(),this.#me(),this.source=null,this.destination=null}setSourceLocation(e=null,t=!0){if(null==e){const i=this;if(t&&(!this.hasUpdated||!this.source.hasUpdated))return void Promise.all([this.updateComplete,this.source.updateComplete]).then((()=>i.setSourceLocation(null,!1)));e=this.source.template.getLinkLocation()}const[i,s]=e;this.fromX=i,this.fromY=s}setDestinationLocation(e=null,t=!0){if(null==e){const i=this;if(t&&(!this.hasUpdated||!this.destination.hasUpdated))return void Promise.all([this.updateComplete,this.destination.updateComplete]).then((()=>i.setDestinationLocation(null,!1)));e=this.destination.template.getLinkLocation()}this.toX=e[0],this.toY=e[1]}getInputPin(e=!1){return this.source?.isInput()?this.source:this.destination?.isInput()?this.destination:e?this.source??this.destination:void 0}setInputPin(e){this.source?.isInput()&&(this.source=e),this.destination=e}getOutputPin(e=!1){return this.source?.isOutput()?this.source:this.destination?.isOutput()?this.destination:e?this.source??this.destination:void 0}setOutputPin(e){this.destination?.isOutput()&&(this.destination=e),this.source=e}startDragging(){this.dragging=!0}finishDragging(){this.dragging=!1}removeMessage(){this.linkMessageIcon=V,this.linkMessageText=V}setMessageConvertType(){this.linkMessageIcon=le.convert,this.linkMessageText=R`Convert ${this.source.pinType} to ${this.destination.pinType}.`}setMessageCorrect(){this.linkMessageIcon=le.correct,this.linkMessageText=V}setMessageReplace(){this.linkMessageIcon=le.correct,this.linkMessageText=V}setMessageDirectionsIncompatible(){this.linkMessageIcon=le.reject,this.linkMessageText=R`Directions are not compatbile.`}setMessagePlaceNode(){this.linkMessageIcon=V,this.linkMessageText=R`Place a new node.`}setMessageReplaceLink(){this.linkMessageIcon=le.correct,this.linkMessageText=R`Replace existing input connections.`}setMessageReplaceOutputLink(){this.linkMessageIcon=le.correct,this.linkMessageText=R`Replace existing output connections.`}setMessageSameNode(){this.linkMessageIcon=le.reject,this.linkMessageText=R`Both are on the same node.`}setMessageTypesIncompatible(e,t){this.linkMessageIcon=le.reject,this.linkMessageText=R`${ae.capitalFirstLetter(e.pinType)} is not compatible with ${ae.capitalFirstLetter(t.pinType)}.`}}class Vt extends oe{static properties={...super.properties,locationX:{type:Number,attribute:!1},locationY:{type:Number,attribute:!1},sizeX:{type:Number,attribute:!1},sizeY:{type:Number,attribute:!1}};static dragEventName=re.dragEventName;static dragGeneralEventName=re.dragGeneralEventName;constructor(){super(),this.locationX=0,this.locationY=0,this.sizeX=0,this.sizeY=0}computeSizes(){const e=this.getBoundingClientRect();this.sizeX=this.blueprint.scaleCorrect(e.width),this.sizeY=this.blueprint.scaleCorrect(e.height)}firstUpdated(e){super.firstUpdated(e),this.computeSizes()}setLocation(e,t,i=!0){const s=e-this.locationX,n=t-this.locationY;if(this.locationX=e,this.locationY=t,this.blueprint&&i){const e=new CustomEvent(this.constructor.dragEventName,{detail:{value:[s,n]},bubbles:!1,cancelable:!0});this.dispatchEvent(e)}}addLocation(e,t,i=!0){this.setLocation(this.locationX+e,this.locationY+t,i)}acknowledgeDrag(e){const t=new CustomEvent(this.constructor.dragGeneralEventName,{detail:{value:e},bubbles:!0,cancelable:!0});this.dispatchEvent(t)}snapToGrid(){const e=ae.snapToGrid(this.locationX,this.locationY,re.gridSize);this.locationX==e[0]&&this.locationY==e[1]||this.setLocation(e[0],e[1])}topBoundary(e=!1){return this.template.topBoundary(e)}rightBoundary(e=!1){return this.template.rightBoundary(e)}bottomBoundary(e=!1){return this.template.bottomBoundary(e)}leftBoundary(e=!1){return this.template.leftBoundary(e)}}class Ht extends Mt{#J=e=>{if(this.blueprint.setFocused(!0),e.button===this.options.clickButton)this.options.strictTarget&&e.target!=e.currentTarget||(this.consumeEvent&&e.stopImmediatePropagation(),this.#be.addEventListener("mousemove",this.#ve),document.addEventListener("mouseup",this.#ee),this.setLocationFromEvent(e),this.clickedPosition[0]=this.location[0],this.clickedPosition[1]=this.location[1],this.blueprint.mousePosition[0]=this.location[0],this.blueprint.mousePosition[1]=this.location[1],this.target instanceof Vt&&(this.clickedOffset=[this.clickedPosition[0]-this.target.locationX,this.clickedPosition[1]-this.target.locationY]),this.clicked(this.clickedPosition));else this.options.exitAnyButton||this.#ee(e)};#ve=e=>{this.consumeEvent&&e.stopImmediatePropagation(),this.#be.removeEventListener("mousemove",this.#ve),this.#be.addEventListener("mousemove",this.#fe);const t=this.getEvent(re.trackingMouseEventName.begin);this.#ye=0==this.target.dispatchEvent(t),this.setLocationFromEvent(e),this.lastLocation=ae.snapToGrid(this.clickedPosition[0],this.clickedPosition[1],this.stepSize),this.startDrag(this.location),this.started=!0,this.#fe(e)};#fe=e=>{this.consumeEvent&&e.stopImmediatePropagation();const t=this.setLocationFromEvent(e),i=[e.movementX,e.movementY];if(this.dragTo(t,i),this.#ye&&(this.blueprint.mousePosition=t),this.options.scrollGraphEdge){const e=Math.sqrt(i[0]*i[0]+i[1]*i[1]),s=this.blueprint.scaleCorrect(re.edgeScrollThreshold),n=this.blueprint.template.gridLeftVisibilityBoundary()+s,r=this.blueprint.template.gridRightVisibilityBoundary()-s;let a=0;t[0]r&&(a=t[0]-r);const o=this.blueprint.template.gridTopVisibilityBoundary()+s,l=this.blueprint.template.gridBottomVisibilityBoundary()-s;let c=0;t[1]l&&(c=t[1]-l),a=ae.clamp(this.blueprint.scaleCorrectReverse(a)**3*e*.6,-20,20),c=ae.clamp(this.blueprint.scaleCorrectReverse(c)**3*e*.6,-20,20),this.blueprint.scrollDelta(a,c)}};#ee=e=>{if(!this.options.exitAnyButton||e.button==this.options.clickButton){if(this.consumeEvent&&e.stopImmediatePropagation(),this.#be.removeEventListener("mousemove",this.#ve),this.#be.removeEventListener("mousemove",this.#fe),document.removeEventListener("mouseup",this.#ee),this.started&&this.endDrag(),this.unclicked(),this.#ye){const e=this.getEvent(re.trackingMouseEventName.end);this.target.dispatchEvent(e),this.#ye=!1}this.started=!1}};#ye=!1;#be;#we;get draggableElement(){return this.#we}clickedOffset=[0,0];clickedPosition=[0,0];lastLocation=[0,0];started=!1;stepSize=1;constructor(e,t,i={}){i.clickButton??=re.mouseClickButton,i.consumeEvent??=!0,i.draggableElement??=e,i.exitAnyButton??=!0,i.moveEverywhere??=!1,i.movementSpace??=t?.getGridDOMElement(),i.repositionOnClick??=!1,i.scrollGraphEdge??=!1,i.strictTarget??=!1,super(e,t,i),this.stepSize=Number(i.stepSize??re.gridSize),this.#be=this.options.moveEverywhere?document.documentElement:this.movementSpace,this.#we=this.options.draggableElement,this.listenEvents()}listenEvents(){super.listenEvents(),this.#we.addEventListener("mousedown",this.#J),this.options.clickButton===re.mouseRightClickButton&&this.#we.addEventListener("contextmenu",(e=>e.preventDefault()))}unlistenEvents(){super.unlistenEvents(),this.#we.removeEventListener("mousedown",this.#J)}getEvent(e){return new CustomEvent(e,{detail:{tracker:this},bubbles:!0,cancelable:!0})}clicked(e){}startDrag(e){}dragTo(e,t){}endDrag(){}unclicked(e){}}class zt extends Ht{clicked(e){this.options.repositionOnClick&&(this.target.setLocation(...this.stepSize>1?ae.snapToGrid(e[0],e[1],this.stepSize):e),this.clickedOffset=[0,0])}dragTo(e,t){const i=[this.target.locationX??this.lastLocation[0],this.target.locationY??this.lastLocation[1]],[s,n]=this.stepSize>1?[ae.snapToGrid(e[0],e[1],this.stepSize),ae.snapToGrid(i[0],i[1],this.stepSize)]:[e,i];0==(t=[s[0]-this.lastLocation[0],s[1]-this.lastLocation[1]])[0]&&0==t[1]||(t[0]+=n[0]-i[0],t[1]+=n[1]-i[1],this.dragAction(s,t),this.lastLocation=s)}dragAction(e,t){this.target.setLocation(e[0]-this.clickedOffset[0],e[1]-this.clickedOffset[1])}}class _t extends zt{#Se;#Ee;#Ce;#Ne;constructor(e,t,i={}){super(e,t,i),i.onClicked&&(this.#Se=i.onClicked),i.onStartDrag&&(this.#Ee=i.onStartDrag),i.onDrag&&(this.#Ce=i.onDrag),i.onEndDrag&&(this.#Ne=i.onEndDrag)}clicked(e){super.clicked(e),this.#Se?.()}startDrag(){super.startDrag(),this.#Ee?.()}dragAction(e,t){this.#Ce?.(e,t)}endDrag(){super.endDrag(),this.#Ne?.()}}class Ft extends zt{constructor(e,t,i={}){super(e,t,i),this.draggableElement.classList.add("ueb-draggable")}startDrag(){this.target.selected||(this.blueprint.unselectAll(),this.target.setSelected(!0))}dragAction(e,t){this.target.acknowledgeDrag(t)}unclicked(){this.started?(this.blueprint.getNodes(!0).forEach((e=>e.boundComments.filter((t=>!e.isInsideComment(t))).forEach((t=>e.unbindFromComment(t))))),this.blueprint.getCommentNodes().forEach((e=>e.template.manageNodesBind()))):(this.blueprint.unselectAll(),this.target.setSelected(!0))}}class jt extends Dt{getDraggableElement(){return this.element}createDraggableObject(){const e=this.getDraggableElement();return new zt(this.element,this.blueprint,{draggableElement:e})}createInputObjects(){return[...super.createInputObjects(),this.createDraggableObject(),new Lt(this.element,this.blueprint,{activationKeys:[re.Keys.ArrowUp,re.Keys.ArrowRight,re.Keys.ArrowDown,re.Keys.ArrowLeft]},(e=>e.target.acknowledgeDrag([e.pressedKey===re.Keys.ArrowLeft?-re.gridSize:e.pressedKey===re.Keys.ArrowRight?re.gridSize:0,e.pressedKey===re.Keys.ArrowUp?-re.gridSize:e.pressedKey===re.Keys.ArrowDown?re.gridSize:0])))]}topBoundary(e=!1){return this.element.locationY}rightBoundary(e=!1){return this.element.locationX+this.element.sizeX}bottomBoundary(e=!1){return this.element.locationY+this.element.sizeY}leftBoundary(e=!1){return this.element.locationX}centerInViewport(){const e=Math.min(this.blueprint.template.viewportSize[0]/10,this.blueprint.template.viewportSize[1]/10),t=this.leftBoundary()-this.blueprint.template.gridLeftVisibilityBoundary(),i=this.blueprint.template.gridRightVisibilityBoundary()-this.rightBoundary();let s=Math.max((t+i)/2,e);const n=this.topBoundary()-this.blueprint.template.gridTopVisibilityBoundary(),r=this.blueprint.template.gridBottomVisibilityBoundary()-this.bottomBoundary();let a=Math.max((n+r)/2,e);this.blueprint.scrollDelta(t-s,n-a,!0)}}class Ut extends jt{update(e){super.update(e),e.has("locationX")&&(this.element.style.left=`${this.element.locationX}px`),e.has("locationY")&&(this.element.style.top=`${this.element.locationY}px`)}}class Yt extends Ut{getDraggableElement(){return this.element}createDraggableObject(){return new Ft(this.element,this.blueprint,{draggableElement:this.getDraggableElement(),scrollGraphEdge:!0})}firstUpdated(e){super.firstUpdated(e),this.element.selected&&!this.element.listeningDrag&&this.element.setSelected(!0)}}class qt extends Yt{static nodeStyleClasses=["ueb-node-style-default"];#xe;pinInserter;inputContainer;outputContainer;pinElement;addPinHandler=()=>{const e=this.pinInserter?.();e&&(this.defaultPin&&this.defaultPin.isInput()===e.isInput()?this.defaultPin.before(this.createPinElement(e)):(e.isInput()?this.inputContainer:this.outputContainer).appendChild(this.createPinElement(e)),this.element.acknowledgeReflow())};toggleAdvancedDisplayHandler=()=>{this.element.toggleShowAdvancedPinDisplay(),this.element.requestUpdate(),this.element.updateComplete.then((()=>this.element.acknowledgeReflow()))};createPinElement(e){const t=Ae.getConstructor("ueb-pin").newObject(e,void 0,this.element);return this.pinInserter&&!this.defaultPin&&"Default"===t.getPinName()&&(this.defaultPin=t,this.defaultPin.classList.add("ueb-node-variadic-default")),t}initialize(e){super.initialize(e),this.#xe=function(e){switch(e.getType()){case re.paths.addDelegate:case re.paths.clearDelegate:case re.paths.callDelegate:case re.paths.removeDelegate:return null}const t=e.getPinEntities().find((e=>!e.isHidden()&&"self"===e.PinName?.toString()&&"Target"===Xe(e)));if(t){const i=e.FunctionReference?.MemberParent?.getName()??t.PinType?.PinSubCategoryObject?.getName()??"Untitled";return i.length>0?`Target is ${ae.formatStringName(i)}`:null}return null}(e.entity),this.element.classList.add(...this.constructor.nodeStyleClasses),this.element.style.setProperty("--ueb-node-color",this.getColor().cssText),this.pinInserter=this.element.entity.additionalPinInserter(),this.pinInserter&&this.element.classList.add("ueb-node-is-variadic")}getColor(){return this.element.entity.nodeColor()}render(){return R`
${this.renderTop()}
${this.pinInserter?R`
Add pin ${le.plusCircle}
`:V} ${this.element.entity.isDevelopmentOnly()?R`
Development Only
`:V} ${this.element.advancedPinDisplay?R`
${le.expandIcon}
`:V}
`}renderNodeIcon(){return this.element.entity.nodeIcon()}renderNodeName(){return this.element.nodeDisplayName}renderTop(){const e=this.renderNodeIcon(),t=this.renderNodeName();return R`
${e?R`
${e}
`:V} ${t?R`
${t} ${this.#xe?R`
${this.#xe}
`:V}
`:V}
`}firstUpdated(e){super.firstUpdated(e),this.inputContainer=this.element.querySelector(".ueb-node-inputs"),this.outputContainer=this.element.querySelector(".ueb-node-outputs"),this.setupPins(),this.element.updateComplete.then((()=>this.element.acknowledgeReflow()))}setupPins(){this.element.nodeNameElement=this.element.querySelector(".ueb-node-name-text");let e=!1,t=!1;for(const i of this.getPinElements())i!==this.defaultPin&&(i.isInput()?(this.inputContainer.appendChild(i),e=!0):i.isOutput()&&(this.outputContainer.appendChild(i),t=!0));this.defaultPin&&(this.defaultPin.isInput()?this.inputContainer:this.outputContainer).appendChild(this.defaultPin),e&&this.element.classList.add("ueb-node-has-inputs"),t&&this.element.classList.add("ueb-node-has-outputs")}getPinElements(){return this.element.getPinElements()}createPinElements(){return this.element.getPinEntities().filter((e=>!e.isHidden())).map((e=>this.createPinElement(e)))}linksChanged(){}}class Kt extends qt{#Pe=document.createElement("div");#ke=document.createElement("div");#Ae=document.createElement("div");#Le=document.createElement("div");#Me=document.createElement("div");#Te=document.createElement("div");#Ie=document.createElement("div");#Oe=document.createElement("div");initialize(e){super.initialize(e),this.element.classList.add("ueb-resizeable"),this.#Pe.classList.add("ueb-resizeable-top"),this.#ke.classList.add("ueb-resizeable-right"),this.#Ae.classList.add("ueb-resizeable-bottom"),this.#Le.classList.add("ueb-resizeable-left"),this.#Me.classList.add("ueb-resizeable-top-right"),this.#Te.classList.add("ueb-resizeable-bottom-right"),this.#Ie.classList.add("ueb-resizeable-bottom-left"),this.#Oe.classList.add("ueb-resizeable-top-left")}update(e){super.update(e),this.element.sizeX>=0&&e.has("sizeX")&&(this.element.style.width=`${this.element.sizeX}px`),this.element.sizeY>=0&&e.has("sizeY")&&(this.element.style.height=`${this.element.sizeY}px`)}firstUpdated(e){super.firstUpdated(e),this.element.append(this.#Pe,this.#ke,this.#Ae,this.#Le,this.#Me,this.#Te,this.#Ie,this.#Oe)}createInputObjects(){return[...super.createInputObjects(),new _t(this.#Pe,this.blueprint,{onDrag:(e,t)=>{t[1]=e[1]-this.element.topBoundary(),this.setSizeY(this.element.sizeY-t[1])&&this.element.addLocation(0,t[1],!1)},onEndDrag:()=>this.endResize()}),new _t(this.#ke,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.rightBoundary(),this.setSizeX(this.element.sizeX+t[0])},onEndDrag:()=>this.endResize()}),new _t(this.#Ae,this.blueprint,{onDrag:(e,t)=>{t[1]=e[1]-this.element.bottomBoundary(),this.setSizeY(this.element.sizeY+t[1])},onEndDrag:()=>this.endResize()}),new _t(this.#Le,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.leftBoundary(),this.setSizeX(this.element.sizeX-t[0])&&this.element.addLocation(t[0],0,!1)},onEndDrag:()=>this.endResize()}),new _t(this.#Me,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.rightBoundary(),t[1]=e[1]-this.element.topBoundary(),this.setSizeX(this.element.sizeX+t[0]),this.setSizeY(this.element.sizeY-t[1])&&this.element.addLocation(0,t[1],!1)},onEndDrag:()=>this.endResize()}),new _t(this.#Te,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.rightBoundary(),t[1]=e[1]-this.element.bottomBoundary(),this.setSizeX(this.element.sizeX+t[0]),this.setSizeY(this.element.sizeY+t[1])},onEndDrag:()=>this.endResize()}),new _t(this.#Ie,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.leftBoundary(),t[1]=e[1]-this.element.bottomBoundary(),this.setSizeX(this.element.sizeX-t[0])&&this.element.addLocation(t[0],0,!1),this.setSizeY(this.element.sizeY+t[1])},onEndDrag:()=>this.endResize()}),new _t(this.#Oe,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.leftBoundary(),t[1]=e[1]-this.element.topBoundary(),this.setSizeX(this.element.sizeX-t[0])&&this.element.addLocation(t[0],0,!1),this.setSizeY(this.element.sizeY-t[1])&&this.element.addLocation(0,t[1],!1)},onEndDrag:()=>this.endResize()})]}setSizeX(e){return this.element.setNodeWidth(e),!0}setSizeY(e){return this.element.setNodeHeight(e),!0}endResize(){}}class Xt extends Kt{#De=0;initialize(e){super.initialize(e),e.classList.add("ueb-node-style-comment","ueb-node-resizeable"),e.sizeX=25*re.gridSize,e.sizeY=6*re.gridSize,super.initialize(e)}getDraggableElement(){return this.element.querySelector(".ueb-node-top")}render(){return R`
`}firstUpdated(e){super.firstUpdated(e);const t=this.getDraggableElement().getBoundingClientRect();this.#De=t.height}manageNodesBind(){let e=this.blueprint.getNodes();for(let t of e)t.topBoundary()>=this.element.topBoundary()&&t.rightBoundary()<=this.element.rightBoundary()&&t.bottomBoundary()<=this.element.bottomBoundary()&&t.leftBoundary()>=this.element.leftBoundary()?t.bindToComment(this.element):t.unbindFromComment(this.element)}setSizeX(e){return(e=Math.round(e))>=2*re.gridSize&&(this.element.setNodeWidth(e),!0)}setSizeY(e){return(e=Math.round(e))>=2*re.gridSize&&(this.element.setNodeHeight(e),!0)}endResize(){this.manageNodesBind()}topBoundary(e=!1){return this.element.locationY}rightBoundary(e=!1){return this.element.locationX+this.element.sizeX}bottomBoundary(e=!1){return e?this.element.locationY+this.#De:super.bottomBoundary()}leftBoundary(e=!1){return this.element.locationX}}class Zt extends Ht{#$e;#Be=null;#Re=e=>{if(!this.enteredPin){this.linkValid=!1,this.enteredPin=e.target;const t=this.link.source??this.target,i=this.enteredPin,s=t.isOutput()?t:i;t.nodeElement.getType()===re.paths.knot||i.nodeElement.getType()===re.paths.knot?(this.link.setMessageCorrect(),this.linkValid=!0):t.getNodeElement()===i.getNodeElement()?this.link.setMessageSameNode():t.isOutput()===i.isOutput()?this.link.setMessageDirectionsIncompatible():this.blueprint.getLinks(t,i).length?(this.link.setMessageReplaceLink(),this.linkValid=!0):"exec"===s.entity.getType()&&s.isLinked?(this.link.setMessageReplaceOutputLink(),this.linkValid=!0):"object"==t.entity.PinType.PinCategory.valueOf()&&"object"==i.entity.PinType.PinCategory.valueOf()||t.pinType==i.pinType?(this.link.setMessageCorrect(),this.linkValid=!0):(this.link.setMessageTypesIncompatible(t,i),this.linkValid=!1)}};#Ge=e=>{this.enteredPin==e.target&&(this.enteredPin=null,this.linkValid=!1,this.link?.setMessagePlaceNode())};link;enteredPin;linkValid=!1;constructor(e,t,i={}){i.scrollGraphEdge??=!0,super(e,t,i)}startDrag(e){this.target.nodeElement.getType()==re.paths.knot&&(this.#Be=this.target),this.link=Ae.getConstructor("ueb-link").newObject(this.target,null),this.blueprint.template.linksContainerElement.prepend(this.link),this.link.setMessagePlaceNode(),this.#$e=this.blueprint.querySelectorAll("ueb-pin"),this.#$e.forEach((e=>{e!=this.target&&(e.addEventListener("mouseenter",this.#Re),e.addEventListener("mouseleave",this.#Ge))})),this.link.startDragging(),this.link.setDestinationLocation(e)}dragTo(e,t){this.link.setDestinationLocation(e)}endDrag(){if(this.#$e.forEach((e=>{e.removeEventListener("mouseenter",this.#Re),e.removeEventListener("mouseleave",this.#Ge)})),this.#$e=null,this.enteredPin&&this.linkValid){if(this.#Be){const e=this.#Be!==this.link.source?this.link.source:this.enteredPin;if(this.#Be.isInput()&&e.isInput()||this.#Be.isOutput()&&e.isOutput()){const e=this.#Be.template.getOppositePin();this.#Be===this.link.source?this.link.source=e:this.enteredPin=e}}else this.enteredPin.nodeElement.getType()===re.paths.knot&&(this.#Be=this.enteredPin,this.link.source.isOutput()&&(this.enteredPin=this.enteredPin.template.getOppositePin()));this.link.source.getLinks().find((e=>e.equals(this.enteredPin.createPinReference())))?this.link.remove():(this.blueprint.addGraphElement(this.link),this.link.destination=this.enteredPin)}else this.link.remove();this.enteredPin=null,this.link.removeMessage(),this.link.finishDragging(),this.link=null}}class Wt extends qt{#Ve=!1;#He=!1;displayName="";static nodeStyleClasses=["ueb-node-style-glass"];initialize(e){super.initialize(e),this.displayName=this.element.nodeDisplayName}render(){return R`
${this.displayName?R`
${this.displayName}
`:V} ${this.#Ve?R`
`:V} ${this.#He?R`
`:V} ${this.pinInserter?R`
Add pin ${le.plusCircle}
`:V}
`}createPinElements(){return this.element.getPinEntities().filter((e=>!e.isHidden())).map((e=>{this.#Ve||=e.isInput(),this.#He||=e.isOutput();return Ae.getConstructor("ueb-pin").newObject(e,void 0,this.element)}))}}class Qt extends Wt{static nodeStyleClasses=["ueb-node-style-metasound","ueb-node-style-operation"]}class Jt extends Wt{static nodeStyleClasses=[...super.nodeStyleClasses,"ueb-node-style-conversion"]}class ei extends Wt{static nodeStyleClasses=[...super.nodeStyleClasses,"ueb-node-style-operation"]}class ti extends Dt{static canWrapInput=!0;#ze;get iconElement(){return this.#ze}#_e;get wrapperElement(){return this.#_e}isNameRendered=!0;initialize(e){if(super.initialize(e),this.element.nodeElement){const e=this.element.nodeElement.template;this.isNameRendered=!(e instanceof Jt||e instanceof ei||e instanceof Qt)}}setup(){super.setup(),this.element.nodeElement=this.element.closest("ueb-node");const e=this.element.nodeElement.template;(e instanceof Jt||e instanceof ei)&&(this.isNameRendered=!1,this.element.requestUpdate())}createInputObjects(){return[new Zt(this.element,this.blueprint,{moveEverywhere:!0,draggableElement:this.getClickableElement()})]}render(){const e=R`
${this.renderIcon()}
`,t=R`
${this.isNameRendered?this.renderName():V} ${this.isInputRendered()?this.renderInput():R``}
`;return R`
${this.element.isInput()?R`${e}${t}`:R`${t}${e}`}
`}renderIcon(){if(this.element.nodeElement.entity.isPcg())switch(this.element.entity.getType()){case"Any":return le.pcgPin;case"Param":case"Param[]":return le.pcgParamPin;case"Spatial":case"Spatial[]":return le.pcgSpatialPin;case"Any[]":case"Point[]":case"Surface[]":case"Volume[]":if(this.element.isOutput())return le.pcgPin;case"Point":case"Surface":case"Volume":return le.pcgStackPin}switch(this.element.entity.PinType.ContainerType?.toString()){case"Array":return le.arrayPin;case"Set":return le.setPin;case"Map":return le.mapPin}return"delegate"===this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase()?le.delegate:this.element.nodeElement?.template instanceof ei?le.operationPin:"statictype"===this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase()?le.staticPin:le.genericPin}renderName(){let e=this.element.getPinDisplayName();const t=this.element.nodeElement,i=this.element.getPinName();return t.getType()==re.paths.makeStruct&&i==t.entity.StructType.getName()&&(e=i),R`${e}`}isInputRendered(){return this.element.isInput()&&!this.element.entity.PinType.bIsReference?.valueOf()}renderInput(){return R``}updated(e){if(super.updated(e),this.element.isInput()&&e.has("isLinked")){const e=this.element.nodeElement;this.element.requestUpdate(),this.element.updateComplete.then((()=>e.acknowledgeReflow()))}}firstUpdated(e){super.firstUpdated(e),this.element.style.setProperty("--ueb-pin-color-rgb",this.element.entity.pinColor().cssText),this.#ze=this.element.querySelector(".ueb-pin-icon svg")??this.element,this.#_e=this.element.querySelector(".ueb-pin-wrapper")}getLinkLocation(){const e=this.iconElement.getBoundingClientRect(),t=[this.element.isInput()?e.left:e.right+1,(e.top+e.bottom)/2],i=ae.convertLocation(t,this.blueprint.template.gridElement);return this.blueprint.compensateTranslation(i[0],i[1])}getClickableElement(){return this.#_e??this.element}}class ii extends ti{render(){return R`
${this.renderIcon()}
`}}class si extends qt{static nodeStyleClasses=[...super.nodeStyleClasses,"ueb-node-style-event"];#Fe;firstUpdated(e){super.firstUpdated(e),this.element.querySelector(".ueb-node-top").appendChild(this.createDelegatePinElement())}renderTop(){const e=this.renderNodeIcon(),t=this.renderNodeName(),i=this.element.getType()===re.paths.customEvent&&(this.element.entity.CustomFunctionName||this.element.entity.FunctionReference.MemberParent);return R`
${e?R`
${e}
`:V} ${t?R`
${t} ${i?R`
Custom Event
`:V}
`:V}
`}getPinElements(){return this.element.getPinElements().filter((e=>"delegate"!==e.entity.PinType.PinCategory?.toString()))}createDelegatePinElement(){return this.#Fe||(this.#Fe=Ae.getConstructor("ueb-pin").newObject(this.element.getPinEntities().find((e=>!e.isHidden()&&"delegate"===e.PinType.PinCategory?.toString())),new ii,this.element),this.#Fe.template.isNameRendered=!1),this.#Fe}createPinElements(){return[this.createDelegatePinElement(),...this.element.getPinEntities().filter((e=>!e.isHidden()&&"delegate"!==e.PinType.PinCategory?.toString())).map((e=>Ae.getConstructor("ueb-pin").newObject(e,void 0,this.element)))]}}class ni extends ii{render(){return this.element.isOutput()?super.render():R``}getOppositePin(){const e=this.element.nodeElement.template;return this.element.isOutput()?e.inputPin:e.outputPin}getLinkLocation(){const e=(this.element.isInput()?this.element.nodeElement.template.outputPin.template:this).iconElement.getBoundingClientRect(),t=[this.element.isInput()?e.left:e.right+1,(e.top+e.bottom)/2],i=ae.convertLocation(t,this.blueprint.template.gridElement);return this.blueprint.compensateTranslation(i[0],i[1])}}class ri extends qt{static#je=new Set;#Ue=null;#Ye;get inputPin(){return this.#Ye}#qe;get outputPin(){return this.#qe}initialize(e){super.initialize(e),this.element.classList.add("ueb-node-style-minimal")}findDirectionaPin(e){if(e.nodeElement.getType()!==re.paths.knot||ri.#je.has(e))return ri.#je.clear(),!0;ri.#je.add(e);for(let t of e.getLinks().map((e=>this.blueprint.getPin(e))))if(this.findDirectionaPin(t))return!0;return!1}render(){return R`
`}setupPins(){for(const e of this.getPinElements())this.element.querySelector(".ueb-node-border").appendChild(e)}createPinElements(){const e=this.element.getPinEntities().filter((e=>!e.isHidden())),t=e[e[0].isInput()?0:1],i=e[e[0].isOutput()?0:1],s=Ae.getConstructor("ueb-pin");return[this.#Ye=s.newObject(t,new ni,this.element),this.#qe=s.newObject(i,new ni,this.element)]}linksChanged(){}}class ai extends qt{static nodeStyleClasses=["ueb-node-style-metasound"]}class oi extends Wt{initialize(e){super.initialize(e);const t=e.getType();t===re.paths.variableGet||t===re.paths.self?(this.element.classList.add("ueb-node-style-getter"),this.displayName=""):t===re.paths.variableSet&&this.element.classList.add("ueb-node-style-setter")}setupPins(){super.setupPins();let e=this.element.getPinElements().find((e=>!e.entity.isHidden()&&!e.entity.isExecution()));this.element.style.setProperty("--ueb-node-color",e.getColor().cssText)}}const li=["Boolean::LogicEq","Boolean::LogicNEq","Integer::EnumNEq","Integer::EnumEq",...["Abs","Add","ArcCosine(Degrees)","ArcCosine(Radians)","ArcSine(Degrees)","ArcSine(Radians)","ArcTangent(Degrees)","ArcTangent(Radians)","Ceil","CmpEQ","CmpGE","CmpGT","CmpLE","CmpLT","CmpNEQ","Cosine(Degrees)","Cosine(Radians)","DegreesToRadians","Div","Dot","Exp","Exp2","Floor","FMod","Frac","Length","Lerp","Log","Log2","Madd","Max","Min","Mul","Negate","Normalize","OneMinus","PI","RadiansToDegrees","Rcp","RcpFast","Round","RSqrt","Sign","Sine(Degrees)","Sine(Radians)","Sqrt","Step","Subtract","Tangent(Degrees)","Tangent(Radians)","Trunc","TWO_PI"].map((e=>"Numeric::"+e)),"Vector3::Cross"],ci=re.paths;function ui(e){if(e.getClass()===ci.callFunction||e.getClass()===ci.commutativeAssociativeBinaryOperator||e.getClass()===ci.callArrayFunction){const t=e.FunctionReference?.MemberParent?.path??"",i=e.FunctionReference?.MemberName?.toString();if(i&&(t===ci.kismetMathLibrary||t===ci.kismetArrayLibrary)){if(i.startsWith("Conv_"))return Jt;if(i.startsWith("Add_")||i.startsWith("And_")||i.startsWith("Boolean")||i.startsWith("Cross_")||i.startsWith("Dot_")||i.startsWith("Not_")||i.startsWith("Or_")||i.startsWith("Percent_")||i.startsWith("Xor_"))return ei;switch(i){case"Abs":case"Array_Add":case"Array_AddUnique":case"Array_Identical":case"BMax":case"BMin":case"CrossProduct2D":case"DotProduct2D":case"Exp":case"FMax":case"FMin":case"GetPI":case"Max":case"MaxInt64":case"Min":case"MinInt64":case"Sqrt":case"Square":case"Vector4_CrossProduct3":case"Vector4_DotProduct":case"Vector4_DotProduct3":case"Acos":case"Asin":case"Cos":case"DegAcos":case"DegCos":case"DegSin":case"DegTan":case"Sin":case"Tan":return ei}}if(t===ci.blueprintSetLibrary)return ei;if(t===ci.blueprintMapLibrary)return ei}switch(e.getClass()){case ci.comment:case ci.materialGraphNodeComment:return Xt;case ci.createDelegate:return qt;case ci.metasoundEditorGraphExternalNode:return"Add"==e.ClassName?.Name?Qt:ai;case ci.niagaraNodeOp:if(li.includes(e.OpName?.toString()))return ei;break;case ci.promotableOperator:return ei;case ci.knot:return ri;case ci.literal:case ci.self:case ci.variableGet:case ci.variableSet:return oi}return e.isEvent()?si:qt}class hi extends Vt{static properties={...super.properties,selected:{type:Boolean,attribute:"data-selected",reflect:!0,converter:ke.booleanConverter}};dragHandler=e=>this.addLocation(...e.detail.value);constructor(){super(),this.selected=!1,this.listeningDrag=!1}setup(){super.setup(),this.setSelected(this.selected)}cleanup(){super.cleanup(),this.blueprint.removeEventListener(re.nodeDragGeneralEventName,this.dragHandler)}setSelected(e=!0){this.selected=e,this.blueprint&&(this.selected?(this.listeningDrag=!0,this.blueprint.addEventListener(re.nodeDragGeneralEventName,this.dragHandler)):(this.blueprint.removeEventListener(re.nodeDragGeneralEventName,this.dragHandler),this.listeningDrag=!1))}}class pi extends hi{static properties={...hi.properties,typePath:{type:String,attribute:"data-type",reflect:!0},nodeTitle:{type:String,attribute:"data-title",reflect:!0},advancedPinDisplay:{type:String,attribute:"data-advanced-display",converter:Je.attributeConverter,reflect:!0},enabledState:{type:String,attribute:"data-enabled-state",reflect:!0},nodeDisplayName:{type:String,attribute:!1},pureFunction:{type:Boolean,converter:ke.booleanConverter,attribute:"data-pure-function",reflect:!0}};static dragEventName=re.nodeDragEventName;static dragGeneralEventName=re.nodeDragGeneralEventName;get blueprint(){return super.blueprint}set blueprint(e){super.blueprint=e,this.#Ke.forEach((t=>t.blueprint=e))}#Xe;get nodeNameElement(){return this.#Xe}set nodeNameElement(e){this.#Xe=e}#Ke=[];boundComments=[];#Ze=!1;#We=e=>{this.selected||this.#Ze||(this.#Ze=!0,this.requestUpdate(),this.updateComplete.then((()=>this.#Ze=!1)),this.addLocation(...e.detail.value))};static fromSerializedObject(e){e=e.trim();let t=xt.grammar.parse(e);return pi.newObject(t)}static newObject(e=new xt,t=new(ui(e))){const i=new pi;return i.initialize(e,t),i}#Qe(e){for(let t of this.getPinElements())for(let i of t.getLinks())this.blueprint.getPin(i).redirectLink(t,new ot(new Je(e),t.entity.PinId))}initialize(e=new xt,t=new(ui(e))){this.typePath=e.getType(),this.nodeTitle=e.getObjectName(),this.advancedPinDisplay=e.AdvancedPinDisplay?.toString(),this.enabledState=e.EnabledState,this.nodeDisplayName=ze(e),this.pureFunction=e.bIsPureFunc?.valueOf(),this.dragLinkObjects=[],super.initialize(e,t),this.#Ke=this.template.createPinElements(),super.setLocation(this.entity.getNodePosX(),this.entity.getNodePosY()),this.entity.NodeWidth&&this.entity.NodeHeight?(this.sizeX=this.entity.NodeWidth.value,this.sizeY=this.entity.NodeHeight.value):this.updateComplete.then((()=>this.computeSizes())),e.listenAttribute("Name",(t=>{this.#Qe(t.value),this.nodeTitle=t.value,this.nodeDisplayName=ze(e)}))}async getUpdateComplete(){let e=await super.getUpdateComplete();for(const t of this.getPinElements())e&&=await t.updateComplete;return e}bindToComment(e){e==this||this.boundComments.includes(e)||(e.addEventListener(re.nodeDragEventName,this.#We),this.boundComments.push(e))}unbindFromComment(e){const t=this.boundComments.indexOf(e);t>=0&&(e.removeEventListener(re.nodeDragEventName,this.#We),this.boundComments[t]=this.boundComments[this.boundComments.length-1],this.boundComments.pop())}isInsideComment(e){return this.topBoundary()>=e.topBoundary()&&this.rightBoundary()<=e.rightBoundary()&&this.bottomBoundary()<=e.bottomBoundary()&&this.leftBoundary()>=e.leftBoundary()}getType(){return this.entity.getType()}getNodeName(){return this.entity.getObjectName()}computeNodeDisplayName(){this.nodeDisplayName=ze(this.entity)}setNodeWidth(e){this.entity.setNodeWidth(e),this.sizeX=e,this.acknowledgeReflow()}setNodeHeight(e){this.entity.setNodeHeight(e),this.sizeY=e,this.acknowledgeReflow()}sanitizeLinks(e=[]){this.getPinElements().forEach((t=>t.sanitizeLinks(e)))}getPinElements(){return this.#Ke}getPinEntities(){return this.entity.getPinEntities()}setLocation(e=0,t=0,i=!0){this.entity.setNodePosX(e),this.entity.setNodePosY(t),super.setLocation(e,t,i)}acknowledgeReflow(){this.requestUpdate(),this.updateComplete.then((()=>this.computeSizes()));let e=new CustomEvent(re.nodeReflowEventName);this.dispatchEvent(e)}setShowAdvancedPinDisplay(e){this.entity.AdvancedPinDisplay=new Je(e?"Shown":"Hidden"),this.advancedPinDisplay=this.entity.AdvancedPinDisplay}toggleShowAdvancedPinDisplay(){this.setShowAdvancedPinDisplay("Shown"!=this.entity.AdvancedPinDisplay?.toString())}}class di extends xt{#Je=new Map;#et=new Set;#tt=[];get objectEntities(){return this.#tt}static attributes={...super.attributes,ScriptVariables:super.attributes.ScriptVariables.asUniqueClass(!0).withDefault()};getHomonymObjectEntity(e){const t=e.getObjectName();return this.#tt.find((e=>e.getObjectName()==t))}takeFreeName(e){e=e.replace(/_\d+$/,"");const t=(this.#Je.get(e)??-1)+1;return this.#Je.set(e,t),re.nodeTitle(e,t)}addObjectEntity(e){if(!this.#tt.includes(e)){this.#tt.push(e);const[t,i]=e.getNameAndCounter();return this.#Je.set(t,Math.max(this.#Je.get(t)??0,i)),!0}return!1}removeObjectEntity(e){const t=this.#tt.indexOf(e);if(t>=0){const e=this.#tt.pop();return t{let i=this[re.subObjectAttributeNameFromReference(e,t)];i.Name.value=s,i.Name=i.Name})),e.path.replace(i,s)}mergeWith(e){if(0===(e.ScriptVariables?.length??0))return this;let t=ae.mergeArrays(this.ScriptVariables.valueOf(),e.ScriptVariables.valueOf(),((e,t)=>e.OriginalChangeId.value==t.OriginalChangeId.value),(t=>{const i=t.ScriptVariable.getName();this.#et.has(i)&&this.renameScriptVariable(t.ScriptVariable,e)}));if(t.length===this.ScriptVariables.length)return this;t.reverse();const i=t.concat(t).map(((i,s)=>{const n=re.subObjectAttributeNameFromReference(i.ScriptVariable,s>=t.length),r=this[n]??e[n];return r?[n,r]:null})).filter((e=>e));return i.push(...Object.entries(this).filter((([e,t])=>!e.startsWith(re.subObjectAttributeNamePrefix)&&"ExportedNodes"!==e)),["ScriptVariables",new di.attributes.ScriptVariables(t.reverse())]),new di(Object.fromEntries(i))}getVariablesAttributesReferringTo(...e){let t=new Set(...e.flatMap((e=>e.getPinEntities())).map((e=>e.PinName.toString())));return this.ScriptVariables.valueOf().map((e=>{const t=re.subObjectAttributeNameFromReference(e.ScriptVariable,!1),i=re.subObjectAttributeNameFromReference(e.ScriptVariable,!0);return{simple:[t,this[t]],full:[i,this[i]],variable:e}})).filter((e=>t.has(e.full?.Variable?.Name))).reduce(((e,t)=>(e.simple.push([t.simple[0],t.simple[1]]),e.full.push([t.full[0],t.full[1]]),e.ScriptVariables.push(t.variable),e)),{simple:[],full:[],ScriptVariables:[]}),{}}}class mi extends xt{constructor(e,t){const i=re.paths.niagaraClipboardContent,s=e.takeFreeName("NiagaraClipboardContent"),n=`/Engine/Transient.${s}`;let r="";for(const e of t)e.exported&&(r+=e.serialize());t.filter((e=>!e.exported)).map((e=>e.serialize())),super({Class:new at(i),Name:new We(s),ExportPath:new at(i,n),ExportedNodes:new We(btoa(r))})}}class gi extends kt{#it;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let s=this;this.#it=()=>s.copied()}listenEvents(){window.addEventListener("copy",this.#it)}unlistenEvents(){window.removeEventListener("copy",this.#it)}copied(){const e=this.blueprint.getSerializedText();return navigator.clipboard.writeText(e),e}}class bi extends kt{#st;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let s=this;this.#st=()=>s.cut()}listenEvents(){window.addEventListener("cut",this.#st)}unlistenEvents(){window.removeEventListener("cut",this.#st)}cut(){this.blueprint.template.getCopyInputObject().copied(),this.blueprint.removeGraphElement(...this.blueprint.getNodes(!0))}}class vi extends kt{#nt;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let s=this;this.#nt=e=>s.pasted(e.clipboardData.getData("Text"))}listenEvents(){window.addEventListener("paste",this.#nt)}unlistenEvents(){window.removeEventListener("paste",this.#nt)}pasted(e){let t=0,i=0,s=0,n=xt.grammarMultipleObjects.parse(e).map((e=>{let n=Ae.getConstructor("ueb-node").newObject(e);return t+=n.locationY,i+=n.locationX,++s,n}));t/=s,i/=s,n.length>0&&this.blueprint.unselectAll();let r=this.blueprint.mousePosition;for(const e of n)e.addLocation(r[0]-i,r[1]-t),e.snapToGrid(),e.setSelected(!0);return this.blueprint.addGraphElement(...n),n}}class fi extends Mt{static#K=e=>{};#rt=0;get variation(){return this.#rt}#at=e=>{this.enablerKey&&!this.enablerActivated||(e.preventDefault(),this.#rt=e.deltaY,this.setLocationFromEvent(e),this.wheel())};#ot=e=>e.preventDefault();constructor(e,t,i={},s=fi.#K){i.listenOnFocus=!0,i.strictTarget??=!1,super(e,t,i),this.strictTarget=i.strictTarget,this.onWheel=s}listenEvents(){this.movementSpace.addEventListener("wheel",this.#at,!1),this.movementSpace.parentElement?.addEventListener("wheel",this.#ot)}unlistenEvents(){this.movementSpace.removeEventListener("wheel",this.#at,!1),this.movementSpace.parentElement?.removeEventListener("wheel",this.#ot)}wheel(){this.onWheel(this)}}class yi extends fi{#lt=0;#ct=!1;get enableZoonIn(){return this.#ct}set enableZoonIn(e){e!=this.#ct&&(this.#ct=e)}wheel(){if(this.#lt+=-this.variation,Math.abs(this.#lt)0||(e+=Math.sign(this.#lt),this.blueprint.setZoom(e,this.location),this.#lt=0)}}class wi extends Lt{#ut;constructor(e,t,i={}){i.activationKeys=Ot.enableZoomIn,super(e,t,i)}fire(){this.#ut=this.blueprint.template.getZoomInputObject(),this.#ut.enableZoonIn=!0}unfire(){this.#ut.enableZoonIn=!1}}class Si extends Ht{startDrag(){this.blueprint.scrolling=!0}dragTo(e,t){this.blueprint.scrollDelta(-t[0],-t[1])}endDrag(){this.blueprint.scrolling=!1}}class Ei extends Mt{#ht=null;#pt=e=>{e.preventDefault(),this.setLocationFromEvent(e),this.blueprint.mousePosition=[...this.location]};#dt=e=>{this.#ht||(e.preventDefault(),this.#ht=e.detail.tracker,this.unlistenMouseMove())};#mt=e=>{this.#ht==e.detail.tracker&&(e.preventDefault(),this.#ht=null,this.listenMouseMove())};constructor(e,t,i={}){i.listenOnFocus=!0,super(e,t,i)}listenMouseMove(){this.target.addEventListener("mousemove",this.#pt)}unlistenMouseMove(){this.target.removeEventListener("mousemove",this.#pt)}listenEvents(){this.listenMouseMove(),this.blueprint.addEventListener(re.trackingMouseEventName.begin,this.#dt),this.blueprint.addEventListener(re.trackingMouseEventName.end,this.#mt)}unlistenEvents(){this.unlistenMouseMove(),this.blueprint.removeEventListener(re.trackingMouseEventName.begin,this.#dt),this.blueprint.removeEventListener(re.trackingMouseEventName.end,this.#mt)}}class Ci extends Ht{constructor(e,t,i={}){i.scrollGraphEdge??=!0,super(e,t,i),this.selectorElement=this.blueprint.template.selectorElement}startDrag(){this.selectorElement.beginSelect(this.clickedPosition)}dragTo(e,t){this.selectorElement.selectTo(e)}endDrag(){this.started&&this.selectorElement.endSelect()}unclicked(){this.started||this.blueprint.unselectAll()}}class Ni extends kt{#gt=e=>this.clickedSomewhere(e.target);constructor(e,t,i={}){i.listenOnFocus=!0,super(e,t,i),this.blueprint.focus&&document.addEventListener("click",this.#gt)}clickedSomewhere(e){e.closest("ueb-blueprint")||this.blueprint.setFocused(!1)}listenEvents(){document.addEventListener("click",this.#gt)}unlistenEvents(){document.removeEventListener("click",this.#gt)}}class xi extends Dt{static styleVariables={"--ueb-font-size":`${re.fontSize}`,"--ueb-grid-axis-line-color":`${re.gridAxisLineColor}`,"--ueb-grid-expand":`${re.expandGridSize}px`,"--ueb-grid-line-color":`${re.gridLineColor}`,"--ueb-grid-line-width":`${re.gridLineWidth}px`,"--ueb-grid-set-line-color":`${re.gridSetLineColor}`,"--ueb-grid-set":`${re.gridSet}`,"--ueb-grid-size":`${re.gridSize}px`,"--ueb-link-min-width":`${re.linkMinWidth}`,"--ueb-node-radius":`${re.nodeRadius}px`};#bt=new ResizeObserver((e=>{const t=e.find((e=>e.target===this.viewportElement))?.devicePixelContentBoxSize?.[0];t&&(this.viewportSize[0]=t.inlineSize,this.viewportSize[1]=t.blockSize)}));#vt;#ft;#ut;headerElement;overlayElement;viewportElement;selectorElement;gridElement;linksContainerElement;nodesContainerElement;viewportSize=[0,0];#yt=()=>this.headerElement.classList.remove("ueb-zoom-changed");initialize(e){super.initialize(e),this.element.style.cssText=Object.entries(xi.styleVariables).map((([e,t])=>`${e}:${t};`)).join("");const t=this.element.querySelector(":scope > template")?.content.textContent;t&&(this.element.requestUpdate(),this.element.updateComplete.then((()=>{this.blueprint.mousePosition=[Math.round(this.viewportSize[0]/2),Math.round(this.viewportSize[1]/2)],this.getPasteInputObject().pasted(t),this.blueprint.unselectAll()})))}setup(){super.setup(),this.#bt.observe(this.viewportElement,{box:"device-pixel-content-box"});const e=this.viewportElement.getBoundingClientRect();this.viewportSize[0]=e.width,this.viewportSize[1]=e.height,this.blueprint.nodes.length>0&&(this.blueprint.requestUpdate(),this.blueprint.updateComplete.then((()=>this.centerContentInViewport())))}cleanup(){super.cleanup(),this.#bt.unobserve(this.viewportElement)}createInputObjects(){const e=this.element.getGridDOMElement();return this.#vt=new gi(e,this.blueprint),this.#ft=new vi(e,this.blueprint),this.#ut=new yi(e,this.blueprint),[...super.createInputObjects(),this.#vt,this.#ft,this.#ut,new bi(e,this.blueprint),new Lt(e,this.blueprint,{activationKeys:Ot.duplicateNodes},(()=>this.blueprint.template.getPasteInputObject().pasted(this.blueprint.template.getCopyInputObject().copied()))),new Lt(e,this.blueprint,{activationKeys:Ot.deleteNodes},(()=>this.blueprint.removeGraphElement(...this.blueprint.getNodes(!0)))),new Lt(e,this.blueprint,{activationKeys:Ot.selectAllNodes},(()=>this.blueprint.selectAll())),new Ci(e,this.blueprint,{clickButton:re.mouseClickButton,exitAnyButton:!0,moveEverywhere:!0}),new Si(e,this.blueprint,{clickButton:re.mouseRightClickButton,exitAnyButton:!1,moveEverywhere:!0}),new Ni(e,this.blueprint),new Ei(e,this.blueprint),new wi(e,this.blueprint)]}render(){return R`
Zoom ${0==this.blueprint.zoom?"1:1":(this.blueprint.zoom>0?"+":"")+this.blueprint.zoom}
`}firstUpdated(e){super.firstUpdated(e),this.headerElement=this.blueprint.querySelector(".ueb-viewport-header"),this.overlayElement=this.blueprint.querySelector(".ueb-viewport-overlay"),this.viewportElement=this.blueprint.querySelector(".ueb-viewport-body"),this.selectorElement=this.blueprint.querySelector("ueb-selector"),this.gridElement=this.viewportElement.querySelector(".ueb-grid"),this.linksContainerElement=this.blueprint.querySelector("[data-links]"),this.linksContainerElement.append(...this.blueprint.getLinks()),this.nodesContainerElement=this.blueprint.querySelector("[data-nodes]"),this.nodesContainerElement.append(...this.blueprint.getNodes()),this.viewportElement.scroll(re.expandGridSize,re.expandGridSize)}willUpdate(e){super.willUpdate(e),this.headerElement&&e.has("zoom")&&(this.headerElement.classList.contains("ueb-zoom-changed")&&(this.headerElement.classList.remove("ueb-zoom-changed"),this.headerElement.offsetWidth),this.headerElement.classList.add("ueb-zoom-changed"),this.headerElement.addEventListener("animationend",this.#yt,{once:!0}))}updated(e){if(super.updated(e),(e.has("scrollX")||e.has("scrollY"))&&this.viewportElement.scroll(this.blueprint.scrollX,this.blueprint.scrollY),e.has("zoom")){this.blueprint.style.setProperty("--ueb-scale",this.blueprint.getScale());const t=e.get("zoom"),i=Math.min(t,this.blueprint.zoom),s=Math.max(t,this.blueprint.zoom),n=ae.range(i,s),r=e=>`ueb-zoom-${e}`;te<0)).map(r)),this.blueprint.classList.add(...n.filter((e=>e>0)).map(r))):(this.blueprint.classList.remove(...n.filter((e=>e>0)).map(r)),this.blueprint.classList.add(...n.filter((e=>e<0)).map(r)))}}getCommentNodes(e=!1){return this.blueprint.querySelectorAll(`ueb-node[data-type="${re.paths.comment}"]${e?'[data-selected="true"]':""}, ueb-node[data-type="${re.paths.materialGraphNodeComment}"]${e?'[data-selected="true"]':""}`)}getPin(e){return this.blueprint.querySelector(`ueb-node[data-title="${e.objectName}"] ueb-pin[data-id="${e.pinGuid}"]`)}getCopyInputObject(){return this.#vt}getPasteInputObject(){return this.#ft}getZoomInputObject(){return this.#ut}isPointVisible(e,t){return!1}gridTopVisibilityBoundary(){return this.blueprint.scaleCorrect(this.blueprint.scrollY)-this.blueprint.translateY}gridRightVisibilityBoundary(){return this.gridLeftVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[0])}gridBottomVisibilityBoundary(){return this.gridTopVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[1])}gridLeftVisibilityBoundary(){return this.blueprint.scaleCorrect(this.blueprint.scrollX)-this.blueprint.translateX}centerViewport(e=0,t=0,i=!0){const s=this.gridLeftVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[0]/2),n=this.gridTopVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[1]/2);this.blueprint.scrollDelta(this.blueprint.scaleCorrectReverse(e-s),this.blueprint.scaleCorrectReverse(t-n),i)}centerContentInViewport(e=!0){let t=0,i=0,s=Number.MAX_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;const o=this.blueprint.getNodes();for(const e of o)t+=e.leftBoundary()+e.rightBoundary(),i+=e.topBoundary()+e.bottomBoundary(),s=Math.min(s,e.leftBoundary()),n=Math.max(n,e.rightBoundary()),r=Math.min(r,e.topBoundary()),a=Math.max(a,e.bottomBoundary());t=Math.round(n-s<=this.viewportSize[0]?(n+s)/2:t/(2*o.length)),i=Math.round(a-r<=this.viewportSize[1]?(a+r)/2:i/(2*o.length)),this.centerViewport(t,i,e)}}class Pi extends oe{static properties={selecting:{type:Boolean,attribute:"data-selecting",reflect:!0,converter:ke.booleanConverter},scrolling:{type:Boolean,attribute:"data-scrolling",reflect:!0,converter:ke.booleanConverter},focused:{type:Boolean,attribute:"data-focused",reflect:!0,converter:ke.booleanConverter},zoom:{type:Number,attribute:"data-zoom",reflect:!0},scrollX:{type:Number,attribute:!1},scrollY:{type:Number,attribute:!1},additionalX:{type:Number,attribute:!1},additionalY:{type:Number,attribute:!1},translateX:{type:Number,attribute:!1},translateY:{type:Number,attribute:!1}};static nodeBoundariesSupplier=e=>({primaryInf:e.leftBoundary(!0),primarySup:e.rightBoundary(!0),secondaryInf:e.topBoundary(!0),secondarySup:e.bottomBoundary(!0)});static nodeSelectToggleFunction=(e,t)=>{e.setSelected(t)};#wt=0;#St=0;nodes=[];links=[];nodesNames=new Map;mousePosition=[0,0];waitingExpandUpdate=!1;constructor(){super(),this.selecting=!1,this.scrolling=!1,this.focused=!1,this.zoom=0,this.scrollX=re.expandGridSize,this.scrollY=re.expandGridSize,this.translateX=re.expandGridSize,this.translateY=re.expandGridSize,super.initialize(new di,new xi)}initialize(){}getGridDOMElement(){return this.template.gridElement}getScroll(){return[this.scrollX,this.scrollY]}setScroll(e,t){this.scrollX=e,this.scrollY=t}scrollDelta(e=0,t=0,i=!1,s=re.smoothScrollTime){if(i){let i=[0,0];this.#wt&&cancelAnimationFrame(this.#wt),this.#St&&cancelAnimationFrame(this.#St),ae.animate(0,e,s,(e=>{this.scrollDelta(e-i[0],0,!1),i[0]=e}),(e=>this.#wt=e)),ae.animate(0,t,s,(e=>{this.scrollDelta(0,e-i[1],!1),i[1]=e}),(e=>this.#St=e))}else{const i=[2*re.expandGridSize,2*re.expandGridSize];let s=this.getScroll(),n=[s[0]+e,s[1]+t],r=[0,0];for(let e=0;e<2;++e)n[e]i[e]-re.gridExpandThreshold*re.expandGridSize&&(r[e]=1);0==r[0]&&0==r[1]||this.seamlessExpand(r[0],r[1]),s=this.getScroll(),n=[s[0]+e,s[1]+t],this.setScroll(n[0],n[1])}}scrollCenter(e=!1){const t=this.getScroll(),i=[this.translateX-t[0],this.translateY-t[1]],s=this.getViewportSize().map((e=>e/2)),n=[i[0]-s[0],i[1]-s[1]];this.scrollDelta(n[0],n[1],e)}getViewportSize(){return[this.template.viewportElement.clientWidth,this.template.viewportElement.clientHeight]}getScrollMax(){return[this.template.viewportElement.scrollWidth-this.template.viewportElement.clientWidth,this.template.viewportElement.scrollHeight-this.template.viewportElement.clientHeight]}snapToGrid(e,t){return ae.snapToGrid(e,t,re.gridSize)}seamlessExpand(e,t){e=Math.round(e),t=Math.round(t);let i=this.getScale();[e,t]=[-e*re.expandGridSize,-t*re.expandGridSize],0!=e&&(this.scrollX+=e,e/=i),0!=t&&(this.scrollY+=t,t/=i),this.translateX+=e,this.translateY+=t}progressiveSnapToGrid(e){return re.expandGridSize*Math.round(e/re.expandGridSize+.5*Math.sign(e))}getZoom(){return this.zoom}setZoom(e,t){if((e=ae.clamp(e,re.minZoom,re.maxZoom))==this.zoom)return;let i=this.getScale();if(this.zoom=e,t){t[0]+=this.translateX,t[1]+=this.translateY;let e=this.getScale()/i,s=[e*t[0],e*t[1]];this.scrollDelta((s[0]-t[0])*i,(s[1]-t[1])*i)}}getScale(){return re.scale[this.getZoom()]}scaleCorrect(e){return e/this.getScale()}scaleCorrectReverse(e){return e*this.getScale()}compensateTranslation(e,t){return[e-=this.translateX,t-=this.translateY]}getNodes(e=!1){let t=this.nodes;return e&&(t=t.filter((e=>e.selected))),t}getCommentNodes(e=!1){let t=[...this.template.getCommentNodes(e)];return 0===t.length&&(t=this.nodes.filter((t=>t.getType()===re.paths.comment&&(!e||t.selected)))),t}getPin(e){let t=this.template.getPin(e);return t&&t.nodeElement.getNodeName()==e.objectName.toString()||(t=[...this.nodes.find((t=>e.objectName.toString()==t.getNodeName()))?.getPinElements()??[]].find((t=>e.pinGuid.toString()==t.getPinId().toString()))),t}getLinks(e=null,t=null){if(null==e!=(null==t)){const i=e??t;return this.links.filter((e=>e.source==i||e.destination==i))}return null!=e&&null!=t?this.links.filter((i=>i.source==e&&i.destination==t||i.source==t&&i.destination==e)):this.links}getLink(e,t,i=!1){return this.links.find((s=>s.source==e&&s.destination==t||!i&&s.source==t&&s.destination==e))}selectAll(){this.getNodes().forEach((e=>Pi.nodeSelectToggleFunction(e,!0)))}unselectAll(){this.getNodes().forEach((e=>Pi.nodeSelectToggleFunction(e,!1)))}getSerializedText(){const e=this.blueprint.getNodes(!0).map((e=>e.entity));let t=!1,i=e.filter((e=>(t||=e.exported,!e.exported))).reduce(((e,t)=>e+t.serialize()),"");if(t){i=new mi(this.blueprint.entity,e).serialize()+i}return i}addGraphElement(...e){const t=e=>{const i=e.currentTarget;i.removeEventListener(re.removeEventName,t);const[s,n]=i instanceof pi?[this.nodes,i.entity]:i instanceof Gt?[this.links]:null,r=s?.indexOf(i);if(r>=0){const e=s.pop();re.entity.exported=!0));continue}const e=i.entity.getObjectName(),s=this.entity.getHomonymObjectEntity(i.entity);if(s){const t=this.entity.takeFreeName(e);s.Name=new s.Name.constructor(t)}this.nodes.push(i),this.entity.addObjectEntity(i.entity),i.addEventListener(re.removeEventName,t),this.template.nodesContainerElement?.appendChild(i)}else i instanceof Gt&&!this.links.includes(i)&&(this.links.push(i),i.addEventListener(re.removeEventName,t),this.template.linksContainerElement&&!this.template.linksContainerElement.contains(i)&&this.template.linksContainerElement.appendChild(i));e.filter((e=>e instanceof pi)).forEach((t=>t.sanitizeLinks(e))),e.filter((e=>e instanceof pi&&e.getType()==re.paths.comment)).forEach((e=>e.updateComplete.then((()=>e.template.manageNodesBind()))))}removeGraphElement(...e){for(let t of e){if(t.closest("ueb-blueprint")!==this)return;t.remove()}}setFocused(e=!0){if(this.focused==e)return;let t=new CustomEvent(e?re.focusEventName.begin:re.focusEventName.end);this.focused=e,this.focused||this.unselectAll(),this.dispatchEvent(t)}acknowledgeEditText(e){const t=new CustomEvent(e?re.editTextEventName.begin:re.editTextEventName.end);this.dispatchEvent(t)}}customElements.define("ueb-blueprint",Pi);class ki extends jt{#Et;get locationChangeCallback(){return this.#Et}set locationChangeCallback(e){this.#Et=e}movementSpace;movementSpaceSize=[0,0];firstUpdated(e){super.firstUpdated(e),this.movementSpace=this.element.parentElement}setup(){super.setup();const e=this.movementSpace.getBoundingClientRect();this.movementSpaceSize=[e.width,e.height]}createDraggableObject(){return new zt(this.element,this.blueprint,{draggableElement:this.movementSpace,ignoreTranslateCompensate:!0,moveEverywhere:!0,movementSpace:this.movementSpace,repositionOnClick:!0,stepSize:1})}adjustLocation(e,t){return this.locationChangeCallback?.(e,t),[e,t]}}class Ai extends ki{adjustLocation(e,t){const i=Math.round(this.movementSpaceSize[0]/2);e-=i,t=-(t-i);let[s,n]=ae.getPolarCoordinates(e,t);return s=Math.min(s,i),[e,t]=ae.getCartesianCoordinates(s,n),this.locationChangeCallback?.(e/i,t/i),[e=Math.round(e+i),t=Math.round(-t+i)]}}class Li extends Vt{windowElement;setup(){super.setup(),this.windowElement=this.closest("ueb-window")}setLocation(e,t){super.setLocation(...this.template.adjustLocation(e,t))}}class Mi extends Li{constructor(){super(),super.initialize({},new Ai)}static newObject(){return new Mi}initialize(){}}class Ti extends ki{adjustLocation(e,t){return e=ae.clamp(e,0,this.movementSpaceSize[0]),t=ae.clamp(t,0,this.movementSpaceSize[1]),this.locationChangeCallback?.(e/this.movementSpaceSize[0],1-t/this.movementSpaceSize[1]),[e,t]}}class Ii extends Li{constructor(){super(),super.initialize({},new Ti)}static newObject(){return new Ii}initialize(){}}class Oi extends Ht{constructor(e,t,i={}){i.consumeEvent=!0,super(e,t,i)}}class Di extends Dt{#Ct;#Nt;#xt=e=>this.element.selectedOption=e.target.selectedOptions[0].value;render(){return R` `}firstUpdated(e){super.firstUpdated(e),this.#Ct=this.element.querySelector("select:first-child"),this.#Nt=this.element.querySelector("select:last-child");const t=new Event("input",{bubbles:!0});this.#Ct.dispatchEvent(t)}updated(e){super.updated(e);const t=this.#Nt.getBoundingClientRect();this.element.style.setProperty("--ueb-dropdown-width",t.width+"px")}createInputObjects(){return[...super.createInputObjects(),new Oi(this.element,this.blueprint)]}setSelectedValue(e){this.element.querySelector(`option[value="${e}"]`).defaultSelected=!0}getSelectedValue(){return this.#Ct.value}}class $i extends oe{static properties={...super.properties,options:{type:Object},selectedOption:{type:String}};constructor(){super(),super.initialize({},new Di),this.options=[],this.selectedOption=""}static newObject(e){return new $i}initialize(){}getValue(){return this.template.getSelectedValue()}}class Bi extends Dt{#Pt=()=>{this.blueprint.acknowledgeEditText(!0),this.element.selectOnFocus&&getSelection().selectAllChildren(this.element)};#kt=()=>{this.blueprint.acknowledgeEditText(!1),getSelection().removeAllRanges()};#At=e=>e.target.querySelectorAll("br").forEach((e=>e.remove()));#Lt=e=>{"Enter"!=e.code||e.shiftKey||e.target.blur()};initialize(e){super.initialize(e),this.element.classList.add("ueb-pin-input-content"),this.element.setAttribute("role","textbox"),this.element.contentEditable="true"}firstUpdated(e){super.firstUpdated(e);const t=new Event("input",{bubbles:!0});this.element.dispatchEvent(t)}createInputObjects(){return[...super.createInputObjects(),new Oi(this.element,this.blueprint)]}setup(){super.setup(),this.element.addEventListener("focus",this.#Pt),this.element.addEventListener("focusout",this.#kt),this.element.singleLine&&this.element.addEventListener("input",this.#At),this.element.blurOnEnter&&this.element.addEventListener("keydown",this.#Lt)}cleanup(){super.cleanup(),this.element.removeEventListener("focus",this.#Pt),this.element.removeEventListener("focusout",this.#kt),this.element.removeEventListener("input",this.#At),this.element.removeEventListener("keydown",this.#Lt)}}class Ri extends oe{static properties={...super.properties,singleLine:{type:Boolean,attribute:"data-single-line",converter:ke.booleanConverter,reflect:!0},selectOnFocus:{type:Boolean,attribute:"data-select-focus",converter:ke.booleanConverter,reflect:!0},blurOnEnter:{type:Boolean,attribute:"data-blur-enter",converter:ke.booleanConverter,reflect:!0}};constructor(){super(),this.singleLine=!1,this.selectOnFocus=!0,this.blurOnEnter=!0,super.initialize({},new Bi)}static newObject(){return new Ri}initialize(){}}class Gi extends ti{#Mt;#Tt=()=>{const e=this.element.getDefaultValue(!0);e.value=this.#Mt.checked,this.element.setDefaultValue(e)};firstUpdated(e){super.firstUpdated(e),this.#Mt=this.element.querySelector(".ueb-pin-input")}setup(){super.setup(),this.#Mt?.addEventListener("change",this.#Tt)}cleanup(){super.cleanup(),this.#Mt?.removeEventListener("change",this.#Tt)}createInputObjects(){return[...super.createInputObjects(),new Oi(this.#Mt,this.blueprint)]}renderInput(){return R``}}class Vi extends ti{static singleLineInput=!1;static selectOnFocus=!0;static saveEachInputChange=!1;#It;get inputWrapper(){return this.#It}#Ot;static stringFromInputToUE(e){return e.replace(/(?=\n\s*)\n$/,"")}static stringFromUEToInput(e){return e.replaceAll(/(?:\r|(?<=(?:^|[^\\])(?:\\\\)*)\\r)(?=\n)/g,"").replace(/(?<=\n\s*)$/,"\n")}#Dt=()=>this.setInputs(this.getInputs(),!0);#$t=e=>this.#Bt(e.target);#Bt(e){if(this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width<20)return;const t=this.blueprint.scaleCorrect(this.#It.getBoundingClientRect().width)+this.nameWidth,i=this.element.classList.contains("ueb-pin-input-wrap");!i&&t>re.pinInputWrapWidth?this.element.classList.add("ueb-pin-input-wrap"):i&&t<=re.pinInputWrapWidth&&this.element.classList.remove("ueb-pin-input-wrap")}firstUpdated(e){super.firstUpdated(e);this.constructor.canWrapInput&&this.isInputRendered()&&(this.element.addEventListener("input",this.#$t),this.nameWidth=this.blueprint.scaleCorrect(this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width??0)),this.#It=this.element.querySelector(".ueb-pin-input-wrapper"),this.#Ot=[...this.element.querySelectorAll("ueb-input")]}setup(){super.setup();const e=this.constructor;e.saveEachInputChange?this.element.addEventListener("input",this.#Dt):this.element.addEventListener("focusout",this.#Dt),e.canWrapInput&&this.isInputRendered()&&(this.element.addEventListener("input",this.#$t),this.element.nodeElement.addEventListener(re.nodeReflowEventName,this.#$t))}cleanup(){super.cleanup(),this.element.nodeElement.removeEventListener(re.nodeReflowEventName,this.#$t),this.element.removeEventListener("input",this.#$t),this.element.removeEventListener("input",this.#Dt),this.element.removeEventListener("focusout",this.#Dt)}getInput(){return this.getInputs().reduce(((e,t)=>e+t),"")}getInputs(){return this.#Ot.map((e=>ae.clearHTMLWhitespace(e.innerHTML)))}setInputs(e=[],t=!0){this.#Ot.forEach(this.constructor.singleLineInput?(t,i)=>t.innerText=e[i]:(t,i)=>t.innerText=e[i].replaceAll("\n","")),t&&this.setDefaultValue(e.map((e=>Vi.stringFromInputToUE(e))),e),this.element.requestUpdate(),this.element.nodeElement.acknowledgeReflow()}setDefaultValue(e=[],t=e){this.element.setDefaultValue(e.join(""))}renderInput(){const e=this.constructor,t=e.singleLineInput,i=e.selectOnFocus;return R`
`}}class Hi extends ti{renderIcon(){return le.execPin}renderName(){let e=this.element.entity.PinName?.toString();if(this.element.entity.PinFriendlyName)e=this.element.entity.PinFriendlyName.toString();else if("execute"===e||"then"===e)return R``;return R`${this.element.getPinDisplayName()}`}}class zi extends Vi{static singleLineInput=!0;setInputs(e=[],t=!1){if(e&&0!=e.length||(e=[this.getInput()]),super.setInputs(e,!1),t){let i=[];for(const s of e){let e=parseFloat(s);isNaN(e)&&(e=0,t=!1),i.push(e)}this.setDefaultValue(i,e)}}setDefaultValue(e=[],t){const i=this.element.getDefaultValue();i.value=e[0],this.element.setDefaultValue(i),this.element.requestUpdate()}}class _i extends zi{renderInput(){return R`
`}} +class re extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{const s=i?.renderBefore??t;let r=s._$litPart$;if(void 0===r){const e=i?.renderBefore??null;s._$litPart$=r=new Z(t.insertBefore(M(),e),e,void 0,i??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return _}}re._$litElement$=!0,re.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:re});const ne=globalThis.litElementPolyfillSupport;ne?.({LitElement:re}),(globalThis.litElementVersions??=[]).push("4.1.1");class ae{static nodeColors={black:n``,blue:n``,darkBlue:n``,darkerBlue:n``,darkTurquoise:n``,gray:n``,green:n``,intenseGreen:n``,lime:n``,red:n``,turquoise:n``,violet:n``,yellow:n``};static alphaPattern="repeating-conic-gradient(#7c8184 0% 25%, #c2c3c4 0% 50%) 50% / 10px 10px";static colorDragEventName="ueb-color-drag";static colorPickEventName="ueb-color-pick";static colorWindowEventName="ueb-color-window";static colorWindowName="Color Picker";static defaultCommentHeight=96;static defaultCommentWidth=400;static distanceThreshold=5;static dragEventName="ueb-drag";static dragGeneralEventName="ueb-drag-general";static edgeScrollThreshold=50;static editTextEventName={begin:"ueb-edit-text-begin",end:"ueb-edit-text-end"};static expandGridSize=400;static focusEventName={begin:"blueprint-focus",end:"blueprint-unfocus"};static fontSize=n``;static gridAxisLineColor=n``;static gridExpandThreshold=.25;static gridLineColor=n``;static gridLineWidth=1;static gridSet=8;static gridSetLineColor=n``;static gridShrinkThreshold=4;static gridSize=16;static hexColorRegex=/^\s*#(?[0-9a-fA-F]{2})(?[0-9a-fA-F]{2})(?[0-9a-fA-F]{2})([0-9a-fA-F]{2})?|#(?[0-9a-fA-F])(?[0-9a-fA-F])(?[0-9a-fA-F])\s*$/;static indentation=" ";static keysSeparator=/[\.\(\)]/;static knotOffset=[-ae.gridSize,-.5*ae.gridSize];static lineTracePattern=/LineTrace(Single|Multi)(\w*)/;static linkCurveHeight=15;static linkCurveWidth=80;static linkMinWidth=100;static nameRegexSpaceReplacement=new RegExp("^K2(?:[Nn]ode)?_|(?<=[a-z])(?=[A-Z0-9])|(?<=[A-Z])(?{let s=100-e;return`M ${e} 0 C ${t.toFixed(3)} 0, ${i.toFixed(3)} 0, 50 50 S ${(s-t+e).toFixed(3)} 100, ${s.toFixed(3)} 100`};static maxZoom=7;static minZoom=-12;static mouseClickButton=0;static mouseRightClickButton=2;static mouseWheelZoomThreshold=80;static nodeDragEventName="ueb-node-drag";static nodeDragGeneralEventName="ueb-node-drag-general";static nodeTitle=(e,t)=>`${e}_${t}`;static nodeRadius=8;static nodeReflowEventName="ueb-node-reflow";static paths={actorBoundEvent:"/Script/BlueprintGraph.K2Node_ActorBoundEvent",addDelegate:"/Script/BlueprintGraph.K2Node_AddDelegate",ambientSound:"/Script/Engine.AmbientSound",asyncAction:"/Script/BlueprintGraph.K2Node_AsyncAction",blueprint:"/Script/Engine.Blueprint",blueprintGameplayTagLibrary:"/Script/GameplayTags.BlueprintGameplayTagLibrary",blueprintMapLibrary:"/Script/Engine.BlueprintMapLibrary",blueprintSetLibrary:"/Script/Engine.BlueprintSetLibrary",callArrayFunction:"/Script/BlueprintGraph.K2Node_CallArrayFunction",callDelegate:"/Script/BlueprintGraph.K2Node_CallDelegate",callFunction:"/Script/BlueprintGraph.K2Node_CallFunction",clearDelegate:"/Script/BlueprintGraph.K2Node_ClearDelegate",comment:"/Script/UnrealEd.EdGraphNode_Comment",commutativeAssociativeBinaryOperator:"/Script/BlueprintGraph.K2Node_CommutativeAssociativeBinaryOperator",componentBoundEvent:"/Script/BlueprintGraph.K2Node_ComponentBoundEvent",createDelegate:"/Script/BlueprintGraph.K2Node_CreateDelegate",customEvent:"/Script/BlueprintGraph.K2Node_CustomEvent",doN:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:Do N",doOnce:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:DoOnce",dynamicCast:"/Script/BlueprintGraph.K2Node_DynamicCast",eAttachmentRule:"/Script/Engine.EAttachmentRule",edGraph:"/Script/Engine.EdGraph",eDrawDebugTrace:"/Script/Engine.EDrawDebugTrace",eMaterialSamplerType:"/Script/Engine.EMaterialSamplerType",eNiagara_Float4Channel:"/Niagara/Enums/ENiagara_Float4Channel.ENiagara_Float4Channel",enum:"/Script/CoreUObject.Enum",enumLiteral:"/Script/BlueprintGraph.K2Node_EnumLiteral",eSamplerSourceMode:"/Script/Engine.ESamplerSourceMode",eSearchCase:"/Script/CoreUObject.ESearchCase",eSearchDir:"/Script/CoreUObject.ESearchDir",eSpawnActorCollisionHandlingMethod:"/Script/Engine.ESpawnActorCollisionHandlingMethod",eTextureMipValueMode:"/Script/Engine.ETextureMipValueMode",eTraceTypeQuery:"/Script/Engine.ETraceTypeQuery",event:"/Script/BlueprintGraph.K2Node_Event",eWorldPositionIncludedOffsets:"/Script/Engine.EWorldPositionIncludedOffsets",executionSequence:"/Script/BlueprintGraph.K2Node_ExecutionSequence",flipflop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:FlipFlop",forEachElementInEnum:"/Script/BlueprintGraph.K2Node_ForEachElementInEnum",forEachLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoop",forEachLoopWithBreak:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForEachLoopWithBreak",forLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoop",forLoopWithBreak:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoopWithBreak",functionEntry:"/Script/BlueprintGraph.K2Node_FunctionEntry",functionResult:"/Script/BlueprintGraph.K2Node_FunctionResult",gameplayTag:"/Script/GameplayTags.GameplayTag",getInputAxisKeyValue:"/Script/BlueprintGraph.K2Node_GetInputAxisKeyValue",ifThenElse:"/Script/BlueprintGraph.K2Node_IfThenElse",inputAxisKeyEvent:"/Script/BlueprintGraph.K2Node_InputAxisKeyEvent",inputDebugKey:"/Script/InputBlueprintNodes.K2Node_InputDebugKey",inputKey:"/Script/BlueprintGraph.K2Node_InputKey",inputVectorAxisEvent:"/Script/BlueprintGraph.K2Node_InputVectorAxisEvent",isValid:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:IsValid",kismetArrayLibrary:"/Script/Engine.KismetArrayLibrary",kismetMathLibrary:"/Script/Engine.KismetMathLibrary",knot:"/Script/BlueprintGraph.K2Node_Knot",linearColor:"/Script/CoreUObject.LinearColor",literal:"/Script/BlueprintGraph.K2Node_Literal",macro:"/Script/BlueprintGraph.K2Node_MacroInstance",makeArray:"/Script/BlueprintGraph.K2Node_MakeArray",makeMap:"/Script/BlueprintGraph.K2Node_MakeMap",makeSet:"/Script/BlueprintGraph.K2Node_MakeSet",makeStruct:"/Script/BlueprintGraph.K2Node_MakeStruct",materialExpressionComponentMask:"/Script/Engine.MaterialExpressionComponentMask",materialExpressionConstant:"/Script/Engine.MaterialExpressionConstant",materialExpressionConstant2Vector:"/Script/Engine.MaterialExpressionConstant2Vector",materialExpressionConstant3Vector:"/Script/Engine.MaterialExpressionConstant3Vector",materialExpressionConstant4Vector:"/Script/Engine.MaterialExpressionConstant4Vector",materialExpressionFunctionInput:"/Script/Engine.MaterialExpressionFunctionInput",materialExpressionLogarithm:"/Script/InterchangeImport.MaterialExpressionLogarithm",materialExpressionLogarithm10:"/Script/Engine.MaterialExpressionLogarithm10",materialExpressionLogarithm2:"/Script/Engine.MaterialExpressionLogarithm2",materialExpressionMaterialFunctionCall:"/Script/Engine.MaterialExpressionMaterialFunctionCall",materialExpressionSquareRoot:"/Script/Engine.MaterialExpressionSquareRoot",materialExpressionSubtract:"/Script/Engine.MaterialExpressionSubtract",materialExpressionTextureCoordinate:"/Script/Engine.MaterialExpressionTextureCoordinate",materialExpressionTextureSample:"/Script/Engine.MaterialExpressionTextureSample",materialExpressionWorldPosition:"/Script/Engine.MaterialExpressionWorldPosition",materialGraphNode:"/Script/UnrealEd.MaterialGraphNode",materialGraphNodeComment:"/Script/UnrealEd.MaterialGraphNode_Comment",metasoundEditorGraphExternalNode:"/Script/MetasoundEditor.MetasoundEditorGraphExternalNode",multiGate:"/Script/BlueprintGraph.K2Node_MultiGate",niagaraBool:"/Script/Niagara.NiagaraBool",niagaraClipboardContent:"/Script/NiagaraEditor.NiagaraClipboardContent",niagaraDataInterfaceCollisionQuery:"/Script/Niagara.NiagaraDataInterfaceCollisionQuery",niagaraDataInterfaceCurlNoise:"/Script/Niagara.NiagaraDataInterfaceCurlNoise",niagaraDataInterfaceVolumeTexture:"/Script/Niagara.NiagaraDataInterfaceVolumeTexture",niagaraFloat:"/Script/Niagara.NiagaraFloat",niagaraInt32:"/Script/Niagara.NiagaraInt32",niagaraNodeConvert:"/Script/NiagaraEditor.NiagaraNodeConvert",niagaraNodeFunctionCall:"/Script/NiagaraEditor.NiagaraNodeFunctionCall",niagaraNodeInput:"/Script/NiagaraEditor.NiagaraNodeInput",niagaraNodeOp:"/Script/NiagaraEditor.NiagaraNodeOp",niagaraParameterMap:"/Script/Niagara.NiagaraParameterMap",niagaraPosition:"/Script/Niagara.NiagaraPosition",pawn:"/Script/Engine.Pawn",pcgEditorGraphNode:"/Script/PCGEditor.PCGEditorGraphNode",pcgEditorGraphNodeInput:"/Script/PCGEditor.PCGEditorGraphNodeInput",pcgEditorGraphNodeOutput:"/Script/PCGEditor.PCGEditorGraphNodeOutput",pcgHiGenGridSizeSettings:"/Script/PCG.PCGHiGenGridSizeSettings",pcgSubgraphSettings:"/Script/PCG.PCGSubgraphSettings",promotableOperator:"/Script/BlueprintGraph.K2Node_PromotableOperator",quat4f:"/Script/CoreUObject.Quat4f",removeDelegate:"/Script/BlueprintGraph.K2Node_RemoveDelegate",reverseForEachLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ReverseForEachLoop",rotator:"/Script/CoreUObject.Rotator",select:"/Script/BlueprintGraph.K2Node_Select",self:"/Script/BlueprintGraph.K2Node_Self",slateBlueprintLibrary:"/Script/UMG.SlateBlueprintLibrary",spawnActorFromClass:"/Script/BlueprintGraph.K2Node_SpawnActorFromClass",switchEnum:"/Script/BlueprintGraph.K2Node_SwitchEnum",switchGameplayTag:"/Script/GameplayTagsEditor.GameplayTagsK2Node_SwitchGameplayTag",switchInteger:"/Script/BlueprintGraph.K2Node_SwitchInteger",switchName:"/Script/BlueprintGraph.K2Node_SwitchName",switchString:"/Script/BlueprintGraph.K2Node_SwitchString",timeline:"/Script/BlueprintGraph.K2Node_Timeline",timeManagementBlueprintLibrary:"/Script/TimeManagement.TimeManagementBlueprintLibrary",transform:"/Script/CoreUObject.Transform",userDefinedEnum:"/Script/Engine.UserDefinedEnum",variableGet:"/Script/BlueprintGraph.K2Node_VariableGet",variableSet:"/Script/BlueprintGraph.K2Node_VariableSet",vector:"/Script/CoreUObject.Vector",vector2D:"/Script/CoreUObject.Vector2D",vector2f:"/Script/CoreUObject.Vector2f",vector3f:"/Script/CoreUObject.Vector3f",vector4f:"/Script/CoreUObject.Vector4f",whileLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:WhileLoop"};static pinInputWrapWidth=145;static removeEventName="ueb-element-delete";static scale={[-12]:.133333,[-11]:.166666,[-10]:.2,[-9]:.233333,[-8]:.266666,[-7]:.3,[-6]:.333333,[-5]:.375,[-4]:.5,[-3]:.675,[-2]:.75,[-1]:.875,0:1,1:1.25,2:1.375,3:1.5,4:1.675,5:1.75,6:1.875,7:2};static smoothScrollTime=1e3;static stringEscapedCharacters=/["\\]/g;static subObjectAttributeNamePrefix="#SubObject";static subObjectAttributeNameFromEntity=(e,t=!1)=>this.subObjectAttributeNamePrefix+(!t&&e.Class?`_${e.Class.type}`:"")+"_"+e.Name;static subObjectAttributeNameFromReference=(e,t=!1)=>this.subObjectAttributeNamePrefix+(t?"":"_"+e.type)+"_"+e.path;static subObjectAttributeNameFromName=e=>this.subObjectAttributeNamePrefix+"_"+e;static switchTargetPattern=/\/Script\/[\w\.\/\:]+K2Node_Switch([A-Z]\w+)+/;static trackingMouseEventName={begin:"ueb-tracking-mouse-begin",end:"ueb-tracking-mouse-end"};static unescapedBackslash=/(?<=(?:[^\\]|^)(?:\\\\)*)\\(?!\\)/;static windowApplyEventName="ueb-window-apply";static windowApplyButtonText="OK";static windowCancelEventName="ueb-window-cancel";static windowCancelButtonText="Cancel";static windowCloseEventName="ueb-window-close";static CommonEnums={[this.paths.eAttachmentRule]:["KeepRelative","KeepWorld","SnapToTarget"],[this.paths.eDrawDebugTrace]:["None","ForOneFrame","ForDuration","Persistent"],[this.paths.eMaterialSamplerType]:["Color","Grayscale","Alpha","Normal","Masks","Distance Field Font","Linear Color","Linear Grayscale","Data","External","Virtual Color","Virtual Grayscale","Virtual Alpha","Virtual Normal","Virtual Mask","Virtual Linear Color","Virtual Linear Grayscal"],[this.paths.eNiagara_Float4Channel]:[["NewEnumerator0","R"],["NewEnumerator1","G"],["NewEnumerator2","B"],["NewEnumerator3","A"]],[this.paths.eSamplerSourceMode]:["From texture asset","Shared: Wrap","Shared: Clamp","Hidden"],[this.paths.eSearchCase]:["CaseSensitive","IgnoreCase"],[this.paths.eWorldPositionIncludedOffsets]:["Absolute World Position (Including Material Shader Offsets)","Absolute World Position (Excluding Material Shader Offsets)","Camera Relative World Position (Including Material Shader Offsets)","Camera Relative World Position (Excluding Material Shader Offsets)"],[this.paths.eSearchDir]:["FromStart","FromEnd"],[this.paths.eSpawnActorCollisionHandlingMethod]:[["Undefined","Default"],["AlwaysSpawn","Always Spawn, Ignore Collisions"],["AdjustIfPossibleButAlwaysSpawn","Try To Adjust Location, But Always Spawn"],["AdjustIfPossibleButDontSpawnIfColliding","Try To Adjust Location, Don't Spawn If Still Colliding"],["DontSpawnIfColliding","Do Not Spawn"]],[this.paths.eTextureMipValueMode]:["None (use computed mip level)","MipLevel (absolute, 0 is full resolution)","MipBias (relative to the computed mip level)","Derivative (explicit derivative to compute mip level)"],[this.paths.eTraceTypeQuery]:[["TraceTypeQuery1","Visibility"],["TraceTypeQuery2","Camera"]]};static ModifierKeys=["Ctrl","Shift","Alt","Meta"];static rgba=["R","G","B","A"];static Keys={Backspace:"Backspace",Tab:"Tab",LeftControl:"ControlLeft",RightControl:"ControlRight",LeftShift:"ShiftLeft",RightShift:"ShiftRight",LeftAlt:"AltLeft",RightAlt:"AltRight",Enter:"Enter",Pause:"Pause",CapsLock:"CapsLock",Escape:"Escape",Space:"Space",PageUp:"PageUp",PageDown:"PageDown",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",PrintScreen:"PrintScreen",Insert:"Insert",Delete:"Delete",Zero:"Digit0",One:"Digit1",Two:"Digit2",Three:"Digit3",Four:"Digit4",Five:"Digit5",Six:"Digit6",Seven:"Digit7",Eight:"Digit8",Nine:"Digit9",A:"KeyA",B:"KeyB",C:"KeyC",D:"KeyD",E:"KeyE",F:"KeyF",G:"KeyG",H:"KeyH",I:"KeyI",K:"KeyK",L:"KeyL",M:"KeyM",N:"KeyN",O:"KeyO",P:"KeyP",Q:"KeyQ",R:"KeyR",S:"KeyS",T:"KeyT",U:"KeyU",V:"KeyV",W:"KeyW",X:"KeyX",Y:"KeyY",Z:"KeyZ",NumPadZero:"Numpad0",NumPadOne:"Numpad1",NumPadTwo:"Numpad2",NumPadThree:"Numpad3",NumPadFour:"Numpad4",NumPadFive:"Numpad5",NumPadSix:"Numpad6",NumPadSeven:"Numpad7",NumPadEight:"Numpad8",NumPadNine:"Numpad9",Multiply:"NumpadMultiply",Add:"NumpadAdd",Subtract:"NumpadSubtract",Decimal:"NumpadDecimal",Divide:"NumpadDivide",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",NumLock:"NumLock",ScrollLock:"ScrollLock"}}class oe{static clamp(e,t=-1/0,i=1/0){return Math.min(Math.max(e,t),i)}static getScale(e){const t=e.blueprint?.getScale()??getComputedStyle(e).getPropertyValue("--ueb-scale");return""!=t?parseFloat(t):1}static minDecimals(e,t=1,i=1e-8){const s=e*10**t;return Math.abs(s%1)>i?e.toString():e.toFixed(t)}static roundDecimals(e,t=1){const i=10**t;return Math.round(e*i)/i}static printExponential(e){if(e==Number.POSITIVE_INFINITY)return"inf";if(e==Number.NEGATIVE_INFINITY)return"-inf";const t=Math.round(e);if(t>=1e3){const i=Math.floor(Math.log10(t));return`${Math.round(e/10**(i-2))/100}e+${i<10?"0":""}${i}`}return 0==Math.floor(e)?e.toString():this.roundDecimals(e,Math.max(0,3-Math.floor(e).toString().length)).toString()}static approximatelyEqual(e,t,i=1e-8){return!(Math.abs(e-t)>i)}static convertLocation(e,t,i=!1){const s=i?1:1/oe.getScale(t),r=t.getBoundingClientRect();return[Math.round((e[0]-r.x)*s),Math.round((e[1]-r.y)*s)]}static isSerialized(e,t){return e.attributes?.[t]?.serialized??e.constructor.attributes?.[t]?.serialized??!1}static objectGet(e,t,i=void 0){if(void 0!==e){if(!(t instanceof Array))throw new TypeError("UEBlueprint: Expected keys to be an array");return 0!=t.length&&t[0]in e&&void 0!==e[t[0]]?1==t.length?e[t[0]]:oe.objectGet(e[t[0]],t.slice(1),i):i}}static objectSet(e,t,i,s=Object){if(!(t instanceof Array))throw new TypeError("Expected keys to be an array.");if(1==t.length){if(t[0]in e||void 0===e[t[0]])return e[t[0]]=i,!0}else if(t.length>0)return e[t[0]]instanceof Object||(e[t[0]]=new s),oe.objectSet(e[t[0]],t.slice(1),i,s);return!1}static snapToGrid(e,t,i){return 1===i?[e,t]:[i*Math.floor(e/i),i*Math.floor(t/i)]}static mergeArrays(e=[],t=[],i=(e,t)=>e==t,s=e=>{}){let r=[];e=[...e],t=[...t];e:for(;;){for(let n=0;n(s(e),e))),...e.splice(0,1)),t.shift();continue e}break e}return r.push(...e),r.push(...t.filter((e=>!r.some((t=>i(t,e)))))),r}static escapeNewlines(e){return e.replaceAll("\n","\\n").replaceAll("\t","\\t")}static escapeString(e,t=!0){let i=e.replaceAll(new RegExp(`(${ae.stringEscapedCharacters.source})`,"g"),"\\$1");return t&&(i=i.replaceAll("\n","\\n").replaceAll("\t","\\t")),i}static unescapeString(e){return e.replaceAll(new RegExp(ae.unescapedBackslash.source+"t","g"),"\t").replaceAll(new RegExp(ae.unescapedBackslash.source+"n","g"),"\n").replaceAll(new RegExp(`\\\\(${ae.stringEscapedCharacters.source})`,"g"),"$1")}static clearHTMLWhitespace(e){return e.replaceAll(" "," ").replaceAll(/|
/g,"\n").replaceAll(/(\)/g,"")}static encodeHTMLWhitespace(e){return e.replaceAll(" "," ")}static capitalFirstLetter(e){return 0===e.length?e:e.charAt(0).toUpperCase()+e.slice(1)}static formatStringName(e=""){return e.replace(/^\s*b(?=[A-Z])/,"").replaceAll(ae.nameRegexSpaceReplacement," ").trim().split(" ").map((e=>oe.capitalFirstLetter(e))).join(" ")}static getIdFromReference(e){return e.replace(/(?:.+\.)?([^\.]+)$/,"$1").replaceAll(/(?<=[a-z\d])(?=[A-Z])|(?<=[a-zA-Z])(?=\d)|(?<=[A-Z]{2})(?=[A-Z][a-z])/g,"-").toLowerCase()}static getNameFromPath(e,t=!1){const i=t?/([^\.\/]+?)(?:_\d+)$/:/([^\.\/]+)$/;return e.match(i)?.[1]??""}static getPolarCoordinates(e,t,i=!1){let s=Math.atan2(t,e);return i&&s<0&&(s=2*Math.PI+s),[Math.sqrt(e*e+t*t),s]}static getCartesianCoordinates(e,t){return[e*Math.cos(t),e*Math.sin(t)]}static range(e=0,t=0,i=(t>=e?1:-1)){return Array.from({length:Math.ceil((t-e)/i)},((t,s)=>e+s*i))}static getFirstWordOrder(e){return new RegExp(/\s*/.source+e.join(/[^\n]+\n\s*/.source)+/\s*/.source)}static paste(e,t){const i=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0,clipboardData:new DataTransfer});i.clipboardData.setData("text",t),e.dispatchEvent(i)}static async copy(e){const t=new ClipboardEvent("copy",{bubbles:!0,cancelable:!0,clipboardData:new DataTransfer});e.dispatchEvent(t)}static animate(e,t,i,s,r=e=>{},n=e=>{const t=e**3.5;return t/(t+(1-e)**3.5)}){let a;const o=l=>{void 0===a&&(a=l);let c=(l-a)/i;oe.approximatelyEqual(c,1)||c>1?c=1:r(requestAnimationFrame(o));const u=e+(t-e)*n(c);s(u)};r(requestAnimationFrame(o))}}class le extends re{#e;get blueprint(){return this.#e}set blueprint(e){this.#e=e}#t;get entity(){return this.#t}set entity(e){this.#t=e}#i;get template(){return this.#i}isInitialized=!1;isSetup=!1;inputObjects=[];initialize(e,t){this.requestUpdate(),this.#t=e,this.#i=t,this.#i.initialize(this),this.isConnected&&this.updateComplete.then((()=>this.setup())),this.isInitialized=!0}connectedCallback(){super.connectedCallback(),this.blueprint=this.closest("ueb-blueprint"),this.isInitialized&&(this.requestUpdate(),this.updateComplete.then((()=>this.setup())))}disconnectedCallback(){super.disconnectedCallback(),this.isSetup&&this.updateComplete.then((()=>this.cleanup())),this.acknowledgeDelete()}createRenderRoot(){return this}setup(){this.template.setup(),this.isSetup=!0}cleanup(){this.template.cleanup(),this.isSetup=!1}willUpdate(e){super.willUpdate(e),this.template.willUpdate(e)}update(e){super.update(e),this.template.update(e)}render(){return this.template.render()}firstUpdated(e){super.firstUpdated(e),this.template.firstUpdated(e),this.template.inputSetup()}updated(e){super.updated(e),this.template.updated(e)}acknowledgeDelete(){let e=new CustomEvent(ae.removeEventName);this.dispatchEvent(e)}isSameGraph(e){return this.blueprint&&this.blueprint==e?.blueprint}}class ce{static arrayPin=z``;static branchNode=z``;static breakStruct=z``;static cast=z``;static close=z``;static convert=z``;static correct=z``;static delegate=z``;static doN=z``;static doOnce=z``;static enum=z``;static event=z``;static execPin=z``;static expandIcon=z``;static flipflop=z``;static forEachLoop=z``;static functionSymbol=z``;static gamepad=z``;static genericPin=z``;static keyboard=z``;static loop=z``;static macro=z``;static mapPin=z``;static makeArray=z``;static makeMap=z``;static makeSet=z``;static makeStruct=z``;static metasoundFunction=z``;static mouse=z``;static node=z``;static operationPin=z``;static pcgStackPin=z``;static pcgPin=z``;static pcgParamPin=z``;static pcgSpatialPin=z``;static plusCircle=z``;static questionMark=z``;static referencePin=z``;static reject=z``;static setPin=z``;static select=z``;static sequence=z``;static sound=z``;static spawnActor=z``;static staticPin=z``;static switch=z``;static timer=z``;static touchpad=z``}class ue{static makeSuccess(e,t,i=null,s=0){return{status:!0,value:t,position:e,bestParser:i,bestPosition:s}}static makeFailure(e=0,t=null,i=0){return{status:!1,value:null,position:e,bestParser:t,bestPosition:i}}static makeContext(e=null,t=""){return{parsernostrum:e,input:t,highlighted:null}}static makePathNode(e,t=0,i=null){return{parent:i,current:e,index:t}}}class he{static indentation=" ";static highlight="Last valid parser";Self;static frame(e,t="",i=""){t=e?"[ "+t+" ]":"";let s=e.split("\n");const r=Math.max(...s.map((e=>e.length))),n=r";const r=this.isVisited(i),n=this.isHighlighted(e,i);let a=r?"<...>":this.doToString(e,n?"":t,i,s);return n&&(a=he.frame(a,he.highlight,t)),a}doToString(e,t,i,s){return`${this.constructor.name} does not implement toString()`}}class pe extends he{#s;get value(){return this.#s}constructor(e){super(),this.#s=e}parse(e,t,i,s){i=this.makePath(i,s);const r=t+this.#s.length,n=e.input.substring(t,r);return this.#s===n?ue.makeSuccess(r,this.#s,i,r):ue.makeFailure()}doToString(e,t,i,s){return`"${this.value.replaceAll("\n","\\n").replaceAll('"','\\"')}"`}}class de extends he{static instance=new de;parse(e,t,i,s){return i=this.makePath(i,s),ue.makeSuccess(t,"",i,0)}doToString(e,t,i,s){return""}}class me extends he{#r;get parsers(){return this.#r}constructor(...e){super(),this.#r=e}parse(e,t,i,s){i=this.makePath(i,s);const r=ue.makeSuccess(0,"");for(let s=0;sr.bestPosition&&(r.bestParser=n.bestParser,r.bestPosition=n.bestPosition),n.status)return r.value=n.value,r.position=n.position,r}return r.status=!1,r.value=null,r}doToString(e,t,i,s){if(2===this.#r.length&&this.#r[1]instanceof de){let s=this.#r[0].toString(e,t,i,0);return this.#r[0]instanceof pe||(s="<"+s+">"),s+="?",s}const r=t+he.indentation;let n="ALT<\n"+r+this.#r.map(((t,s)=>t.toString(e,r+" ".repeat(0===s?0:he.indentation.length-2),i,s))).join("\n"+r+"| ")+"\n"+t+">";return n}}class ge extends he{#n;get parser(){return this.#n}#a;constructor(e,t){super(),this.#n=e,this.#a=t}parse(e,t,i,s){i=this.makePath(i,s);const r=this.#n.parse(e,t,i,0);if(!r.status)return r;const n=this.#a(r.value,e.input,r.position).getParser().parse(e,r.position,i,0);return r.bestPosition>n.bestPosition&&(n.bestParser=r.bestParser,n.bestPosition=r.bestPosition),n}doToString(e,t,i,s){return this.#n.toString(e,t,i,0)+" => chained"}}class be extends he{static instance=new be;parse(e,t,i,s){return ue.makeFailure()}doToString(e,t,i,s){return""}}class ve extends he{#n;get parser(){return this.#n}#o="";constructor(e,t){super(),this.#n=e,this.#o=t}makePath(e,t){return e}parse(e,t,i,s){return this.parse=this.#n.parse.bind(this.#n),this.parse(e,t,i,s)}doToString(e,t,i,s){let r=this.#n.toString(e,"",i,s);return r=he.frame(r,this.#o,t),r}}class fe extends he{#n;#l;constructor(e){super(),this.#n=e}makePath(e,t){return e}isHighlighted(e,t){if(super.isHighlighted(e,t)){const i={parent:t,parser:this.#l,index:0};e.highlighted=e.highlighted instanceof he?this.#l:i}return!1}resolve(){return this.#l||(this.#l=this.#n().getParser()),this.#l}parse(e,t,i,s){return this.resolve(),this.parse=this.#l.parse.bind(this.#l),this.parse(e,t,i,s)}doToString(e,t,i,s){return this.resolve(),this.doToString=this.#l.toString.bind(this.#l),this.doToString(e,t,i,s)}}class ye extends he{#n;get parser(){return this.#n}#c;get type(){return this.#c}static Type={NEGATIVE_AHEAD:"?!",NEGATIVE_BEHIND:"?String.raw`[^${e}\\]*(?:\\.[^${e}\\]*)*`;static#m=/[-\+]?(?:\d*\.)?\d+/;static common={number:new RegExp(this.#m.source+String.raw`(?!\.)`),numberInteger:/[\-\+]?\d+(?!\.\d)/,numberNatural:/\d+/,numberExponential:new RegExp(this.#m.source+String.raw`(?:[eE][\+\-]?\d+)?(?!\.)`),numberUnit:/\+?(?:0(?:\.\d+)?|1(?:\.0+)?)(?![\.\d])/,numberByte:/0*(?:25[0-5]|2[0-4]\d|1?\d?\d)(?!\d|\.)/,whitespace:/\s+/,whitespaceOpt:/\s*/,whitespaceInline:/[^\S\n]+/,whitespaceInlineOpt:/[^\S\n]*/,whitespaceMultiline:/\s*?\n\s*/,doubleQuotedString:new RegExp(`"(${this.#d('"')})"`),singleQuotedString:new RegExp(`'(${this.#d("'")})'`),backtickQuotedString:new RegExp("`("+this.#d("`")+")`")};constructor(e,t){super(),this.#u=e,this.#h=new RegExp(`^(?:${e.source})`,e.flags),this.#p=t}parse(e,t,i,s){i=this.makePath(i,s);const r=this.#h.exec(e.input.substring(t));r&&(t+=r[0].length);return r?ue.makeSuccess(t,this.#p(r),i,t):ue.makeFailure()}doToString(e,t,i,s){let r="/"+this.#u.source+"/";const n=Object.entries(we.common).find((([e,t])=>t.source===this.#u.source))?.[0];return n&&(r="P."+n),r}}class Se extends he{#n;get parser(){return this.#n}#g;get mapper(){return this.#g}constructor(e,t){super(),this.#n=e,this.#g=t}isHighlighted(e,t){if(super.isHighlighted(e,t)){const i={parent:t,parser:this.#n,index:0};e.highlighted=e.highlighted instanceof he?this.#n:i}return!1}parse(e,t,i,s){i=this.makePath(i,s);const r=this.#n.parse(e,t,i,0);return r.status&&(r.value=this.#g(r.value)),r}doToString(e,t,i,s){let r=this.#n.toString(e,t,i,0);if(this.#n instanceof we&&Object.values(we.common).includes(this.#n.regexp))return this.#n.regexp===we.common.numberInteger&&this.#g===BigInt?"P.numberBigInteger":r;let n=this.#g.toString();return(n.length>60||n.includes("\n"))&&(n="(...) => { ... }"),r+=` -> map<${n}>`,r}}class Ee extends we{static#g=e=>e;constructor(e){super(e,Ee.#g)}}class Ce extends we{constructor(e,t=0){super(e,(e=>e[t]))}}class Ne extends he{#r;get parsers(){return this.#r}constructor(...e){super(),this.#r=e}parse(e,t,i,s){i=this.makePath(i,s);const r=new Array(this.#r.length),n=ue.makeSuccess(t,r);for(let t=0;tn.bestPosition&&(n.bestParser=s.bestParser,n.bestPosition=s.bestPosition),!s.status){n.status=!1,n.value=null;break}n.value[t]=s.value,n.position=s.position}return n}doToString(e,t,i,s){const r=t+he.indentation,n="SEQ<\n"+r+this.#r.map(((t,s)=>t.toString(e,r,i,s))).join("\n"+r)+"\n"+t+">";return n}}class xe extends he{#n;get parser(){return this.#n}#b;get min(){return this.#b}#v;get max(){return this.#v}constructor(e,t=0,i=Number.POSITIVE_INFINITY){if(super(),t>i)throw new Error("Min is greater than max");this.#n=e,this.#b=t,this.#v=i}parse(e,t,i,s){i=this.makePath(i,s);const r=ue.makeSuccess(t,[],i);for(let t=0;tr.bestPosition&&(r.bestParser=s.bestParser,r.bestPosition=s.bestPosition),!s.status){te;static#y=([e,t])=>t;static#w=([e,t])=>[e,...t];static#S=e=>e instanceof Array?e.join(""):e;static number=this.reg(we.common.number).map(Number);static numberInteger=this.reg(we.common.numberInteger).map(Number);static numberBigInteger=this.reg(this.numberInteger.getParser().parser.regexp).map(BigInt);static numberNatural=this.reg(we.common.numberNatural).map(Number);static numberExponential=this.reg(we.common.numberExponential).map(Number);static numberUnit=this.reg(we.common.numberUnit).map(Number);static numberByte=this.reg(we.common.numberByte).map(Number);static whitespace=this.reg(we.common.whitespace);static whitespaceOpt=this.reg(we.common.whitespaceOpt);static whitespaceInline=this.reg(we.common.whitespaceInline);static whitespaceInlineOpt=this.reg(we.common.whitespaceInlineOpt);static whitespaceMultiline=this.reg(we.common.whitespaceMultiline);static doubleQuotedString=this.reg(we.common.doubleQuotedString,1);static singleQuotedString=this.reg(we.common.singleQuotedString,1);static backtickQuotedString=this.reg(we.common.backtickQuotedString,1);constructor(e,t=!1){this.#n=e}static#E(e){const t=[];for(;e;)t.push(e),e=e.parent;t.reverse();let i=new Map;for(let e=1;ei<=s||i>e))),i.set(t[e].current,s),t.splice(s+1,e-s),e=s):i.set(t[e].current,e)}return t[t.length-1]}getParser(){return this.#n}run(e){const t=this.#n.parse(ue.makeContext(this,e),0,ue.makePathNode(),0);return t.position!==e.length&&(t.status=!1),t}parse(e,t=!0){const i=this.run(e);if(i.status)return i.value;const s=[Math.ceil(30),Math.floor(30)],r=Pe.lineColumnFromOffset(e,i.bestPosition);let n=i.bestPosition;const a=e.replaceAll(/^(\s)+|\s{6,}|\s*?\n\s*/g,((e,t,s)=>{let r=t?"...":" ... ";return s<=i.bestPosition&&(i.bestPosition0&&(u="..."+u,c+=3),s[1]e.getParser()))))}static alt(...e){return new this(new me(...e.map((e=>e.getParser()))))}static lookahead(e){return new this(new ye(e.getParser(),ye.Type.POSITIVE_AHEAD))}static lazy(e){return new this(new fe(e))}times(e,t=e){return new Pe(new xe(this.#n,e,t))}many(){return this.times(0,Number.POSITIVE_INFINITY)}atLeast(e){return this.times(e,Number.POSITIVE_INFINITY)}atMost(e){return this.times(0,e)}opt(e=""){let t=Pe.success();return""!==e&&(t=t.map((()=>e))),Pe.alt(this,t)}sepBy(e,t=1,i=!1){let s=Pe.seq(this,Pe.seq(e,this).map(Pe.#y).atLeast(t-1),...i?[e.opt([])]:[]).map(Pe.#w);return 0===t&&(s=s.opt([])),s}skipSpace(){return Pe.seq(this,Pe.whitespaceOpt).map(Pe.#f)}map(e){return new Pe(new Se(this.#n,e))}chain(e){return new Pe(new ge(this.#n,e))}assert(e){return this.chain(((t,i,s)=>e(t,i,s)?Pe.success().map((()=>t)):Pe.failure()))}join(e=""){return this.map(Pe.#S)}label(e=""){return new Pe(new ve(this.#n,e))}toString(e="",t=!1,i=null){i instanceof Pe&&(i=i.getParser());const s=ue.makeContext(this,"");s.highlighted=i;const r=ue.makePathNode();return(t?"\n"+e:"")+this.#n.toString(s,e,r)}}class ke{static same=e=>e;static notWrapped=(e,t)=>t;static defaultWrapped=(e,t)=>`${e.#C}(${t})`;static wrap=this.defaultWrapped;static attributeSeparator=",";static keySeparator="=";static printKey=e=>e;static grammar=Pe.lazy((()=>this.createGrammar()));static unknownEntityGrammar;static unknownEntity;static attributes={};static lookbehind="";static default;static nullable=!1;static ignored=!1;static serialized=!1;static expected=!1;static inlined=!1;static quoted;static silent=!1;static trailing=!1;#N;get keys(){return this.#N??Object.keys(this)}set keys(e){this.#N=[...new Set(e)]}#C=this.constructor.lookbehind;get lookbehind(){return this.#C.trim()}set lookbehind(e){this.#C=e}#x=this.constructor.ignored;get ignored(){return this.#x}set ignored(e){this.#x=e}#P=this.constructor.inlined;get inlined(){return this.#P}set inlined(e){this.#P=e}#k;get quoted(){return this.#k??this.constructor.quoted??!1}set quoted(e){this.#k=e}#A;get trailing(){return this.#A??this.constructor.trailing??!1}set trailing(e){this.#A=e}constructor(e={}){const t=this.constructor.attributes,i=oe.mergeArrays(Object.keys(e),Object.entries(t).filter((([e,t])=>void 0!==t.default)).map((([e,t])=>e)));for(const s of i){if(void 0!==e[s]){e[s].constructor===Object&&(e[s]=new(void 0!==t[s]?t[s]:ke.unknownEntity)(e[s]));const i=t[s];if(this[s]=e[s],i?.compute){const t=i.compute(this).grammar.run(e[s].toString());t.status&&(this[s]=t.value)}continue}const i=t[s];void 0===i.default||(this[s]=i.default(i))}}static createGrammar(){return this.unknownEntityGrammar}static actualClass(){let e=this;for(;!e.name;)e=Object.getPrototypeOf(e);return e}static className(){return this.actualClass().name}static asUniqueClass(e=!1){let t=this;return(this.name.length||e)&&(t=class extends(this){},t.grammar=t.createGrammar()),t}static withLookbehind(e){const t=this.asUniqueClass();return t.lookbehind=e,t}static withDefault(e=e=>new e){const t=this.asUniqueClass();return t.default=e,t}static flagNullable(e=!0){const t=this.asUniqueClass();return t.nullable=e,t}static flagIgnored(e=!0){const t=this.asUniqueClass();return t.ignored=e,t}static flagSerialized(e=!0){const t=this.asUniqueClass();return t.serialized=e,t}static flagInlined(e=!0){const t=this.asUniqueClass();return t.inlined=e,t}static flagQuoted(e=!0){const t=this.asUniqueClass();return t.quoted=e,t}static flagSilent(e=!0){const t=this.asUniqueClass();return t.silent=e,t}static flagTrailing(e=!0){const t=this.asUniqueClass();return t.trailing=e,t}static asSerializedString(e){return`"${e.replaceAll(/(?<=(?:[^\\]|^)(?:\\\\)*?)"/g,'\\"')}"`}showProperty(e){let t=this[e];const i=t.constructor;if(i.silent&&void 0!==i.default){void 0===i["#default"]&&(i["#default"]=i.default(i));const e=i["#default"];return!t.equals(e)}return!0}listenAttribute(e,t){const i=Object.getOwnPropertyDescriptor(this,e),s=i.set;s?(i.set=e=>{s(e),t(e)},Object.defineProperties(this,{[e]:i})):i.value&&Object.defineProperties(this,{["#"+e]:{value:i.value,writable:!0,enumerable:!1},[e]:{enumerable:!0,get(){return this["#"+e]},set(i){t(i),this["#"+e]=i}}})}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,r=i.keySeparator,n=i.attributeSeparator,a=i.wrap){const o=i!==this.constructor;let l="",c=!0;const u=this instanceof ke?this.keys:Object.keys(this);for(const a of u){const o=this[a],u=o?.constructor;if(void 0===o||this instanceof ke&&!this.showProperty(a))continue;c?c=!1:l+=n;let h=this instanceof Array?`(${a})`:a;if(h.length&&(i.attributes[a]?.quoted||o.quoted)&&(h=`"${h}"`),o.inlined){const a="ArrayEntity"===u.className()?e=>s(`${h}${e}`):e=>s(`${h}.${e}`);l+=o.serialize(e,t,void 0,a,r,n,i.notWrapped);continue}h=s(h),h.length&&(l+=(n.includes("\n")?t:"")+h+r);let p=o?.serialize(e,t);l+=p}return this instanceof ke&&(o&&i.trailing||this.trailing)&&l.length&&(l+=n),a(this,l)}serialize(e=!1,t="",i=this.constructor,s=i.printKey,r=i.keySeparator,n=i.attributeSeparator,a=i.wrap){this.constructor;let o=this instanceof Array?ke.prototype.doSerialize.bind(this)(e,t,i,s,r,n,a):this.doSerialize(e,t,i,s,r,n,a);return i.serialized&&(o=ke.asSerializedString(o)),o}equals(e){if(!(e instanceof ke))return!1;const t=Object.keys(this),i=Object.keys(e),s=this.constructor.actualClass(),r=e.constructor.actualClass();if(!(t.length===i.length&&this.lookbehind==e.lookbehind&&(e instanceof s||this instanceof r)))return!1;for(let s=0;s{},toAttribute:(e,t)=>!0===e?"true":!1===e?"false":""};#L=!0;get uppercase(){return this.#L}set uppercase(e){this.#L=e}static createGrammar(){return Pe.regArray(/(true)|(True)|(false)|(False)/).map((e=>{const t=e[1]??e[2]?new this(!0):new this(!1);return t.uppercase=void 0!==(e[2]??e[4]),t})).label("BooleanEntity")}constructor(e=!1){super(),this.value=e}serialize(e=!1,t="",i=this.constructor){let s=this.value?this.#L?"True":"true":this.#L?"False":"false";return i.serialized&&(s=`"${s}"`),s}valueOf(){return this.value}}class Le{static#M=new Map;static registerElement(e,t){Le.#M.set(e,t)}static getConstructor(e){return Le.#M.get(e)}}class Me extends ke{static alternatives=[];static className(){let e=super.className();return this.alternatives.length&&(e+=".accepting("+this.alternatives.map((e=>e.className())).join(", ")+")"),e}static createGrammar(){const e=this.alternatives.map((e=>e.grammar));return 0==this.alternatives.length||e.includes(this.unknownEntityGrammar)?this.unknownEntityGrammar:Pe.alt(...e)}static accepting(...e){const t=this.asUniqueClass();return t.alternatives=e,t.grammar=t.createGrammar(),t}}class Te{static numberRegexSource=Pe.number.getParser().parser.regexp.source;static separatedBy=(e,t,i=1)=>new RegExp(e+"(?:"+t+e+")"+(1===i?"*":2===i?"+":`{${i},}`));static Regex=class{static HexDigit=/[0-9a-fA-F]/;static InsideString=/(?:[^"\\]|\\.)*/;static InsideSingleQuotedString=/(?:[^'\\]|\\.)*/;static Integer=/[\-\+]?\d+(?!\d|\.)/;static Number=/[-\+]?(?:\d*\.)?\d+(?!\d|\.)/;static RealUnit=/\+?(?:0(?:\.\d+)?|1(?:\.0+)?)(?![\.\d])/;static Word=Te.separatedBy("[a-zA-Z]","_");static Symbol=/[a-zA-Z_]\w*/;static DotSeparatedSymbols=Te.separatedBy(this.Symbol.source,"\\.");static MultipleWordsSymbols=Te.separatedBy(this.Symbol.source,"(?:\\.|\\ +)");static PathFragment=Te.separatedBy(this.Symbol.source,"[\\.:]");static PathSpaceFragment=Te.separatedBy(this.Symbol.source,"[\\.:\\ ]");static Path=new RegExp(`(?:\\/${this.PathFragment.source}){2,}`)};static null=Pe.reg(/\(\s*\)/).map((()=>null));static true=Pe.reg(/true/i).map((()=>!0));static false=Pe.reg(/false/i).map((()=>!1));static number=Pe.regArray(new RegExp(`(${Pe.number.getParser().parser.regexp.source})|(\\+?inf)|(-inf)`)).map((([e,t,i,s])=>t?Number(t):i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY));static bigInt=Pe.reg(new RegExp(Pe.number.getParser().parser.regexp.source)).map(BigInt).map((e=>void 0!==e[2]?Number.POSITIVE_INFINITY:void 0!==e[3]?Number.NEGATIVE_INFINITY:Number(e[1])));static naturalNumber=Pe.lazy((()=>Pe.reg(/\d+/).map(Number)));static string=Pe.doubleQuotedString.map((e=>oe.unescapeString(e)));static colorValue=Pe.numberByte;static word=Pe.reg(Te.Regex.Word);static symbol=Pe.reg(Te.Regex.Symbol);static symbolQuoted=Pe.reg(new RegExp('"('+Te.Regex.Symbol.source+')"'),1);static attributeName=Pe.reg(Te.Regex.DotSeparatedSymbols);static attributeNameQuoted=Pe.reg(new RegExp('"('+Te.Regex.InsideString.source+')"'),1);static guid=Pe.reg(new RegExp(`${Te.Regex.HexDigit.source}{32}`));static commaSeparation=Pe.reg(/\s*,\s*(?!\))/);static commaOrSpaceSeparation=Pe.reg(/\s*,\s*(?!\))|\s+/);static equalSeparation=Pe.reg(/\s*=\s*/);static hexColorChannel=Pe.reg(new RegExp(Te.Regex.HexDigit.source+"{2}"));static getAttribute(e,[t,...i]){const s=e?.attributes?.[t];if(s){if(s.prototype instanceof Me)for(const e of s.alternatives){const t=this.getAttribute(e,i);if(t)return t}return i.length>0?this.getAttribute(s,i):s}}static createAttributeGrammar(e,t=this.attributeName,i=this.equalSeparation,s=(e,t,i)=>{}){return Pe.seq(t,i).chain((([t,i])=>{const r=t.split(ae.keysSeparator),n=this.getAttribute(e,r),a=n?n.grammar:ke.unknownEntityGrammar,o=r.length>1;return a.map((e=>t=>{oe.objectSet(t,r,e),r.reduce(((e,t,i)=>(e[t].inlined=o&&i{let s={};return e.length&&(s.lookbehind=e),t.forEach((e=>e(s))),s.trailing=void 0!==i,s})).chain((t=>{(e.lookbehind instanceof Array||e.lookbehind!==r)&&(e=e.withLookbehind(r));const s=Object.keys(t),n=Object.keys(e.attributes);return null!=i?Pe.success().assert((e=>s.filter((e=>n.includes(e))).length/n.length>=i)).map((()=>new e(t))):Pe.success().map((()=>new e(t)))}))}}class Ie extends ke{static grammar=this.createGrammar();constructor(e=0){super(),this.value=e}static createGrammar(){return Pe.number.map((e=>new this(e)))}serialize(e=!1,t="",i=this.constructor){let s=this.value.toFixed(6);return i.serialized&&(s=`"${s}"`),s}valueOf(){return this.value}toString(){return this.value.toString()}}class Oe extends ke{static attributes={...super.attributes,R:Ie.withDefault(),G:Ie.withDefault(),B:Ie.withDefault(),A:Ie.withDefault((e=>new e(1)))};static grammar=this.createGrammar();#T=new Ie;get H(){return this.#T}set H(e){this.#T=e}#I=new Ie;get S(){return this.#I}set S(e){this.#I=e}#O=new Ie;get V(){return this.#O}set V(e){this.#O=e}constructor(e){super(e),e instanceof Array&&(e={R:e[0]??0,G:e[1]??0,B:e[2]??0,A:e[3]??1}),this.R,this.G,this.B,this.A,this.#D()}static createGrammar(){return Te.createEntityGrammar(this,Te.commaSeparation,.5).label("LinearColorEntity")}static printLinearColor(e){return`${Math.round(255*e.R.valueOf())}, ${Math.round(255*e.G.valueOf())}, ${Math.round(255*e.B.valueOf())}`}static linearToSRGB(e){return e<=0?0:e>=1?1:e<.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}static sRGBtoLinear(e){return e<=0?0:e>=1?1:e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}static getWhite(){return new Oe({R:new Ie(1),G:new Ie(1),B:new Ie(1)})}static getLinearColorFromHexGrammar(){const e=/[0-9a-fA-F]/;return Pe.regArray(new RegExp("#("+e.source+"{2})("+e.source+"{2})("+e.source+"{2})("+e.source+"{2})?")).map((([e,t,i,s,r])=>new this({R:parseInt(t,16)/255,G:parseInt(i,16)/255,B:parseInt(s,16)/255,A:parseInt(r??"FF",16)/255})))}static getLinearColorRGBListGrammar(){return Pe.seq(Pe.numberByte,Te.commaSeparation,Pe.numberByte,Te.commaSeparation,Pe.numberByte).map((([e,t,i,s,r])=>new this({R:e/255,G:i/255,B:r/255,A:1})))}static getLinearColorRGBGrammar(){return Pe.seq(Pe.reg(/rgb\s*\(\s*/),this.getLinearColorRGBListGrammar(),Pe.reg(/\s*\)/)).map((([e,t,i])=>t))}static getLinearColorRGBAGrammar(){return Pe.seq(Pe.reg(/rgba\s*\(\s*/),this.getLinearColorRGBListGrammar(),Pe.reg(/\s*\)/)).map((([e,t,i])=>t))}static getLinearColorFromAnyFormat(){return Pe.alt(this.getLinearColorFromHexGrammar(),this.getLinearColorRGBAGrammar(),this.getLinearColorRGBGrammar(),this.getLinearColorRGBListGrammar())}#D(){const e=this.R.value,t=this.G.value,i=this.B.value;if(oe.approximatelyEqual(e,t)&&oe.approximatelyEqual(e,i)&&oe.approximatelyEqual(t,i))return this.S.value=0,void(this.V.value=e);const s=Math.max(e,t,i),r=Math.min(e,t,i),n=s-r;let a;switch(s){case r:a=0;break;case e:a=(t-i)/n+(te.toString(16).toUpperCase().padStart(2,"0"))).join("")}toSRGBAString(){return this.toSRGBA().map((e=>e.toString(16).toUpperCase().padStart(2,"0"))).join("")}toHSVA(){return[this.H.value,this.S.value,this.V.value,this.A.value]}toNumber(){return(Math.round(255*this.R.value)<<24)+(Math.round(255*this.G.value)<<16)+(Math.round(255*this.B.value)<<8)+Math.round(255*this.A.value)}toArray(){return[this.R.value,this.G.value,this.B.value,this.A.value]}setFromRGBANumber(e){this.A.value=(255&e)/255,this.B.value=(e>>8&255)/255,this.G.value=(e>>16&255)/255,this.R.value=(e>>24&255)/255,this.#D()}setFromSRGBANumber(e){this.A.value=(255&e)/255,this.B.value=Oe.sRGBtoLinear((e>>8&255)/255),this.G.value=Oe.sRGBtoLinear((e>>16&255)/255),this.R.value=Oe.sRGBtoLinear((e>>24&255)/255),this.#D()}toString(){return Oe.printLinearColor(this)}}class De extends ke{static type;constructor(e=null){super();const t=this.constructor;e??=void 0!==t.default?t.default(t).getter:e,this.getter=e}static createGrammar(e=this.type?.grammar??Pe.lazy((()=>this.unknownEntityGrammar))){return this.type?.grammar.map((e=>new this((()=>e))))}static withDefault(e=e=>new e((()=>new e.type))){return super.withDefault(e)}static of(e){const t=this.asUniqueClass();return t.type=e,t.grammar=t.createGrammar(),t}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,r=i.keySeparator,n=i.attributeSeparator,a=i.wrap){return this.getter().serialize(e,t,i.type,s,r,n,a)}equals(e){return e instanceof De&&(e=e.getter?.()),this.getter?.().equals(e)}valueOf(){return this.getter().valueOf()}toString(){return this.getter().toString()}}class $e extends ke{static numberRegexSource=String.raw`${Te.numberRegexSource}(?<=(?:\.(\d*0+))?)`;static grammar=this.createGrammar();static precision;#$;get precision(){return this.constructor.precision??this.#$}set precision(e){this.#$=e}_value;get value(){return this._value}set value(e){-0===e&&(e=0),this._value=e}constructor(e=0,t=null){super(),this.value=Number(e),null!==t&&(this.#$=Number(t))}static createGrammar(){return Pe.regArray(new RegExp(`(?${this.numberRegexSource})|(?\\+?inf)|(?-inf)`)).map((({2:e,groups:{n:t,posInf:i,negInf:s}})=>new this(t?Number(t):i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,e?.length))).label("NumberEntity")}static withPrecision(e=0){const t=this.asUniqueClass();return t.precision=e,t}static printNumber(e){return e==Number.POSITIVE_INFINITY?"inf":e==Number.NEGATIVE_INFINITY?"-inf":oe.minDecimals(e)}serialize(e=!1,t="",i=this.constructor){if(this.value===Number.POSITIVE_INFINITY)return"+inf";if(this.value===Number.NEGATIVE_INFINITY)return"-inf";const s=i.precision??this.precision;let r=void 0!==s?this.value.toFixed(s):this.value.toString();return i.serialized&&(r=`"${r}"`),r}valueOf(){return this.value}toString(){return this.value.toString()}}class Be extends ke{static attributes={...super.attributes,X:$e.withDefault(),Y:$e.withDefault(),Z:$e.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.X,this.Y,this.Z}static createGrammar(){return Te.createEntityGrammar(this,Te.commaSeparation,1).label("VectorEntity")}toArray(){return[this.X.valueOf(),this.Y.valueOf(),this.Z.valueOf()]}}const Re=ae.paths,Ge=/\/Script\/SequencerScripting\.MovieSceneScripting(.+)Channel/,Ve={A_AccentGrave:"à",Add:"Num +",C_Cedille:"ç",Decimal:"Num .",Divide:"Num /",E_AccentAigu:"é",E_AccentGrave:"è",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",Gamepad_Special_Left_X:"Touchpad Button X Axis",Gamepad_Special_Left_Y:"Touchpad Button Y Axis",Mouse2D:"Mouse XY 2D-Axis",Multiply:"Num *",Section:"§",Subtract:"Num -",Tilde:"`"},He={"Boolean::LogicAnd":"Logic AND","Boolean::LogicEq":"==","Boolean::LogicNEq":"!=","Boolean::LogicNot":"Logic NOT","Boolean::LogicOr":"Logic OR","Integer::BitAnd":"Bitwise AND","Integer::BitLShift":"Bitwise Left Shift","Integer::BitNot":"Bitwise NOT","Integer::BitOr":"Bitwise OR","Integer::BitRShift":"Bitwise Right Shift","Integer::BitXOr":"Bitwise XOR","Integer::EnumEq":"==","Integer::EnumNEq":"!=","Matrix::MatrixMultiply":"Multiply (Matrix * Matrix)","Matrix::MatrixVectorMultiply":"Multiply (Matrix * Vector4)",...Object.fromEntries(Object.entries({Add:"+",ArcCosine:"ArcCosine","ArcCosine(Degrees)":"ArcCos(D)","ArcCosine(Radians)":"ArcCos(R)",ArcSine:"ArcSine","ArcSine(Degrees)":"ArcSin(D)","ArcSine(Radians)":"ArcSin(R)","ArcTangent(Degrees)":"ArcTan(D)","ArcTangent(Radians)":"ArcTan(R)",CmpEQ:"==",CmpGE:">=",CmpGT:">",CmpLE:"<=",CmpLT:"<",CmpNEQ:"!=","Cosine(Degrees)":"Cos(D)","Cosine(Radians)":"Cos(R)",DegreesToRadians:"DegToRad",DistancePos:"Distance",Div:String.fromCharCode(247),FMod:"%",FModFast:"Modulo Fast",Length:"Len",Madd:`(A${String.fromCharCode(10799)}B)+C`,Mul:String.fromCharCode(10799),Negate:"-A",OneMinus:"1-A",PI:String.fromCharCode(960),RadiansToDegrees:"RadToDeg","Rand Float":"Random Float","Rand Integer":"Random Integer",Rand:"Random",Rcp:"Reciprocal",RSqrt:"Rcp Sqrt","Sine(Degrees)":"Sin(D)","Sine(Radians)":"Sin(R)",Subtract:"-","Tangent(Degrees)":"Tan(D)","Tangent(Radians)":"Tan(R)",TWO_PI:`2 ${String.fromCharCode(960)}`}).map((([e,t])=>["Numeric::"+e,t])))};function ze(e=""){switch(e=e.toLowerCase()){case"zero":return 0;case"one":return 1;case"two":return 2;case"three":return 3;case"four":return 4;case"five":return 5;case"six":return 6;case"seven":return 7;case"eight":return 8;case"nine":return 9}}function _e(e){let t;switch(e.getType()){case Re.addDelegate:t??="Bind Event to ";case Re.clearDelegate:t??="Unbind all Events from ";case Re.removeDelegate:return t??="Unbind Event from ",t+oe.formatStringName(e.DelegateReference?.MemberName?.toString().replace(/Delegate$/,"")??"None");case Re.asyncAction:if(e.ProxyFactoryFunctionName)return oe.formatStringName(e.ProxyFactoryFunctionName?.toString());case Re.actorBoundEvent:case Re.componentBoundEvent:return`${oe.formatStringName(e.DelegatePropertyName?.toString())} (${e.ComponentPropertyName?.toString()??"Unknown"})`;case Re.callDelegate:return`Call ${e.DelegateReference?.MemberName?.toString()??"None"}`;case Re.createDelegate:return"Create Event";case Re.customEvent:if(e.CustomFunctionName)return e.CustomFunctionName?.toString();case Re.dynamicCast:return e.TargetType?`Cast To ${e.TargetType?.getName()}`:"Bad cast node";case Re.enumLiteral:return`Literal enum ${e.Enum?.getName()}`;case Re.event:return`Event ${(e.EventReference?.MemberName?.toString()??"").replace(/^Receive/,"")}`;case Re.executionSequence:return"Sequence";case Re.forEachElementInEnum:return`For Each ${e.Enum?.getName()}`;case Re.forEachLoopWithBreak:return"For Each Loop with Break";case Re.functionEntry:return"UserConstructionScript"===e.FunctionReference?.MemberName?.toString()?"Construction Script":e.FunctionReference?.MemberName?.toString();case Re.functionResult:return"Return Node";case Re.ifThenElse:return"Branch";case Re.makeStruct:if(e.StructType)return`Make ${e.StructType.getName()}`;case Re.materialExpressionComponentMask:{const t=e.getMaterialSubobject();if(t)return`Mask ( ${ae.rgba.filter((e=>!0===t[e].getter().value)).map((e=>e+" ")).join("")})`}case Re.materialExpressionConstant:t??=[e.getCustomproperties().find((e=>"Value"==e.PinName.toString()))?.DefaultValue];case Re.materialExpressionConstant2Vector:t??=[e.getCustomproperties().find((e=>"X"==e.PinName?.toString()))?.DefaultValue,e.getCustomproperties().find((e=>"Y"==e.PinName?.toString()))?.DefaultValue];case Re.materialExpressionConstant3Vector:case Re.materialExpressionConstant4Vector:if(!t){const i=e.getCustomproperties().find((e=>"Constant"==e.PinName?.toString()))?.DefaultValue;t=i instanceof Be?[i.X,i.Y,i.Z].map((e=>e.valueOf())):i instanceof Oe?[i.R,i.G,i.B,i.A].map((e=>e.valueOf())):[]}if(t?.length>0)return t.map((e=>oe.printExponential(e))).join(",");t=void 0;break;case Re.materialExpressionFunctionInput:{const t=e.getMaterialSubobject();return`Input ${t?.InputName??"In"} (${t?.InputType?.value.match(/^.+?_(\w+)$/)?.[1]??"Vector3"})`}case Re.materialExpressionLogarithm:return"Ln";case Re.materialExpressionLogarithm10:return"Log10";case Re.materialExpressionLogarithm2:return"Log2";case Re.materialExpressionMaterialFunctionCall:const i=e.getMaterialSubobject()?.MaterialFunction;if(i)return i.getName();break;case Re.materialExpressionSquareRoot:return"Sqrt";case Re.materialExpressionSubtract:const s=e.getMaterialSubobject();if(s)return`Subtract(${s.ConstA??"1"},${s.ConstB??"1"})`;case Re.metasoundEditorGraphExternalNode:{const t=e.ClassName?.Name;if(t)return"Add"===t?"+":t}case Re.niagaraNodeConvert:return`Make ${(e.AutowireMakeType?.ClassStructOrEnum??"").toString().match(/(?:Niagara)?(\w+)['"]*$/)?.[1]??""}`;case Re.pcgEditorGraphNodeInput:return"Input";case Re.pcgEditorGraphNodeOutput:return"Output";case Re.spawnActorFromClass:let r=e.getCustomproperties().find((e=>"ReturnValue"==e.PinName.toString()))?.PinType?.PinSubCategoryObject?.getName();return"Actor"===r&&(r=null),`SpawnActor ${oe.formatStringName(r??"NONE")}`;case Re.switchEnum:return`Switch on ${e.Enum?.getName()??"Enum"}`;case Re.switchInteger:return"Switch on Int";case Re.variableGet:return"";case Re.variableSet:return"SET"}const i=e.getClass();let s=e.switchTarget();if(s)return"E"!==s[0]&&(s=oe.formatStringName(s)),`Switch on ${s}`;if(e.isComment())return e.NodeComment.toString();const r=e.getHIDAttribute();if(r){const e=r.toString();let t=function(e){let t=Ve[e];if(t)return t;if(t=ze(e)?.toString(),t)return t;const i=e.match(/NumPad([a-zA-Z]+)/);return i&&(t=ze(i[1]).toString(),t)?"Num "+t:void 0}(e)??oe.formatStringName(e);return i===Re.inputDebugKey?t="Debug Key "+t:i===Re.getInputAxisKeyValue&&(t="Get "+t),t}if(i===Re.macro)return oe.formatStringName(e.MacroGraphReference?.getMacroName());const n=e.getMaterialSubobject();if(n){let e=_e(n);return e=e.match(/Material Expression (.+)/)?.[1]??e,e}if(e.isPcg()&&e.getPcgSubobject()){let t=e.getPcgSubobject();return t.NodeTitle?t.NodeTitle.toString():_e(t)}const a=e.getSubgraphObject();if(a)return a.Graph.getName();const o=e.getSettingsObject();if(o){if(o.ExportPath?.valueOf()?.type===Re.pcgHiGenGridSizeSettings)return`Grid Size: ${o.HiGenGridSize?.toString().match(/\d+/)?.[0]?.concat("00")??o.HiGenGridSize?.toString().match(/^\w+$/)?.[0]??"256"}`;if(o.BlueprintElementInstance)return oe.formatStringName(o.BlueprintElementType.getName());if(o.Operation){const e=o.Name?.toString().match(/PCGMetadata(\w+)Settings_\d+/);if(e)return oe.formatStringName(e[1]+": "+o.Operation)}const e=o.getSubgraphObject();if(e&&e.Graph)return e.Graph.getName()}let l,c=e.FunctionReference?.MemberName?.toString();if(c){const t=e.FunctionReference.MemberParent?.path??"";switch(c){case"AddKey":let e=t.match(Ge);if(e)return`Add Key (${oe.formatStringName(e[1])})`;case"Concat_StrStr":return"Append"}const i=c.match(ae.lineTracePattern);if(i)return"Line Trace"+("Multi"===i[1]?" Multi ":" ")+(""===i[2]?"By Channel":oe.formatStringName(i[2]));switch(t){case Re.blueprintGameplayTagLibrary:case Re.kismetMathLibrary:case Re.slateBlueprintLibrary:case Re.timeManagementBlueprintLibrary:const e=c.match(/[BF]([A-Z]\w+)/);switch(e&&(c=e[1]),c){case"Abs":return"ABS";case"BooleanAND":return"AND";case"BooleanNAND":return"NAND";case"BooleanOR":return"OR";case"Exp":return"e";case"LineTraceSingle":return"Line Trace By Channel";case"Max":case"MaxInt64":return"MAX";case"Min":case"MinInt64":return"MIN";case"Not_PreBool":return"NOT";case"Sin":return"SIN";case"Sqrt":return"SQRT";case"Square":return"^2";case"CrossProduct2D":return"cross";case"Vector4_CrossProduct3":return"cross3";case"DotProduct2D":case"Vector4_DotProduct":return"dot";case"Vector4_DotProduct3":return"dot3"}if(c.startsWith("Add_"))return"+";if(c.startsWith("And_"))return"&";if(c.startsWith("Conv_"))return"";if(c.startsWith("Cross_"))return"cross";if(c.startsWith("Divide_"))return String.fromCharCode(247);if(c.startsWith("Dot_"))return"dot";if(c.startsWith("EqualEqual_"))return"==";if(c.startsWith("Greater_"))return">";if(c.startsWith("GreaterEqual_"))return">=";if(c.startsWith("Less_"))return"<";if(c.startsWith("LessEqual_"))return"<=";if(c.startsWith("Multiply_"))return String.fromCharCode(10799);if(c.startsWith("Not_"))return"~";if(c.startsWith("NotEqual_"))return"!=";if(c.startsWith("Or_"))return"|";if(c.startsWith("Percent_"))return"%";if(c.startsWith("Subtract_"))return"-";if(c.startsWith("Xor_"))return"^";break;case Re.blueprintSetLibrary:{const e=c.match(/Set_(\w+)/);if(e)return oe.formatStringName(e[1]).toUpperCase()}break;case Re.blueprintMapLibrary:{const e=c.match(/Map_(\w+)/);if(e)return oe.formatStringName(e[1]).toUpperCase()}break;case Re.kismetArrayLibrary:{const e=c.match(/Array_(\w+)/);if(e)return e[1].toUpperCase()}}return oe.formatStringName(c)}return e.OpName?He[e.OpName.toString()]??oe.formatStringName(e.OpName.toString().replaceAll(/(?:^\w+(?this.unknownEntityGrammar))){return this.inlined?e:Pe.seq(Pe.reg(/\(\s*/),e.sepBy(Te.commaSeparation).opt(),Pe.reg(/\s*(,\s*)?\)/,1)).map((([e,t,i])=>{t=t instanceof Array?t:[];let s=this;return void 0!==i!==s.trailing&&(s=s.flagTrailing(void 0!==i)),new s(t)})).label(`ArrayEntity of ${this.type?.className()??"unknown values"}`)}static flagInlined(e=!0){const t=this.asUniqueClass();return t.inlined=e,t.grammar=t.createGrammar(),t}static of(e){const t=this.asUniqueClass();return t.type=e,t.grammar=t.createGrammar(),t}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,r=i.keySeparator,n=i.attributeSeparator,a=i.wrap){if(i.inlined)return super.serialize.bind(this.values,e,t,i,s,r,n,a)();let o=this.values.map((t=>t?.serialize(e))).join(i.attributeSeparator);return this.trailing&&(o+=i.attributeSeparator),`(${o})`}valueOf(){return this.values}equals(e){if(!(e instanceof Fe)||this.values.length!==e.values.length)return!1;for(let t=0;tje=e.default)).catch():je=window.crypto;class Ue extends ke{static grammar=this.createGrammar();static generateGuid(){let e=new Uint32Array(4);je.getRandomValues(e);let t="";return e.forEach((e=>{t+=("0".repeat(8)+e.toString(16).toUpperCase()).slice(-8)})),t}constructor(e=Ue.generateGuid()){super(),this.value=e}static createGrammar(){return Pe.reg(/[0-9A-F]{32}/i).map((e=>new this(e))).label("GuidEntity")}serialize(e=!1,t="",i=this.constructor){let s=this.value;return i.serialized&&(s=`"${s}"`),s}toString(){return this.value}}class Ye extends $e{static grammar=this.createGrammar();get value(){return super.value}set value(e){(e=Math.trunc(e))>=1<<31&&e<-(1<<31)&&(e=Math.floor(e),super.value=e)}static createGrammar(){return Pe.numberInteger.map((e=>new this(e)))}}class qe extends Ye{static grammar=this.createGrammar();get value(){return super.value}set value(e){e=Math.round(oe.clamp(e,0)),super.value=e}static createGrammar(){return Pe.numberNatural.map((e=>new this(e)))}}const Ke={Any:n``,"Any[]":n``,audio:n``,blue:n``,bool:n``,byte:n``,class:n``,default:n``,delegate:n``,enum:n``,exec:n``,float:n``,green:n``,int:n``,int32:n``,int64:n``,interface:n``,name:n``,object:n``,Param:n``,"Param[]":n``,Point:n``,"Point[]":n``,real:n``,red:n``,string:n``,struct:n``,Surface:n``,"Surface[]":n``,text:n``,time:n``,Volume:n``,"Volume[]":n``,wildcard:n``,[ae.paths.linearColor]:n``,[ae.paths.niagaraBool]:n``,[ae.paths.niagaraDataInterfaceCollisionQuery]:n``,[ae.paths.niagaraDataInterfaceCurlNoise]:n``,[ae.paths.niagaraDataInterfaceVolumeTexture]:n``,[ae.paths.niagaraFloat]:n``,[ae.paths.niagaraInt32]:n``,[ae.paths.niagaraPosition]:n``,[ae.paths.quat4f]:n``,[ae.paths.rotator]:n``,[ae.paths.transform]:n``,[ae.paths.vector]:n``,[ae.paths.vector2f]:n``,[ae.paths.vector3f]:n``,[ae.paths.vector4f]:n``},Xe=n``;function We(e){let t,i=e.PinFriendlyName?e.PinFriendlyName.toString():oe.formatStringName(e.PinName?.toString()??"");return(t=e.PinToolTip?.toString().match(/\s*(.+?(?=\n)|.+\S)\s*/))&&t[1].toLowerCase()===i.toLowerCase()?t[1]:(i=i.replace(/^Module\./,""),i)}class Ze extends Ye{static grammar=this.createGrammar();get value(){return super.value}set value(e){(e=Math.trunc(e))>=0&&e<256&&(super.value=e)}createGrammar(){return Pe.numberByte.map((e=>new this(e)))}}class Qe extends ke{static grammar=this.createGrammar();static escapedCharacters=/['"\\]/g;static unescapedBackslash=/(?<=(?:[^\\]|^)(?:\\\\)*)\\(?!\\)/;constructor(e=""){super(),this.value=e}static createGrammar(){return Pe.doubleQuotedString.map((e=>new this(Qe.unescape(e)))).label("StringEntity")}static escape(e,t=!0){let i=e.replaceAll(new RegExp(`(${Qe.escapedCharacters.source})`,"g"),"\\$1");return t&&(i=i.replaceAll("\n","\\n").replaceAll("\t","\\t")),i}static unescape(e){return e.replaceAll(new RegExp(Qe.unescapedBackslash.source+"t","g"),"\t").replaceAll(new RegExp(Qe.unescapedBackslash.source+"n","g"),"\n").replaceAll(new RegExp(`\\\\(${Qe.escapedCharacters.source})`,"g"),"$1")}doSerialize(e=!1){let t=`"${Qe.escape(this.value)}"`;return e&&(t=Qe.escape(t,!1)),t}valueOf(){return this.value}toString(){return this.value}}class Je extends ke{static grammar=this.createGrammar();static f;static createGrammar(){return Qe.grammar}static from(e){const t=this.asUniqueClass();return t.f=e,t}static compute(e){return this.f(e)}}class et extends ke{static attributeConverter={fromAttribute:(e,t)=>new this(e),toAttribute:(e,t)=>e.toString()};static grammar=this.createGrammar();static createGrammar(){return Te.symbol.map((e=>new this(e))).label("SymbolEntity")}constructor(e=""){super(),this.value=e}serialize(e=!1,t="",i=this.constructor){let s=this.value;return i.serialized&&(s=`"${s}"`),s}toString(){return this.value}}class tt extends et{static grammar=this.createGrammar();static createGrammar(){return Te.symbol.map((e=>new this(e)))}}class it extends tt{static grammar=this.createGrammar();static createGrammar(){return Pe.reg(Te.Regex.InsideString).map((e=>new this(e)))}}class st extends ke{static lookbehind="INVTEXT";static grammar=this.createGrammar();constructor(e=""){super(),this.value=e}static createGrammar(){return Pe.alt(Pe.seq(Pe.reg(new RegExp(`${this.lookbehind}\\s*\\(`)),Pe.doubleQuotedString,Pe.reg(/\s*\)/)).map((([e,t,i])=>t)),Pe.reg(new RegExp(this.lookbehind)).map((()=>""))).map((e=>new this(e))).label("InvariantTextEntity")}doSerialize(){return this.lookbehind+'("'+this.value+'")'}valueOf(){return this.value}toString(){return this.value}}class rt extends ke{static attributeSeparator=", ";static printKey=e=>"";static lookbehind="NSLOCTEXT";static attributes={...super.attributes,namespace:Qe.withDefault(),key:Qe.withDefault(),value:Qe.withDefault()};static grammar=this.createGrammar();constructor(e={}){super(e),this.namespace,this.key,this.value}static createGrammar(){return Pe.regArray(new RegExp(String.raw`${rt.lookbehind}\s*\(`+String.raw`\s*"(?${Te.Regex.InsideString.source})"\s*,`+String.raw`\s*"(?${Te.Regex.InsideString.source})"\s*,`+String.raw`\s*"(?${Te.Regex.InsideString.source})"\s*`+String.raw`(?,\s+)?`+String.raw`\)`,"m")).map((({groups:{namespace:e,key:t,value:i,trailing:s}})=>new this({namespace:new this.attributes.namespace(oe.unescapeString(e)),key:new this.attributes.namespace(oe.unescapeString(t)),value:new this.attributes.namespace(oe.unescapeString(i)),trailing:void 0!==s}))).label("LocalizedTextEntity")}toString(){return oe.capitalFirstLetter(this.value.valueOf())}}class nt extends ke{static attributeSeparator=", ";static lookbehind=["LOCGEN_FORMAT_NAMED","LOCGEN_FORMAT_ORDERED"];static grammar=this.createGrammar();constructor(e){super(),this.values=e}static createGrammar(){return Pe.lazy((()=>Pe.seq(Pe.reg(new RegExp(String.raw`(${this.lookbehind.join("|")})\s*\(\s*`),1),Pe.alt(...[Qe,rt,st,nt].map((e=>e.grammar))).sepBy(Pe.reg(/\s*\,\s*/)),Pe.reg(/\s*\)/)).map((([e,t])=>{const i=new this(t);return i.lookbehind=e,i})))).label("FormatTextEntity")}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,r=i.keySeparator,n=i.attributeSeparator,a=i.wrap){const o=i.attributeSeparator;return this.lookbehind+"("+this.values.map((t=>t.serialize(e))).join(o)+(i.trailing?o:"")+")"}toString(){const e=this.values?.[0]?.toString();if(!e)return"";const t=this.values.slice(1).map((e=>e?.valueOf()));return"LOCGEN_FORMAT_NAMED"==this.lookbehind?e.replaceAll(/\{([a-zA-Z]\w*)\}/g,((e,i)=>{const s=t.indexOf(i)+1;return s>0&&s{const s=Number(i);return s=-(1n<<63n)&&e<1n<<63n&&(this._value=e)}constructor(e=0n){super(),this.value=BigInt(e)}static createGrammar(){return Pe.numberBigInteger.map((e=>new this(e)))}serialize(e=!1,t="",i=this.constructor){let s=this.value.toString();return i.serialized&&(s=`"${s}"`),s}valueOf(){return this.value}toString(){return this.value.toString()}}class ot extends ke{static typeReference=Pe.reg(new RegExp(Te.Regex.Path.source+"|"+Te.symbol.getParser().regexp.source));static fullReferenceGrammar=this.createFullReferenceGrammar();static grammar=this.createGrammar();#c;get type(){return this.#c}set type(e){this.#c=e}#B;get path(){return this.#B}set path(e){this.#R="",this.#B=e}#G;get full(){return this.#G}set full(e){this.#G=e}#R="";constructor(e="None",t="",i=(e.includes("/")||t?(e,t)=>`"${e+(t?`'${t}'`:"")}"`:(e,t)=>e)){super(),this.#c=e,this.#B=t,this.#G=i}static createGrammar(){return Pe.alt(this.createFullReferenceSerializedGrammar(),this.createFullReferenceGrammar(),this.createTypeReferenceGrammar()).label("ObjectReferenceEntity")}static createFullReferenceGrammar(){return Pe.regArray(new RegExp("("+this.typeReference.getParser().regexp.source+")(?:"+`'"(${Te.Regex.InsideString.source})"'|`+`'(${Te.Regex.InsideSingleQuotedString.source})')`)).map((([e,t,i,s])=>{let r=!!i,n=r?["'\"","\"'"]:["'","'"];return new this(t,r?i:s,((e,t)=>e+n[0]+t+n[1]))}))}static createFullReferenceSerializedGrammar(){return Pe.regArray(new RegExp('"('+Te.Regex.InsideString.source+"?)(?:'("+Te.Regex.InsideSingleQuotedString.source+"?)')?\"")).map((([e,t,i])=>new this(t,i,((e,t)=>`"${e}${t?`'${t}'`:""}"`))))}static createTypeReferenceGrammar(){return this.typeReference.map((e=>new this(e,"",((e,t)=>e))))}static createNoneInstance(){return new this("None")}getName(e=!1){return this.#R?this.#R:e?oe.getNameFromPath(this.path.replace(/_C$/,""),e):this.#R=oe.getNameFromPath(this.path.replace(/_C$/,""),e)}doSerialize(e=!1){let t=this.full(this.type,this.path);return e&&(t=oe.escapeString(t,!1)),t}equals(e){return e instanceof ot&&(this.type==e.type&&this.path==e.path)}toString(){return this.full(this.type,this.path)}}class lt extends ke{static grammar=this.createGrammar();constructor(e=null,t=null){super(),this.objectName=e,this.pinGuid=t}static createGrammar(){return Pe.seq(et.grammar,Pe.whitespace,Ue.grammar).map((([e,t,i])=>new this(e,i))).label("PinReferenceEntity")}doSerialize(){return this.objectName.serialize()+" "+this.pinGuid.serialize()}}class ct extends ke{static attributes={...super.attributes,MemberParent:ot,MemberName:Qe,MemberGuid:Ue};static grammar=this.createGrammar();constructor(e){super(e),this.MemberParent,this.MemberName,this.MemberGuid}static createGrammar(){return Te.createEntityGrammar(this,Te.commaSeparation,0,0)}}class ut extends ke{static attributes={...super.attributes,PinCategory:Qe.withDefault(),PinSubCategory:Qe,PinSubCategoryObject:ot,PinSubCategoryMemberReference:ct,ContainerType:et,bIsReference:Ae,bIsConst:Ae,bIsWeakPointer:Ae,bIsUObjectWrapper:Ae,bSerializeAsSinglePrecisionFloat:Ae};static grammar=this.createGrammar();constructor(e={}){super(e),this.PinCategory,this.PinSubCategory,this.PinSubCategoryObject,this.PinSubCategoryMemberReference,this.ContainerType,this.bIsReference,this.bIsConst,this.bIsWeakPointer,this.bIsUObjectWrapper,this.bIsUObjectWrapper,this.bSerializeAsSinglePrecisionFloat}static createGrammar(){return Te.createEntityGrammar(this).label("PinTypeEntity")}copyTypeFrom(e){for(const t of this.keys)void 0!==e[t]&&(this[t]=e[t])}}class ht extends ke{static attributes={...super.attributes,X:$e.withDefault(),Y:$e.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.X,this.Y}static createGrammar(){return Te.createEntityGrammar(this,Te.commaSeparation,1).label("Vector2DEntity")}toArray(){return[this.X.valueOf(),this.Y.valueOf()]}}class pt extends ht{static grammar=this.createGrammar();static createGrammar(){return Pe.alt(Pe.regArray(new RegExp(/X\s*=\s*/.source+"(?"+Te.numberRegexSource+")\\s+"+/Y\s*=\s*/.source+"(?"+Te.numberRegexSource+")")).map((({groups:{x:e,y:t}})=>new this({X:new ht.attributes.X(e),Y:new ht.attributes.Y(t)}))),ht.grammar.map((e=>new this({X:e.X,Y:e.Y})))).label("RBSerializationVector2DEntity")}}class dt extends ke{static attributes={...super.attributes,R:$e.withDefault(),P:$e.withDefault(),Y:$e.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.R,this.P,this.Y}static createGrammar(){return Te.createEntityGrammar(this,Te.commaSeparation,1).label("RotatorEntity")}getRoll(){return this.R}getPitch(){return this.P}getYaw(){return this.Y}}class mt extends dt{static attributeSeparator=", ";static grammar=this.createGrammar();static createGrammar(){return Pe.alt(Pe.regArray(new RegExp(`(${$e.numberRegexSource})`+String.raw`\s*,\s*`+`(${$e.numberRegexSource})`+String.raw`\s*,\s*`+`(${$e.numberRegexSource})`)).map((([e,t,i,s,r,n,a])=>new this({R:new dt.attributes.R(n,a?.length),P:new dt.attributes.P(t,i?.length),Y:new dt.attributes.Y(s,r?.length)}))),dt.grammar.map((e=>new this({R:e.R,P:e.P,Y:e.Y})))).label("SimpleSerializationRotatorEntity")}doSerialize(){const e=this.constructor.attributeSeparator;return this.P.serialize()+e+this.Y.serialize()+e+this.R.serialize()+(this.trailing?e:"")}}class gt extends ht{static attributeSeparator=", ";static grammar=this.createGrammar();static createGrammar(){return Pe.alt(Pe.regArray(new RegExp(`(${$e.numberRegexSource})`+String.raw`\s*,\s*`+`(${$e.numberRegexSource})`)).map((([e,t,i,s,r])=>new this({X:new ht.attributes.X(t,i?.length),Y:new ht.attributes.Y(s,r?.length)}))),ht.grammar.map((e=>new this({X:e.X,Y:e.Y})))).label("SimpleSerializationVector2DEntity")}doSerialize(){const e=this.constructor.attributeSeparator;return this.X.serialize()+e+this.Y.serialize()+(this.trailing?e:"")}}class bt extends ke{static attributes={...super.attributes,X:$e.withDefault(),Y:$e.withDefault(),Z:$e.withDefault(),W:$e.withDefault()};static grammar=this.createGrammar();constructor(e){super(e),this.X,this.Y,this.Z,this.W}static createGrammar(){return Te.createEntityGrammar(this,Te.commaSeparation,1).label("Vector4DEntity")}toArray(){return[this.X.valueOf(),this.Y.valueOf(),this.Z.valueOf(),this.W.valueOf()]}}class vt extends bt{static grammar=this.createGrammar();static createGrammar(){return Pe.alt(Pe.regArray(new RegExp(`(${Te.numberRegexSource})`+String.raw`\s*,\s*`+`(${Te.numberRegexSource})`+String.raw`\s*,\s*`+`(${Te.numberRegexSource})`+String.raw`\s*,\s*`+`(${Te.numberRegexSource})`)).map((([e,t,i,s,r])=>new this({X:new bt.attributes.X(t),Y:new bt.attributes.Y(i),Z:new bt.attributes.Z(s),W:new bt.attributes.W(r)}))),bt.grammar)}}class ft extends Be{static allowShortSerialization=!1;static attributeSeparator=", ";static grammar=this.createGrammar();static createGrammar(){return Pe.alt(Pe.regArray(new RegExp(`(${$e.numberRegexSource})`+(this.allowShortSerialization?"(?:":"")+String.raw`\s*,\s*`+`(${$e.numberRegexSource})`+String.raw`\s*,\s*`+`(${$e.numberRegexSource})`+(this.allowShortSerialization?")?":""))).map((([e,t,i,s,r,n,a])=>new this({X:new Be.attributes.X(t,i?.length),Y:new Be.attributes.Y(s,r?.length),Z:new Be.attributes.Z(n,a?.length)}))),Be.grammar.map((e=>new this({X:e.X,Y:e.Y,Z:e.Z}))))}static flagAllowShortSerialization(e=!0){const t=this.asUniqueClass();return e!==t.allowShortSerialization&&(t.allowShortSerialization=e,t.grammar=t.createGrammar()),t}doSerialize(){const e=this.constructor.attributeSeparator;return this.X.serialize()+e+this.Y.serialize()+e+this.Z.serialize()+(this.trailing?e:"")}}class yt extends ke{static lookbehind="Pin";static#V={bool:Ae,byte:Ze,enum:tt,exec:Qe,float:$e,int:Ye,int64:at,name:Qe,real:$e,string:Qe,[ae.paths.linearColor]:Oe,[ae.paths.niagaraBool]:Ae,[ae.paths.niagaraFloat]:$e,[ae.paths.niagaraPosition]:Be,[ae.paths.rotator]:dt,[ae.paths.vector]:Be,[ae.paths.vector2D]:ht,[ae.paths.vector4f]:bt};static#H={enum:it,rg:pt,[ae.paths.niagaraPosition]:ft.flagAllowShortSerialization(),[ae.paths.rotator]:mt,[ae.paths.vector]:ft,[ae.paths.vector2D]:gt,[ae.paths.vector3f]:ft,[ae.paths.vector4f]:vt};static attributes={PinId:Ue.withDefault(),PinName:Qe.withDefault(),PinFriendlyName:Me.accepting(rt,nt,st,Qe),PinToolTip:Qe,Direction:Qe,PinType:ut.withDefault().flagInlined(),LinkedTo:Fe.of(lt).withDefault().flagSilent(),SubPins:Fe.of(lt),ParentPin:lt,DefaultValue:Je.from((e=>e.getEntityType(!0)?.flagSerialized()??Qe)),AutogeneratedDefaultValue:Qe,DefaultObject:ot,PersistentGuid:Ue,bHidden:Ae,bNotConnectable:Ae,bDefaultValueIsReadOnly:Ae,bDefaultValueIsIgnored:Ae,bAdvancedView:Ae,bOrphanedPin:Ae};static grammar=this.createGrammar();#z=!1;set recomputesNodeTitleOnChange(e){this.#z=e}get recomputesNodeTitleOnChange(){return this.#z}#_=null;get objectEntity(){try{return this.#_}catch(e){return null}}set objectEntity(e){this.#_=e}#F;get pinIndex(){return this.#F}set pinIndex(e){this.#F=e}constructor(e={}){super(e),this.PinId,this.PinName,this.PinFriendlyName,this.PinToolTip,this.Direction,this.PinType,this.LinkedTo,this.DefaultValue,this.AutogeneratedDefaultValue,this.DefaultObject,this.PersistentGuid,this.bHidden,this.bNotConnectable,this.bDefaultValueIsReadOnly,this.bDefaultValueIsIgnored,this.bAdvancedView,this.bOrphanedPin,this.objectEntity}static createGrammar(){return Te.createEntityGrammar(this)}static fromLegacyObject(e){return new yt(e)}getType(){const e=this.PinType.PinCategory?.toString().toLocaleLowerCase();if(["struct","class","object","type","statictype"].includes(e))return this.PinType.PinSubCategoryObject?.path;if(this.isEnum())return"enum";if(this.objectEntity?.isPcg()){const e=this.objectEntity.getPcgSubobject(),t=this.isInput()?e.InputPins?.valueOf()[this.pinIndex]:e.OutputPins?.valueOf()[this.pinIndex];if(t){const i=e[ae.subObjectAttributeNameFromReference(t,!0)];let s=i.Properties?.AllowedTypes?.toString()??"";if(""==s&&(s=this.PinType.PinCategory??"",""==s&&(s="Any")),s)return!1!==i.Properties.bAllowMultipleData?.valueOf()&&!1!==i.Properties.bAllowMultipleConnections?.valueOf()&&(s+="[]"),s}}if("optional"===e){const e=this.PinType.PinSubCategory?.toString();switch(e){case"red":return"real";case"rg":return"rg";case"rgb":return ae.paths.vector;case"rgba":return ae.paths.linearColor;default:return e}}return e}getEntityType(e=!1){const t=this.getType(),i=yt.#V[t],s=yt.#H[t];return e&&void 0!==s?s:i}pinTitle(){return We(this)}copyTypeFrom(e){this.PinType=e.PinType}getDefaultValue(e=!1){return void 0===this.DefaultValue&&e&&(this.DefaultValue=new(this.getEntityType(!0))),this.DefaultValue}isEnum(){const e=this.PinType.PinSubCategoryObject?.type;return e===ae.paths.enum||e===ae.paths.userDefinedEnum||"enum"===e?.toLowerCase()}isExecution(){return"exec"===this.PinType.PinCategory.toString()||this.getType()===ae.paths.niagaraParameterMap}isHidden(){return this.bHidden?.valueOf()}isInput(){return!this.isHidden()&&"EGPD_Output"!=this.Direction?.toString()}isOutput(){return!this.isHidden()&&"EGPD_Output"==this.Direction?.toString()}isLinked(){return this.LinkedTo?.length>0??!1}linkTo(e,t){const i=this.LinkedTo.values?.some((i=>i.objectName.toString()==e&&i.pinGuid.toString()==t.PinId.toString()));return!i&&(this.LinkedTo.values.push(new lt(new et(e),t.PinId)),!0)}unlinkFrom(e,t){const i=this.LinkedTo.values?.findIndex((i=>i.objectName.toString()==e&&i.pinGuid.toString()==t.PinId.toString()));return i>=0&&(this.LinkedTo.values.splice(i,1),0===this.LinkedTo.length&&void 0===yt.attributes.LinkedTo.default&&(this.LinkedTo.values=[]),!0)}getSubCategory(){return this.PinType.PinSubCategoryObject?.path}pinColor(){return function(e){if("mask"===e.PinType.PinCategory?.toString()){const t=Ke[e.PinType.PinSubCategory?.toString()];if(t)return t}else if("optional"===e.PinType.PinCategory?.toString())return Xe;const t=e.getType();return Ke[t]??Ke[e.PinType.PinCategory?.toString().toLowerCase()]??(t.startsWith("/Script/Niagara.")?Ke.struct:Ke.default)}(this)}}const wt=e=>e.PinName?.toString().match(/^\s*([A-Z])\s*$/)?.[1]?.charCodeAt(0)-"A".charCodeAt(0);class St extends ke{static attributes={...super.attributes,MacroGraph:ot,GraphBlueprint:ot,GraphGuid:Ue};static grammar=this.createGrammar();constructor(e){super(e),this.MacroGraph,this.GraphBlueprint,this.GraphGuid}static createGrammar(){return Te.createEntityGrammar(this)}getMacroName(){const e=this.MacroGraph.path.search(":");return this.MacroGraph.path.substring(e+1)}}class Et extends ke{static grammar=this.createGrammar();static createGrammar(){return Pe.reg(new RegExp(String.raw`\(${Pe.whitespaceInlineOpt.getParser().regexp.source}\)`)).map((e=>new this)).label("NullEntity")}serialize(e=!1,t="",i=this.constructor){let s="()";return i.serialized&&(s=`"${s}"`),s}}class Ct extends ke{static attributes={...super.attributes,ScriptVariable:ot,OriginalChangeId:Ue};static grammar=this.createGrammar();constructor(e={}){super(e),this.ScriptVariable,this.OriginalChangeId}static createGrammar(){return Te.createEntityGrammar(this).label("ScriptVariableEntity")}}class Nt extends yt{static attributes={...super.attributes,PinId:Ue};static grammar=this.createGrammar();static createGrammar(){return Pe.seq(Pe.reg(new RegExp(`(${Te.Regex.Symbol.source}\\s*)?\\(\\s*`),1),Te.createAttributeGrammar(this).sepBy(Te.commaSeparation),Pe.reg(/\s*(?:,\s*)?\)/)).map((([e,t,i])=>{e??="";let s={};return e.length&&(s.lookbehind=e),t.forEach((e=>e(s))),new this(s)})).label("UnknownPinEntity")}}class xt extends ke{static attributes={...super.attributes,MemberScope:Qe,MemberName:Qe.withDefault(),MemberGuid:Ue,bSelfContext:Ae};static grammar=this.createGrammar();constructor(e){super(e),this.MemberScope,this.MemberName,this.MemberGuid,this.bSelfContext}static createGrammar(){return Te.createEntityGrammar(this).label("VariableReferenceEntity")}}class Pt extends ke{#j=!1;get exported(){return this.#j}set exported(e){this.#j=e}static#U=/^(\w+?)(?:_(\d+))?$/;static printKey=e=>e.startsWith(ae.subObjectAttributeNamePrefix)?"":e;static attributeSeparator="\n";static wrap=this.notWrapped;static trailing=!0;static attributes={...super.attributes,Class:ot,Name:Qe,Archetype:ot,ExportPath:De.of(ot),ObjectRef:ot,BlueprintElementType:ot,BlueprintElementInstance:ot,ConstA:De.of($e),ConstB:De.of($e),PinTags:Fe.of(Et).flagInlined(),PinNames:Fe.of(Qe).flagInlined(),AxisKey:et,InputAxisKey:et,InputName:Qe,InputType:et,NumAdditionalInputs:qe,bIsPureFunc:Ae,bIsConstFunc:Ae,bIsCaseSensitive:Ae,VariableReference:xt,SelfContextInfo:et,DelegatePropertyName:Qe,DelegateOwnerClass:ot,ComponentPropertyName:Qe,EventReference:ct,FunctionReference:ct,FunctionScript:ot,CustomFunctionName:Qe,TargetType:ot,MacroGraphReference:St,Enum:ot,EnumEntries:Fe.of(Qe).flagInlined(),InputKey:et,OpName:Qe,CachedChangeId:Ue,FunctionDisplayName:Qe,AddedPins:Fe.of(Nt).withDefault().flagInlined().flagSilent(),ChangeId:Ue,MaterialFunction:ot,bOverrideFunction:Ae,bInternalEvent:Ae,bConsumeInput:Ae,bExecuteWhenPaused:Ae,bOverrideParentBinding:Ae,bControl:Ae,bAlt:Ae,bShift:Ae,bCommand:Ae,CommentColor:Oe,bCommentBubbleVisible_InDetailsPanel:Ae,bColorCommentBubble:Ae,ProxyFactoryFunctionName:Qe,ProxyFactoryClass:ot,ProxyClass:ot,StructType:ot,MaterialExpression:ot,MaterialExpressionComment:ot,MoveMode:et,TimelineName:Qe,TimelineGuid:Ue,SizeX:De.of(Ye),SizeY:De.of(Ye),Text:De.of(Qe),ParameterName:Qe,ExpressionGUID:Ue,MaterialExpressionEditorX:De.of(Ye),MaterialExpressionEditorY:De.of(Ye),MaterialExpressionGuid:Ue,NodeTitle:Qe,NodeTitleColor:Oe,PositionX:De.of(Ye),PositionY:De.of(Ye),SettingsInterface:ot,PCGNode:ot,HiGenGridSize:et,Operation:et,NodePosX:Ye,NodePosY:Ye,NodeHeight:Ye,NodeWidth:Ye,Graph:ot,SubgraphInstance:Qe,InputPins:Fe.of(ot).flagInlined(),OutputPins:Fe.of(ot).flagInlined(),bExposeToLibrary:Ae,bCanRenameNode:Ae,bCommentBubblePinned:Ae,bCommentBubbleVisible:Ae,NodeComment:Qe,AdvancedPinDisplay:et,DelegateReference:xt,EnabledState:et,NodeGuid:Ue,ErrorType:Ye,ErrorMsg:Qe,ScriptVariables:Fe.flagInlined().of(Ct),Node:De.of(ot),ExportedNodes:Qe,CustomProperties:Fe.of(Me.accepting(yt,Nt)).withDefault().flagSilent()};static customPropertyGrammar=Pe.seq(Pe.reg(/CustomProperties\s+/),this.attributes.CustomProperties.type.grammar).map((([e,t])=>e=>{(e.CustomProperties??=new this.attributes.CustomProperties).values.push(t)}));static inlinedArrayEntryGrammar=Pe.seq(Pe.alt(Te.symbolQuoted.map((e=>[e,!0])),Te.symbol.map((e=>[e,!1]))),Pe.reg(new RegExp(String.raw`\s*\(\s*(\d+)\s*\)\s*\=\s*`),1).map(Number)).chain((([[e,t],i])=>(this.attributes[e]?.grammar??ke.unknownEntityGrammar).map((s=>r=>{if(void 0===r[e]){let i=Fe;t!=i.quoted&&(i=i.flagQuoted(t)),i.inlined||(i=i.flagInlined()),r[e]=new i}r[e].values[i]=s}))));static grammar=this.createGrammar();static grammarMultipleObjects=Pe.seq(Pe.whitespaceOpt,this.grammar,Pe.seq(Pe.whitespace,this.grammar).map((([e,t])=>t)).many(),Pe.whitespaceOpt).map((([e,t,i,s])=>[t,...i]));constructor(e={}){if("NodePosX"in e!="NodePosY"in e){const t=Object.entries(e),[i,s]="NodePosX"in e?["NodePosY",Object.keys(e).indexOf("NodePosX")+1]:["NodePosX",Object.keys(e).indexOf("NodePosY")];t.splice(s,0,[i,new Ye(0)]),e=Object.fromEntries(t)}super(e),this.CustomProperties,this.AddedPins,this.AdvancedPinDisplay,this.Archetype,this.AxisKey,this.bIsPureFunc,this.BlueprintElementInstance,this.BlueprintElementType,this.Class,this.CommentColor,this.ComponentPropertyName,this.ConstA,this.ConstB,this.CustomFunctionName,this.DelegatePropertyName,this.DelegateReference,this.EnabledState,this.Enum,this.EnumEntries,this.EventReference,this.ExportedNodes,this.ExportPath,this.FunctionDisplayName,this.FunctionReference,this.FunctionScript,this.Graph,this.HiGenGridSize,this.InputAxisKey,this.InputKey,this.InputName,this.InputPins,this.InputType,this.MacroGraphReference,this.MaterialExpression,this.MaterialExpressionComment,this.MaterialExpressionEditorX,this.MaterialExpressionEditorY,this.MaterialFunction,this.Name,this.Node,this.NodeComment,this.NodeHeight,this.NodePosX,this.NodePosY,this.NodeTitle,this.NodeTitleColor,this.NodeWidth,this.NumAdditionalInputs,this.ObjectRef,this.Operation,this.OpName,this.OutputPins,this.ParameterName,this.PCGNode,this.PinNames,this.PinTags,this.PositionX,this.PositionY,this.ProxyFactoryFunctionName,this.ScriptVariables,this.SettingsInterface,this.SizeX,this.SizeY,this.StructType,this.SubgraphInstance,this.TargetType,this.Text,this.Text,this.VariableReference,this.Pins instanceof Fe&&this.Pins.valueOf().forEach((e=>{const t=this[ae.subObjectAttributeNameFromReference(e,!0)];if(t){const e=yt.fromLegacyObject(t);e.LinkedTo=new yt.attributes.LinkedTo,this.getCustomproperties(!0).push(e),this.CustomProperties.ignored=!0}}));const t=this.getMaterialSubobject();if(t){const e=t;if(void 0!==e.SizeX&&(e.SizeX.getter=()=>this.NodeWidth),e.SizeY&&(e.SizeY.getter=()=>this.NodeHeight),e.Text&&(e.Text.getter=()=>this.NodeComment),e.MaterialExpressionEditorX&&(e.MaterialExpressionEditorX.getter=()=>this.NodePosX),e.MaterialExpressionEditorY&&(e.MaterialExpressionEditorY.getter=()=>this.NodePosY),this.getType()===ae.paths.materialExpressionComponentMask){const t=ae.rgba.map((e=>{const t=this.getPinEntities().find((t=>t.PinName.toString()===e));return t.recomputesNodeTitleOnChange=!0,t}));e.keys=[...ae.rgba,...e.keys];const i=De.of(Ae).withDefault().flagSilent();e.R=new i((()=>t[0].DefaultValue)),e.G=new i((()=>t[1].DefaultValue)),e.B=new i((()=>t[2].DefaultValue)),e.A=new i((()=>t[3].DefaultValue))}else if(this.getType()===ae.paths.materialExpressionSubtract){const t=De.of($e.withPrecision(6)).withDefault((()=>new De((()=>new $e(1))))).flagSilent(),i=this.getCustomproperties().find((e=>"A"===e.PinName?.toString())),s=this.getCustomproperties().find((e=>"B"===e.PinName?.toString()));(i||s)&&(e.keys=["ConstA","ConstB",...e.keys],i&&(i.recomputesNodeTitleOnChange=!0,e.ConstA=new t((()=>i.DefaultValue))),s&&(s.recomputesNodeTitleOnChange=!0,e.ConstB=new t((()=>s.DefaultValue))))}}const i=this.getPcgSubobject();i&&(i.PositionX&&(i.PositionX.getter=()=>this.NodePosX),i.PositionY&&(i.PositionY.getter=()=>this.NodePosY),i.getSubobjects().forEach((e=>{if(void 0!==e.Node){const t=e.Node.getter();t.type===this.PCGNode.type&&t.path===`${this.Name}.${this.PCGNode.path}`&&(e.Node.getter=()=>new ot(this.PCGNode.type,`${this.Name}.${this.PCGNode.path}`,t.full))}})));let s=0,r=0;this.getCustomproperties().forEach(((e,t)=>{e.objectEntity=this,e.pinIndex=e.isInput()?s++:e.isOutput()?r++:t}));const n=this.ExportPath?.valueOf();if(n?.path.endsWith(this.Name?.toString())){const e=this.constructor.attributes.ExportPath,t=n.path.substring(0,n.path.length-this.Name.toString().length);this.ExportPath=new e((()=>new e.type(n.type,t+this.Name.toString(),n.full)))}if(this.Name)for(const e of Object.keys(this)){if(!e.startsWith(ae.subObjectAttributeNamePrefix))continue;const t=this[e];if(!t.ExportPath?.valueOf().path.includes(this.Name.toString()))continue;const i=t.ExportPath.valueOf(),s=i.path.indexOf(this.Name.toString()),r=i.path.substring(0,s),n=i.path.substring(s+this.Name.toString().length),a=t.constructor.attributes.ExportPath;t.ExportPath=new a((()=>new a.type(i.type,r+(this.Name??"").toString()+n,i.full)))}}static createGrammar(){return Pe.seq(Pe.reg(/Begin +Object/),Pe.seq(Pe.whitespace,Pe.alt(this.createSubObjectGrammar(),this.customPropertyGrammar,Te.createAttributeGrammar(this,Pe.reg(Te.Regex.MultipleWordsSymbols)),Te.createAttributeGrammar(this,Te.attributeNameQuoted,void 0,((e,t,i)=>{oe.objectSet(e,[...t,"quoted"],!0)})),this.inlinedArrayEntryGrammar)).map((([e,t])=>t)).many(),Pe.reg(/\s+End +Object/)).map((([e,t,i])=>{const s={};return t.forEach((e=>e(s))),new this(s)})).label("ObjectEntity")}static createSubObjectGrammar(){return Pe.lazy((()=>this.grammar)).map((e=>t=>{e.trailing=!1,t[ae.subObjectAttributeNameFromEntity(e)]=e}))}#Y;getClass(){if(!this.#Y&&(this.#Y=(this.Class?.path?this.Class.path:this.Class?.type)??this.ExportPath?.valueOf()?.type??"",this.#Y&&!this.#Y.startsWith("/"))){let e=Object.values(ae.paths).find((e=>e.endsWith("."+this.#Y)));e&&(this.#Y=e)}return this.#Y}getType(){const e=this.MacroGraphReference?.MacroGraph?.path;return e||(this.MaterialExpression?this.MaterialExpression.type:this.getClass())}getObjectName(e=!1){return e?this.getNameAndCounter()[0]:this.Name.toString()}getNameAndCounter(){const e=this.getObjectName().match(Pt.#U);return e?[e[1]??"",parseInt(e[2]??"0")]:["",0]}getCounter(){return this.getNameAndCounter()[1]}getNodeWidth(){return this.NodeWidth??this.isComment()?ae.defaultCommentWidth:void 0}setNodeWidth(e){this.NodeWidth||(this.NodeWidth=new Ye),this.NodeWidth.value=e}getNodeHeight(){return this.NodeHeight??this.isComment()?ae.defaultCommentHeight:void 0}setNodeHeight(e){this.NodeHeight||(this.NodeHeight=new Ye),this.NodeHeight.value=e}getNodePosX(){return this.NodePosX?.value??0}setNodePosX(e){this.NodePosX||(this.NodePosX=new Ye),this.NodePosX.value=Math.round(e)}getNodePosY(){return this.NodePosY?.value??0}setNodePosY(e){this.NodePosY||(this.NodePosY=new Ye),this.NodePosY.value=Math.round(e)}getCustomproperties(e=!1){return this.CustomProperties.values}getPinEntities(){return this.getCustomproperties().filter((e=>e.constructor===yt))}getSubobjects(){return Object.keys(this).filter((e=>e.startsWith(ae.subObjectAttributeNamePrefix))).flatMap((e=>[this[e],...this[e].getSubobjects()]))}switchTarget(){const e=this.getClass().match(ae.switchTargetPattern);if(e)return e[1]}isEvent(){switch(this.getClass()){case ae.paths.actorBoundEvent:case ae.paths.componentBoundEvent:case ae.paths.customEvent:case ae.paths.event:case ae.paths.inputAxisKeyEvent:case ae.paths.inputVectorAxisEvent:return!0}return!1}isComment(){switch(this.getClass()){case ae.paths.comment:case ae.paths.materialGraphNodeComment:return!0}return!1}isMaterial(){const e=this.getClass();return e.startsWith("/Script/Engine.MaterialExpression")||e.startsWith("/Script/InterchangeImport.MaterialExpression")||e.startsWith("/Script/UnrealEd.MaterialGraph")}getMaterialSubobject(){const e=this.MaterialExpression??this.MaterialExpressionComment;return e?this[ae.subObjectAttributeNameFromReference(e,!0)]:null}isPcg(){return this.getClass()===ae.paths.pcgEditorGraphNode||null!=this.getPcgSubobject()}isNiagara(){return this.Class&&(this.Class.type?this.Class.type:this.Class.path)?.startsWith("/Script/NiagaraEditor.")}getPcgSubobject(){const e=this.PCGNode;return e?this[ae.subObjectAttributeNameFromReference(e,!0)]:null}getSettingsObject(){const e=this.SettingsInterface;return e?this[ae.subObjectAttributeNameFromReference(e,!0)]:null}getSubgraphObject(){const e=this.SubgraphInstance;return e?this[ae.subObjectAttributeNameFromName(e)]:null}isDevelopmentOnly(){const e=this.getClass();return"DevelopmentOnly"===this.EnabledState?.toString()||e.includes("Debug",Math.max(0,e.lastIndexOf(".")))}getHIDAttribute(){return this.InputKey??this.AxisKey??this.InputAxisKey}getDelegatePin(){return this.getCustomproperties().find((e=>"delegate"===e.PinType.PinCategory.toString()))}nodeColor(){return function(e){switch(e.getType()){case ae.paths.materialExpressionConstant2Vector:case ae.paths.materialExpressionConstant3Vector:case ae.paths.materialExpressionConstant4Vector:return ae.nodeColors.yellow;case ae.paths.materialExpressionFunctionInput:case ae.paths.materialExpressionTextureCoordinate:case ae.paths.materialExpressionWorldPosition:case ae.paths.pcgEditorGraphNodeInput:case ae.paths.pcgEditorGraphNodeOutput:return ae.nodeColors.red;case ae.paths.makeStruct:return ae.nodeColors.darkBlue;case ae.paths.materialExpressionMaterialFunctionCall:return ae.nodeColors.blue;case ae.paths.materialExpressionTextureSample:return ae.nodeColors.darkTurquoise;case ae.paths.niagaraNodeInput:switch(e.Usage?.toString()){case"Attribute":return ae.nodeColors.intenseGreen;case"Parameter":default:return ae.nodeColors.red;case"RapidIterationParameter":return ae.nodeColors.black;case"SystemConstant":case"TranslatorConstant":return ae.nodeColors.gray}}switch(e.getClass()){case ae.paths.callFunction:return e.bIsPureFunc?.valueOf()?ae.nodeColors.green:ae.nodeColors.blue;case ae.paths.niagaraNodeFunctionCall:return ae.nodeColors.darkerBlue;case ae.paths.dynamicCast:return ae.nodeColors.turquoise;case ae.paths.inputDebugKey:case ae.paths.inputKey:return ae.nodeColors.red;case ae.paths.createDelegate:case ae.paths.enumLiteral:case ae.paths.makeArray:case ae.paths.makeMap:case ae.paths.materialGraphNode:case ae.paths.select:return ae.nodeColors.green;case ae.paths.executionSequence:case ae.paths.ifThenElse:case ae.paths.macro:case ae.paths.multiGate:return ae.nodeColors.gray;case ae.paths.functionEntry:case ae.paths.functionResult:return ae.nodeColors.violet;case ae.paths.timeline:return ae.nodeColors.yellow}if(e.switchTarget())return ae.nodeColors.lime;if(e.isEvent())return ae.nodeColors.red;if(e.isComment())return(e.CommentColor?e.CommentColor:Oe.getWhite()).toDimmedColor().toCSSRGBValues();const t=e.getPcgSubobject();if(t){if(t.NodeTitleColor)return t.NodeTitleColor.toDimmedColor(.1).toCSSRGBValues();switch(e.PCGNode?.getName(!0)){case"Branch":case"Select":return ae.nodeColors.intenseGreen}}return e.bIsPureFunc?.valueOf()?ae.nodeColors.green:e.Input?.Name?ae.nodeColors.gray:ae.nodeColors.blue}(this)}nodeIcon(){return function(e){if(e.isMaterial()||e.isPcg()||e.isNiagara())return null;switch(e.getType()){case ae.paths.addDelegate:case ae.paths.asyncAction:case ae.paths.callDelegate:case ae.paths.clearDelegate:case ae.paths.createDelegate:case ae.paths.functionEntry:case ae.paths.functionResult:case ae.paths.removeDelegate:return ce.node;case ae.paths.customEvent:return ce.event;case ae.paths.doN:return ce.doN;case ae.paths.doOnce:return ce.doOnce;case ae.paths.dynamicCast:return ce.cast;case ae.paths.enumLiteral:return ce.enum;case ae.paths.event:return ce.event;case ae.paths.executionSequence:case ae.paths.multiGate:return ce.sequence;case ae.paths.flipflop:return ce.flipflop;case ae.paths.forEachElementInEnum:case ae.paths.forLoop:case ae.paths.forLoopWithBreak:case ae.paths.whileLoop:return ce.loop;case ae.paths.forEachLoop:case ae.paths.forEachLoopWithBreak:return ce.forEachLoop;case ae.paths.ifThenElse:return ce.branchNode;case ae.paths.isValid:return ce.questionMark;case ae.paths.makeArray:return ce.makeArray;case ae.paths.makeMap:return ce.makeMap;case ae.paths.makeSet:return ce.makeSet;case ae.paths.makeStruct:return ce.makeStruct;case ae.paths.metasoundEditorGraphExternalNode:return ce.metasoundFunction;case ae.paths.select:return ce.select;case ae.paths.spawnActorFromClass:return ce.spawnActor;case ae.paths.timeline:return ce.timer}if(e.switchTarget())return ce.switch;if(_e(e).startsWith("Break"))return ce.breakStruct;if(e.getClass()===ae.paths.macro)return ce.macro;const t=e.getHIDAttribute()?.toString();return t?t.includes("Mouse")?ce.mouse:t.includes("Gamepad_Special")?ce.keyboard:t.includes("Gamepad")||t.includes("Steam")?ce.gamepad:t.includes("Touch")?ce.touchpad:ce.keyboard:e.getDelegatePin()?ce.event:e.ObjectRef?.type===ae.paths.ambientSound?ce.sound:ce.functionSymbol}(this)}additionalPinInserter(){return function(e){let t,i,s,r,n;switch(e.getType()){case ae.paths.commutativeAssociativeBinaryOperator:case ae.paths.promotableOperator:switch(n=e.FunctionReference?.MemberName?.toString(),n){default:if(!(n?.startsWith("Add_")||n?.startsWith("Subtract_")||n?.startsWith("Multiply_")||n?.startsWith("Divide_")))break;case"And_Int64Int64":case"And_IntInt":case"BMax":case"BMin":case"BooleanAND":case"BooleanNAND":case"BooleanOR":case"Concat_StrStr":case"FMax":case"FMin":case"Max":case"MaxInt64":case"Min":case"MinInt64":case"Or_Int64Int64":case"Or_IntInt":t??=()=>e.getPinEntities().filter((e=>e.isInput())),i??=wt,s??=(i,s=-1,r=-1)=>{const n=String.fromCharCode(i>=0?i:r+"A".charCodeAt(0)+1);return e.NumAdditionalInputs=new qe(t().length-1),n}}break;case ae.paths.executionSequence:r??="Then";case ae.paths.multiGate:r??="Out",t??=()=>e.getPinEntities().filter((e=>e.isOutput())),i??=e=>Number(e.PinName?.toString().match(new RegExp(String.raw`^\s*${r}[_\s]+(\d+)\s*$`,"i"))?.[1]),s??=(e,t=-1,i=-1,s)=>`${r} ${e>=0?e:t>0?`${r} 0`:i+1}`;break;case ae.paths.switchInteger:t??=()=>e.getPinEntities().filter((e=>e.isOutput())),i??=e=>Number(e.PinName?.toString().match(/^\s*(\d+)\s*$/)?.[1]),s??=(e,t=-1,i=-1,s)=>(e<0?i+1:e).toString();break;case ae.paths.switchGameplayTag:s??=(t,i=-1,s=-1,r)=>{const n=`Case_${t>=0?t:i>0?"0":s+1}`;return e.PinNames??=new Fe,e.PinNames.valueOf().push(new Qe(n)),delete e.PinTags.valueOf()[e.PinTags.length-1],e.PinTags.valueOf()[e.PinTags.length]=null,n};case ae.paths.switchName:case ae.paths.switchString:t??=()=>e.getPinEntities().filter((e=>e.isOutput())),i??=e=>Number(e.PinName.toString().match(/^\s*Case[_\s]+(\d+)\s*$/i)?.[1]),s??=(t,i=-1,s=-1,r)=>{const n=`Case_${t>=0?t:i>0?"0":s+1}`;return e.PinNames??=new Fe,e.PinNames.valueOf().push(new Qe(n)),n}}if(t)return()=>{let r=Number.MAX_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,a=[];const o=t().reduce(((e,t)=>{const s=i(t);if(isNaN(s)){if(void 0===e)return t}else if(a.push(s),r=Math.min(s,r),s>n)return n=s,t;return e}),void 0);if(r!==Number.MAX_SAFE_INTEGER&&n!==Number.MIN_SAFE_INTEGER||(r=void 0,n=void 0),!o)return null;a.sort(((e,t)=>e{const t=e-l>1;return l=e,t}));const u=new yt(o);return u.PinId=new Ue,u.PinName=new Qe(s(c,r,n,u)),u.PinToolTip=void 0,u.DefaultValue&&(u.DefaultValue=new u.DefaultValue.constructor),e.getCustomproperties(!0).push(u),u}}(this)}showProperty(e){switch(e){case"Class":case"Name":case"Archetype":case"ExportPath":case"CustomProperties":return!1}return super.showProperty(e)}doSerialize(e=!1,t="",i=this.constructor,s=i.printKey,r=i.keySeparator,n=i.attributeSeparator,a=i.wrap){const o=i!==this.constructor,l=t+ae.indentation,c=this.trailing;this.trailing=!0;const u=super.doSerialize(e,l,i,s,r,n,a);return this.trailing=c,t+"Begin Object"+(this.Class?.type||this.Class?.path?` Class${r}${this.Class.serialize(e)}`:"")+(this.Name?` Name${r}${this.Name.serialize(e)}`:"")+(this.Archetype?` Archetype${r}${this.Archetype.serialize(e)}`:"")+(this.ExportPath?.valueOf()?.type||this.ExportPath?.valueOf()?.path?` ExportPath${r}${this.ExportPath.serialize(e)}`:"")+n+u+(!0!==i.attributes.CustomProperties.ignored&&!0!==this.CustomProperties.ignored?this.getCustomproperties().map((t=>l+s("CustomProperties ")+t.serialize(e)+n)).join(""):"")+t+"End Object"+(o&&i.trailing||this.trailing?n:"")}}class kt extends Pt{constructor(e={},t=void 0){e.Class=new ot(ae.paths.knot),e.Name=new Pt.attributes.Name("K2Node_Knot");const i=new yt({PinName:new yt.attributes.PinName("InputPin")}),s=new yt({PinName:new yt.attributes.PinName("OutputPin"),Direction:new yt.attributes.Direction("EGPD_Output")});t&&(i.copyTypeFrom(t),s.copyTypeFrom(t)),e.CustomProperties=new Pt.attributes.CustomProperties([i,s]),super(e)}}class At{#q;get target(){return this.#q}#e;get blueprint(){return this.#e}consumeEvent;options;listenHandler=()=>this.listenEvents();unlistenHandler=()=>this.unlistenEvents();constructor(e,t,i={}){i.consumeEvent??=!1,i.listenOnFocus??=!1,i.unlistenOnTextEdit??=!1,this.#q=e,this.#e=t,this.consumeEvent=i.consumeEvent,this.options=i}setup(){this.options.listenOnFocus&&(this.blueprint.addEventListener(ae.focusEventName.begin,this.listenHandler),this.blueprint.addEventListener(ae.focusEventName.end,this.unlistenHandler)),this.options.unlistenOnTextEdit&&(this.blueprint.addEventListener(ae.editTextEventName.begin,this.unlistenHandler),this.blueprint.addEventListener(ae.editTextEventName.end,this.listenHandler)),this.blueprint.focused&&this.listenEvents()}cleanup(){this.unlistenEvents(),this.blueprint.removeEventListener(ae.focusEventName.begin,this.listenHandler),this.blueprint.removeEventListener(ae.focusEventName.end,this.unlistenHandler),this.blueprint.removeEventListener(ae.editTextEventName.begin,this.unlistenHandler),this.blueprint.removeEventListener(ae.editTextEventName.end,this.listenHandler)}listenEvents(){}unlistenEvents(){}}class Lt extends ke{static attributes={...super.attributes,ActionName:Qe,bShift:Ae,bCtrl:Ae,bAlt:Ae,bCmd:Ae,Key:et};static grammar=this.createGrammar();constructor(e){super(e),this.ActionName,this.bShift,this.bCtrl,this.bAlt,this.bCmd,this.Key}static createGrammar(){return Pe.alt(et.grammar.map((e=>new this({Key:e}))),Te.createEntityGrammar(this))}}class Mt extends At{static#K=e=>{};#X;pressedKey="";constructor(e,t,i={},s=Mt.#K,r=Mt.#K){i.activationKeys??=[],i.consumeEvent??=!0,i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,i.activationKeys instanceof Array||(i.activationKeys=[i.activationKeys]),i.activationKeys=i.activationKeys.map((e=>{if(e instanceof Lt)return e;if(e.constructor===String){const t=Lt.grammar.run(e);if(t.status)return t.value}throw new Error("Unexpected key value")})),super(e,t,i),this.onKeyDown=s,this.onKeyUp=r,this.#X=this.options.activationKeys??[];let n=this;this.keyDownHandler=e=>{n.#X.some((t=>(e=>e.bShift?.valueOf()||"LeftShift"==e.Key.valueOf()||"RightShift"==e.Key.valueOf())(t)==e.shiftKey&&(e=>e.bCtrl?.valueOf()||"LeftControl"==e.Key.valueOf()||"RightControl"==e.Key.valueOf())(t)==e.ctrlKey&&(e=>e.bAlt?.valueOf()||"LeftAlt"==e.Key.valueOf()||"RightAlt"==e.Key.valueOf())(t)==e.altKey&&ae.Keys[t.Key.value]==e.code))&&(this.consumeEvent&&(e.preventDefault(),e.stopImmediatePropagation()),this.pressedKey=e.code,n.fire(),document.removeEventListener("keydown",n.keyDownHandler),document.addEventListener("keyup",n.keyUpHandler))},this.keyUpHandler=e=>{n.#X.some((t=>t.bShift?.valueOf()&&"Shift"==e.key||t.bCtrl?.valueOf()&&"Control"==e.key||t.bAlt?.valueOf()&&"Alt"==e.key||t.bCmd?.valueOf()&&"Meta"==e.key||ae.Keys[t.Key.value]==e.code))&&(this.consumeEvent&&e.stopImmediatePropagation(),n.unfire(),this.pressedKey="",document.removeEventListener("keyup",this.keyUpHandler),document.addEventListener("keydown",this.keyDownHandler))}}listenEvents(){document.addEventListener("keydown",this.keyDownHandler)}unlistenEvents(){document.removeEventListener("keydown",this.keyDownHandler)}fire(){this.onKeyDown(this)}unfire(){this.onKeyUp(this)}}class Tt extends At{#W=[0,0];get location(){return this.#W}#Z;get enablerKey(){return this.#Z}#Q=!0;get enablerActivated(){return this.#Q}constructor(e,t,i={}){i.ignoreTranslateCompensate??=!1,i.ignoreScale??=!1,i.movementSpace??=t.getGridDOMElement()??document.documentElement,super(e,t,i),this.movementSpace=i.movementSpace,i.enablerKey&&(this.#Z=i.enablerKey,this.#Z.onKeyDown=()=>this.#Q=!0,this.#Z.onKeyUp=()=>this.#Q=!1,this.#Z.consumeEvent=!1,this.#Z.listenEvents(),this.#Q=!1)}setLocationFromEvent(e){let t=oe.convertLocation([e.clientX,e.clientY],this.movementSpace,this.options.ignoreScale);return t=this.options.ignoreTranslateCompensate?t:this.blueprint.compensateTranslation(t[0],t[1]),this.#W=[...t],this.#W}}class It extends Tt{static#K=e=>{};#J=e=>{if(this.blueprint.setFocused(!0),!this.enablerKey||this.enablerActivated)if(e.button===this.options.clickButton)this.options.strictTarget&&e.target!==e.currentTarget||(this.consumeEvent&&e.stopImmediatePropagation(),document.addEventListener("mouseup",this.#ee),this.setLocationFromEvent(e),this.clickedPosition[0]=this.location[0],this.clickedPosition[1]=this.location[1],this.blueprint.mousePosition[0]=this.location[0],this.blueprint.mousePosition[1]=this.location[1],this.clicked(this.clickedPosition));else this.options.exitAnyButton||this.#ee(e)};#ee=e=>{this.options.exitAnyButton&&e.button!=this.options.clickButton||(this.consumeEvent&&e.stopImmediatePropagation(),document.removeEventListener("mouseup",this.#ee),this.unclicked())};clickedPosition=[0,0];constructor(e,t,i={},s=It.#K,r=It.#K){i.clickButton??=ae.mouseClickButton,i.consumeEvent??=!0,i.exitAnyButton??=!0,i.strictTarget??=!1,super(e,t,i),this.onClick=s,this.onUnclick=r,this.listenEvents()}listenEvents(){this.target.addEventListener("mousedown",this.#J),this.options.clickButton===ae.mouseRightClickButton&&this.target.addEventListener("contextmenu",(e=>e.preventDefault()))}unlistenEvents(){this.target.removeEventListener("mousedown",this.#J)}clicked(e){this.onClick(this)}unclicked(e){this.onUnclick(this)}}class Ot extends Tt{static ignoreDbClick=e=>{};#te=e=>{this.options.strictTarget&&e.target!==e.currentTarget||(this.consumeEvent&&e.stopImmediatePropagation(),this.clickedPosition=this.setLocationFromEvent(e),this.blueprint.mousePosition=[...this.clickedPosition],this.dbclicked(this.clickedPosition))};#ie;get onDbClick(){return this.#ie}set onDbClick(e){this.#ie=e}clickedPosition=[0,0];constructor(e,t,i={},s=Ot.ignoreDbClick){i.consumeEvent??=!0,i.strictTarget??=!1,super(e,t,i),this.#ie=s,this.listenEvents()}listenEvents(){this.target.addEventListener("dblclick",this.#te)}unlistenEvents(){this.target.removeEventListener("dblclick",this.#te)}dbclicked(e){this.onDbClick(e)}}class Dt{static deleteNodes="Delete";static duplicateNodes="(bCtrl=True,Key=D)";static enableLinkDelete="LeftAlt";static enableZoomIn=["LeftControl","RightControl"];static selectAllNodes="(bCtrl=True,Key=A)"}class $t{element;get blueprint(){return this.element.blueprint}#se=[];get inputObjects(){return this.#se}initialize(e){this.element=e}createInputObjects(){return[]}setup(){this.#se.forEach((e=>e.setup()))}cleanup(){this.#se.forEach((e=>e.cleanup()))}willUpdate(e){}update(e){}render(){return z``}firstUpdated(e){}updated(e){}inputSetup(){this.#se=this.createInputObjects()}}class Bt extends $t{update(e){super.update(e);const[t,i,s,r]=[Math.round(this.element.fromX),Math.round(this.element.fromY),Math.round(this.element.toX),Math.round(this.element.toY)],[n,a,o,l]=[Math.min(t,s),Math.min(i,r),Math.abs(t-s),Math.abs(i-r)];(e.has("fromX")||e.has("toX"))&&(this.element.style.left=`${n}px`,this.element.style.width=`${o}px`),(e.has("fromY")||e.has("toY"))&&(this.element.style.top=`${a}px`,this.element.style.height=`${l}px`)}}class Rt extends Bt{static sigmoidPositive(e,t=3.7,i=1.1){return 1-Math.exp(-((e/i)**t))}static decreasingValue(e,t){const i=-e*t[0]**2,s=t[1]-i/t[0];return e=>i/e+s}static clampedLine(e,t){if(e[0]>t[0]){const i=e;e=t,t=i}const i=(t[1]-e[1])/(t[0]-e[0]),s=e[1]-i*e[0];return r=>rt[0]?t[1]:i*r+s}static c1DecreasingValue=Rt.decreasingValue(-.15,[100,15]);static c2DecreasingValue=Rt.decreasingValue(-.05,[500,130]);static c2Clamped=Rt.clampedLine([0,80],[200,40]);#re=`ueb-id-${Math.floor(1e12*Math.random())}`;#ne=e=>{const t=new kt({},this.element.source.entity),i=Le.getConstructor("ueb-node").newObject(t);i.setLocation(...this.blueprint.snapToGrid(...e));const s=i.template;this.blueprint.addGraphElement(i);const r=this.element.getInputPin(),n=this.element.getOutputPin();this.element.source=null,this.element.destination=null;const a=Le.getConstructor("ueb-link").newObject(n,s.inputPin);this.blueprint.addGraphElement(a),this.element.source=s.outputPin,this.element.destination=r};createInputObjects(){const e=this.element.querySelector(".ueb-link-area");return[...super.createInputObjects(),new Ot(e,this.blueprint,void 0,(e=>{e[0]+=ae.knotOffset[0],e[1]+=ae.knotOffset[1],e=oe.snapToGrid(e[0],e[1],ae.gridSize),this.#ne(e)})),new It(e,this.blueprint,{enablerKey:new Mt(this.blueprint,this.blueprint,{activationKeys:Dt.enableLinkDelete})},(()=>this.blueprint.removeGraphElement(this.element)))]}willUpdate(e){super.willUpdate(e);const t=this.element.source,i=this.element.destination;if(e.has("fromX")||e.has("toX")){const e=this.element.fromX,s=this.element.toX,r=t?.nodeElement.getType()==ae.paths.knot,n=i?.nodeElement.getType()==ae.paths.knot;!r||i&&!n||(t?.isInput()&&s>e+ae.distanceThreshold?this.element.source=t.nodeElement.template.outputPin:t?.isOutput()&&se+ae.distanceThreshold&&(this.element.destination=i.nodeElement.template.inputPin))}const s=Math.max(Math.abs(this.element.fromX-this.element.toX),1),r=Math.max(Math.abs(this.element.fromY-this.element.toY),1),n=Math.max(s,ae.linkMinWidth),a=s/n,o=this.element.originatesFromInput?this.element.fromXthis.element.toY?1:0)),this.element.style.setProperty("--ueb-start-percentage",`${Math.round(this.element.startPercentage)}%`),this.element.style.setProperty("--ueb-link-start",`${Math.round(this.element.startPixels)}`)}render(){return z` ${this.element.linkMessageIcon||this.element.linkMessageText?z``:F}`}}class Gt extends le{static properties={...super.properties,fromX:{type:Number,attribute:!1},fromY:{type:Number,attribute:!1},toX:{type:Number,attribute:!1},toY:{type:Number,attribute:!1}};constructor(){super(),this.fromX=0,this.fromY=0,this.toX=0,this.toY=0}setBothLocations([e,t]){this.fromX=e,this.fromY=t,this.toX=e,this.toY=t}addSourceLocation(e,t){this.fromX+=e,this.fromY+=t}addDestinationLocation(e,t){this.toX+=e,this.toY+=t}}class Vt extends Gt{static properties={...super.properties,dragging:{type:Boolean,attribute:"data-dragging",converter:Ae.booleanConverter,reflect:!0},originatesFromInput:{type:Boolean,attribute:!1},svgPathD:{type:String,attribute:!1},linkMessageIcon:{type:String,attribute:!1},linkMessageText:{type:String,attribute:!1}};#ae;get source(){return this.#ae}set source(e){this.#oe(e,!1)}#le;get destination(){return this.#le}set destination(e){this.#oe(e,!0)}#ce=()=>this.remove();#ue=e=>this.addSourceLocation(...e.detail.value);#he=e=>this.addDestinationLocation(...e.detail.value);#pe=e=>this.setSourceLocation();#de=e=>this.setDestinationLocation();linkMessageIcon=F;linkMessageText=F;pathElement;constructor(){super(),this.dragging=!1,this.originatesFromInput=!1,this.startPercentage=0,this.svgPathD="",this.startPixels=0}static newObject(e,t){const i=new Vt;return i.initialize(e,t),i}initialize(e,t){super.initialize({},new Rt),e&&(this.source=e,t||(this.toX=this.fromX,this.toY=this.fromY)),t&&(this.destination=t,e||(this.fromX=this.toX,this.fromY=this.toY))}#oe(e,t){const i=()=>t?this.destination:this.source;if(i()!=e){if(i()){const e=i().getNodeElement();e.removeEventListener(ae.removeEventName,this.#ce),e.removeEventListener(ae.nodeDragEventName,t?this.#he:this.#ue),e.removeEventListener(ae.nodeReflowEventName,t?this.#de:this.#pe),this.#me()}if(t?this.#le=e:this.#ae=e,i()){const e=i().getNodeElement();e.addEventListener(ae.removeEventName,this.#ce),e.addEventListener(ae.nodeDragEventName,t?this.#he:this.#ue),e.addEventListener(ae.nodeReflowEventName,t?this.#de:this.#pe),t?this.setDestinationLocation():(this.setSourceLocation(),this.originatesFromInput=this.source.isInput()),this.#ge()}}}#ge(){this.source&&this.destination&&(this.source.linkTo(this.destination),this.destination.linkTo(this.source))}#me(){this.source&&this.destination&&(this.source.unlinkFrom(this.destination,!1),this.destination.unlinkFrom(this.source,!1))}cleanup(){super.cleanup(),this.#me(),this.source=null,this.destination=null}setSourceLocation(e=null,t=!0){if(null==e){const i=this;if(t&&(!this.hasUpdated||!this.source.hasUpdated))return void Promise.all([this.updateComplete,this.source.updateComplete]).then((()=>i.setSourceLocation(null,!1)));e=this.source.template.getLinkLocation()}const[i,s]=e;this.fromX=i,this.fromY=s}setDestinationLocation(e=null,t=!0){if(null==e){const i=this;if(t&&(!this.hasUpdated||!this.destination.hasUpdated))return void Promise.all([this.updateComplete,this.destination.updateComplete]).then((()=>i.setDestinationLocation(null,!1)));e=this.destination.template.getLinkLocation()}this.toX=e[0],this.toY=e[1]}getInputPin(e=!1){return this.source?.isInput()?this.source:this.destination?.isInput()?this.destination:e?this.source??this.destination:void 0}setInputPin(e){this.source?.isInput()&&(this.source=e),this.destination=e}getOutputPin(e=!1){return this.source?.isOutput()?this.source:this.destination?.isOutput()?this.destination:e?this.source??this.destination:void 0}setOutputPin(e){this.destination?.isOutput()&&(this.destination=e),this.source=e}startDragging(){this.dragging=!0}finishDragging(){this.dragging=!1}removeMessage(){this.linkMessageIcon=F,this.linkMessageText=F}setMessageConvertType(){this.linkMessageIcon=ce.convert,this.linkMessageText=z`Convert ${this.source.pinType} to ${this.destination.pinType}.`}setMessageCorrect(){this.linkMessageIcon=ce.correct,this.linkMessageText=F}setMessageReplace(){this.linkMessageIcon=ce.correct,this.linkMessageText=F}setMessageDirectionsIncompatible(){this.linkMessageIcon=ce.reject,this.linkMessageText=z`Directions are not compatbile.`}setMessagePlaceNode(){this.linkMessageIcon=F,this.linkMessageText=z`Place a new node.`}setMessageReplaceLink(){this.linkMessageIcon=ce.correct,this.linkMessageText=z`Replace existing input connections.`}setMessageReplaceOutputLink(){this.linkMessageIcon=ce.correct,this.linkMessageText=z`Replace existing output connections.`}setMessageSameNode(){this.linkMessageIcon=ce.reject,this.linkMessageText=z`Both are on the same node.`}setMessageTypesIncompatible(e,t){this.linkMessageIcon=ce.reject,this.linkMessageText=z`${oe.capitalFirstLetter(e.pinType)} is not compatible with ${oe.capitalFirstLetter(t.pinType)}.`}}class Ht extends le{static properties={...super.properties,locationX:{type:Number,attribute:!1},locationY:{type:Number,attribute:!1},sizeX:{type:Number,attribute:!1},sizeY:{type:Number,attribute:!1}};static dragEventName=ae.dragEventName;static dragGeneralEventName=ae.dragGeneralEventName;constructor(){super(),this.locationX=0,this.locationY=0,this.sizeX=0,this.sizeY=0}computeSizes(){const e=this.getBoundingClientRect();this.sizeX=this.blueprint.scaleCorrect(e.width),this.sizeY=this.blueprint.scaleCorrect(e.height)}firstUpdated(e){super.firstUpdated(e),this.computeSizes()}setLocation(e,t,i=!0){const s=e-this.locationX,r=t-this.locationY;if(this.locationX=e,this.locationY=t,this.blueprint&&i){const e=new CustomEvent(this.constructor.dragEventName,{detail:{value:[s,r]},bubbles:!1,cancelable:!0});this.dispatchEvent(e)}}addLocation(e,t,i=!0){this.setLocation(this.locationX+e,this.locationY+t,i)}acknowledgeDrag(e){const t=new CustomEvent(this.constructor.dragGeneralEventName,{detail:{value:e},bubbles:!0,cancelable:!0});this.dispatchEvent(t)}snapToGrid(){const e=oe.snapToGrid(this.locationX,this.locationY,ae.gridSize);this.locationX==e[0]&&this.locationY==e[1]||this.setLocation(e[0],e[1])}topBoundary(e=!1){return this.template.topBoundary(e)}rightBoundary(e=!1){return this.template.rightBoundary(e)}bottomBoundary(e=!1){return this.template.bottomBoundary(e)}leftBoundary(e=!1){return this.template.leftBoundary(e)}}class zt extends Tt{#J=e=>{if(this.blueprint.setFocused(!0),e.button===this.options.clickButton)this.options.strictTarget&&e.target!=e.currentTarget||(this.consumeEvent&&e.stopImmediatePropagation(),this.#be.addEventListener("mousemove",this.#ve),document.addEventListener("mouseup",this.#ee),this.setLocationFromEvent(e),this.clickedPosition[0]=this.location[0],this.clickedPosition[1]=this.location[1],this.blueprint.mousePosition[0]=this.location[0],this.blueprint.mousePosition[1]=this.location[1],this.target instanceof Ht&&(this.clickedOffset=[this.clickedPosition[0]-this.target.locationX,this.clickedPosition[1]-this.target.locationY]),this.clicked(this.clickedPosition));else this.options.exitAnyButton||this.#ee(e)};#ve=e=>{this.consumeEvent&&e.stopImmediatePropagation(),this.#be.removeEventListener("mousemove",this.#ve),this.#be.addEventListener("mousemove",this.#fe);const t=this.getEvent(ae.trackingMouseEventName.begin);this.#ye=0==this.target.dispatchEvent(t),this.setLocationFromEvent(e),this.lastLocation=oe.snapToGrid(this.clickedPosition[0],this.clickedPosition[1],this.stepSize),this.startDrag(this.location),this.started=!0,this.#fe(e)};#fe=e=>{this.consumeEvent&&e.stopImmediatePropagation();const t=this.setLocationFromEvent(e),i=[e.movementX,e.movementY];if(this.dragTo(t,i),this.#ye&&(this.blueprint.mousePosition=t),this.options.scrollGraphEdge){const e=Math.sqrt(i[0]*i[0]+i[1]*i[1]),s=this.blueprint.scaleCorrect(ae.edgeScrollThreshold),r=this.blueprint.template.gridLeftVisibilityBoundary()+s,n=this.blueprint.template.gridRightVisibilityBoundary()-s;let a=0;t[0]n&&(a=t[0]-n);const o=this.blueprint.template.gridTopVisibilityBoundary()+s,l=this.blueprint.template.gridBottomVisibilityBoundary()-s;let c=0;t[1]l&&(c=t[1]-l),a=oe.clamp(this.blueprint.scaleCorrectReverse(a)**3*e*.6,-20,20),c=oe.clamp(this.blueprint.scaleCorrectReverse(c)**3*e*.6,-20,20),this.blueprint.scrollDelta(a,c)}};#ee=e=>{if(!this.options.exitAnyButton||e.button==this.options.clickButton){if(this.consumeEvent&&e.stopImmediatePropagation(),this.#be.removeEventListener("mousemove",this.#ve),this.#be.removeEventListener("mousemove",this.#fe),document.removeEventListener("mouseup",this.#ee),this.started&&this.endDrag(),this.unclicked(),this.#ye){const e=this.getEvent(ae.trackingMouseEventName.end);this.target.dispatchEvent(e),this.#ye=!1}this.started=!1}};#ye=!1;#be;#we;get draggableElement(){return this.#we}clickedOffset=[0,0];clickedPosition=[0,0];lastLocation=[0,0];started=!1;stepSize=1;constructor(e,t,i={}){i.clickButton??=ae.mouseClickButton,i.consumeEvent??=!0,i.draggableElement??=e,i.exitAnyButton??=!0,i.moveEverywhere??=!1,i.movementSpace??=t?.getGridDOMElement(),i.repositionOnClick??=!1,i.scrollGraphEdge??=!1,i.strictTarget??=!1,super(e,t,i),this.stepSize=Number(i.stepSize??ae.gridSize),this.#be=this.options.moveEverywhere?document.documentElement:this.movementSpace,this.#we=this.options.draggableElement,this.listenEvents()}listenEvents(){super.listenEvents(),this.#we.addEventListener("mousedown",this.#J),this.options.clickButton===ae.mouseRightClickButton&&this.#we.addEventListener("contextmenu",(e=>e.preventDefault()))}unlistenEvents(){super.unlistenEvents(),this.#we.removeEventListener("mousedown",this.#J)}getEvent(e){return new CustomEvent(e,{detail:{tracker:this},bubbles:!0,cancelable:!0})}clicked(e){}startDrag(e){}dragTo(e,t){}endDrag(){}unclicked(e){}}class _t extends zt{clicked(e){this.options.repositionOnClick&&(this.target.setLocation(...this.stepSize>1?oe.snapToGrid(e[0],e[1],this.stepSize):e),this.clickedOffset=[0,0])}dragTo(e,t){const i=[this.target.locationX??this.lastLocation[0],this.target.locationY??this.lastLocation[1]],[s,r]=this.stepSize>1?[oe.snapToGrid(e[0],e[1],this.stepSize),oe.snapToGrid(i[0],i[1],this.stepSize)]:[e,i];0==(t=[s[0]-this.lastLocation[0],s[1]-this.lastLocation[1]])[0]&&0==t[1]||(t[0]+=r[0]-i[0],t[1]+=r[1]-i[1],this.dragAction(s,t),this.lastLocation=s)}dragAction(e,t){this.target.setLocation(e[0]-this.clickedOffset[0],e[1]-this.clickedOffset[1])}}class Ft extends _t{#Se;#Ee;#Ce;#Ne;constructor(e,t,i={}){super(e,t,i),i.onClicked&&(this.#Se=i.onClicked),i.onStartDrag&&(this.#Ee=i.onStartDrag),i.onDrag&&(this.#Ce=i.onDrag),i.onEndDrag&&(this.#Ne=i.onEndDrag)}clicked(e){super.clicked(e),this.#Se?.()}startDrag(){super.startDrag(),this.#Ee?.()}dragAction(e,t){this.#Ce?.(e,t)}endDrag(){super.endDrag(),this.#Ne?.()}}class jt extends _t{constructor(e,t,i={}){super(e,t,i),this.draggableElement.classList.add("ueb-draggable")}startDrag(){this.target.selected||(this.blueprint.unselectAll(),this.target.setSelected(!0))}dragAction(e,t){this.target.acknowledgeDrag(t)}unclicked(){this.started?(this.blueprint.getNodes(!0).forEach((e=>e.boundComments.filter((t=>!e.isInsideComment(t))).forEach((t=>e.unbindFromComment(t))))),this.blueprint.getCommentNodes().forEach((e=>e.template.manageNodesBind()))):(this.blueprint.unselectAll(),this.target.setSelected(!0))}}class Ut extends $t{getDraggableElement(){return this.element}createDraggableObject(){const e=this.getDraggableElement();return new _t(this.element,this.blueprint,{draggableElement:e})}createInputObjects(){return[...super.createInputObjects(),this.createDraggableObject(),new Mt(this.element,this.blueprint,{activationKeys:[ae.Keys.ArrowUp,ae.Keys.ArrowRight,ae.Keys.ArrowDown,ae.Keys.ArrowLeft]},(e=>e.target.acknowledgeDrag([e.pressedKey===ae.Keys.ArrowLeft?-ae.gridSize:e.pressedKey===ae.Keys.ArrowRight?ae.gridSize:0,e.pressedKey===ae.Keys.ArrowUp?-ae.gridSize:e.pressedKey===ae.Keys.ArrowDown?ae.gridSize:0])))]}topBoundary(e=!1){return this.element.locationY}rightBoundary(e=!1){return this.element.locationX+this.element.sizeX}bottomBoundary(e=!1){return this.element.locationY+this.element.sizeY}leftBoundary(e=!1){return this.element.locationX}centerInViewport(){const e=Math.min(this.blueprint.template.viewportSize[0]/10,this.blueprint.template.viewportSize[1]/10),t=this.leftBoundary()-this.blueprint.template.gridLeftVisibilityBoundary(),i=this.blueprint.template.gridRightVisibilityBoundary()-this.rightBoundary();let s=Math.max((t+i)/2,e);const r=this.topBoundary()-this.blueprint.template.gridTopVisibilityBoundary(),n=this.blueprint.template.gridBottomVisibilityBoundary()-this.bottomBoundary();let a=Math.max((r+n)/2,e);this.blueprint.scrollDelta(t-s,r-a,!0)}}class Yt extends Ut{update(e){super.update(e),e.has("locationX")&&(this.element.style.left=`${this.element.locationX}px`),e.has("locationY")&&(this.element.style.top=`${this.element.locationY}px`)}}class qt extends Yt{getDraggableElement(){return this.element}createDraggableObject(){return new jt(this.element,this.blueprint,{draggableElement:this.getDraggableElement(),scrollGraphEdge:!0})}firstUpdated(e){super.firstUpdated(e),this.element.selected&&!this.element.listeningDrag&&this.element.setSelected(!0)}}class Kt extends qt{static nodeStyleClasses=["ueb-node-style-default"];#xe;pinInserter;inputContainer;outputContainer;pinElement;addPinHandler=()=>{const e=this.pinInserter?.();e&&(this.defaultPin&&this.defaultPin.isInput()===e.isInput()?this.defaultPin.before(this.createPinElement(e)):(e.isInput()?this.inputContainer:this.outputContainer).appendChild(this.createPinElement(e)),this.element.acknowledgeReflow())};toggleAdvancedDisplayHandler=()=>{this.element.toggleShowAdvancedPinDisplay(),this.element.requestUpdate(),this.element.updateComplete.then((()=>this.element.acknowledgeReflow()))};createPinElement(e){const t=Le.getConstructor("ueb-pin").newObject(e,void 0,this.element);return this.pinInserter&&!this.defaultPin&&"Default"===t.getPinName()&&(this.defaultPin=t,this.defaultPin.classList.add("ueb-node-variadic-default")),t}initialize(e){super.initialize(e),this.#xe=function(e){switch(e.getType()){case ae.paths.addDelegate:case ae.paths.clearDelegate:case ae.paths.callDelegate:case ae.paths.removeDelegate:return null}const t=e.getPinEntities().find((e=>!e.isHidden()&&"self"===e.PinName?.toString()&&"Target"===We(e)));if(t){const i=e.FunctionReference?.MemberParent?.getName()??t.PinType?.PinSubCategoryObject?.getName()??"Untitled";return i.length>0?`Target is ${oe.formatStringName(i)}`:null}return null}(e.entity),this.element.classList.add(...this.constructor.nodeStyleClasses),this.element.style.setProperty("--ueb-node-color",this.getColor().cssText),this.pinInserter=this.element.entity.additionalPinInserter(),this.pinInserter&&this.element.classList.add("ueb-node-is-variadic")}getColor(){return this.element.entity.nodeColor()}render(){return z`
${this.renderTop()}
${this.pinInserter?z`
Add pin ${ce.plusCircle}
`:F} ${this.element.entity.isDevelopmentOnly()?z`
Development Only
`:F} ${this.element.advancedPinDisplay?z`
${ce.expandIcon}
`:F}
`}renderNodeIcon(){return this.element.entity.nodeIcon()}renderNodeName(){return this.element.nodeDisplayName}renderTop(){const e=this.renderNodeIcon(),t=this.renderNodeName();return z`
${e?z`
${e}
`:F} ${t?z`
${t} ${this.#xe?z`
${this.#xe}
`:F}
`:F}
`}firstUpdated(e){super.firstUpdated(e),this.inputContainer=this.element.querySelector(".ueb-node-inputs"),this.outputContainer=this.element.querySelector(".ueb-node-outputs"),this.setupPins(),this.element.updateComplete.then((()=>this.element.acknowledgeReflow()))}setupPins(){this.element.nodeNameElement=this.element.querySelector(".ueb-node-name-text");let e=!1,t=!1;for(const i of this.getPinElements())i!==this.defaultPin&&(i.isInput()?(this.inputContainer.appendChild(i),e=!0):i.isOutput()&&(this.outputContainer.appendChild(i),t=!0));this.defaultPin&&(this.defaultPin.isInput()?this.inputContainer:this.outputContainer).appendChild(this.defaultPin),e&&this.element.classList.add("ueb-node-has-inputs"),t&&this.element.classList.add("ueb-node-has-outputs")}getPinElements(){return this.element.getPinElements()}createPinElements(){return this.element.getPinEntities().filter((e=>!e.isHidden())).map((e=>this.createPinElement(e)))}linksChanged(){}}class Xt extends Kt{#Pe=document.createElement("div");#ke=document.createElement("div");#Ae=document.createElement("div");#Le=document.createElement("div");#Me=document.createElement("div");#Te=document.createElement("div");#Ie=document.createElement("div");#Oe=document.createElement("div");initialize(e){super.initialize(e),this.element.classList.add("ueb-resizeable"),this.#Pe.classList.add("ueb-resizeable-top"),this.#ke.classList.add("ueb-resizeable-right"),this.#Ae.classList.add("ueb-resizeable-bottom"),this.#Le.classList.add("ueb-resizeable-left"),this.#Me.classList.add("ueb-resizeable-top-right"),this.#Te.classList.add("ueb-resizeable-bottom-right"),this.#Ie.classList.add("ueb-resizeable-bottom-left"),this.#Oe.classList.add("ueb-resizeable-top-left")}update(e){super.update(e),this.element.sizeX>=0&&e.has("sizeX")&&(this.element.style.width=`${this.element.sizeX}px`),this.element.sizeY>=0&&e.has("sizeY")&&(this.element.style.height=`${this.element.sizeY}px`)}firstUpdated(e){super.firstUpdated(e),this.element.append(this.#Pe,this.#ke,this.#Ae,this.#Le,this.#Me,this.#Te,this.#Ie,this.#Oe)}createInputObjects(){return[...super.createInputObjects(),new Ft(this.#Pe,this.blueprint,{onDrag:(e,t)=>{t[1]=e[1]-this.element.topBoundary(),this.setSizeY(this.element.sizeY-t[1])&&this.element.addLocation(0,t[1],!1)},onEndDrag:()=>this.endResize()}),new Ft(this.#ke,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.rightBoundary(),this.setSizeX(this.element.sizeX+t[0])},onEndDrag:()=>this.endResize()}),new Ft(this.#Ae,this.blueprint,{onDrag:(e,t)=>{t[1]=e[1]-this.element.bottomBoundary(),this.setSizeY(this.element.sizeY+t[1])},onEndDrag:()=>this.endResize()}),new Ft(this.#Le,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.leftBoundary(),this.setSizeX(this.element.sizeX-t[0])&&this.element.addLocation(t[0],0,!1)},onEndDrag:()=>this.endResize()}),new Ft(this.#Me,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.rightBoundary(),t[1]=e[1]-this.element.topBoundary(),this.setSizeX(this.element.sizeX+t[0]),this.setSizeY(this.element.sizeY-t[1])&&this.element.addLocation(0,t[1],!1)},onEndDrag:()=>this.endResize()}),new Ft(this.#Te,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.rightBoundary(),t[1]=e[1]-this.element.bottomBoundary(),this.setSizeX(this.element.sizeX+t[0]),this.setSizeY(this.element.sizeY+t[1])},onEndDrag:()=>this.endResize()}),new Ft(this.#Ie,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.leftBoundary(),t[1]=e[1]-this.element.bottomBoundary(),this.setSizeX(this.element.sizeX-t[0])&&this.element.addLocation(t[0],0,!1),this.setSizeY(this.element.sizeY+t[1])},onEndDrag:()=>this.endResize()}),new Ft(this.#Oe,this.blueprint,{onDrag:(e,t)=>{t[0]=e[0]-this.element.leftBoundary(),t[1]=e[1]-this.element.topBoundary(),this.setSizeX(this.element.sizeX-t[0])&&this.element.addLocation(t[0],0,!1),this.setSizeY(this.element.sizeY-t[1])&&this.element.addLocation(0,t[1],!1)},onEndDrag:()=>this.endResize()})]}setSizeX(e){return this.element.setNodeWidth(e),!0}setSizeY(e){return this.element.setNodeHeight(e),!0}endResize(){}}class Wt extends Xt{#De=0;initialize(e){super.initialize(e),e.classList.add("ueb-node-style-comment","ueb-node-resizeable"),e.sizeX=25*ae.gridSize,e.sizeY=6*ae.gridSize,super.initialize(e)}getDraggableElement(){return this.element.querySelector(".ueb-node-top")}render(){return z`
`}firstUpdated(e){super.firstUpdated(e);const t=this.getDraggableElement().getBoundingClientRect();this.#De=t.height}manageNodesBind(){let e=this.blueprint.getNodes();for(let t of e)t.topBoundary()>=this.element.topBoundary()&&t.rightBoundary()<=this.element.rightBoundary()&&t.bottomBoundary()<=this.element.bottomBoundary()&&t.leftBoundary()>=this.element.leftBoundary()?t.bindToComment(this.element):t.unbindFromComment(this.element)}setSizeX(e){return(e=Math.round(e))>=2*ae.gridSize&&(this.element.setNodeWidth(e),!0)}setSizeY(e){return(e=Math.round(e))>=2*ae.gridSize&&(this.element.setNodeHeight(e),!0)}endResize(){this.manageNodesBind()}topBoundary(e=!1){return this.element.locationY}rightBoundary(e=!1){return this.element.locationX+this.element.sizeX}bottomBoundary(e=!1){return e?this.element.locationY+this.#De:super.bottomBoundary()}leftBoundary(e=!1){return this.element.locationX}}class Zt extends zt{#$e;#Be=null;#Re=e=>{if(!this.enteredPin){this.linkValid=!1,this.enteredPin=e.target;const t=this.link.source??this.target,i=this.enteredPin,s=t.isOutput()?t:i;t.nodeElement.getType()===ae.paths.knot||i.nodeElement.getType()===ae.paths.knot?(this.link.setMessageCorrect(),this.linkValid=!0):t.getNodeElement()===i.getNodeElement()?this.link.setMessageSameNode():t.isOutput()===i.isOutput()?this.link.setMessageDirectionsIncompatible():this.blueprint.getLinks(t,i).length?(this.link.setMessageReplaceLink(),this.linkValid=!0):"exec"===s.entity.getType()&&s.isLinked?(this.link.setMessageReplaceOutputLink(),this.linkValid=!0):"object"==t.entity.PinType.PinCategory.valueOf()&&"object"==i.entity.PinType.PinCategory.valueOf()||t.pinType==i.pinType?(this.link.setMessageCorrect(),this.linkValid=!0):(this.link.setMessageTypesIncompatible(t,i),this.linkValid=!1)}};#Ge=e=>{this.enteredPin==e.target&&(this.enteredPin=null,this.linkValid=!1,this.link?.setMessagePlaceNode())};link;enteredPin;linkValid=!1;constructor(e,t,i={}){i.scrollGraphEdge??=!0,super(e,t,i)}startDrag(e){this.target.nodeElement.getType()==ae.paths.knot&&(this.#Be=this.target),this.link=Le.getConstructor("ueb-link").newObject(this.target,null),this.blueprint.template.linksContainerElement.prepend(this.link),this.link.setMessagePlaceNode(),this.#$e=this.blueprint.querySelectorAll("ueb-pin"),this.#$e.forEach((e=>{e!=this.target&&(e.addEventListener("mouseenter",this.#Re),e.addEventListener("mouseleave",this.#Ge))})),this.link.startDragging(),this.link.setDestinationLocation(e)}dragTo(e,t){this.link.setDestinationLocation(e)}endDrag(){if(this.#$e.forEach((e=>{e.removeEventListener("mouseenter",this.#Re),e.removeEventListener("mouseleave",this.#Ge)})),this.#$e=null,this.enteredPin&&this.linkValid){if(this.#Be){const e=this.#Be!==this.link.source?this.link.source:this.enteredPin;if(this.#Be.isInput()&&e.isInput()||this.#Be.isOutput()&&e.isOutput()){const e=this.#Be.template.getOppositePin();this.#Be===this.link.source?this.link.source=e:this.enteredPin=e}}else this.enteredPin.nodeElement.getType()===ae.paths.knot&&(this.#Be=this.enteredPin,this.link.source.isOutput()&&(this.enteredPin=this.enteredPin.template.getOppositePin()));this.link.source.getLinks().find((e=>e.equals(this.enteredPin.createPinReference())))?this.link.remove():(this.blueprint.addGraphElement(this.link),this.link.destination=this.enteredPin)}else this.link.remove();this.enteredPin=null,this.link.removeMessage(),this.link.finishDragging(),this.link=null}}class Qt extends Kt{#Ve=!1;#He=!1;displayName="";static nodeStyleClasses=["ueb-node-style-glass"];initialize(e){super.initialize(e),this.displayName=this.element.nodeDisplayName}render(){return z`
${this.displayName?z`
${this.displayName}
`:F} ${this.#Ve?z`
`:F} ${this.#He?z`
`:F} ${this.pinInserter?z`
Add pin ${ce.plusCircle}
`:F}
`}createPinElements(){return this.element.getPinEntities().filter((e=>!e.isHidden())).map((e=>{this.#Ve||=e.isInput(),this.#He||=e.isOutput();return Le.getConstructor("ueb-pin").newObject(e,void 0,this.element)}))}}class Jt extends Qt{static nodeStyleClasses=["ueb-node-style-metasound","ueb-node-style-operation"]}class ei extends Qt{static nodeStyleClasses=[...super.nodeStyleClasses,"ueb-node-style-conversion"]}class ti extends Qt{static nodeStyleClasses=[...super.nodeStyleClasses,"ueb-node-style-operation"]}class ii extends $t{static canWrapInput=!0;#ze;get iconElement(){return this.#ze}#_e;get wrapperElement(){return this.#_e}isNameRendered=!0;initialize(e){if(super.initialize(e),this.element.nodeElement){const e=this.element.nodeElement.template;this.isNameRendered=!(e instanceof ei||e instanceof ti||e instanceof Jt)}}setup(){super.setup(),this.element.nodeElement=this.element.closest("ueb-node");const e=this.element.nodeElement.template;(e instanceof ei||e instanceof ti)&&(this.isNameRendered=!1,this.element.requestUpdate())}createInputObjects(){return[new Zt(this.element,this.blueprint,{moveEverywhere:!0,draggableElement:this.getClickableElement()})]}render(){const e=z`
${this.renderIcon()}
`,t=z`
${this.isNameRendered?this.renderName():F} ${this.isInputRendered()?this.renderInput():z``}
`;return z`
${this.element.isInput()?z`${e}${t}`:z`${t}${e}`}
`}renderIcon(){if(this.element.nodeElement.entity.isPcg())switch(this.element.entity.getType()){case"Any":return ce.pcgPin;case"Param":case"Param[]":return ce.pcgParamPin;case"Spatial":case"Spatial[]":return ce.pcgSpatialPin;case"Any[]":case"Point[]":case"Surface[]":case"Volume[]":if(this.element.isOutput())return ce.pcgPin;case"Point":case"Surface":case"Volume":return ce.pcgStackPin}switch(this.element.entity.PinType.ContainerType?.toString()){case"Array":return ce.arrayPin;case"Set":return ce.setPin;case"Map":return ce.mapPin}return"delegate"===this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase()?ce.delegate:this.element.nodeElement?.template instanceof ti?ce.operationPin:"statictype"===this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase()?ce.staticPin:ce.genericPin}renderName(){let e=this.element.getPinDisplayName();const t=this.element.nodeElement,i=this.element.getPinName();return t.getType()==ae.paths.makeStruct&&i==t.entity.StructType.getName()&&(e=i),z`${e}`}isInputRendered(){return this.element.isInput()&&!this.element.entity.bDefaultValueIsIgnored?.valueOf()&&!this.element.entity.PinType.bIsReference?.valueOf()}renderInput(){return z``}updated(e){if(super.updated(e),this.element.isInput()&&e.has("isLinked")){const e=this.element.nodeElement;this.element.requestUpdate(),this.element.updateComplete.then((()=>e.acknowledgeReflow()))}}firstUpdated(e){super.firstUpdated(e),this.element.style.setProperty("--ueb-pin-color-rgb",this.element.entity.pinColor().cssText),this.#ze=this.element.querySelector(".ueb-pin-icon svg")??this.element,this.#_e=this.element.querySelector(".ueb-pin-wrapper")}getLinkLocation(){const e=this.iconElement.getBoundingClientRect(),t=[this.element.isInput()?e.left:e.right+1,(e.top+e.bottom)/2],i=oe.convertLocation(t,this.blueprint.template.gridElement);return this.blueprint.compensateTranslation(i[0],i[1])}getClickableElement(){return this.#_e??this.element}}class si extends ii{render(){return z`
${this.renderIcon()}
`}}class ri extends Kt{static nodeStyleClasses=[...super.nodeStyleClasses,"ueb-node-style-event"];#Fe;firstUpdated(e){super.firstUpdated(e),this.element.querySelector(".ueb-node-top").appendChild(this.createDelegatePinElement())}renderTop(){const e=this.renderNodeIcon(),t=this.renderNodeName(),i=this.element.getType()===ae.paths.customEvent&&(this.element.entity.CustomFunctionName||this.element.entity.FunctionReference.MemberParent);return z`
${e?z`
${e}
`:F} ${t?z`
${t} ${i?z`
Custom Event
`:F}
`:F}
`}getPinElements(){return this.element.getPinElements().filter((e=>"delegate"!==e.entity.PinType.PinCategory?.toString()))}createDelegatePinElement(){return this.#Fe||(this.#Fe=Le.getConstructor("ueb-pin").newObject(this.element.getPinEntities().find((e=>!e.isHidden()&&"delegate"===e.PinType.PinCategory?.toString())),new si,this.element),this.#Fe.template.isNameRendered=!1),this.#Fe}createPinElements(){return[this.createDelegatePinElement(),...this.element.getPinEntities().filter((e=>!e.isHidden()&&"delegate"!==e.PinType.PinCategory?.toString())).map((e=>Le.getConstructor("ueb-pin").newObject(e,void 0,this.element)))]}}class ni extends si{render(){return this.element.isOutput()?super.render():z``}getOppositePin(){const e=this.element.nodeElement.template;return this.element.isOutput()?e.inputPin:e.outputPin}getLinkLocation(){const e=(this.element.isInput()?this.element.nodeElement.template.outputPin.template:this).iconElement.getBoundingClientRect(),t=[this.element.isInput()?e.left:e.right+1,(e.top+e.bottom)/2],i=oe.convertLocation(t,this.blueprint.template.gridElement);return this.blueprint.compensateTranslation(i[0],i[1])}}class ai extends Kt{static#je=new Set;#Ue=null;#Ye;get inputPin(){return this.#Ye}#qe;get outputPin(){return this.#qe}initialize(e){super.initialize(e),this.element.classList.add("ueb-node-style-minimal")}findDirectionaPin(e){if(e.nodeElement.getType()!==ae.paths.knot||ai.#je.has(e))return ai.#je.clear(),!0;ai.#je.add(e);for(let t of e.getLinks().map((e=>this.blueprint.getPin(e))))if(this.findDirectionaPin(t))return!0;return!1}render(){return z`
`}setupPins(){for(const e of this.getPinElements())this.element.querySelector(".ueb-node-border").appendChild(e)}createPinElements(){const e=this.element.getPinEntities().filter((e=>!e.isHidden())),t=e[e[0].isInput()?0:1],i=e[e[0].isOutput()?0:1],s=Le.getConstructor("ueb-pin");return[this.#Ye=s.newObject(t,new ni,this.element),this.#qe=s.newObject(i,new ni,this.element)]}linksChanged(){}}class oi extends Kt{static nodeStyleClasses=["ueb-node-style-metasound"]}class li extends Qt{initialize(e){super.initialize(e);const t=e.getType();t===ae.paths.variableGet||t===ae.paths.self?(this.element.classList.add("ueb-node-style-getter"),this.displayName=""):t===ae.paths.variableSet&&this.element.classList.add("ueb-node-style-setter")}setupPins(){super.setupPins();let e=this.element.getPinElements().find((e=>!e.entity.isHidden()&&!e.entity.isExecution()));this.element.style.setProperty("--ueb-node-color",e.getColor().cssText)}}const ci=["Boolean::LogicEq","Boolean::LogicNEq","Integer::EnumNEq","Integer::EnumEq",...["Abs","Add","ArcCosine(Degrees)","ArcCosine(Radians)","ArcSine(Degrees)","ArcSine(Radians)","ArcTangent(Degrees)","ArcTangent(Radians)","Ceil","CmpEQ","CmpGE","CmpGT","CmpLE","CmpLT","CmpNEQ","Cosine(Degrees)","Cosine(Radians)","DegreesToRadians","Div","Dot","Exp","Exp2","Floor","FMod","Frac","Length","Lerp","Log","Log2","Madd","Max","Min","Mul","Negate","Normalize","OneMinus","PI","RadiansToDegrees","Rcp","RcpFast","Round","RSqrt","Sign","Sine(Degrees)","Sine(Radians)","Sqrt","Step","Subtract","Tangent(Degrees)","Tangent(Radians)","Trunc","TWO_PI"].map((e=>"Numeric::"+e)),"Vector3::Cross"],ui=ae.paths;function hi(e){if(e.getClass()===ui.callFunction||e.getClass()===ui.commutativeAssociativeBinaryOperator||e.getClass()===ui.callArrayFunction){const t=e.FunctionReference?.MemberParent?.path??"",i=e.FunctionReference?.MemberName?.toString();if(i&&(t===ui.kismetMathLibrary||t===ui.kismetArrayLibrary)){if(i.startsWith("Conv_"))return ei;if(i.startsWith("Add_")||i.startsWith("And_")||i.startsWith("Boolean")||i.startsWith("Cross_")||i.startsWith("Dot_")||i.startsWith("Not_")||i.startsWith("Or_")||i.startsWith("Percent_")||i.startsWith("Xor_"))return ti;switch(i){case"Abs":case"Array_Add":case"Array_AddUnique":case"Array_Identical":case"BMax":case"BMin":case"CrossProduct2D":case"DotProduct2D":case"Exp":case"FMax":case"FMin":case"GetPI":case"Max":case"MaxInt64":case"Min":case"MinInt64":case"Sqrt":case"Square":case"Vector4_CrossProduct3":case"Vector4_DotProduct":case"Vector4_DotProduct3":case"Acos":case"Asin":case"Cos":case"DegAcos":case"DegCos":case"DegSin":case"DegTan":case"Sin":case"Tan":return ti}}if(t===ui.blueprintSetLibrary)return ti;if(t===ui.blueprintMapLibrary)return ti}switch(e.getClass()){case ui.comment:case ui.materialGraphNodeComment:return Wt;case ui.createDelegate:return Kt;case ui.metasoundEditorGraphExternalNode:return"Add"==e.ClassName?.Name?Jt:oi;case ui.niagaraNodeOp:if(ci.includes(e.OpName?.toString()))return ti;break;case ui.promotableOperator:return ti;case ui.knot:return ai;case ui.literal:case ui.self:case ui.variableGet:case ui.variableSet:return li}return e.isEvent()?ri:Kt}class pi extends Ht{static properties={...super.properties,selected:{type:Boolean,attribute:"data-selected",reflect:!0,converter:Ae.booleanConverter}};dragHandler=e=>this.addLocation(...e.detail.value);constructor(){super(),this.selected=!1,this.listeningDrag=!1}setup(){super.setup(),this.setSelected(this.selected)}cleanup(){super.cleanup(),this.blueprint.removeEventListener(ae.nodeDragGeneralEventName,this.dragHandler)}setSelected(e=!0){this.selected=e,this.blueprint&&(this.selected?(this.listeningDrag=!0,this.blueprint.addEventListener(ae.nodeDragGeneralEventName,this.dragHandler)):(this.blueprint.removeEventListener(ae.nodeDragGeneralEventName,this.dragHandler),this.listeningDrag=!1))}}class di extends pi{static properties={...pi.properties,typePath:{type:String,attribute:"data-type",reflect:!0},nodeTitle:{type:String,attribute:"data-title",reflect:!0},advancedPinDisplay:{type:String,attribute:"data-advanced-display",converter:et.attributeConverter,reflect:!0},enabledState:{type:String,attribute:"data-enabled-state",reflect:!0},nodeDisplayName:{type:String,attribute:!1},pureFunction:{type:Boolean,converter:Ae.booleanConverter,attribute:"data-pure-function",reflect:!0}};static dragEventName=ae.nodeDragEventName;static dragGeneralEventName=ae.nodeDragGeneralEventName;get blueprint(){return super.blueprint}set blueprint(e){super.blueprint=e,this.#Ke.forEach((t=>t.blueprint=e))}#Xe;get nodeNameElement(){return this.#Xe}set nodeNameElement(e){this.#Xe=e}#Ke=[];boundComments=[];#We=!1;#Ze=e=>{this.selected||this.#We||(this.#We=!0,this.requestUpdate(),this.updateComplete.then((()=>this.#We=!1)),this.addLocation(...e.detail.value))};static fromSerializedObject(e){e=e.trim();let t=Pt.grammar.parse(e);return di.newObject(t)}static newObject(e=new Pt,t=new(hi(e))){const i=new di;return i.initialize(e,t),i}#Qe(e){for(let t of this.getPinElements())for(let i of t.getLinks())this.blueprint.getPin(i).redirectLink(t,new lt(new et(e),t.entity.PinId))}initialize(e=new Pt,t=new(hi(e))){this.typePath=e.getType(),this.nodeTitle=e.getObjectName(),this.advancedPinDisplay=e.AdvancedPinDisplay?.toString(),this.enabledState=e.EnabledState,this.nodeDisplayName=_e(e),this.pureFunction=e.bIsPureFunc?.valueOf(),this.dragLinkObjects=[],super.initialize(e,t),this.#Ke=this.template.createPinElements(),super.setLocation(this.entity.getNodePosX(),this.entity.getNodePosY()),this.entity.NodeWidth&&this.entity.NodeHeight?(this.sizeX=this.entity.NodeWidth.value,this.sizeY=this.entity.NodeHeight.value):this.updateComplete.then((()=>this.computeSizes())),e.listenAttribute("Name",(t=>{this.#Qe(t.value),this.nodeTitle=t.value,this.nodeDisplayName=_e(e)}))}async getUpdateComplete(){let e=await super.getUpdateComplete();for(const t of this.getPinElements())e&&=await t.updateComplete;return e}bindToComment(e){e==this||this.boundComments.includes(e)||(e.addEventListener(ae.nodeDragEventName,this.#Ze),this.boundComments.push(e))}unbindFromComment(e){const t=this.boundComments.indexOf(e);t>=0&&(e.removeEventListener(ae.nodeDragEventName,this.#Ze),this.boundComments[t]=this.boundComments[this.boundComments.length-1],this.boundComments.pop())}isInsideComment(e){return this.topBoundary()>=e.topBoundary()&&this.rightBoundary()<=e.rightBoundary()&&this.bottomBoundary()<=e.bottomBoundary()&&this.leftBoundary()>=e.leftBoundary()}getType(){return this.entity.getType()}getNodeName(){return this.entity.getObjectName()}computeNodeDisplayName(){this.nodeDisplayName=_e(this.entity)}setNodeWidth(e){this.entity.setNodeWidth(e),this.sizeX=e,this.acknowledgeReflow()}setNodeHeight(e){this.entity.setNodeHeight(e),this.sizeY=e,this.acknowledgeReflow()}sanitizeLinks(e=[]){this.getPinElements().forEach((t=>t.sanitizeLinks(e)))}getPinElements(){return this.#Ke}getPinEntities(){return this.entity.getPinEntities()}setLocation(e=0,t=0,i=!0){this.entity.setNodePosX(e),this.entity.setNodePosY(t),super.setLocation(e,t,i)}acknowledgeReflow(){this.requestUpdate(),this.updateComplete.then((()=>this.computeSizes()));let e=new CustomEvent(ae.nodeReflowEventName);this.dispatchEvent(e)}setShowAdvancedPinDisplay(e){this.entity.AdvancedPinDisplay=new et(e?"Shown":"Hidden"),this.advancedPinDisplay=this.entity.AdvancedPinDisplay}toggleShowAdvancedPinDisplay(){this.setShowAdvancedPinDisplay("Shown"!=this.entity.AdvancedPinDisplay?.toString())}}class mi extends Pt{#Je=new Map;#et=new Set;#tt=[];get objectEntities(){return this.#tt}static attributes={...super.attributes,ScriptVariables:super.attributes.ScriptVariables.asUniqueClass(!0).withDefault()};getHomonymObjectEntity(e){const t=e.getObjectName();return this.#tt.find((e=>e.getObjectName()==t))}takeFreeName(e){e=e.replace(/_\d+$/,"");const t=(this.#Je.get(e)??-1)+1;return this.#Je.set(e,t),ae.nodeTitle(e,t)}addObjectEntity(e){if(!this.#tt.includes(e)){this.#tt.push(e);const[t,i]=e.getNameAndCounter();return this.#Je.set(t,Math.max(this.#Je.get(t)??0,i)),!0}return!1}removeObjectEntity(e){const t=this.#tt.indexOf(e);if(t>=0){const e=this.#tt.pop();return t{let i=this[ae.subObjectAttributeNameFromReference(e,t)];i.Name.value=s,i.Name=i.Name})),e.path.replace(i,s)}mergeWith(e){if(0===(e.ScriptVariables?.length??0))return this;let t=oe.mergeArrays(this.ScriptVariables.valueOf(),e.ScriptVariables.valueOf(),((e,t)=>e.OriginalChangeId.value==t.OriginalChangeId.value),(t=>{const i=t.ScriptVariable.getName();this.#et.has(i)&&this.renameScriptVariable(t.ScriptVariable,e)}));if(t.length===this.ScriptVariables.length)return this;t.reverse();const i=t.concat(t).map(((i,s)=>{const r=ae.subObjectAttributeNameFromReference(i.ScriptVariable,s>=t.length),n=this[r]??e[r];return n?[r,n]:null})).filter((e=>e));return i.push(...Object.entries(this).filter((([e,t])=>!e.startsWith(ae.subObjectAttributeNamePrefix)&&"ExportedNodes"!==e)),["ScriptVariables",new mi.attributes.ScriptVariables(t.reverse())]),new mi(Object.fromEntries(i))}getVariablesAttributesReferringTo(...e){let t=new Set(...e.flatMap((e=>e.getPinEntities())).map((e=>e.PinName.toString())));return this.ScriptVariables.valueOf().map((e=>{const t=ae.subObjectAttributeNameFromReference(e.ScriptVariable,!1),i=ae.subObjectAttributeNameFromReference(e.ScriptVariable,!0);return{simple:[t,this[t]],full:[i,this[i]],variable:e}})).filter((e=>t.has(e.full?.Variable?.Name))).reduce(((e,t)=>(e.simple.push([t.simple[0],t.simple[1]]),e.full.push([t.full[0],t.full[1]]),e.ScriptVariables.push(t.variable),e)),{simple:[],full:[],ScriptVariables:[]}),{}}}class gi extends Pt{constructor(e,t){const i=ae.paths.niagaraClipboardContent,s=e.takeFreeName("NiagaraClipboardContent"),r=`/Engine/Transient.${s}`;let n="";for(const e of t)e.exported&&(n+=e.serialize());t.filter((e=>!e.exported)).map((e=>e.serialize())),super({Class:new ot(i),Name:new Qe(s),ExportPath:new ot(i,r),ExportedNodes:new Qe(btoa(n))})}}class bi extends At{#it;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let s=this;this.#it=()=>s.copied()}listenEvents(){window.addEventListener("copy",this.#it)}unlistenEvents(){window.removeEventListener("copy",this.#it)}copied(){const e=this.blueprint.getSerializedText();return navigator.clipboard.writeText(e),e}}class vi extends At{#st;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let s=this;this.#st=()=>s.cut()}listenEvents(){window.addEventListener("cut",this.#st)}unlistenEvents(){window.removeEventListener("cut",this.#st)}cut(){this.blueprint.template.getCopyInputObject().copied(),this.blueprint.removeGraphElement(...this.blueprint.getNodes(!0))}}class fi extends At{#rt;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let s=this;this.#rt=e=>s.pasted(e.clipboardData.getData("Text"))}listenEvents(){window.addEventListener("paste",this.#rt)}unlistenEvents(){window.removeEventListener("paste",this.#rt)}pasted(e){let t=0,i=0,s=0,r=Pt.grammarMultipleObjects.parse(e).map((e=>{let r=Le.getConstructor("ueb-node").newObject(e);return t+=r.locationY,i+=r.locationX,++s,r}));t/=s,i/=s,r.length>0&&this.blueprint.unselectAll();let n=this.blueprint.mousePosition;for(const e of r)e.addLocation(n[0]-i,n[1]-t),e.snapToGrid(),e.setSelected(!0);return this.blueprint.addGraphElement(...r),r}}class yi extends Tt{static#K=e=>{};#nt=0;get variation(){return this.#nt}#at=e=>{this.enablerKey&&!this.enablerActivated||(e.preventDefault(),this.#nt=e.deltaY,this.setLocationFromEvent(e),this.wheel())};#ot=e=>e.preventDefault();constructor(e,t,i={},s=yi.#K){i.listenOnFocus=!0,i.strictTarget??=!1,super(e,t,i),this.strictTarget=i.strictTarget,this.onWheel=s}listenEvents(){this.movementSpace.addEventListener("wheel",this.#at,!1),this.movementSpace.parentElement?.addEventListener("wheel",this.#ot)}unlistenEvents(){this.movementSpace.removeEventListener("wheel",this.#at,!1),this.movementSpace.parentElement?.removeEventListener("wheel",this.#ot)}wheel(){this.onWheel(this)}}class wi extends yi{#lt=0;#ct=!1;get enableZoonIn(){return this.#ct}set enableZoonIn(e){e!=this.#ct&&(this.#ct=e)}wheel(){if(this.#lt+=-this.variation,Math.abs(this.#lt)0||(e+=Math.sign(this.#lt),this.blueprint.setZoom(e,this.location),this.#lt=0)}}class Si extends Mt{#ut;constructor(e,t,i={}){i.activationKeys=Dt.enableZoomIn,super(e,t,i)}fire(){this.#ut=this.blueprint.template.getZoomInputObject(),this.#ut.enableZoonIn=!0}unfire(){this.#ut.enableZoonIn=!1}}class Ei extends zt{startDrag(){this.blueprint.scrolling=!0}dragTo(e,t){this.blueprint.scrollDelta(-t[0],-t[1])}endDrag(){this.blueprint.scrolling=!1}}class Ci extends Tt{#ht=null;#pt=e=>{e.preventDefault(),this.setLocationFromEvent(e),this.blueprint.mousePosition=[...this.location]};#dt=e=>{this.#ht||(e.preventDefault(),this.#ht=e.detail.tracker,this.unlistenMouseMove())};#mt=e=>{this.#ht==e.detail.tracker&&(e.preventDefault(),this.#ht=null,this.listenMouseMove())};constructor(e,t,i={}){i.listenOnFocus=!0,super(e,t,i)}listenMouseMove(){this.target.addEventListener("mousemove",this.#pt)}unlistenMouseMove(){this.target.removeEventListener("mousemove",this.#pt)}listenEvents(){this.listenMouseMove(),this.blueprint.addEventListener(ae.trackingMouseEventName.begin,this.#dt),this.blueprint.addEventListener(ae.trackingMouseEventName.end,this.#mt)}unlistenEvents(){this.unlistenMouseMove(),this.blueprint.removeEventListener(ae.trackingMouseEventName.begin,this.#dt),this.blueprint.removeEventListener(ae.trackingMouseEventName.end,this.#mt)}}class Ni extends zt{constructor(e,t,i={}){i.scrollGraphEdge??=!0,super(e,t,i),this.selectorElement=this.blueprint.template.selectorElement}startDrag(){this.selectorElement.beginSelect(this.clickedPosition)}dragTo(e,t){this.selectorElement.selectTo(e)}endDrag(){this.started&&this.selectorElement.endSelect()}unclicked(){this.started||this.blueprint.unselectAll()}}class xi extends At{#gt=e=>this.clickedSomewhere(e.target);constructor(e,t,i={}){i.listenOnFocus=!0,super(e,t,i),this.blueprint.focus&&document.addEventListener("click",this.#gt)}clickedSomewhere(e){e.closest("ueb-blueprint")||this.blueprint.setFocused(!1)}listenEvents(){document.addEventListener("click",this.#gt)}unlistenEvents(){document.removeEventListener("click",this.#gt)}}class Pi extends $t{static styleVariables={"--ueb-font-size":`${ae.fontSize}`,"--ueb-grid-axis-line-color":`${ae.gridAxisLineColor}`,"--ueb-grid-expand":`${ae.expandGridSize}px`,"--ueb-grid-line-color":`${ae.gridLineColor}`,"--ueb-grid-line-width":`${ae.gridLineWidth}px`,"--ueb-grid-set-line-color":`${ae.gridSetLineColor}`,"--ueb-grid-set":`${ae.gridSet}`,"--ueb-grid-size":`${ae.gridSize}px`,"--ueb-link-min-width":`${ae.linkMinWidth}`,"--ueb-node-radius":`${ae.nodeRadius}px`};#bt=new ResizeObserver((e=>{const t=e.find((e=>e.target===this.viewportElement))?.devicePixelContentBoxSize?.[0];t&&(this.viewportSize[0]=t.inlineSize,this.viewportSize[1]=t.blockSize)}));#vt;#ft;#ut;headerElement;overlayElement;viewportElement;selectorElement;gridElement;linksContainerElement;nodesContainerElement;viewportSize=[0,0];#yt=()=>this.headerElement.classList.remove("ueb-zoom-changed");initialize(e){super.initialize(e),this.element.style.cssText=Object.entries(Pi.styleVariables).map((([e,t])=>`${e}:${t};`)).join("");const t=this.element.querySelector(":scope > template")?.content.textContent;t&&(this.element.requestUpdate(),this.element.updateComplete.then((()=>{this.blueprint.mousePosition=[Math.round(this.viewportSize[0]/2),Math.round(this.viewportSize[1]/2)],this.getPasteInputObject().pasted(t),this.blueprint.unselectAll()})))}setup(){super.setup(),this.#bt.observe(this.viewportElement,{box:"device-pixel-content-box"});const e=this.viewportElement.getBoundingClientRect();this.viewportSize[0]=e.width,this.viewportSize[1]=e.height,this.blueprint.nodes.length>0&&(this.blueprint.requestUpdate(),this.blueprint.updateComplete.then((()=>this.centerContentInViewport())))}cleanup(){super.cleanup(),this.#bt.unobserve(this.viewportElement)}createInputObjects(){const e=this.element.getGridDOMElement();return this.#vt=new bi(e,this.blueprint),this.#ft=new fi(e,this.blueprint),this.#ut=new wi(e,this.blueprint),[...super.createInputObjects(),this.#vt,this.#ft,this.#ut,new vi(e,this.blueprint),new Mt(e,this.blueprint,{activationKeys:Dt.duplicateNodes},(()=>this.blueprint.template.getPasteInputObject().pasted(this.blueprint.template.getCopyInputObject().copied()))),new Mt(e,this.blueprint,{activationKeys:Dt.deleteNodes},(()=>this.blueprint.removeGraphElement(...this.blueprint.getNodes(!0)))),new Mt(e,this.blueprint,{activationKeys:Dt.selectAllNodes},(()=>this.blueprint.selectAll())),new Ni(e,this.blueprint,{clickButton:ae.mouseClickButton,exitAnyButton:!0,moveEverywhere:!0}),new Ei(e,this.blueprint,{clickButton:ae.mouseRightClickButton,exitAnyButton:!1,moveEverywhere:!0}),new xi(e,this.blueprint),new Ci(e,this.blueprint),new Si(e,this.blueprint)]}render(){return z`
Zoom ${0==this.blueprint.zoom?"1:1":(this.blueprint.zoom>0?"+":"")+this.blueprint.zoom}
`}firstUpdated(e){super.firstUpdated(e),this.headerElement=this.blueprint.querySelector(".ueb-viewport-header"),this.overlayElement=this.blueprint.querySelector(".ueb-viewport-overlay"),this.viewportElement=this.blueprint.querySelector(".ueb-viewport-body"),this.selectorElement=this.blueprint.querySelector("ueb-selector"),this.gridElement=this.viewportElement.querySelector(".ueb-grid"),this.linksContainerElement=this.blueprint.querySelector("[data-links]"),this.linksContainerElement.append(...this.blueprint.getLinks()),this.nodesContainerElement=this.blueprint.querySelector("[data-nodes]"),this.nodesContainerElement.append(...this.blueprint.getNodes()),this.viewportElement.scroll(ae.expandGridSize,ae.expandGridSize)}willUpdate(e){super.willUpdate(e),this.headerElement&&e.has("zoom")&&(this.headerElement.classList.contains("ueb-zoom-changed")&&(this.headerElement.classList.remove("ueb-zoom-changed"),this.headerElement.offsetWidth),this.headerElement.classList.add("ueb-zoom-changed"),this.headerElement.addEventListener("animationend",this.#yt,{once:!0}))}updated(e){if(super.updated(e),(e.has("scrollX")||e.has("scrollY"))&&this.viewportElement.scroll(this.blueprint.scrollX,this.blueprint.scrollY),e.has("zoom")){this.blueprint.style.setProperty("--ueb-scale",this.blueprint.getScale());const t=e.get("zoom"),i=Math.min(t,this.blueprint.zoom),s=Math.max(t,this.blueprint.zoom),r=oe.range(i,s),n=e=>`ueb-zoom-${e}`;te<0)).map(n)),this.blueprint.classList.add(...r.filter((e=>e>0)).map(n))):(this.blueprint.classList.remove(...r.filter((e=>e>0)).map(n)),this.blueprint.classList.add(...r.filter((e=>e<0)).map(n)))}}getCommentNodes(e=!1){return this.blueprint.querySelectorAll(`ueb-node[data-type="${ae.paths.comment}"]${e?'[data-selected="true"]':""}, ueb-node[data-type="${ae.paths.materialGraphNodeComment}"]${e?'[data-selected="true"]':""}`)}getPin(e){return this.blueprint.querySelector(`ueb-node[data-title="${e.objectName}"] ueb-pin[data-id="${e.pinGuid}"]`)}getCopyInputObject(){return this.#vt}getPasteInputObject(){return this.#ft}getZoomInputObject(){return this.#ut}isPointVisible(e,t){return!1}gridTopVisibilityBoundary(){return this.blueprint.scaleCorrect(this.blueprint.scrollY)-this.blueprint.translateY}gridRightVisibilityBoundary(){return this.gridLeftVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[0])}gridBottomVisibilityBoundary(){return this.gridTopVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[1])}gridLeftVisibilityBoundary(){return this.blueprint.scaleCorrect(this.blueprint.scrollX)-this.blueprint.translateX}centerViewport(e=0,t=0,i=!0){const s=this.gridLeftVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[0]/2),r=this.gridTopVisibilityBoundary()+this.blueprint.scaleCorrect(this.viewportSize[1]/2);this.blueprint.scrollDelta(this.blueprint.scaleCorrectReverse(e-s),this.blueprint.scaleCorrectReverse(t-r),i)}centerContentInViewport(e=!0){let t=0,i=0,s=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;const o=this.blueprint.getNodes();for(const e of o)t+=e.leftBoundary()+e.rightBoundary(),i+=e.topBoundary()+e.bottomBoundary(),s=Math.min(s,e.leftBoundary()),r=Math.max(r,e.rightBoundary()),n=Math.min(n,e.topBoundary()),a=Math.max(a,e.bottomBoundary());t=Math.round(r-s<=this.viewportSize[0]?(r+s)/2:t/(2*o.length)),i=Math.round(a-n<=this.viewportSize[1]?(a+n)/2:i/(2*o.length)),this.centerViewport(t,i,e)}}class ki extends le{static properties={selecting:{type:Boolean,attribute:"data-selecting",reflect:!0,converter:Ae.booleanConverter},scrolling:{type:Boolean,attribute:"data-scrolling",reflect:!0,converter:Ae.booleanConverter},focused:{type:Boolean,attribute:"data-focused",reflect:!0,converter:Ae.booleanConverter},zoom:{type:Number,attribute:"data-zoom",reflect:!0},scrollX:{type:Number,attribute:!1},scrollY:{type:Number,attribute:!1},additionalX:{type:Number,attribute:!1},additionalY:{type:Number,attribute:!1},translateX:{type:Number,attribute:!1},translateY:{type:Number,attribute:!1}};static nodeBoundariesSupplier=e=>({primaryInf:e.leftBoundary(!0),primarySup:e.rightBoundary(!0),secondaryInf:e.topBoundary(!0),secondarySup:e.bottomBoundary(!0)});static nodeSelectToggleFunction=(e,t)=>{e.setSelected(t)};#wt=0;#St=0;nodes=[];links=[];nodesNames=new Map;mousePosition=[0,0];waitingExpandUpdate=!1;constructor(){super(),this.selecting=!1,this.scrolling=!1,this.focused=!1,this.zoom=0,this.scrollX=ae.expandGridSize,this.scrollY=ae.expandGridSize,this.translateX=ae.expandGridSize,this.translateY=ae.expandGridSize,super.initialize(new mi,new Pi)}initialize(){}getGridDOMElement(){return this.template.gridElement}getScroll(){return[this.scrollX,this.scrollY]}setScroll(e,t){this.scrollX=e,this.scrollY=t}scrollDelta(e=0,t=0,i=!1,s=ae.smoothScrollTime){if(i){let i=[0,0];this.#wt&&cancelAnimationFrame(this.#wt),this.#St&&cancelAnimationFrame(this.#St),oe.animate(0,e,s,(e=>{this.scrollDelta(e-i[0],0,!1),i[0]=e}),(e=>this.#wt=e)),oe.animate(0,t,s,(e=>{this.scrollDelta(0,e-i[1],!1),i[1]=e}),(e=>this.#St=e))}else{const i=[2*ae.expandGridSize,2*ae.expandGridSize];let s=this.getScroll(),r=[s[0]+e,s[1]+t],n=[0,0];for(let e=0;e<2;++e)r[e]i[e]-ae.gridExpandThreshold*ae.expandGridSize&&(n[e]=1);0==n[0]&&0==n[1]||this.seamlessExpand(n[0],n[1]),s=this.getScroll(),r=[s[0]+e,s[1]+t],this.setScroll(r[0],r[1])}}scrollCenter(e=!1){const t=this.getScroll(),i=[this.translateX-t[0],this.translateY-t[1]],s=this.getViewportSize().map((e=>e/2)),r=[i[0]-s[0],i[1]-s[1]];this.scrollDelta(r[0],r[1],e)}getViewportSize(){return[this.template.viewportElement.clientWidth,this.template.viewportElement.clientHeight]}getScrollMax(){return[this.template.viewportElement.scrollWidth-this.template.viewportElement.clientWidth,this.template.viewportElement.scrollHeight-this.template.viewportElement.clientHeight]}snapToGrid(e,t){return oe.snapToGrid(e,t,ae.gridSize)}seamlessExpand(e,t){e=Math.round(e),t=Math.round(t);let i=this.getScale();[e,t]=[-e*ae.expandGridSize,-t*ae.expandGridSize],0!=e&&(this.scrollX+=e,e/=i),0!=t&&(this.scrollY+=t,t/=i),this.translateX+=e,this.translateY+=t}progressiveSnapToGrid(e){return ae.expandGridSize*Math.round(e/ae.expandGridSize+.5*Math.sign(e))}getZoom(){return this.zoom}setZoom(e,t){if((e=oe.clamp(e,ae.minZoom,ae.maxZoom))==this.zoom)return;let i=this.getScale();if(this.zoom=e,t){t[0]+=this.translateX,t[1]+=this.translateY;let e=this.getScale()/i,s=[e*t[0],e*t[1]];this.scrollDelta((s[0]-t[0])*i,(s[1]-t[1])*i)}}getScale(){return ae.scale[this.getZoom()]}scaleCorrect(e){return e/this.getScale()}scaleCorrectReverse(e){return e*this.getScale()}compensateTranslation(e,t){return[e-=this.translateX,t-=this.translateY]}getNodes(e=!1){let t=this.nodes;return e&&(t=t.filter((e=>e.selected))),t}getCommentNodes(e=!1){let t=[...this.template.getCommentNodes(e)];return 0===t.length&&(t=this.nodes.filter((t=>t.getType()===ae.paths.comment&&(!e||t.selected)))),t}getPin(e){let t=this.template.getPin(e);return t&&t.nodeElement.getNodeName()==e.objectName.toString()||(t=[...this.nodes.find((t=>e.objectName.toString()==t.getNodeName()))?.getPinElements()??[]].find((t=>e.pinGuid.toString()==t.getPinId().toString()))),t}getLinks(e=null,t=null){if(null==e!=(null==t)){const i=e??t;return this.links.filter((e=>e.source==i||e.destination==i))}return null!=e&&null!=t?this.links.filter((i=>i.source==e&&i.destination==t||i.source==t&&i.destination==e)):this.links}getLink(e,t,i=!1){return this.links.find((s=>s.source==e&&s.destination==t||!i&&s.source==t&&s.destination==e))}selectAll(){this.getNodes().forEach((e=>ki.nodeSelectToggleFunction(e,!0)))}unselectAll(){this.getNodes().forEach((e=>ki.nodeSelectToggleFunction(e,!1)))}getSerializedText(){const e=this.blueprint.getNodes(!0).map((e=>e.entity));let t=!1,i=e.filter((e=>(t||=e.exported,!e.exported))).reduce(((e,t)=>e+t.serialize()),"");if(t){i=new gi(this.blueprint.entity,e).serialize()+i}return i}addGraphElement(...e){const t=e=>{const i=e.currentTarget;i.removeEventListener(ae.removeEventName,t);const[s,r]=i instanceof di?[this.nodes,i.entity]:i instanceof Vt?[this.links]:null,n=s?.indexOf(i);if(n>=0){const e=s.pop();ne.entity.exported=!0));continue}const e=i.entity.getObjectName(),s=this.entity.getHomonymObjectEntity(i.entity);if(s){const t=this.entity.takeFreeName(e);s.Name=new s.Name.constructor(t)}this.nodes.push(i),this.entity.addObjectEntity(i.entity),i.addEventListener(ae.removeEventName,t),this.template.nodesContainerElement?.appendChild(i)}else i instanceof Vt&&!this.links.includes(i)&&(this.links.push(i),i.addEventListener(ae.removeEventName,t),this.template.linksContainerElement&&!this.template.linksContainerElement.contains(i)&&this.template.linksContainerElement.appendChild(i));e.filter((e=>e instanceof di)).forEach((t=>t.sanitizeLinks(e))),e.filter((e=>e instanceof di&&e.getType()==ae.paths.comment)).forEach((e=>e.updateComplete.then((()=>e.template.manageNodesBind()))))}removeGraphElement(...e){for(let t of e){if(t.closest("ueb-blueprint")!==this)return;t.remove()}}setFocused(e=!0){if(this.focused==e)return;let t=new CustomEvent(e?ae.focusEventName.begin:ae.focusEventName.end);this.focused=e,this.focused||this.unselectAll(),this.dispatchEvent(t)}acknowledgeEditText(e){const t=new CustomEvent(e?ae.editTextEventName.begin:ae.editTextEventName.end);this.dispatchEvent(t)}}customElements.define("ueb-blueprint",ki);class Ai extends Ut{#Et;get locationChangeCallback(){return this.#Et}set locationChangeCallback(e){this.#Et=e}movementSpace;movementSpaceSize=[0,0];firstUpdated(e){super.firstUpdated(e),this.movementSpace=this.element.parentElement}setup(){super.setup();const e=this.movementSpace.getBoundingClientRect();this.movementSpaceSize=[e.width,e.height]}createDraggableObject(){return new _t(this.element,this.blueprint,{draggableElement:this.movementSpace,ignoreTranslateCompensate:!0,moveEverywhere:!0,movementSpace:this.movementSpace,repositionOnClick:!0,stepSize:1})}adjustLocation(e,t){return this.locationChangeCallback?.(e,t),[e,t]}}class Li extends Ai{adjustLocation(e,t){const i=Math.round(this.movementSpaceSize[0]/2);e-=i,t=-(t-i);let[s,r]=oe.getPolarCoordinates(e,t);return s=Math.min(s,i),[e,t]=oe.getCartesianCoordinates(s,r),this.locationChangeCallback?.(e/i,t/i),[e=Math.round(e+i),t=Math.round(-t+i)]}}class Mi extends Ht{windowElement;setup(){super.setup(),this.windowElement=this.closest("ueb-window")}setLocation(e,t){super.setLocation(...this.template.adjustLocation(e,t))}}class Ti extends Mi{constructor(){super(),super.initialize({},new Li)}static newObject(){return new Ti}initialize(){}}class Ii extends Ai{adjustLocation(e,t){return e=oe.clamp(e,0,this.movementSpaceSize[0]),t=oe.clamp(t,0,this.movementSpaceSize[1]),this.locationChangeCallback?.(e/this.movementSpaceSize[0],1-t/this.movementSpaceSize[1]),[e,t]}}class Oi extends Mi{constructor(){super(),super.initialize({},new Ii)}static newObject(){return new Oi}initialize(){}}class Di extends zt{constructor(e,t,i={}){i.consumeEvent=!0,super(e,t,i)}}class $i extends $t{#Ct;#Nt;#xt=e=>this.element.selectedOption=e.target.selectedOptions[0].value;render(){return z` `}firstUpdated(e){super.firstUpdated(e),this.#Ct=this.element.querySelector("select:first-child"),this.#Nt=this.element.querySelector("select:last-child");const t=new Event("input",{bubbles:!0});this.#Ct.dispatchEvent(t)}updated(e){super.updated(e);const t=this.#Nt.getBoundingClientRect();this.element.style.setProperty("--ueb-dropdown-width",t.width+"px")}createInputObjects(){return[...super.createInputObjects(),new Di(this.element,this.blueprint)]}setSelectedValue(e){this.element.querySelector(`option[value="${e}"]`).defaultSelected=!0}getSelectedValue(){return this.#Ct.value}}class Bi extends le{static properties={...super.properties,options:{type:Object},selectedOption:{type:String}};constructor(){super(),super.initialize({},new $i),this.options=[],this.selectedOption=""}static newObject(e){return new Bi}initialize(){}getValue(){return this.template.getSelectedValue()}}class Ri extends $t{#Pt=()=>{this.blueprint.acknowledgeEditText(!0),this.element.selectOnFocus&&getSelection().selectAllChildren(this.element)};#kt=()=>{this.blueprint.acknowledgeEditText(!1),getSelection().removeAllRanges()};#At=e=>e.target.querySelectorAll("br").forEach((e=>e.remove()));#Lt=e=>{"Enter"!=e.code||e.shiftKey||e.target.blur()};initialize(e){super.initialize(e),this.element.classList.add("ueb-pin-input-content"),this.element.setAttribute("role","textbox"),this.element.contentEditable="true"}firstUpdated(e){super.firstUpdated(e);const t=new Event("input",{bubbles:!0});this.element.dispatchEvent(t)}createInputObjects(){return[...super.createInputObjects(),new Di(this.element,this.blueprint)]}setup(){super.setup(),this.element.addEventListener("focus",this.#Pt),this.element.addEventListener("focusout",this.#kt),this.element.singleLine&&this.element.addEventListener("input",this.#At),this.element.blurOnEnter&&this.element.addEventListener("keydown",this.#Lt)}cleanup(){super.cleanup(),this.element.removeEventListener("focus",this.#Pt),this.element.removeEventListener("focusout",this.#kt),this.element.removeEventListener("input",this.#At),this.element.removeEventListener("keydown",this.#Lt)}}class Gi extends le{static properties={...super.properties,singleLine:{type:Boolean,attribute:"data-single-line",converter:Ae.booleanConverter,reflect:!0},selectOnFocus:{type:Boolean,attribute:"data-select-focus",converter:Ae.booleanConverter,reflect:!0},blurOnEnter:{type:Boolean,attribute:"data-blur-enter",converter:Ae.booleanConverter,reflect:!0}};constructor(){super(),this.singleLine=!1,this.selectOnFocus=!0,this.blurOnEnter=!0,super.initialize({},new Ri)}static newObject(){return new Gi}initialize(){}}class Vi extends ii{#Mt;#Tt=()=>{const e=this.element.getDefaultValue(!0);e.value=this.#Mt.checked,this.element.setDefaultValue(e)};firstUpdated(e){super.firstUpdated(e),this.#Mt=this.element.querySelector(".ueb-pin-input")}setup(){super.setup(),this.#Mt?.addEventListener("change",this.#Tt)}cleanup(){super.cleanup(),this.#Mt?.removeEventListener("change",this.#Tt)}createInputObjects(){return[...super.createInputObjects(),new Di(this.#Mt,this.blueprint)]}renderInput(){return z``}}class Hi extends ii{static singleLineInput=!1;static selectOnFocus=!0;static saveEachInputChange=!1;#It;get inputWrapper(){return this.#It}#Ot;static stringFromInputToUE(e){return e.replace(/(?=\n\s*)\n$/,"")}static stringFromUEToInput(e){return e.replaceAll(/(?:\r|(?<=(?:^|[^\\])(?:\\\\)*)\\r)(?=\n)/g,"").replace(/(?<=\n\s*)$/,"\n")}#Dt=()=>this.setInputs(this.getInputs(),!0);#$t=e=>this.#Bt(e.target);#Bt(e){if(this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width<20)return;const t=this.blueprint.scaleCorrect(this.#It.getBoundingClientRect().width)+this.nameWidth,i=this.element.classList.contains("ueb-pin-input-wrap");!i&&t>ae.pinInputWrapWidth?this.element.classList.add("ueb-pin-input-wrap"):i&&t<=ae.pinInputWrapWidth&&this.element.classList.remove("ueb-pin-input-wrap")}firstUpdated(e){super.firstUpdated(e);this.constructor.canWrapInput&&this.isInputRendered()&&(this.element.addEventListener("input",this.#$t),this.nameWidth=this.blueprint.scaleCorrect(this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width??0)),this.#It=this.element.querySelector(".ueb-pin-input-wrapper"),this.#Ot=[...this.element.querySelectorAll("ueb-input")]}setup(){super.setup();const e=this.constructor;e.saveEachInputChange?this.element.addEventListener("input",this.#Dt):this.element.addEventListener("focusout",this.#Dt),e.canWrapInput&&this.isInputRendered()&&(this.element.addEventListener("input",this.#$t),this.element.nodeElement.addEventListener(ae.nodeReflowEventName,this.#$t))}cleanup(){super.cleanup(),this.element.nodeElement.removeEventListener(ae.nodeReflowEventName,this.#$t),this.element.removeEventListener("input",this.#$t),this.element.removeEventListener("input",this.#Dt),this.element.removeEventListener("focusout",this.#Dt)}getInput(){return this.getInputs().reduce(((e,t)=>e+t),"")}getInputs(){return this.#Ot.map((e=>oe.clearHTMLWhitespace(e.innerHTML)))}setInputs(e=[],t=!0){this.#Ot.forEach(this.constructor.singleLineInput?(t,i)=>t.innerText=e[i]:(t,i)=>t.innerText=e[i].replaceAll("\n","")),t&&this.setDefaultValue(e.map((e=>Hi.stringFromInputToUE(e))),e),this.element.requestUpdate(),this.element.nodeElement.acknowledgeReflow()}setDefaultValue(e=[],t=e){this.element.setDefaultValue(e.join(""))}renderInput(){const e=this.constructor,t=e.singleLineInput,i=e.selectOnFocus;return z`
`}}class zi extends ii{renderIcon(){return ce.execPin}renderName(){let e=this.element.entity.PinName?.toString();if(this.element.entity.PinFriendlyName)e=this.element.entity.PinFriendlyName.toString();else if("execute"===e||"then"===e)return z``;return z`${this.element.getPinDisplayName()}`}}class _i extends Hi{static singleLineInput=!0;setInputs(e=[],t=!1){if(e&&0!=e.length||(e=[this.getInput()]),super.setInputs(e,!1),t){let i=[];for(const s of e){let e=parseFloat(s);isNaN(e)&&(e=0,t=!1),i.push(e)}this.setDefaultValue(i,e)}}setDefaultValue(e=[],t){const i=this.element.getDefaultValue();i.value=e[0],this.element.setDefaultValue(i),this.element.requestUpdate()}}class Fi extends _i{renderInput(){return z`
`}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Fi=1;class ji{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}} + */const ji=1;class Ui{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}} /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const Ui="important",Yi=" !"+Ui,qi=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends ji{constructor(e){var t;if(super(e),e.type!==Fi||"style"!==e.name||(null===(t=e.strings)||void 0===t?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const s=e[i];return null==s?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ht){this.ht=new Set;for(const e in t)this.ht.add(e);return this.render(t)}this.ht.forEach((e=>{null==t[e]&&(this.ht.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const s=t[e];if(null!=s){this.ht.add(e);const t="string"==typeof s&&s.endsWith(Yi);e.includes("-")||t?i.setProperty(e,t?s.slice(0,-11):s,t?Ui:""):i[e]=s}}return G}});class Ki extends Ut{toggleAdvancedDisplayHandler;getDraggableElement(){return this.element.querySelector(".ueb-window-top")}createDraggableObject(){return new zt(this.element,this.blueprint,{draggableElement:this.getDraggableElement(),ignoreScale:!0,ignoreTranslateCompensate:!1,movementSpace:this.blueprint,stepSize:1})}setup(){const e=this.blueprint.template.gridLeftVisibilityBoundary(),t=this.blueprint.template.gridTopVisibilityBoundary();this.element.locationX=this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[0]-e),this.element.locationY=this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[1]-t),this.element.updateComplete.then((()=>{const e=this.blueprint.getBoundingClientRect();this.element.locationX+this.element.sizeX>e.width&&(this.element.locationX=e.width-this.element.sizeX),this.element.locationX=Math.max(0,this.element.locationX),this.element.locationY+this.element.sizeY>e.height&&(this.element.locationY=e.height-this.element.sizeY),this.element.locationY=Math.max(0,this.element.locationY)}))}render(){return R`
${this.renderWindowName()}
${le.close}
${this.renderContent()}
`}renderWindowName(){return R`Window`}renderContent(){return R``}apply(){this.element.dispatchEvent(new CustomEvent(re.windowApplyEventName)),this.element.remove()}cancel(){this.element.dispatchEvent(new CustomEvent(re.windowCancelEventName)),this.element.remove()}}class Xi extends Ki{#Rt;#Gt;#Vt;#Ht;#zt;#_t;#Ft;#jt;#Ut;#Yt;#qt=e=>{const t=ae.clearHTMLWhitespace(e.target.innerHTML),i=parseInt(t,16);isNaN(i)||(this.color.setFromRGBANumber(i),this.element.requestUpdate())};#Kt=e=>{const t=ae.clearHTMLWhitespace(e.target.innerHTML),i=parseInt(t,16);isNaN(i)||(this.color.setFromSRGBANumber(i),this.element.requestUpdate())};#Xt=e=>t=>{"Enter"==t.code&&(t.preventDefault(),e(t))};#Zt=new Ie;get color(){return this.#Zt}set color(e){e.toNumber()!=this.color?.toNumber()&&(this.element.requestUpdate("color",this.#Zt),this.#Zt=e)}#Wt=new Ie;get fullColor(){return this.#Wt}#Qt;get initialColor(){return this.#Qt}#Jt=new Ie;#ei(e,t,i=!1){const s=this.color.toRGBAString(),n=`${s.substring(0,2*e)}${t}${s.substring(2+2*e)}`;return i?`${n.substring(0,6)}FF`:n}initialize(e){super.initialize(e),this.#Qt=this.element.windowOptions.getPinColor(),this.color.setFromHSVA(this.initialColor.H.value,this.initialColor.S.value,this.initialColor.V.value,this.initialColor.A.value),this.fullColor.setFromHSVA(this.color.H.value,1,1,1)}firstUpdated(e){this.#Rt=this.element.querySelector(".ueb-color-picker-wheel ueb-color-handler"),this.#Gt=this.element.querySelector(".ueb-color-picker-saturation ueb-ui-slider"),this.#Vt=this.element.querySelector(".ueb-color-picker-value ueb-ui-slider"),this.#Ht=this.element.querySelector(".ueb-color-picker-r ueb-ui-slider"),this.#zt=this.element.querySelector(".ueb-color-picker-g ueb-ui-slider"),this.#_t=this.element.querySelector(".ueb-color-picker-b ueb-ui-slider"),this.#Ft=this.element.querySelector(".ueb-color-picker-a ueb-ui-slider"),this.#jt=this.element.querySelector(".ueb-color-picker-h ueb-ui-slider"),this.#Ut=this.element.querySelector(".ueb-color-picker-s ueb-ui-slider"),this.#Yt=this.element.querySelector(".ueb-color-picker-v ueb-ui-slider"),this.#Rt.template.locationChangeCallback=(e,t)=>{this.color.setFromWheelLocation(e,t,this.color.V.value,this.color.A.value),this.fullColor.setFromHSVA(this.color.H.value,1,1,1),this.element.requestUpdate()},this.#Gt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,t,this.color.V.value,this.color.A.value),this.element.requestUpdate()},this.#Vt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,this.color.S.value,t,this.color.A.value),this.element.requestUpdate()},this.#Ht.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(e,this.color.G.value,this.color.B.value,this.color.A.value),this.element.requestUpdate()},this.#zt.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(this.color.R.value,e,this.color.B.value,this.color.A.value),this.element.requestUpdate()},this.#_t.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(this.color.R.value,this.color.G.value,e,this.color.A.value),this.element.requestUpdate()},this.#Ft.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(this.color.R.value,this.color.G.value,this.color.B.value,e),this.element.requestUpdate()},this.#jt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(e,this.color.S.value,this.color.V.value,this.color.A.value),this.element.requestUpdate()},this.#Ut.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,e,this.color.V.value,this.color.A.value),this.element.requestUpdate()},this.#Yt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,this.color.S.value,e,this.color.A.value),this.element.requestUpdate()}}renderSlider(e){let t="",i=0,s="";const n=e=>`linear-gradient(to right, #${this.#ei(e,"00",!0)}, #${this.#ei(e,"ff",!0)})`;switch(e){case 0:t="r",i=this.color.R.value,s=n(e);break;case 1:t="g",i=this.color.G.value,s=n(e);break;case 2:t="b",i=this.color.B.value,s=n(e);break;case 3:t="a",i=this.color.A.value,s=`${re.alphaPattern}, ${n(e)}`;break;case 4:t="h",i=360*this.color.H.value,s="linear-gradient(to right, #f00 0%, #ff0 16.666%, #0f0 33.333%, #0ff 50%, #00f 66.666%, #f0f 83.333%, #f00 100%)";break;case 5:t="s",i=this.color.S.value,s=`linear-gradient(to right,#${this.#Jt.setFromHSVA(this.color.H.value,0,this.color.V.value,1),this.#Jt.toRGBAString()},#${this.#Jt.setFromHSVA(this.color.H.value,1,this.color.V.value,1),this.#Jt.toRGBAString()})`;break;case 6:t="v",i=this.color.V.value,s=`linear-gradient(to right, #000, #${this.fullColor.toRGBAString()})`}return s=`background: ${s};`,R`
${t.toUpperCase()}
`}renderContent(){const e=2*this.color.H.value*Math.PI,t={"--ueb-color-r":this.color.R.toString(),"--ueb-color-g":this.color.G.toString(),"--ueb-color-b":this.color.B.toString(),"--ueb-color-a":this.color.A.toString(),"--ueb-color-h":this.color.H.toString(),"--ueb-color-s":this.color.S.toString(),"--ueb-color-v":this.color.V.toString(),"--ueb-color-wheel-x":100*(this.color.S.value*Math.cos(e)*.5+.5)+"%","--ueb-color-wheel-y":100*(this.color.S.value*Math.sin(e)*.5+.5)+"%"},i=this.color.toRGBAString(),s=this.color.toSRGBAString(),n=this.fullColor.toRGBAString();return R`
Old
New
Advanced
${this.renderSlider(0)} ${this.renderSlider(1)} ${this.renderSlider(2)} ${this.renderSlider(3)}
${this.renderSlider(4)} ${this.renderSlider(5)} ${this.renderSlider(6)}
Hex Linear
Hex sRGB
${re.windowApplyButtonText}
${re.windowCancelButtonText}
`}renderWindowName(){return R`${re.colorWindowName}`}}class Zi extends zi{renderInput(){return R`
`}}class Wi extends zi{#ti(){return De.printNumber(this.element.getDefaultValue()?.X.valueOf()??0)}#ii(){return De.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}setDefaultValue(e,t){const i=this.element.getDefaultValue(!0);i.X.value=e[0],i.Y.value=e[1],this.element.setDefaultValue(i)}renderInput(){return R`
X
Y
`}}class Qi extends zi{#ti(){return De.printNumber(this.element.getDefaultValue()?.X.valueOf()??0)}#ii(){return De.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}#si(){return De.printNumber(this.element.getDefaultValue()?.Z.valueOf()??0)}setDefaultValue(e,t){const i=this.element.getDefaultValue(!0);if(!(i instanceof $e))throw new TypeError("Expected DefaultValue to be a VectorEntity");i.X.value=e[0],i.Y.value=e[1],i.Z.value=e[2],this.element.requestUpdate("DefaultValue",i)}renderInput(){return R`
X
Y
Z
`}}const Ji={bool:Gi,byte:_i,enum:class extends Vi{static saveEachInputChange=!0;#ni;#ri=[];setup(){super.setup();const e=this.element.nodeElement.entity.EnumEntries?.valueOf();this.#ri=e?.map((e=>(""===e.valueOf()&&(e=new We("None")),[e,this.element.nodeElement.getPinEntities().find((t=>e===t.PinName))?.PinFriendlyName.toString()??e])))??re.CommonEnums[this.element.entity.getSubCategory()]?.map((e=>e instanceof Array?e:[e,ae.formatStringName(e)]))??[];const t=this.element.getDefaultValue()?.toString();this.#ri.find((([e,i])=>e===t))||this.#ri.push([t,ae.formatStringName(t)]),this.element.requestUpdate()}renderInput(){return R``}firstUpdated(e){super.firstUpdated(e),this.#ni=this.element.querySelector("ueb-dropdown")}getInputs(){return[this.#ni.getValue()]}setDefaultValue(e=[],t){const i=this.element.getDefaultValue();i.value=e[0],this.element.setDefaultValue(i),this.element.requestUpdate()}},float:Zi,int:_i,int64:class extends zi{setDefaultValue(e=[],t){const i=this.element.getDefaultValue();i.value=BigInt(e[0]),this.element.setDefaultValue(i),this.element.requestUpdate()}renderInput(){return R`
`}},MUTABLE_REFERENCE:class extends ti{renderIcon(){return le.referencePin}},name:class extends Vi{static singleLineInput=!0},real:Zi,rg:Wi,string:class extends Vi{},[re.paths.linearColor]:class extends ti{#ai;#oi=e=>{e.preventDefault(),this.blueprint.setFocused(!0),this.#ai=Ae.getConstructor("ueb-window").newObject({type:new Xi,windowOptions:{getPinColor:()=>this.element.defaultValue,setPinColor:e=>this.element.setDefaultValue(e)}}),this.blueprint.append(this.#ai);const t=()=>{this.element.setDefaultValue(this.#ai.template.color)},i=()=>{this.#ai.removeEventListener(re.windowApplyEventName,t),this.#ai.removeEventListener(re.windowCloseEventName,i),this.#ai=null};this.#ai.addEventListener(re.windowApplyEventName,t),this.#ai.addEventListener(re.windowCloseEventName,i)};renderInput(){return R``}},[re.paths.niagaraBool]:Gi,[re.paths.niagaraFloat]:Zi,[re.paths.niagaraInt32]:_i,[re.paths.niagaraPosition]:Qi,[re.paths.rotator]:class extends zi{#li(){return De.printNumber(this.element.getDefaultValue()?.R.valueOf()??0)}#ci(){return De.printNumber(this.element.getDefaultValue()?.P.valueOf()??0)}#ii(){return De.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}setDefaultValue(e=[],t=e){const i=this.element.getDefaultValue(!0);if(!(i instanceof pt))throw new TypeError("Expected DefaultValue to be a RotatorEntity");i.R.value=e[0],i.P.value=e[1],i.Y.value=e[2],this.element.requestUpdate("DefaultValue",i)}renderInput(){return R`
X
Y
Z
`}},[re.paths.vector]:Qi,[re.paths.vector2D]:Wi,[re.paths.vector2f]:Wi,[re.paths.vector3f]:Qi,[re.paths.vector4f]:class extends zi{#ti(){return De.printNumber(this.element.getDefaultValue()?.X.valueOf()??0)}#ii(){return De.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}#si(){return De.printNumber(this.element.getDefaultValue()?.Z.valueOf()??0)}#ui(){return De.printNumber(this.element.getDefaultValue()?.W.valueOf()??0)}setDefaultValue(e,t){const i=this.element.getDefaultValue(!0);if(!(i instanceof gt))throw new TypeError("Expected DefaultValue to be a Vector4DEntity");i.X.value=e[0],i.Y.value=e[1],i.Z.value=e[2],i.W.value=e[3],this.element.requestUpdate("DefaultValue",i)}renderInput(){return R`
X
Y
Z
W
`}}};function es(e){if("Array"===e.PinType.ContainerType?.toString())return ti;if(e.PinType.bIsReference?.valueOf()&&!e.PinType.bIsConst?.valueOf())return Ji.MUTABLE_REFERENCE;if(e.isExecution())return Hi;const t=e.getType();return(e.isInput()?Ji[t]:ti)??ti}class ts extends oe{static properties={pinId:{type:je,converter:{fromAttribute:(e,t)=>e?je.grammar.parse(e):null,toAttribute:(e,t)=>e?.toString()},attribute:"data-id",reflect:!0},pinType:{type:String,attribute:"data-type",reflect:!0},advancedView:{type:String,attribute:"data-advanced-view",reflect:!0},color:{type:Ie,converter:{fromAttribute:(e,t)=>e?Ie.getLinearColorFromAnyFormat().parse(e):null,toAttribute:(e,t)=>e?Ie.printLinearColor(e):null},attribute:"data-color",reflect:!0},defaultValue:{type:String,attribute:!1},isLinked:{type:Boolean,converter:ke.booleanConverter,attribute:"data-linked",reflect:!0},pinDirection:{type:String,attribute:"data-direction",reflect:!0},connectable:{type:Boolean,converter:ke.booleanConverter,attribute:"data-connectable",reflect:!0}};nodeElement;static newObject(e=new ft,t=new(es(e)),i=void 0){const s=new ts;return s.initialize(e,t,i),s}initialize(e=new ft,t=new(es(e)),i=void 0){this.nodeElement=i,this.advancedView=e.bAdvancedView?.valueOf(),this.isLinked=!1,this.connectable=!e.bNotConnectable?.valueOf(),super.initialize(e,t),this.pinId=this.entity.PinId,this.pinType=this.entity.getType(),this.defaultValue=this.entity.getDefaultValue(),this.color=ts.properties.color.converter.fromAttribute(this.getColor().toString()),this.pinDirection=e.isInput()?"input":e.isOutput()?"output":"hidden"}setup(){super.setup(),this.nodeElement=this.closest("ueb-node")}createPinReference(){return new ot(new Je(this.nodeElement.getNodeName()),this.getPinId())}getPinId(){return this.entity.PinId}getPinName(){return this.entity.PinName?.toString()??""}getPinDisplayName(){return this.entity.pinTitle()}getColor(){return this.entity.pinColor()}isInput(){return this.entity.isInput()}isOutput(){return this.entity.isOutput()}getLinkLocation(){return this.template.getLinkLocation()}getNodeElement(){return this.nodeElement}getLinks(){return this.entity.LinkedTo?.valueOf()??[]}getDefaultValue(e=!1){return this.defaultValue=this.entity.getDefaultValue(e)}setDefaultValue(e){this.entity.DefaultValue=e,this.defaultValue=e,this.entity.recomputesNodeTitleOnChange&&this.nodeElement?.computeNodeDisplayName()}sanitizeLinks(e=[]){this.entity.LinkedTo=new ft.attributes.LinkedTo(this.entity.LinkedTo?.valueOf().filter((t=>{let i=this.blueprint.getPin(t);if(i){if(e.length&&!e.includes(i.nodeElement))return!1;let t=this.blueprint.getLink(this,i);t||(t=Ae.getConstructor("ueb-link").newObject(this,i),this.blueprint.addGraphElement(t))}return i}))),this.isLinked=this.entity.isLinked()}linkTo(e){const t=this.createPinReference();!this.isLinked||!this.isOutput()||"exec"!==this.pinType&&"exec"!==e.pinType||this.getLinks().some((e=>t.equals(e)))||this.unlinkFromAll(),this.entity.linkTo(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged(),this.entity.recomputesNodeTitleOnChange&&this.nodeElement?.computeNodeDisplayName())}unlinkFrom(e,t=!0){this.entity.unlinkFrom(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged(),t&&this.blueprint.getLink(this,e)?.remove(),this.entity.recomputesNodeTitleOnChange&&this.nodeElement?.computeNodeDisplayName())}unlinkFromAll(){const e=this.getLinks().length;this.getLinks().map((e=>this.blueprint.getPin(e))).forEach((e=>this.unlinkFrom(e))),e&&this.nodeElement?.template.linksChanged()}redirectLink(e,t){const i=this.getLinks().findIndex((t=>t.objectName.toString()==e.getNodeElement().getNodeName()&&t.pinGuid.toString()==e.entity.PinId.toString()));return i>=0&&(this.entity.LinkedTo.valueOf()[i]=t,!0)}}class is{constructor(e=e=>e,t=null){this.array=new Uint32Array(t),this.comparisonValueSupplier=e,this.length=0,this.currentPosition=0}get(e){return e>=0&&e=0&&this.currentPosition=0&&this.currentPosition0?this.get(this.currentPosition-1):null}getPrevValue(){return this.currentPosition>0?this.comparisonValueSupplier(this.get(this.currentPosition-1)):Number.MIN_SAFE_INTEGER}shiftLeft(e,t=1){this.array.set(this.array.subarray(e+t),e)}shiftRight(e,t=1){this.array.set(this.array.subarray(e,-t),e+t)}}class ss{constructor(e,t,i,s){this.initialPosition=e,this.finalPosition=e,this.metadata=new Array(t.length),this.primaryOrder=new is((e=>this.metadata[e].primaryBoundary)),this.secondaryOrder=new is((e=>this.metadata[e].secondaryBoundary)),this.selectFunc=s,this.rectangles=t,this.primaryOrder.reserve(this.rectangles.length),this.secondaryOrder.reserve(this.rectangles.length),t.forEach(((e,t)=>{let n={primaryBoundary:this.initialPosition[0],secondaryBoundary:this.initialPosition[1],rectangle:t,onSecondaryAxis:!1};this.metadata[t]=n,s(e,!1);const r=i(e);this.initialPosition[1]{if(this.metadata[i].onSecondaryAxis)this.selectFunc(this.rectangles[i],s);else if(s){this.secondaryOrder.insert(i,e[1]);const s=this.metadata[i].secondaryBoundary;Math.sign(e[1]-s)==t[1]&&Math.sign(s-this.initialPosition[1])==t[1]&&this.selectFunc(this.rectangles[i],!0)}else this.selectFunc(this.rectangles[i],!1),this.secondaryOrder.remove(i);this.computeBoundaries(),this.selectTo(e)};e[0]this.boundaries.primaryN.v&&e[0]this.boundaries.primaryP.v&&(++this.primaryOrder.currentPosition,i(this.boundaries.primaryP.i,this.initialPosition[0]{this.selectFunc(this.rectangles[t],i),this.computeBoundaries(),this.selectTo(e)};e[1]this.boundaries.secondaryN.v&&e[1]this.boundaries.secondaryP.v&&(++this.secondaryOrder.currentPosition,s(this.boundaries.secondaryP.i,this.initialPosition[1]as.#hi[e],toAttribute:(e,t)=>Object.entries(as.#hi).find((([t,i])=>e.constructor===i))?.[0]}}};static newObject(e={},t=e.type??new Ki){const i=new as;return i.initialize(e,t),i}initialize(e={},t=e.type??new Ki){e.windowOptions??={},this.type=e.type,this.windowOptions=e.windowOptions,super.initialize(e,t)}computeSizes(){const e=this.getBoundingClientRect();this.sizeX=e.width,this.sizeY=e.height}cleanup(){super.cleanup(),this.acknowledgeClose()}acknowledgeClose(){let e=new CustomEvent(re.windowCloseEventName);this.dispatchEvent(e)}}class os extends Pe{static attributes={...super.attributes,VariableGuid:je};static grammar=this.createGrammar();static{Pe.unknownEntity=this}static createGrammar(){return xe.seq(xe.reg(new RegExp(`(${Me.Regex.Path.source}|${Me.Regex.Symbol.source}\\s*)?\\(\\s*`),1),xe.seq(Me.attributeName,Me.equalSeparation).map((([e,t])=>e)).chain((e=>this.unknownEntityGrammar.map((t=>i=>i[e]=t)))).sepBy(Me.commaSeparation),xe.reg(/\s*(?:,\s*)?\)/)).map((([e,t,i])=>{e??="";let s={};return e.length&&(s.lookbehind=e),t.forEach((e=>e(s))),new this(s)})).label("UnknownKeysEntity")}}Pe.unknownEntityGrammar=xe.alt(ke.grammar,je.grammar,xe.str("None").map((()=>at.createNoneInstance())),St.grammar,De.grammar,xe.alt(at.fullReferenceGrammar,xe.regArray(new RegExp(`"(${Me.Regex.Path.source})'(${Me.Regex.Path.source}|${Me.symbol.getParser().regexp.source})'"`)).map((([e,t,i])=>new at(t,i,((e,t)=>`"${e}'${t}'"`))))),We.grammar,st.grammar,it.grammar,nt.grammar,ot.grammar,gt.grammar,$e.grammar,ut.grammar,pt.grammar,Ie.grammar,os.grammar,Je.grammar,_e.of(ot).grammar,_e.of(Le.accepting(De,We,Je)).grammar,xe.lazy((()=>_e.createGrammar(Pe.unknownEntityGrammar)))),function(){const e=(e,t)=>{customElements.define(e,t),Ae.registerElement(e,t)};e("ueb-color-handler",Mi),e("ueb-dropdown",$i),e("ueb-input",Ri),e("ueb-link",Gt),e("ueb-node",pi),e("ueb-pin",ts),e("ueb-selector",rs),e("ueb-ui-slider",Ii),e("ueb-window",as)}();export{Pi as Blueprint,re as Configuration,Gt as LinkElement,pi as NodeElement,ae as Utility}; + */const Yi="important",qi=" !"+Yi,Ki=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends Ui{constructor(e){if(super(e),e.type!==ji||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const s=e[i];return null==s?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const s=t[e];if(null!=s){this.ft.add(e);const t="string"==typeof s&&s.endsWith(qi);e.includes("-")||t?i.setProperty(e,t?s.slice(0,-11):s,t?Yi:""):i[e]=s}}return _}});class Xi extends Yt{toggleAdvancedDisplayHandler;getDraggableElement(){return this.element.querySelector(".ueb-window-top")}createDraggableObject(){return new _t(this.element,this.blueprint,{draggableElement:this.getDraggableElement(),ignoreScale:!0,ignoreTranslateCompensate:!1,movementSpace:this.blueprint,stepSize:1})}setup(){const e=this.blueprint.template.gridLeftVisibilityBoundary(),t=this.blueprint.template.gridTopVisibilityBoundary();this.element.locationX=this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[0]-e),this.element.locationY=this.blueprint.scaleCorrectReverse(this.blueprint.mousePosition[1]-t),this.element.updateComplete.then((()=>{const e=this.blueprint.getBoundingClientRect();this.element.locationX+this.element.sizeX>e.width&&(this.element.locationX=e.width-this.element.sizeX),this.element.locationX=Math.max(0,this.element.locationX),this.element.locationY+this.element.sizeY>e.height&&(this.element.locationY=e.height-this.element.sizeY),this.element.locationY=Math.max(0,this.element.locationY)}))}render(){return z`
${this.renderWindowName()}
${ce.close}
${this.renderContent()}
`}renderWindowName(){return z`Window`}renderContent(){return z``}apply(){this.element.dispatchEvent(new CustomEvent(ae.windowApplyEventName)),this.element.remove()}cancel(){this.element.dispatchEvent(new CustomEvent(ae.windowCancelEventName)),this.element.remove()}}class Wi extends Xi{#Rt;#Gt;#Vt;#Ht;#zt;#_t;#Ft;#jt;#Ut;#Yt;#qt=e=>{const t=oe.clearHTMLWhitespace(e.target.innerHTML),i=parseInt(t,16);isNaN(i)||(this.color.setFromRGBANumber(i),this.element.requestUpdate())};#Kt=e=>{const t=oe.clearHTMLWhitespace(e.target.innerHTML),i=parseInt(t,16);isNaN(i)||(this.color.setFromSRGBANumber(i),this.element.requestUpdate())};#Xt=e=>t=>{"Enter"==t.code&&(t.preventDefault(),e(t))};#Wt=new Oe;get color(){return this.#Wt}set color(e){e.toNumber()!=this.color?.toNumber()&&(this.element.requestUpdate("color",this.#Wt),this.#Wt=e)}#Zt=new Oe;get fullColor(){return this.#Zt}#Qt;get initialColor(){return this.#Qt}#Jt=new Oe;#ei(e,t,i=!1){const s=this.color.toRGBAString(),r=`${s.substring(0,2*e)}${t}${s.substring(2+2*e)}`;return i?`${r.substring(0,6)}FF`:r}initialize(e){super.initialize(e),this.#Qt=this.element.windowOptions.getPinColor(),this.color.setFromHSVA(this.initialColor.H.value,this.initialColor.S.value,this.initialColor.V.value,this.initialColor.A.value),this.fullColor.setFromHSVA(this.color.H.value,1,1,1)}firstUpdated(e){this.#Rt=this.element.querySelector(".ueb-color-picker-wheel ueb-color-handler"),this.#Gt=this.element.querySelector(".ueb-color-picker-saturation ueb-ui-slider"),this.#Vt=this.element.querySelector(".ueb-color-picker-value ueb-ui-slider"),this.#Ht=this.element.querySelector(".ueb-color-picker-r ueb-ui-slider"),this.#zt=this.element.querySelector(".ueb-color-picker-g ueb-ui-slider"),this.#_t=this.element.querySelector(".ueb-color-picker-b ueb-ui-slider"),this.#Ft=this.element.querySelector(".ueb-color-picker-a ueb-ui-slider"),this.#jt=this.element.querySelector(".ueb-color-picker-h ueb-ui-slider"),this.#Ut=this.element.querySelector(".ueb-color-picker-s ueb-ui-slider"),this.#Yt=this.element.querySelector(".ueb-color-picker-v ueb-ui-slider"),this.#Rt.template.locationChangeCallback=(e,t)=>{this.color.setFromWheelLocation(e,t,this.color.V.value,this.color.A.value),this.fullColor.setFromHSVA(this.color.H.value,1,1,1),this.element.requestUpdate()},this.#Gt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,t,this.color.V.value,this.color.A.value),this.element.requestUpdate()},this.#Vt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,this.color.S.value,t,this.color.A.value),this.element.requestUpdate()},this.#Ht.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(e,this.color.G.value,this.color.B.value,this.color.A.value),this.element.requestUpdate()},this.#zt.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(this.color.R.value,e,this.color.B.value,this.color.A.value),this.element.requestUpdate()},this.#_t.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(this.color.R.value,this.color.G.value,e,this.color.A.value),this.element.requestUpdate()},this.#Ft.template.locationChangeCallback=(e,t)=>{this.color.setFromRGBA(this.color.R.value,this.color.G.value,this.color.B.value,e),this.element.requestUpdate()},this.#jt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(e,this.color.S.value,this.color.V.value,this.color.A.value),this.element.requestUpdate()},this.#Ut.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,e,this.color.V.value,this.color.A.value),this.element.requestUpdate()},this.#Yt.template.locationChangeCallback=(e,t)=>{this.color.setFromHSVA(this.color.H.value,this.color.S.value,e,this.color.A.value),this.element.requestUpdate()}}renderSlider(e){let t="",i=0,s="";const r=e=>`linear-gradient(to right, #${this.#ei(e,"00",!0)}, #${this.#ei(e,"ff",!0)})`;switch(e){case 0:t="r",i=this.color.R.value,s=r(e);break;case 1:t="g",i=this.color.G.value,s=r(e);break;case 2:t="b",i=this.color.B.value,s=r(e);break;case 3:t="a",i=this.color.A.value,s=`${ae.alphaPattern}, ${r(e)}`;break;case 4:t="h",i=360*this.color.H.value,s="linear-gradient(to right, #f00 0%, #ff0 16.666%, #0f0 33.333%, #0ff 50%, #00f 66.666%, #f0f 83.333%, #f00 100%)";break;case 5:t="s",i=this.color.S.value,s=`linear-gradient(to right,#${this.#Jt.setFromHSVA(this.color.H.value,0,this.color.V.value,1),this.#Jt.toRGBAString()},#${this.#Jt.setFromHSVA(this.color.H.value,1,this.color.V.value,1),this.#Jt.toRGBAString()})`;break;case 6:t="v",i=this.color.V.value,s=`linear-gradient(to right, #000, #${this.fullColor.toRGBAString()})`}return s=`background: ${s};`,z`
${t.toUpperCase()}
`}renderContent(){const e=2*this.color.H.value*Math.PI,t={"--ueb-color-r":this.color.R.toString(),"--ueb-color-g":this.color.G.toString(),"--ueb-color-b":this.color.B.toString(),"--ueb-color-a":this.color.A.toString(),"--ueb-color-h":this.color.H.toString(),"--ueb-color-s":this.color.S.toString(),"--ueb-color-v":this.color.V.toString(),"--ueb-color-wheel-x":100*(this.color.S.value*Math.cos(e)*.5+.5)+"%","--ueb-color-wheel-y":100*(this.color.S.value*Math.sin(e)*.5+.5)+"%"},i=this.color.toRGBAString(),s=this.color.toSRGBAString(),r=this.fullColor.toRGBAString();return z`
Old
New
Advanced
${this.renderSlider(0)} ${this.renderSlider(1)} ${this.renderSlider(2)} ${this.renderSlider(3)}
${this.renderSlider(4)} ${this.renderSlider(5)} ${this.renderSlider(6)}
Hex Linear
Hex sRGB
${ae.windowApplyButtonText}
${ae.windowCancelButtonText}
`}renderWindowName(){return z`${ae.colorWindowName}`}}class Zi extends _i{renderInput(){return z`
`}}class Qi extends _i{#ti(){return $e.printNumber(this.element.getDefaultValue()?.X.valueOf()??0)}#ii(){return $e.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}setDefaultValue(e,t){const i=this.element.getDefaultValue(!0);i.X.value=e[0],i.Y.value=e[1],this.element.setDefaultValue(i)}renderInput(){return z`
X
Y
`}}class Ji extends _i{#ti(){return $e.printNumber(this.element.getDefaultValue()?.X.valueOf()??0)}#ii(){return $e.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}#si(){return $e.printNumber(this.element.getDefaultValue()?.Z.valueOf()??0)}setDefaultValue(e,t){const i=this.element.getDefaultValue(!0);if(!(i instanceof Be))throw new TypeError("Expected DefaultValue to be a VectorEntity");i.X.value=e[0],i.Y.value=e[1],i.Z.value=e[2],this.element.requestUpdate("DefaultValue",i)}renderInput(){return z`
X
Y
Z
`}}const es={bool:Vi,byte:Fi,enum:class extends Hi{static saveEachInputChange=!0;#ri;#ni=[];setup(){super.setup();const e=this.element.nodeElement.entity.EnumEntries?.valueOf();this.#ni=e?.map((e=>(""===e.valueOf()&&(e=new Qe("None")),[e,this.element.nodeElement.getPinEntities().find((t=>e===t.PinName))?.PinFriendlyName.toString()??e])))??ae.CommonEnums[this.element.entity.getSubCategory()]?.map((e=>e instanceof Array?e:[e,oe.formatStringName(e)]))??[];const t=this.element.getDefaultValue()?.toString();this.#ni.find((([e,i])=>e===t))||this.#ni.push([t,oe.formatStringName(t)]),this.element.requestUpdate()}renderInput(){return z``}firstUpdated(e){super.firstUpdated(e),this.#ri=this.element.querySelector("ueb-dropdown")}getInputs(){return[this.#ri.getValue()]}setDefaultValue(e=[],t){const i=this.element.getDefaultValue();i.value=e[0],this.element.setDefaultValue(i),this.element.requestUpdate()}},float:Zi,int:Fi,int64:class extends _i{setDefaultValue(e=[],t){const i=this.element.getDefaultValue();i.value=BigInt(e[0]),this.element.setDefaultValue(i),this.element.requestUpdate()}renderInput(){return z`
`}},MUTABLE_REFERENCE:class extends ii{renderIcon(){return ce.referencePin}},name:class extends Hi{static singleLineInput=!0},real:Zi,rg:Qi,string:class extends Hi{},[ae.paths.linearColor]:class extends ii{#ai;#oi=e=>{e.preventDefault(),this.blueprint.setFocused(!0),this.#ai=Le.getConstructor("ueb-window").newObject({type:new Wi,windowOptions:{getPinColor:()=>this.element.defaultValue,setPinColor:e=>this.element.setDefaultValue(e)}}),this.blueprint.append(this.#ai);const t=()=>{this.element.setDefaultValue(this.#ai.template.color)},i=()=>{this.#ai.removeEventListener(ae.windowApplyEventName,t),this.#ai.removeEventListener(ae.windowCloseEventName,i),this.#ai=null};this.#ai.addEventListener(ae.windowApplyEventName,t),this.#ai.addEventListener(ae.windowCloseEventName,i)};renderInput(){return z``}},[ae.paths.niagaraBool]:Vi,[ae.paths.niagaraFloat]:Zi,[ae.paths.niagaraInt32]:Fi,[ae.paths.niagaraPosition]:Ji,[ae.paths.rotator]:class extends _i{#li(){return $e.printNumber(this.element.getDefaultValue()?.R.valueOf()??0)}#ci(){return $e.printNumber(this.element.getDefaultValue()?.P.valueOf()??0)}#ii(){return $e.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}setDefaultValue(e=[],t=e){const i=this.element.getDefaultValue(!0);if(!(i instanceof dt))throw new TypeError("Expected DefaultValue to be a RotatorEntity");i.R.value=e[0],i.P.value=e[1],i.Y.value=e[2],this.element.requestUpdate("DefaultValue",i)}renderInput(){return z`
X
Y
Z
`}},[ae.paths.vector]:Ji,[ae.paths.vector2D]:Qi,[ae.paths.vector2f]:Qi,[ae.paths.vector3f]:Ji,[ae.paths.vector4f]:class extends _i{#ti(){return $e.printNumber(this.element.getDefaultValue()?.X.valueOf()??0)}#ii(){return $e.printNumber(this.element.getDefaultValue()?.Y.valueOf()??0)}#si(){return $e.printNumber(this.element.getDefaultValue()?.Z.valueOf()??0)}#ui(){return $e.printNumber(this.element.getDefaultValue()?.W.valueOf()??0)}setDefaultValue(e,t){const i=this.element.getDefaultValue(!0);if(!(i instanceof bt))throw new TypeError("Expected DefaultValue to be a Vector4DEntity");i.X.value=e[0],i.Y.value=e[1],i.Z.value=e[2],i.W.value=e[3],this.element.requestUpdate("DefaultValue",i)}renderInput(){return z`
X
Y
Z
W
`}}};function ts(e){if("Array"===e.PinType.ContainerType?.toString())return ii;if(e.PinType.bIsReference?.valueOf()&&!e.PinType.bIsConst?.valueOf())return es.MUTABLE_REFERENCE;if(e.isExecution())return zi;const t=e.getType();return(e.isInput()?es[t]:ii)??ii}class is extends le{static properties={pinId:{type:Ue,converter:{fromAttribute:(e,t)=>e?Ue.grammar.parse(e):null,toAttribute:(e,t)=>e?.toString()},attribute:"data-id",reflect:!0},pinType:{type:String,attribute:"data-type",reflect:!0},advancedView:{type:String,attribute:"data-advanced-view",reflect:!0},color:{type:Oe,converter:{fromAttribute:(e,t)=>e?Oe.getLinearColorFromAnyFormat().parse(e):null,toAttribute:(e,t)=>e?Oe.printLinearColor(e):null},attribute:"data-color",reflect:!0},defaultValue:{type:String,attribute:!1},isLinked:{type:Boolean,converter:Ae.booleanConverter,attribute:"data-linked",reflect:!0},pinDirection:{type:String,attribute:"data-direction",reflect:!0},connectable:{type:Boolean,converter:Ae.booleanConverter,attribute:"data-connectable",reflect:!0}};nodeElement;static newObject(e=new yt,t=new(ts(e)),i=void 0){const s=new is;return s.initialize(e,t,i),s}initialize(e=new yt,t=new(ts(e)),i=void 0){this.nodeElement=i,this.advancedView=e.bAdvancedView?.valueOf(),this.isLinked=!1,this.connectable=!e.bNotConnectable?.valueOf(),super.initialize(e,t),this.pinId=this.entity.PinId,this.pinType=this.entity.getType(),this.defaultValue=this.entity.getDefaultValue(),this.color=is.properties.color.converter.fromAttribute(this.getColor().toString()),this.pinDirection=e.isInput()?"input":e.isOutput()?"output":"hidden"}setup(){super.setup(),this.nodeElement=this.closest("ueb-node")}createPinReference(){return new lt(new et(this.nodeElement.getNodeName()),this.getPinId())}getPinId(){return this.entity.PinId}getPinName(){return this.entity.PinName?.toString()??""}getPinDisplayName(){return this.entity.pinTitle()}getColor(){return this.entity.pinColor()}isInput(){return this.entity.isInput()}isOutput(){return this.entity.isOutput()}getLinkLocation(){return this.template.getLinkLocation()}getNodeElement(){return this.nodeElement}getLinks(){return this.entity.LinkedTo?.valueOf()??[]}getDefaultValue(e=!1){return this.defaultValue=this.entity.getDefaultValue(e)}setDefaultValue(e){this.entity.DefaultValue=e,this.defaultValue=e,this.entity.recomputesNodeTitleOnChange&&this.nodeElement?.computeNodeDisplayName()}sanitizeLinks(e=[]){this.entity.LinkedTo=new yt.attributes.LinkedTo(this.entity.LinkedTo?.valueOf().filter((t=>{let i=this.blueprint.getPin(t);if(i){if(e.length&&!e.includes(i.nodeElement))return!1;let t=this.blueprint.getLink(this,i);t||(t=Le.getConstructor("ueb-link").newObject(this,i),this.blueprint.addGraphElement(t))}return i}))),this.isLinked=this.entity.isLinked()}linkTo(e){const t=this.createPinReference();!this.isLinked||!this.isOutput()||"exec"!==this.pinType&&"exec"!==e.pinType||this.getLinks().some((e=>t.equals(e)))||this.unlinkFromAll(),this.entity.linkTo(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged(),this.entity.recomputesNodeTitleOnChange&&this.nodeElement?.computeNodeDisplayName())}unlinkFrom(e,t=!0){this.entity.unlinkFrom(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged(),t&&this.blueprint.getLink(this,e)?.remove(),this.entity.recomputesNodeTitleOnChange&&this.nodeElement?.computeNodeDisplayName())}unlinkFromAll(){const e=this.getLinks().length;this.getLinks().map((e=>this.blueprint.getPin(e))).forEach((e=>this.unlinkFrom(e))),e&&this.nodeElement?.template.linksChanged()}redirectLink(e,t){const i=this.getLinks().findIndex((t=>t.objectName.toString()==e.getNodeElement().getNodeName()&&t.pinGuid.toString()==e.entity.PinId.toString()));return i>=0&&(this.entity.LinkedTo.valueOf()[i]=t,!0)}}class ss{constructor(e=e=>e,t=null){this.array=new Uint32Array(t),this.comparisonValueSupplier=e,this.length=0,this.currentPosition=0}get(e){return e>=0&&e=0&&this.currentPosition=0&&this.currentPosition0?this.get(this.currentPosition-1):null}getPrevValue(){return this.currentPosition>0?this.comparisonValueSupplier(this.get(this.currentPosition-1)):Number.MIN_SAFE_INTEGER}shiftLeft(e,t=1){this.array.set(this.array.subarray(e+t),e)}shiftRight(e,t=1){this.array.set(this.array.subarray(e,-t),e+t)}}class rs{constructor(e,t,i,s){this.initialPosition=e,this.finalPosition=e,this.metadata=new Array(t.length),this.primaryOrder=new ss((e=>this.metadata[e].primaryBoundary)),this.secondaryOrder=new ss((e=>this.metadata[e].secondaryBoundary)),this.selectFunc=s,this.rectangles=t,this.primaryOrder.reserve(this.rectangles.length),this.secondaryOrder.reserve(this.rectangles.length),t.forEach(((e,t)=>{let r={primaryBoundary:this.initialPosition[0],secondaryBoundary:this.initialPosition[1],rectangle:t,onSecondaryAxis:!1};this.metadata[t]=r,s(e,!1);const n=i(e);this.initialPosition[1]{if(this.metadata[i].onSecondaryAxis)this.selectFunc(this.rectangles[i],s);else if(s){this.secondaryOrder.insert(i,e[1]);const s=this.metadata[i].secondaryBoundary;Math.sign(e[1]-s)==t[1]&&Math.sign(s-this.initialPosition[1])==t[1]&&this.selectFunc(this.rectangles[i],!0)}else this.selectFunc(this.rectangles[i],!1),this.secondaryOrder.remove(i);this.computeBoundaries(),this.selectTo(e)};e[0]this.boundaries.primaryN.v&&e[0]this.boundaries.primaryP.v&&(++this.primaryOrder.currentPosition,i(this.boundaries.primaryP.i,this.initialPosition[0]{this.selectFunc(this.rectangles[t],i),this.computeBoundaries(),this.selectTo(e)};e[1]this.boundaries.secondaryN.v&&e[1]this.boundaries.secondaryP.v&&(++this.secondaryOrder.currentPosition,s(this.boundaries.secondaryP.i,this.initialPosition[1]os.#hi[e],toAttribute:(e,t)=>Object.entries(os.#hi).find((([t,i])=>e.constructor===i))?.[0]}}};static newObject(e={},t=e.type??new Xi){const i=new os;return i.initialize(e,t),i}initialize(e={},t=e.type??new Xi){e.windowOptions??={},this.type=e.type,this.windowOptions=e.windowOptions,super.initialize(e,t)}computeSizes(){const e=this.getBoundingClientRect();this.sizeX=e.width,this.sizeY=e.height}cleanup(){super.cleanup(),this.acknowledgeClose()}acknowledgeClose(){let e=new CustomEvent(ae.windowCloseEventName);this.dispatchEvent(e)}}class ls extends ke{static attributes={...super.attributes,VariableGuid:Ue};static grammar=this.createGrammar();static{ke.unknownEntity=this}static createGrammar(){return Pe.seq(Pe.reg(new RegExp(`(${Te.Regex.Path.source}|${Te.Regex.Symbol.source}\\s*)?\\(\\s*`),1),Pe.seq(Te.attributeName,Te.equalSeparation).map((([e,t])=>e)).chain((e=>this.unknownEntityGrammar.map((t=>i=>i[e]=t)))).sepBy(Te.commaSeparation),Pe.reg(/\s*(?:,\s*)?\)/)).map((([e,t,i])=>{e??="";let s={};return e.length&&(s.lookbehind=e),t.forEach((e=>e(s))),new this(s)})).label("UnknownKeysEntity")}}ke.unknownEntityGrammar=Pe.alt(Ae.grammar,Ue.grammar,Pe.str("None").map((()=>ot.createNoneInstance())),Et.grammar,$e.grammar,Pe.alt(ot.fullReferenceGrammar,Pe.regArray(new RegExp(`"(${Te.Regex.Path.source})'(${Te.Regex.Path.source}|${Te.symbol.getParser().regexp.source})'"`)).map((([e,t,i])=>new ot(t,i,((e,t)=>`"${e}'${t}'"`))))),Qe.grammar,rt.grammar,st.grammar,nt.grammar,lt.grammar,bt.grammar,Be.grammar,ht.grammar,dt.grammar,Oe.grammar,ls.grammar,et.grammar,Fe.of(lt).grammar,Fe.of(Me.accepting($e,Qe,et)).grammar,Pe.lazy((()=>Fe.createGrammar(ke.unknownEntityGrammar)))),function(){const e=(e,t)=>{customElements.define(e,t),Le.registerElement(e,t)};e("ueb-color-handler",Ti),e("ueb-dropdown",Bi),e("ueb-input",Gi),e("ueb-link",Vt),e("ueb-node",di),e("ueb-pin",is),e("ueb-selector",as),e("ueb-ui-slider",Oi),e("ueb-window",os)}();export{ki as Blueprint,ae as Configuration,Vt as LinkElement,di as NodeElement,oe as Utility}; diff --git a/js/entity/ObjectEntity.js b/js/entity/ObjectEntity.js index 3757606..3a3c1ee 100755 --- a/js/entity/ObjectEntity.js +++ b/js/entity/ObjectEntity.js @@ -142,7 +142,10 @@ export default class ObjectEntity extends IEntity { ScriptVariables: ArrayEntity.flagInlined().of(ScriptVariableEntity), Node: MirroredEntity.of(ObjectReferenceEntity), ExportedNodes: StringEntity, - CustomProperties: ArrayEntity.of(AlternativesEntity.accepting(PinEntity, UnknownPinEntity)).withDefault().flagSilent(), + CustomProperties: ArrayEntity + .of(AlternativesEntity.accepting(PinEntity, UnknownPinEntity)) + .withDefault() + .flagSilent(), } static customPropertyGrammar = P.seq( P.reg(/CustomProperties\s+/), @@ -367,16 +370,41 @@ export default class ObjectEntity extends IEntity { ? outputIndex++ : i }) - const reference = this.ExportPath?.valueOf() - if (reference?.path.endsWith(this.Name?.toString())) { + + // Mirror name part of the object in ExportPath + const exportPath = this.ExportPath?.valueOf() + if (exportPath?.path.endsWith(this.Name?.toString())) { const mirroredEntity = /** @type {typeof ObjectEntity} */(this.constructor).attributes.ExportPath - const objectReferenceEntity = /** @type {typeof ObjectReferenceEntity} */(mirroredEntity.type) - const nameLength = this.Name.valueOf().length - this.ExportPath = new mirroredEntity(() => new objectReferenceEntity( - reference.type, - reference.path.substring(0, reference.path.length - nameLength) + this.Name, - reference.full, - )) + const prefix = exportPath.path.substring(0, exportPath.path.length - this.Name.toString().length) + this.ExportPath = new mirroredEntity( + () => new (mirroredEntity.type)(exportPath.type, prefix + this.Name.toString(), exportPath.full) + ) + } + + // Mirror name part of the nested object in ExportPath + if (this.Name) { + for (const k of Object.keys(this)) { + if (!k.startsWith(Configuration.subObjectAttributeNamePrefix)) { + continue + } + /** @type {ObjectEntity} */ + const subObject = this[k] + if (!subObject.ExportPath?.valueOf().path.includes(this.Name.toString())) { + continue + } + const originalExportPath = subObject.ExportPath.valueOf() + const position = originalExportPath.path.indexOf(this.Name.toString()) + const prefix = originalExportPath.path.substring(0, position) + const suffix = originalExportPath.path.substring(position + this.Name.toString().length) + const mirroredEntity = /** @type {typeof ObjectEntity} */(subObject.constructor).attributes.ExportPath + subObject.ExportPath = new mirroredEntity( + () => new (mirroredEntity.type)( + originalExportPath.type, + prefix + (this.Name ?? "").toString() + suffix, + originalExportPath.full + ) + ) + } } } @@ -666,9 +694,10 @@ export default class ObjectEntity extends IEntity { attributeSeparator = Self.attributeSeparator, wrap = Self.wrap, ) { + const isSelfOverriden = Self !== this.constructor const deeperIndentation = indentation + Configuration.indentation const initial_trailing = this.trailing - this.trailing = false + this.trailing = true const content = super.doSerialize(insideString, deeperIndentation, Self, printKey, keySeparator, attributeSeparator, wrap) this.trailing = initial_trailing let result = indentation + "Begin Object" @@ -696,21 +725,21 @@ export default class ObjectEntity extends IEntity { ? ` ExportPath${keySeparator}${this.ExportPath.serialize(insideString)}` : "" ) - + (content ? attributeSeparator + content : "") + + attributeSeparator + + content + (Self.attributes.CustomProperties.ignored !== true && this.CustomProperties.ignored !== true ? this.getCustomproperties() .map(pin => - attributeSeparator - + deeperIndentation + deeperIndentation + printKey("CustomProperties ") + pin.serialize(insideString) + + attributeSeparator ) .join("") : "" ) - + attributeSeparator + indentation + "End Object" - + (this.trailing ? attributeSeparator : "") + + (isSelfOverriden && Self.trailing || this.trailing ? attributeSeparator : "") return result } } diff --git a/js/entity/ObjectReferenceEntity.js b/js/entity/ObjectReferenceEntity.js index 268e698..a855bdf 100755 --- a/js/entity/ObjectReferenceEntity.js +++ b/js/entity/ObjectReferenceEntity.js @@ -29,27 +29,27 @@ export default class ObjectReferenceEntity extends IEntity { this.#path = value } - #full + #serializer get full() { - return this.#full + return this.#serializer } set full(value) { - this.#full = value + this.#serializer = value } #name = "" - /** @param {(t: String, p: String) => String} full */ + /** @param {(t: String, p: String) => String} serializer */ constructor( type = "None", path = "", - full = type.includes("/") || path + serializer = type.includes("/") || path ? (t, p) => `"${t + (p ? (`'${p}'`) : "")}"` : (t, p) => t) { super() this.#type = type this.#path = path - this.#full = full + this.#serializer = serializer } /** @returns {P} */ diff --git a/js/template/pin/PinTemplate.js b/js/template/pin/PinTemplate.js index 282343c..ddaaa21 100755 --- a/js/template/pin/PinTemplate.js +++ b/js/template/pin/PinTemplate.js @@ -143,7 +143,9 @@ export default class PinTemplate extends ITemplate { } isInputRendered() { - return this.element.isInput() && !this.element.entity.PinType.bIsReference?.valueOf() + return this.element.isInput() + && !this.element.entity.bDefaultValueIsIgnored?.valueOf() + && !this.element.entity.PinType.bIsReference?.valueOf() } renderInput() { diff --git a/package.json b/package.json index b1df317..939ab41 100755 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "homepage": "https://github.com/barsdeveloper/ueblueprint#readme", "devDependencies": { "@playwright/test": "1.49", - "@rollup/plugin-commonjs": "^25", - "@rollup/plugin-node-resolve": "^15", + "@rollup/plugin-commonjs": "^28", + "@rollup/plugin-node-resolve": "^16", "@rollup/plugin-terser": "^0", - "concurrently": "^8", + "concurrently": "^9", "http-server": "^14", "rollup": "^4 || ^3 || ^2", "rollup-plugin-copy": "^3", @@ -38,7 +38,7 @@ "terser": "^5" }, "dependencies": { - "lit": "^2", + "lit": "^3", "parsernostrum": "^1" } } diff --git a/tests/issues.spec.js b/tests/issues.spec.js index e1ab2b3..a48ba94 100755 --- a/tests/issues.spec.js +++ b/tests/issues.spec.js @@ -38,9 +38,9 @@ test("Issue 27", async ({ blueprintPage }) => { CustomProperties Pin (PinId=424DC49B456B27D825A8F690E6CAA096,PinName="OutputPin",Direction="EGPD_Output",PinType.PinCategory="delegate",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(MemberParent="/Script/Engine.BlueprintGeneratedClass'/Game/Examples/BallShooter/Blueprints/BallShooterEnvironment.BallShooterEnvironment_C'",MemberName="CustomEvent",MemberGuid=8955D806490FF62840F229BD64AC0F8B),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AssignDelegate_0 3C0089524CDDA9E63853BEA28156FACD,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) End Object `) - const eventNode = await blueprintPage.blueprintLocator.locator("ueb-node").nth(0) - const knotNode = await blueprintPage.blueprintLocator.locator("ueb-node").nth(2) - const assignNode = await blueprintPage.blueprintLocator.locator("ueb-node").nth(1) + const eventNode = blueprintPage.blueprintLocator.locator("ueb-node").nth(0) + const knotNode = blueprintPage.blueprintLocator.locator("ueb-node").nth(2) + const assignNode = blueprintPage.blueprintLocator.locator("ueb-node").nth(1) const pin1 = eventNode.locator("ueb-pin").nth(0) const pin2A = knotNode.locator("ueb-pin").nth(0) const pin2B = knotNode.locator("ueb-pin").nth(1) @@ -49,5 +49,5 @@ test("Issue 27", async ({ blueprintPage }) => { expect(await pin2A.evaluate(/** @param {PinElement} pin */ pin => pin.isLinked)).toBeTruthy() expect(await pin2B.evaluate(/** @param {PinElement} pin */ pin => pin.isLinked)).toBeTruthy() expect(await pin3.evaluate(/** @param {PinElement} pin */ pin => pin.isLinked)).toBeTruthy() - expect(await blueprintPage.blueprintLocator.locator("ueb-link")).toHaveCount(2) + expect(blueprintPage.blueprintLocator.locator("ueb-link")).toHaveCount(2) }) diff --git a/tests/niagaraScriptVariables.spec.js b/tests/niagaraScriptVariables.spec.js index 31c4331..ee76f2f 100644 --- a/tests/niagaraScriptVariables.spec.js +++ b/tests/niagaraScriptVariables.spec.js @@ -2,63 +2,53 @@ import { test, expect } from "./fixtures/test.js" const serialized = source => source .replaceAll(/^\n|^ {12}| +$/gm, "") - .replaceAll(/(?<=^Begin Object).+| +$|^ +ExportedNodes=.+/gm, "") + .replaceAll(/(?<=^Begin Object).+| +$|^ +ExportedNodes=.+\n/gm, "") .replaceAll(" ", " ") +test.describe.configure({ mode: 'parallel' }) test.describe("Niagara ScriptVariables", () => { - test.describe.configure({ mode: "serial" }) - - test.beforeEach(async ({ page }) => { - await page.reload() + test.beforeEach(async ({ blueprintPage }) => { + await blueprintPage.removeNodes() }) test("Deserialization", async ({ blueprintPage }) => { + expect(await blueprintPage.blueprintLocator.evaluate(blueprint => blueprint.entity.serialize())) .toEqual("Begin Object\nEnd Object\n") + const source = String.raw` - Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_5" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_5'" - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_7" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_7'" + Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_6" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_6'" + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_2'" End Object - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_5" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_5'" + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_1'" End Object - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_4" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_4'" + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_0'" End Object - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_3" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_3'" - End Object - Begin Object Name="NiagaraScriptVariable_7" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_7'" + Begin Object Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_2'" DefaultMode=FailIfPreviouslyNotSet Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.NewOutput",TypeDefHandle=(RegisteredTypeIndex=91)) - Metadata=(VariableGuid=D9FF507912C649B89A5AAADD786008F9) + Metadata=(VariableGuid=274F4E069AD943DBAAB943F92BE558EA) DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=ED5739C2B154491381BC513315173499 + ChangeId=DE05B442E3734F5D9AEA76603B33E271 End Object - Begin Object Name="NiagaraScriptVariable_5" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_5'" + Begin Object Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_1'" DefaultMode=FailIfPreviouslyNotSet - Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.Translation",TypeDefHandle=(RegisteredTypeIndex=88)) - Metadata=(VariableGuid=BC9C97D335B94AB69773126210A3ECAE) + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.Input001",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=775A1228426C413AB95CB9049C1E993A) DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=FE0D9E75CFBC4AE88F5BFAA9EF72667E + ChangeId=C38E0F30344D4A2689CC7972DFBAA6FA End Object - Begin Object Name="NiagaraScriptVariable_4" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_4'" + Begin Object Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_0'" DefaultMode=FailIfPreviouslyNotSet - Variable=(VarData=(0,0,0,0),Name="Local.Module.CompressedQuaternion",TypeDefHandle=(RegisteredTypeIndex=83)) - Metadata=(VariableGuid=9CAD9A77A2464300A77B2CE84F45D85D) - DefaultValueVariant=(Bytes=(0,0,0,0),CurrentMode=Bytes) - ChangeId=A8F32F2FA4944F3F8ED6054D7103F762 + Variable=(Name="Local.Module.Input",TypeDefHandle=(RegisteredTypeIndex=59)) + Metadata=(VariableGuid=0DAA63BD5851469990B3FE12816255A5) + ChangeId=2312FB889A9640CFA45B3A9E4AF7FC01 End Object - Begin Object Name="NiagaraScriptVariable_3" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_5:NiagaraScriptVariable_3'" - DefaultMode=FailIfPreviouslyNotSet - Variable=(VarData=(0,0,0,0),Name="Local.Module.Result",TypeDefHandle=(RegisteredTypeIndex=83)) - Metadata=(VariableGuid=ABE0FABCD81C42C6A4F2773039AD2FBB) - DefaultValueVariant=(Bytes=(0,0,0,0),CurrentMode=Bytes) - ChangeId=0044A03337E24147A24A4DB6C9015E37 - End Object - ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_3'",OriginalChangeId=0044A03337E24147A24A4DB6C9015E37) - ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_4'",OriginalChangeId=A8F32F2FA4944F3F8ED6054D7103F762) - ScriptVariables(2)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_5'",OriginalChangeId=FE0D9E75CFBC4AE88F5BFAA9EF72667E) - ScriptVariables(3)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_7'",OriginalChangeId=ED5739C2B154491381BC513315173499) - ExportedNodes="QmVnaW4gT2JqZWN0IENsYXNzPS9TY3JpcHQvTmlhZ2FyYUVkaXRvci5OaWFnYXJhTm9kZVBhcmFtZXRlck1hcFNldCBOYW1lPSJOaWF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sdWVJc0lnbm9yZWQ9RmFsc2UsYkFkdmFuY2VkVmlldz1GYWxzZSxiT3JwaGFuZWRQaW49RmFsc2UsKQ0KRW5kIE9iamVjdA0K" + ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_0'",OriginalChangeId=2312FB889A9640CFA45B3A9E4AF7FC01) + ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_1'",OriginalChangeId=C38E0F30344D4A2689CC7972DFBAA6FA) + ScriptVariables(2)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_2'",OriginalChangeId=DE05B442E3734F5D9AEA76603B33E271) + ExportedNodes="QmVnaW4gT2JqZWN0IENsYXNzPS9TY3JpcHQvTmlhZ2FyYUVkaXRvci5OaWFnYXJhTm9kZVBhcmFtZXRlck1hcFNldCBOYW1lPSJOaWFnYXJhTm9kZVBhcmFtZXRlck1hcFNldF8wIiBFeHBvcnRQYXRoPSIvU2NyaXB0L05pYWdhcmFFZGl0b3IuTmlhZ2FyYU5vZGVQYXJhbWV0ZXJNYXBTZXQnL0VuZ2luZS9UcmFuc2llbnQuTmV3TmlhZ2FyYVNjcmlwdDI6TmlhZ2FyYVNjcmlwdFNvdXJjZV8wLk5pYWdhcmFHcmFwaF8wLk5pYWdhcmFOb2RlUGFyYW1ldGVyTWFwU2V0XzAnIgogICBDaGFuZ2VJZD03QkU4QUZGMzlBNkU0MzUwQjY3QzlBM0FBOEYzMDVCNg0KICAgTm9kZVBvc1g9LTI1Ng0KICAgTm9kZVBvc1k9LTE2MA0KICAgTm9kZUd1aWQ9RkU5M0ZCNDlDNTI4NDMyNEE3ODBFMThGNTQzRjZBNDcNCiAgIEN1c3RvbVByb3BlcnRpZXMgUGluIChQaW5JZD1EMUMwMjMyMEJFOUU0MTgxOUZCQTdBNjhCMTE5QzU5QyxQaW5OYW1lPSJTb3VyY2UiLFBpblR5cG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GluVHlwZS5QaW5WYWx1ZVR5cGU9KCksUGluVHlwZS5Db250YWluZXJUeXBlPU5vbmUsUGluVHlwZS5iSXNSZWZlcmVuY2U9RmFsc2UsUGluVHlwZS5iSXNDb25zdD1GYWxzZSxQaW5UeXBlLmJJc1dlYWtQb2ludGVyPUZhbHNlLFBpblR5cGUuYklzVU9iamVjdFdyYXBwZXI9RmFsc2UsUGluVHlwZS5iU2VyaWFsaXplQXNTaW5nbGVQcmVjaXNpb25GbG9hdD1GYWxzZSxQZXJzaXN0ZW50R3VpZD0wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCxiSGlkZGVuPUZhbHNlLGJOb3RDb25uZWN0YWJsZT1GYWxzZSxiRGVmYXVsdFZhbHVlSXNSZWFkT25seT1GYWxzZSxiRGVmYXVsdFZhbHVlSXNJZ25vcmVkPUZhbHNlLGJBZHZhbmNlZFZpZXc9RmFsc2UsYk9ycGhhbmVkUGluPUZhbHNlLCkNCkVuZCBPYmplY3QNCg==" End Object ` await blueprintPage.paste(source) @@ -66,84 +56,141 @@ test.describe("Niagara ScriptVariables", () => { .toEqual(serialized(source)) }) - test("Existing variable", async ({ blueprintPage }) => { - expect(await blueprintPage.blueprintLocator.evaluate(blueprint => blueprint.entity.serialize())) - .toEqual("Begin Object\nEnd Object\n") + test("Merging", async ({ blueprintPage }) => { + + // Var: Local.Module.Input, Local.Module.Input001, Local.Module.NewOutput let source = String.raw` - Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_1" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_1'" - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_0'" + Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_6" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_6'" + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_2'" End Object - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_2'" + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_1'" End Object - Begin Object Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_0'" - Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Module.B",TypeDefHandle=(RegisteredTypeIndex=91)) - Metadata=(VariableGuid=74CE7A265A06491AB76AE33EC9455B32) + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_0'" + End Object + Begin Object Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_2'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.NewOutput",TypeDefHandle=(RegisteredTypeIndex=91)) + Metadata=(VariableGuid=274F4E069AD943DBAAB943F92BE558EA) DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=9EF012F75DA2433BBFC2F81B1B9B0A6F + ChangeId=DE05B442E3734F5D9AEA76603B33E271 End Object - Begin Object Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_2'" - Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Module.Default",TypeDefHandle=(RegisteredTypeIndex=88)) - Metadata=(VariableGuid=8A6D271C4C9DED64D135438A48373391) + Begin Object Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_1'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.Input001",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=775A1228426C413AB95CB9049C1E993A) DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=38DB31CC4AF2996F0AEB61A32004D026 + ChangeId=C38E0F30344D4A2689CC7972DFBAA6FA End Object - ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_2'",OriginalChangeId=38DB31CC4AF2996F0AEB61A32004D026) - ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_0'",OriginalChangeId=9EF012F75DA2433BBFC2F81B1B9B0A6F) + Begin Object Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_6:NiagaraScriptVariable_0'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(Name="Local.Module.Input",TypeDefHandle=(RegisteredTypeIndex=59)) + Metadata=(VariableGuid=0DAA63BD5851469990B3FE12816255A5) + ChangeId=2312FB889A9640CFA45B3A9E4AF7FC01 + End Object + ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_0'",OriginalChangeId=2312FB889A9640CFA45B3A9E4AF7FC01) + ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_1'",OriginalChangeId=C38E0F30344D4A2689CC7972DFBAA6FA) + ScriptVariables(2)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_2'",OriginalChangeId=DE05B442E3734F5D9AEA76603B33E271) + ExportedNodes="QmVnaW4gT2JqZWN0IENsYXNzPS9TY3JpcHQvTmlhZ2FyYUVkaXRvci5OaWFnYXJhTm9kZVBhcmFtZXRlck1hcFNldCBOYW1lPSJOaWFnYXJhTm9kZVBhcmFtZXRlck1hcFNldF8wIiBFeHBvcnRQYXRoPSIvU2NyaXB0L05pYWdhcmFFZGl0b3IuTmlhZ2FyYU5vZGVQYXJhbWV0ZXJNYXBTZXQnL0VuZ2luZS9UcmFuc2llbnQuTmV3TmlhZ2FyYVNjcmlwdDI6TmlhZ2FyYVNjcmlwdFNvdXJjZV8wLk5pYWdhcmFHcmFwaF8wLk5pYWdhcmFOb2RlUGFyYW1ldGVyTWFwU2V0XzAnIgogICBDaGFuZ2VJZD03QkU4QUZGMzlBNkU0MzUwQjY3QzlBM0FBOEYzMDVCNg0KICAgTm9kZVBvc1g9LTI1Ng0KICAgTm9kZVBvc1k9LTE2MA0KICAgTm9kZUd1aWQ9RkU5M0ZCNDlDNTI4NDMyNEE3ODBFMThGNTQzRjZBNDcNCiAgIEN1c3RvbVByb3BlcnRpZXMgUGluIChQaW5JZD1EMUMwMjMyMEJFOUU0MTgxOUZCQTdBNjhCMTE5QzU5QyxQaW5OYW1lPSJTb3VyY2UiLFBpblR5cGUuUGluQ2F0ZWdvcnk9IlR5cGUiLFBpblR5cGUuUGluU3ViQ2F0ZWdvcnk9IiIsUGluVHlwZS5QaW5TdWJDYXRlZ29yeU9iamVjdD0iL1NjcmlwdC9Db3JlVU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YWxzZSxQaW5UeXBlLmJJc1dlYWtQb2ludGVyPUZhbHNlLFBpblR5cGUuYklzVU9iamVjdFdyYXBwZXI9RmFsc2UsUGluVHlwZS5iU2VyaWFsaXplQXNTaW5nbGVQcmVjaXNpb25GbG9hdD1GYWxzZSxQZXJzaXN0ZW50R3VpZD0wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCxiSGlkZGVuPUZhbHNlLGJOb3RDb25uZWN0YWJsZT1GYWxzZSxiRGVmYXVsdFZhbHVlSXNSZWFkT25seT1GYWxzZSxiRGVmYXVsdFZhbHVlSXNJZ25vcmVkPUZhbHNlLGJBZHZhbmNlZFZpZXc9RmFsc2UsYk9ycGhhbmVkUGluPUZhbHNlLCkNCkVuZCBPYmplY3QNCg==" End Object ` await blueprintPage.paste(source) expect(await blueprintPage.blueprintLocator.evaluate(blueprint => blueprint.entity.serialize())) .toEqual(serialized(source)) - // NiagaraScriptVariable_1 (Module.B) already existst with name NiagaraScriptVariable_0 - source = String.raw` - Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_1" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_1'" - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_1'" - End Object - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_2'" - End Object - Begin Object Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_1'" - Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Module.B",TypeDefHandle=(RegisteredTypeIndex=91)) - Metadata=(VariableGuid=74CE7A265A06491AB76AE33EC9455B32) - DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=9EF012F75DA2433BBFC2F81B1B9B0A6F - End Object - Begin Object Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_2'" - Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Module.Default",TypeDefHandle=(RegisteredTypeIndex=88)) - Metadata=(VariableGuid=8A6D271C4C9DED64D135438A48373391) - DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=38DB31CC4AF2996F0AEB61A32004D026 - End Object - ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_2'",OriginalChangeId=38DB31CC4AF2996F0AEB61A32004D026) - ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_1'",OriginalChangeId=9EF012F75DA2433BBFC2F81B1B9B0A6F) - End Object - ` - await blueprintPage.paste(source) - source = String.raw` - Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_1" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_1'" - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_0'" - End Object - Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_2'" - End Object - Begin Object Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_0'" - Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Module.B",TypeDefHandle=(RegisteredTypeIndex=91)) - Metadata=(VariableGuid=74CE7A265A06491AB76AE33EC9455B32) - DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=9EF012F75DA2433BBFC2F81B1B9B0A6F - End Object - Begin Object Name="NiagaraScriptVariable_2" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_1:NiagaraScriptVariable_2'" - Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Module.Default",TypeDefHandle=(RegisteredTypeIndex=88)) - Metadata=(VariableGuid=8A6D271C4C9DED64D135438A48373391) - DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) - ChangeId=38DB31CC4AF2996F0AEB61A32004D026 - End Object - ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_2'",OriginalChangeId=38DB31CC4AF2996F0AEB61A32004D026) - ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_0'",OriginalChangeId=9EF012F75DA2433BBFC2F81B1B9B0A6F) - End Object - ` - expect(await blueprintPage.blueprintLocator.evaluate(blueprint => blueprint.entity.serialize())) - .toEqual(serialized(source)) - }) - test("Avoid adding existing variable", async ({ blueprintPage }) => { + // Var: Local.Module.Input, Local.Module.Input001, Local.Module.Camera Relative Position, Local.Module.X + // Add: Local.Module.Camera Relative Position (3), Local.Module.X (4) + // Has: Local.Module.Input (0), Local.Module.Input001 (1) + source = String.raw` + Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_8" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_8'" + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_4" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_4'" + End Object + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_3" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_3'" + End Object + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_1'" + End Object + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_0'" + End Object + Begin Object Name="NiagaraScriptVariable_4" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_4'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.X",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=9661E7AE20234E159801C8E970F0D03D) + DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) + ChangeId=751E3204296A40409ADC4335E4C33CE6 + End Object + Begin Object Name="NiagaraScriptVariable_3" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_3'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.Camera Relative Position",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=0AD251B024C14B9AB06AAF654E8A3FF1) + DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) + ChangeId=4DD48BD81EA444099BB03E1AAE4F201E + End Object + Begin Object Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_1'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.Input001",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=775A1228426C413AB95CB9049C1E993A) + DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) + ChangeId=C38E0F30344D4A2689CC7972DFBAA6FA + End Object + Begin Object Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_0'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(Name="Local.Module.Input",TypeDefHandle=(RegisteredTypeIndex=59)) + Metadata=(VariableGuid=0DAA63BD5851469990B3FE12816255A5) + ChangeId=2312FB889A9640CFA45B3A9E4AF7FC01 + End Object + ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_0'",OriginalChangeId=2312FB889A9640CFA45B3A9E4AF7FC01) + ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_1'",OriginalChangeId=C38E0F30344D4A2689CC7972DFBAA6FA) + ScriptVariables(2)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_3'",OriginalChangeId=4DD48BD81EA444099BB03E1AAE4F201E) + ScriptVariables(3)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_4'",OriginalChangeId=751E3204296A40409ADC4335E4C33CE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YXQ9RmFsc2UsUGVyc2lzdGVudEd1aWQ9MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAsYkhpZGRlbj1GYWxzZSxiTm90Q29ubmVjdGFibGU9RmFsc2UsYkRlZmF1bHRWYWx1ZUlzUmVhZE9ubHk9RmFsc2UsYkRlZmF1bHRWYWx1ZUlzSWdub3JlZD1GYWxzZSxiQWR2YW5jZWRWaWV3PUZhbHNlLGJPcnBoYW5lZFBpbj1GYWxzZSwpDQpFbmQgT2JqZWN0DQo=" + End Object + ` + await blueprintPage.paste(source) + + source = String.raw` + Begin Object Class=/Script/NiagaraEditor.NiagaraClipboardContent Name="NiagaraClipboardContent_8" ExportPath="/Script/NiagaraEditor.NiagaraClipboardContent'/Engine/Transient.NiagaraClipboardContent_8'" + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_4" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_4'" + End Object + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_3" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_3'" + End Object + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_1'" + End Object + Begin Object Class=/Script/NiagaraEditor.NiagaraScriptVariable Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_0'" + End Object + Begin Object Name="NiagaraScriptVariable_4" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_4'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.X",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=9661E7AE20234E159801C8E970F0D03D) + DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) + ChangeId=751E3204296A40409ADC4335E4C33CE6 + End Object + Begin Object Name="NiagaraScriptVariable_3" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_3'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.Camera Relative Position",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=0AD251B024C14B9AB06AAF654E8A3FF1) + DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) + ChangeId=4DD48BD81EA444099BB03E1AAE4F201E + End Object + Begin Object Name="NiagaraScriptVariable_1" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_1'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(VarData=(0,0,0,0,0,0,0,0,0,0,0,0),Name="Local.Module.Input001",TypeDefHandle=(RegisteredTypeIndex=88)) + Metadata=(VariableGuid=775A1228426C413AB95CB9049C1E993A) + DefaultValueVariant=(Bytes=(0,0,0,0,0,0,0,0,0,0,0,0),CurrentMode=Bytes) + ChangeId=C38E0F30344D4A2689CC7972DFBAA6FA + End Object + Begin Object Name="NiagaraScriptVariable_0" ExportPath="/Script/NiagaraEditor.NiagaraScriptVariable'/Engine/Transient.NiagaraClipboardContent_8:NiagaraScriptVariable_0'" + DefaultMode=FailIfPreviouslyNotSet + Variable=(Name="Local.Module.Input",TypeDefHandle=(RegisteredTypeIndex=59)) + Metadata=(VariableGuid=0DAA63BD5851469990B3FE12816255A5) + ChangeId=2312FB889A9640CFA45B3A9E4AF7FC01 + End Object + ScriptVariables(0)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_0'",OriginalChangeId=2312FB889A9640CFA45B3A9E4AF7FC01) + ScriptVariables(1)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_1'",OriginalChangeId=C38E0F30344D4A2689CC7972DFBAA6FA) + ScriptVariables(2)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_3'",OriginalChangeId=4DD48BD81EA444099BB03E1AAE4F201E) + ScriptVariables(3)=(ScriptVariable="/Script/NiagaraEditor.NiagaraScriptVariable'NiagaraScriptVariable_4'",OriginalChangeId=751E3204296A40409ADC4335E4C33CE6) + ExportedNodes="QmVnaW4gT2JqZWN0IENsYXNzPS9TY3JpcHQvTmlhZ2FyYUVkaXRvci5OaWFnYXJhTm9kZVBhcmFtZXRlck1hcFNldCBOYW1lPSJOaWFnYXJhTm9kZVBhcmFtZXRlck1hcFNldF8xIiBFeHBvcnRQYXRoPSIvU2NyaXB0L05pYWdhcmFFZGl0b3IuTmlhZ2FyYU5vZGVQYXJhbWV0ZXJNYXBTZXQnL0VuZ2luZS9UcmFuc2llbnQuTmV3TmlhZ2FyYVNjcmlwdDI6TmlhZ2FyYVNjcmlwdFNvdXJjZV8wLk5pYWdhcmFHcmFwaF8wLk5pYWdhcmFOb2RlUGFyYW1ldGVyTWFwU2V0XzEnIgogICBDaGFuZ2VJZD05MzVGMjRENzMyMUE0NTREQUNENUY4NzMzNTE3NTVEMg0KICAgTm9kZVBvc1g9LTIyNA0KICAgTm9kZVBvc1k9MTQ0DQogICBOb2RlR3VpZD0yNkEwMEIzNUI4Q0E0RDcwQkVEMTQyODJGRTZENzNFMg0KICAgQ3VzdG9tUHJvcGVydGllcyBQaW4gKFBpbklkPUVDRDQxQjgwQTc5NTQzNUJCQjQwMTA5MkZGOTgwOTQ5LFBpbk5hbWU9IlNvdXJjZSI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2F0ZWdvcnk9IkR5bmFtaWNBZGRQaW4iLFBpblR5cGUuUGluU3ViQ2F0ZWdvcnlPYmplY3Q9Tm9uZSxQaW5UeXBlLlBpblN1YkNhdGVnb3J5TWVtYmVyUmVmZXJlbmNlPSgpLFBpblR5cGUuUGluVmFsdWVUeXBlPSgpLFBpblR5cGUuQ29udGFpbmVyVHlwZT1Ob25lLFBpblR5cGUuYklzUmVmZXJlbmNlPUZhbHNlLFBpblR5cGUuYklzQ29uc3Q9RmFsc2UsUGluVHlwZS5iSXNXZWFrUG9pbnRlcj1GYWxzZSxQaW5UeXBlLmJJc1VPYmplY3RXcmFwcGVyPUZhbHNlLFBpblR5cGUuYlNlcmlhbGl6ZUFzU2luZ2xlUHJlY2lzaW9uRmxvYXQ9RmFsc2UsUGVyc2lzdGVudEd1aWQ9MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAsYkhpZGRlbj1GYWxzZSxiTm90Q29ubmVjdGFibGU9RmFsc2UsYkRlZmF1bHRWYWx1ZUlzUmVhZE9ubHk9RmFsc2UsYkRlZmF1bHRWYWx1ZUlzSWdub3JlZD1GYWxzZSxiQWR2YW5jZWRWaWV3PUZhbHNlLGJPcnBoYW5lZFBpbj1GYWxzZSwpDQpFbmQgT2JqZWN0DQo=" + End Object + ` + // expect(await blueprintPage.blueprintLocator.evaluate(blueprint => blueprint.entity.serialize())) + // .toEqual(serialized(source)) }) })