`}}class jt extends Ft{static singleLineInput=!0;setInputs(e=[],t=!1){e&&0!=e.length||(e=[this.getInput()]);let i=[];for(const t of e){let e=parseFloat(t);isNaN(e)&&(e=0,!1),i.push(e)}super.setInputs(e,!1),this.setDefaultValue(i,e)}setDefaultValue(e=[],t){this.element.setDefaultValue(e[0])}}class Ut extends jt{setDefaultValue(e=[],t=e){this.element.setDefaultValue(new me(e[0]))}renderInput(){return O`
`}}
+var Z,J;class Q extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const i=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=i.firstChild),i}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{var n,s;const r=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:t;let o=r._$litPart$;if(void 0===o){const e=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;r._$litPart$=o=new F(t.insertBefore(C(),e),e,void 0,null!=i?i:{})}return o._$AI(e),o})(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 D}}Q.finalized=!0,Q._$litElement$=!0,null===(Z=globalThis.litElementHydrateSupport)||void 0===Z||Z.call(globalThis,{LitElement:Q});const ee=globalThis.litElementPolyfillSupport;null==ee||ee({LitElement:Q}),(null!==(J=globalThis.litElementVersions)&&void 0!==J?J:globalThis.litElementVersions=[]).push("3.2.2");class te{static#e={"/Script/CoreUObject.LinearColor":r``,"/Script/CoreUObject.Rotator":r``,"/Script/CoreUObject.Transform":r``,"/Script/CoreUObject.Vector":r``,"/Script/Engine.Actor":r``,"/Script/Engine.GameStateBase":r``,"/Script/Engine.Pawn":r``,"/Script/Engine.PlayerState":r``,bool:r``,byte:r``,class:r``,default:r``,exec:r``,int:r``,name:r``,real:r``,string:r``,wildcard: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 defaultCommentHeight=96;static defaultCommentWidth=400;static deleteNodesKeyboardKey="Delete";static dragGeneralEventName="ueb-drag-general";static dragEventName="ueb-drag";static editTextEventName={begin:"ueb-edit-text-begin",end:"ueb-edit-text-end"};static enableZoomIn=["LeftControl","RightControl"];static expandGridSize=400;static focusEventName={begin:"blueprint-focus",end:"blueprint-unfocus"};static fontSize=r``;static getPinColor(e){if(!e)return te.#e.default;if(te.#e[e.pinType])return te.#e[e.pinType];if("struct"==e.entity.PinType.PinCategory||"object"==e.entity.PinType.PinCategory){if("ScriptStruct"===e.entity.PinType.PinSubCategoryObject.type)return r``;if(e.entity.PinType.PinSubCategoryObject.getName().endsWith("Actor"))return te.#e["/Script/Engine.Actor"]}return te.#e.default}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 keysSeparator="+";static linkCurveHeight=15;static linkCurveWidth=80;static linkMinWidth=100;static linkRightSVGPath=(e,t,i)=>{let n=100-e;return`M ${e} 0 C ${t} 0, ${i} 0, 50 50 S ${n-t+e} 100, ${n} 100`};static maxZoom=7;static minZoom=-12;static mouseWheelFactor=.2;static nodeDeleteEventName="ueb-node-delete";static nodeDragGeneralEventName="ueb-node-drag-general";static nodeDragEventName="ueb-node-drag";static nodeName=(e,t)=>`${e}_${t}`;static nodeRadius=8;static nodeReflowEventName="ueb-node-reflow";static nodeType={callFunction:"/Script/BlueprintGraph.K2Node_CallFunction",comment:"/Script/UnrealEd.EdGraphNode_Comment",doN:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:Do N",dynamicCast:"/Script/BlueprintGraph.K2Node_DynamicCast",executionSequence:"/Script/BlueprintGraph.K2Node_ExecutionSequence",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",ifThenElse:"/Script/BlueprintGraph.K2Node_IfThenElse",knot:"/Script/BlueprintGraph.K2Node_Knot",macro:"/Script/BlueprintGraph.K2Node_MacroInstance",makeArray:"/Script/BlueprintGraph.K2Node_MakeArray",makeMap:"/Script/BlueprintGraph.K2Node_MakeMap",pawn:"/Script/Engine.Pawn",reverseForEachLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ReverseForEachLoop",select:"/Script/BlueprintGraph.K2Node_Select",variableGet:"/Script/BlueprintGraph.K2Node_VariableGet",variableSet:"/Script/BlueprintGraph.K2Node_VariableSet",whileLoop:"/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:WhileLoop"};static selectAllKeyboardKey="(bCtrl=True,Key=A)";static distanceThreshold=5;static trackingMouseEventName={begin:"ueb-tracking-mouse-begin",end:"ueb-tracking-mouse-end"};static windowApplyEventName="ueb-window-apply";static windowCancelEventName="ueb-window-cancel";static windowCloseEventName="ueb-window-close";static ModifierKeys=["Ctrl","Shift","Alt","Meta"];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:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",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 ie{#t;get target(){return this.#t}#i;get blueprint(){return this.#i}options;constructor(e,t,i={}){i.consumeEvent??=!1,i.listenOnFocus??=!1,i.unlistenOnTextEdit??=!1,this.#t=e,this.#i=t,this.options=i;let n=this;this.listenHandler=e=>n.listenEvents(),this.unlistenHandler=e=>n.unlistenEvents(),this.options.listenOnFocus&&(this.blueprint.addEventListener(te.focusEventName.begin,this.listenHandler),this.blueprint.addEventListener(te.focusEventName.end,this.unlistenHandler)),this.options.unlistenOnTextEdit&&(this.blueprint.addEventListener(te.editTextEventName.begin,this.unlistenHandler),this.blueprint.addEventListener(te.editTextEventName.end,this.listenHandler))}unlistenDOMElement(){this.unlistenEvents(),this.blueprint.removeEventListener(te.focusEventName.begin,this.listenHandler),this.blueprint.removeEventListener(te.focusEventName.end,this.unlistenHandler),this.blueprint.removeEventListener(te.editTextEventName.begin,this.unlistenHandler),this.blueprint.removeEventListener(te.editTextEventName.end,this.listenHandler)}listenEvents(){}unlistenEvents(){}}class ne{#n;constructor(e){this.#n=e}calculate(e){return this.#n(e)}}class se{#s=new Map;subscribe(e,t){let i=this.#s;if(i.has(e)){let n=i.get(e);if(n.includes(t))return!1;n.push(t)}else{let n=!1,s=Object.getOwnPropertyDescriptor(this,e);if(!s&&(n=!0,s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),e)??{},!s))return!1;i.set(e,[t]);const r="value"in s,o="set"in s;if(!r&&!o)throw new Error(`Property ${e} is not a value or a setter`);const a=Symbol.for(e+"Storage"),l=Symbol.for(e+"ValInfo");Object.defineProperties(n?Object.getPrototypeOf(this):this,{[a]:{configurable:!0,enumerable:!1,...r?{value:this[e],writable:!0}:{get:s.get,set:s.set}},[l]:{configurable:!0,enumerable:!1,value:[n,r]},[e]:{configurable:!0,...r&&{get(){return this[a]}},set(t){this[a]=t,i.get(e).forEach((t=>{t(this[e])}))}}})}return!0}unsubscribe(e,t){let i=this.#s.get(e);if(!i?.includes(t))return!1;if(i.splice(i.indexOf(t),1),0==i.length){const t=Symbol.for(e+"Storage"),i=Symbol.for(e+"ValInfo"),n=this[i][0];this[i][1],Object.defineProperty(n?Object.getPrototypeOf(this):this,e,Object.getOwnPropertyDescriptor(n?Object.getPrototypeOf(this):this,t)),delete this[i],delete this[t]}return!0}}class re{static#r=new Map;static registerSerializer(e,t){re.#r.set(e,t)}static getSerializer(e){return re.#r.get(e)}}class oe{#o;get types(){return this.#o}constructor(...e){this.#o=e}getFirstType(){return this.#o[0]}}class ae{#a;get type(){return this.#a}set type(e){this.#a=e}#l=!0;get showDefault(){return this.#l}set showDefault(e){this.#l=e}#u;get value(){return this.#u}set value(e){this.#u=e}#c;get serialized(){return this.#c}set serialized(e){this.#c=e}#h;get ignored(){return this.#h}set ignored(e){this.#h=e}static isValueOfType(e,t){return null!=e&&(e instanceof t||e.constructor===t)}static sanitize(e,t){if(void 0===t&&(t=e?.constructor),t instanceof Array){let i=t.find((t=>ae.isValueOfType(e,t)));i||(i=t[0]),t=i}return t&&!ae.isValueOfType(e,t)&&(e=new t(e)),(e instanceof Boolean||e instanceof Number||e instanceof String)&&(e=e.valueOf()),e}constructor(e,t=!0,i,n=!1,s=!1){void 0===i&&(i=e instanceof Array?[]:n?"":()=>ae.sanitize(new e)),this.#a=e,this.#l=t,this.#u=i,this.#c=n,this.#h=s}}class le{static emptyObj={};static booleanConverter={fromAttribute:(e,t)=>{},toAttribute:(e,t)=>!0===e?"true":!1===e?"false":""};static sigmoid(e,t=1.7){return 1/(1+e/(1-e)**-t)}static clamp(e,t,i){return Math.min(Math.max(e,t),i)}static getScale(e){const t=getComputedStyle(e).getPropertyValue("--ueb-scale");return""!=t?parseFloat(t):1}static minDecimals(e,t=1){const i=e*10**t;return Math.abs(i%1)>Number.EPSILON?e.toString():e.toFixed(t)}static roundDecimals(e,t=1){const i=10**t;return Math.round(e*i)/i}static approximatelyEqual(e,t){return!(Math.abs(e-t)>Number.EPSILON)}static convertLocation(e,t){const i=1/le.getScale(t),n=t.getBoundingClientRect();return[Math.round((e[0]-n.x)*i),Math.round((e[1]-n.y)*i)]}static isSerialized(e,t,i=le.objectGet(e.constructor.attributes,t)){return i instanceof ne?le.isSerialized(e,t,i.calculate(e)):i instanceof ae&&(!!i.serialized||le.isSerialized(e,t,i.type))}static objectGet(e,t,i){if(void 0!==e){if(!(t instanceof Array))throw new TypeError("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]]:le.objectGet(e[t[0]],t.slice(1),i):i}}static objectSet(e,t,i,n=!1,s=Object){if(!(t instanceof Array))throw new TypeError("Expected keys to be an array.");if(1==t.length){if(n||t[0]in e||void 0===e[t[0]])return e[t[0]]=i,!0}else if(t.length>0)return!n||e[t[0]]instanceof Object||(e[t[0]]=new s),le.objectSet(e[t[0]],t.slice(1),i,n,s);return!1}static equals(e,t){return(e=ae.sanitize(e))===(t=ae.sanitize(t))||(e instanceof Array&&t instanceof Array?e.length==t.length&&!e.find(((e,i)=>!le.equals(e,t[i]))):void 0)}static getType(e){return null===e?null:e instanceof ae?le.getType(e.type):e instanceof oe?e.types:e instanceof Function?e:e?.constructor}static snapToGrid(e,t){return 1===t?e:[t*Math.round(e[0]/t),t*Math.round(e[1]/t)]}static mergeArrays(e=[],t=[]){let i=[];for(let n=0;n","\n").replaceAll(/(\)/g,"")}static capitalFirstLetter(e){return 0===e.length?e:e.charAt(0).toLocaleUpperCase()+e.slice(1).toLocaleLowerCase()}static formatStringName(e){return e.trim().replace(/^b/,"").replaceAll(/^K2(?:Node|node)?_|(?<=[a-z])(?=[A-Z])|_|\s+/g," ").split(" ").map((e=>le.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 printLinearColor(e){return`${Math.round(255*e.R.valueOf())}, ${Math.round(255*e.G.valueOf())}, ${Math.round(255*e.B.valueOf())}`}static getPolarCoordinates([e,t],i=!1){let n=Math.atan2(t,e);return i&&n<0&&(n=2*Math.PI+n),[Math.sqrt(e*e+t*t),n]}static getCartesianCoordinates([e,t]){return[e*Math.cos(t),e*Math.sin(t)]}static range(e,t,i=1){return Array.from({length:Math.ceil((t-e)/i)},((t,n)=>e+n*i))}}class ue extends se{static attributes={};constructor(e={}){super();const t=(e,i,n={},s="")=>{const r=Object.getOwnPropertyNames(n);for(let o of le.mergeArrays(Object.getOwnPropertyNames(i),r)){let a=le.objectGet(n,[o]),l=i[o],u=le.getType(l);if(l instanceof ne&&(l=l.calculate(this),u=le.getType(l)),null!=l&&l===u&&(l=new u),o in i?!(r.length>0)||o in n||void 0===l||l instanceof ae&&(!l.showDefault||l.ignored)||console.warn(`${this.constructor.name} will add attribute ${s}${o} not defined in the serialized data`):console.warn(`Attribute ${s}${o} in the serialized data is not defined in ${this.constructor.name}.attributes`),u!==Object)if(void 0===a){if(l instanceof ae){if(!l.showDefault){e[o]=void 0;continue}l.serialized?l="":(u=l.type,l=l.value,l instanceof Function&&(l=l()))}l instanceof oe&&(u=l.getFirstType(),l=ae.sanitize(null,u)),l instanceof Array&&(l=[]),e[o]=ae.sanitize(l,u)}else a?.constructor===String&&l instanceof ae&&l.serialized&&l.type!==String&&(a=re.getSerializer(l.type).deserialize(a)),e[o]=ae.sanitize(a,le.getType(l));else e[o]={},t(e[o],i[o],n[o],o+".")}},i=this.constructor.attributes;e.constructor!==Object&&1===Object.getOwnPropertyNames(i).length&&(e={[Object.getOwnPropertyNames(i)[0]]:e}),t(this,i,e)}unexpectedKeys(){return Object.getOwnPropertyNames(this).length-Object.getOwnPropertyNames(this.constructor.attributes).length}}class ce extends ue{static attributes={type:String,path:String};constructor(e={}){e.constructor!==Object&&(e={path:e}),super(e),this.type,this.path}getName(){return this.path.match(/[^\.\/]+$/)[0]}}class he extends ue{static attributes={MemberParent:new ae(ce,!1),MemberName:""};constructor(e){super(e),this.MemberParent,this.MemberName}}class de extends ue{static attributes={value:String};static generateGuid(e=!0){let t=new Uint32Array(4);!0===e&&crypto.getRandomValues(t);let i="";return t.forEach((e=>{i+=("0".repeat(8)+e.toString(16).toUpperCase()).slice(-8)})),new de({value:i})}constructor(e){e||(e=de.generateGuid().value),super(e),this.value}valueOf(){return this.value}toString(){return this.value}}class pe extends ue{static attributes={value:String};static attributeConverter={fromAttribute:(e,t)=>new pe(e),toAttribute:(e,t)=>e.toString()};constructor(e){super(e),this.value}valueOf(){return this.value}toString(){return this.value}}class me extends ue{static attributes={value:0};constructor(e=0){super(e),this.value=Math.round(this.value)}valueOf(){return this.value}toString(){return this.value.toString()}}class ge extends ue{static lookbehind="INVTEXT";static attributes={value:String};constructor(e){super(e),this.value}}class be extends ue{static attributes={ActionName:"",bShift:!1,bCtrl:!1,bAlt:!1,bCmd:!1,Key:pe};constructor(e={}){e.ActionName=e.ActionName??"",e.bShift=e.bShift??!1,e.bCtrl=e.bCtrl??!1,e.bAlt=e.bAlt??!1,e.bCmd=e.bCmd??!1,super(e),this.ActionName,this.bShift,this.bCtrl,this.bAlt,this.bCmd,this.Key}}class ve extends ue{static attributes={value:0};constructor(e=0){super(e),this.value=le.clamp(this.value,0,1)}valueOf(){return this.value}toString(){return this.value.toFixed(6)}}class fe extends ue{static attributes={R:ve,G:ve,B:ve,A:new ae(ve,!0,(()=>new ve(1)),!1,!0),H:new ae(ve,!0,void 0,!1,!0),S:new ae(ve,!0,void 0,!1,!0),V:new ae(ve,!0,void 0,!1,!0)};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 fe({R:1,G:1,B:1})}constructor(e){e instanceof Array&&(e={R:e[0]??0,G:e[1]??0,B:e[2]??0,A:e[3]??1}),super(e),this.R,this.G,this.B,this.A,this.H,this.S,this.V,this.#d()}#d(){const e=this.R.value,t=this.G.value,i=this.B.value;if(le.approximatelyEqual(e,t)&&le.approximatelyEqual(e,i)&&le.approximatelyEqual(t,i))return this.S.value=0,void(this.V.value=e);const n=Math.max(e,t,i),s=Math.min(e,t,i),r=n-s;let o;switch(n){case s:o=0;break;case e:o=(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)}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=fe.sRGBtoLinear((e>>8&255)/255),this.G.value=fe.sRGBtoLinear((e>>16&255)/255),this.R.value=fe.sRGBtoLinear((e>>24&255)/255),this.#d()}toString(){return le.printLinearColor(this)}}class ye extends ue{static lookbehind="NSLOCTEXT";static attributes={namespace:String,key:String,value:String};constructor(e){super(e),this.namespace,this.key,this.value}toString(){return le.capitalFirstLetter(this.value)}}class we extends ue{static attributes={MacroGraph:ce,GraphBlueprint:ce,GraphGuid:de};constructor(e){super(e),this.MacroGraph,this.GraphBlueprint,this.GuidEntity}getMacroName(){const e=this.MacroGraph.path.search(":");return this.MacroGraph.path.substring(e+1)}}class Ee extends ue{static attributes={value:String};constructor(e){super(e),this.value}valueOf(){return this.value}toString(){return this.value}}class Se extends ue{static attributes={objectName:Ee,pinGuid:de};constructor(e){super(e),this.objectName,this.pinGuid}}class Pe extends ue{static attributes={R:Number,P:Number,Y:Number};constructor(e){super(e),this.R,this.P,this.Y}}class Ce extends Pe{}class ke extends ue{static attributes={X:Number,Y:Number,Z:Number};constructor(e){super(e),this.X,this.Y,this.Z}}class xe extends ke{}class Le extends ue{static#p={"/Script/CoreUObject.LinearColor":fe,"/Script/CoreUObject.Rotator":Pe,"/Script/CoreUObject.Vector":ke,bool:Boolean,exec:String,int:me,name:String,real:Number,string:String};static#m={"/Script/CoreUObject.Vector":xe,"/Script/CoreUObject.Rotator":Ce};static lookbehind="Pin";static attributes={PinId:de,PinName:"",PinFriendlyName:new ae(new oe(ye,String),!1,null),PinToolTip:new ae(String,!1,""),Direction:new ae(String,!1,""),PinType:{PinCategory:"",PinSubCategory:"",PinSubCategoryObject:ce,PinSubCategoryMemberReference:null,PinValueType:null,ContainerType:ce,bIsReference:!1,bIsConst:!1,bIsWeakPointer:!1,bIsUObjectWrapper:!1,bSerializeAsSinglePrecisionFloat:!1},LinkedTo:new ae([Se],!1),DefaultValue:new ne((e=>new ae(Le.getEntityType(e.getType(),!0)??String,!1,void 0,!0))),AutogeneratedDefaultValue:new ae(String,!1),DefaultObject:new ae(ce,!1,null),PersistentGuid:de,bHidden:!1,bNotConnectable:!1,bDefaultValueIsReadOnly:!1,bDefaultValueIsIgnored:!1,bAdvancedView:!1,bOrphanedPin:!1};static getEntityType(e,t=!1){const[i,n]=[this.#p[e],this.#m[e]];return t&&void 0!==n?n:i}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}getType(){return"struct"==this.PinType.PinCategory||"object"==this.PinType.PinCategory?this.PinType.PinSubCategoryObject.path:this.PinType.PinCategory}getDisplayName(){let e=null;return this.PinToolTip&&(e=this.PinToolTip.match(/\s*(.+?(?=\n)|.+\S)\s*/))?le.formatStringName(e[1]):le.formatStringName(this.PinName)}copyTypeFrom(e){this.PinType.PinCategory=e.PinType.PinCategory,this.PinType.PinSubCategory=e.PinType.PinSubCategory,this.PinType.PinSubCategoryObject=e.PinType.PinSubCategoryObject,this.PinType.PinSubCategoryMemberReference=e.PinType.PinSubCategoryMemberReference,this.PinType.PinValueType=e.PinType.PinValueType,this.PinType.ContainerType=e.PinType.ContainerType,this.PinType.bIsReference=e.PinType.bIsReference,this.PinType.bIsConst=e.PinType.bIsConst,this.PinType.bIsWeakPointer=e.PinType.bIsWeakPointer,this.PinType.bIsUObjectWrapper=e.PinType.bIsUObjectWrapper,this.PinType.bSerializeAsSinglePrecisionFloat=e.PinType.bSerializeAsSinglePrecisionFloat}getDefaultValue(){return this.DefaultValue}isExecution(){return"exec"===this.PinType.PinCategory}isHidden(){return this.bHidden}isInput(){return!this.bHidden&&"EGPD_Output"!=this.Direction}isOutput(){return!this.bHidden&&"EGPD_Output"==this.Direction}isLinked(){return this.LinkedTo?.length>0??!1}linkTo(e,t){this.LinkedTo;const i=this.LinkedTo?.find((i=>i.objectName.toString()==e&&i.pinGuid.valueOf()==t.PinId.valueOf()));return!i&&((this.LinkedTo??(this.LinkedTo=[])).push(new Se({objectName:e,pinGuid:t.PinId})),!0)}unlinkFrom(e,t){const i=this.LinkedTo?.findIndex((i=>i.objectName.toString()==e&&i.pinGuid.valueOf()==t.PinId.valueOf()));return i>=0&&(1==this.LinkedTo.length?this.LinkedTo=void 0:this.LinkedTo.splice(i,1),!0)}getSubCategory(){return this.PinType.PinSubCategoryObject.path}}class Ne extends ue{static attributes={value:String};constructor(e){super(e),this.value}}class Te extends ue{static attributes={MemberScope:new ae(String,!1),MemberName:String,MemberGuid:de,bSelfContext:new ae(Boolean,!1,!1)};constructor(e){super(e),this.MemberName,this.GuidEntity,this.bSelfContext}}class Ae extends ue{static attributes={Class:ce,Name:"",bIsPureFunc:new ae(Boolean,!1,!1),VariableReference:new ae(Te,!1,null),SelfContextInfo:new ae(Ne,!1,null),FunctionReference:new ae(he,!1,null),EventReference:new ae(he,!1,null),TargetType:new ae(ce,!1,null),MacroGraphReference:new ae(we,!1,null),Enum:new ae(ce,!1),CommentColor:new ae(fe,!1),bCommentBubbleVisible_InDetailsPanel:new ae(Boolean,!1),bColorCommentBubble:new ae(Boolean,!1,!1),MoveMode:new ae(Ne,!1),NodePosX:me,NodePosY:me,NodeWidth:new ae(me,!1),NodeHeight:new ae(me,!1),bCommentBubblePinned:new ae(Boolean,!1),bCommentBubbleVisible:new ae(Boolean,!1),NodeComment:new ae(String,!1),AdvancedPinDisplay:new ae(pe,!1,null),EnabledState:new ae(pe,!1,null),NodeGuid:de,ErrorType:new ae(me,!1),ErrorMsg:new ae(String,!1,""),CustomProperties:[Le]};static nameRegex=/^(\w+?)(?:_(\d+))?$/;static sequencerScriptingNameRegex=/\/Script\/SequencerScripting\.MovieSceneScripting(.+)Channel/;constructor(e){super(e),this.Class,this.Name,this.bIsPureFunc,this.VariableReference,this.FunctionReference,this.EventReference,this.TargetType,this.MacroGraphReference,this.Enum,this.CommentColor,this.bCommentBubbleVisible_InDetailsPanel,this.NodePosX,this.NodePosY,this.NodeWidth,this.NodeHeight,this.bCommentBubblePinned,this.bCommentBubbleVisible,this.NodeComment,this.AdvancedPinDisplay,this.EnabledState,this.NodeGuid,this.ErrorType,this.ErrorMsg,this.CustomProperties}getClass(){return this.Class.path}getType(){let e=this.getClass();return e===te.nodeType.macro?this.MacroGraphReference.MacroGraph.path:e}getObjectName(e=!1){return e?this.getNameAndCounter()[0]:this.Name}getNameAndCounter(){const e=this.getObjectName(!1).match(Ae.nameRegex);let t="",i=null;return e?(e.length>1&&(t=e[1]),e.length>2&&(i=parseInt(e[2])),[t,i]):["",0]}getDisplayName(){switch(this.getType()){case te.nodeType.callFunction:if("AddKey"===this.FunctionReference.MemberName){let e=this.FunctionReference.MemberParent.path.match(Ae.sequencerScriptingNameRegex);if(e)return`Add Key (${le.formatStringName(e[1])})`}return le.formatStringName(this.FunctionReference.MemberName);case te.nodeType.dynamicCast:return`Cast To ${this.TargetType.getName()}`;case te.nodeType.executionSequence:return"Sequence";case te.nodeType.ifThenElse:return"Branch";case te.nodeType.forEachElementInEnum:return`For Each ${this.Enum.getName()}`;case te.nodeType.forEachLoopWithBreak:return"For Each Loop with Break";case te.nodeType.variableGet:return"";case te.nodeType.variableSet:return"SET";default:return this.getClass()===te.nodeType.macro?le.formatStringName(this.MacroGraphReference.getMacroName()):le.formatStringName(this.getNameAndCounter()[0])}}getCounter(){return this.getNameAndCounter()[1]}getNodeWidth(){return this.NodeWidth??this.getType()==te.nodeType.comment?te.defaultCommentWidth:void 0}setNodeWidth(e){this.NodeWidth||(this.NodeWidth=new me),this.NodeWidth.value=e}getNodeHeight(){return this.NodeHeight??this.getType()==te.nodeType.comment?te.defaultCommentHeight:void 0}setNodeHeight(e){this.NodeHeight||(this.NodeHeight=new me),this.NodeHeight.value=e}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Me={exports:{}};"undefined"!=typeof self&&self;var He=$e(Me.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){function n(e){if(!(this instanceof n))return new n(e);this._=e}var s=n.prototype;function r(e,t){for(var i=0;i>7),buf:function(e){var t=o((function(e,t,i,n){return e.concat(i===n.length-1?Buffer.from([t,0]).readUInt16BE(0):n.readUInt16BE(i))}),[],e);return Buffer.from(a((function(e){return(e<<1&65535)>>8}),t))}(i.buf)}})),i}function u(){return"undefined"!=typeof Buffer}function c(){if(!u())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function h(e){c();var t=o((function(e,t){return e+t}),0,e);if(t%8!=0)throw new Error("The bits ["+e.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var i,s=t/8,r=(i=function(e){return e>48},o((function(e,t){return e||(i(t)?t:e)}),null,e));if(r)throw new Error(r+" bit range requested exceeds 48 bit (6 byte) Number max.");return new n((function(t,i){var n=s+i;return n>t.length?S(i,s.toString()+" bytes"):E(n,o((function(e,t){var i=l(t,e.buf);return{coll:e.coll.concat(i.v),buf:i.buf}}),{coll:[],buf:t.slice(i,n)},e).coll)}))}function d(e,t){return new n((function(i,n){return c(),n+t>i.length?S(n,t+" bytes for "+e):E(n+t,i.slice(n,n+t))}))}function p(e,t){if("number"!=typeof(i=t)||Math.floor(i)!==i||t<0||t>6)throw new Error(e+" requires integer length in range [0, 6].");var i}function m(e){return p("uintBE",e),d("uintBE("+e+")",e).map((function(t){return t.readUIntBE(0,e)}))}function g(e){return p("uintLE",e),d("uintLE("+e+")",e).map((function(t){return t.readUIntLE(0,e)}))}function b(e){return p("intBE",e),d("intBE("+e+")",e).map((function(t){return t.readIntBE(0,e)}))}function v(e){return p("intLE",e),d("intLE("+e+")",e).map((function(t){return t.readIntLE(0,e)}))}function f(e){return e instanceof n}function y(e){return"[object Array]"==={}.toString.call(e)}function w(e){return u()&&Buffer.isBuffer(e)}function E(e,t){return{status:!0,index:e,value:t,furthest:-1,expected:[]}}function S(e,t){return y(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:e,expected:t}}function P(e,t){if(!t)return e;if(e.furthest>t.furthest)return e;var i=e.furthest===t.furthest?function(e,t){if(function(){if(void 0!==n._supportsSet)return n._supportsSet;var e="undefined"!=typeof Set;return n._supportsSet=e,e}()&&Array.from){for(var i=new Set(e),s=0;s=0;){if(o in i){n=i[o].line,0===r&&(r=i[o].lineStart);break}("\n"===e.charAt(o)||"\r"===e.charAt(o)&&"\n"!==e.charAt(o+1))&&(s++,0===r&&(r=o+1)),o--}var a=n+s,l=t-r;return i[t]={line:a,lineStart:r},{offset:t,line:a+1,column:l+1}}function x(e){if(!f(e))throw new Error("not a parser: "+e)}function L(e,t){return"string"==typeof e?e.charAt(t):e[t]}function N(e){if("number"!=typeof e)throw new Error("not a number: "+e)}function T(e){if("function"!=typeof e)throw new Error("not a function: "+e)}function A(e){if("string"!=typeof e)throw new Error("not a string: "+e)}var $=2,M=3,H=8,O=5*H,D=4*H,B=" ";function z(e,t){return new Array(t+1).join(e)}function I(e,t,i){var n=t-e.length;return n<=0?e:z(i,n)+e}function R(e,t,i,n){return{from:e-t>0?e-t:0,to:e+i>n?n:e+i}}function V(e,t){var i,n,s,r,l,u=t.index,c=u.offset,h=1;if(c===e.length)return"Got the end of the input";if(w(e)){var d=c-c%H,p=c-d,m=R(d,O,D+H,e.length),g=a((function(e){return a((function(e){return I(e.toString(16),2,"0")}),e)}),function(e,t){var i=e.length,n=[],s=0;if(i<=t)return[e.slice()];for(var r=0;r=4&&(i+=1),h=2,s=a((function(e){return e.length<=4?e.join(" "):e.slice(0,4).join(" ")+" "+e.slice(4).join(" ")}),g),(l=(8*(r.to>0?r.to-1:r.to)).toString(16).length)<2&&(l=2)}else{var b=e.split(/\r\n|[\n\r\u2028\u2029]/);i=u.column-1,n=u.line-1,r=R(n,$,M,b.length),s=b.slice(r.from,r.to),l=r.to.toString().length}var v=n-r.from;return w(e)&&(l=(8*(r.to>0?r.to-1:r.to)).toString(16).length)<2&&(l=2),o((function(t,n,s){var o,a=s===v,u=a?"> ":B;return o=w(e)?I((8*(r.from+s)).toString(16),l,"0"):I((r.from+s+1).toString(),l," "),[].concat(t,[u+o+" | "+n],a?[B+z(" ",l)+" | "+I("",i," ")+z("^",h)]:[])}),[],s).join("\n")}function _(e,t){return["\n","-- PARSING FAILED "+z("-",50),"\n\n",V(e,t),"\n\n",(i=t.expected,1===i.length?"Expected:\n\n"+i[0]:"Expected one of the following: \n\n"+i.join(", ")),"\n"].join("");var i}function G(e){return void 0!==e.flags?e.flags:[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.unicode?"u":"",e.sticky?"y":""].join("")}function F(){for(var e=[].slice.call(arguments),t=e.length,i=0;i=2?N(t):t=0;var i=function(e){return RegExp("^(?:"+e.source+")",G(e))}(e),s=""+e;return n((function(e,n){var r=i.exec(e.slice(n));if(r){if(0<=t&&t<=r.length){var o=r[0],a=r[t];return E(n+o.length,a)}return S(n,"valid match group (0 to "+r.length+") in "+s)}return S(n,s)}))}function q(e){return n((function(t,i){return E(i,e)}))}function Z(e){return n((function(t,i){return S(i,e)}))}function J(e){if(f(e))return n((function(t,i){var n=e._(t,i);return n.index=i,n.value="",n}));if("string"==typeof e)return J(K(e));if(e instanceof RegExp)return J(Y(e));throw new Error("not a string, regexp, or parser: "+e)}function Q(e){return x(e),n((function(t,i){var n=e._(t,i),s=t.slice(i,n.index);return n.status?S(i,'not "'+s+'"'):E(i,null)}))}function ee(e){return T(e),n((function(t,i){var n=L(t,i);return i=e.length?S(t,"any character/byte"):E(t+1,L(e,t))})),re=n((function(e,t){return E(e.length,e.slice(t))})),oe=n((function(e,t){return t=0})).desc(t)},n.optWhitespace=he,n.Parser=n,n.range=function(e,t){return ee((function(i){return e<=i&&i<=t})).desc(e+"-"+t)},n.regex=Y,n.regexp=Y,n.sepBy=W,n.sepBy1=X,n.seq=F,n.seqMap=j,n.seqObj=function(){for(var e,t={},i=0,s=(e=arguments,Array.prototype.slice.call(e)),r=s.length,o=0;o255)throw new Error("Value specified to byte constructor ("+e+"=0x"+e.toString(16)+") is larger in value than a single byte.");var t=(e>15?"0x":"0x0")+e.toString(16);return n((function(i,n){var s=L(i,n);return s===e?E(n+1,s):S(n,t)}))},buffer:function(e){return d("buffer",e).map((function(e){return Buffer.from(e)}))},encodedString:function(e,t){return d("string",t).map((function(t){return t.toString(e)}))},uintBE:m,uint8BE:m(1),uint16BE:m(2),uint32BE:m(4),uintLE:g,uint8LE:g(1),uint16LE:g(2),uint32LE:g(4),intBE:b,int8BE:b(1),int16BE:b(2),int32BE:b(4),intLE:v,int8LE:v(1),int16LE:v(2),int32LE:v(4),floatBE:d("floatBE",4).map((function(e){return e.readFloatBE(0)})),floatLE:d("floatLE",4).map((function(e){return e.readFloatLE(0)})),doubleBE:d("doubleBE",8).map((function(e){return e.readDoubleBE(0)})),doubleLE:d("doubleLE",8).map((function(e){return e.readDoubleLE(0)}))},e.exports=n}]));class Oe extends ue{static attributes={lookbehind:new ae(String,!1,"",!1,!0)};constructor(e){super(e),this.lookbehind}}let De=He;class Be{static getGrammarForType(e,t,i=e.AttributeAnyValue){if(t instanceof ae){let n=Be.getGrammarForType(e,t.type,i);return!t.serialized||t.type instanceof String||(n=n.wrap(De.string('"'),De.string('"'))),n}switch(le.getType(t)){case Array:return De.seqMap(De.string("("),t.map((t=>Be.getGrammarForType(e,le.getType(t)))).reduce(((t,i)=>i&&t!==e.AttributeAnyValue?t.or(i):e.AttributeAnyValue)).trim(De.optWhitespace).sepBy(De.string(",")).skip(De.regex(/,?\s*/)),De.string(")"),((e,t,i)=>t));case Boolean:return e.Boolean;case he:return e.FunctionReference;case de:return e.Guid;case pe:return e.Identifier;case me:return e.Integer;case ge:return e.InvariantText;case fe:return e.LinearColor;case ye:return e.LocalizedText;case we:return e.MacroGraphReference;case Number:return e.Number;case ce:return e.ObjectReference;case Le:return e.Pin;case Se:return e.PinReference;case ve:return e.RealUnit;case Pe:return e.Rotator;case Ce:return e.SimpleSerializationRotator;case xe:return e.SimpleSerializationVector;case String:return e.String;case Ne:return e.Symbol;case oe:return t.types.map((t=>Be.getGrammarForType(e,le.getType(t)))).reduce(((t,i)=>i&&t!==e.AttributeAnyValue?t.or(i):e.AttributeAnyValue));case Te:return e.VariableReference;case ke:return e.Vector;default:return i}}static ReferencePath=(e,t)=>De.alt(t,De.seq(De.string("/"),t.map((e=>e.toString())).sepBy1(De.string(".")).tieWith(".").sepBy1(De.string(":")).tieWith(":")).tie().atLeast(2).tie());static createAttributeGrammar=(e,t,i=De.string("=").trim(De.optWhitespace))=>e.AttributeName.skip(i).chain((i=>{const n=i.split("."),s=le.objectGet(t.attributes,n);return Be.getGrammarForType(e,s,e.AttributeAnyValue).map((e=>t=>le.objectSet(t,n,e,!0)))}));static createEntityGrammar=(e,t,i=!1)=>De.seqMap(t.lookbehind?De.seq(De.string(t.lookbehind),De.optWhitespace,De.string("(")):De.string("("),Be.createAttributeGrammar(e,t).trim(De.optWhitespace).sepBy(De.string(",")).skip(De.regex(/,?/).then(De.optWhitespace)),De.string(")"),((e,t,i)=>{let n={};return t.forEach((e=>e(n))),n})).chain((e=>{if(i){let i=0,n=0;for(const s in e)i+=s in t.attributes?0:1,++n;if(i+.5>Math.sqrt(n))return De.fail()}return De.succeed().map((()=>new t(e)))}));InlineWhitespace=e=>De.regex(/[^\S\n]+/).desc("single line whitespace");InlineOptWhitespace=e=>De.regex(/[^\S\n]*/).desc("single line optional whitespace");MultilineWhitespace=e=>De.regex(/[^\S\n]*\n\s*/).desc("whitespace with at least a newline");Null=e=>De.seq(De.string("("),e.InlineOptWhitespace,De.string(")")).map((()=>null)).desc("null: ()");Boolean=e=>De.alt(De.string("True"),De.string("true"),De.string("False"),De.string("false")).map((e=>"true"===e.toLocaleLowerCase())).desc("either True or False");HexDigit=e=>De.regex(/[0-9a-fA-f]/).desc("hexadecimal digit");Number=e=>De.regex(/[-\+]?[0-9]+(?:\.[0-9]+)?/).map(Number).desc("a number");RealNumber=e=>De.regex(/[-\+]?[0-9]+\.[0-9]+/).map(Number).desc("a number written as real");RealUnit=e=>De.regex(/\+?[0-9]+(?:\.[0-9]+)?/).map(Number).assert((e=>e>=0&&e<=1)).desc("a number between 0 and 1");NaturalNumber=e=>De.regex(/0|[1-9]\d*/).map(Number).desc("a natural number");ColorNumber=e=>e.NaturalNumber.assert((e=>0<=e&&e<256),"the color must be between 0 and 256 excluded");Word=e=>De.regex(/[a-zA-Z_]+/).desc("a word");String=e=>De.regex(/(?:[^"\\]|\\.)*/).wrap(De.string('"'),De.string('"')).map(le.unescapeString).desc('string (with possibility to escape the quote using ")');AttributeName=e=>e.Word.sepBy1(De.string(".")).tieWith(".").desc("dot-separated words");None=e=>De.string("None").map((()=>new ce({type:"None",path:""}))).desc("none");Integer=e=>De.regex(/[\-\+]?[0-9]+/).map((e=>new me(e))).desc("an integer");Guid=e=>e.HexDigit.times(32).tie().map((e=>new de({value:e}))).desc("32 digit hexadecimal value");Identifier=e=>De.regex(/\w+/).map((e=>new pe(e)));PathSymbol=e=>De.regex(/[0-9\w]+/).map((e=>new Ee({value:e})));PathSymbolOptSpaces=e=>De.regex(/[0-9\w]+(?: [0-9\w]+)+|[0-9\w]+/).map((e=>new Ee({value:e})));Symbol=e=>De.regex(/\w+/).map((e=>new Ne({value:e})));ObjectReference=e=>De.alt(e.None,...[Be.ReferencePath(e,e.PathSymbolOptSpaces).map((e=>new ce({type:"",path:e})))].flatMap((e=>[e.wrap(De.string('"'),De.string('"')),e.wrap(De.string("'\""),De.string("\"'"))])),De.seqMap(e.Word,De.optWhitespace,De.alt(...[Be.ReferencePath(e,e.PathSymbolOptSpaces)].flatMap((e=>[e.wrap(De.string('"'),De.string('"')),e.wrap(De.string("'\""),De.string("\"'"))]))),((e,t,i)=>new ce({type:e,path:i}))),Be.ReferencePath(e,e.PathSymbol).map((e=>new ce({type:"",path:e}))),e.Word.map((e=>new ce({type:e,path:""}))));LocalizedText=e=>De.seqMap(De.string(ye.lookbehind).skip(De.optWhitespace).skip(De.string("(")),e.String.trim(De.optWhitespace),De.string(","),e.String.trim(De.optWhitespace),De.string(","),e.String.trim(De.optWhitespace),De.string(")"),((e,t,i,n,s,r,o)=>new ye({namespace:t,key:n,value:r})));InvariantText=e=>e.String.trim(De.optWhitespace).wrap(De.string(ge.lookbehind).skip(De.optWhitespace).skip(De.string("(")),De.string(")")).map((e=>new ge({value:e})));AttributeAnyValue=e=>De.alt(e.Boolean,e.Guid,e.None,e.Null,e.Number,e.String,e.LocalizedText,e.InvariantText,Be.createEntityGrammar(e,ke,!0),Be.createEntityGrammar(e,fe,!0),e.UnknownKeys,e.ObjectReference,e.Symbol);PinReference=e=>De.seqMap(e.PathSymbol,De.whitespace,e.Guid,((e,t,i)=>new Se({objectName:e,pinGuid:i})));Vector=e=>Be.createEntityGrammar(e,ke);Rotator=e=>Be.createEntityGrammar(e,Pe);SimpleSerializationRotator=e=>De.seqMap(e.Number,De.string(",").trim(De.optWhitespace),e.Number,De.string(",").trim(De.optWhitespace),e.Number,((e,t,i,n,s)=>new Ce({R:s,P:e,Y:i})));SimpleSerializationVector=e=>De.seqMap(e.Number,De.string(",").trim(De.optWhitespace),e.Number,De.string(",").trim(De.optWhitespace),e.Number,((e,t,i,n,s)=>new xe({X:e,Y:i,Z:s})));LinearColor=e=>Be.createEntityGrammar(e,fe);FunctionReference=e=>Be.createEntityGrammar(e,he);VariableReference=e=>Be.createEntityGrammar(e,Te);MacroGraphReference=e=>Be.createEntityGrammar(e,we);KeyBinding=e=>De.alt(e.Identifier.map((e=>new be({Key:e}))),Be.createEntityGrammar(e,be));Pin=e=>Be.createEntityGrammar(e,Le);CustomProperties=e=>De.string("CustomProperties").then(De.whitespace).then(e.Pin).map((e=>t=>{let i=le.objectGet(t,["CustomProperties"],[]);i.push(e),le.objectSet(t,["CustomProperties"],i,!0)}));Object=e=>De.seqMap(De.seq(De.string("Begin"),De.whitespace,De.string("Object"),De.whitespace),De.alt(e.CustomProperties,Be.createAttributeGrammar(e,Ae)).sepBy1(De.whitespace),De.seq(e.MultilineWhitespace,De.string("End"),De.whitespace,De.string("Object")),((e,t,i)=>{let n={};return t.forEach((e=>e(n))),new Ae(n)}));MultipleObject=e=>e.Object.sepBy1(De.whitespace).trim(De.optWhitespace);LinearColorFromHex=e=>De.string("#").then(e.HexDigit.times(2).tie().times(3,4)).trim(De.optWhitespace).map((([e,t,i,n])=>new fe({R:parseInt(e,16)/255,G:parseInt(t,16)/255,B:parseInt(i,16)/255,A:n?parseInt(n,16)/255:1})));LinearColorFromRGBList=e=>De.seqMap(e.ColorNumber,De.string(",").skip(De.optWhitespace),e.ColorNumber,De.string(",").skip(De.optWhitespace),e.ColorNumber.map(Number),((e,t,i,n,s)=>new fe({R:e/255,G:i/255,B:s/255,A:1})));LinearColorFromRGB=e=>De.string("rgb").then(e.LinearColorFromRGBList.wrap(De.regex(/\(\s*/),De.regex(/\s*\)/)));LinearColorFromRGBA=e=>De.string("rgba").then(De.seqMap(e.ColorNumber,De.string(",").skip(De.optWhitespace),e.ColorNumber,De.string(",").skip(De.optWhitespace),e.ColorNumber.map(Number),De.string(",").skip(De.optWhitespace),De.regex(/0?\.\d+|[01]/).map(Number),((e,t,i,n,s,r,o)=>new fe({R:e/255,G:i/255,B:s/255,A:o}))).wrap(De.regex(/\(\s*/),De.regex(/\s*\)/)));LinearColorFromAnyColor=e=>De.alt(e.LinearColorFromRGBList,e.LinearColorFromHex,e.LinearColorFromRGB,e.LinearColorFromRGBA);UnknownKeys=e=>De.seqMap(De.regex(/\w*\s*/).skip(De.string("(")),De.seqMap(e.AttributeName,De.string("=").trim(De.optWhitespace),e.AttributeAnyValue,((e,t,i)=>t=>le.objectSet(t,e.split("."),i,!0))).trim(De.optWhitespace).sepBy(De.string(",")).skip(De.regex(/,?/).then(De.optWhitespace)),De.string(")"),((e,t,i)=>{let n={};t.forEach((e=>e(n)));let s=new Oe(n);return e&&(s.lookbehind=e),s}))}class ze{static grammar=He.createLanguage(new Be);constructor(e,t="",i=",",n=!1,s="=",r=(e=>e.join("."))){this.entityType=e,this.attributePrefix=t,this.attributeSeparator=i,this.trailingSeparator=n,this.attributeValueConjunctionSign=s,this.attributeKeyPrinter=r}deserialize(e){return this.read(e)}serialize(e,t=!1,i=e){return this.write(i,e,t)}read(e){throw new Error("Not implemented")}write(e,t,i){throw new Error("Not implemented")}writeValue(e,t,i,n){const s=le.getType(t),r=re.getSerializer(s);if(!r)throw new Error(`Unknown value type "${s.name}", a serializer must be registered in the SerializerFactory class, check initializeSerializerFactory.js`);return r.write(e,t,n)}subWrite(e,t,i,n){let s="",r=t.concat("");const o=r.length-1;for(const t of Object.getOwnPropertyNames(i)){r[o]=t;const a=i[t];if(a?.constructor===Object)s+=(s.length?this.attributeSeparator:"")+this.subWrite(e,r,a,n);else if(void 0!==a&&this.showProperty(e,i,r,a)){const t=le.isSerialized(e,r);s+=(s.length?this.attributeSeparator:"")+this.attributePrefix+this.attributeKeyPrinter(r)+this.attributeValueConjunctionSign+(t?`"${this.writeValue(e,a,r,!0)}"`:this.writeValue(e,a,r,n))}}return this.trailingSeparator&&s.length&&1===r.length&&(s+=this.attributeSeparator),s}showProperty(e,t,i,n){const s=this.entityType.attributes,r=le.objectGet(s,i);return!(r instanceof ae)||!r.ignored&&(!le.equals(r.value,n)||r.showDefault)}}class Ie extends ze{constructor(){super(Ae," ","\n",!1)}showProperty(e,t,i,n){switch(i.toString()){case"Class":case"Name":case"CustomProperties":return!1}return super.showProperty(e,t,i,n)}read(e){const t=ze.grammar.Object.parse(e);if(!t.status)throw new Error("Error when trying to parse the object.");return t.value}readMultiple(e){const t=ze.grammar.MultipleObject.parse(e);if(!t.status)throw new Error("Error when trying to parse the object.");return t.value}write(e,t,i){return`Begin Object Class=${t.Class.path} Name=${this.writeValue(e,t.Name,["Name"],i)}\n${this.subWrite(e,[],t,i)+t.CustomProperties.map((e=>this.attributeSeparator+this.attributePrefix+"CustomProperties "+re.getSerializer(Le).serialize(e))).join("")}\nEnd Object\n`}}class Re extends ie{static#g=new Ie;#b;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let n=this;this.#b=e=>n.copied()}listenEvents(){document.body.addEventListener("copy",this.#b)}unlistenEvents(){document.body.removeEventListener("copy",this.#b)}copied(){const e=this.blueprint.getNodes(!0).map((e=>Re.#g.serialize(e.entity,!1))).join("");navigator.clipboard.writeText(e)}}class Ve{static styles=r``;element;#v=[];get inputObjects(){return this.#v}constructed(e){this.element=e}createInputObjects(){return[]}connectedCallback(){}willUpdate(e){}update(e){}render(){return O``}firstUpdated(e){}updated(e){}inputSetup(){this.#v=this.createInputObjects()}cleanup(){this.#v.forEach((e=>e.unlistenDOMElement()))}}class _e extends ie{#f;constructor(e,t,i={}){i.activateAnyKey??=!1,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 be)return e;if(e.constructor===String){const t=ze.grammar.KeyBinding.parse(e);if(t.status)return t.value}throw new Error("Unexpected key value")})),super(e,t,i),this.#f=this.options.activationKeys??[];let n=this;this.keyDownHandler=e=>{(this.options.activateAnyKey||n.#f.some((t=>(e=>e.bShift||"LeftShift"==e.Key||"RightShift"==e.Key)(t)==e.shiftKey&&(e=>e.bCtrl||"LeftControl"==e.Key||"RightControl"==e.Key)(t)==e.ctrlKey&&(e=>e.bAlt||"LeftAlt"==e.Key||"RightAlt"==e.Key)(t)==e.altKey&&te.Keys[t.Key]==e.code)))&&(i.consumeEvent&&(e.preventDefault(),e.stopImmediatePropagation()),n.fire(),document.removeEventListener("keydown",n.keyDownHandler),document.addEventListener("keyup",n.keyUpHandler))},this.keyUpHandler=e=>{(this.options.activateAnyKey||n.#f.some((t=>t.bShift&&"Shift"==e.key||t.bCtrl&&"Control"==e.key||t.bAlt&&"Alt"==e.key||t.bCmd&&"Meta"==e.key||te.Keys[t.Key]==e.code)))&&(i.consumeEvent&&e.stopImmediatePropagation(),n.unfire(),document.removeEventListener("keyup",this.keyUpHandler),document.addEventListener("keydown",this.keyDownHandler))}}listenEvents(){document.addEventListener("keydown",this.keyDownHandler)}unlistenEvents(){document.removeEventListener("keydown",this.keyDownHandler)}fire(){}unfire(){}}class Ge extends _e{constructor(e,t,i={}){i.activationKeys=te.deleteNodesKeyboardKey,super(e,t,i)}fire(){this.blueprint.removeGraphElement(...this.blueprint.getNodes(!0))}}class Fe extends ie{constructor(e,t,i={}){i.ignoreTranslateCompensate??=!1,i.movementSpace??=t.getGridDOMElement()??document.documentElement,super(e,t,i),this.movementSpace=i.movementSpace}locationFromEvent(e){const t=le.convertLocation([e.clientX,e.clientY],this.movementSpace);return this.options.ignoreTranslateCompensate?t:this.blueprint.compensateTranslation(t)}}class je extends Fe{#y=e=>{e.preventDefault();const t=this.locationFromEvent(e);this.wheel(Math.sign(e.deltaY*te.mouseWheelFactor),t)};#w=e=>e.preventDefault();constructor(e,t,i={}){i.listenOnFocus=!0,i.strictTarget??=!1,super(e,t,i),this.strictTarget=i.strictTarget}listenEvents(){this.movementSpace.addEventListener("wheel",this.#y,!1),this.movementSpace.parentElement?.addEventListener("wheel",this.#w)}unlistenEvents(){this.movementSpace.removeEventListener("wheel",this.#y,!1),this.movementSpace.parentElement?.removeEventListener("wheel",this.#w)}wheel(e,t){}}class Ue extends je{#E=!1;get enableZoonIn(){return this.#E}set enableZoonIn(e){(e=Boolean(e))!=this.#E&&(this.#E=e)}wheel(e,t){let i=this.blueprint.getZoom();e=-e,!this.enableZoonIn&&0==i&&e>0||(i+=e,this.blueprint.setZoom(i,t))}}class We extends _e{#S;constructor(e,t,i={}){i.activationKeys=te.enableZoomIn,super(e,t,i)}fire(){this.#S=this.blueprint.getInputObject(Ue),this.#S.enableZoonIn=!0}unfire(){this.#S.enableZoonIn=!1}}class Xe extends _e{constructor(e,t,i={}){i.activationKeys=te.selectAllKeyboardKey,super(e,t,i)}fire(){this.blueprint.selectAll()}}class Ke extends Q{static properties={};#P=[];#i;get blueprint(){return this.#i}set blueprint(e){this.#i=e}#C;get entity(){return this.#C}set entity(e){this.#C=e}#k;get template(){return this.#k}inputObjects=[];constructor(e,t){super(),this.#C=e,this.#k=t,this.inputObjects=[],this.#k.constructed(this)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.blueprint=this.closest("ueb-blueprint"),this.template.connectedCallback()}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);for(const t of this.#P)t(e);this.#P=[]}disconnectedCallback(){super.disconnectedCallback(),this.template.cleanup()}addNextUpdatedCallbacks(e,t=!1){this.#P.push(e),t&&this.requestUpdate()}isSameGraph(e){return this.blueprint&&this.blueprint==e?.blueprint}getInputObject(e){return this.template.inputObjects.find((t=>t.constructor==e))}}class Ye extends Ke{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=te.dragEventName;static dragGeneralEventName=te.dragGeneralEventName;constructor(e,t){super(e,t),this.locationX=0,this.locationY=0,this.sizeX??=0,this.sizeY??=0}computeSizes(){const e=this.getBoundingClientRect();this.sizeX=e.width,this.sizeY=e.height}firstUpdated(e){super.firstUpdated(e),this.computeSizes()}setLocation([e,t]){const i=[e-this.locationX,t-this.locationY];if(this.locationX=e,this.locationY=t,this.blueprint){const e=new CustomEvent(this.constructor.dragEventName,{detail:{value:i},bubbles:!1,cancelable:!0});this.dispatchEvent(e)}}addLocation([e,t]){this.setLocation([this.locationX+e,this.locationY+t])}dispatchDragEvent(e){const t=new CustomEvent(this.constructor.dragGeneralEventName,{detail:{value:e},bubbles:!0,cancelable:!0});this.dispatchEvent(t)}snapToGrid(){const e=le.snapToGrid([this.locationX,this.locationY],te.gridSize);this.locationX==e[0]&&this.locationY==e[1]||this.setLocation(e)}topBoundary(){return this.locationY}rightBoundary(){return this.locationX+this.sizeX}bottomBoundary(){return this.locationY+this.sizeY}leftBoundary(){return this.locationX}}class qe extends Fe{#x=e=>{if(this.blueprint.setFocused(!0),e.button===this.options.clickButton)this.options.strictTarget&&e.target!=e.currentTarget||(this.options.consumeEvent&&e.stopImmediatePropagation(),this.#L.addEventListener("mousemove",this.#N),document.addEventListener("mouseup",this.#T),this.clickedPosition=this.locationFromEvent(e),this.blueprint.mousePosition[0]=this.clickedPosition[0],this.blueprint.mousePosition[1]=this.clickedPosition[1],this.target instanceof Ye&&(this.clickedOffset=[this.clickedPosition[0]-this.target.locationX,this.clickedPosition[1]-this.target.locationY]),this.clicked(this.clickedPosition));else this.options.exitAnyButton||this.#T(e)};#N=e=>{this.options.consumeEvent&&e.stopImmediatePropagation(),this.#L.removeEventListener("mousemove",this.#N),this.#L.addEventListener("mousemove",this.#A);const t=this.getEvent(te.trackingMouseEventName.begin);this.#$=0==this.target.dispatchEvent(t);const i=this.locationFromEvent(e);this.lastLocation=le.snapToGrid(this.clickedPosition,this.stepSize),this.startDrag(i),this.started=!0};#A=e=>{this.options.consumeEvent&&e.stopImmediatePropagation();const t=this.locationFromEvent(e),i=[e.movementX,e.movementY];this.dragTo(t,i),this.#$&&(this.blueprint.mousePosition=this.locationFromEvent(e))};#T=e=>{if(!this.options.exitAnyButton||e.button==this.options.clickButton){if(this.options.consumeEvent&&e.stopImmediatePropagation(),this.#L.removeEventListener("mousemove",this.#N),this.#L.removeEventListener("mousemove",this.#A),document.removeEventListener("mouseup",this.#T),this.started&&this.endDrag(),this.unclicked(),this.#$){const e=this.getEvent(te.trackingMouseEventName.end);this.target.dispatchEvent(e),this.#$=!1}this.started=!1}};#$=!1;#L;#M;clickedOffset=[0,0];clickedPosition=[0,0];lastLocation=[0,0];started=!1;stepSize=1;constructor(e,t,i={}){i.clickButton??=0,i.consumeEvent??=!0,i.draggableElement??=e,i.exitAnyButton??=!0,i.moveEverywhere??=!1,i.movementSpace??=t?.getGridDOMElement(),i.repositionOnClick??=!1,i.strictTarget??=!1,super(e,t,i),this.stepSize=parseInt(i?.stepSize??te.gridSize),this.#L=this.options.moveEverywhere?document.documentElement:this.movementSpace,this.#M=this.options.draggableElement,this.listenEvents()}listenEvents(){super.listenEvents(),this.#M.addEventListener("mousedown",this.#x),2==this.options.clickButton&&this.#M.addEventListener("contextmenu",(e=>e.preventDefault()))}unlistenEvents(){super.unlistenEvents(),this.#M.removeEventListener("mousedown",this.#x)}getEvent(e){return new CustomEvent(e,{detail:{tracker:this},bubbles:!0,cancelable:!0})}clicked(e){}startDrag(e){}dragTo(e,t){}endDrag(){}unclicked(e){}}class Ze extends qe{startDrag(){this.blueprint.scrolling=!0}dragTo(e,t){this.blueprint.scrollDelta([-t[0],-t[1]])}endDrag(){this.blueprint.scrolling=!1}}class Je extends Fe{#H=null;#O;#D;#B;constructor(e,t,i={}){i.listenOnFocus=!0,super(e,t,i);let n=this;this.#O=e=>{e.preventDefault(),n.blueprint.mousePosition=n.locationFromEvent(e)},this.#D=e=>{n.#H||(e.preventDefault(),this.#H=e.detail.tracker,n.unlistenMouseMove())},this.#B=e=>{n.#H==e.detail.tracker&&(e.preventDefault(),n.#H=null,n.listenMouseMove())}}listenMouseMove(){this.target.addEventListener("mousemove",this.#O)}unlistenMouseMove(){this.target.removeEventListener("mousemove",this.#O)}listenEvents(){this.listenMouseMove(),this.blueprint.addEventListener(te.trackingMouseEventName.begin,this.#D),this.blueprint.addEventListener(te.trackingMouseEventName.end,this.#B)}unlistenEvents(){this.unlistenMouseMove(),this.blueprint.removeEventListener(te.trackingMouseEventName.begin,this.#D),this.blueprint.removeEventListener(te.trackingMouseEventName.end,this.#B)}}class Qe{static#z=new Map;static registerElement(e,t){Qe.#z.set(e,t)}static getConstructor(e){return Qe.#z.get(e)}}class et extends ie{static#g=new Ie;#I;constructor(e,t,i={}){i.listenOnFocus??=!0,i.unlistenOnTextEdit??=!0,super(e,t,i);let n=this;this.#I=e=>n.pasted(e.clipboardData.getData("Text"))}listenEvents(){document.body.addEventListener("paste",this.#I)}unlistenEvents(){document.body.removeEventListener("paste",this.#I)}pasted(e){let t=0,i=0,n=0,s=et.#g.readMultiple(e).map((e=>{let s=new(Qe.getConstructor("ueb-node"))(e);return t+=s.locationY,i+=s.locationX,++n,s}));t/=n,i/=n,s.length>0&&this.blueprint.unselectAll();let r=this.blueprint.mousePosition;return s.forEach((e=>{const n=[r[0]-i,r[1]-t];e.addLocation(n),e.snapToGrid(),e.setSelected(!0)})),this.blueprint.addGraphElement(...s),!0}}class tt extends qe{constructor(e,t,i){super(e,t,i),this.selectorElement=this.blueprint.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 it extends ie{#R;constructor(e,t,i={}){i.listenOnFocus=!0,super(e,t,i);let n=this;this.#R=e=>n.clickedSomewhere(e.target),this.blueprint.focus&&document.addEventListener("click",this.#R)}clickedSomewhere(e){e.closest("ueb-blueprint")||this.blueprint.setFocused(!1)}listenEvents(){document.addEventListener("click",this.#R)}unlistenEvents(){document.removeEventListener("click",this.#R)}}class nt extends Ve{static styleVariables={"--ueb-font-size":`${te.fontSize}`,"--ueb-grid-axis-line-color":`${te.gridAxisLineColor}`,"--ueb-grid-expand":`${te.expandGridSize}px`,"--ueb-grid-line-color":`${te.gridLineColor}`,"--ueb-grid-line-width":`${te.gridLineWidth}px`,"--ueb-grid-set-line-color":`${te.gridSetLineColor}`,"--ueb-grid-set":`${te.gridSet}`,"--ueb-grid-size":`${te.gridSize}px`,"--ueb-link-min-width":`${te.linkMinWidth}`,"--ueb-node-radius":`${te.nodeRadius}px`};constructed(e){super.constructed(e),this.element.style.cssText=Object.entries(nt.styleVariables).map((([e,t])=>`${e}:${t};`)).join("")}createInputObjects(){return[...super.createInputObjects(),new Re(this.element.getGridDOMElement(),this.element),new et(this.element.getGridDOMElement(),this.element),new Ge(this.element.getGridDOMElement(),this.element),new Xe(this.element.getGridDOMElement(),this.element),new Ue(this.element.getGridDOMElement(),this.element),new tt(this.element.getGridDOMElement(),this.element,{clickButton:0,exitAnyButton:!0,moveEverywhere:!0}),new Ze(this.element.getGridDOMElement(),this.element,{clickButton:2,exitAnyButton:!1,moveEverywhere:!0}),new it(this.element.getGridDOMElement(),this.element),new Je(this.element.getGridDOMElement(),this.element),new We(this.element.getGridDOMElement(),this.element)]}render(){return O`
`}}class jt extends Ft{static singleLineInput=!0;setInputs(e=[],t=!1){e&&0!=e.length||(e=[this.getInput()]);let i=[];for(const t of e){let e=parseFloat(t);isNaN(e)&&(e=0,!1),i.push(e)}super.setInputs(e,!1),this.setDefaultValue(i,e)}setDefaultValue(e=[],t){this.element.setDefaultValue(e[0])}}class Ut extends jt{setDefaultValue(e=[],t=e){this.element.setDefaultValue(new me(e[0]))}renderInput(){return O`
`}}
/**
* @license
* Copyright 2017 Google LLC
@@ -30,4 +30,4 @@ var Z,J;class Q extends g{constructor(){super(...arguments),this.renderOptions={
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */const Kt=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends Xt{constructor(e){var t;if(super(e),e.type!==Wt||"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 n=e[i];return null==n?t:t+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.vt){this.vt=new Set;for(const e in t)this.vt.add(e);return this.render(t)}this.vt.forEach((e=>{null==t[e]&&(this.vt.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const n=t[e];null!=n&&(this.vt.add(e),e.includes("-")?i.setProperty(e,n):i[e]=n)}return D}});class Yt extends mt{toggleAdvancedDisplayHandler;getDraggableElement(){return this.element.querySelector(".ueb-window-top")}createDraggableObject(){return new ht(this.element,this.element.blueprint,{draggableElement:this.getDraggableElement(),ignoreTranslateCompensate:!0,movementSpace:this.element.blueprint,stepSize:1})}render(){return O`
`}}class ei extends St{renderIcon(){return ct.referencePin}}class ti extends jt{setDefaultValue(e=[],t=e){if(!(this.element.entity.DefaultValue instanceof Pe))throw new TypeError("Expected DefaultValue to be a VectorEntity");let i=this.element.entity.DefaultValue;i.R=e[0],i.P=e[1],i.Y=e[2]}renderInput(){return O`
X
Y
Z
`}}class ii extends Ft{}class ni extends jt{setDefaultValue(e,t){if(!(this.element.entity.DefaultValue instanceof ke))throw new TypeError("Expected DefaultValue to be a VectorEntity");let i=this.element.entity.DefaultValue;i.X=e[0],i.Y=e[1],i.Z=e[2]}renderInput(){return O`
X
Y
Z
`}}class si extends Ke{static#st={"/Script/CoreUObject.LinearColor":Zt,"/Script/CoreUObject.Rotator":ti,"/Script/CoreUObject.Vector":ni,bool:_t,int:Ut,MUTABLE_REFERENCE:ei,name:Jt,real:Qt,string:ii};static properties={pinId:{type:de,converter:{fromAttribute:(e,t)=>e?ze.grammar.Guid.parse(e).value: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:fe,converter:{fromAttribute:(e,t)=>e?ze.grammar.LinearColorFromAnyColor.parse(e).value:null,toAttribute:(e,t)=>e?le.printLinearColor(e):null},attribute:"data-color",reflect:!0},defaultValue:{type:String,attribute:!1},isLinked:{type:Boolean,converter:le.booleanConverter,attribute:"data-linked",reflect:!0},pinDirection:{type:String,attribute:"data-direction",reflect:!0}};static getTypeTemplate(e){if(e.PinType.bIsReference&&!e.PinType.bIsConst)return si.#st.MUTABLE_REFERENCE;if("exec"===e.getType())return Gt;let t;return e.isInput()&&(t=si.#st[e.getType()]),t??St}nodeElement;connections=0;constructor(e,t,i){super(e,t??new(si.getTypeTemplate(e))),this.pinId=this.entity.PinId,this.pinType=this.entity.getType(),this.advancedView=this.entity.bAdvancedView,this.defaultValue=this.entity.getDefaultValue(),this.color=si.properties.color.converter.fromAttribute(this.getColor().toString()),this.isLinked=!1,this.pinDirection=e.isInput()?"input":e.isOutput()?"output":"hidden",this.nodeElement=i,this.entity.subscribe("PinToolTip",(e=>{let t=e.match(/\s*(.+?(?=\n)|.+\S)\s*/);return t?le.formatStringName(t[1]):le.formatStringName(this.entity.PinName)}))}getPinId(){return this.entity.PinId}getPinName(){return this.entity.PinName}getPinDisplayName(){return this.entity.getDisplayName()}getColor(){return te.getPinColor(this)}isInput(){return this.entity.isInput()}isOutput(){return this.entity.isOutput()}getLinkLocation(){return this.template.getLinkLocation()}getNodeElement(){return this.nodeElement}getLinks(){return this.entity.LinkedTo??[]}setDefaultValue(e){this.entity.DefaultValue=e,this.defaultValue=e}sanitizeLinks(e=[]){this.entity.LinkedTo=this.getLinks().filter((t=>{let i=this.blueprint.getPin(t);if(i){if(e.length&&!e.includes(i.nodeElement))return!1;this.blueprint.getLink(this,i,!0)||this.blueprint.addGraphElement(new(Qe.getConstructor("ueb-link"))(this,i))}return i}))}linkTo(e){this.entity.linkTo(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged())}unlinkFrom(e){this.entity.unlinkFrom(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged())}redirectLink(e,t){const i=this.entity.LinkedTo.findIndex((t=>t.objectName.toString()==e.getNodeElement().getNodeName()&&t.pinGuid.valueOf()==e.entity.PinId.valueOf()));return i>=0&&(this.entity.LinkedTo[i]=t,!0)}}class ri extends Ye{static#xe={window:Yt,"color-picker":qt};static properties={...Ye.properties,type:{type:Yt,attribute:"data-type",reflect:!0,converter:{fromAttribute:(e,t)=>ri.#xe[e],toAttribute:(e,t)=>Object.entries(ri.#xe).find((([t,i])=>e==i))[0]}}};constructor(e={}){e.type.constructor==String&&(e.type=ri.#xe[e.type]),e.type??=Yt,e.windowOptions??={},super({},new e.type),this.type=e.type,this.windowOptions=e.windowOptions}disconnectedCallback(){super.disconnectedCallback(),this.dispatchCloseEvent()}dispatchCloseEvent(){let e=new CustomEvent(te.windowCloseEventName);this.dispatchEvent(e)}}class oi extends ze{constructor(e,t,i,n,s,r,o){e=e??(e=>`(${e})`),super(t,i,n,s,r,o),this.wrap=e}read(e){const t=Be.getGrammarForType(ze.grammar,this.entityType).parse(e);if(!t.status)throw new Error(`Error when trying to parse the entity ${this.entityType.prototype.constructor.name}.`);return t.value}write(e,t,i=!1){return this.wrap(this.subWrite(e,[],t,i),t)}}class ai extends oi{#rt;constructor(e,t){super(void 0,t),this.#rt=e}write(e,t,i=!1){return this.#rt(t,i)}}class li extends oi{constructor(e){super(void 0,e)}write(e,t,i){return i||t.constructor!==String?le.escapeString(t.toString()):`"${le.escapeString(t.toString())}"`}}!function(){const e=e=>`(${e})`;re.registerSerializer(null,new ai(((e,t)=>"()"),null)),re.registerSerializer(Array,new ai(((e,t)=>`(${e.map((e=>re.getSerializer(le.getType(e)).serialize(e,t)+",")).join("")})`),Array)),re.registerSerializer(Boolean,new ai(((e,t)=>e?t?"true":"True":t?"false":"False"),Boolean)),re.registerSerializer(he,new oi(e,he)),re.registerSerializer(de,new li(de)),re.registerSerializer(pe,new li(pe)),re.registerSerializer(me,new li(me)),re.registerSerializer(ge,new oi((e=>`${ge.lookbehind}(${e})`),ge,"",", ",!1,"",(e=>""))),re.registerSerializer(be,new oi(e,be)),re.registerSerializer(fe,new oi(e,fe)),re.registerSerializer(ye,new oi((e=>`${ye.lookbehind}(${e})`),ye,"",", ",!1,"",(e=>""))),re.registerSerializer(we,new oi(e,we)),re.registerSerializer(Number,new ai((e=>e.toString()),Number)),re.registerSerializer(Ae,new Ie),re.registerSerializer(ue,new ai((e=>(e.type??"")+(e.path?e.type?`'"${e.path}"'`:`"${e.path}"`:"")),ue)),re.registerSerializer(Ee,new li(Ee)),re.registerSerializer(Le,new oi((e=>`${Le.lookbehind} (${e})`),Le,"",",",!0)),re.registerSerializer(Se,new oi((e=>e),Se,""," ",!1,"",(e=>""))),re.registerSerializer(ve,new li(ve)),re.registerSerializer(Pe,new oi(e,Pe)),re.registerSerializer(String,new ai(((e,t)=>t?le.escapeString(e):`"${le.escapeString(e)}"`),String)),re.registerSerializer(Ce,new ai(((e,t)=>`${e.P}, ${e.Y}, ${e.R}`),Ce)),re.registerSerializer(xe,new ai(((e,t)=>`${e.X}, ${e.Y}, ${e.Z}`),xe)),re.registerSerializer(Ne,new li(Ne)),re.registerSerializer(Oe,new oi(((e,t)=>`${t.lookbehind??""}(${e})`),Oe)),re.registerSerializer(Te,new oi(e,Te)),re.registerSerializer(ke,new oi(e,ke))}(),customElements.define("ueb-color-handler",Dt),Qe.registerElement("ueb-color-handler",Dt),customElements.define("ueb-input",Rt),Qe.registerElement("ueb-input",Rt),customElements.define("ueb-link",ut),Qe.registerElement("ueb-link",ut),customElements.define("ueb-node",xt),Qe.registerElement("ueb-node",xt),customElements.define("ueb-pin",si),Qe.registerElement("ueb-pin",si),customElements.define("ueb-selector",At),Qe.registerElement("ueb-selector",At),customElements.define("ueb-ui-slider",zt),Qe.registerElement("ueb-ui-slider",zt),customElements.define("ueb-window",ri),Qe.registerElement("ueb-window",ri);export{$t as Blueprint,te as Configuration,ut as LinkElement,xt as NodeElement};
+ */const Kt=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends Xt{constructor(e){var t;if(super(e),e.type!==Wt||"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 n=e[i];return null==n?t:t+`${i=i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.vt){this.vt=new Set;for(const e in t)this.vt.add(e);return this.render(t)}this.vt.forEach((e=>{null==t[e]&&(this.vt.delete(e),e.includes("-")?i.removeProperty(e):i[e]="")}));for(const e in t){const n=t[e];null!=n&&(this.vt.add(e),e.includes("-")?i.setProperty(e,n):i[e]=n)}return D}});class Yt extends mt{toggleAdvancedDisplayHandler;getDraggableElement(){return this.element.querySelector(".ueb-window-top")}createDraggableObject(){return new ht(this.element,this.element.blueprint,{draggableElement:this.getDraggableElement(),ignoreTranslateCompensate:!0,movementSpace:this.element.blueprint,stepSize:1})}render(){return O`
`}}class ei extends St{renderIcon(){return ut.referencePin}}class ti extends jt{setDefaultValue(e=[],t=e){if(!(this.element.entity.DefaultValue instanceof Pe))throw new TypeError("Expected DefaultValue to be a VectorEntity");let i=this.element.entity.DefaultValue;i.R=e[0],i.P=e[1],i.Y=e[2]}renderInput(){return O`
X
Y
Z
`}}class ii extends Ft{}class ni extends jt{setDefaultValue(e,t){if(!(this.element.entity.DefaultValue instanceof ke))throw new TypeError("Expected DefaultValue to be a VectorEntity");let i=this.element.entity.DefaultValue;i.X=e[0],i.Y=e[1],i.Z=e[2]}renderInput(){return O`
X
Y
Z
`}}class si extends Ke{static#st={"/Script/CoreUObject.LinearColor":Zt,"/Script/CoreUObject.Rotator":ti,"/Script/CoreUObject.Vector":ni,bool:_t,int:Ut,MUTABLE_REFERENCE:ei,name:Jt,real:Qt,string:ii};static properties={pinId:{type:de,converter:{fromAttribute:(e,t)=>e?ze.grammar.Guid.parse(e).value: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:fe,converter:{fromAttribute:(e,t)=>e?ze.grammar.LinearColorFromAnyColor.parse(e).value:null,toAttribute:(e,t)=>e?le.printLinearColor(e):null},attribute:"data-color",reflect:!0},defaultValue:{type:String,attribute:!1},isLinked:{type:Boolean,converter:le.booleanConverter,attribute:"data-linked",reflect:!0},pinDirection:{type:String,attribute:"data-direction",reflect:!0}};static getTypeTemplate(e){if(e.PinType.bIsReference&&!e.PinType.bIsConst)return si.#st.MUTABLE_REFERENCE;if("exec"===e.getType())return Gt;let t;return e.isInput()&&(t=si.#st[e.getType()]),t??St}nodeElement;connections=0;constructor(e,t,i){super(e,t??new(si.getTypeTemplate(e))),this.pinId=this.entity.PinId,this.pinType=this.entity.getType(),this.advancedView=this.entity.bAdvancedView,this.defaultValue=this.entity.getDefaultValue(),this.color=si.properties.color.converter.fromAttribute(this.getColor().toString()),this.isLinked=!1,this.pinDirection=e.isInput()?"input":e.isOutput()?"output":"hidden",this.nodeElement=i,this.entity.subscribe("PinToolTip",(e=>{let t=e.match(/\s*(.+?(?=\n)|.+\S)\s*/);return t?le.formatStringName(t[1]):le.formatStringName(this.entity.PinName)}))}getPinId(){return this.entity.PinId}getPinName(){return this.entity.PinName}getPinDisplayName(){return this.entity.getDisplayName()}getColor(){return te.getPinColor(this)}isInput(){return this.entity.isInput()}isOutput(){return this.entity.isOutput()}getLinkLocation(){return this.template.getLinkLocation()}getNodeElement(){return this.nodeElement}getLinks(){return this.entity.LinkedTo??[]}setDefaultValue(e){this.entity.DefaultValue=e,this.defaultValue=e}sanitizeLinks(e=[]){this.entity.LinkedTo=this.getLinks().filter((t=>{let i=this.blueprint.getPin(t);if(i){if(e.length&&!e.includes(i.nodeElement))return!1;this.blueprint.getLink(this,i,!0)||this.blueprint.addGraphElement(new(Qe.getConstructor("ueb-link"))(this,i))}return i}))}linkTo(e){this.entity.linkTo(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged())}unlinkFrom(e){this.entity.unlinkFrom(e.getNodeElement().getNodeName(),e.entity)&&(this.isLinked=this.entity.isLinked(),this.nodeElement?.template.linksChanged())}redirectLink(e,t){const i=this.entity.LinkedTo.findIndex((t=>t.objectName.toString()==e.getNodeElement().getNodeName()&&t.pinGuid.valueOf()==e.entity.PinId.valueOf()));return i>=0&&(this.entity.LinkedTo[i]=t,!0)}}class ri extends Ye{static#xe={window:Yt,"color-picker":qt};static properties={...Ye.properties,type:{type:Yt,attribute:"data-type",reflect:!0,converter:{fromAttribute:(e,t)=>ri.#xe[e],toAttribute:(e,t)=>Object.entries(ri.#xe).find((([t,i])=>e==i))[0]}}};constructor(e={}){e.type.constructor==String&&(e.type=ri.#xe[e.type]),e.type??=Yt,e.windowOptions??={},super({},new e.type),this.type=e.type,this.windowOptions=e.windowOptions}disconnectedCallback(){super.disconnectedCallback(),this.dispatchCloseEvent()}dispatchCloseEvent(){let e=new CustomEvent(te.windowCloseEventName);this.dispatchEvent(e)}}class oi extends ze{constructor(e,t,i,n,s,r,o){e=e??(e=>`(${e})`),super(t,i,n,s,r,o),this.wrap=e}read(e){const t=Be.getGrammarForType(ze.grammar,this.entityType).parse(e);if(!t.status)throw new Error(`Error when trying to parse the entity ${this.entityType.prototype.constructor.name}.`);return t.value}write(e,t,i=!1){return this.wrap(this.subWrite(e,[],t,i),t)}}class ai extends oi{#rt;constructor(e,t){super(void 0,t),this.#rt=e}write(e,t,i=!1){return this.#rt(t,i)}}class li extends oi{constructor(e){super(void 0,e)}write(e,t,i){return i||t.constructor!==String?le.escapeString(t.toString()):`"${le.escapeString(t.toString())}"`}}!function(){const e=e=>`(${e})`;re.registerSerializer(null,new ai(((e,t)=>"()"),null)),re.registerSerializer(Array,new ai(((e,t)=>`(${e.map((e=>re.getSerializer(le.getType(e)).serialize(e,t)+",")).join("")})`),Array)),re.registerSerializer(Boolean,new ai(((e,t)=>e?t?"true":"True":t?"false":"False"),Boolean)),re.registerSerializer(he,new oi(e,he)),re.registerSerializer(de,new li(de)),re.registerSerializer(pe,new li(pe)),re.registerSerializer(me,new li(me)),re.registerSerializer(ge,new oi((e=>`${ge.lookbehind}(${e})`),ge,"",", ",!1,"",(e=>""))),re.registerSerializer(be,new oi(e,be)),re.registerSerializer(fe,new oi(e,fe)),re.registerSerializer(ye,new oi((e=>`${ye.lookbehind}(${e})`),ye,"",", ",!1,"",(e=>""))),re.registerSerializer(we,new oi(e,we)),re.registerSerializer(Number,new ai((e=>e.toString()),Number)),re.registerSerializer(Ae,new Ie),re.registerSerializer(ce,new ai((e=>(e.type??"")+(e.path?e.type?`'"${e.path}"'`:`"${e.path}"`:"")),ce)),re.registerSerializer(Ee,new li(Ee)),re.registerSerializer(Le,new oi((e=>`${Le.lookbehind} (${e})`),Le,"",",",!0)),re.registerSerializer(Se,new oi((e=>e),Se,""," ",!1,"",(e=>""))),re.registerSerializer(ve,new li(ve)),re.registerSerializer(Pe,new oi(e,Pe)),re.registerSerializer(String,new ai(((e,t)=>t?le.escapeString(e):`"${le.escapeString(e)}"`),String)),re.registerSerializer(Ce,new ai(((e,t)=>`${e.P}, ${e.Y}, ${e.R}`),Ce)),re.registerSerializer(xe,new ai(((e,t)=>`${e.X}, ${e.Y}, ${e.Z}`),xe)),re.registerSerializer(Ne,new li(Ne)),re.registerSerializer(Oe,new oi(((e,t)=>`${t.lookbehind??""}(${e})`),Oe)),re.registerSerializer(Te,new oi(e,Te)),re.registerSerializer(ke,new oi(e,ke))}(),customElements.define("ueb-color-handler",Dt),Qe.registerElement("ueb-color-handler",Dt),customElements.define("ueb-input",Rt),Qe.registerElement("ueb-input",Rt),customElements.define("ueb-link",ct),Qe.registerElement("ueb-link",ct),customElements.define("ueb-node",xt),Qe.registerElement("ueb-node",xt),customElements.define("ueb-pin",si),Qe.registerElement("ueb-pin",si),customElements.define("ueb-selector",At),Qe.registerElement("ueb-selector",At),customElements.define("ueb-ui-slider",zt),Qe.registerElement("ueb-ui-slider",zt),customElements.define("ueb-window",ri),Qe.registerElement("ueb-window",ri);export{$t as Blueprint,te as Configuration,ct as LinkElement,xt as NodeElement};
diff --git a/js/Utility.js b/js/Utility.js
index 9cf1b1e..93b9c7c 100755
--- a/js/Utility.js
+++ b/js/Utility.js
@@ -68,6 +68,14 @@ export default class Utility {
return Math.round(num * power) / power
}
+ /**
+ * @param {Number} a
+ * @param {Number} b
+ */
+ static approximatelyEqual(a, b) {
+ return !(Math.abs(a - b) > Number.EPSILON)
+ }
+
/**
* @param {Number[]} viewportLocation
* @param {HTMLElement} movementElement
diff --git a/js/element/IDraggableElement.js b/js/element/IDraggableElement.js
index 25de0e5..721eb78 100644
--- a/js/element/IDraggableElement.js
+++ b/js/element/IDraggableElement.js
@@ -44,8 +44,8 @@ export default class IDraggableElement extends IElement {
super(entity, template)
this.locationX = 0
this.locationY = 0
- this.sizeX = -1
- this.sizeY = -1
+ this.sizeX ??= 0 // It may be set in the template already
+ this.sizeY ??= 0 // It may be set in the template already
}
computeSizes() {
diff --git a/js/entity/LinearColorEntity.js b/js/entity/LinearColorEntity.js
index f343c74..644e70d 100644
--- a/js/entity/LinearColorEntity.js
+++ b/js/entity/LinearColorEntity.js
@@ -73,12 +73,9 @@ export default class LinearColorEntity extends IEntity {
const r = this.R.value
const g = this.G.value
const b = this.B.value
- if (
- !(Math.abs(r - g) > Number.EPSILON)
- && !(Math.abs(r - b) > Number.EPSILON)
- && !(Math.abs(g - b) > Number.EPSILON)
- ) {
- this.V.value = 0
+ if (Utility.approximatelyEqual(r, g) && Utility.approximatelyEqual(r, b) && Utility.approximatelyEqual(g, b)) {
+ this.S.value = 0
+ this.V.value = r
return
}
const max = Math.max(r, g, b)
diff --git a/js/entity/ObjectEntity.js b/js/entity/ObjectEntity.js
index dc56449..3c42ec7 100755
--- a/js/entity/ObjectEntity.js
+++ b/js/entity/ObjectEntity.js
@@ -155,8 +155,24 @@ export default class ObjectEntity extends IEntity {
this.getType() == Configuration.nodeType.comment ? Configuration.defaultCommentWidth : undefined
}
+ /** @param {Number} value */
+ setNodeWidth(value) {
+ if (!this.NodeWidth) {
+ this.NodeWidth = new IntegerEntity()
+ }
+ this.NodeWidth.value = value
+ }
+
getNodeHeight() {
return this.NodeHeight ??
this.getType() == Configuration.nodeType.comment ? Configuration.defaultCommentHeight : undefined
}
+
+ /** @param {Number} value */
+ setNodeHeight(value) {
+ if (!this.NodeHeight) {
+ this.NodeHeight = new IntegerEntity()
+ }
+ this.NodeHeight.value = value
+ }
}
diff --git a/js/template/CommentNodeTemplate.js b/js/template/CommentNodeTemplate.js
index 6529b02..24c5058 100644
--- a/js/template/CommentNodeTemplate.js
+++ b/js/template/CommentNodeTemplate.js
@@ -16,15 +16,11 @@ export default class CommentNodeTemplate extends IResizeableTemplate {
constructed(element) {
if (element.entity.CommentColor) {
this.#color.setFromRGBANumber(element.entity.CommentColor.toNumber())
+ this.#color.setFromHSVA(this.#color.H.value, this.#color.S.value, Math.pow(this.#color.V.value, 0.45) * 0.67)
}
- // Dimming the colors to 2/3
- const factor = 2 / 3
- this.#color.setFromRGBA(
- this.#color.R.value,
- this.#color.G.value,
- this.#color.B.value,
- )
element.classList.add("ueb-node-style-comment", "ueb-node-resizeable")
+ element.sizeX ??= 25 * Configuration.gridSize
+ element.sizeY ??= 6 * Configuration.gridSize
super.constructed(element) // Keep it at the end because it calls this.getColor() where this.#color must be initialized
}
@@ -50,8 +46,10 @@ export default class CommentNodeTemplate extends IResizeableTemplate {
/** @param {Number} value */
setSizeX(value) {
+ value = Math.round(value)
if (value >= Configuration.gridSet * Configuration.gridSize) {
this.element.sizeX = value
+ this.element.entity.setNodeWidth(this.element.sizeX)
return true
}
return false
@@ -59,8 +57,10 @@ export default class CommentNodeTemplate extends IResizeableTemplate {
/** @param {Number} value */
setSizeY(value) {
+ value = Math.round(value)
if (value >= 3 * Configuration.gridSize) {
this.element.sizeY = Math.max(value, 3 * Configuration.gridSize)
+ this.element.entity.setNodeHeight(this.element.sizeY)
return true
}
return false
diff --git a/scss/ueb-node.scss b/scss/ueb-node.scss
index 003fb66..440f9de 100644
--- a/scss/ueb-node.scss
+++ b/scss/ueb-node.scss
@@ -246,11 +246,35 @@ ueb-node.ueb-node-style-comment .ueb-node-border {
}
ueb-node.ueb-node-style-comment .ueb-node-wrapper {
+ position: relative;
padding: 0;
height: 100%;
border-radius: 0;
background: rgba(var(--ueb-node-color), 0.5);
box-shadow: none;
+
+ &::after {
+ content: "";
+ display: block;
+ position: absolute;
+ right: 3px;
+ bottom: 3px;
+ width: 16px;
+ height: 16px;
+ background: linear-gradient(135deg,
+ transparent 50%,
+ #fff 50%,
+ #fff calc(50% + 2px),
+ transparent calc(50% + 2px),
+ transparent calc(50% + 3px),
+ #fff calc(50% + 3px),
+ #fff calc(50% + 5px),
+ transparent calc(50% + 5px),
+ transparent calc(50% + 7px),
+ #fff calc(50% + 7px),
+ #fff calc(50% + 9px),
+ transparent calc(50% + 9px));
+ }
}
ueb-node.ueb-node-style-comment .ueb-node-top {
@@ -261,5 +285,5 @@ ueb-node.ueb-node-style-comment .ueb-node-top {
background: rgb(var(--ueb-node-color));
color: white;
font-size: 24px;
- text-shadow: 2px 1px 1px black, 0 0 2px #808080;
+ text-shadow: 2px 1px 1px #444, 0 0 2px #bbb;
}