@cpfr/tootframes 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={192:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(537),i=n.n(o),r=n(645),l=n.n(r)()(i());l.push([e.id,'*{box-sizing:border-box;cursor:default;user-select:none}a{cursor:pointer;color:#c3df85;text-decoration:none}a:hover{color:#d7e6b9;text-decoration:underline}.beingDragged{opacity:.6;z-index:1000 !important}img{pointer-events:none}body{background-color:#262829;color:#dadcdd;overflow:hidden}input{border:1px solid #343738;background:#1a1d1f;color:#cad2d4;border-radius:.1em;padding:.3em .8em;outline:none;font-size:1.2em;margin-right:.2em;margin-bottom:.2em}.MenuBar{background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);border-bottom:1px solid #575c5e;width:100%;height:2.5em;position:absolute;z-index:50;top:0;left:0}.MenuBar .Icon{height:100%;padding:.4em 1em}.MenuBar .Menu{display:inline-block;padding:.6em .7em;height:100%;vertical-align:top}.MenuBar .Menu:hover{background-color:#262829}.MenuContent{display:none;position:absolute;background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);left:0;top:2.5em;min-width:6em;min-height:.5em;z-index:1000}.MenuContent>.entry{padding:.5em 2em}.MenuContent>.entry.submenu:after{content:"›";display:inline-block;position:absolute;right:0;margin-right:.5em}.MenuContent>.entry:hover{background-color:#262829}.MenuContent>.entry.disabled{color:#7d8488}.MenuContent>.entry.disabled:hover{background-color:#323536}.MenuContent>.separator{background-color:#575c5e;border:.4em solid #3f4243;height:.9em}.Modal{display:block;position:absolute;background-color:rgba(0,0,0,.4666666667);left:0;top:0;right:0;bottom:0}button::-moz-focus-inner{border:0}button,.button{background-color:#0d0e0f;outline:none;border-radius:0;border:none;color:#dadcdd;padding:.5em 2em;font-size:1em;margin-right:.2em;margin-bottom:.2em}button:focus,.button:focus{outline:none}button:hover,.button:hover{background-color:#1a1b1c}button:active,.button:active{background-color:#121314}.Modal{background-color:rgba(0,0,0,.4666666667);position:absolute;z-index:52;left:0;right:0;top:0;bottom:0}.Modal .Dialog{z-index:53}.text{white-space:pre-line}.Dialog{min-width:15em;max-width:80vw;min-height:5em;max-height:80vh}.Dialog,.DockPanel{position:absolute;z-index:51;top:50%;left:50%;transform:translate(-50%, -50%);background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667)}.Dialog .title,.DockPanel .title{width:100%;text-align:center;padding:.5em;background-color:#575c5e;border-bottom:1px solid #707578}.Dialog .title .closeButton,.DockPanel .title .closeButton{padding:.2em;width:2em;height:2em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#323536}.Dialog .title .closeButton:hover,.DockPanel .title .closeButton:hover{background-color:#3f4243}.Dialog .content,.DockPanel .content{padding:.8em 1.5em;position:absolute}.Dialog .content.w3term,.DockPanel .content.w3term{height:100%}.Dialog .buttons,.DockPanel .buttons{padding:.8em 1.5em;text-align:center}.Dialog .content,.Dialog .Panel.content{position:static;padding:.8em 1.5em}.InputDialog input{width:100%}.Label{user-select:text}.DockContainer>*{overflow:hidden;position:absolute}.DockContainer.horizontal>*{display:inline-block}.DockContainer.horizontal>*.DockSeparator{width:3px;height:100%;background-color:#0d0e0f;cursor:ew-resize}.DockContainer.vertical>*{display:block;clear:both}.DockContainer.vertical>*.DockSeparator{width:100%;height:3px;background-color:#0d0e0f;cursor:ns-resize}.DockContainer>.DockSeparator:hover{background-color:#1a1b1c}.DockPanel{transform:none;max-width:none;max-height:none;background-color:#262829}.DockPanel .title{text-align:left;padding:.1em .5em;font-size:.9em;background-color:#1a1b1c;border-bottom:1px solid #121314}.DockPanel .title .closeButton{padding:0;width:1.6em;height:1.6em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#1a1b1c}.DockPanel .title .closeButton:hover{background-color:#262829}.DockPanel .content{width:100%;height:calc(100% - 1.5em);overflow:auto}.DockPanel.resizingHorizontally{cursor:ew-resize}.DockPanel.resizingVertically{cursor:ns-resize}.DockPanel.resizingHorizontally.resizingVertically{cursor:nwse-resize}.DockPanel .resizeEW,.DockPanel .resizeNS,.DockPanel .resizeDiag{display:none}.DockPanel.floating .resizeEW{display:block;width:.3em;top:0;bottom:0;background-color:rgba(0,0,0,0);cursor:ew-resize;position:absolute;right:0}.DockPanel.floating .resizeNS{display:block;width:100%;height:.3em;background-color:rgba(0,0,0,0);cursor:ns-resize;position:absolute;left:0;bottom:0}.DockPanel.floating .resizeDiag{display:block;width:.5em;height:.5em;background-color:rgba(0,0,0,0);cursor:nwse-resize;position:absolute;right:0;bottom:0}body>.DockContainer{position:absolute;z-index:49;top:0;left:0;right:0;bottom:0}.dockOverlay{position:fixed;background-color:rgba(51,119,153,.6);z-index:999}.NodeEditor{width:100%;height:100%;overflow:hidden;padding:0 !important}.NodeEditor.moving{cursor:grabbing}.NodeEditor.beingDragged{cursor:grabbing}.NodeEditor svg{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;pointer-events:none}.NodeEditor .Node{position:absolute}.Node{display:inline-block;border-radius:.5em;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);background-color:#1a1b1c;white-space:nowrap}.Node .title{border-radius:.5em .5em 0 0;background-color:#323536}.Node .body{display:flex;justify-content:space-between}.Node .bullet{display:inline-block;background-color:#3f4243;width:.8em;height:.8em;border-radius:.4em}.Node .bullet:hover{background-color:#63696b}.Node .inputs{display:inline-block;vertical-align:text-top}.Node .inputs .bullet{margin-left:-0.3em;margin-right:.5em}.Node .inputs .input{display:block;position:relative;font-size:.7em;margin:.3em 0}.Node .outputs{display:inline-block;vertical-align:text-top;text-align:right}.Node .outputs .bullet{margin-left:.5em;margin-right:-0.3em}.Node .outputs .output{display:block;position:relative;font-size:.7em;margin:.3em 0}.Node .contents{vertical-align:text-top;display:inline-block;min-width:2em;min-height:2em;display:flex;flex-direction:column;justify-content:space-between}.Node.selected{box-shadow:0 0 .5em #4b4f51}.Node.selected .title{background-color:#4b4f51}.TreeViewItem .label{background-color:rgba(0,0,0,0);display:inline-block;border:1px solid rgba(0,0,0,0);-webkit-user-drag:element}.TreeViewItem.focused>.label{border:1px solid #4b4f51}.TreeViewItem .label.selected{background-color:rgba(195,223,133,.2666666667)}.TreeViewItem *{cursor:pointer}.TreeViewItem>.expander{display:inline-block;opacity:0;width:.3em;margin-right:.5em;font-weight:bold;transform:rotate(0deg);transition:transform .15s ease-in-out}.TreeViewItem.expandable>.expander{opacity:1;display:inline-block}.TreeViewItem.expanded>.expander{transform:rotate(90deg)}.TreeViewItem>.children{margin-left:1em;overflow:hidden;display:none}.TreeViewItem.expanded>.children{display:block}.Panel.content{margin:0;padding:0;width:100%}.ListView,.ListView.content{display:table;margin:0;padding:0;width:100%}.ListView .cell{font-size:80%;display:table-cell;padding:.15em .6em;border-left:.2em solid #262829;border-bottom:.2em solid #262829;background-color:#1f2021}.ListView .row{display:table-row}.ListView .row .cell{user-select:text}.ListView .row .cell input{background-color:rgba(0,0,0,0);border:none;outline:none;color:#dadcdd;margin:0;padding:0;user-select:text;width:auto;display:inline}.ListView .row.selected .cell{background-color:rgba(195,223,133,.2666666667)}.ListView .row .cell.editing{background-color:rgba(62,80,21,.2666666667);box-shadow:inset 0 0 .1em rgba(195,223,133,.2666666667)}.ListView .header{display:table-row}.ListView .header .cell{background-color:#323536}.NodeEditor path{stroke:#999}.NodeEditor path.notConnectable{stroke:#944}.NodeEditor .selectRect{background-color:rgba(112,117,120,.3);border:1px solid #707578;width:300px;height:300px;position:absolute;z-index:500}.Dropdown{background-color:rgba(112,117,120,.3);border:1px solid #575c5e;color:#dadcdd;outline:none}.ListBox{border:1px solid #343738;background-color:#1a1d1f;color:#cad2d4;border-radius:.1em;outline:none;font-size:.9em;overflow:auto}.ListBox>div{padding:.3em 1em}.ListBox>div:hover{background-color:#262a2d}.ListBox>div.selected{background-color:rgba(195,223,133,.2666666667)}.ColorPicker .handle{border-radius:100%;position:relative;border:.05em solid #222;width:1.2em;height:1.2em;box-shadow:.03em .03em .3em rgba(0,0,0,.2666666667),inset 0 0 .5em #fff;transform:translate(-50%, -50%);pointer-events:none}.PaintStyleColorPicker>.hue{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to right, hsl(0deg, 100%, 50%), hsl(22.5deg, 100%, 50%), hsl(45deg, 100%, 50%), hsl(67.5deg, 100%, 50%), hsl(90deg, 100%, 50%), hsl(112.5deg, 100%, 50%), hsl(135deg, 100%, 50%), hsl(157.5deg, 100%, 50%), hsl(180deg, 100%, 50%), hsl(202.5deg, 100%, 50%), hsl(225deg, 100%, 50%), hsl(247.5deg, 100%, 50%), hsl(270deg, 100%, 50%), hsl(292.5deg, 100%, 50%), hsl(315deg, 100%, 50%), hsl(337.5deg, 100%, 50%), hsl(359deg, 100%, 50%))}.PaintStyleColorPicker>.hue *,.PaintStyleColorPicker>.lightness *{pointer-events:none}.PaintStyleColorPicker .saturation{width:100%;height:100%;background:linear-gradient(to bottom, transparent, hsl(0deg, 0%, 50%))}.PaintStyleColorPicker .lightness{width:2em;height:400px;display:inline-block;margin-left:.5em;background-color:red;background-image:linear-gradient(to bottom, white, transparent, black)}.PaintStyleColorPicker .lightness>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.GimpStyleColorPicker>.saturation{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to bottom, transparent, black)}.GimpStyleColorPicker>.saturation *,.GimpStyleColorPicker>.value *{pointer-events:none}.GimpStyleColorPicker .value{width:100%;height:100%}.GimpStyleColorPicker .value::before{content:" ";display:block;float:left;width:100%;height:100%;mask:linear-gradient(to right, white, transparent);background:linear-gradient(to bottom, white, black)}.GimpStyleColorPicker .hue{width:2em;height:400px;display:inline-block;margin-left:.5em;background:linear-gradient(to bottom, hsl(0deg, 100%, 50%), hsl(22.5deg, 100%, 50%), hsl(45deg, 100%, 50%), hsl(67.5deg, 100%, 50%), hsl(90deg, 100%, 50%), hsl(112.5deg, 100%, 50%), hsl(135deg, 100%, 50%), hsl(157.5deg, 100%, 50%), hsl(180deg, 100%, 50%), hsl(202.5deg, 100%, 50%), hsl(225deg, 100%, 50%), hsl(247.5deg, 100%, 50%), hsl(270deg, 100%, 50%), hsl(292.5deg, 100%, 50%), hsl(315deg, 100%, 50%), hsl(337.5deg, 100%, 50%), hsl(359deg, 100%, 50%))}.GimpStyleColorPicker .hue>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.WheelColorPicker>.wheel{position:relative;border:.5em solid #090909;width:25em;height:25em;border-radius:100%;padding:3em;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:conic-gradient(hsl(90deg, 100%, 50%), hsl(67.5deg, 100%, 50%), hsl(45deg, 100%, 50%), hsl(22.5deg, 100%, 50%), hsl(0deg, 100%, 50%), hsl(337.5deg, 100%, 50%), hsl(315deg, 100%, 50%), hsl(292.5deg, 100%, 50%), hsl(270deg, 100%, 50%), hsl(247.5deg, 100%, 50%), hsl(225deg, 100%, 50%), hsl(202.5deg, 100%, 50%), hsl(180deg, 100%, 50%), hsl(157.5deg, 100%, 50%), hsl(135deg, 100%, 50%), hsl(112.5deg, 100%, 50%), hsl(89deg, 100%, 50%))}.WheelColorPicker>.wheel>.handle{width:3em;height:3em;position:absolute}.WheelColorPicker>.wheel>.innerCircle{width:100%;height:100%;background-color:#222;border-radius:100%;padding:18%;transform:rotate(45deg);box-shadow:inset .5em .5em 1em rgba(0,0,0,.5333333333)}.WheelColorPicker>.wheel>.innerCircle .saturation,.WheelColorPicker>.wheel>.innerCircle .lightness{width:100%;height:100%}.WheelColorPicker>.saturation *{pointer-events:none}.WheelColorPicker>.wheel>.innerCircle .saturation{background-color:red;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background-image:linear-gradient(45deg, hsl(0deg, 0%, 50%), transparent)}.WheelColorPicker>.wheel>.innerCircle .lightness{background:linear-gradient(135deg, white, transparent, black)}.ColorPickerDialog .WheelColorPicker{margin-top:1em;margin-bottom:1em}.ColorPickerDialog .ColorOutput{display:inline-block;width:3em;padding:.3em .8em;border:1px solid #343738;height:2.4em;vertical-align:top;margin-top:.05em;margin-right:.4em}',"",{version:3,sources:["webpack://./src/style.scss"],names:[],mappings:"AAAA,EAIA,qBACI,CAAA,cACA,CAAA,gBACA,CAAA,EAGJ,cACI,CAAA,aACA,CAAA,oBACA,CAAA,QAEA,aACI,CAAA,yBACA,CAAA,cAIR,UACI,CAAA,uBACA,CAAA,IAGJ,mBACI,CAAA,KAGJ,wBA7BkB,CAAA,aADN,CAAA,eAiCR,CAAA,MAGJ,wBACI,CAAA,kBACA,CAAA,aACA,CAAA,kBACA,CAAA,iBACA,CAAA,YACA,CAAA,eACA,CAAA,iBACA,CAAA,kBACA,CAAA,SAGJ,wBACI,CAAA,2CACA,CAAA,+BACA,CAAA,UACA,CAAA,YACA,CAAA,iBACA,CAAA,UACA,CAAA,KACA,CAAA,MACA,CAAA,eAEA,WACI,CAAA,gBACA,CAAA,eAGJ,oBACI,CAAA,iBACA,CAAA,WACA,CAAA,kBACA,CAAA,qBAEA,wBArEU,CAAA,aA2ElB,YACI,CAAA,iBACA,CAAA,wBACA,CAAA,2CACA,CAAA,MACA,CAAA,SACA,CAAA,aACA,CAAA,eACA,CAAA,YACA,CAAA,oBAEA,gBACI,CAAA,kCAEA,WACI,CAAA,oBACA,CAAA,iBACA,CAAA,OACA,CAAA,iBACA,CAAA,0BAGJ,wBAjGU,CAAA,6BAsGd,aACI,CAAA,mCAEA,wBACI,CAAA,wBAIR,wBACI,CAAA,yBACA,CAAA,WACA,CAAA,OAKR,aACI,CAAA,iBACA,CAAA,wCACA,CAAA,MACA,CAAA,KACA,CAAA,OACA,CAAA,QACA,CAAA,yBAIJ,QACI,CAAA,eAGJ,wBACI,CAAA,YACA,CAAA,eACA,CAAA,WACA,CAAA,aA1IQ,CAAA,gBA4IR,CAAA,aACA,CAAA,iBACA,CAAA,kBACA,CAAA,2BAEA,YACI,CAAA,2BAEJ,wBACI,CAAA,6BAEJ,wBACI,CAAA,OAIR,wCACI,CAAA,iBACA,CAAA,UACA,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,eAEA,UACI,CAAA,MAIR,oBACI,CAAA,QAGJ,cACI,CAAA,cACA,CAAA,cACA,CAAA,eACA,CAAA,mBAGJ,iBACI,CAAA,UACA,CAAA,OACA,CAAA,QACA,CAAA,+BACA,CAAA,wBAEA,CAAA,2CACA,CAAA,iCAEA,UACI,CAAA,iBACA,CAAA,YACA,CAAA,wBACA,CAAA,+BACA,CAAA,2DAEA,YACI,CAAA,SACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,uEAEA,wBACI,CAAA,qCAKZ,kBACI,CAAA,iBACA,CAAA,mDAGJ,WACI,CAAA,qCAGJ,kBACI,CAAA,iBACA,CAAA,wCAIR,eAEI,CAAA,kBACA,CAAA,mBAGJ,UACI,CAAA,OAGJ,gBACI,CAAA,iBAIA,eACI,CAAA,iBACA,CAAA,4BAIJ,oBAGI,CAAA,0CAEA,SACI,CAAA,WACA,CAAA,wBACA,CAAA,gBACA,CAAA,0BAIR,aAGI,CAAA,UACA,CAAA,wCAEA,UACI,CAAA,UACA,CAAA,wBACA,CAAA,gBACA,CAAA,oCAIR,wBACI,CAAA,WAIR,cACI,CAAA,cACA,CAAA,eACA,CAAA,wBA3Rc,CAAA,kBA6Rd,eACI,CAAA,iBACA,CAAA,cACA,CAAA,wBACA,CAAA,+BACA,CAAA,+BAEA,SACI,CAAA,WACA,CAAA,YACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,qCAEA,wBA7SM,CAAA,oBAmTd,UACI,CAAA,yBACA,CAAA,aACA,CAAA,gCAGJ,gBACI,CAAA,8BAEJ,gBACI,CAAA,mDAEJ,kBACI,CAAA,iEAGJ,YAGI,CAAA,8BAGA,aACI,CAAA,UACA,CAAA,KACA,CAAA,QACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,OACA,CAAA,8BAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,MACA,CAAA,QACA,CAAA,gCAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,kBACA,CAAA,iBACA,CAAA,OACA,CAAA,QACA,CAAA,oBAKZ,iBACI,CAAA,UACA,CAAA,KAEA,CAAA,MACA,CAAA,OACA,CAAA,QACA,CAAA,aAGJ,cACI,CAAA,oCACA,CAAA,WACA,CAAA,YAGJ,UACI,CAAA,WACA,CAAA,eACA,CAAA,oBACA,CAAA,mBAEA,eACI,CAAA,yBAGJ,eACI,CAAA,gBAGJ,iBACI,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,UACA,CAAA,WACA,CAAA,mBAEA,CAAA,kBAGJ,iBACI,CAAA,MAIR,oBACI,CAAA,kBACA,CAAA,2CACA,CAAA,wBAEA,CAAA,kBACA,CAAA,aAEA,2BACI,CAAA,wBACA,CAAA,YAGJ,YACI,CAAA,6BACA,CAAA,cAGJ,oBACI,CAAA,wBACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,oBAEA,wBACI,CAAA,cAIR,oBACI,CAAA,uBACA,CAAA,sBAEA,kBACI,CAAA,iBACA,CAAA,qBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,aACA,CAAA,eAIR,oBACI,CAAA,uBACA,CAAA,gBACA,CAAA,uBAEA,gBACI,CAAA,mBACA,CAAA,uBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,aACA,CAAA,gBAIR,uBACI,CAAA,oBACA,CAAA,aACA,CAAA,cACA,CAAA,YAEA,CAAA,qBACA,CAAA,6BACA,CAAA,eAGJ,2BACI,CAAA,sBAEA,wBACI,CAAA,qBAKZ,8BACI,CAAA,oBACA,CAAA,8BACA,CAAA,yBACA,CAAA,6BAGJ,wBACI,CAAA,8BAGJ,8CAxfiB,CAAA,gBA4fjB,cACI,CAAA,wBAGJ,oBACI,CAAA,SACA,CAAA,UACA,CAAA,iBACA,CAAA,gBACA,CAAA,sBACA,CAAA,qCACA,CAAA,mCAGJ,SACI,CAAA,oBACA,CAAA,iCAGJ,uBACI,CAAA,wBAGJ,eACI,CAAA,eACA,CAAA,YACA,CAAA,iCAMJ,aACI,CAAA,eAIJ,QACI,CAAA,SACA,CAAA,UACA,CAAA,4BAGJ,aACI,CAAA,QACA,CAAA,SACA,CAAA,UACA,CAAA,gBAGJ,aACI,CAAA,kBACA,CAAA,kBACA,CAAA,8BACA,CAAA,gCACA,CAAA,wBACA,CAAA,eAGJ,iBACI,CAAA,qBAEA,gBACI,CAAA,2BAEA,8BACI,CAAA,WACA,CAAA,YACA,CAAA,aAlkBA,CAAA,QAokBA,CAAA,SACA,CAAA,gBACA,CAAA,UACA,CAAA,cACA,CAAA,8BAIR,8CA1kBa,CAAA,6BA8kBb,2CACI,CAAA,uDACA,CAAA,kBAIR,iBACI,CAAA,wBAEA,wBACI,CAAA,iBAIR,WACI,CAAA,gCAGJ,WACI,CAAA,wBAIJ,qCACI,CAAA,wBACA,CAAA,WACA,CAAA,YACA,CAAA,iBACA,CAAA,WACA,CAAA,UAGJ,qCACI,CAAA,wBACA,CAAA,aAlnBQ,CAAA,YAonBR,CAAA,SAGJ,wBACI,CAAA,wBACA,CAAA,aACA,CAAA,kBACA,CAAA,YACA,CAAA,cACA,CAAA,aACA,CAAA,aAEA,gBACI,CAAA,mBAEA,wBACI,CAAA,sBAGJ,8CAroBS,CAAA,qBAkpBjB,kBACI,CAAA,iBACA,CAAA,uBACA,CAAA,WACA,CAAA,YACA,CAAA,uEACA,CAAA,+BAEA,CAAA,mBACA,CAAA,4BAGJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,scACA,CAAA,kEAqBJ,mBAEI,CAAA,mCAGJ,UACI,CAAA,WACA,CAAA,sEACA,CAAA,kCAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,oBACA,CAAA,sEACA,CAAA,0CAGJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,kCAOJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,yDACA,CAAA,mEAGJ,mBAEI,CAAA,6BAGJ,UACI,CAAA,WACA,CAAA,qCAGJ,WACI,CAAA,aACA,CAAA,UACA,CAAA,UACA,CAAA,WACA,CAAA,kDACA,CAAA,mDACA,CAAA,2BAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,ucACA,CAAA,mCAqBJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,yBAQJ,iBACI,CAAA,yBACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,WACA,CAAA,gDACA,CAAA,0bACA,CAAA,iCAqBJ,SACI,CAAA,UACA,CAAA,iBACA,CAAA,sCAIJ,UACI,CAAA,WACA,CAAA,qBACA,CAAA,kBACA,CAAA,WACA,CAAA,uBACA,CAAA,sDACA,CAAA,mGAGJ,UAEI,CAAA,WACA,CAAA,gCAGJ,mBACI,CAAA,kDAGJ,oBACI,CAAA,gDACA,CAAA,wEACA,CAAA,iDAGJ,6DACI,CAAA,qCAGJ,cACI,CAAA,iBACA,CAAA,gCAGJ,oBACI,CAAA,SACA,CAAA,iBACA,CAAA,wBACA,CAAA,YAEA,CAAA,kBACA,CAAA,gBACA,CAAA,iBACA",sourcesContent:["$textColor: #dadcdd;\n$backgroundColor: #262829;\n$highlightColor: #c3df8544;\n\n* {\n box-sizing: border-box;\n cursor: default;\n user-select: none;\n}\n\na {\n cursor: pointer;\n color: #c3df85;\n text-decoration: none;\n \n &:hover {\n color: #d7e6b9;\n text-decoration: underline;\n }\n}\n\n.beingDragged {\n opacity: 0.6;\n z-index: 1000 !important;\n}\n\nimg {\n pointer-events: none;\n}\n\nbody {\n background-color: $backgroundColor;\n color: $textColor;\n overflow: hidden;\n}\n\ninput {\n border: 1px solid #343738;\n background: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n padding: 0.3em 0.8em;\n outline: none;\n font-size: 1.2em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n}\n\n.MenuBar {\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n border-bottom: 1px solid lighten($backgroundColor, 20%);\n width: 100%;\n height: 2.5em;\n position: absolute;\n z-index: 50;\n top: 0;\n left: 0;\n\n .Icon {\n height: 100%;\n padding: 0.4em 1em;\n }\n \n .Menu {\n display: inline-block;\n padding: 0.6em 0.7em;\n height: 100%;\n vertical-align: top;\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n}\n\n.MenuContent {\n display: none;\n position: absolute;\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n left: 0;\n top: 2.5em;\n min-width: 6em;\n min-height: 0.5em;\n z-index: 1000;\n \n & > .entry {\n padding: 0.5em 2em;\n\n &.submenu:after {\n content: '›';\n display: inline-block;\n position: absolute;\n right: 0;\n margin-right: 0.5em;\n }\n \n &:hover {\n background-color: $backgroundColor;\n }\n } \n\n & > .entry.disabled {\n color: darken($textColor, 35%);\n \n &:hover {\n background-color: lighten($backgroundColor, 5%);\n }\n }\n \n & > .separator {\n background-color: lighten($backgroundColor, 20%);\n border: 0.4em solid lighten($backgroundColor, 10%);\n height: 0.9em;\n }\n}\n\n\n.Modal {\n display: block;\n position: absolute;\n background-color: #00000077;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n}\n\n\nbutton::-moz-focus-inner {\n border: 0;\n}\n \nbutton, .button {\n background-color: darken($backgroundColor, 10%);\n outline: none;\n border-radius: 0;\n border: none;\n color: $textColor;\n padding: 0.5em 2em;\n font-size: 1em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n \n &:focus {\n outline: none;\n }\n &:hover {\n background-color: darken($backgroundColor, 5%);\n }\n &:active {\n background-color: darken($backgroundColor, 8%);\n }\n}\n\n.Modal {\n background-color: #00000077;\n position: absolute;\n z-index: 52;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n \n .Dialog {\n z-index: 53;\n }\n}\n\n.text {\n white-space: pre-line;\n}\n\n.Dialog {\n min-width: 15em;\n max-width: 80vw;\n min-height: 5em;\n max-height: 80vh;\n}\n\n.Dialog, .DockPanel {\n position: absolute;\n z-index: 51;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n\n .title {\n width: 100%;\n text-align: center;\n padding: 0.5em;\n background-color: lighten($backgroundColor, 20%);\n border-bottom: 1px solid lighten($backgroundColor, 30%);\n\n .closeButton {\n padding: 0.2em;\n width: 2em;\n height: 2em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: lighten($backgroundColor, 5%);\n \n &:hover {\n background-color: lighten($backgroundColor, 10%);\n }\n }\n }\n\n .content {\n padding: 0.8em 1.5em;\n position: absolute;\n }\n\n .content.w3term {\n height: 100%;\n }\n\n .buttons {\n padding: 0.8em 1.5em;\n text-align: center;\n }\n}\n\n.Dialog .content,\n.Dialog .Panel.content {\n position: static;\n padding: 0.8em 1.5em;\n}\n\n.InputDialog input {\n width: 100%;\n}\n\n.Label {\n user-select: text;\n}\n\n.DockContainer {\n & > * {\n overflow: hidden;\n position: absolute;\n }\n\n \n &.horizontal > * {\n // border: 1px solid #00ffff;\n // background-color: #00ffff66;\n display: inline-block;\n\n &.DockSeparator {\n width: 3px;\n height: 100%;\n background-color: darken($backgroundColor, 10%); \n cursor: ew-resize;\n }\n }\n \n &.vertical > * {\n // border: 1px solid #ffff00;\n // background-color: #ffff0066;\n display: block;\n clear: both;\n \n &.DockSeparator {\n width: 100%;\n height: 3px;\n background-color: darken($backgroundColor, 10%); \n cursor: ns-resize;\n }\n }\n \n & > .DockSeparator:hover {\n background-color: darken($backgroundColor, 5%);\n }\n}\n\n.DockPanel {\n transform: none;\n max-width: none;\n max-height: none;\n background-color: $backgroundColor;\n .title {\n text-align: left;\n padding: 0.1em 0.5em;\n font-size: 0.9em;\n background-color: darken($backgroundColor, 5%);\n border-bottom: 1px solid darken($backgroundColor, 8%);\n\n .closeButton {\n padding: 0;\n width: 1.6em;\n height: 1.6em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: darken($backgroundColor, 5%);\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n }\n\n .content {\n width: 100%;\n height: calc(100% - 1.5em);\n overflow: auto;\n }\n\n &.resizingHorizontally {\n cursor: ew-resize;\n }\n &.resizingVertically {\n cursor: ns-resize;\n }\n &.resizingHorizontally.resizingVertically {\n cursor: nwse-resize;\n }\n\n .resizeEW,\n .resizeNS,\n .resizeDiag {\n display: none;\n }\n &.floating {\n .resizeEW {\n display: block;\n width: 0.3em;\n top: 0;\n bottom: 0;\n background-color: transparent;\n cursor: ew-resize;\n position: absolute;\n right: 0;\n }\n .resizeNS {\n display: block;\n width: 100%;\n height: 0.3em;\n background-color: transparent;\n cursor: ns-resize;\n position: absolute;\n left: 0;\n bottom: 0;\n }\n .resizeDiag {\n display: block;\n width: 0.5em;\n height: 0.5em;\n background-color: transparent;\n cursor: nwse-resize;\n position: absolute;\n right: 0;\n bottom: 0;\n }\n }\n}\n\nbody > .DockContainer {\n position: absolute;\n z-index: 49;\n\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.dockOverlay {\n position: fixed;\n background-color: #33779999;\n z-index: 999;\n}\n\n.NodeEditor {\n width: 100%;\n height: 100%;\n overflow: hidden;\n padding: 0 !important;\n\n &.moving {\n cursor: grabbing;\n }\n\n &.beingDragged {\n cursor: grabbing;\n }\n\n svg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n }\n \n .Node {\n position: absolute;\n }\n}\n\n.Node {\n display: inline-block;\n border-radius: 0.5em;\n box-shadow: 0 0 0.5em #00000077;\n \n background-color: darken($backgroundColor, 5%);\n white-space: nowrap;\n \n .title {\n border-radius: 0.5em 0.5em 0 0;\n background-color: lighten($backgroundColor, 5%);\n }\n\n .body {\n display: flex;\n justify-content: space-between;\n }\n\n .bullet {\n display: inline-block;\n background-color: lighten($backgroundColor, 10%);\n width: 0.8em;\n height: 0.8em;\n border-radius: 0.4em;\n\n &:hover {\n background-color: lighten($backgroundColor, 25%);\n }\n }\n\n .inputs {\n display: inline-block;\n vertical-align: text-top;\n \n .bullet {\n margin-left: -0.3em;\n margin-right: 0.5em;\n }\n \n .input {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0.3em 0;\n }\n }\n \n .outputs {\n display: inline-block;\n vertical-align: text-top;\n text-align: right;\n \n .bullet {\n margin-left: 0.5em;\n margin-right: -0.3em;\n }\n \n .output {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0.3em 0;\n }\n }\n \n .contents {\n vertical-align: text-top;\n display: inline-block;\n min-width: 2em;\n min-height: 2em;\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n\n &.selected {\n box-shadow: 0 0 0.5em lighten($backgroundColor, 15%);\n\n .title {\n background-color: lighten($backgroundColor, 15%);\n }\n }\n}\n\n.TreeViewItem .label {\n background-color: transparent;\n display: inline-block;\n border: 1px solid transparent;\n -webkit-user-drag: element;\n}\n\n.TreeViewItem.focused > .label {\n border: 1px solid lighten($backgroundColor, 15%);\n}\n\n.TreeViewItem .label.selected {\n background-color: $highlightColor;\n}\n\n.TreeViewItem * {\n cursor: pointer;\n}\n\n.TreeViewItem > .expander {\n display: inline-block;\n opacity: 0;\n width: 0.3em;\n margin-right: 0.5em;\n font-weight: bold;\n transform: rotate(0deg);\n transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expandable > .expander {\n opacity: 1;\n display: inline-block;\n}\n\n.TreeViewItem.expanded > .expander {\n transform: rotate(90deg);\n}\n\n.TreeViewItem > .children {\n margin-left: 1em;\n overflow: hidden;\n display: none;\n // transform: scaleY(0); \n // transform-origin: top;\n // transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expanded > .children {\n display: block;\n // transform: scaleY(1);\n}\n\n.Panel.content {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView, .ListView.content {\n display: table;\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView .cell {\n font-size: 80%;\n display: table-cell;\n padding: 0.15em 0.6em;\n border-left: 0.2em solid $backgroundColor;\n border-bottom: 0.2em solid $backgroundColor;\n background-color: darken($backgroundColor, 3%);\n}\n\n.ListView .row {\n display: table-row;\n \n .cell {\n user-select: text;\n\n input {\n background-color: transparent;\n border: none;\n outline: none;\n color: $textColor;\n margin: 0;\n padding: 0;\n user-select: text;\n width: auto;\n display: inline;\n }\n }\n\n &.selected .cell {\n background-color: $highlightColor;\n }\n\n .cell.editing {\n background-color: darken($highlightColor, 50%);\n box-shadow: inset 0 0 0.1em $highlightColor;\n }\n}\n\n.ListView .header {\n display: table-row;\n\n .cell {\n background-color: lighten($backgroundColor, 5%);\n }\n}\n\n.NodeEditor path {\n stroke: #999999ff;\n}\n\n.NodeEditor path.notConnectable {\n stroke: #994444ff;\n}\n\n\n.NodeEditor .selectRect {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 30%);\n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 500;\n}\n\n.Dropdown {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 20%);\n color: $textColor;\n outline: none;\n}\n\n.ListBox {\n border: 1px solid #343738;\n background-color: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n outline: none;\n font-size: 0.9em;\n overflow: auto;\n\n & > div {\n padding: 0.3em 1em;\n\n &:hover {\n background-color: lighten(#1a1d1f, 5%);\n }\n\n &.selected {\n background-color: $highlightColor;\n }\n }\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n\n\n.ColorPicker .handle {\n border-radius: 100%;\n position:relative;\n border: 0.05em solid #222;\n width: 1.2em;\n height: 1.2em;\n box-shadow: 0.03em 0.03em 0.3em #00000044,\n inset 0 0 0.5em white;\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n.PaintStyleColorPicker > .hue {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to right,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.PaintStyleColorPicker > .hue *,\n.PaintStyleColorPicker > .lightness * {\n pointer-events: none;\n}\n\n.PaintStyleColorPicker .saturation {\n width: 100%;\n height: 100%;\n background: linear-gradient(to bottom, transparent, hsl(0, 0%, 50%));\n}\n\n.PaintStyleColorPicker .lightness {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background-color: red;\n background-image: linear-gradient(to bottom, white, transparent, black);\n}\n\n.PaintStyleColorPicker .lightness > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.GimpStyleColorPicker > .saturation {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to bottom, transparent, black);\n}\n\n.GimpStyleColorPicker > .saturation *,\n.GimpStyleColorPicker > .value * {\n pointer-events: none;\n}\n\n.GimpStyleColorPicker .value {\n width: 100%;\n height: 100%;\n}\n\n.GimpStyleColorPicker .value::before {\n content: ' ';\n display: block;\n float: left;\n width: 100%;\n height: 100%;\n mask: linear-gradient(to right, white, transparent);\n background: linear-gradient(to bottom, white, black);\n}\n\n.GimpStyleColorPicker .hue {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background: linear-gradient(to bottom,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.GimpStyleColorPicker .hue > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.WheelColorPicker > .wheel {\n position: relative;\n border: 0.5em solid #090909;\n width: 25em;\n height: 25em;\n border-radius: 100%;\n padding: 3em;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: conic-gradient(\n hsl(90, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(0, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(89, 100%, 50%)\n );\n}\n\n.WheelColorPicker > .wheel >.handle {\n width: 3em;\n height: 3em;\n position: absolute;\n}\n\n\n.WheelColorPicker > .wheel > .innerCircle {\n width: 100%;\n height: 100%;\n background-color: #222;\n border-radius: 100%;\n padding: 18%;\n transform: rotate(45deg);\n box-shadow: inset 0.5em 0.5em 1em #00000088;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation,\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n width: 100%;\n height: 100%;\n}\n\n.WheelColorPicker > .saturation * {\n pointer-events: none;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation {\n background-color: red;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background-image: linear-gradient(45deg, hsl(0, 0%, 50%), transparent);\n}\n\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n background: linear-gradient(135deg, white, transparent, black);\n}\n\n.ColorPickerDialog .WheelColorPicker {\n margin-top: 1em;\n margin-bottom: 1em;\n}\n\n.ColorPickerDialog .ColorOutput {\n display: inline-block;\n width: 3em;\n padding: .3em .8em;\n border: 1px solid #343738;\n\n height: 2.4em;\n vertical-align: top;\n margin-top: 0.05em;\n margin-right: 0.4em;\n}"],sourceRoot:""}]);const s=l},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);o&&l[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},537:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */"),l=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(l).concat([r]).join("\n")}return[t].join("\n")}},379:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},l=[],s=0;s<e.length;s++){var a=e[s],c=o.base?a[0]+o.base:a[0],d=r[c]||0,h="".concat(c," ").concat(d);r[c]=d+1;var u=n(h),A={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==u)t[u].references++,t[u].updater(A);else{var p=i(A,o);o.byIndex=s,t.splice(s,0,{identifier:h,updater:p,references:1})}l.push(h)}return l}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var l=0;l<r.length;l++){var s=n(r[l]);t[s].references--}for(var a=o(e,i),c=0;c<r.length;c++){var d=n(r[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=a}}},569:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};(()=>{n.r(o),n.d(o,{AbstractColorPicker:()=>H,Button:()=>F,ClipboardData:()=>Le,Color:()=>w,ColorModificationMode:()=>g,ColorPickerDialog:()=>j,DEGREES_TO_RAD:()=>f,Dialog:()=>L,DockContainer:()=>ke,DockDirection:()=>M,DockPanel:()=>xe,Dropdown:()=>Y,FakeClipboard:()=>Ne,FloatListViewColumn:()=>ee,GimpStyleColorPicker:()=>T,Image:()=>ge,InputDialog:()=>Se,IntListViewColumn:()=>Z,Label:()=>pe,ListBox:()=>$,ListView:()=>te,ListViewColumn:()=>q,Menu:()=>de,MenuBar:()=>ue,MessageDialog:()=>Pe,MessageDialogButton:()=>Be,Node:()=>Ue,NodeClipboardData:()=>je,NodeConnection:()=>Je,NodeEditor:()=>Fe,NodePort:()=>Ye,OkMessageDialog:()=>De,Orientation:()=>R,PaintStyleColorPicker:()=>W,Panel:()=>S,RAD_TO_DEGREES:()=>C,ROOT:()=>O,StringListBox:()=>K,StringListViewColumn:()=>Q,TreeView:()=>oe,TreeViewItem:()=>ie,UdoableActionCategory:()=>Ee,UndoHistory:()=>Me,UndoableCommand:()=>Re,Vector2:()=>_,WheelColorPicker:()=>V,Widget:()=>k,currentMousePos:()=>E,fakeClipboard:()=>ze,rectContains:()=>y});var e=n(379),t=n.n(e),i=n(795),r=n.n(i),l=n(569),s=n.n(l),a=n(565),c=n.n(a),d=n(216),h=n.n(d),u=n(589),A=n.n(u),p=n(192),m={};m.styleTagTransform=A(),m.setAttributes=c(),m.insert=s().bind(null,"head"),m.domAPI=r(),m.insertStyleElement=h(),t()(p.Z,m),p.Z&&p.Z.locals&&p.Z.locals;var g,C=180/Math.PI,f=Math.PI/180,_=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.getAngleToOtherInRadians=function(e){return Math.acos(Math.max(Math.min(this.getScalarProduct(e)/(this.getLength()*e.getLength()),1),-1))},e.prototype.getAngleToOtherInDegrees=function(e){return this.getAngleToOtherInRadians(e)*C},e.prototype.getRotatedInRadians=function(t){var n=Math.cos(t),o=Math.sin(t);return new e(this.x*n-this.y*o,this.x*o+this.y*n)},e.prototype.getRotatedInDegrees=function(e){return this.getRotatedInRadians(e*f)},e.prototype.rotateInRadians=function(e){var t=Math.cos(e),n=Math.sin(e),o=this.x*t-this.y*n,i=this.x*n+this.y*t;this.x=o,this.y=i},e.prototype.rotateInDegrees=function(e){this.rotateInRadians(e*f)},e.prototype.getScalarProduct=function(e){return this.x*e.x+this.y*e.y},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.getScaled=function(t){return new e(this.x*t,this.y*t)},e.prototype.getLength=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.normalize=function(){var e=this.getLength();this.x=this.x/e,this.y=this.y/e},e.prototype.getNormalized=function(){var t=this.getLength();return new e(this.x/t,this.y/t)},e.prototype.setLength=function(e){this.normalize(),this.scale(e)},e.prototype.getWithLength=function(e){var t=this.getNormalized();return t.scale(e),t},e}();function y(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function v(e,t){return(e%t+t)%t}!function(e){e[e.Percentage=0]="Percentage",e[e.FixedAmount=1]="FixedAmount"}(g||(g={}));var b=new RegExp(/^#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/),w=function(){function e(e,t,n){this.setRgb(e||0,t||0,n||0)}return e.fromRgb=function(t,n,o){return new e(t,n,o)},e.fromHsl=function(t,n,o){var i=e._hslToRgb(t,n,o),r=e.fromRgbObject(i);return r._hueInfo=t,r},e.fromHsv=function(t,n,o){var i=e._hsvToRgb(t,n,o),r=e.fromRgbObject(i);return r._hueInfo=t,r},e.fromHex=function(t){var n=e._hexToRgb(t);return n?e.fromRgbObject(n):null},e._hexToRgb=function(e){var t=e.match(b);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},e._hslToRgb=function(e,t,n){e=v(e,360);var o,i,r,l=(1-Math.abs(2*n-1))*t,s=l*(1-Math.abs(v(e/60,2)-1)),a=n-l/2;return e>=0&&e<60?(o=l,i=s,r=0):e>=60&&e<120?(o=s,i=l,r=0):e>=120&&e<180?(o=0,i=l,r=s):e>=180&&e<240?(o=0,i=s,r=l):e>=240&&e<300?(o=s,i=0,r=l):e>=300&&e<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},e._hsvToRgb=function(e,t,n){e=v(e,360);var o,i,r,l=n*t,s=l*(1-Math.abs(v(e/60,2)-1)),a=n-l;return e>=0&&e<60?(o=l,i=s,r=0):e>=60&&e<120?(o=s,i=l,r=0):e>=120&&e<180?(o=0,i=l,r=s):e>=180&&e<240?(o=0,i=s,r=l):e>=240&&e<300?(o=s,i=0,r=l):e>=300&&e<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},e.fromRgbObject=function(t){return e.fromRgb(t.r,t.g,t.b)},e.fromHslObject=function(t){return e.fromHsl(t.h,t.s,t.l)},e.fromHsvObject=function(t){return e.fromHsv(t.h,t.s,t.v)},e.prototype.setRgb=function(e,t,n){this._r=Math.max(Math.min(Math.round(e),255),0),this._g=Math.max(Math.min(Math.round(t),255),0),this._b=Math.max(Math.min(Math.round(n),255),0)},e.prototype.setHsl=function(t,n,o){var i=e._hslToRgb(t,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=t},e.prototype.setHsv=function(t,n,o){var i=e._hsvToRgb(t,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=t},e.prototype.setHex=function(t){var n=e._hexToRgb(t);this._r=n.r,this._g=n.g,this._b=n.b},e.prototype.setRgbObject=function(e){this.setRgb(e.r,e.g,e.b)},e.prototype.setHslObject=function(e){this.setHsl(e.h,e.s,e.l)},e.prototype.setHsvObject=function(e){this.setHsv(e.h,e.s,e.v)},e.prototype.getHsl=function(){var e,t=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(t,n,o),r=Math.min(t,n,o),l=i-r;0==l?e=0:i==t?e=60*v((n-o)/l,6):i==n?e=60*((o-t)/l+2):i==o&&(e=60*((t-n)/l+4));var s=(i+r)/2,a=0==l?0:l/(1-Math.abs(2*s-1));return{h:0==e&&this._hueInfo?this._hueInfo:e,s:a,l:s}},e.prototype.getHsv=function(){var e,t=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(t,n,o),r=i-Math.min(t,n,o);0==r?e=0:i==t?e=60*v((n-o)/r,6):i==n?e=60*((o-t)/r+2):i==o&&(e=60*((t-n)/r+4));var l=0==r?0:r/i,s=i;return{h:0==e&&this._hueInfo?this._hueInfo:e,s:l,v:s}},e.prototype.getRgb=function(){return{r:this._r,g:this._g,b:this._b}},e.prototype.getHex=function(){var e=this._r.toString(16).padStart(2,"0"),t=this._g.toString(16).padStart(2,"0"),n=this._b.toString(16).padStart(2,"0");return"#".concat(e).concat(t).concat(n)},e.prototype.lighten=function(e,t){var n=this.getHsl();t==g.FixedAmount?n.l=Math.max(0,Math.min(n.l+e,1)):n.l=Math.max(0,Math.min(n.l*(e+1),1)),this.setHslObject(n)},e.prototype.darken=function(e,t){var n=this.getHsl();t==g.FixedAmount?n.l=Math.max(0,Math.min(n.l-e,1)):n.l=Math.max(0,Math.min(n.l*(1-e),1)),this.setHslObject(n)},e.prototype.saturate=function(e,t){var n=this.getHsl();t==g.FixedAmount?n.s=Math.max(0,Math.min(n.s+e,1)):n.s=Math.max(0,Math.min(n.s*(e+1),1)),this.setHslObject(n)},e.prototype.desaturate=function(e,t){var n=this.getHsl();t==g.FixedAmount?n.s=Math.max(0,Math.min(n.s+e,1)):n.s=Math.max(0,Math.min(n.s*(1-e),1)),this.setHslObject(n)},e.prototype.setSaturation=function(e){e=Math.min(Math.max(e,0),1);var t=this.getHsl();t.s=e,this.setHslObject(t)},e.prototype.rotateHue=function(e){var t=this.getHsl();t.h=v(t.h+e,360),this.setHslObject(t)},e.prototype.invert=function(){this._r=255-this._r,this._g=255-this._g,this._b=255-this._b,this._hueInfo&&(this._hueInfo=v(this._hueInfo+180,360))},e.prototype.getInverted=function(){return e.fromRgb(255-this._r,255-this._g,255-this._b)},e.prototype.getComplement=function(){var t=e.fromRgb(this._r,this._g,this._b);return t.rotateHue(180),t},e.prototype.getBlended=function(t,n){var o=1-(n=Math.max(Math.min(n,1),0));return e.fromRgb(Math.round(this._r*o+t._r*n),Math.round(this._g*o+t._g*n),Math.round(this._b*o+t._b*n))},e}(),k=function(){function e(e){this.element=e||document.createElement("div"),this.element.classList.add("Widget"),this.parentWidget=null}return e.prototype.onDragStart=function(e){return this.element.classList.add("beingDragged"),!0},e.prototype.onDragEnd=function(e){this.element.classList.remove("beingDragged")},e.prototype.onDragging=function(e){this.element.style.left=e.posWithOffsetToParentConsidered.x+"px",this.element.style.top=e.posWithOffsetToParentConsidered.y+"px"},e.prototype.onAttached=function(){},e.prototype.isAttached=function(){return document.body.contains(this.element)},e.prototype.onResize=function(){},e}(),x=new function(e,t,n,o,i){this.element=null,this.offsetX=0,this.offsetY=0,this.dragStartY=0,this.dragStartX=0}(null,0,0,0,0),E={x:-1,y:-1};function I(e,t){return function(n){if((!t||t(e,n))&&(t||!e.onDragStart||e.onDragStart(n))){var o=e.element.getBoundingClientRect();x.offsetX=n.clientX-o.left,x.offsetY=n.clientY-o.top,x.dragStartX=n.clientY,x.dragStartY=n.clientY,x.draggable=e,x.element=e.element,n.stopPropagation()}}}var B=function(e,t,n,o){this.element=e,this.onDragStart=t,this.onDragging=n,this.onDragEnd=o};window.addEventListener("mouseup",(function(e){x&&x.draggable&&(x.draggable.onDragEnd(e),x.draggable=null)}),!0),window.addEventListener("mousemove",(function(e){if(null!=x.draggable){var t=x.element.getBoundingClientRect(),n={mouseEvent:e,rect:t,posWithOffsetToParentConsidered:new _(e.clientX-x.offsetX,e.clientY-x.offsetY),posRelativeToElement:new _(e.clientX-t.x,e.clientY-t.y),posRelativeToDragStart:new _(e.clientX-x.dragStartX,e.clientY-x.dragStartY)};x.draggable.onDragging(n)}E.x=e.clientX,E.y=e.clientY}),!0);var P,D=(P=function(e,t){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},P(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}P(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),S=function(e){function t(){var t=e.call(this)||this;return t.element.classList.add("Panel"),t.children=[],t}return D(t,e),t.prototype.prependChild=function(e){e.parentWidget=this,this.element.prepend(e.element),this.children.unshift(e),this.isAttached()&&e.onAttached()},t.prototype.appendChild=function(e){e.parentWidget=this,this.element.appendChild(e.element),this.children.push(e),this.isAttached()&&e.onAttached()},t.prototype.removeChild=function(e){e.parentWidget=null,this.element.removeChild(e.element);var t=this.children.indexOf(e);t>=0&&this.children.splice(t,1)},t.prototype.onAttached=function(){if(this.isAttached())for(var e=0,t=this.children;e<t.length;e++)t[e].onAttached()},t.prototype.onResize=function(){for(var e=0,t=this.children;e<t.length;e++)t[e].onResize()},t}(k),O=new S;O.element=document.body;var M,R,N=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),L=function(e){function t(t,n,o){var i=e.call(this)||this;if(i.element.classList.add("Dialog"),i.title=t,i.attachedElement=null,o=null==o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=t,i.titleElement.className="title",i.contentWidget=n,i.contentElement=n.element,i.contentElement.classList.add("content"),o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(e){i.hide()}}return i.modalElement=document.createElement("div"),i.modalElement.className="Modal",i.element.appendChild(i.titleElement),i.element.appendChild(i.contentElement),i.titleElement.addEventListener("mousedown",I(i)),i}return N(t,e),t.prototype.onAttached=function(){this.isAttached()&&this.contentWidget.onAttached()},t.prototype.show=function(){this.attachedElement=this.element,O.element.appendChild(this.element),this.onAttached()},t.prototype.hide=function(){null!=this.attachedElement&&(O.element.removeChild(this.attachedElement),this.attachedElement=null)},t.prototype.showModal=function(){this.attachedElement=this.modalElement,this.modalElement.appendChild(this.element),O.element.appendChild(this.modalElement),this.onAttached()},t.prototype.isShown=function(){return null!=this.attachedElement},t.prototype.onDragging=function(t){e.prototype.onDragging.call(this,t),this.element.style.transform="none"},t}(k),z=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),H=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("ColorPicker"),n._onColorChanged=t,n}return z(t,e),t.prototype.setColorProperty=function(e){var t=this._color;this._color=e,this._onColorChanged&&this._onColorChanged(t,e)},t.prototype.getColor=function(){return this._color},t}(k),W=function(e){function t(t,n){var o=e.call(this,n)||this;o.element.classList.add("PaintStyleColorPicker"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._colorHandle=document.createElement("div"),o._colorHandle.classList.add("handle"),o._lightnessHandle=document.createElement("div"),o._lightnessHandle.classList.add("handle"),o._hueDiv.appendChild(o._saturationDiv),o._saturationDiv.appendChild(o._colorHandle),o._lightnessDiv.appendChild(o._lightnessHandle),o.element.appendChild(o._hueDiv),o.element.appendChild(o._lightnessDiv);var i=new B(o._hueDiv,(function(e){return!0}),(function(e){o._onHueMove(e)}),(function(e){}));o._hueDiv.addEventListener("mousedown",I(i));var r=new B(o._lightnessDiv,(function(e){return!0}),(function(e){o._onLightnessMove(e)}),(function(e){}));return o._lightnessDiv.addEventListener("mousedown",I(r)),void 0===t&&(t=new w(255,0,0)),o.setColor(t),o}return z(t,e),t.prototype._onLightnessMove=function(e){this._lightnessHandle.style.top=Math.max(Math.min(e.posRelativeToElement.y,this._lightnessDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._onHueMove=function(e){var t=e.posRelativeToElement;this._colorHandle.style.left=Math.max(Math.min(t.x,this._hueDiv.clientWidth),0)+"px",this._colorHandle.style.top=Math.max(Math.min(t.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._getColorFromCurrentPositions=function(){var e=this._hueDiv.getBoundingClientRect(),t=this._lightnessDiv.getBoundingClientRect(),n=this._colorHandle.offsetLeft/e.width,o=1-this._colorHandle.offsetTop/e.height,i=1-this._lightnessHandle.offsetTop/t.height;return w.fromHsl(360*n,o,i)},t.prototype._setColorInternal=function(e,t){var n=e.getHsl(),o=n.h/360,i=n.s,r=n.l;if(t){var l=this._hueDiv.getBoundingClientRect(),s=this._lightnessDiv.getBoundingClientRect();this._colorHandle.style.left=(l.width*o).toFixed(2)+"px",this._colorHandle.style.top=(l.height-l.height*i).toFixed(2)+"px",this._lightnessHandle.style.top=(s.height-s.height*r).toFixed(2)+"px"}var a=w.fromHsl(n.h,n.s,.5);this._lightnessDiv.style.backgroundColor=a.getHex(),this.setColorProperty(e)},t.prototype.setColor=function(e){this._setColorInternal(e,!0)},t.prototype.onAttached=function(){this.setColor(this.getColor())},t}(H),T=function(e){function t(t,n){var o=e.call(this,n)||this;o.element.classList.add("GimpStyleColorPicker"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._valueDiv=document.createElement("div"),o._valueDiv.classList.add("value"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._svHandle=document.createElement("div"),o._svHandle.classList.add("handle"),o._hueHandle=document.createElement("div"),o._hueHandle.classList.add("handle"),o._saturationDiv.appendChild(o._valueDiv),o._valueDiv.appendChild(o._svHandle),o._hueDiv.appendChild(o._hueHandle),o.element.appendChild(o._saturationDiv),o.element.appendChild(o._hueDiv);var i=new B(o._saturationDiv,(function(e){return!0}),(function(e){o._onSatValMove(e)}),(function(e){}));o._saturationDiv.addEventListener("mousedown",I(i));var r=new B(o._hueDiv,(function(e){return!0}),(function(e){o._onHueMove(e)}),(function(e){}));return o._hueDiv.addEventListener("mousedown",I(r)),void 0===t&&(t=new w(255,0,0)),o.setColor(t),o}return z(t,e),t.prototype._onHueMove=function(e){this._hueHandle.style.top=Math.max(Math.min(e.posRelativeToElement.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._onSatValMove=function(e){var t=e.posRelativeToElement;this._svHandle.style.left=Math.max(Math.min(t.x,this._saturationDiv.clientWidth),0)+"px",this._svHandle.style.top=Math.max(Math.min(t.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._getColorFromCurrentPositions=function(){var e=this._saturationDiv.getBoundingClientRect(),t=this._hueDiv.getBoundingClientRect(),n=this._svHandle.offsetLeft/e.width,o=1-this._svHandle.offsetTop/e.height,i=this._hueHandle.offsetTop/t.height;return w.fromHsv(360*i,n,o)},t.prototype._setColorInternal=function(e,t){var n=e.getHsv(),o=n.h/360,i=n.s,r=n.v;if(t){var l=this._hueDiv.getBoundingClientRect(),s=this._valueDiv.getBoundingClientRect();this._svHandle.style.left=(l.width*i).toFixed(2)+"px",this._svHandle.style.top=(l.height-l.height*r).toFixed(2)+"px",this._hueHandle.style.top=(s.height*o).toFixed(2)+"px"}var a=w.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=a.getHex(),this.setColorProperty(e)},t.prototype.setColor=function(e){this._setColorInternal(e,!0)},t.prototype.onAttached=function(){this.setColor(this.getColor())},t}(H),V=function(e){function t(t,n){var o=e.call(this,n)||this;o._zeroHueVector=new _(1,0),o.element.classList.add("WheelColorPicker"),o._hueWheelDiv=document.createElement("div"),o._hueWheelDiv.classList.add("wheel"),o._wheelHandle=document.createElement("div"),o._wheelHandle.classList.add("handle"),o._slHandle=document.createElement("div"),o._slHandle.classList.add("handle"),o._innerCircleDiv=document.createElement("div"),o._innerCircleDiv.classList.add("innerCircle"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._lightnessDiv.appendChild(o._slHandle),o._saturationDiv.appendChild(o._lightnessDiv),o._innerCircleDiv.appendChild(o._saturationDiv),o._hueWheelDiv.appendChild(o._wheelHandle),o._hueWheelDiv.appendChild(o._innerCircleDiv),o.element.appendChild(o._hueWheelDiv);var i=new B(o._saturationDiv,(function(e){return!0}),(function(e){o._onSatLitMove(e)}),(function(e){}));o._saturationDiv.addEventListener("mousedown",I(i));var r=new B(o._hueWheelDiv,(function(e){return!0}),(function(e){o._onHueMove(e)}),(function(e){}));return o._hueWheelDiv.addEventListener("mousedown",I(r)),void 0===t&&(t=new w(255,0,0)),o.setColor(t),o}return z(t,e),t.prototype._onHueMove=function(e){var t=this._hueWheelDiv.clientWidth/2,n=this._hueWheelDiv.clientHeight/2,o=this._wheelHandle.getBoundingClientRect(),i=new _(e.posRelativeToElement.x-t,e.posRelativeToElement.y-n);i.setLength(this._hueWheelDiv.clientWidth/2-o.width/2),this._wheelHandle.style.left=t+i.x+"px",this._wheelHandle.style.top=n+i.y+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._onSatLitMove=function(e){var t=this._innerCircleDiv.getBoundingClientRect(),n=e.posRelativeToElement,o=e.rect.x-t.x;n.x-=(t.width-o-o)/2,n.rotateInDegrees(-45),this._slHandle.style.left=Math.max(Math.min(n.x,this._saturationDiv.clientWidth),0)+"px",this._slHandle.style.top=Math.max(Math.min(n.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._getColorFromCurrentPositions=function(){var e=this._saturationDiv.getBoundingClientRect(),t=this._slHandle.getBoundingClientRect(),n=this._wheelHandle.getBoundingClientRect(),o=t.x+t.width/2-e.x,i=1-(t.y+t.height/2-e.y)/e.height,r=e.width*(i<.5?2*i:2*(1-i)),l=(o-(e.width/2-r/2))/r,s=this._hueWheelDiv.clientWidth,a=s/2,c=this._hueWheelDiv.clientHeight/2,d=new _(this._wheelHandle.offsetLeft+n.width/2-a,this._wheelHandle.offsetTop+n.height/2-c);d.setLength(s/2-n.width/2);var h=this._zeroHueVector.getAngleToOtherInDegrees(d);return d.y>0&&(h=360-h),w.fromHsl(h,l,i)},t.prototype._setColorInternal=function(e,t){var n=e.getHsl(),o=n.s,i=n.l;if(t){var r=this._saturationDiv.getBoundingClientRect(),l=this._innerCircleDiv.getBoundingClientRect(),s=r.width*(i<.5?2*i:2*(1-i)),a=new _(r.width/2+s*o-s/2,r.height-r.height*i),c=r.x-l.x;a.x-=(l.width-c-c)/2,a.rotateInDegrees(-45),this._slHandle.style.left=a.x.toFixed(2)+"px",this._slHandle.style.top=a.y.toFixed(2)+"px";var d=this._wheelHandle.getBoundingClientRect(),h=this._hueWheelDiv.clientWidth,u=h/2,A=this._hueWheelDiv.clientHeight/2,p=this._zeroHueVector.getRotatedInDegrees(-n.h);p.setLength(h/2-d.width/2),this._wheelHandle.style.left=u+p.x+"px",this._wheelHandle.style.top=A+p.y+"px"}var m=w.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=m.getHex(),this.setColorProperty(e)},t.prototype.setColor=function(e){this._setColorInternal(e,!0)},t.prototype.onAttached=function(){this.setColor(this.getColor())},t}(H),j=function(e){function t(t,n,o,i,r){var l=this,s=new k,a=s.element;l=e.call(this,t,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l._divOutput=document.createElement("div"),l._divOutput.classList.add("ColorOutput"),l._textInput=document.createElement("input"),l.colorPicker=new V(o,(function(e,t){var n=t.getHex();l._textInput.value=n,l._divOutput.style.backgroundColor=n})),l._textInput.value=o.getHex(),l._textInput.onkeyup=function(){var e=w.fromHex(l._textInput.value);e&&l.colorPicker.setColor(e)};var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(e){var t=document.createElement("button");t.textContent=e.label,e.isCancel&&(l._cancelOption=t),e.isContinue&&(l._continueOption=t),t.onclick=function(t){l.hide(),e.callback&&e.callback(l)},d.appendChild(t)})),a.appendChild(c),a.appendChild(l.colorPicker.element),a.appendChild(l._divOutput),a.appendChild(l._textInput),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("ColorPickerDialog"),l._boundKeyEvent=null,l}return z(t,e),t.prototype.onAttached=function(){this.isAttached()&&this.colorPicker.onAttached()},t.prototype.getColor=function(){return this.colorPicker.getColor()},t.prototype.showModal=function(){var t=this;e.prototype.showModal.call(this),this._boundKeyEvent=function(e){"Escape"==e.key&&t._cancelOption?t._clickButton(t._cancelOption):"Enter"==e.key&&t._continueOption&&t._clickButton(t._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},t.prototype._clickButton=function(e){var t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});e.dispatchEvent(t)},t.prototype.hide=function(){e.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},t}(L),G=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),F=function(e){function t(t,n){var o=e.call(this,document.createElement("button"))||this;return o.element.classList.add("Button"),o.element.textContent=t,n&&(o.element.onclick=n),o}return G(t,e),t}(k),J=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Y=function(e){function t(){var t=e.call(this,document.createElement("select"))||this;return t.element.classList.add("Dropdown"),t}return J(t,e),t.prototype.addOption=function(e,t){var n=document.createElement("option");n.textContent=e,n.value=t,this.element.appendChild(n)},t.prototype.removeOption=function(e){for(var t=0,n=Array.from(this.element.options);t<n.length;t++){var o=n[t];if(o.value==e)return void this.element.removeChild(o)}},t.prototype.getSelectedValue=function(){return this.element.value},t.prototype.setSelectedValue=function(e){this.element.value=e},t}(k),U=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$=function(e){function t(t,n,o){var i=e.call(this)||this;return i.element.classList.add("ListBox"),i._toElementFunction=n||function(e){return e},i._selectedIndex=-1,t=t||[],i.setItems(t),i._onItemClick=o||function(e){},i}return U(t,e),t.prototype.clear=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this._items=[],this._selectedIndex=-1},t.prototype.setItems=function(e){this.clear();for(var t=0,n=e;t<n.length;t++){var o=n[t];this.addItem(o)}},t.prototype.getItemCount=function(){return this._items.length},t.prototype.addItem=function(e){var t=this;this._items.push(e);var n=this._toElementFunction(e);n.onclick=function(){t.selectItem(e),t._onItemClick(e,n)},this.element.appendChild(n)},t.prototype.removeItem=function(e){var t=this._items.indexOf(e);this.removeItemAtIndex(t)},t.prototype.removeItemAtIndex=function(e){e<0||(this._items.splice(e,1),this.element.childNodes[e].remove())},t.prototype.selectItem=function(e){var t=this._items.indexOf(e);this.selectItemAtIndex(t)},t.prototype.selectItemAtIndex=function(e){this._selectedIndex>=0&&this.element.children[this._selectedIndex].classList.remove("selected"),e>=0&&this.element.children[e].classList.add("selected"),this._selectedIndex=e},t.prototype.getSelectedItem=function(){return this._selectedIndex>=0?this._items[this._selectedIndex]:null},t.prototype.getItemAtIndex=function(e){return e>=0&&e<this._items.length?this._items[e]:null},t.prototype.getSelectedIndex=function(){return this._selectedIndex},t}(k),K=function(e){function t(t,n,o){return n=n||function(e){return""+e},e.call(this,t,(function(e){var t=document.createElement("div");return t.textContent=n(e),t}),o)||this}return U(t,e),t}($),X=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),q=function(){function e(e,t,n,o){this.name=e,this.isReadOnly=t,this.fromString=n,this.toString=o}return e.prototype.compare=function(e,t){return 0},e}(),Q=function(e){function t(t,n){return e.call(this,t,n,(function(e){return e}),(function(e){return e}))||this}return X(t,e),t.prototype.compare=function(e,t){return(null==e?void 0:e.toLowerCase())>(null==t?void 0:t.toLowerCase())?1:(null==t?void 0:t.toLowerCase())>(null==e?void 0:e.toLowerCase())?-1:0},t}(q),Z=function(e){function t(t,n){return e.call(this,t,n,(function(e){return parseInt(e)}),(function(e){return""+e}))||this}return X(t,e),t.prototype.compare=function(e,t){return e>t?1:t>e?-1:0},t}(q),ee=function(e){function t(t,n){return e.call(this,t,n,(function(e){return parseFloat(e)}),(function(e){return""+e}))||this}return X(t,e),t.prototype.compare=function(e,t){return e>t?1:t>e?-1:0},t}(q),te=function(e){function t(t,n,o,i){var r=e.call(this)||this;return r.element.classList.add("ListView"),r._columns=[],r._rows=[],r._htmlRows=[],r._cellValueChangedCallback=o,r._editValidationCallback=n,r._cellDoubleClickCallback=i,r._headerRow=document.createElement("div"),r._headerRow.className="header",r.element.appendChild(r._headerRow),t.forEach((function(e){r.addColumn(e)})),r}return X(t,e),t.fromStringColumns=function(e,n,o,i,r){return new t(e.map((function(e){return new Q(e,n)})),o,i,r)},t.prototype.addStringColumn=function(e,t,n,o){return this.addColumn(new Q(e,!!t),n,o)},t.prototype.addColumn=function(e,t,n){if(!(e instanceof q)){var o={name:"Argument Error",level:"Error",message:"The argument 'column' must contain an instance of ListViewColumn, got "+typeof e,toString:function(){return this.name+": "+this.message}};throw console.error(o),o}null==n&&(n=this._columns.length);var i=document.createElement("span");if(i.textContent=e.name,i.className="cell",n<0||n>=this._headerRow.children.length)this._headerRow.appendChild(i),this._columns.push(e);else{var r=this._headerRow.children.item(n);this._headerRow.insertBefore(i,r),this._columns.splice(n,0,e)}if(this.setColumnReadonly(e),t||(t=[]),t.length>this._rows.length)throw o={name:"Argument Error",level:"Error",message:"The argument 'columnValues' must not be longer than the total amount of rows ("+t.length+" elements were given for "+this._rows.length+")",toString:function(){return this.name+": "+this.message}},console.error(o),o;for(var l=0;l<this._rows.length;l++){var s=this._rows[l],a=this._htmlRows[l],c="";l<t.length&&(c=t[l]),s.splice(n,0,c),this._addCellToRow(s,a,n,c)}},t.prototype.removeColumn=function(e){this._columns.splice(e,1),this._headerRow.removeChild(this._headerRow.children[e]);for(var t=0;t<this._rows.length;t++)this._rows[t].splice(e,1),this._htmlRows[t].removeChild(this._htmlRows[t].children[e])},t.prototype.setColumnAtIndexReadonly=function(e,t){var n=this._columns[e];this.setColumnReadonly(n,t)},t.prototype.setColumnReadonly=function(e,t){var n=this,o=this._columns.indexOf(e);t=void 0!==t&&t,e.isReadOnly=t;var i=0;this._htmlRows.forEach((function(t){var r=Array.from(t.querySelectorAll(".cell"));o<r.length&&n._makeEditable(!e.isReadOnly,r[o],o,n._rows[i],e),i++}))},t.prototype.removeRow=function(e){this._rows.splice(e,1);var t=this.element.getElementsByClassName("row")[e];this.element.removeChild(t),this._htmlRows.splice(e,1)},t.prototype.clear=function(){this._rows=[],this._htmlRows=[];for(var e=0,t=Array.from(this.element.getElementsByClassName("row"));e<t.length;e++){var n=t[e];this.element.removeChild(n)}},t.prototype.sortByColumn=function(e){var t=this,n=this._columns[e],o=this._rows;o.sort((function(t,o){return n.compare(t[e],o[e])})),this.clear(),o.forEach((function(e){t.addRow(e)}))},t.prototype._makeEditable=function(e,t,n,o,i){var r=this;e?t.ondblclick=function(e){var l=t.textContent,s=t.textContent;t.textContent="",t.classList.add("editing");var a=document.createElement("input");a.type="text",a.value=s;var c=!1,d=function(e){var c=a.value;!e||r._editValidationCallback&&!r._editValidationCallback(l,c,o,i,r._rows.indexOf(o),n)?t.textContent=s:(t.removeChild(a),t.textContent=c,t.classList.remove("editing"),o[n]=i.fromString(c),r._cellValueChangedCallback&&r._cellValueChangedCallback(l,c,o,i,r._rows.indexOf(o),n)),t.classList.remove("editing"),t.contains(a)&&t.removeChild(a)};a.onblur=function(e){c||(c=!0,d(!0))},a.onkeyup=function(e){if("Escape"==e.key){if(c)return;c=!0,d(!1)}else if("Enter"==e.key){if(c)return;c=!0,d(!0)}},t.appendChild(a),a.selectionStart=a.selectionEnd=a.value.length,a.focus()}:this._cellDoubleClickCallback?t.ondblclick=function(e){return r._cellDoubleClickCallback(o,i,r._rows.indexOf(o),n)}:t.ondblclick=null},t.prototype._addCellToRow=function(e,t,n,o){var i=document.createElement("span"),r=this._columns[n];return i.textContent=r.toString(o),i.className="cell",this._makeEditable(!this._columns[n].isReadOnly,i,n,e,r),n>=t.children.length?t.appendChild(i):t.insertBefore(i,t.children.item(n)),i},t.prototype.addRow=function(e){var t=this,n=document.createElement("div");if(n.className="row",this.element.appendChild(n),e.length!=this._columns.length){var o={name:"Argument Error",level:"Error",message:"The argument 'row' must contain "+this._columns.length+" entries, but "+e.length+" were provided",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}var i=0;e.forEach((function(o){t._addCellToRow(e,n,i,o),i++})),this._rows.push(e),this._htmlRows.push(n),n.onclick=function(e){t.deselectRows(),n.classList.add("selected")},n.oncontextmenu=n.onclick,this.element.appendChild(n)},t.prototype.deselectRows=function(){for(var e=0;e<this._htmlRows.length;e++)this._htmlRows[e].classList.remove("selected")},t.prototype.selectRow=function(e){for(var t=0;t<this._htmlRows.length;t++)t==e?this._htmlRows[t].classList.add("selected"):this._htmlRows[t].classList.remove("selected")},t.prototype.getSelectedRowIndex=function(){for(var e=0;e<this._htmlRows.length;e++)if(this._htmlRows[e].classList.contains("selected"))return e;return-1},t.prototype.getSelectedRow=function(){var e=this.getSelectedRowIndex();return e>=0?this.getRow(e):null},t.prototype.getColumnCount=function(){return this._columns.length},t.prototype.getRowCount=function(){return this._rows.length},t.prototype.getColumns=function(){return this._columns},t.prototype.changeCellValue=function(e,t,n){Array.from(this._htmlRows[e].querySelectorAll(".cell"))[t].textContent=n,this._rows[e][t]=this._columns[t].fromString(n)},t.prototype.getRow=function(e){return this._rows[e]},t.prototype.getRows=function(){return this._rows},t.prototype.getColumn=function(e){return this._columns[e]},t.prototype.renameColumn=function(e,t){this.getColumn(e).name=t,this._headerRow.children[e].textContent=t},t.prototype.getColumnValues=function(e){return this._rows.map((function(t){return t[e]}))},t.prototype.setCellContent=function(e,t,n){var o=this._rows[e][t],i=this._rows[e],r=this._columns[t];i[t]=r.fromString(n),this._htmlRows[e].children[t].textContent=n,this._cellValueChangedCallback&&this._cellValueChangedCallback(o,n,i,r,e,t)},t.prototype.getCellContent=function(e,t){return this._rows[e][t]},t}(k),ne=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oe=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("TreeView"),n.items=[],n.clickHandler=t,n._focusedItem=null,n}return ne(t,e),t.prototype.addItem=function(e,t,n,o,i){var r=new ie(e,t,n,o,i);return r.parentWidget=this,this.items.push(r),this.element.appendChild(r.element),r},t.prototype.removeItem=function(e){var t=this.items.indexOf(e);t>=0&&(this.items.splice(t,1),this.element.removeChild(e.element),e.parentWidget=null,this._focusedItem==e&&(this._focusedItem=null))},t.prototype.clear=function(){for(this.items=[],this.items.forEach((function(e){return e.parentWidget=null}));this.element.firstChild;)this.element.removeChild(this.element.firstChild)},t.prototype.getItems=function(){return this.items},t.prototype.deselectAll=function(){this.items.forEach((function(e){return e.deselect()}))},t.prototype.getSelectedItem=function(){for(var e=0;e<this.items.length;e++){var t=this.items[e]._getIfSelected();if(null!=t)return t}return null},t.prototype.getFocusedItem=function(){return this._focusedItem},t.prototype._sortFunction=function(e,t){return e.label.toLowerCase()>t.label.toLowerCase()?1:t.label.toLowerCase()>e.label.toLowerCase()?-1:0},t.prototype.sortItems=function(){var e=this,t=this.items.splice(0);for(t.sort(this._sortFunction),this.items=[];this.element.firstChild;)this.element.removeChild(this.element.firstChild);t.forEach((function(t){t.children.length>0&&t.sortChildren(),e.items.push(t),e.element.appendChild(t.element)}))},t}(k),ie=function(e){function t(t,n,o,i,r){var l=e.call(this)||this;return l.element.classList.add("TreeViewItem"),l.children=[],l.label=t,l.expander=document.createElement("span"),l.expander.textContent="›",l.expander.classList.add("expander"),l.element.appendChild(l.expander),l.labelElement=document.createElement("span"),l.labelElement.textContent=t,l.labelElement.className="label",l.element.appendChild(l.labelElement),l.childrenElement=document.createElement("div"),l.childrenElement.classList.add("children"),l.element.appendChild(l.childrenElement),l.contextMenu=r,l.parentItem=null,l.data=n,l.labelElement.draggable=!0,l.labelElement.ondblclick=function(e){i?i(e,l):l.children.length>0&&l.element.classList.toggle("expanded"),e.stopPropagation()},l.expander.onclick=function(e){l.children.length>0&&l.element.classList.toggle("expanded"),e.stopPropagation()},l.labelElement.oncontextmenu=r?function(e){l.setFocus(!0),r.show(e.clientX,e.clientY),e.stopPropagation(),e.preventDefault()}:function(e){l.setFocus(!0),e.stopPropagation()},l.labelElement.onclick=function(e){var t=l.parentWidget.getSelectedItem();l.select(),o&&o(e,l,t),l.parentWidget.clickHandler&&l.parentWidget.clickHandler(e,l,t)},l}return ne(t,e),t.prototype.addChildItem=function(e){return e.parentItem=this,this.children.push(e),this.childrenElement.firstChild?this.childrenElement.insertBefore(e.element,this.childrenElement.firstChild):this.childrenElement.appendChild(e.element),this.element.classList.add("expanded"),this.element.classList.add("expandable"),e.parentWidget=this.parentWidget,e},t.prototype.addChild=function(e,n,o,i,r){var l=new t(e,n,o,i,r);return this.addChildItem(l)},t.prototype.removeChild=function(e){var t=this.children.indexOf(e);t>=0&&(e.setFocus(!1),this.childrenElement.removeChild(e.element),this.children.splice(t,1),e.parentWidget=null,e.parentItem=null,0==this.children.length&&(this.element.classList.remove("expanded"),this.element.classList.remove("expandable")))},t.prototype.sortChildren=function(){var e=this,t=this.children.splice(0);for(t.sort(this.parentWidget._sortFunction),this.children=[];this.childrenElement.firstChild;)this.childrenElement.removeChild(this.childrenElement.firstChild);t.forEach((function(t){t.children.length>0&&t.sortChildren(),e.children.push(t),e.childrenElement.appendChild(t.element)}))},t.prototype.deselect=function(){this.labelElement.classList.remove("selected"),this.children.forEach((function(e){e.deselect()}))},t.prototype.select=function(){this.parentWidget.deselectAll(),this.labelElement.classList.add("selected")},t.prototype.setFocus=function(e){e?(this.parentWidget._focusedItem&&this.parentWidget._focusedItem.setFocus(!1),this.parentWidget._focusedItem=this,this.element.classList.add("focused")):(this.element.classList.remove("focused"),this.contextMenu&&this.contextMenu.hide(),this.parentWidget&&this.parentWidget._focusedItem==this&&(this.parentWidget._focusedItem=null))},t.prototype._getIfSelected=function(){if(this.labelElement.classList.contains("selected"))return this;for(var e=0;e<this.children.length;e++){var t=this.children[e]._getIfSelected();if(null!=t)return t}return null},t}(k),re=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),le=function(e,t){this.name=e,this.element=t},se=function(e){function t(t,n,o){var i=e.call(this,t,n)||this;return i.menu=o,i}return re(t,e),t}(le),ae=function(e){function t(t){return e.call(this,"-",t)||this}return re(t,e),t}(le),ce=function(e){function t(t,n,o,i){var r=e.call(this,t,n)||this;return r.clickCallback=o,r.canExecuteCallback=i,r}return re(t,e),t}(le),de=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("Menu"),n.name=t,n.element.textContent=t,n._submenus=[],n._menuEntries=[],n.menuEntryPanel=document.createElement("div"),n.menuEntryPanel.className="MenuContent",n._x=-1,n._y=-1,n.element.onmouseenter=function(){var e=n.getParentMenuBar();e&&null!=e.activeMenu&&(e.activeMenu.hide(),n.show())},n.element.onclick=function(){if(n.isShown())n.hide();else{var e=n.getParentMenuBar();e&&e.hideMenus(),n.show()}},document.addEventListener("click",(function(e){var t=null;e.target instanceof HTMLElement&&(t=e.target);var o=n.getParentMenu();n.menuEntryPanel.contains(t)||n.element.contains(t)||null!=o&&o.menuEntryPanel.contains(t)||!n.isShown()||n.hide()})),n}return re(t,e),t.prototype.getParentMenuBar=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("MenuBar")?this.parentWidget:null},t.prototype.getParentMenu=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("Menu")?this.parentWidget:null},t.prototype.isShown=function(){return this.menuEntryPanel.isConnected&&null!=this.menuEntryPanel.style.display&&""!=this.menuEntryPanel.style.display&&"none"!=this.menuEntryPanel.style.display},t.prototype.getPos=function(){var e=this.getParentMenu();if(e)return e.getPos();if(this.isShown()){var t=this.menuEntryPanel.getBoundingClientRect();return new _(t.left,t.top)}return new _(this._x,this._y)},t.prototype.show=function(e,t){for(var n=0;n<this.menuEntryPanel.children.length;n++)this._menuEntries[n]instanceof ce&&(this._menuEntries[n].canExecuteCallback()?this.menuEntryPanel.children[n].classList.remove("disabled"):this.menuEntryPanel.children[n].classList.add("disabled"));if(null!=e&&null!=t)this.element.parentNode||document.body.appendChild(this.menuEntryPanel),this.menuEntryPanel.style.left=e+"px",this.menuEntryPanel.style.top=t+"px",this.menuEntryPanel.style.display="inline-block",this.menuEntryPanel.style.position="fixed";else{this.menuEntryPanel.style.left=this.element.getBoundingClientRect().left+"px",this.menuEntryPanel.style.display="inline-block";var o=this.getParentMenuBar();o&&(o.activeMenu=this)}var i=this.menuEntryPanel.getBoundingClientRect();this._x=i.left,this._y=i.top},t.prototype.hide=function(){this._submenus.forEach((function(e){return e.hide()}));var e=this.getParentMenuBar();e&&e.activeMenu==this&&(e.activeMenu=null),this.menuEntryPanel.parentElement==document.body?document.body.removeChild(this.menuEntryPanel):this.menuEntryPanel.style.display="none"},t.prototype.addEntry=function(e,t,n){var o=this,i=document.createElement("div");n=n||function(){return!0},i.className="entry",i.textContent=e,i.onclick=function(){o.hide(),t()},this.menuEntryPanel.appendChild(i),this._menuEntries.push(new ce(e,i,t,n))},t.prototype.addSubMenu=function(e){var t=this;this._submenus.push(e);var n=document.createElement("div");n.className="entry submenu",n.textContent=e.name,n.onclick=function(){var o=n.getBoundingClientRect();t._submenus.forEach((function(e){return e.hide()})),e.show(Math.floor(o.left+o.width),o.y)},e.parentWidget=this,this.menuEntryPanel.appendChild(n),this._menuEntries.push(new se(e.name,n,e))},t.prototype.addSeparator=function(){var e=document.createElement("div");e.className="separator",this.menuEntryPanel.appendChild(e),this._menuEntries.push(new ae(e))},t.prototype.clearEntries=function(){for(this._submenus.forEach((function(e){e.parentWidget=null})),this._submenus=[];this.menuEntryPanel.firstChild;)this.menuEntryPanel.removeChild(this.menuEntryPanel.firstChild)},t}(k),he=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ue=function(e){function t(){var t=e.call(this)||this;return t.element.classList.add("MenuBar"),t.menus=[],t.activeMenu=null,t}return he(t,e),t.prototype.addMenu=function(e){if(!(e instanceof de)){var t={name:"Argument Error",level:"Error",message:"The argument 'menu' must be of type Menu",toString:function(){return this.name+": "+this.message}};throw console.error(t),t}this.menus.push(e),this.element.appendChild(e.element),this.element.appendChild(e.menuEntryPanel),e.parentWidget=this},t.prototype.hideMenus=function(){this.activeMenu=null,this.menus.forEach((function(e){e.hide()}))},t}(k),Ae=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pe=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("Label"),n.element.textContent=t,n}return Ae(t,e),t.prototype.setText=function(e){this.element.textContent=e},t.prototype.getText=function(){return this.element.textContent},t}(k),me=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ge=function(e){function t(t,n,o){var i=e.call(this,document.createElement("img"))||this;return i.element.classList.add("Image"),i.element.src=t,null!=n&&(i.element.style.width=n+"px"),null!=o&&(i.element.style.height=o+"px"),i}return me(t,e),t.prototype.setSource=function(e){this.element.src=e},t.prototype.getSource=function(){return this.element.src},t}(k),Ce=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom",e[e.Inside=5]="Inside",e[e.Float=6]="Float"}(M||(M={})),function(e){e[e.Horizontal=1]="Horizontal",e[e.Vertical=2]="Vertical"}(R||(R={}));var fe=function(e){return e==M.Top||e==M.Bottom?R.Vertical:R.Horizontal},_e=function(){function e(){}return e.fromDockPanel=function(t){var n=new e;return n.dockPercentage=t._dockPercentage,n.identifier=t.identifier,n},e.fromDockContainer=function(t){var n=new e;return n.orientation=t.orientation,n.dockPercentage=t._dockPercentage,n.children=t.children.map((function(t){return t instanceof ke?e.fromDockContainer(t):e.fromDockPanel(t)})),n},e}(),ye=[],ve=[],be=function(e){function t(t,n,o){var i=e.call(this)||this;return i.element.classList.add("DockSeparator"),i.element.addEventListener("mousedown",I(i)),i.prev=t,i.next=n,i.parentWidget=o,i}return Ce(t,e),t.prototype.onDragStart=function(e){return!0},t.prototype.onDragging=function(e){var t=this.parentWidget.orientation,n=t==R.Horizontal?e.mouseEvent.movementX:e.mouseEvent.movementY,o=t==R.Horizontal?this.prev.element.getBoundingClientRect().width:this.prev.element.getBoundingClientRect().height,i=t==R.Horizontal?this.next.element.getBoundingClientRect().width:this.next.element.getBoundingClientRect().height,r=o+n,l=i-n;r<80||l<80||(this.prev._dockPercentage*=r/o,this.next._dockPercentage*=l/i,this.parentWidget._layoutChildren())},t.prototype.onDragEnd=function(e){},t}(k),we=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._dockPercentage=-1,t}return Ce(t,e),t}(k),ke=function(e){function t(){var t=e.call(this)||this;return t.element.className="DockContainer",t._setOrientation(R.Horizontal),t.children=[],t}return Ce(t,e),t.prototype.onAttached=function(){this.isAttached()&&ye.push(this),this.children.forEach((function(e){e.onAttached()}))},t.prototype.getFloatingPanels=function(){return ve.map((function(e){return{identifier:e.identifier,width:parseInt(e.element.style.width),height:parseInt(e.element.style.height),x:parseInt(e.element.style.left),y:parseInt(e.element.style.top)}}))},t.prototype.getDockPanelAtPoint=function(e,t){if(!y(this.element.getBoundingClientRect(),e,t))return null;for(var n=0,o=this.children;n<o.length;n++){var i=o[n];if(i instanceof xe&&y(i.element.getBoundingClientRect(),e,t))return i}return null},t.prototype.getDockingStructure=function(){return _e.fromDockContainer(this)},t.prototype.setChildPercentages=function(e){if(e.length!=this.children.length)throw"This container has "+this.children.length+" child elements, but "+e.length+" percentages were given!";for(var t=0;t<e.length;t++)this.children[t]._dockPercentage=e[t];this._layoutChildren()},t.prototype._dockRelative=function(e,t,n,o){if(o=o||.5,!(e instanceof we)){var i={name:"Argument Error",level:"Error",message:"The argument 'child' must be a Dockable object",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}if(!(t instanceof we))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a Dockable object",toString:function(){return this.name+": "+this.message}},console.error(i),i;var r=this.children.indexOf(t),l=new be(n?e:t,n?t:e,this);if(e._dockPercentage=t._dockPercentage*o,t._dockPercentage=t._dockPercentage*(1-o),!(r>=0))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a child of a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(i),i;if(n)this.children.splice(r,0,e),this.element.insertBefore(e.element,t.element),this.element.insertBefore(l.element,t.element);else{this.children.splice(r+1,0,e);var s=t.element.nextSibling;s?(this.element.insertBefore(l.element,s),this.element.insertBefore(e.element,s)):(this.element.appendChild(l.element),this.element.appendChild(e.element))}e.parentWidget=this,e.element.classList.remove("floating"),e.onAttached(),this.onResize()},t.prototype._dock=function(e,t,n){if(n=n||(this.children.length>0?.5:1),t){if(this.children.length>0){var o=new be(e,this.children[0],this);this.element.prepend(o.element)}e._dockPercentage=n,this.children.forEach((function(e){e._dockPercentage*=1-n})),this.children.unshift(e),this.element.prepend(e.element)}else this.children.length>0&&(o=new be(this.children[this.children.length-1],e,this),this.element.appendChild(o.element)),e._dockPercentage=n,this.children.forEach((function(e){e._dockPercentage*=1-n})),this.children.push(e),this.element.appendChild(e.element);e.parentWidget=this,e.element.classList.remove("floating"),e.onAttached(),this.onResize()},t.prototype._setOrientation=function(e){this.orientation==R.Horizontal?this.element.classList.remove("horizontal"):this.element.classList.remove("vertical"),e==R.Horizontal?this.element.classList.add("horizontal"):this.element.classList.add("vertical"),this.orientation=e},t.prototype._wrapChildren=function(){var e=this,n=new t;n._setOrientation(this.orientation);var o=this.children.map((function(e){return e._dockPercentage}));o[0]=1;var i=this.children.slice(),r=0;i.forEach((function(t){e.undock(t),n.dock(t,n.orientation==R.Horizontal?M.Right:M.Bottom,o[r]),r++})),this._setOrientation(this.orientation==R.Horizontal?R.Vertical:R.Horizontal),this.children=[],this.dock(n,this.orientation==R.Horizontal?M.Left:M.Top)},t.prototype._subdivide=function(e,n){var o=new t;o._setOrientation(fe(n));var i=this.children.indexOf(e);if(i<0){var r={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be inside this DockContainer",toString:function(){return this.name+": "+this.message}};throw console.error(r),r}return o._dockPercentage=e._dockPercentage,e._dockPercentage=1,this.children.splice(i,1,o),this.element.insertBefore(o.element,e.element),this.element.removeChild(e.element),o.parentWidget=this,o.dock(e,n),o},t.prototype.dockRelativeTo=function(e,t,n,o){null!=o&&null!=o||(o=.5);var i=fe(n),r=this;if(this.orientation!=i&&(r=this._subdivide(t,n)),n==M.Inside)console.warn("Tabbed docks are not implemented yet!");else if(n==M.Float){var l={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(l),l}return r._dockRelative(e,t,n==M.Left||n==M.Top,o),this._layoutChildren(),e},t.prototype.dock=function(e,t,n){var o=fe(t);if(this.children.length<=1&&this._setOrientation(o),this.orientation!=o&&this._wrapChildren(),t==M.Inside)console.warn("Tabbed docks are not implemented yet!");else if(t==M.Float){var i={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}return this._dock(e,t==M.Left||t==M.Top,n),this._layoutChildren(),e},t.prototype.undock=function(e){var n=this.children.indexOf(e);if(n<0){var o={name:"Argument Error",level:"Error",message:"The argument 'child' must be inside a DockContainer in order to be undocked.",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}n>0?this.children[n-1]._dockPercentage+=e._dockPercentage:n+1<this.children.length&&(this.children[n+1]._dockPercentage+=e._dockPercentage),this.children.splice(n,1);var i=e.element.previousElementSibling,r=e.element.nextElementSibling;if(null!=i&&i.classList.contains("DockSeparator")?this.element.removeChild(i):null!=r&&r.classList.contains("DockSeparator")&&this.element.removeChild(r),this.element.removeChild(e.element),null!=this.parentWidget&&this.parentWidget instanceof t&&0==this.children.length){this.parentWidget.undock(this);var l=ye.indexOf(this);l>=0&&ye.splice(l,1)}else this._layoutChildren();return e.parentWidget=null,e.element.classList.add("floating"),e},t.prototype._layoutChildren=function(e,n){var o=this.element.getBoundingClientRect(),i=0,r=0;null==e&&(e=o.width),null==n&&(n=o.height);var l=Array.from(this.element.children).filter((function(e){return e.classList.contains("DockSeparator")&&e instanceof HTMLElement})),s=0;0!=e&&0!=e&&(this.orientation==R.Horizontal?this.children.forEach((function(o){var a=Math.round((e-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=a+"px",o.element.style.height=n+"px",o instanceof t&&o._layoutChildren(a,n),s<l.length&&(l[s].style.left=i+a+"px",l[s].style.top=r+"px"),i+=a+3,s++,o.onResize()})):this.children.forEach((function(o){var a=Math.round((n-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=e+"px",o.element.style.height=a+"px",o instanceof t&&o._layoutChildren(e,a),s<l.length&&(l[s].style.left=i+"px",l[s].style.top=r+a+"px"),r+=a+3,s++,o.onResize()})))},t}(we),xe=function(e){function t(t,n,o){var i=e.call(this)||this;if(i.element.className="DockPanel",o=void 0===o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=t,i.titleElement.className="title",i.contentWidget=n,i.contentWidget.element.classList.add("content"),i.element.appendChild(i.titleElement),i.element.appendChild(i.contentWidget.element),i.titleElement.addEventListener("mousedown",I(i)),i._dragged=!1,i._dockOverlay=null,i._dockTarget=null,i._dockTargetDirection=M.Float,o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(e){i.close()}}return i.resizeEW=document.createElement("div"),i.resizeNS=document.createElement("div"),i.resizeDiag=document.createElement("div"),i.resizeEW.className="resizeEW",i.resizeNS.className="resizeNS",i.resizeDiag.className="resizeDiag",i.element.appendChild(i.resizeEW),i.element.appendChild(i.resizeNS),i.element.appendChild(i.resizeDiag),i._resizingHorizontally=!1,i._resizingVertically=!1,i.resizeEW.addEventListener("mousedown",I(i,(function(e,t){return i.onResizeStart(t,!0,!1)}))),i.resizeNS.addEventListener("mousedown",I(i,(function(e,t){return i.onResizeStart(t,!1,!0)}))),i.resizeDiag.addEventListener("mousedown",I(i,(function(e,t){return i.onResizeStart(t,!0,!0)}))),i}return Ce(t,e),t.prototype.onResize=function(){e.prototype.onResize.call(this),this.contentWidget.onResize()},t.prototype.onAttached=function(){if(this.isAttached()){var e=ve.indexOf(this);this.isFloating()?e<0&&ve.push(this):e>=0&&ve.splice(e,1),this.contentWidget.onAttached()}},t.prototype.getTitle=function(){return this.titleElement.textContent},t.prototype.setTitle=function(e){this.titleElement.textContent=e},t.prototype.setContent=function(e){this.contentWidget.element.classList.remove("content"),this.element.removeChild(this.contentWidget.element),this.contentWidget=e,this.contentWidget.element.classList.add("content"),this.element.appendChild(this.contentWidget.element),e.onAttached()},t.prototype.isFloating=function(){return this.element.classList.contains("floating")},t.prototype.close=function(){this.parentWidget instanceof ke?this.parentWidget.undock(this):this.element.parentElement.removeChild(this.element)},t.prototype.createDragOverlay=function(){this._dockOverlay=document.createElement("div"),this._dockOverlay.className="dockOverlay",document.body.appendChild(this._dockOverlay)},t.prototype.onResizeStart=function(e,t,n){return!!this.isFloating()&&(t&&this.element.classList.add("resizingHorizontally"),n&&this.element.classList.add("resizingVertically"),this._resizingHorizontally=t,this._resizingVertically=n,!0)},t.prototype.onResizing=function(e){this.isFloating()&&(this._resizingHorizontally&&(this.element.style.width=e.posRelativeToElement.x+"px"),this._resizingVertically&&(this.element.style.height=e.posRelativeToElement.y+"px"),this.onResize())},t.prototype.onDragStart=function(t){return!t.target.classList.contains("closeButton")&&e.prototype.onDragStart.call(this,t)},t.prototype.onDragging=function(t){if(this._resizingHorizontally||this._resizingVertically)return this.onResizing(t);if(!this._dragged&&(Math.abs(t.posRelativeToDragStart.x)>10||Math.abs(t.posRelativeToDragStart.y)>10)&&(this._dragged=!0,this.parentWidget instanceof ke&&(this.parentWidget.undock(this),document.body.appendChild(this.element)),this.createDragOverlay()),this._dragged)if(e.prototype.onDragging.call(this,t),this._dockTarget=function(e,t){for(var n=0,o=ye;n<o.length;n++){var i=o[n];if(i.isAttached()){var r=i.getDockPanelAtPoint(e,t);if(null!=r)return r}}return null}(t.mouseEvent.clientX,t.mouseEvent.clientY),this._dockTarget){var n=this._dockTarget.element.getBoundingClientRect();t.mouseEvent.clientX<n.x+.05*n.width?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=M.Left):t.mouseEvent.clientX>n.x+.95*n.width?(this._dockOverlay.style.left=n.x+.5*n.width+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=M.Right):t.mouseEvent.clientY<n.y+.05*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=M.Top):t.mouseEvent.clientY>n.y+.95*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+.5*n.height+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=M.Bottom):(this._dockTargetDirection=M.Float,this._dockOverlay.style.width="0px")}else this._dockTargetDirection=M.Float,this._dockOverlay.style.width="0px"},t.prototype.onDragEnd=function(t){this._dragged&&(this._dragged=!1,null!=this._dockOverlay&&(document.body.removeChild(this._dockOverlay),this._dockOverlay=null),null!=this._dockTarget&&this._dockTargetDirection!=M.Float&&this.dockRelativeTo(this._dockTarget,this._dockTargetDirection)),this._resizingHorizontally=!1,this._resizingVertically=!1,this.element.classList.remove("resizingHorizontally"),this.element.classList.remove("resizingVertically"),e.prototype.onDragEnd.call(this,t)},t.prototype.float=function(e,t,n,o){null!=this.parentWidget&&this.parentWidget instanceof ke&&this.parentWidget.undock(this),e=e||10,t=t||10,n=n||400,o=o||300,this.element.classList.add("floating"),this.element.style.left=e+"px",this.element.style.top=t+"px",this.element.style.width=n+"px",this.element.style.height=o+"px",document.body.appendChild(this.element),this.onAttached(),this.onResize()},t.prototype.dockRelativeTo=function(e,t,n){if(null!=n&&null!=n||(n=.5),!(e instanceof k)){var o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be a Widget object",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}if(!(e.parentWidget instanceof ke))throw o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be inside a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(o),o;e.parentWidget.dockRelativeTo(this,e,t,n)},t}(we);window.addEventListener("resize",(function(){ye.forEach((function(e){e.parentWidget instanceof ke||e._layoutChildren()}))}));var Ee,Ie=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Be=function(e,t,n,o){this.label=e,this.callback=t,this.isContinue=n,this.isCancel=o},Pe=function(e){function t(t,n,o,i){var r=this,l=new k,s=l.element;r=e.call(this,t,l,i)||this;var a=document.createElement("div");a.textContent=n,a.className="text";var c=document.createElement("div");return c.className="buttons",r._cancelOption=null,r._continueOption=null,o.forEach((function(e){var t=document.createElement("button");t.textContent=e.label,e.isCancel&&(r._cancelOption=t),e.isContinue&&(r._continueOption=t),t.onclick=function(t){r.hide(),e.callback&&e.callback(r)},c.appendChild(t)})),s.appendChild(a),s.appendChild(c),r._boundKeyEvent=null,r}return Ie(t,e),t.prototype.showModal=function(){var t=this;e.prototype.showModal.call(this),this._boundKeyEvent=function(e){"Escape"==e.key&&t._cancelOption?t._clickButton(t._cancelOption):"Enter"==e.key&&t._continueOption&&t._clickButton(t._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},t.prototype._clickButton=function(e){var t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});e.dispatchEvent(t)},t.prototype.hide=function(){e.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},t}(L),De=function(e){function t(t,n,o,i){return e.call(this,t,n,[new Be("OK",i,!0,!0)],o)||this}return Ie(t,e),t}(Pe),Se=function(e){function t(t,n,o,i,r){var l=this,s=new k,a=s.element;l=e.call(this,t,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l.inputElement=document.createElement("input"),l.inputElement.value=o,l.inputElement.type="text";var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(e){var t=document.createElement("button");t.textContent=e.label,e.isCancel&&(l._cancelOption=t),e.isContinue&&(l._continueOption=t),t.onclick=function(t){l.hide(),e.callback&&e.callback(l)},d.appendChild(t)})),a.appendChild(c),a.appendChild(l.inputElement),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("InputDialog"),l._boundKeyEvent=null,l}return Ie(t,e),t.prototype.getValue=function(){return this.inputElement.value},t.prototype.showModal=function(){var t=this;e.prototype.showModal.call(this),this.inputElement.focus(),this.inputElement.select(),this._boundKeyEvent=function(e){"Escape"==e.key&&t._cancelOption?t._clickButton(t._cancelOption):"Enter"==e.key&&t._continueOption&&t._clickButton(t._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},t.prototype._clickButton=function(e){var t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});e.dispatchEvent(t)},t.prototype.hide=function(){e.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},t}(L);!function(e){e[e.ModifyData=1]="ModifyData",e[e.ModifyView=2]="ModifyView"}(Ee||(Ee={}));var Oe,Me=function(){function e(e){this._history=[],this._currentIndex=-1,this._idCounter=-1,this._onChangedCallback=e||function(e,t){}}return e.prototype.add=function(e){this._currentIndex++;var t=this._history.length-this._currentIndex;this._history.splice(this._currentIndex,t,e),e.id=++this._idCounter,this._onChangedCallback(this._history.slice(),this._currentIndex)},e.prototype.undo=function(){if(this.canUndo()){var e=this._history[this._currentIndex];this._currentIndex--,e.undo(),this._onChangedCallback(this._history.slice(),this._currentIndex)}},e.prototype.redo=function(){this.canRedo()&&(this._currentIndex++,this._history[this._currentIndex].do(),this._onChangedCallback(this._history.slice(),this._currentIndex))},e.prototype.canUndo=function(){return this._currentIndex>=0},e.prototype.canRedo=function(){return this._currentIndex<this._history.length-1},e.prototype.wasDataModifiedSinceVersion=function(e){if(this._currentIndex<0||this._history[this._currentIndex].id==e)return!1;for(var t=this._history.findIndex((function(t){return t.id==e})),n=t<this._currentIndex?-1:1,o=this._currentIndex;o!=t;o+=n)if(this._history[o].wasDataModified())return!0;return!1},e.prototype.getCurrentCommand=function(){return this._history[this._currentIndex]},e}(),Re=function(){function e(e,t,n,o){this.id=-1,this.title=e,this.do=t,this.undo=n,this.category=o||Ee.ModifyData}return e.prototype.wasDataModified=function(){return this.category==Ee.ModifyData},e}(),Ne=function(){function e(){this._data=null}return e.prototype.set=function(e){this._data=e},e.prototype.clear=function(){this._data=null},e.prototype.get=function(){return this._data},e.prototype.containsData=function(){return null!=this._data},e}(),Le=function(e,t,n){this.type=e,this.timestamp=t,this.data=n},ze=new Ne,He=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){e[e.None=0]="None",e[e.MoveNodes=1]="MoveNodes",e[e.MoveSelectedNodes=2]="MoveSelectedNodes",e[e.Select=3]="Select",e[e.MoveViewport=4]="MoveViewport"}(Oe||(Oe={}));var We=function(e,t){this.fromOutput=e,this.toInput=t},Te=function(e,t){this.nodes=e,this.connections=t},Ve=function(e,t,n,o){this.fromNodeIndex=e,this.fromOutputIndex=t,this.toNodeIndex=n,this.toInputIndex=o},je=function(e,t,n,o){this.title=e,this.inputs=t,this.outputs=n,this.pos=o},Ge=function(){function e(e,t,n){this.x=e,this.y=t,this.zoom=n}return e.prototype.getPixelPos=function(){return this.getPixelPosFromPos(0,0)},e.prototype.getPixelPosFromPos=function(e,t){return new _((e-this.x)*this.zoom,(t-this.y)*this.zoom)},e.prototype.getPosFromPixelPos=function(e,t){return new _(e/this.zoom+this.x,t/this.zoom+this.y)},e}(),Fe=function(e){function t(t,n,o,i,r,l,s,a){var c=e.call(this)||this;c.element.classList.add("NodeEditor"),c._undoHistory=a||new Me,c._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),c._svg.setAttributeNS(null,"width","800"),c._svg.setAttributeNS(null,"height","300");var d=document.createElementNS("http://www.w3.org/2000/svg","defs"),h=document.createElementNS("http://www.w3.org/2000/svg","marker");h.setAttributeNS(null,"style","overflow:visible;"),h.setAttributeNS(null,"refX","0.0"),h.setAttributeNS(null,"refY","0.0"),h.setAttributeNS(null,"orient","auto"),h.setAttributeNS(null,"id","ArrowHead");var u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttributeNS(null,"transform","scale(0.7) translate(-8,-5)"),u.setAttributeNS(null,"d","M 0 0 L 5 5 L 0 10 z"),h.appendChild(u),d.appendChild(h),c._svg.appendChild(d),c.element.appendChild(c._svg),c._nodes=[],c._viewport=new Ge(0,0,1),c._zoomWithoutCtrl=r||void 0===r,c._addArrowHeads=l||void 0===l,c._targetInput=null,c._targetOutput=null,c._targetNode=null,c._defineCtrlShortcuts=s||void 0===s,c._dragStart=new _(-1,1),c._viewportDragStart=new _(-1,-1),c._dragMode=Oe.None,c._selectRect=document.createElement("div"),c._selectRect.className="selectRect",c.element.appendChild(c._selectRect),c._selectRect.style.display="none",c.contextMenu=new de("Node Editor"),c.contextMenu.addEntry("Cut",(function(){return c.onCut()}),(function(){return c.getSelectedNodes().length>0})),c.contextMenu.addEntry("Copy",(function(){return c.onCopy()}),(function(){return c.getSelectedNodes().length>0})),c.contextMenu.addEntry("Paste",(function(){return c.onPaste(!0)}),(function(){return c.canPaste()})),c.contextMenu.addEntry("Delete",(function(){return c._removeSelectedNodes()}),(function(){return c.getSelectedNodes().length>0})),c.element.addEventListener("contextmenu",(function(e){return e.preventDefault(),c.contextMenu.show(e.clientX,e.clientY),!1}));var A=I(c);return c.element.addEventListener("mousedown",(function(e){A(e),c._nodes.forEach((function(e){var t=e.getPixelPos();e._dragEditorPixelStartX=t.x,e._dragEditorPixelStartY=t.y}))})),c._draggedConnection=null,c._connectionSettingsBeforeDragging=null,c._selectedNodes=[],c._nodeSelectedCallback=t,c._nodeDeselectedCallback=n,c._nodeAddedCallback=o,c._nodeRemovedCallback=i,c._previouslySelectedNodes=[],c._hasFocus=!1,window.addEventListener("mouseup",(function(e){c._hasFocus=c.element.contains(e.target)})),window.addEventListener("keydown",(function(e){c._hasFocus&&("Delete"==e.key?c._removeSelectedNodes():"0"==e.key&&e.ctrlKey&&c._applyZoom(1),c._defineCtrlShortcuts&&("z"==e.key.toLowerCase()&&e.ctrlKey?e.shiftKey?c._undoHistory.redo():c._undoHistory.undo():"y"==e.key.toLowerCase()&&e.ctrlKey?c._undoHistory.redo():"c"==e.key.toLowerCase()&&e.ctrlKey?c.onCopy():"x"==e.key.toLowerCase()&&e.ctrlKey?c.onCut():"v"==e.key.toLowerCase()&&e.ctrlKey?c.onPaste(!1):"a"==e.key.toLowerCase()&&e.ctrlKey&&(e.shiftKey?c.deselectAllWithUndo():c.selectAllWithUndo(),e.preventDefault())))})),c.element.addEventListener("wheel",(function(e){if(e.ctrlKey||c._zoomWithoutCtrl){e.preventDefault(),c._hasFocus=!0;var t=c._viewport.zoom-.001*e.deltaY;t=Math.min(Math.max(.125,t),4);var n=c.element.getBoundingClientRect();c._applyZoom(t,e.clientX-n.left,e.clientY-n.top)}})),c}return He(t,e),t.prototype.onCopy=function(){this.copy()},t.prototype.onCut=function(){this.cut()},t.prototype.onPaste=function(e){this.paste(e)},t.prototype.canPaste=function(){return ze.containsData()},t.prototype.overridableCopy=function(e){ze.set(new Le("NodeEditor",new Date,e))},t.prototype.overridablePaste=function(){if(!ze.containsData())return null;var e=ze.get();return"NodeEditor"!=e.type?null:e.data},t.prototype.copy=function(){this.getSelectedNodes().length>0&&this.overridableCopy(this._getNodesCopyData())},t.prototype.cut=function(){this.copy(),this._removeSelectedNodes()},t.prototype.paste=function(e){var t=this.overridablePaste();if(t){var n,o,i=this.element.getBoundingClientRect();if(e){var r=this.contextMenu.getPos();n=r.x-i.left,o=r.y-i.top}else{var l=E;n=l.x-i.left,o=l.y-i.top}this._paste(t,new _(n,o))}},t.prototype._applyZoom=function(e,t,n){t=t||0,n=n||0;var o=this._viewport.getPosFromPixelPos(t,n);this._viewport.zoom=e;var i=this._viewport.getPosFromPixelPos(t,n);this._viewport.x=this._viewport.x+o.x-i.x,this._viewport.y=this._viewport.y+o.y-i.y,this.element.style.fontSize=e+"em",this._nodes.forEach((function(e){e.update()}))},t.prototype.useArrowHeads=function(e){this._addArrowHeads=e;for(var t=0,n=this._nodes;t<n.length;t++)for(var o=0,i=n[t]._connections;o<i.length;o++)i[o].setUseArrowHead(e)},t.prototype.zoomWithoutCtrl=function(e){this._zoomWithoutCtrl=e},t.prototype._addConnection=function(e){this._svg.contains(e._path)||this._svg.appendChild(e._path)},t.prototype._removeConnection=function(e){this._svg.contains(e._path)&&this._svg.removeChild(e._path)},t.prototype._removeSelectedNodes=function(){var e=this,t=this._selectedNodes.splice(0),n=new Re("Delete Nodes",(function(){t.forEach((function(t){e.removeNode(t)}))}),(function(){e.deselectAll(),t.forEach((function(t){e.addNode(t),t.select()}))}),Ee.ModifyData);n.do(),this._undoHistory.add(n)},t.prototype.onAttached=function(){this.isAttached()&&this._nodes.forEach((function(e){e.onAttached()}))},t.prototype.getSelectedNodes=function(){return this._selectedNodes},t.prototype.clear=function(){var e=this;this._nodes.slice().forEach((function(t){return e.removeNode(t)}))},t.prototype._createNodeForPaste=function(e){for(var t=new Ue(e.title),n=0,o=e.inputs;n<o.length;n++){var i=o[n];t.addInput(i.name,i.canConnectCheck)}for(var r=0,l=e.outputs;r<l.length;r++){var s=l[r];t.addOutput(s.name,s.canConnectCheck,s.allowMultipleConnections)}return t},t.prototype._getNodesCopyData=function(){for(var e=this.getSelectedNodes(),t=e.map((function(e){return e._copy()})),n=[],o=0,i=0,r=e;i<r.length;i++){for(var l=r[i],s=0,a=l._connections;s<a.length;s++){var c=a[s];if(c._fromOutput._node==l){var d=e.indexOf(c._toInput._node);if(d>=0){var h=new Ve(o,l._outputs.indexOf(c._fromOutput),d,e[d]._inputs.indexOf(c._toInput));n.push(h)}}}o++}return new Te(t,n)},t.prototype._paste=function(e,t){for(var n=this,o=e.nodes,i=null,r=null,l=0,s=o;l<s.length;l++){var a=s[l];(null==i||a.pos.x<i)&&(i=a.pos.x),(null==r||a.pos.y<r)&&(r=a.pos.y)}var c=o.map((function(e){var o=n._createNodeForPaste(e);return o.setPixelPos(e.pos.x-i+t.x,e.pos.y-r+t.y),o})),d=this._selectedNodes.slice(0),h=new Re(o.length>1?"Paste Nodes":"Paste Node",(function(){n.deselectAll();for(var t=0,o=c;t<o.length;t++){var i=o[t];n.addNode(i),i.select()}for(var r=0,l=e.connections;r<l.length;r++){var s=l[r];n.connect(c[s.fromNodeIndex]._outputs[s.fromOutputIndex],c[s.toNodeIndex]._inputs[s.toInputIndex])}n._onNodesPasted(c);for(var a=0,d=c;a<d.length;a++)(i=d[a]).update()}),(function(){c.forEach((function(e){return n.removeNode(e)})),n.deselectAll(),d.forEach((function(e){return e.select()}))}),Ee.ModifyData);this._undoHistory.add(h),h.do()},t.prototype._onNodesPasted=function(e){},t.prototype.removeNode=function(e){var t=this;e._editor=null,this.element.removeChild(e.element),e._connections.forEach((function(n){n._fromOutput._node!=e&&n._fromOutput._node.removeConnection(n),n._toInput._node!=e&&n._toInput._node.removeConnection(n),t._removeConnection(n)}));var n=this._nodes.indexOf(e);n>-1&&this._nodes.splice(n,1);var o=this._selectedNodes.indexOf(e);o>-1&&this._selectedNodes.splice(o,1),this._nodeRemovedCallback&&this._nodeRemovedCallback(e)},t.prototype.addNode=function(e){var t=this;this._nodes.push(e),this.element.appendChild(e.element),e._editor=this,e._connections.forEach((function(n){n._fromOutput._node!=e&&n._fromOutput._node.addConnection(n),n._toInput._node!=e&&n._toInput._node.addConnection(n),t._addConnection(n)})),e.onAttached(),this._nodeAddedCallback&&this._nodeAddedCallback(e)},t.prototype.addNodeWithUndo=function(e,t){var n=this,o=new Re(t||"Add Node",(function(){n.addNode(e)}),(function(){n.removeNode(e)}),Ee.ModifyData);this._undoHistory.add(o),o.do()},t.prototype.getNodes=function(){return this._nodes},t.prototype.connect=function(e,t){var n=new Je(e,t);e._node.addConnection(n),t._node.addConnection(n),this._addConnection(n)},t.prototype.disconnect=function(e,t){var n=this._connections.find((function(n){return n._fromOutput==e&&n._toInput==t}));n&&(e._node.removeConnection(n),t._node.removeConnection(n),this._removeConnection(n))},t.prototype.onDragStart=function(e){if(1==e.button||0==e.button&&e.ctrlKey){this.element.classList.add("moving"),this._dragMode=Oe.MoveViewport;var t=this.element.getBoundingClientRect();return this._dragStart.x=e.clientX-t.left,this._dragStart.y=e.clientY-t.top,this._viewportDragStart.x=this._viewport.x,this._viewportDragStart.y=this._viewport.y,!0}return 0==e.button&&e.target==this.element&&(this._previouslySelectedNodes=this._selectedNodes.slice(0),this.deselectAll(),t=this.element.getBoundingClientRect(),this._dragStart.x=e.clientX-t.left,this._dragStart.y=e.clientY-t.top,this._dragMode=Oe.Select,this._selectRect.style.display="block",this._selectRect.style.left=this._dragStart.x+"px",this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width="0",this._selectRect.style.height="0",!0)},t.prototype.onDragNodesStarted=function(){this.element.classList.add("moving"),this._selectedNodes.forEach((function(e){e.onDragStarted()}))},t.prototype.onDragging=function(e){var t=this,n=this.element.getBoundingClientRect(),o=e.posWithOffsetToParentConsidered.x-n.left,i=e.posWithOffsetToParentConsidered.y-n.top;switch(this._dragMode){case Oe.MoveViewport:this._viewport.x=this._viewportDragStart.x-o/this._viewport.zoom,this._viewport.y=this._viewportDragStart.y-i/this._viewport.zoom,this._nodes.forEach((function(e){e.update()}));break;case Oe.MoveSelectedNodes:this._selectedNodes.forEach((function(e){e.setPixelPos(e._dragEditorPixelStartX+o,e._dragEditorPixelStartY+i),e._connections.forEach((function(e){e.update()}))}));break;case Oe.Select:o<0?(this._selectRect.style.left=this._dragStart.x+o+"px",o*=-1):this._selectRect.style.left=this._dragStart.x+"px",i<0?(this._selectRect.style.top=this._dragStart.y+i+"px",i*=-1):this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width=o+"px",this._selectRect.style.height=i+"px";var r=this._selectRect.getBoundingClientRect();this._nodes.map((function(e){return{node:e,selected:t.intersection(r,e.element.getBoundingClientRect())}})).forEach((function(e){e.selected?e.node.select():e.node.deselect()}))}},t.prototype.onDragEnd=function(e){var t=this;switch(this.element.classList.remove("moving"),this._dragMode){case Oe.MoveViewport:break;case Oe.MoveSelectedNodes:this._selectedNodes.forEach((function(t){return t.onDragEnd(e)}));var n=this._selectedNodes.map((function(e){return{node:e,startPos:{x:e._dragEditorStartX,y:e._dragEditorStartY},endPos:{x:e._pos.x,y:e._pos.y}}}));if(!n.every((function(e){return e.endPos.x==e.startPos.x&&e.endPos.x==e.startPos.x}))){var o=new Re(this._selectedNodes.length>1?"Move Nodes":"Move Node",(function(){n.forEach((function(e){e.node.setPos(e.endPos.x,e.endPos.y)}))}),(function(){n.forEach((function(e){e.node.setPos(e.startPos.x,e.startPos.y)}))}),Ee.ModifyData);this._undoHistory.add(o),o.do()}break;case Oe.Select:this._selectRect.style.display="none";var i=this._previouslySelectedNodes,r=this._selectedNodes.slice(0);if(0!=i.length||0!=r.length){var l=new Re(0==r.length?"Deselect All Nodes":"Select Nodes",(function(){t.deselectAll(),r.forEach((function(e){return e.select()}))}),(function(){t.deselectAll(),i.forEach((function(e){return e.select()}))}),Ee.ModifyView);this._undoHistory.add(l)}}this._dragMode=Oe.None},t.prototype.intersection=function(e,t){return!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)},t.prototype.deselectAllWithUndo=function(){var e=this,t=this._selectedNodes.slice(0),n=new Re("Deselect All Nodes",(function(){e.deselectAll()}),(function(){e.deselectAll(),t.forEach((function(e){return e.select()}))}),Ee.ModifyView);n.do(),this._undoHistory.add(n)},t.prototype.selectAllWithUndo=function(){var e=this,t=this._selectedNodes.slice(0),n=new Re("Select All Nodes",(function(){e.selectAll()}),(function(){e.deselectAll(),t.forEach((function(e){return e.select()}))}),Ee.ModifyView);n.do(),this._undoHistory.add(n)},t.prototype.deselectAll=function(){this._selectedNodes.slice(0).forEach((function(e){e.deselect()}))},t.prototype.selectAll=function(){this._nodes.forEach((function(e){e.select()}))},t}(k),Je=function(){function e(e,t){this._fromOutput=e,this._toInput=t,this._path=document.createElementNS("http://www.w3.org/2000/svg","path"),this._path.setAttributeNS(null,"fill","transparent"),this._path.setAttributeNS(null,"stroke-width","2"),(e||t)._node._editor._addArrowHeads&&this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"),this._fromOutput&&this._toInput&&this.update()}return e.prototype.setUseArrowHead=function(e){e?this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"):this._path.setAttributeNS(null,"style","marker-end:none")},e.prototype.update=function(e,t){var n,o,i;n=null!=this._fromOutput?this._fromOutput._bullet.getBoundingClientRect():{left:e,top:t,width:0,height:0},o=null!=this._toInput?this._toInput._bullet.getBoundingClientRect():{left:e,top:t,width:0,height:0},i=null!=this._path.parentNode?this._path.parentElement.getBoundingClientRect():{left:0,top:0};var r=n.left-i.left+.5*n.width,l=n.top-i.top+.5*n.height,s=o.left-i.left+.5*o.width,a=o.top-i.top+.5*o.height,c=this._fromOutput?this._fromOutput._node._editor:this._toInput?this._toInput._node._editor:null,d=c?c._viewport.zoom:1;d||(d=1),this._path.setAttributeNS(null,"d","M"+r+" "+l+" C "+(r+50*d)+" "+l+", "+(s-50*d)+" "+a+", "+s+" "+a)},e}(),Ye=function(){function e(e,t,n,o,i){this._node=e,this._name=t,this._isInput=n,this._allowMultipleConnectionsForOutput=!!i,this._canConnectCheck=o||function(e){return!0},this._bullet=n?this.createInput():this.createOutput()}return e.prototype.createInput=function(){var e=this,t=document.createElement("div");t.className="input";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,t.appendChild(n),t.appendChild(o),this._node._inputsElement.appendChild(t),n.onmouseenter=function(t){e._node._editor&&(null==e._node._editor._draggedConnection||e._canConnectCheck(e._node._editor._draggedConnection._fromOutput)&&e._node._editor._draggedConnection._fromOutput._canConnectCheck(e)||e._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),e._node._editor._targetInput=e,e._node._editor._targetNode=e._node)},n.onmouseleave=function(t){e._node._editor&&(e._node._editor._targetInput==e&&(e._node._editor._targetInput=null),e._node._editor._draggedConnection&&e._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=I(this._node._connectionDragging);return n.onmousedown=function(t){if(t.stopPropagation(),e._node._editor){i(t);var n=void 0,o=null,r=e._node._connections.find((function(t){return t._toInput==e}));r?(o=new We(r._fromOutput,r._toInput),(n=r)._toInput=null,e._node.removeConnection(n)):(n=new Je(null,e),e._node.addConnection(n),e._node._editor._addConnection(n)),e._node._editor._draggedConnection=n,e._node._editor._connectionSettingsBeforeDragging=o}},n},e.prototype.createOutput=function(){var e=this,t=document.createElement("div");t.className="output";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,t.appendChild(o),t.appendChild(n),this._node._outputsElement.appendChild(t),n.onmouseenter=function(t){e._node._editor&&(null==e._node._editor._draggedConnection||e._canConnectCheck(e._node._editor._draggedConnection._toInput)&&e._node._editor._draggedConnection._toInput._canConnectCheck(e)||e._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),e._node._editor._targetOutput=e,e._node._editor._targetNode=e._node)},n.onmouseleave=function(t){e._node._editor&&(e._node._editor._targetOutput==e&&(e._node._editor._targetOutput=null),e._node._editor._draggedConnection&&e._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=I(this._node._connectionDragging);return n.onmousedown=function(t){if(t.stopPropagation(),e._node._editor){i(t);var n=void 0,o=null,r=null;e._allowMultipleConnectionsForOutput||(o=e._node._connections.find((function(t){return t._fromOutput==e})))&&(r={fromOutput:o._fromOutput,toInput:o._toInput},(n=o)._fromOutput=null,e._node.removeConnection(n)),n||(n=new Je(e,null),e._node.addConnection(n),e._node._editor._addConnection(n)),e._node._editor._draggedConnection=n,e._node._editor._connectionSettingsBeforeDragging=r}},n},e.prototype.isInput=function(){return this._isInput},e.prototype.isOutput=function(){return!this._isInput},e}(),Ue=function(e){function t(t){var n=e.call(this)||this;n.element.classList.add("Node"),n._title=document.createElement("div"),n.setTitle(t),n._title.className="title",n.element.appendChild(n._title);var o=document.createElement("div");return n._pos=new _(-1,-1),n._connections=[],n._inputs=[],n._inputsElement=document.createElement("div"),n._inputsElement.className="inputs",o.appendChild(n._inputsElement),o.className="body",n._contentsElement=document.createElement("div"),n._contentsElement.className="contents",o.appendChild(n._contentsElement),n._outputs=[],n._outputsElement=document.createElement("div"),n._outputsElement.className="outputs",o.appendChild(n._outputsElement),n.element.appendChild(o),n._dragEditorPixelStartX=0,n._dragEditorPixelStartY=0,n._dragEditorStartX=0,n._dragEditorStartY=0,n._editor=null,n._wasActuallyDragged=!1,n._connectionDragging=new B(n.element,(function(e){return!0}),(function(e){n._editor&&n._editor._draggedConnection&&n._editor._draggedConnection.update(e.mouseEvent.clientX,e.mouseEvent.clientY)}),(function(e){if(n._editor&&n._editor._draggedConnection){var t=function(e,t){return new Re("Remove Connection",(function(){n._removeDraggedConnection(e),n._onConnectionRemoved(e)}),(function(){null!=t&&(e._fromOutput=t.fromOutput,e._toInput=t.toInput),e._path.setAttributeNS(null,"class",""),n._editor._addConnection(e),e.update(),e._fromOutput&&e._fromOutput._node.addConnection(e),e._toInput&&e._toInput._node.addConnection(e)}),Ee.ModifyData)},o=function(e,o){var i=n._editor._connectionSettingsBeforeDragging;if(!e._canConnectCheck(o)||!o._canConnectCheck(e)){var r=n._editor._draggedConnection,l=t(r,i);return n._editor._undoHistory.add(l),void l.do()}var s=n._connections.find((function(t){return t._fromOutput==e&&t._toInput==o})),a=n._editor._draggedConnection,c=function(e,t,o,i,r,l){return new Re(r?"Change Connection":"Add Connection",(function(){l&&(n._editor._removeConnection(l),n.removeConnection(l),o.removeConnection(l),n._onConnectionRemoved(l)),i._fromOutput=e,i._toInput=t,n._editor._addConnection(i),n.addConnection(i),o.addConnection(i),i.update(),n._onConnectionAdded(i),o._onConnectionAdded(i)}),(function(){r?(o.removeConnection(i),r.fromOutput._node==o?i._fromOutput=r.fromOutput:i._toInput=r.toInput,i.update(),n._onConnectionAdded(i),o._onConnectionRemoved(i)):(n._editor._removeConnection(i),n.removeConnection(i),i._fromOutput._node.removeConnection(i),i._toInput._node.removeConnection(i),n._onConnectionRemoved(i)),l&&(o.addConnection(l),l.update(),i._fromOutput._node.update(),i._toInput._node.update(),i._fromOutput._node.addConnection(l),i._toInput._node.addConnection(l),i._fromOutput._node._onConnectionAdded(l),i._toInput._node._onConnectionAdded(l))}),Ee.ModifyData)}(e,o,n._editor._targetNode,a,i,s);n._editor._draggedConnection=null,n._editor._connectionSettingsBeforeDragging=null,n._editor._undoHistory.add(c),c.do()};if(n._editor._targetInput&&!n._editor._draggedConnection._toInput)o(n._editor._draggedConnection._fromOutput,n._editor._targetInput);else if(n._editor._targetOutput&&!n._editor._draggedConnection._fromOutput)o(n._editor._targetOutput,n._editor._draggedConnection._toInput);else{var i=n._editor._draggedConnection,r=n._editor._connectionSettingsBeforeDragging,l=t(i,r);r&&n._editor._undoHistory.add(l),l.do()}}})),n}return He(t,e),t.prototype._mapNodePort=function(e){return{name:e._name,allowMultipleConnectionsForOutput:e._allowMultipleConnectionsForOutput,canConnectCheck:e._canConnectCheck}},t.prototype._copy=function(){var e=this;return new je(this.getTitle(),this._inputs.map((function(t){return e._mapNodePort(t)})),this._outputs.map((function(t){return e._mapNodePort(t)})),this.getPos())},t.prototype._onConnectionAdded=function(e){},t.prototype._onConnectionRemoved=function(e){},t.prototype._removeDraggedConnection=function(e){e._fromOutput&&e._fromOutput._node.removeConnection(e),e._toInput&&e._toInput._node.removeConnection(e),this._editor._removeConnection(e),e=null,this._editor._draggedConnection=null,this._editor._connectionSettingsBeforeDragging=null},t.prototype.onAttached=function(){var e=this;if(this.isAttached()){if(this._connections.forEach((function(e){e.update()})),null==this._pos.x){var t=this._getViewport();this._pos.x=t.getPosFromPixelPos(parseInt(this.element.style.left),0).x}null==this._pos.y&&(t=this._getViewport(),this._pos.y=t.getPosFromPixelPos(0,parseInt(this.element.style.top)).y),this.update(),this._title.addEventListener("mousedown",I(this._editor,(function(t,n){return!!e.onDragStart(n)&&(e._editor.onDragNodesStarted(),!0)})))}},t.prototype._getViewport=function(){return this._editor?this._editor._viewport:null},t.prototype.setPixelPos=function(e,t){var n=this._getViewport();if(this.element.style.left=e+"px",this.element.style.top=t+"px",n){var o=n.getPosFromPixelPos(e,t);this._pos.x=o.x,this._pos.y=o.y}else this._pos.x=void 0,this._pos.y=void 0},t.prototype.getPixelPos=function(){var e=this._getViewport();return e?e.getPixelPosFromPos(this._pos.x,this._pos.y):null},t.prototype.setPos=function(e,t){this._pos.x=e,this._pos.y=t,this.update()},t.prototype.getPos=function(){return new _(this._pos.x,this._pos.y)},t.prototype.getTitle=function(){return this._title.textContent},t.prototype.setTitle=function(e){this._title.textContent=e},t.prototype.addInput=function(e,t){var n=new Ye(this,e,!0,t);return this._inputs.push(n),n},t.prototype.addOutput=function(e,t,n){var o=new Ye(this,e,!1,t,n);return this._outputs.push(o),o},t.prototype.addConnection=function(e){this._connections.includes(e)||this._connections.push(e)},t.prototype.removeConnection=function(e){var t=this._connections.indexOf(e);t>-1&&this._connections.splice(t,1)},t.prototype.onDragStart=function(e){return 0!=e.button&&2!=e.button||this.isSelected()||this.selectSingle(),0==e.button},t.prototype.onDragStarted=function(){var e=this.getPixelPos();this._dragEditorPixelStartX=e.x,this._dragEditorPixelStartY=e.y,this._dragEditorStartX=this._pos.x,this._dragEditorStartY=this._pos.y,this._editor._dragMode=Oe.MoveSelectedNodes},t.prototype.onDragEnd=function(t){e.prototype.onDragEnd.call(this,t),this._wasActuallyDragged=!1},t.prototype.isSelected=function(){return this.element.classList.contains("selected")},t.prototype.select=function(){this._editor._selectedNodes.indexOf(this)>-1||(this._editor._selectedNodes.push(this),this.element.classList.add("selected"),this._editor._nodeSelectedCallback&&this._editor._nodeSelectedCallback(this))},t.prototype.deselect=function(){this._editor._selectedNodes.indexOf(this)<0||(this._editor._selectedNodes.splice(this._editor._selectedNodes.indexOf(this),1),this.element.classList.remove("selected"),this._editor._nodeDeselectedCallback&&this._editor._nodeDeselectedCallback(this))},t.prototype.selectSingle=function(){var e=this,t=this._editor._selectedNodes.slice(0),n=new Re("Select Node",(function(){e._editor.deselectAll(),e.select()}),(function(){e._editor.deselectAll(),t.forEach((function(e){return e.select()}))}),Ee.ModifyView);n.do(),this._editor._undoHistory.add(n)},t.prototype.update=function(){var e=this.getPixelPos();e&&(this.element.style.left=e.x+"px",this.element.style.top=e.y+"px",this._connections.forEach((function(e){e.update()})))},t}(k)})(),module.exports.tootframes=o})();
1
+ (()=>{"use strict";var e={11:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(354),i=n.n(o),r=n(314),l=n.n(r)()(i());l.push([e.id,'*{box-sizing:border-box;cursor:default;user-select:none}a{cursor:pointer;color:#c3df85;text-decoration:none}a:hover{color:#d7e6b9;text-decoration:underline}.beingDragged{opacity:.6;z-index:1000 !important}img{pointer-events:none}body{background-color:#262829;color:#dadcdd;overflow:hidden}input{border:1px solid #343738;background:#1a1d1f;color:#cad2d4;border-radius:.1em;padding:.3em .8em;outline:none;font-size:1.2em;margin-right:.2em;margin-bottom:.2em}.MenuBar{background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);border-bottom:1px solid #575c5e;width:100%;height:2.5em;position:absolute;z-index:50;top:0;left:0}.MenuBar .Icon{height:100%;padding:.4em 1em}.MenuBar .Menu{display:inline-block;padding:.6em .7em;height:100%;vertical-align:top}.MenuBar .Menu:hover{background-color:#262829}.MenuContent{display:none;position:absolute;background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);left:0;top:2.5em;min-width:6em;min-height:.5em;z-index:1000}.MenuContent>.entry{padding:.5em 2em}.MenuContent>.entry.submenu:after{content:"›";display:inline-block;position:absolute;right:0;margin-right:.5em}.MenuContent>.entry:hover{background-color:#262829}.MenuContent>.entry.disabled{color:#7d8488}.MenuContent>.entry.disabled:hover{background-color:#323536}.MenuContent>.separator{background-color:#575c5e;border:.4em solid #3f4243;height:.9em}.Modal{display:block;position:absolute;background-color:rgba(0,0,0,.4666666667);left:0;top:0;right:0;bottom:0}button::-moz-focus-inner{border:0}button,.button{background-color:#0d0e0f;outline:none;border-radius:0;border:none;color:#dadcdd;padding:.5em 2em;font-size:1em;margin-right:.2em;margin-bottom:.2em}button:focus,.button:focus{outline:none}button:hover,.button:hover{background-color:#1a1b1c}button:active,.button:active{background-color:#121314}.Modal{background-color:rgba(0,0,0,.4666666667);position:absolute;z-index:52;left:0;right:0;top:0;bottom:0}.Modal .Dialog{z-index:53}.text{white-space:pre-line}.Dialog{min-width:15em;max-width:80vw;min-height:5em;max-height:80vh}.Dialog,.DockPanel{position:absolute;z-index:51;top:50%;left:50%;transform:translate(-50%, -50%);background-color:#3f4243;box-shadow:0 0 .5em rgba(0,0,0,.4666666667)}.Dialog .title,.DockPanel .title{width:100%;text-align:center;padding:.5em;background-color:#575c5e;border-bottom:1px solid #707578}.Dialog .title .closeButton,.DockPanel .title .closeButton{padding:.2em;width:2em;height:2em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#323536}.Dialog .title .closeButton:hover,.DockPanel .title .closeButton:hover{background-color:#3f4243}.Dialog .content,.DockPanel .content{padding:.8em 1.5em;position:absolute}.Dialog .content.w3term,.DockPanel .content.w3term{height:100%}.Dialog .buttons,.DockPanel .buttons{padding:.8em 1.5em;text-align:center}.Dialog .content,.Dialog .Panel.content{position:static;padding:.8em 1.5em}.InputDialog input{width:100%}.Label{user-select:text}.DockContainer>*{overflow:hidden;position:absolute}.DockContainer.horizontal>*{display:inline-block}.DockContainer.horizontal>*.DockSeparator{width:3px;height:100%;background-color:#0d0e0f;cursor:ew-resize}.DockContainer.vertical>*{display:block;clear:both}.DockContainer.vertical>*.DockSeparator{width:100%;height:3px;background-color:#0d0e0f;cursor:ns-resize}.DockContainer>.DockSeparator:hover{background-color:#1a1b1c}.DockPanel{transform:none;max-width:none;max-height:none;background-color:#262829}.DockPanel .title{text-align:left;padding:.1em .5em;font-size:.9em;background-color:#1a1b1c;border-bottom:1px solid #121314}.DockPanel .title .closeButton{padding:0;width:1.6em;height:1.6em;float:right;margin-top:-0.15em;margin-right:-0.15em;background-color:#1a1b1c}.DockPanel .title .closeButton:hover{background-color:#262829}.DockPanel .content{width:100%;height:calc(100% - 1.5em);overflow:auto}.DockPanel.resizingHorizontally{cursor:ew-resize}.DockPanel.resizingVertically{cursor:ns-resize}.DockPanel.resizingHorizontally.resizingVertically{cursor:nwse-resize}.DockPanel .resizeEW,.DockPanel .resizeNS,.DockPanel .resizeDiag{display:none}.DockPanel.floating .resizeEW{display:block;width:.3em;top:0;bottom:0;background-color:rgba(0,0,0,0);cursor:ew-resize;position:absolute;right:0}.DockPanel.floating .resizeNS{display:block;width:100%;height:.3em;background-color:rgba(0,0,0,0);cursor:ns-resize;position:absolute;left:0;bottom:0}.DockPanel.floating .resizeDiag{display:block;width:.5em;height:.5em;background-color:rgba(0,0,0,0);cursor:nwse-resize;position:absolute;right:0;bottom:0}body>.DockContainer{position:absolute;z-index:49;top:0;left:0;right:0;bottom:0}.dockOverlay{position:fixed;background-color:rgba(51,119,153,.6);z-index:999}.NodeEditor{width:100%;height:100%;overflow:hidden !important;padding:0 !important}.NodeEditor.moving{cursor:grabbing}.NodeEditor.beingDragged{cursor:grabbing}.NodeEditor svg{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;pointer-events:none}.NodeEditor .Node{position:absolute}.Node{display:inline-block;border-radius:.5em;box-shadow:0 0 .5em rgba(0,0,0,.4666666667);background-color:#1a1b1c;white-space:nowrap}.Node .title{border-radius:.5em .5em 0 0;background-color:#323536}.Node .body{display:flex;justify-content:space-between}.Node .bullet{display:inline-block;background-color:#3f4243;width:1.2em;height:1.2em;border-radius:1em;border:.2em solid rgba(0,0,0,0);background-clip:padding-box}.Node .bullet:hover{background-color:#63696b;border:none}.Node .inputs{display:inline-block;vertical-align:text-top}.Node .inputs .bullet{margin-left:-0.5em;margin-right:.5em}.Node .inputs .input{display:block;position:relative;font-size:.7em;margin:0}.Node .outputs{display:inline-block;vertical-align:text-top;text-align:right}.Node .outputs .bullet{margin-left:.5em;margin-right:-0.5em}.Node .outputs .output{display:block;position:relative;font-size:.7em;margin:0}.Node .contents{vertical-align:text-top;display:inline-block;min-width:2em;min-height:2em;display:flex;flex-direction:column;justify-content:space-between}.Node.selected{box-shadow:0 0 .5em #4b4f51}.Node.selected .title{background-color:#4b4f51}.TreeViewItem .label{background-color:rgba(0,0,0,0);display:inline-block;border:1px solid rgba(0,0,0,0);-webkit-user-drag:element}.TreeViewItem.focused>.label{border:1px solid #4b4f51}.TreeViewItem .label.selected{background-color:rgba(195,223,133,.2666666667)}.TreeViewItem *{cursor:pointer}.TreeViewItem>.expander{display:inline-block;opacity:0;width:.3em;margin-right:.5em;font-weight:bold;transform:rotate(0deg);transition:transform .15s ease-in-out}.TreeViewItem.expandable>.expander{opacity:1;display:inline-block}.TreeViewItem.expanded>.expander{transform:rotate(90deg)}.TreeViewItem>.children{margin-left:1em;overflow:hidden;display:none}.TreeViewItem.expanded>.children{display:block}.Panel.content{margin:0;padding:0;width:100%}.ListView,.ListView.content{display:table;margin:0;padding:0;width:100%}.ListView .cell{font-size:80%;display:table-cell;padding:.15em .6em;border-left:.2em solid #262829;border-bottom:.2em solid #262829;background-color:#1f2021}.ListView .row{display:table-row}.ListView .row .cell{user-select:text}.ListView .row .cell input{background-color:rgba(0,0,0,0);border:none;outline:none;color:#dadcdd;margin:0;padding:0;user-select:text;width:auto;display:inline}.ListView .row.selected .cell{background-color:rgba(195,223,133,.2666666667)}.ListView .row .cell.editing{background-color:rgba(62,80,21,.2666666667);box-shadow:inset 0 0 .1em rgba(195,223,133,.2666666667)}.ListView .header{display:table-row}.ListView .header .cell{background-color:#323536}.NodeEditor path{stroke:#999}.NodeEditor path.notConnectable{stroke:#944}.NodeEditor .selectRect{background-color:rgba(112,117,120,.3);border:1px solid #707578;width:300px;height:300px;position:absolute;z-index:500}.Dropdown{background-color:rgba(112,117,120,.3);border:1px solid #575c5e;color:#dadcdd;outline:none}.ListBox{border:1px solid #343738;background-color:#1a1d1f;color:#cad2d4;border-radius:.1em;outline:none;font-size:.9em;overflow:auto}.ListBox>div{padding:.3em 1em}.ListBox>div:hover{background-color:#262a2d}.ListBox>div.selected{background-color:rgba(195,223,133,.2666666667)}.ColorPicker .handle{border-radius:100%;position:relative;border:.05em solid #222;width:1.2em;height:1.2em;box-shadow:.03em .03em .3em rgba(0,0,0,.2666666667),inset 0 0 .5em #fff;transform:translate(-50%, -50%);pointer-events:none}.PaintStyleColorPicker>.hue{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to right, hsl(0deg, 100%, 50%), hsl(22.5deg, 100%, 50%), hsl(45deg, 100%, 50%), hsl(67.5deg, 100%, 50%), hsl(90deg, 100%, 50%), hsl(112.5deg, 100%, 50%), hsl(135deg, 100%, 50%), hsl(157.5deg, 100%, 50%), hsl(180deg, 100%, 50%), hsl(202.5deg, 100%, 50%), hsl(225deg, 100%, 50%), hsl(247.5deg, 100%, 50%), hsl(270deg, 100%, 50%), hsl(292.5deg, 100%, 50%), hsl(315deg, 100%, 50%), hsl(337.5deg, 100%, 50%), hsl(359deg, 100%, 50%))}.PaintStyleColorPicker>.hue *,.PaintStyleColorPicker>.lightness *{pointer-events:none}.PaintStyleColorPicker .saturation{width:100%;height:100%;background:linear-gradient(to bottom, transparent, hsl(0deg, 0%, 50%))}.PaintStyleColorPicker .lightness{width:2em;height:400px;display:inline-block;margin-left:.5em;background-color:red;background-image:linear-gradient(to bottom, white, transparent, black)}.PaintStyleColorPicker .lightness>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.GimpStyleColorPicker>.saturation{position:relative;display:inline-block;width:400px;height:400px;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:linear-gradient(to bottom, transparent, black)}.GimpStyleColorPicker>.saturation *,.GimpStyleColorPicker>.value *{pointer-events:none}.GimpStyleColorPicker .value{width:100%;height:100%}.GimpStyleColorPicker .value::before{content:" ";display:block;float:left;width:100%;height:100%;mask:linear-gradient(to right, white, transparent);background:linear-gradient(to bottom, white, black)}.GimpStyleColorPicker .hue{width:2em;height:400px;display:inline-block;margin-left:.5em;background:linear-gradient(to bottom, hsl(0deg, 100%, 50%), hsl(22.5deg, 100%, 50%), hsl(45deg, 100%, 50%), hsl(67.5deg, 100%, 50%), hsl(90deg, 100%, 50%), hsl(112.5deg, 100%, 50%), hsl(135deg, 100%, 50%), hsl(157.5deg, 100%, 50%), hsl(180deg, 100%, 50%), hsl(202.5deg, 100%, 50%), hsl(225deg, 100%, 50%), hsl(247.5deg, 100%, 50%), hsl(270deg, 100%, 50%), hsl(292.5deg, 100%, 50%), hsl(315deg, 100%, 50%), hsl(337.5deg, 100%, 50%), hsl(359deg, 100%, 50%))}.GimpStyleColorPicker .hue>.handle{border-radius:.2em;width:100%;transform:translate(0, -50%)}.WheelColorPicker>.wheel{position:relative;border:.5em solid #090909;width:25em;height:25em;border-radius:100%;padding:3em;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background:conic-gradient(hsl(90deg, 100%, 50%), hsl(67.5deg, 100%, 50%), hsl(45deg, 100%, 50%), hsl(22.5deg, 100%, 50%), hsl(0deg, 100%, 50%), hsl(337.5deg, 100%, 50%), hsl(315deg, 100%, 50%), hsl(292.5deg, 100%, 50%), hsl(270deg, 100%, 50%), hsl(247.5deg, 100%, 50%), hsl(225deg, 100%, 50%), hsl(202.5deg, 100%, 50%), hsl(180deg, 100%, 50%), hsl(157.5deg, 100%, 50%), hsl(135deg, 100%, 50%), hsl(112.5deg, 100%, 50%), hsl(89deg, 100%, 50%))}.WheelColorPicker>.wheel>.handle{width:3em;height:3em;position:absolute}.WheelColorPicker>.wheel>.innerCircle{width:100%;height:100%;background-color:#222;border-radius:100%;padding:18%;transform:rotate(45deg);box-shadow:inset .5em .5em 1em rgba(0,0,0,.5333333333)}.WheelColorPicker>.wheel>.innerCircle .saturation,.WheelColorPicker>.wheel>.innerCircle .lightness{width:100%;height:100%}.WheelColorPicker>.saturation *{pointer-events:none}.WheelColorPicker>.wheel>.innerCircle .saturation{background-color:red;box-shadow:.5em .5em 1em rgba(0,0,0,.5333333333);background-image:linear-gradient(45deg, hsl(0deg, 0%, 50%), transparent)}.WheelColorPicker>.wheel>.innerCircle .lightness{background:linear-gradient(135deg, white, transparent, black)}.ColorPickerDialog .WheelColorPicker{margin-top:1em;margin-bottom:1em}.ColorPickerDialog .ColorOutput{display:inline-block;width:3em;padding:.3em .8em;border:1px solid #343738;height:2.4em;vertical-align:top;margin-top:.05em;margin-right:.4em}',"",{version:3,sources:["webpack://./src/style.scss"],names:[],mappings:"AAAA,EAIA,qBACI,CAAA,cACA,CAAA,gBACA,CAAA,EAGJ,cACI,CAAA,aACA,CAAA,oBACA,CAAA,QAEA,aACI,CAAA,yBACA,CAAA,cAIR,UACI,CAAA,uBACA,CAAA,IAGJ,mBACI,CAAA,KAGJ,wBA7BkB,CAAA,aADN,CAAA,eAiCR,CAAA,MAGJ,wBACI,CAAA,kBACA,CAAA,aACA,CAAA,kBACA,CAAA,iBACA,CAAA,YACA,CAAA,eACA,CAAA,iBACA,CAAA,kBACA,CAAA,SAGJ,wBACI,CAAA,2CACA,CAAA,+BACA,CAAA,UACA,CAAA,YACA,CAAA,iBACA,CAAA,UACA,CAAA,KACA,CAAA,MACA,CAAA,eAEA,WACI,CAAA,gBACA,CAAA,eAGJ,oBACI,CAAA,iBACA,CAAA,WACA,CAAA,kBACA,CAAA,qBAEA,wBArEU,CAAA,aA2ElB,YACI,CAAA,iBACA,CAAA,wBACA,CAAA,2CACA,CAAA,MACA,CAAA,SACA,CAAA,aACA,CAAA,eACA,CAAA,YACA,CAAA,oBAEA,gBACI,CAAA,kCAEA,WACI,CAAA,oBACA,CAAA,iBACA,CAAA,OACA,CAAA,iBACA,CAAA,0BAGJ,wBAjGU,CAAA,6BAsGd,aACI,CAAA,mCAEA,wBACI,CAAA,wBAIR,wBACI,CAAA,yBACA,CAAA,WACA,CAAA,OAKR,aACI,CAAA,iBACA,CAAA,wCACA,CAAA,MACA,CAAA,KACA,CAAA,OACA,CAAA,QACA,CAAA,yBAIJ,QACI,CAAA,eAGJ,wBACI,CAAA,YACA,CAAA,eACA,CAAA,WACA,CAAA,aA1IQ,CAAA,gBA4IR,CAAA,aACA,CAAA,iBACA,CAAA,kBACA,CAAA,2BAEA,YACI,CAAA,2BAEJ,wBACI,CAAA,6BAEJ,wBACI,CAAA,OAIR,wCACI,CAAA,iBACA,CAAA,UACA,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,eAEA,UACI,CAAA,MAIR,oBACI,CAAA,QAGJ,cACI,CAAA,cACA,CAAA,cACA,CAAA,eACA,CAAA,mBAGJ,iBACI,CAAA,UACA,CAAA,OACA,CAAA,QACA,CAAA,+BACA,CAAA,wBAEA,CAAA,2CACA,CAAA,iCAEA,UACI,CAAA,iBACA,CAAA,YACA,CAAA,wBACA,CAAA,+BACA,CAAA,2DAEA,YACI,CAAA,SACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,uEAEA,wBACI,CAAA,qCAKZ,kBACI,CAAA,iBACA,CAAA,mDAGJ,WACI,CAAA,qCAGJ,kBACI,CAAA,iBACA,CAAA,wCAIR,eAEI,CAAA,kBACA,CAAA,mBAGJ,UACI,CAAA,OAGJ,gBACI,CAAA,iBAIA,eACI,CAAA,iBACA,CAAA,4BAIJ,oBAGI,CAAA,0CAEA,SACI,CAAA,WACA,CAAA,wBACA,CAAA,gBACA,CAAA,0BAIR,aAGI,CAAA,UACA,CAAA,wCAEA,UACI,CAAA,UACA,CAAA,wBACA,CAAA,gBACA,CAAA,oCAIR,wBACI,CAAA,WAIR,cACI,CAAA,cACA,CAAA,eACA,CAAA,wBA3Rc,CAAA,kBA6Rd,eACI,CAAA,iBACA,CAAA,cACA,CAAA,wBACA,CAAA,+BACA,CAAA,+BAEA,SACI,CAAA,WACA,CAAA,YACA,CAAA,WACA,CAAA,kBACA,CAAA,oBACA,CAAA,wBACA,CAAA,qCAEA,wBA7SM,CAAA,oBAmTd,UACI,CAAA,yBACA,CAAA,aACA,CAAA,gCAGJ,gBACI,CAAA,8BAEJ,gBACI,CAAA,mDAEJ,kBACI,CAAA,iEAGJ,YAGI,CAAA,8BAGA,aACI,CAAA,UACA,CAAA,KACA,CAAA,QACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,OACA,CAAA,8BAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,gBACA,CAAA,iBACA,CAAA,MACA,CAAA,QACA,CAAA,gCAEJ,aACI,CAAA,UACA,CAAA,WACA,CAAA,8BACA,CAAA,kBACA,CAAA,iBACA,CAAA,OACA,CAAA,QACA,CAAA,oBAKZ,iBACI,CAAA,UACA,CAAA,KAEA,CAAA,MACA,CAAA,OACA,CAAA,QACA,CAAA,aAGJ,cACI,CAAA,oCACA,CAAA,WACA,CAAA,YAGJ,UACI,CAAA,WACA,CAAA,0BACA,CAAA,oBACA,CAAA,mBAEA,eACI,CAAA,yBAGJ,eACI,CAAA,gBAGJ,iBACI,CAAA,MACA,CAAA,OACA,CAAA,KACA,CAAA,QACA,CAAA,UACA,CAAA,WACA,CAAA,mBAEA,CAAA,kBAGJ,iBACI,CAAA,MAIR,oBACI,CAAA,kBACA,CAAA,2CACA,CAAA,wBAEA,CAAA,kBACA,CAAA,aAEA,2BACI,CAAA,wBACA,CAAA,YAGJ,YACI,CAAA,6BACA,CAAA,cAGJ,oBACI,CAAA,wBACA,CAAA,WAEA,CAAA,YACA,CAAA,iBACA,CAAA,+BACA,CAAA,2BACA,CAAA,oBAEA,wBACI,CAAA,WACA,CAAA,cAIR,oBACI,CAAA,uBACA,CAAA,sBAEA,kBACI,CAAA,iBACA,CAAA,qBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,QACA,CAAA,eAIR,oBACI,CAAA,uBACA,CAAA,gBACA,CAAA,uBAEA,gBACI,CAAA,mBACA,CAAA,uBAGJ,aACI,CAAA,iBACA,CAAA,cACA,CAAA,QACA,CAAA,gBAIR,uBACI,CAAA,oBACA,CAAA,aACA,CAAA,cACA,CAAA,YAEA,CAAA,qBACA,CAAA,6BACA,CAAA,eAGJ,2BACI,CAAA,sBAEA,wBACI,CAAA,qBAKZ,8BACI,CAAA,oBACA,CAAA,8BACA,CAAA,yBACA,CAAA,6BAGJ,wBACI,CAAA,8BAGJ,8CA5fiB,CAAA,gBAggBjB,cACI,CAAA,wBAGJ,oBACI,CAAA,SACA,CAAA,UACA,CAAA,iBACA,CAAA,gBACA,CAAA,sBACA,CAAA,qCACA,CAAA,mCAGJ,SACI,CAAA,oBACA,CAAA,iCAGJ,uBACI,CAAA,wBAGJ,eACI,CAAA,eACA,CAAA,YACA,CAAA,iCAMJ,aACI,CAAA,eAIJ,QACI,CAAA,SACA,CAAA,UACA,CAAA,4BAGJ,aACI,CAAA,QACA,CAAA,SACA,CAAA,UACA,CAAA,gBAGJ,aACI,CAAA,kBACA,CAAA,kBACA,CAAA,8BACA,CAAA,gCACA,CAAA,wBACA,CAAA,eAGJ,iBACI,CAAA,qBAEA,gBACI,CAAA,2BAEA,8BACI,CAAA,WACA,CAAA,YACA,CAAA,aAtkBA,CAAA,QAwkBA,CAAA,SACA,CAAA,gBACA,CAAA,UACA,CAAA,cACA,CAAA,8BAIR,8CA9kBa,CAAA,6BAklBb,2CACI,CAAA,uDACA,CAAA,kBAIR,iBACI,CAAA,wBAEA,wBACI,CAAA,iBAIR,WACI,CAAA,gCAGJ,WACI,CAAA,wBAIJ,qCACI,CAAA,wBACA,CAAA,WACA,CAAA,YACA,CAAA,iBACA,CAAA,WACA,CAAA,UAGJ,qCACI,CAAA,wBACA,CAAA,aAtnBQ,CAAA,YAwnBR,CAAA,SAGJ,wBACI,CAAA,wBACA,CAAA,aACA,CAAA,kBACA,CAAA,YACA,CAAA,cACA,CAAA,aACA,CAAA,aAEA,gBACI,CAAA,mBAEA,wBACI,CAAA,sBAGJ,8CAzoBS,CAAA,qBAspBjB,kBACI,CAAA,iBACA,CAAA,uBACA,CAAA,WACA,CAAA,YACA,CAAA,uEACA,CAAA,+BAEA,CAAA,mBACA,CAAA,4BAGJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,scACA,CAAA,kEAqBJ,mBAEI,CAAA,mCAGJ,UACI,CAAA,WACA,CAAA,sEACA,CAAA,kCAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,oBACA,CAAA,sEACA,CAAA,0CAGJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,kCAOJ,iBACI,CAAA,oBACA,CAAA,WACA,CAAA,YACA,CAAA,gDACA,CAAA,yDACA,CAAA,mEAGJ,mBAEI,CAAA,6BAGJ,UACI,CAAA,WACA,CAAA,qCAGJ,WACI,CAAA,aACA,CAAA,UACA,CAAA,UACA,CAAA,WACA,CAAA,kDACA,CAAA,mDACA,CAAA,2BAGJ,SACI,CAAA,YACA,CAAA,oBACA,CAAA,gBACA,CAAA,ucACA,CAAA,mCAqBJ,kBACI,CAAA,UACA,CAAA,4BACA,CAAA,yBAQJ,iBACI,CAAA,yBACA,CAAA,UACA,CAAA,WACA,CAAA,kBACA,CAAA,WACA,CAAA,gDACA,CAAA,0bACA,CAAA,iCAqBJ,SACI,CAAA,UACA,CAAA,iBACA,CAAA,sCAIJ,UACI,CAAA,WACA,CAAA,qBACA,CAAA,kBACA,CAAA,WACA,CAAA,uBACA,CAAA,sDACA,CAAA,mGAGJ,UAEI,CAAA,WACA,CAAA,gCAGJ,mBACI,CAAA,kDAGJ,oBACI,CAAA,gDACA,CAAA,wEACA,CAAA,iDAGJ,6DACI,CAAA,qCAGJ,cACI,CAAA,iBACA,CAAA,gCAGJ,oBACI,CAAA,SACA,CAAA,iBACA,CAAA,wBACA,CAAA,YAEA,CAAA,kBACA,CAAA,gBACA,CAAA,iBACA",sourcesContent:["$textColor: #dadcdd;\n$backgroundColor: #262829;\n$highlightColor: #c3df8544;\n\n* {\n box-sizing: border-box;\n cursor: default;\n user-select: none;\n}\n\na {\n cursor: pointer;\n color: #c3df85;\n text-decoration: none;\n \n &:hover {\n color: #d7e6b9;\n text-decoration: underline;\n }\n}\n\n.beingDragged {\n opacity: 0.6;\n z-index: 1000 !important;\n}\n\nimg {\n pointer-events: none;\n}\n\nbody {\n background-color: $backgroundColor;\n color: $textColor;\n overflow: hidden;\n}\n\ninput {\n border: 1px solid #343738;\n background: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n padding: 0.3em 0.8em;\n outline: none;\n font-size: 1.2em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n}\n\n.MenuBar {\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n border-bottom: 1px solid lighten($backgroundColor, 20%);\n width: 100%;\n height: 2.5em;\n position: absolute;\n z-index: 50;\n top: 0;\n left: 0;\n\n .Icon {\n height: 100%;\n padding: 0.4em 1em;\n }\n \n .Menu {\n display: inline-block;\n padding: 0.6em 0.7em;\n height: 100%;\n vertical-align: top;\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n}\n\n.MenuContent {\n display: none;\n position: absolute;\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n left: 0;\n top: 2.5em;\n min-width: 6em;\n min-height: 0.5em;\n z-index: 1000;\n \n & > .entry {\n padding: 0.5em 2em;\n\n &.submenu:after {\n content: '›';\n display: inline-block;\n position: absolute;\n right: 0;\n margin-right: 0.5em;\n }\n \n &:hover {\n background-color: $backgroundColor;\n }\n } \n\n & > .entry.disabled {\n color: darken($textColor, 35%);\n \n &:hover {\n background-color: lighten($backgroundColor, 5%);\n }\n }\n \n & > .separator {\n background-color: lighten($backgroundColor, 20%);\n border: 0.4em solid lighten($backgroundColor, 10%);\n height: 0.9em;\n }\n}\n\n\n.Modal {\n display: block;\n position: absolute;\n background-color: #00000077;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n}\n\n\nbutton::-moz-focus-inner {\n border: 0;\n}\n \nbutton, .button {\n background-color: darken($backgroundColor, 10%);\n outline: none;\n border-radius: 0;\n border: none;\n color: $textColor;\n padding: 0.5em 2em;\n font-size: 1em;\n margin-right: 0.2em;\n margin-bottom: 0.2em;\n \n &:focus {\n outline: none;\n }\n &:hover {\n background-color: darken($backgroundColor, 5%);\n }\n &:active {\n background-color: darken($backgroundColor, 8%);\n }\n}\n\n.Modal {\n background-color: #00000077;\n position: absolute;\n z-index: 52;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n \n .Dialog {\n z-index: 53;\n }\n}\n\n.text {\n white-space: pre-line;\n}\n\n.Dialog {\n min-width: 15em;\n max-width: 80vw;\n min-height: 5em;\n max-height: 80vh;\n}\n\n.Dialog, .DockPanel {\n position: absolute;\n z-index: 51;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n background-color: lighten($backgroundColor, 10%);\n box-shadow: 0 0 0.5em #00000077;\n\n .title {\n width: 100%;\n text-align: center;\n padding: 0.5em;\n background-color: lighten($backgroundColor, 20%);\n border-bottom: 1px solid lighten($backgroundColor, 30%);\n\n .closeButton {\n padding: 0.2em;\n width: 2em;\n height: 2em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: lighten($backgroundColor, 5%);\n \n &:hover {\n background-color: lighten($backgroundColor, 10%);\n }\n }\n }\n\n .content {\n padding: 0.8em 1.5em;\n position: absolute;\n }\n\n .content.w3term {\n height: 100%;\n }\n\n .buttons {\n padding: 0.8em 1.5em;\n text-align: center;\n }\n}\n\n.Dialog .content,\n.Dialog .Panel.content {\n position: static;\n padding: 0.8em 1.5em;\n}\n\n.InputDialog input {\n width: 100%;\n}\n\n.Label {\n user-select: text;\n}\n\n.DockContainer {\n & > * {\n overflow: hidden;\n position: absolute;\n }\n\n \n &.horizontal > * {\n // border: 1px solid #00ffff;\n // background-color: #00ffff66;\n display: inline-block;\n\n &.DockSeparator {\n width: 3px;\n height: 100%;\n background-color: darken($backgroundColor, 10%); \n cursor: ew-resize;\n }\n }\n \n &.vertical > * {\n // border: 1px solid #ffff00;\n // background-color: #ffff0066;\n display: block;\n clear: both;\n \n &.DockSeparator {\n width: 100%;\n height: 3px;\n background-color: darken($backgroundColor, 10%); \n cursor: ns-resize;\n }\n }\n \n & > .DockSeparator:hover {\n background-color: darken($backgroundColor, 5%);\n }\n}\n\n.DockPanel {\n transform: none;\n max-width: none;\n max-height: none;\n background-color: $backgroundColor;\n .title {\n text-align: left;\n padding: 0.1em 0.5em;\n font-size: 0.9em;\n background-color: darken($backgroundColor, 5%);\n border-bottom: 1px solid darken($backgroundColor, 8%);\n\n .closeButton {\n padding: 0;\n width: 1.6em;\n height: 1.6em;\n float: right;\n margin-top: -0.15em;\n margin-right: -0.15em;\n background-color: darken($backgroundColor, 5%);\n \n &:hover {\n background-color: $backgroundColor;\n }\n }\n }\n\n .content {\n width: 100%;\n height: calc(100% - 1.5em);\n overflow: auto;\n }\n\n &.resizingHorizontally {\n cursor: ew-resize;\n }\n &.resizingVertically {\n cursor: ns-resize;\n }\n &.resizingHorizontally.resizingVertically {\n cursor: nwse-resize;\n }\n\n .resizeEW,\n .resizeNS,\n .resizeDiag {\n display: none;\n }\n &.floating {\n .resizeEW {\n display: block;\n width: 0.3em;\n top: 0;\n bottom: 0;\n background-color: transparent;\n cursor: ew-resize;\n position: absolute;\n right: 0;\n }\n .resizeNS {\n display: block;\n width: 100%;\n height: 0.3em;\n background-color: transparent;\n cursor: ns-resize;\n position: absolute;\n left: 0;\n bottom: 0;\n }\n .resizeDiag {\n display: block;\n width: 0.5em;\n height: 0.5em;\n background-color: transparent;\n cursor: nwse-resize;\n position: absolute;\n right: 0;\n bottom: 0;\n }\n }\n}\n\nbody > .DockContainer {\n position: absolute;\n z-index: 49;\n\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.dockOverlay {\n position: fixed;\n background-color: #33779999;\n z-index: 999;\n}\n\n.NodeEditor {\n width: 100%;\n height: 100%;\n overflow: hidden !important;\n padding: 0 !important;\n\n &.moving {\n cursor: grabbing;\n }\n\n &.beingDragged {\n cursor: grabbing;\n }\n\n svg {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n\n pointer-events: none;\n }\n \n .Node {\n position: absolute;\n }\n}\n\n.Node {\n display: inline-block;\n border-radius: 0.5em;\n box-shadow: 0 0 0.5em #00000077;\n \n background-color: darken($backgroundColor, 5%);\n white-space: nowrap;\n \n .title {\n border-radius: 0.5em 0.5em 0 0;\n background-color: lighten($backgroundColor, 5%);\n }\n\n .body {\n display: flex;\n justify-content: space-between;\n }\n\n .bullet {\n display: inline-block;\n background-color: lighten($backgroundColor, 10%);\n\n width: 1.2em;\n height: 1.2em;\n border-radius: 1em;\n border: 0.2em solid transparent;\n background-clip: padding-box;\n\n &:hover {\n background-color: lighten($backgroundColor, 25%);\n border: none;\n }\n }\n\n .inputs {\n display: inline-block;\n vertical-align: text-top;\n \n .bullet {\n margin-left: -0.5em;\n margin-right: 0.5em;\n }\n \n .input {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0;\n }\n }\n \n .outputs {\n display: inline-block;\n vertical-align: text-top;\n text-align: right;\n \n .bullet {\n margin-left: 0.5em;\n margin-right: -0.5em;\n }\n \n .output {\n display: block;\n position: relative;\n font-size: 0.7em;\n margin: 0;\n }\n }\n \n .contents {\n vertical-align: text-top;\n display: inline-block;\n min-width: 2em;\n min-height: 2em;\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n\n &.selected {\n box-shadow: 0 0 0.5em lighten($backgroundColor, 15%);\n\n .title {\n background-color: lighten($backgroundColor, 15%);\n }\n }\n}\n\n.TreeViewItem .label {\n background-color: transparent;\n display: inline-block;\n border: 1px solid transparent;\n -webkit-user-drag: element;\n}\n\n.TreeViewItem.focused > .label {\n border: 1px solid lighten($backgroundColor, 15%);\n}\n\n.TreeViewItem .label.selected {\n background-color: $highlightColor;\n}\n\n.TreeViewItem * {\n cursor: pointer;\n}\n\n.TreeViewItem > .expander {\n display: inline-block;\n opacity: 0;\n width: 0.3em;\n margin-right: 0.5em;\n font-weight: bold;\n transform: rotate(0deg);\n transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expandable > .expander {\n opacity: 1;\n display: inline-block;\n}\n\n.TreeViewItem.expanded > .expander {\n transform: rotate(90deg);\n}\n\n.TreeViewItem > .children {\n margin-left: 1em;\n overflow: hidden;\n display: none;\n // transform: scaleY(0); \n // transform-origin: top;\n // transition: transform 0.15s ease-in-out;\n}\n\n.TreeViewItem.expanded > .children {\n display: block;\n // transform: scaleY(1);\n}\n\n.Panel.content {\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView, .ListView.content {\n display: table;\n margin: 0;\n padding: 0;\n width: 100%;\n}\n\n.ListView .cell {\n font-size: 80%;\n display: table-cell;\n padding: 0.15em 0.6em;\n border-left: 0.2em solid $backgroundColor;\n border-bottom: 0.2em solid $backgroundColor;\n background-color: darken($backgroundColor, 3%);\n}\n\n.ListView .row {\n display: table-row;\n \n .cell {\n user-select: text;\n\n input {\n background-color: transparent;\n border: none;\n outline: none;\n color: $textColor;\n margin: 0;\n padding: 0;\n user-select: text;\n width: auto;\n display: inline;\n }\n }\n\n &.selected .cell {\n background-color: $highlightColor;\n }\n\n .cell.editing {\n background-color: darken($highlightColor, 50%);\n box-shadow: inset 0 0 0.1em $highlightColor;\n }\n}\n\n.ListView .header {\n display: table-row;\n\n .cell {\n background-color: lighten($backgroundColor, 5%);\n }\n}\n\n.NodeEditor path {\n stroke: #999999ff;\n}\n\n.NodeEditor path.notConnectable {\n stroke: #994444ff;\n}\n\n\n.NodeEditor .selectRect {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 30%);\n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 500;\n}\n\n.Dropdown {\n background-color: rgba(lighten($backgroundColor, 30%), .3);\n border: 1px solid lighten($backgroundColor, 20%);\n color: $textColor;\n outline: none;\n}\n\n.ListBox {\n border: 1px solid #343738;\n background-color: #1a1d1f;\n color: #cad2d4;\n border-radius: 0.1em;\n outline: none;\n font-size: 0.9em;\n overflow: auto;\n\n & > div {\n padding: 0.3em 1em;\n\n &:hover {\n background-color: lighten(#1a1d1f, 5%);\n }\n\n &.selected {\n background-color: $highlightColor;\n }\n }\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n\n\n.ColorPicker .handle {\n border-radius: 100%;\n position:relative;\n border: 0.05em solid #222;\n width: 1.2em;\n height: 1.2em;\n box-shadow: 0.03em 0.03em 0.3em #00000044,\n inset 0 0 0.5em white;\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n.PaintStyleColorPicker > .hue {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to right,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.PaintStyleColorPicker > .hue *,\n.PaintStyleColorPicker > .lightness * {\n pointer-events: none;\n}\n\n.PaintStyleColorPicker .saturation {\n width: 100%;\n height: 100%;\n background: linear-gradient(to bottom, transparent, hsl(0, 0%, 50%));\n}\n\n.PaintStyleColorPicker .lightness {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background-color: red;\n background-image: linear-gradient(to bottom, white, transparent, black);\n}\n\n.PaintStyleColorPicker .lightness > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.GimpStyleColorPicker > .saturation {\n position: relative;\n display: inline-block;\n width: 400px;\n height: 400px;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: linear-gradient(to bottom, transparent, black);\n}\n\n.GimpStyleColorPicker > .saturation *,\n.GimpStyleColorPicker > .value * {\n pointer-events: none;\n}\n\n.GimpStyleColorPicker .value {\n width: 100%;\n height: 100%;\n}\n\n.GimpStyleColorPicker .value::before {\n content: ' ';\n display: block;\n float: left;\n width: 100%;\n height: 100%;\n mask: linear-gradient(to right, white, transparent);\n background: linear-gradient(to bottom, white, black);\n}\n\n.GimpStyleColorPicker .hue {\n width: 2em;\n height: 400px;\n display: inline-block;\n margin-left: 0.5em;\n background: linear-gradient(to bottom,\n hsl(0, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(90, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(359, 100%, 50%)\n );\n}\n\n.GimpStyleColorPicker .hue > .handle {\n border-radius: 0.2em;\n width: 100%;\n transform: translate(0, -50%);\n}\n\n\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n/* --------------------------------------------------------- */\n\n.WheelColorPicker > .wheel {\n position: relative;\n border: 0.5em solid #090909;\n width: 25em;\n height: 25em;\n border-radius: 100%;\n padding: 3em;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background: conic-gradient(\n hsl(90, 100%, 50%),\n hsl(67.5, 100%, 50%),\n hsl(45, 100%, 50%),\n hsl(22.5, 100%, 50%),\n hsl(0, 100%, 50%),\n hsl(337.5, 100%, 50%),\n hsl(315, 100%, 50%),\n hsl(292.5, 100%, 50%),\n hsl(270, 100%, 50%),\n hsl(247.5, 100%, 50%),\n hsl(225, 100%, 50%),\n hsl(202.5, 100%, 50%),\n hsl(180, 100%, 50%),\n hsl(157.5, 100%, 50%),\n hsl(135, 100%, 50%),\n hsl(112.5, 100%, 50%),\n hsl(89, 100%, 50%)\n );\n}\n\n.WheelColorPicker > .wheel >.handle {\n width: 3em;\n height: 3em;\n position: absolute;\n}\n\n\n.WheelColorPicker > .wheel > .innerCircle {\n width: 100%;\n height: 100%;\n background-color: #222;\n border-radius: 100%;\n padding: 18%;\n transform: rotate(45deg);\n box-shadow: inset 0.5em 0.5em 1em #00000088;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation,\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n width: 100%;\n height: 100%;\n}\n\n.WheelColorPicker > .saturation * {\n pointer-events: none;\n}\n\n.WheelColorPicker > .wheel > .innerCircle .saturation {\n background-color: red;\n box-shadow: 0.5em 0.5em 1em #00000088;\n background-image: linear-gradient(45deg, hsl(0, 0%, 50%), transparent);\n}\n\n.WheelColorPicker > .wheel > .innerCircle .lightness {\n background: linear-gradient(135deg, white, transparent, black);\n}\n\n.ColorPickerDialog .WheelColorPicker {\n margin-top: 1em;\n margin-bottom: 1em;\n}\n\n.ColorPickerDialog .ColorOutput {\n display: inline-block;\n width: 3em;\n padding: .3em .8em;\n border: 1px solid #343738;\n\n height: 2.4em;\n vertical-align: top;\n margin-top: 0.05em;\n margin-right: 0.4em;\n}"],sourceRoot:""}]);const s=l},56:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var r={},l=[],s=0;s<e.length;s++){var a=e[s],c=o.base?a[0]+o.base:a[0],d=r[c]||0,h="".concat(c," ").concat(d);r[c]=d+1;var u=n(h),A={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==u)t[u].references++,t[u].updater(A);else{var p=i(A,o);o.byIndex=s,t.splice(s,0,{identifier:h,updater:p,references:1})}l.push(h)}return l}function i(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var l=0;l<r.length;l++){var s=n(r[l]);t[s].references--}for(var a=o(e,i),c=0;c<r.length;c++){var d=n(r[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}r=a}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var s=0;s<this.length;s++){var a=this[s][0];null!=a&&(l[a]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);o&&l[d[0]]||(void 0!==r&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},354:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */"),l=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(l).concat([r]).join("\n")}return[t].join("\n")}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},659:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},825:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,i&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};n.r(o),n.d(o,{AbstractColorPicker:()=>T,Button:()=>Y,ClipboardData:()=>He,Color:()=>x,ColorModificationMode:()=>f,ColorPickerDialog:()=>F,DEGREES_TO_RAD:()=>y,Dialog:()=>H,DockContainer:()=>Ee,DockDirection:()=>N,DockPanel:()=>Be,Dropdown:()=>$,FakeClipboard:()=>ze,FloatListViewColumn:()=>ne,GimpStyleColorPicker:()=>j,Image:()=>fe,InputDialog:()=>Me,IntListViewColumn:()=>te,Label:()=>ge,ListBox:()=>X,ListView:()=>oe,ListViewColumn:()=>Z,Menu:()=>ue,MenuBar:()=>pe,MessageDialog:()=>Se,MessageDialogButton:()=>De,Node:()=>Ke,NodeClipboardData:()=>Fe,NodeConnection:()=>Ue,NodeEditor:()=>Ye,NodePort:()=>$e,OkMessageDialog:()=>Oe,Orientation:()=>L,PaintStyleColorPicker:()=>V,Panel:()=>M,RAD_TO_DEGREES:()=>_,ROOT:()=>R,StringListBox:()=>q,StringListViewColumn:()=>ee,TreeView:()=>re,TreeViewItem:()=>le,UdoableActionCategory:()=>Ie,UndoHistory:()=>Ne,UndoableCommand:()=>Le,Vector2:()=>v,WheelColorPicker:()=>G,Widget:()=>E,currentMousePos:()=>I,fakeClipboard:()=>We,rectContains:()=>b});var i=n(72),r=n.n(i),l=n(825),s=n.n(l),a=n(659),c=n.n(a),d=n(56),h=n.n(d),u=n(540),A=n.n(u),p=n(113),m=n.n(p),g=n(11),C={};C.styleTagTransform=m(),C.setAttributes=h(),C.insert=c().bind(null,"head"),C.domAPI=s(),C.insertStyleElement=A(),r()(g.A,C),g.A&&g.A.locals&&g.A.locals;var f,_=180/Math.PI,y=Math.PI/180,v=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.getAngleToOtherInRadians=function(e){return Math.acos(Math.max(Math.min(this.getScalarProduct(e)/(this.getLength()*e.getLength()),1),-1))},e.prototype.getAngleToOtherInDegrees=function(e){return this.getAngleToOtherInRadians(e)*_},e.prototype.getRotatedInRadians=function(t){var n=Math.cos(t),o=Math.sin(t);return new e(this.x*n-this.y*o,this.x*o+this.y*n)},e.prototype.getRotatedInDegrees=function(e){return this.getRotatedInRadians(e*y)},e.prototype.rotateInRadians=function(e){var t=Math.cos(e),n=Math.sin(e),o=this.x*t-this.y*n,i=this.x*n+this.y*t;this.x=o,this.y=i},e.prototype.rotateInDegrees=function(e){this.rotateInRadians(e*y)},e.prototype.getScalarProduct=function(e){return this.x*e.x+this.y*e.y},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.getScaled=function(t){return new e(this.x*t,this.y*t)},e.prototype.getLength=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.normalize=function(){var e=this.getLength();this.x=this.x/e,this.y=this.y/e},e.prototype.getNormalized=function(){var t=this.getLength();return new e(this.x/t,this.y/t)},e.prototype.setLength=function(e){this.normalize(),this.scale(e)},e.prototype.getWithLength=function(e){var t=this.getNormalized();return t.scale(e),t},e}();function b(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}function w(e,t){return(e%t+t)%t}!function(e){e[e.Percentage=0]="Percentage",e[e.FixedAmount=1]="FixedAmount"}(f||(f={}));var k=new RegExp(/^#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/),x=function(){function e(e,t,n){this.setRgb(e||0,t||0,n||0)}return e.fromRgb=function(t,n,o){return new e(t,n,o)},e.fromHsl=function(t,n,o){var i=e._hslToRgb(t,n,o),r=e.fromRgbObject(i);return r._hueInfo=t,r},e.fromHsv=function(t,n,o){var i=e._hsvToRgb(t,n,o),r=e.fromRgbObject(i);return r._hueInfo=t,r},e.fromHex=function(t){var n=e._hexToRgb(t);return n?e.fromRgbObject(n):null},e._hexToRgb=function(e){var t=e.match(k);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},e._hslToRgb=function(e,t,n){e=w(e,360);var o,i,r,l=(1-Math.abs(2*n-1))*t,s=l*(1-Math.abs(w(e/60,2)-1)),a=n-l/2;return e>=0&&e<60?(o=l,i=s,r=0):e>=60&&e<120?(o=s,i=l,r=0):e>=120&&e<180?(o=0,i=l,r=s):e>=180&&e<240?(o=0,i=s,r=l):e>=240&&e<300?(o=s,i=0,r=l):e>=300&&e<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},e._hsvToRgb=function(e,t,n){e=w(e,360);var o,i,r,l=n*t,s=l*(1-Math.abs(w(e/60,2)-1)),a=n-l;return e>=0&&e<60?(o=l,i=s,r=0):e>=60&&e<120?(o=s,i=l,r=0):e>=120&&e<180?(o=0,i=l,r=s):e>=180&&e<240?(o=0,i=s,r=l):e>=240&&e<300?(o=s,i=0,r=l):e>=300&&e<360&&(o=l,i=0,r=s),{r:Math.round(255*(o+a)),g:Math.round(255*(i+a)),b:Math.round(255*(r+a))}},e.fromRgbObject=function(t){return e.fromRgb(t.r,t.g,t.b)},e.fromHslObject=function(t){return e.fromHsl(t.h,t.s,t.l)},e.fromHsvObject=function(t){return e.fromHsv(t.h,t.s,t.v)},e.prototype.setRgb=function(e,t,n){this._r=Math.max(Math.min(Math.round(e),255),0),this._g=Math.max(Math.min(Math.round(t),255),0),this._b=Math.max(Math.min(Math.round(n),255),0)},e.prototype.setHsl=function(t,n,o){var i=e._hslToRgb(t,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=t},e.prototype.setHsv=function(t,n,o){var i=e._hsvToRgb(t,n,o);this._r=i.r,this._g=i.g,this._b=i.b,this._hueInfo=t},e.prototype.setHex=function(t){var n=e._hexToRgb(t);this._r=n.r,this._g=n.g,this._b=n.b},e.prototype.setRgbObject=function(e){this.setRgb(e.r,e.g,e.b)},e.prototype.setHslObject=function(e){this.setHsl(e.h,e.s,e.l)},e.prototype.setHsvObject=function(e){this.setHsv(e.h,e.s,e.v)},e.prototype.getHsl=function(){var e,t=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(t,n,o),r=Math.min(t,n,o),l=i-r;0==l?e=0:i==t?e=60*w((n-o)/l,6):i==n?e=60*((o-t)/l+2):i==o&&(e=60*((t-n)/l+4));var s=(i+r)/2,a=0==l?0:l/(1-Math.abs(2*s-1));return{h:0==e&&this._hueInfo?this._hueInfo:e,s:a,l:s}},e.prototype.getHsv=function(){var e,t=this._r/255,n=this._g/255,o=this._b/255,i=Math.max(t,n,o),r=i-Math.min(t,n,o);0==r?e=0:i==t?e=60*w((n-o)/r,6):i==n?e=60*((o-t)/r+2):i==o&&(e=60*((t-n)/r+4));var l=0==r?0:r/i,s=i;return{h:0==e&&this._hueInfo?this._hueInfo:e,s:l,v:s}},e.prototype.getRgb=function(){return{r:this._r,g:this._g,b:this._b}},e.prototype.getHex=function(){var e=this._r.toString(16).padStart(2,"0"),t=this._g.toString(16).padStart(2,"0"),n=this._b.toString(16).padStart(2,"0");return"#".concat(e).concat(t).concat(n)},e.prototype.lighten=function(e,t){var n=this.getHsl();t==f.FixedAmount?n.l=Math.max(0,Math.min(n.l+e,1)):n.l=Math.max(0,Math.min(n.l*(e+1),1)),this.setHslObject(n)},e.prototype.darken=function(e,t){var n=this.getHsl();t==f.FixedAmount?n.l=Math.max(0,Math.min(n.l-e,1)):n.l=Math.max(0,Math.min(n.l*(1-e),1)),this.setHslObject(n)},e.prototype.saturate=function(e,t){var n=this.getHsl();t==f.FixedAmount?n.s=Math.max(0,Math.min(n.s+e,1)):n.s=Math.max(0,Math.min(n.s*(e+1),1)),this.setHslObject(n)},e.prototype.desaturate=function(e,t){var n=this.getHsl();t==f.FixedAmount?n.s=Math.max(0,Math.min(n.s+e,1)):n.s=Math.max(0,Math.min(n.s*(1-e),1)),this.setHslObject(n)},e.prototype.setSaturation=function(e){e=Math.min(Math.max(e,0),1);var t=this.getHsl();t.s=e,this.setHslObject(t)},e.prototype.rotateHue=function(e){var t=this.getHsl();t.h=w(t.h+e,360),this.setHslObject(t)},e.prototype.invert=function(){this._r=255-this._r,this._g=255-this._g,this._b=255-this._b,this._hueInfo&&(this._hueInfo=w(this._hueInfo+180,360))},e.prototype.getInverted=function(){return e.fromRgb(255-this._r,255-this._g,255-this._b)},e.prototype.getComplement=function(){var t=e.fromRgb(this._r,this._g,this._b);return t.rotateHue(180),t},e.prototype.getBlended=function(t,n){var o=1-(n=Math.max(Math.min(n,1),0));return e.fromRgb(Math.round(this._r*o+t._r*n),Math.round(this._g*o+t._g*n),Math.round(this._b*o+t._b*n))},e}(),E=function(){function e(e){this.element=e||document.createElement("div"),this.element.classList.add("Widget"),this.parentWidget=null}return e.prototype.onDragStart=function(e){return this.element.classList.add("beingDragged"),!0},e.prototype.onDragEnd=function(e){this.element.classList.remove("beingDragged")},e.prototype.onDragging=function(e){this.element.style.left=e.posWithOffsetToParentConsidered.x+"px",this.element.style.top=e.posWithOffsetToParentConsidered.y+"px"},e.prototype.onAttached=function(){},e.prototype.isAttached=function(){return document.body.contains(this.element)},e.prototype.onResize=function(){},e}(),B=new function(){this.element=null,this.offsetX=0,this.offsetY=0,this.dragStartY=0,this.dragStartX=0}(null,0,0,0,0),I={x:-1,y:-1};function P(e,t){return function(n){if((!t||t(e,n))&&(t||!e.onDragStart||e.onDragStart(n))){var o=e.element.getBoundingClientRect();B.offsetX=n.clientX-o.left,B.offsetY=n.clientY-o.top,B.dragStartX=n.clientY,B.dragStartY=n.clientY,B.draggable=e,B.element=e.element,n.stopPropagation()}}}var D=function(e,t,n,o){this.element=e,this.onDragStart=t,this.onDragging=n,this.onDragEnd=o};window.addEventListener("mouseup",(function(e){B&&B.draggable&&(B.draggable.onDragEnd(e),B.draggable=null)}),!0),window.addEventListener("mousemove",(function(e){if(null!=B.draggable){var t=B.element.getBoundingClientRect(),n={mouseEvent:e,rect:t,posWithOffsetToParentConsidered:new v(e.clientX-B.offsetX,e.clientY-B.offsetY),posRelativeToElement:new v(e.clientX-t.x,e.clientY-t.y),posRelativeToDragStart:new v(e.clientX-B.dragStartX,e.clientY-B.dragStartY)};B.draggable.onDragging(n)}I.x=e.clientX,I.y=e.clientY}),!0);var S,O=(S=function(e,t){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},S(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),M=function(e){function t(){var t=e.call(this)||this;return t.element.classList.add("Panel"),t.children=[],t}return O(t,e),t.prototype.prependChild=function(e){e.parentWidget=this,this.element.prepend(e.element),this.children.unshift(e),this.isAttached()&&e.onAttached()},t.prototype.appendChild=function(e){e.parentWidget=this,this.element.appendChild(e.element),this.children.push(e),this.isAttached()&&e.onAttached()},t.prototype.removeChild=function(e){e.parentWidget=null,this.element.removeChild(e.element);var t=this.children.indexOf(e);t>=0&&this.children.splice(t,1)},t.prototype.onAttached=function(){if(this.isAttached())for(var e=0,t=this.children;e<t.length;e++)t[e].onAttached()},t.prototype.onResize=function(){for(var e=0,t=this.children;e<t.length;e++)t[e].onResize()},t}(E),R=new M;R.element=document.body;var N,L,z=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),H=function(e){function t(t,n,o){var i=e.call(this)||this;if(i.element.classList.add("Dialog"),i.title=t,i.attachedElement=null,o=null==o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=t,i.titleElement.className="title",i.contentWidget=n,i.contentElement=n.element,i.contentElement.classList.add("content"),o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(e){i.hide()}}return i.modalElement=document.createElement("div"),i.modalElement.className="Modal",i.element.appendChild(i.titleElement),i.element.appendChild(i.contentElement),i.titleElement.addEventListener("mousedown",P(i)),i}return z(t,e),t.prototype.onAttached=function(){this.isAttached()&&this.contentWidget.onAttached()},t.prototype.show=function(){this.attachedElement=this.element,R.element.appendChild(this.element),this.onAttached()},t.prototype.hide=function(){null!=this.attachedElement&&(R.element.removeChild(this.attachedElement),this.attachedElement=null)},t.prototype.showModal=function(){this.attachedElement=this.modalElement,this.modalElement.appendChild(this.element),R.element.appendChild(this.modalElement),this.onAttached()},t.prototype.isShown=function(){return null!=this.attachedElement},t.prototype.onDragging=function(t){e.prototype.onDragging.call(this,t),this.element.style.transform="none"},t}(E),W=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),T=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("ColorPicker"),n._onColorChanged=t,n}return W(t,e),t.prototype.setColorProperty=function(e){var t=this._color;this._color=e,this._onColorChanged&&this._onColorChanged(t,e)},t.prototype.getColor=function(){return this._color},t}(E),V=function(e){function t(t,n){var o=e.call(this,n)||this;o.element.classList.add("PaintStyleColorPicker"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._colorHandle=document.createElement("div"),o._colorHandle.classList.add("handle"),o._lightnessHandle=document.createElement("div"),o._lightnessHandle.classList.add("handle"),o._hueDiv.appendChild(o._saturationDiv),o._saturationDiv.appendChild(o._colorHandle),o._lightnessDiv.appendChild(o._lightnessHandle),o.element.appendChild(o._hueDiv),o.element.appendChild(o._lightnessDiv);var i=new D(o._hueDiv,(function(e){return!0}),(function(e){o._onHueMove(e)}),(function(e){}));o._hueDiv.addEventListener("mousedown",P(i));var r=new D(o._lightnessDiv,(function(e){return!0}),(function(e){o._onLightnessMove(e)}),(function(e){}));return o._lightnessDiv.addEventListener("mousedown",P(r)),void 0===t&&(t=new x(255,0,0)),o.setColor(t),o}return W(t,e),t.prototype._onLightnessMove=function(e){this._lightnessHandle.style.top=Math.max(Math.min(e.posRelativeToElement.y,this._lightnessDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._onHueMove=function(e){var t=e.posRelativeToElement;this._colorHandle.style.left=Math.max(Math.min(t.x,this._hueDiv.clientWidth),0)+"px",this._colorHandle.style.top=Math.max(Math.min(t.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._getColorFromCurrentPositions=function(){var e=this._hueDiv.getBoundingClientRect(),t=this._lightnessDiv.getBoundingClientRect(),n=this._colorHandle.offsetLeft/e.width,o=1-this._colorHandle.offsetTop/e.height,i=1-this._lightnessHandle.offsetTop/t.height;return x.fromHsl(360*n,o,i)},t.prototype._setColorInternal=function(e,t){var n=e.getHsl(),o=n.h/360,i=n.s,r=n.l;if(t){var l=this._hueDiv.getBoundingClientRect(),s=this._lightnessDiv.getBoundingClientRect();this._colorHandle.style.left=(l.width*o).toFixed(2)+"px",this._colorHandle.style.top=(l.height-l.height*i).toFixed(2)+"px",this._lightnessHandle.style.top=(s.height-s.height*r).toFixed(2)+"px"}var a=x.fromHsl(n.h,n.s,.5);this._lightnessDiv.style.backgroundColor=a.getHex(),this.setColorProperty(e)},t.prototype.setColor=function(e){this._setColorInternal(e,!0)},t.prototype.onAttached=function(){this.setColor(this.getColor())},t}(T),j=function(e){function t(t,n){var o=e.call(this,n)||this;o.element.classList.add("GimpStyleColorPicker"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._valueDiv=document.createElement("div"),o._valueDiv.classList.add("value"),o._hueDiv=document.createElement("div"),o._hueDiv.classList.add("hue"),o._svHandle=document.createElement("div"),o._svHandle.classList.add("handle"),o._hueHandle=document.createElement("div"),o._hueHandle.classList.add("handle"),o._saturationDiv.appendChild(o._valueDiv),o._valueDiv.appendChild(o._svHandle),o._hueDiv.appendChild(o._hueHandle),o.element.appendChild(o._saturationDiv),o.element.appendChild(o._hueDiv);var i=new D(o._saturationDiv,(function(e){return!0}),(function(e){o._onSatValMove(e)}),(function(e){}));o._saturationDiv.addEventListener("mousedown",P(i));var r=new D(o._hueDiv,(function(e){return!0}),(function(e){o._onHueMove(e)}),(function(e){}));return o._hueDiv.addEventListener("mousedown",P(r)),void 0===t&&(t=new x(255,0,0)),o.setColor(t),o}return W(t,e),t.prototype._onHueMove=function(e){this._hueHandle.style.top=Math.max(Math.min(e.posRelativeToElement.y,this._hueDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._onSatValMove=function(e){var t=e.posRelativeToElement;this._svHandle.style.left=Math.max(Math.min(t.x,this._saturationDiv.clientWidth),0)+"px",this._svHandle.style.top=Math.max(Math.min(t.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._getColorFromCurrentPositions=function(){var e=this._saturationDiv.getBoundingClientRect(),t=this._hueDiv.getBoundingClientRect(),n=this._svHandle.offsetLeft/e.width,o=1-this._svHandle.offsetTop/e.height,i=this._hueHandle.offsetTop/t.height;return x.fromHsv(360*i,n,o)},t.prototype._setColorInternal=function(e,t){var n=e.getHsv(),o=n.h/360,i=n.s,r=n.v;if(t){var l=this._hueDiv.getBoundingClientRect(),s=this._valueDiv.getBoundingClientRect();this._svHandle.style.left=(l.width*i).toFixed(2)+"px",this._svHandle.style.top=(l.height-l.height*r).toFixed(2)+"px",this._hueHandle.style.top=(s.height*o).toFixed(2)+"px"}var a=x.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=a.getHex(),this.setColorProperty(e)},t.prototype.setColor=function(e){this._setColorInternal(e,!0)},t.prototype.onAttached=function(){this.setColor(this.getColor())},t}(T),G=function(e){function t(t,n){var o=e.call(this,n)||this;o._zeroHueVector=new v(1,0),o.element.classList.add("WheelColorPicker"),o._hueWheelDiv=document.createElement("div"),o._hueWheelDiv.classList.add("wheel"),o._wheelHandle=document.createElement("div"),o._wheelHandle.classList.add("handle"),o._slHandle=document.createElement("div"),o._slHandle.classList.add("handle"),o._innerCircleDiv=document.createElement("div"),o._innerCircleDiv.classList.add("innerCircle"),o._saturationDiv=document.createElement("div"),o._saturationDiv.classList.add("saturation"),o._lightnessDiv=document.createElement("div"),o._lightnessDiv.classList.add("lightness"),o._lightnessDiv.appendChild(o._slHandle),o._saturationDiv.appendChild(o._lightnessDiv),o._innerCircleDiv.appendChild(o._saturationDiv),o._hueWheelDiv.appendChild(o._wheelHandle),o._hueWheelDiv.appendChild(o._innerCircleDiv),o.element.appendChild(o._hueWheelDiv);var i=new D(o._saturationDiv,(function(e){return!0}),(function(e){o._onSatLitMove(e)}),(function(e){}));o._saturationDiv.addEventListener("mousedown",P(i));var r=new D(o._hueWheelDiv,(function(e){return!0}),(function(e){o._onHueMove(e)}),(function(e){}));return o._hueWheelDiv.addEventListener("mousedown",P(r)),void 0===t&&(t=new x(255,0,0)),o.setColor(t),o}return W(t,e),t.prototype._onHueMove=function(e){var t=this._hueWheelDiv.clientWidth/2,n=this._hueWheelDiv.clientHeight/2,o=this._wheelHandle.getBoundingClientRect(),i=new v(e.posRelativeToElement.x-t,e.posRelativeToElement.y-n);i.setLength(this._hueWheelDiv.clientWidth/2-o.width/2),this._wheelHandle.style.left=t+i.x+"px",this._wheelHandle.style.top=n+i.y+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._onSatLitMove=function(e){var t=this._innerCircleDiv.getBoundingClientRect(),n=e.posRelativeToElement,o=e.rect.x-t.x;n.x-=(t.width-o-o)/2,n.rotateInDegrees(-45),this._slHandle.style.left=Math.max(Math.min(n.x,this._saturationDiv.clientWidth),0)+"px",this._slHandle.style.top=Math.max(Math.min(n.y,this._saturationDiv.clientHeight),0)+"px",this._setColorInternal(this._getColorFromCurrentPositions(),!1)},t.prototype._getColorFromCurrentPositions=function(){var e=this._saturationDiv.getBoundingClientRect(),t=this._slHandle.getBoundingClientRect(),n=this._wheelHandle.getBoundingClientRect(),o=t.x+t.width/2-e.x,i=1-(t.y+t.height/2-e.y)/e.height,r=e.width*(i<.5?2*i:2*(1-i)),l=(o-(e.width/2-r/2))/r,s=this._hueWheelDiv.clientWidth,a=s/2,c=this._hueWheelDiv.clientHeight/2,d=new v(this._wheelHandle.offsetLeft+n.width/2-a,this._wheelHandle.offsetTop+n.height/2-c);d.setLength(s/2-n.width/2);var h=this._zeroHueVector.getAngleToOtherInDegrees(d);return d.y>0&&(h=360-h),x.fromHsl(h,l,i)},t.prototype._setColorInternal=function(e,t){var n=e.getHsl(),o=n.s,i=n.l;if(t){var r=this._saturationDiv.getBoundingClientRect(),l=this._innerCircleDiv.getBoundingClientRect(),s=r.width*(i<.5?2*i:2*(1-i)),a=new v(r.width/2+s*o-s/2,r.height-r.height*i),c=r.x-l.x;a.x-=(l.width-c-c)/2,a.rotateInDegrees(-45),this._slHandle.style.left=a.x.toFixed(2)+"px",this._slHandle.style.top=a.y.toFixed(2)+"px";var d=this._wheelHandle.getBoundingClientRect(),h=this._hueWheelDiv.clientWidth,u=h/2,A=this._hueWheelDiv.clientHeight/2,p=this._zeroHueVector.getRotatedInDegrees(-n.h);p.setLength(h/2-d.width/2),this._wheelHandle.style.left=u+p.x+"px",this._wheelHandle.style.top=A+p.y+"px"}var m=x.fromHsv(n.h,1,1);this._saturationDiv.style.backgroundColor=m.getHex(),this.setColorProperty(e)},t.prototype.setColor=function(e){this._setColorInternal(e,!0)},t.prototype.onAttached=function(){this.setColor(this.getColor())},t}(T),F=function(e){function t(t,n,o,i,r){var l=this,s=new E,a=s.element;l=e.call(this,t,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l._divOutput=document.createElement("div"),l._divOutput.classList.add("ColorOutput"),l._textInput=document.createElement("input"),l.colorPicker=new G(o,(function(e,t){var n=t.getHex();l._textInput.value=n,l._divOutput.style.backgroundColor=n})),l._textInput.value=o.getHex(),l._textInput.onkeyup=function(){var e=x.fromHex(l._textInput.value);e&&l.colorPicker.setColor(e)};var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(e){var t=document.createElement("button");t.textContent=e.label,e.isCancel&&(l._cancelOption=t),e.isContinue&&(l._continueOption=t),t.onclick=function(t){l.hide(),e.callback&&e.callback(l)},d.appendChild(t)})),a.appendChild(c),a.appendChild(l.colorPicker.element),a.appendChild(l._divOutput),a.appendChild(l._textInput),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("ColorPickerDialog"),l._boundKeyEvent=null,l}return W(t,e),t.prototype.onAttached=function(){this.isAttached()&&this.colorPicker.onAttached()},t.prototype.getColor=function(){return this.colorPicker.getColor()},t.prototype.showModal=function(){var t=this;e.prototype.showModal.call(this),this._boundKeyEvent=function(e){"Escape"==e.key&&t._cancelOption?t._clickButton(t._cancelOption):"Enter"==e.key&&t._continueOption&&t._clickButton(t._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},t.prototype._clickButton=function(e){var t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});e.dispatchEvent(t)},t.prototype.hide=function(){e.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},t}(H),J=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Y=function(e){function t(t,n){var o=e.call(this,document.createElement("button"))||this;return o.element.classList.add("Button"),o.element.textContent=t,n&&(o.element.onclick=n),o}return J(t,e),t}(E),U=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$=function(e){function t(){var t=e.call(this,document.createElement("select"))||this;return t.element.classList.add("Dropdown"),t}return U(t,e),t.prototype.addOption=function(e,t){var n=document.createElement("option");n.textContent=e,n.value=t,this.element.appendChild(n)},t.prototype.removeOption=function(e){for(var t=0,n=Array.from(this.element.options);t<n.length;t++){var o=n[t];if(o.value==e)return void this.element.removeChild(o)}},t.prototype.getSelectedValue=function(){return this.element.value},t.prototype.setSelectedValue=function(e){this.element.value=e},t}(E),K=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),X=function(e){function t(t,n,o){var i=e.call(this)||this;return i.element.classList.add("ListBox"),i._toElementFunction=n||function(e){return e},i._selectedIndex=-1,t=t||[],i.setItems(t),i._onItemClick=o||function(e){},i}return K(t,e),t.prototype.clear=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this._items=[],this._selectedIndex=-1},t.prototype.setItems=function(e){this.clear();for(var t=0,n=e;t<n.length;t++){var o=n[t];this.addItem(o)}},t.prototype.getItemCount=function(){return this._items.length},t.prototype.addItem=function(e){var t=this;this._items.push(e);var n=this._toElementFunction(e);n.onclick=function(){t.selectItem(e),t._onItemClick(e,n)},this.element.appendChild(n)},t.prototype.removeItem=function(e){var t=this._items.indexOf(e);this.removeItemAtIndex(t)},t.prototype.removeItemAtIndex=function(e){e<0||(this._items.splice(e,1),this.element.childNodes[e].remove())},t.prototype.selectItem=function(e){var t=this._items.indexOf(e);this.selectItemAtIndex(t)},t.prototype.selectItemAtIndex=function(e){this._selectedIndex>=0&&this.element.children[this._selectedIndex].classList.remove("selected"),e>=0&&this.element.children[e].classList.add("selected"),this._selectedIndex=e},t.prototype.getSelectedItem=function(){return this._selectedIndex>=0?this._items[this._selectedIndex]:null},t.prototype.getItemAtIndex=function(e){return e>=0&&e<this._items.length?this._items[e]:null},t.prototype.getSelectedIndex=function(){return this._selectedIndex},t}(E),q=function(e){function t(t,n,o){return n=n||function(e){return""+e},e.call(this,t,(function(e){var t=document.createElement("div");return t.textContent=n(e),t}),o)||this}return K(t,e),t}(X),Q=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Z=function(){function e(e,t,n,o){this.name=e,this.isReadOnly=t,this.fromString=n,this.toString=o}return e.prototype.compare=function(e,t){return 0},e}(),ee=function(e){function t(t,n){return e.call(this,t,n,(function(e){return e}),(function(e){return e}))||this}return Q(t,e),t.prototype.compare=function(e,t){return(null==e?void 0:e.toLowerCase())>(null==t?void 0:t.toLowerCase())?1:(null==t?void 0:t.toLowerCase())>(null==e?void 0:e.toLowerCase())?-1:0},t}(Z),te=function(e){function t(t,n){return e.call(this,t,n,(function(e){return parseInt(e)}),(function(e){return""+e}))||this}return Q(t,e),t.prototype.compare=function(e,t){return e>t?1:t>e?-1:0},t}(Z),ne=function(e){function t(t,n){return e.call(this,t,n,(function(e){return parseFloat(e)}),(function(e){return""+e}))||this}return Q(t,e),t.prototype.compare=function(e,t){return e>t?1:t>e?-1:0},t}(Z),oe=function(e){function t(t,n,o,i){var r=e.call(this)||this;return r.element.classList.add("ListView"),r._columns=[],r._rows=[],r._htmlRows=[],r._cellValueChangedCallback=o,r._editValidationCallback=n,r._cellDoubleClickCallback=i,r._headerRow=document.createElement("div"),r._headerRow.className="header",r.element.appendChild(r._headerRow),t.forEach((function(e){r.addColumn(e)})),r}return Q(t,e),t.fromStringColumns=function(e,n,o,i,r){return new t(e.map((function(e){return new ee(e,n)})),o,i,r)},t.prototype.addStringColumn=function(e,t,n,o){return this.addColumn(new ee(e,!!t),n,o)},t.prototype.addColumn=function(e,t,n){if(!(e instanceof Z)){var o={name:"Argument Error",level:"Error",message:"The argument 'column' must contain an instance of ListViewColumn, got "+typeof e,toString:function(){return this.name+": "+this.message}};throw console.error(o),o}null==n&&(n=this._columns.length);var i=document.createElement("span");if(i.textContent=e.name,i.className="cell",n<0||n>=this._headerRow.children.length)this._headerRow.appendChild(i),this._columns.push(e);else{var r=this._headerRow.children.item(n);this._headerRow.insertBefore(i,r),this._columns.splice(n,0,e)}if(this.setColumnReadonly(e),t||(t=[]),t.length>this._rows.length)throw o={name:"Argument Error",level:"Error",message:"The argument 'columnValues' must not be longer than the total amount of rows ("+t.length+" elements were given for "+this._rows.length+")",toString:function(){return this.name+": "+this.message}},console.error(o),o;for(var l=0;l<this._rows.length;l++){var s=this._rows[l],a=this._htmlRows[l],c="";l<t.length&&(c=t[l]),s.splice(n,0,c),this._addCellToRow(s,a,n,c)}},t.prototype.removeColumn=function(e){this._columns.splice(e,1),this._headerRow.removeChild(this._headerRow.children[e]);for(var t=0;t<this._rows.length;t++)this._rows[t].splice(e,1),this._htmlRows[t].removeChild(this._htmlRows[t].children[e])},t.prototype.setColumnAtIndexReadonly=function(e,t){var n=this._columns[e];this.setColumnReadonly(n,t)},t.prototype.setColumnReadonly=function(e,t){var n=this,o=this._columns.indexOf(e);t=void 0!==t&&t,e.isReadOnly=t;var i=0;this._htmlRows.forEach((function(t){var r=Array.from(t.querySelectorAll(".cell"));o<r.length&&n._makeEditable(!e.isReadOnly,r[o],o,n._rows[i],e),i++}))},t.prototype.removeRow=function(e){this._rows.splice(e,1);var t=this.element.getElementsByClassName("row")[e];this.element.removeChild(t),this._htmlRows.splice(e,1)},t.prototype.clear=function(){this._rows=[],this._htmlRows=[];for(var e=0,t=Array.from(this.element.getElementsByClassName("row"));e<t.length;e++){var n=t[e];this.element.removeChild(n)}},t.prototype.sortByColumn=function(e){var t=this,n=this._columns[e],o=this._rows;o.sort((function(t,o){return n.compare(t[e],o[e])})),this.clear(),o.forEach((function(e){t.addRow(e)}))},t.prototype._makeEditable=function(e,t,n,o,i){var r=this;e?t.ondblclick=function(e){var l=t.textContent,s=t.textContent;t.textContent="",t.classList.add("editing");var a=document.createElement("input");a.type="text",a.value=s;var c=!1,d=function(e){var c=a.value;!e||r._editValidationCallback&&!r._editValidationCallback(l,c,o,i,r._rows.indexOf(o),n)?t.textContent=s:(t.removeChild(a),t.textContent=c,t.classList.remove("editing"),o[n]=i.fromString(c),r._cellValueChangedCallback&&r._cellValueChangedCallback(l,c,o,i,r._rows.indexOf(o),n)),t.classList.remove("editing"),t.contains(a)&&t.removeChild(a)};a.onblur=function(e){c||(c=!0,d(!0))},a.onkeyup=function(e){if("Escape"==e.key){if(c)return;c=!0,d(!1)}else if("Enter"==e.key){if(c)return;c=!0,d(!0)}},t.appendChild(a),a.selectionStart=a.selectionEnd=a.value.length,a.focus()}:this._cellDoubleClickCallback?t.ondblclick=function(e){return r._cellDoubleClickCallback(o,i,r._rows.indexOf(o),n)}:t.ondblclick=null},t.prototype._addCellToRow=function(e,t,n,o){var i=document.createElement("span"),r=this._columns[n];return i.textContent=r.toString(o),i.className="cell",this._makeEditable(!this._columns[n].isReadOnly,i,n,e,r),n>=t.children.length?t.appendChild(i):t.insertBefore(i,t.children.item(n)),i},t.prototype.addRow=function(e){var t=this,n=document.createElement("div");if(n.className="row",this.element.appendChild(n),e.length!=this._columns.length){var o={name:"Argument Error",level:"Error",message:"The argument 'row' must contain "+this._columns.length+" entries, but "+e.length+" were provided",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}var i=0;e.forEach((function(o){t._addCellToRow(e,n,i,o),i++})),this._rows.push(e),this._htmlRows.push(n),n.onclick=function(e){t.deselectRows(),n.classList.add("selected")},n.oncontextmenu=n.onclick,this.element.appendChild(n)},t.prototype.deselectRows=function(){for(var e=0;e<this._htmlRows.length;e++)this._htmlRows[e].classList.remove("selected")},t.prototype.selectRow=function(e){for(var t=0;t<this._htmlRows.length;t++)t==e?this._htmlRows[t].classList.add("selected"):this._htmlRows[t].classList.remove("selected")},t.prototype.getSelectedRowIndex=function(){for(var e=0;e<this._htmlRows.length;e++)if(this._htmlRows[e].classList.contains("selected"))return e;return-1},t.prototype.getSelectedRow=function(){var e=this.getSelectedRowIndex();return e>=0?this.getRow(e):null},t.prototype.getColumnCount=function(){return this._columns.length},t.prototype.getRowCount=function(){return this._rows.length},t.prototype.getColumns=function(){return this._columns},t.prototype.changeCellValue=function(e,t,n){Array.from(this._htmlRows[e].querySelectorAll(".cell"))[t].textContent=n,this._rows[e][t]=this._columns[t].fromString(n)},t.prototype.getRow=function(e){return this._rows[e]},t.prototype.getRows=function(){return this._rows},t.prototype.getColumn=function(e){return this._columns[e]},t.prototype.renameColumn=function(e,t){this.getColumn(e).name=t,this._headerRow.children[e].textContent=t},t.prototype.getColumnValues=function(e){return this._rows.map((function(t){return t[e]}))},t.prototype.setCellContent=function(e,t,n){var o=this._rows[e][t],i=this._rows[e],r=this._columns[t];i[t]=r.fromString(n),this._htmlRows[e].children[t].textContent=n,this._cellValueChangedCallback&&this._cellValueChangedCallback(o,n,i,r,e,t)},t.prototype.getCellContent=function(e,t){return this._rows[e][t]},t}(E),ie=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),re=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("TreeView"),n.items=[],n.clickHandler=t,n._focusedItem=null,n}return ie(t,e),t.prototype.addItem=function(e,t,n,o,i){var r=new le(e,t,n,o,i);return r.parentWidget=this,this.items.push(r),this.element.appendChild(r.element),r},t.prototype.removeItem=function(e){var t=this.items.indexOf(e);t>=0&&(this.items.splice(t,1),this.element.removeChild(e.element),e.parentWidget=null,this._focusedItem==e&&(this._focusedItem=null))},t.prototype.clear=function(){for(this.items=[],this.items.forEach((function(e){return e.parentWidget=null}));this.element.firstChild;)this.element.removeChild(this.element.firstChild)},t.prototype.getItems=function(){return this.items},t.prototype.deselectAll=function(){this.items.forEach((function(e){return e.deselect()}))},t.prototype.getSelectedItem=function(){for(var e=0;e<this.items.length;e++){var t=this.items[e]._getIfSelected();if(null!=t)return t}return null},t.prototype.getFocusedItem=function(){return this._focusedItem},t.prototype._sortFunction=function(e,t){return e.label.toLowerCase()>t.label.toLowerCase()?1:t.label.toLowerCase()>e.label.toLowerCase()?-1:0},t.prototype.sortItems=function(){var e=this,t=this.items.splice(0);for(t.sort(this._sortFunction),this.items=[];this.element.firstChild;)this.element.removeChild(this.element.firstChild);t.forEach((function(t){t.children.length>0&&t.sortChildren(),e.items.push(t),e.element.appendChild(t.element)}))},t}(E),le=function(e){function t(t,n,o,i,r){var l=e.call(this)||this;return l.element.classList.add("TreeViewItem"),l.children=[],l.label=t,l.expander=document.createElement("span"),l.expander.textContent="›",l.expander.classList.add("expander"),l.element.appendChild(l.expander),l.labelElement=document.createElement("span"),l.labelElement.textContent=t,l.labelElement.className="label",l.element.appendChild(l.labelElement),l.childrenElement=document.createElement("div"),l.childrenElement.classList.add("children"),l.element.appendChild(l.childrenElement),l.contextMenu=r,l.parentItem=null,l.data=n,l.labelElement.draggable=!0,l.labelElement.ondblclick=function(e){i?i(e,l):l.children.length>0&&l.element.classList.toggle("expanded"),e.stopPropagation()},l.expander.onclick=function(e){l.children.length>0&&l.element.classList.toggle("expanded"),e.stopPropagation()},l.labelElement.oncontextmenu=r?function(e){l.setFocus(!0),r.show(e.clientX,e.clientY),e.stopPropagation(),e.preventDefault()}:function(e){l.setFocus(!0),e.stopPropagation()},l.labelElement.onclick=function(e){var t=l.parentWidget.getSelectedItem();l.select(),o&&o(e,l,t),l.parentWidget.clickHandler&&l.parentWidget.clickHandler(e,l,t)},l}return ie(t,e),t.prototype.addChildItem=function(e){return e.parentItem=this,this.children.push(e),this.childrenElement.firstChild?this.childrenElement.insertBefore(e.element,this.childrenElement.firstChild):this.childrenElement.appendChild(e.element),this.element.classList.add("expanded"),this.element.classList.add("expandable"),e.parentWidget=this.parentWidget,e},t.prototype.addChild=function(e,n,o,i,r){var l=new t(e,n,o,i,r);return this.addChildItem(l)},t.prototype.removeChild=function(e){var t=this.children.indexOf(e);t>=0&&(e.setFocus(!1),this.childrenElement.removeChild(e.element),this.children.splice(t,1),e.parentWidget=null,e.parentItem=null,0==this.children.length&&(this.element.classList.remove("expanded"),this.element.classList.remove("expandable")))},t.prototype.sortChildren=function(){var e=this,t=this.children.splice(0);for(t.sort(this.parentWidget._sortFunction),this.children=[];this.childrenElement.firstChild;)this.childrenElement.removeChild(this.childrenElement.firstChild);t.forEach((function(t){t.children.length>0&&t.sortChildren(),e.children.push(t),e.childrenElement.appendChild(t.element)}))},t.prototype.deselect=function(){this.labelElement.classList.remove("selected"),this.children.forEach((function(e){e.deselect()}))},t.prototype.select=function(){this.parentWidget.deselectAll(),this.labelElement.classList.add("selected")},t.prototype.setFocus=function(e){e?(this.parentWidget._focusedItem&&this.parentWidget._focusedItem.setFocus(!1),this.parentWidget._focusedItem=this,this.element.classList.add("focused")):(this.element.classList.remove("focused"),this.contextMenu&&this.contextMenu.hide(),this.parentWidget&&this.parentWidget._focusedItem==this&&(this.parentWidget._focusedItem=null))},t.prototype._getIfSelected=function(){if(this.labelElement.classList.contains("selected"))return this;for(var e=0;e<this.children.length;e++){var t=this.children[e]._getIfSelected();if(null!=t)return t}return null},t}(E),se=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ae=function(e,t){this.name=e,this.element=t},ce=function(e){function t(t,n,o){var i=e.call(this,t,n)||this;return i.menu=o,i}return se(t,e),t}(ae),de=function(e){function t(t){return e.call(this,"-",t)||this}return se(t,e),t}(ae),he=function(e){function t(t,n,o,i){var r=e.call(this,t,n)||this;return r.clickCallback=o,r.canExecuteCallback=i,r}return se(t,e),t}(ae),ue=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("Menu"),n.name=t,n.element.textContent=t,n._submenus=[],n._menuEntries=[],n.menuEntryPanel=document.createElement("div"),n.menuEntryPanel.className="MenuContent",n._x=-1,n._y=-1,n.element.onmouseenter=function(){var e=n.getParentMenuBar();e&&null!=e.activeMenu&&(e.activeMenu.hide(),n.show())},n.element.onclick=function(){if(n.isShown())n.hide();else{var e=n.getParentMenuBar();e&&e.hideMenus(),n.show()}},document.addEventListener("click",(function(e){var t=null;e.target instanceof HTMLElement&&(t=e.target);var o=n.getParentMenu();n.menuEntryPanel.contains(t)||n.element.contains(t)||null!=o&&o.menuEntryPanel.contains(t)||!n.isShown()||n.hide()})),n}return se(t,e),t.prototype.getParentMenuBar=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("MenuBar")?this.parentWidget:null},t.prototype.getParentMenu=function(){return null!=this.parentWidget&&this.parentWidget.element.classList.contains("Menu")?this.parentWidget:null},t.prototype.isShown=function(){return this.menuEntryPanel.isConnected&&null!=this.menuEntryPanel.style.display&&""!=this.menuEntryPanel.style.display&&"none"!=this.menuEntryPanel.style.display},t.prototype.getPos=function(){var e=this.getParentMenu();if(e)return e.getPos();if(this.isShown()){var t=this.menuEntryPanel.getBoundingClientRect();return new v(t.left,t.top)}return new v(this._x,this._y)},t.prototype.show=function(e,t){for(var n=0;n<this.menuEntryPanel.children.length;n++)this._menuEntries[n]instanceof he&&(this._menuEntries[n].canExecuteCallback()?this.menuEntryPanel.children[n].classList.remove("disabled"):this.menuEntryPanel.children[n].classList.add("disabled"));if(null!=e&&null!=t)this.element.parentNode||document.body.appendChild(this.menuEntryPanel),this.menuEntryPanel.style.left=e+"px",this.menuEntryPanel.style.top=t+"px",this.menuEntryPanel.style.display="inline-block",this.menuEntryPanel.style.position="fixed";else{this.menuEntryPanel.style.left=this.element.getBoundingClientRect().left+"px",this.menuEntryPanel.style.display="inline-block";var o=this.getParentMenuBar();o&&(o.activeMenu=this)}var i=this.menuEntryPanel.getBoundingClientRect();this._x=i.left,this._y=i.top},t.prototype.hide=function(){this._submenus.forEach((function(e){return e.hide()}));var e=this.getParentMenuBar();e&&e.activeMenu==this&&(e.activeMenu=null),this.menuEntryPanel.parentElement==document.body?document.body.removeChild(this.menuEntryPanel):this.menuEntryPanel.style.display="none"},t.prototype.addEntry=function(e,t,n){var o=this,i=document.createElement("div");n=n||function(){return!0},i.className="entry",i.textContent=e,i.onclick=function(){o.hide(),t()},this.menuEntryPanel.appendChild(i),this._menuEntries.push(new he(e,i,t,n))},t.prototype.addSubMenu=function(e){var t=this;this._submenus.push(e);var n=document.createElement("div");n.className="entry submenu",n.textContent=e.name,n.onclick=function(){var o=n.getBoundingClientRect();t._submenus.forEach((function(e){return e.hide()})),e.show(Math.floor(o.left+o.width),o.y)},e.parentWidget=this,this.menuEntryPanel.appendChild(n),this._menuEntries.push(new ce(e.name,n,e))},t.prototype.addSeparator=function(){var e=document.createElement("div");e.className="separator",this.menuEntryPanel.appendChild(e),this._menuEntries.push(new de(e))},t.prototype.clearEntries=function(){for(this._submenus.forEach((function(e){e.parentWidget=null})),this._submenus=[];this.menuEntryPanel.firstChild;)this.menuEntryPanel.removeChild(this.menuEntryPanel.firstChild)},t}(E),Ae=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pe=function(e){function t(){var t=e.call(this)||this;return t.element.classList.add("MenuBar"),t.menus=[],t.activeMenu=null,t}return Ae(t,e),t.prototype.addMenu=function(e){if(!(e instanceof ue)){var t={name:"Argument Error",level:"Error",message:"The argument 'menu' must be of type Menu",toString:function(){return this.name+": "+this.message}};throw console.error(t),t}this.menus.push(e),this.element.appendChild(e.element),this.element.appendChild(e.menuEntryPanel),e.parentWidget=this},t.prototype.hideMenus=function(){this.activeMenu=null,this.menus.forEach((function(e){e.hide()}))},t}(E),me=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ge=function(e){function t(t){var n=e.call(this)||this;return n.element.classList.add("Label"),n.element.textContent=t,n}return me(t,e),t.prototype.setText=function(e){this.element.textContent=e},t.prototype.getText=function(){return this.element.textContent},t}(E),Ce=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fe=function(e){function t(t,n,o){var i=e.call(this,document.createElement("img"))||this;return i.element.classList.add("Image"),i.element.src=t,null!=n&&(i.element.style.width=n+"px"),null!=o&&(i.element.style.height=o+"px"),i}return Ce(t,e),t.prototype.setSource=function(e){this.element.src=e},t.prototype.getSource=function(){return this.element.src},t}(E),_e=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){e[e.Left=1]="Left",e[e.Right=2]="Right",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom",e[e.Inside=5]="Inside",e[e.Float=6]="Float"}(N||(N={})),function(e){e[e.Horizontal=1]="Horizontal",e[e.Vertical=2]="Vertical"}(L||(L={}));var ye=function(e){return e==N.Top||e==N.Bottom?L.Vertical:L.Horizontal},ve=function(){function e(){}return e.fromDockPanel=function(t){var n=new e;return n.dockPercentage=t._dockPercentage,n.identifier=t.identifier,n},e.fromDockContainer=function(t){var n=new e;return n.orientation=t.orientation,n.dockPercentage=t._dockPercentage,n.children=t.children.map((function(t){return t instanceof Ee?e.fromDockContainer(t):e.fromDockPanel(t)})),n},e}(),be=[],we=[],ke=function(e){function t(t,n,o){var i=e.call(this)||this;return i.element.classList.add("DockSeparator"),i.element.addEventListener("mousedown",P(i)),i.prev=t,i.next=n,i.parentWidget=o,i}return _e(t,e),t.prototype.onDragStart=function(e){return!0},t.prototype.onDragging=function(e){var t=this.parentWidget.orientation,n=t==L.Horizontal?e.mouseEvent.movementX:e.mouseEvent.movementY,o=t==L.Horizontal?this.prev.element.getBoundingClientRect().width:this.prev.element.getBoundingClientRect().height,i=t==L.Horizontal?this.next.element.getBoundingClientRect().width:this.next.element.getBoundingClientRect().height,r=o+n,l=i-n;r<80||l<80||(this.prev._dockPercentage*=r/o,this.next._dockPercentage*=l/i,this.parentWidget._layoutChildren())},t.prototype.onDragEnd=function(e){},t}(E),xe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._dockPercentage=-1,t.separatorBefore=null,t.separatorAfter=null,t}return _e(t,e),t}(E),Ee=function(e){function t(){var t=e.call(this)||this;return t.element.className="DockContainer",t._setOrientation(L.Horizontal),t.children=[],t}return _e(t,e),t.prototype.onAttached=function(){this.isAttached()&&be.push(this),this.children.forEach((function(e){e.onAttached()}))},t.prototype.getFloatingPanels=function(){return we.map((function(e){return{identifier:e.identifier,width:parseInt(e.element.style.width),height:parseInt(e.element.style.height),x:parseInt(e.element.style.left),y:parseInt(e.element.style.top)}}))},t.prototype.getDockPanelAtPoint=function(e,n){if(!b(this.element.getBoundingClientRect(),e,n))return null;for(var o=0,i=this.children;o<i.length;o++){var r=i[o];if(r instanceof Be&&b(r.element.getBoundingClientRect(),e,n))return r;if(r instanceof t){var l=r.getDockPanelAtPoint(e,n);if(null!=l)return l}}return null},t.prototype.getDockingStructure=function(){return ve.fromDockContainer(this)},t.prototype.setChildPercentages=function(e){if(e.length!=this.children.length)throw"This container has "+this.children.length+" child elements, but "+e.length+" percentages were given!";for(var t=0;t<e.length;t++)this.children[t]._dockPercentage=e[t];this._layoutChildren()},t.prototype._dockRelative=function(e,t,n,o){if(o=o||.5,!(e instanceof xe)){var i={name:"Argument Error",level:"Error",message:"The argument 'child' must be a Dockable object",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}if(!(t instanceof xe))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a Dockable object",toString:function(){return this.name+": "+this.message}},console.error(i),i;var r=this.children.indexOf(t),l=n?e:t,s=n?t:e,a=new ke(l,s,this);if(s.separatorBefore=a,l.separatorAfter=a,e._dockPercentage=t._dockPercentage*o,t._dockPercentage=t._dockPercentage*(1-o),!(r>=0))throw i={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be a child of a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(i),i;if(n)this.children.splice(r,0,e),this.element.insertBefore(e.element,t.element),this.element.insertBefore(a.element,t.element);else{this.children.splice(r+1,0,e);var c=t.element.nextSibling;c?(this.element.insertBefore(a.element,c),this.element.insertBefore(e.element,c)):(this.element.appendChild(a.element),this.element.appendChild(e.element))}e.parentWidget=this,e.element.classList.remove("floating"),e.onAttached(),this.onResize()},t.prototype._dock=function(e,t,n){if(n=n||(this.children.length>0?.5:1),t){if(this.children.length>0){var o=this.children[0],i=new ke(e,o,this);o.separatorBefore=i,e.separatorAfter=i,this.element.prepend(i.element)}e._dockPercentage=n,this.children.forEach((function(e){e._dockPercentage*=1-n})),this.children.unshift(e),this.element.prepend(e.element)}else this.children.length>0&&(o=this.children[this.children.length-1],i=new ke(o,e,this),o.separatorAfter=i,e.separatorBefore=i,this.element.appendChild(i.element)),e._dockPercentage=n,this.children.forEach((function(e){e._dockPercentage*=1-n})),this.children.push(e),this.element.appendChild(e.element);e.parentWidget=this,e.element.classList.remove("floating"),e.onAttached(),this.onResize()},t.prototype._setOrientation=function(e){this.orientation==L.Horizontal?this.element.classList.remove("horizontal"):this.element.classList.remove("vertical"),e==L.Horizontal?this.element.classList.add("horizontal"):this.element.classList.add("vertical"),this.orientation=e},t.prototype._wrapChildren=function(){var e=this,n=new t;n._setOrientation(this.orientation);var o=this.children.map((function(e){return e._dockPercentage}));o[0]=1;var i=this.children.slice(),r=0;i.forEach((function(t){e.undock(t),n.dock(t,n.orientation==L.Horizontal?N.Right:N.Bottom,o[r]),r++})),this._setOrientation(this.orientation==L.Horizontal?L.Vertical:L.Horizontal),this.children=[],this.dock(n,this.orientation==L.Horizontal?N.Left:N.Top)},t.prototype._subdivide=function(e,n){var o=new t;o._setOrientation(ye(n));var i=this.children.indexOf(e);if(i<0){var r={name:"Argument Error",level:"Error",message:"The argument 'relativeTo' must be inside this DockContainer",toString:function(){return this.name+": "+this.message}};throw console.error(r),r}return o._dockPercentage=e._dockPercentage,e._dockPercentage=1,e.separatorBefore&&(e.separatorBefore.next=o,e.separatorBefore=null),e.separatorAfter&&(e.separatorAfter.prev=o,e.separatorAfter=null),this.children.splice(i,1,o),this.element.insertBefore(o.element,e.element),this.element.removeChild(e.element),o.parentWidget=this,o.dock(e,n),o},t.prototype.dockRelativeTo=function(e,t,n,o){null!=o&&null!=o||(o=.5);var i=ye(n),r=this;if(this.orientation!=i&&(r=this._subdivide(t,n)),n==N.Inside)console.warn("Tabbed docks are not implemented yet!");else if(n==N.Float){var l={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(l),l}return r._dockRelative(e,t,n==N.Left||n==N.Top,o),this._layoutChildren(),e},t.prototype.dock=function(e,t,n){var o=ye(t);if(this.children.length<=1&&this._setOrientation(o),this.orientation!=o&&this._wrapChildren(),t==N.Inside)console.warn("Tabbed docks are not implemented yet!");else if(t==N.Float){var i={name:"Argument Error",level:"Error",message:"The argument 'dockDirection' must not be 'Float'. Use 'undock' method to make a child float.",toString:function(){return this.name+": "+this.message}};throw console.error(i),i}return this._dock(e,t==N.Left||t==N.Top,n),this._layoutChildren(),e},t.prototype.undock=function(e){var n=this.children.indexOf(e);if(n<0){var o={name:"Argument Error",level:"Error",message:"The argument 'child' must be inside a DockContainer in order to be undocked.",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}n>0?this.children[n-1]._dockPercentage+=e._dockPercentage:n+1<this.children.length&&(this.children[n+1]._dockPercentage+=e._dockPercentage),this.children.splice(n,1);var i=e.element.previousElementSibling,r=e.element.nextElementSibling;if(null!=i&&i.classList.contains("DockSeparator")?(this.element.removeChild(i),e.separatorBefore&&(e.separatorBefore.prev.separatorAfter=null)):null!=r&&r.classList.contains("DockSeparator")&&(this.element.removeChild(r),e.separatorAfter&&(e.separatorAfter.next.separatorBefore=null)),this.element.removeChild(e.element),null!=this.parentWidget&&this.parentWidget instanceof t&&0==this.children.length){this.parentWidget.undock(this);var l=be.indexOf(this);l>=0&&be.splice(l,1)}else this._layoutChildren();return e.parentWidget=null,e.element.classList.add("floating"),e},t.prototype._layoutChildren=function(e,n){var o=this.element.getBoundingClientRect(),i=0,r=0;null==e&&(e=o.width),null==n&&(n=o.height);var l=Array.from(this.element.children).filter((function(e){return e.classList.contains("DockSeparator")&&e instanceof HTMLElement})),s=0;0!=e&&0!=e&&(this.orientation==L.Horizontal?this.children.forEach((function(o){var a=Math.round((e-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=a+"px",o.element.style.height=n+"px",o instanceof t&&o._layoutChildren(a,n),s<l.length&&(l[s].style.left=i+a+"px",l[s].style.top=r+"px"),i+=a+3,s++,o.onResize()})):this.children.forEach((function(o){var a=Math.round((n-3*l.length)*o._dockPercentage);o.element.style.left=i+"px",o.element.style.top=r+"px",o.element.style.width=e+"px",o.element.style.height=a+"px",o instanceof t&&o._layoutChildren(e,a),s<l.length&&(l[s].style.left=i+"px",l[s].style.top=r+a+"px"),r+=a+3,s++,o.onResize()})))},t}(xe),Be=function(e){function t(t,n,o){var i=e.call(this)||this;if(i.element.className="DockPanel",o=void 0===o||1==o,i.titleElement=document.createElement("div"),i.titleElement.textContent=t,i.titleElement.className="title",i.contentWidget=n,i.contentWidget.element.classList.add("content"),i.element.appendChild(i.titleElement),i.element.appendChild(i.contentWidget.element),i.titleElement.addEventListener("mousedown",P(i)),i._dragged=!1,i._dockOverlay=null,i._dockTarget=null,i._dockTargetDirection=N.Float,o){var r=document.createElement("button");r.className="closeButton",r.textContent="🗙",i.titleElement.appendChild(r),r.onclick=function(e){i.close()}}return i.resizeEW=document.createElement("div"),i.resizeNS=document.createElement("div"),i.resizeDiag=document.createElement("div"),i.resizeEW.className="resizeEW",i.resizeNS.className="resizeNS",i.resizeDiag.className="resizeDiag",i.element.appendChild(i.resizeEW),i.element.appendChild(i.resizeNS),i.element.appendChild(i.resizeDiag),i._resizingHorizontally=!1,i._resizingVertically=!1,i.resizeEW.addEventListener("mousedown",P(i,(function(e,t){return i.onResizeStart(t,!0,!1)}))),i.resizeNS.addEventListener("mousedown",P(i,(function(e,t){return i.onResizeStart(t,!1,!0)}))),i.resizeDiag.addEventListener("mousedown",P(i,(function(e,t){return i.onResizeStart(t,!0,!0)}))),i}return _e(t,e),t.prototype.onResize=function(){e.prototype.onResize.call(this),this.contentWidget.onResize()},t.prototype.onAttached=function(){if(this.isAttached()){var e=we.indexOf(this);this.isFloating()?e<0&&we.push(this):e>=0&&we.splice(e,1),this.contentWidget.onAttached()}},t.prototype.getTitle=function(){return this.titleElement.textContent},t.prototype.setTitle=function(e){this.titleElement.textContent=e},t.prototype.setContent=function(e){this.contentWidget.element.classList.remove("content"),this.element.removeChild(this.contentWidget.element),this.contentWidget=e,this.contentWidget.element.classList.add("content"),this.element.appendChild(this.contentWidget.element),e.onAttached()},t.prototype.isFloating=function(){return this.element.classList.contains("floating")},t.prototype.close=function(){this.parentWidget instanceof Ee?this.parentWidget.undock(this):this.element.parentElement.removeChild(this.element)},t.prototype.createDragOverlay=function(){this._dockOverlay=document.createElement("div"),this._dockOverlay.className="dockOverlay",document.body.appendChild(this._dockOverlay)},t.prototype.onResizeStart=function(e,t,n){return!!this.isFloating()&&(t&&this.element.classList.add("resizingHorizontally"),n&&this.element.classList.add("resizingVertically"),this._resizingHorizontally=t,this._resizingVertically=n,!0)},t.prototype.onResizing=function(e){this.isFloating()&&(this._resizingHorizontally&&(this.element.style.width=e.posRelativeToElement.x+"px"),this._resizingVertically&&(this.element.style.height=e.posRelativeToElement.y+"px"),this.onResize())},t.prototype.onDragStart=function(t){return!t.target.classList.contains("closeButton")&&e.prototype.onDragStart.call(this,t)},t.prototype.onDragging=function(t){if(this._resizingHorizontally||this._resizingVertically)return this.onResizing(t);if(!this._dragged&&(Math.abs(t.posRelativeToDragStart.x)>10||Math.abs(t.posRelativeToDragStart.y)>10)&&(this._dragged=!0,this.parentWidget instanceof Ee&&(this.parentWidget.undock(this),document.body.appendChild(this.element)),this.createDragOverlay()),this._dragged)if(e.prototype.onDragging.call(this,t),this._dockTarget=function(e,t){for(var n=0,o=be;n<o.length;n++){var i=o[n];if(i.isAttached()){var r=i.getDockPanelAtPoint(e,t);if(null!=r)return r}}return null}(t.mouseEvent.clientX,t.mouseEvent.clientY),this._dockTarget){var n=this._dockTarget.element.getBoundingClientRect();t.mouseEvent.clientX<n.x+.05*n.width?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=N.Left):t.mouseEvent.clientX>n.x+.95*n.width?(this._dockOverlay.style.left=n.x+.5*n.width+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=.5*n.width+"px",this._dockOverlay.style.height=n.height+"px",this._dockTargetDirection=N.Right):t.mouseEvent.clientY<n.y+.05*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=N.Top):t.mouseEvent.clientY>n.y+.95*n.height?(this._dockOverlay.style.left=n.x+"px",this._dockOverlay.style.top=n.y+.5*n.height+"px",this._dockOverlay.style.width=n.width+"px",this._dockOverlay.style.height=.5*n.height+"px",this._dockTargetDirection=N.Bottom):(this._dockTargetDirection=N.Float,this._dockOverlay.style.width="0px")}else this._dockTargetDirection=N.Float,this._dockOverlay.style.width="0px"},t.prototype.onDragEnd=function(t){this._dragged&&(this._dragged=!1,null!=this._dockOverlay&&(document.body.removeChild(this._dockOverlay),this._dockOverlay=null),null!=this._dockTarget&&this._dockTargetDirection!=N.Float&&this.dockRelativeTo(this._dockTarget,this._dockTargetDirection)),this._resizingHorizontally=!1,this._resizingVertically=!1,this.element.classList.remove("resizingHorizontally"),this.element.classList.remove("resizingVertically"),e.prototype.onDragEnd.call(this,t)},t.prototype.float=function(e,t,n,o){null!=this.parentWidget&&this.parentWidget instanceof Ee&&this.parentWidget.undock(this),e=e||10,t=t||10,n=n||400,o=o||300,this.element.classList.add("floating"),this.element.style.left=e+"px",this.element.style.top=t+"px",this.element.style.width=n+"px",this.element.style.height=o+"px",document.body.appendChild(this.element),this.onAttached(),this.onResize()},t.prototype.dockRelativeTo=function(e,t,n){if(null!=n&&null!=n||(n=.5),!(e instanceof E)){var o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be a Widget object",toString:function(){return this.name+": "+this.message}};throw console.error(o),o}if(!(e.parentWidget instanceof Ee))throw o={name:"Argument Error",level:"Error",message:"The argument 'relativeWidget' must be inside a DockContainer",toString:function(){return this.name+": "+this.message}},console.error(o),o;e.parentWidget.dockRelativeTo(this,e,t,n)},t}(xe);window.addEventListener("resize",(function(){be.forEach((function(e){e.parentWidget instanceof Ee||e._layoutChildren()}))}));var Ie,Pe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),De=function(e,t,n,o){this.label=e,this.callback=t,this.isContinue=n,this.isCancel=o},Se=function(e){function t(t,n,o,i){var r=this,l=new E,s=l.element;r=e.call(this,t,l,i)||this;var a=document.createElement("div");a.textContent=n,a.className="text";var c=document.createElement("div");return c.className="buttons",r._cancelOption=null,r._continueOption=null,o.forEach((function(e){var t=document.createElement("button");t.textContent=e.label,e.isCancel&&(r._cancelOption=t),e.isContinue&&(r._continueOption=t),t.onclick=function(t){r.hide(),e.callback&&e.callback(r)},c.appendChild(t)})),s.appendChild(a),s.appendChild(c),r._boundKeyEvent=null,r}return Pe(t,e),t.prototype.showModal=function(){var t=this;e.prototype.showModal.call(this),this._boundKeyEvent=function(e){"Escape"==e.key&&t._cancelOption?t._clickButton(t._cancelOption):"Enter"==e.key&&t._continueOption&&t._clickButton(t._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},t.prototype._clickButton=function(e){var t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});e.dispatchEvent(t)},t.prototype.hide=function(){e.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},t}(H),Oe=function(e){function t(t,n,o,i){return e.call(this,t,n,[new De("OK",i,!0,!0)],o)||this}return Pe(t,e),t}(Se),Me=function(e){function t(t,n,o,i,r){var l=this,s=new E,a=s.element;l=e.call(this,t,s,r)||this;var c=document.createElement("div");c.textContent=n,c.className="text",l.inputElement=document.createElement("input"),l.inputElement.value=o,l.inputElement.type="text";var d=document.createElement("div");return d.className="buttons",l._cancelOption=null,l._continueOption=null,i.forEach((function(e){var t=document.createElement("button");t.textContent=e.label,e.isCancel&&(l._cancelOption=t),e.isContinue&&(l._continueOption=t),t.onclick=function(t){l.hide(),e.callback&&e.callback(l)},d.appendChild(t)})),a.appendChild(c),a.appendChild(l.inputElement),a.appendChild(d),l.element.className="Dialog",l.element.classList.add("InputDialog"),l._boundKeyEvent=null,l}return Pe(t,e),t.prototype.getValue=function(){return this.inputElement.value},t.prototype.showModal=function(){var t=this;e.prototype.showModal.call(this),this.inputElement.focus(),this.inputElement.select(),this._boundKeyEvent=function(e){"Escape"==e.key&&t._cancelOption?t._clickButton(t._cancelOption):"Enter"==e.key&&t._continueOption&&t._clickButton(t._continueOption)},window.addEventListener("keydown",this._boundKeyEvent)},t.prototype._clickButton=function(e){var t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});e.dispatchEvent(t)},t.prototype.hide=function(){e.prototype.hide.call(this),this._boundKeyEvent&&window.removeEventListener("keydown",this._boundKeyEvent),this._boundKeyEvent=null},t}(H);!function(e){e[e.ModifyData=1]="ModifyData",e[e.ModifyView=2]="ModifyView"}(Ie||(Ie={}));var Re,Ne=function(){function e(e){this._history=[],this._currentIndex=-1,this._idCounter=-1,this._onChangedCallback=e||function(e,t){}}return e.prototype.add=function(e){this._currentIndex++;var t=this._history.length-this._currentIndex;this._history.splice(this._currentIndex,t,e),e.id=++this._idCounter,this._onChangedCallback(this._history.slice(),this._currentIndex)},e.prototype.undo=function(){if(this.canUndo()){var e=this._history[this._currentIndex];this._currentIndex--,e.undo(),this._onChangedCallback(this._history.slice(),this._currentIndex)}},e.prototype.redo=function(){this.canRedo()&&(this._currentIndex++,this._history[this._currentIndex].do(),this._onChangedCallback(this._history.slice(),this._currentIndex))},e.prototype.canUndo=function(){return this._currentIndex>=0},e.prototype.canRedo=function(){return this._currentIndex<this._history.length-1},e.prototype.wasDataModifiedSinceVersion=function(e){if(this._currentIndex<0||this._history[this._currentIndex].id==e)return!1;for(var t=this._history.findIndex((function(t){return t.id==e})),n=t<this._currentIndex?-1:1,o=this._currentIndex;o!=t;o+=n)if(this._history[o].wasDataModified())return!0;return!1},e.prototype.getCurrentCommand=function(){return this._history[this._currentIndex]},e}(),Le=function(){function e(e,t,n,o){this.id=-1,this.title=e,this.do=t,this.undo=n,this.category=o||Ie.ModifyData}return e.prototype.wasDataModified=function(){return this.category==Ie.ModifyData},e}(),ze=function(){function e(){this._data=null}return e.prototype.set=function(e){this._data=e},e.prototype.clear=function(){this._data=null},e.prototype.get=function(){return this._data},e.prototype.containsData=function(){return null!=this._data},e}(),He=function(e,t,n){this.type=e,this.timestamp=t,this.data=n},We=new ze,Te=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){e[e.None=0]="None",e[e.MoveNodes=1]="MoveNodes",e[e.MoveSelectedNodes=2]="MoveSelectedNodes",e[e.Select=3]="Select",e[e.MoveViewport=4]="MoveViewport"}(Re||(Re={}));var Ve=function(e,t){this.fromOutput=e,this.toInput=t},je=function(e,t){this.nodes=e,this.connections=t},Ge=function(e,t,n,o){this.fromNodeIndex=e,this.fromOutputIndex=t,this.toNodeIndex=n,this.toInputIndex=o},Fe=function(e,t,n,o){this.title=e,this.inputs=t,this.outputs=n,this.pos=o},Je=function(){function e(e,t,n){this.x=e,this.y=t,this.zoom=n}return e.prototype.getPixelPos=function(){return this.getPixelPosFromPos(0,0)},e.prototype.getPixelPosFromPos=function(e,t){return new v((e-this.x)*this.zoom,(t-this.y)*this.zoom)},e.prototype.getPosFromPixelPos=function(e,t){return new v(e/this.zoom+this.x,t/this.zoom+this.y)},e}(),Ye=function(e){function t(t,n,o,i,r,l,s,a){var c=e.call(this)||this;c.element.classList.add("NodeEditor"),c._undoHistory=a||new Ne,c._svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),c._svg.setAttributeNS(null,"width","800"),c._svg.setAttributeNS(null,"height","300");var d=document.createElementNS("http://www.w3.org/2000/svg","defs"),h=document.createElementNS("http://www.w3.org/2000/svg","marker");h.setAttributeNS(null,"style","overflow:visible;"),h.setAttributeNS(null,"refX","0.0"),h.setAttributeNS(null,"refY","0.0"),h.setAttributeNS(null,"orient","auto"),h.setAttributeNS(null,"id","ArrowHead");var u=document.createElementNS("http://www.w3.org/2000/svg","path");u.setAttributeNS(null,"transform","scale(0.7) translate(-8,-5)"),u.setAttributeNS(null,"d","M 0 0 L 5 5 L 0 10 z"),h.appendChild(u),d.appendChild(h),c._svg.appendChild(d),c.element.appendChild(c._svg),c._nodes=[],c._viewport=new Je(0,0,1),c._zoomWithoutCtrl=r||void 0===r,c._addArrowHeads=l||void 0===l,c._targetInput=null,c._targetOutput=null,c._targetNode=null,c._defineCtrlShortcuts=s||void 0===s,c._dragStart=new v(-1,1),c._viewportDragStart=new v(-1,-1),c._dragMode=Re.None,c._selectRect=document.createElement("div"),c._selectRect.className="selectRect",c.element.appendChild(c._selectRect),c._selectRect.style.display="none",c.contextMenu=new ue("Node Editor"),c.contextMenu.addEntry("Cut",(function(){return c.onCut()}),(function(){return c.getSelectedNodes().length>0})),c.contextMenu.addEntry("Copy",(function(){return c.onCopy()}),(function(){return c.getSelectedNodes().length>0})),c.contextMenu.addEntry("Paste",(function(){return c.onPaste(!0)}),(function(){return c.canPaste()})),c.contextMenu.addEntry("Delete",(function(){return c._removeSelectedNodes()}),(function(){return c.getSelectedNodes().length>0})),c.element.addEventListener("contextmenu",(function(e){return e.preventDefault(),c.contextMenu.show(e.clientX,e.clientY),!1}));var A=P(c);return c.element.addEventListener("mousedown",(function(e){A(e),c._nodes.forEach((function(e){var t=e.getPixelPos();e._dragEditorPixelStartX=t.x,e._dragEditorPixelStartY=t.y}))})),c._draggedConnection=null,c._connectionSettingsBeforeDragging=null,c._selectedNodes=[],c._nodeSelectedCallback=t,c._nodeDeselectedCallback=n,c._nodeAddedCallback=o,c._nodeRemovedCallback=i,c._previouslySelectedNodes=[],c._hasFocus=!1,window.addEventListener("mouseup",(function(e){c._hasFocus=c.element.contains(e.target)})),window.addEventListener("keydown",(function(e){c._hasFocus&&("Delete"==e.key?c._removeSelectedNodes():"0"==e.key&&e.ctrlKey&&c._applyZoom(1),c._defineCtrlShortcuts&&("z"==e.key.toLowerCase()&&e.ctrlKey?e.shiftKey?c._undoHistory.redo():c._undoHistory.undo():"y"==e.key.toLowerCase()&&e.ctrlKey?c._undoHistory.redo():"c"==e.key.toLowerCase()&&e.ctrlKey?c.onCopy():"x"==e.key.toLowerCase()&&e.ctrlKey?c.onCut():"v"==e.key.toLowerCase()&&e.ctrlKey?c.onPaste(!1):"a"==e.key.toLowerCase()&&e.ctrlKey&&(e.shiftKey?c.deselectAllWithUndo():c.selectAllWithUndo(),e.preventDefault())))})),c.element.addEventListener("wheel",(function(e){if(e.ctrlKey||c._zoomWithoutCtrl){e.preventDefault(),c._hasFocus=!0;var t=c._viewport.zoom-.001*e.deltaY;t=Math.min(Math.max(.125,t),4);var n=c.element.getBoundingClientRect();c._applyZoom(t,e.clientX-n.left,e.clientY-n.top)}})),c}return Te(t,e),t.prototype.onCopy=function(){this.copy()},t.prototype.onCut=function(){this.cut()},t.prototype.onPaste=function(e){this.paste(e)},t.prototype.canPaste=function(){return We.containsData()},t.prototype.overridableCopy=function(e){We.set(new He("NodeEditor",new Date,e))},t.prototype.overridablePaste=function(){if(!We.containsData())return null;var e=We.get();return"NodeEditor"!=e.type?null:e.data},t.prototype.copy=function(){this.getSelectedNodes().length>0&&this.overridableCopy(this._getNodesCopyData())},t.prototype.cut=function(){this.copy(),this._removeSelectedNodes()},t.prototype.paste=function(e){var t=this.overridablePaste();if(t){var n,o,i=this.element.getBoundingClientRect();if(e){var r=this.contextMenu.getPos();n=r.x-i.left,o=r.y-i.top}else{var l=I;n=l.x-i.left,o=l.y-i.top}this._paste(t,new v(n,o))}},t.prototype._applyZoom=function(e,t,n){t=t||0,n=n||0;var o=this._viewport.getPosFromPixelPos(t,n);this._viewport.zoom=e;var i=this._viewport.getPosFromPixelPos(t,n);this._viewport.x=this._viewport.x+o.x-i.x,this._viewport.y=this._viewport.y+o.y-i.y,this.element.style.fontSize=e+"em",this._nodes.forEach((function(e){e.update()}))},t.prototype.useArrowHeads=function(e){this._addArrowHeads=e;for(var t=0,n=this._nodes;t<n.length;t++)for(var o=0,i=n[t]._connections;o<i.length;o++)i[o].setUseArrowHead(e)},t.prototype.zoomWithoutCtrl=function(e){this._zoomWithoutCtrl=e},t.prototype._addConnection=function(e){this._svg.contains(e._path)||this._svg.appendChild(e._path)},t.prototype._removeConnection=function(e){this._svg.contains(e._path)&&this._svg.removeChild(e._path)},t.prototype._removeSelectedNodes=function(){var e=this,t=this._selectedNodes.splice(0),n=new Le("Delete Nodes",(function(){t.forEach((function(t){e.removeNode(t)}))}),(function(){e.deselectAll(),t.forEach((function(t){e.addNode(t),t.select()}))}),Ie.ModifyData);n.do(),this._undoHistory.add(n)},t.prototype.onAttached=function(){this.isAttached()&&this._nodes.forEach((function(e){e.onAttached()}))},t.prototype.getSelectedNodes=function(){return this._selectedNodes},t.prototype.clear=function(){var e=this;this._nodes.slice().forEach((function(t){return e.removeNode(t)}))},t.prototype._createNodeForPaste=function(e){for(var t=new Ke(e.title),n=0,o=e.inputs;n<o.length;n++){var i=o[n];t.addInput(i.name,i.canConnectCheck)}for(var r=0,l=e.outputs;r<l.length;r++){var s=l[r];t.addOutput(s.name,s.canConnectCheck,s.allowMultipleConnections)}return t},t.prototype._getNodesCopyData=function(){for(var e=this.getSelectedNodes(),t=e.map((function(e){return e._copy()})),n=[],o=0,i=0,r=e;i<r.length;i++){for(var l=r[i],s=0,a=l._connections;s<a.length;s++){var c=a[s];if(c._fromOutput._node==l){var d=e.indexOf(c._toInput._node);if(d>=0){var h=new Ge(o,l._outputs.indexOf(c._fromOutput),d,e[d]._inputs.indexOf(c._toInput));n.push(h)}}}o++}return new je(t,n)},t.prototype._paste=function(e,t){for(var n=this,o=e.nodes,i=null,r=null,l=0,s=o;l<s.length;l++){var a=s[l];(null==i||a.pos.x<i)&&(i=a.pos.x),(null==r||a.pos.y<r)&&(r=a.pos.y)}var c=o.map((function(e){var o=n._createNodeForPaste(e);return o.setPixelPos(e.pos.x-i+t.x,e.pos.y-r+t.y),o})),d=this._selectedNodes.slice(0),h=new Le(o.length>1?"Paste Nodes":"Paste Node",(function(){n.deselectAll();for(var t=0,o=c;t<o.length;t++){var i=o[t];n.addNode(i),i.select()}for(var r=0,l=e.connections;r<l.length;r++){var s=l[r];n.connect(c[s.fromNodeIndex]._outputs[s.fromOutputIndex],c[s.toNodeIndex]._inputs[s.toInputIndex])}n._onNodesPasted(c);for(var a=0,d=c;a<d.length;a++)(i=d[a]).update()}),(function(){c.forEach((function(e){return n.removeNode(e)})),n.deselectAll(),d.forEach((function(e){return e.select()}))}),Ie.ModifyData);this._undoHistory.add(h),h.do()},t.prototype._onNodesPasted=function(e){},t.prototype.removeNode=function(e){var t=this;e._editor=null,this.element.removeChild(e.element),e._connections.forEach((function(n){n._fromOutput._node!=e&&n._fromOutput._node.removeConnection(n),n._toInput._node!=e&&n._toInput._node.removeConnection(n),t._removeConnection(n)}));var n=this._nodes.indexOf(e);n>-1&&this._nodes.splice(n,1);var o=this._selectedNodes.indexOf(e);o>-1&&this._selectedNodes.splice(o,1),this._nodeRemovedCallback&&this._nodeRemovedCallback(e)},t.prototype.addNode=function(e){var t=this;this._nodes.push(e),this.element.appendChild(e.element),e._editor=this,e._connections.forEach((function(n){n._fromOutput._node!=e&&n._fromOutput._node.addConnection(n),n._toInput._node!=e&&n._toInput._node.addConnection(n),t._addConnection(n)})),e.onAttached(),this._nodeAddedCallback&&this._nodeAddedCallback(e)},t.prototype.addNodeWithUndo=function(e,t){var n=this,o=new Le(t||"Add Node",(function(){n.addNode(e)}),(function(){n.removeNode(e)}),Ie.ModifyData);this._undoHistory.add(o),o.do()},t.prototype.getNodes=function(){return this._nodes},t.prototype.connect=function(e,t){var n=new Ue(e,t);e._node.addConnection(n),t._node.addConnection(n),this._addConnection(n)},t.prototype.disconnect=function(e,t){var n=this._connections.find((function(n){return n._fromOutput==e&&n._toInput==t}));n&&(e._node.removeConnection(n),t._node.removeConnection(n),this._removeConnection(n))},t.prototype.onDragStart=function(e){if(1==e.button||0==e.button&&e.ctrlKey){this.element.classList.add("moving"),this._dragMode=Re.MoveViewport;var t=this.element.getBoundingClientRect();return this._dragStart.x=e.clientX-t.left,this._dragStart.y=e.clientY-t.top,this._viewportDragStart.x=this._viewport.x,this._viewportDragStart.y=this._viewport.y,!0}return 0==e.button&&e.target==this.element&&(this._previouslySelectedNodes=this._selectedNodes.slice(0),this.deselectAll(),t=this.element.getBoundingClientRect(),this._dragStart.x=e.clientX-t.left,this._dragStart.y=e.clientY-t.top,this._dragMode=Re.Select,this._selectRect.style.display="block",this._selectRect.style.left=this._dragStart.x+"px",this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width="0",this._selectRect.style.height="0",!0)},t.prototype.onDragNodesStarted=function(){this.element.classList.add("moving"),this._selectedNodes.forEach((function(e){e.onDragStarted()}))},t.prototype._scrollOutOfBounds=function(e,t){0==e&&0==t||(this._viewport.x+=.2*e,this._viewport.y+=.2*t,this._nodes.forEach((function(e){e.update()})))},t.prototype._checkOutOfBoundsScroll=function(e){var t=0,n=0,o=this.element.getBoundingClientRect(),i=e.clientX-o.x,r=e.clientY-o.y;i<0?t=i:i>o.width&&(t=i-o.width),r<0?n=r:r>o.height&&(n=r-o.height),this._scrollOutOfBounds(t,n)},t.prototype.onDragging=function(e){var t=this,n=this.element.getBoundingClientRect(),o=e.posWithOffsetToParentConsidered.x-n.left,i=e.posWithOffsetToParentConsidered.y-n.top;switch(this._dragMode){case Re.MoveViewport:this._viewport.x=this._viewportDragStart.x-o/this._viewport.zoom,this._viewport.y=this._viewportDragStart.y-i/this._viewport.zoom,this._nodes.forEach((function(e){e.update()}));break;case Re.MoveSelectedNodes:this._selectedNodes.forEach((function(e){e.setPixelPos(e._dragEditorPixelStartX+o,e._dragEditorPixelStartY+i),e._connections.forEach((function(e){e.update()}))})),this._checkOutOfBoundsScroll(e.mouseEvent);break;case Re.Select:o<0?(this._selectRect.style.left=this._dragStart.x+o+"px",o*=-1):this._selectRect.style.left=this._dragStart.x+"px",i<0?(this._selectRect.style.top=this._dragStart.y+i+"px",i*=-1):this._selectRect.style.top=this._dragStart.y+"px",this._selectRect.style.width=o+"px",this._selectRect.style.height=i+"px";var r=this._selectRect.getBoundingClientRect();this._nodes.map((function(e){return{node:e,selected:t.intersection(r,e.element.getBoundingClientRect())}})).forEach((function(e){e.selected?e.node.select():e.node.deselect()})),this._checkOutOfBoundsScroll(e.mouseEvent)}},t.prototype.onDragEnd=function(e){var t=this;switch(this.element.classList.remove("moving"),this._dragMode){case Re.MoveViewport:break;case Re.MoveSelectedNodes:this._selectedNodes.forEach((function(t){return t.onDragEnd(e)}));var n=this._selectedNodes.map((function(e){return{node:e,startPos:{x:e._dragEditorStartX,y:e._dragEditorStartY},endPos:{x:e._pos.x,y:e._pos.y}}}));if(!n.every((function(e){return e.endPos.x==e.startPos.x&&e.endPos.x==e.startPos.x}))){var o=new Le(this._selectedNodes.length>1?"Move Nodes":"Move Node",(function(){n.forEach((function(e){e.node.setPos(e.endPos.x,e.endPos.y)}))}),(function(){n.forEach((function(e){e.node.setPos(e.startPos.x,e.startPos.y)}))}),Ie.ModifyData);this._undoHistory.add(o),o.do()}break;case Re.Select:this._selectRect.style.display="none";var i=this._previouslySelectedNodes,r=this._selectedNodes.slice(0);if(0!=i.length||0!=r.length){var l=new Le(0==r.length?"Deselect All Nodes":"Select Nodes",(function(){t.deselectAll(),r.forEach((function(e){return e.select()}))}),(function(){t.deselectAll(),i.forEach((function(e){return e.select()}))}),Ie.ModifyView);this._undoHistory.add(l)}}this._dragMode=Re.None},t.prototype.intersection=function(e,t){return!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)},t.prototype.deselectAllWithUndo=function(){var e=this,t=this._selectedNodes.slice(0),n=new Le("Deselect All Nodes",(function(){e.deselectAll()}),(function(){e.deselectAll(),t.forEach((function(e){return e.select()}))}),Ie.ModifyView);n.do(),this._undoHistory.add(n)},t.prototype.selectAllWithUndo=function(){var e=this,t=this._selectedNodes.slice(0),n=new Le("Select All Nodes",(function(){e.selectAll()}),(function(){e.deselectAll(),t.forEach((function(e){return e.select()}))}),Ie.ModifyView);n.do(),this._undoHistory.add(n)},t.prototype.deselectAll=function(){this._selectedNodes.slice(0).forEach((function(e){e.deselect()}))},t.prototype.selectAll=function(){this._nodes.forEach((function(e){e.select()}))},t}(E),Ue=function(){function e(e,t){this._fromOutput=e,this._toInput=t,this._path=document.createElementNS("http://www.w3.org/2000/svg","path"),this._path.setAttributeNS(null,"fill","transparent"),this._path.setAttributeNS(null,"stroke-width","2"),(e||t)._node._editor._addArrowHeads&&this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"),this._fromOutput&&this._toInput&&this.update()}return e.prototype.setUseArrowHead=function(e){e?this._path.setAttributeNS(null,"style","marker-end:url(#ArrowHead)"):this._path.setAttributeNS(null,"style","marker-end:none")},e.prototype.update=function(e,t){var n,o,i;n=null!=this._fromOutput?this._fromOutput._bullet.getBoundingClientRect():{left:e,top:t,width:0,height:0},o=null!=this._toInput?this._toInput._bullet.getBoundingClientRect():{left:e,top:t,width:0,height:0},i=null!=this._path.parentNode?this._path.parentElement.getBoundingClientRect():{left:0,top:0};var r=n.left-i.left+.5*n.width,l=n.top-i.top+.5*n.height,s=o.left-i.left+.5*o.width,a=o.top-i.top+.5*o.height,c=this._fromOutput?this._fromOutput._node._editor:this._toInput?this._toInput._node._editor:null,d=c?c._viewport.zoom:1;d||(d=1),this._path.setAttributeNS(null,"d","M"+r+" "+l+" C "+(r+50*d)+" "+l+", "+(s-50*d)+" "+a+", "+s+" "+a)},e}(),$e=function(){function e(e,t,n,o,i){this._node=e,this._name=t,this._isInput=n,this._allowMultipleConnectionsForOutput=!!i,this._canConnectCheck=o||function(e){return!0},this._bullet=n?this.createInput():this.createOutput()}return e.prototype.createInput=function(){var e=this,t=document.createElement("div");t.className="input";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,t.appendChild(n),t.appendChild(o),this._node._inputsElement.appendChild(t),n.onmouseenter=function(t){e._node._editor&&(null==e._node._editor._draggedConnection||e._canConnectCheck(e._node._editor._draggedConnection._fromOutput)&&e._node._editor._draggedConnection._fromOutput._canConnectCheck(e)||e._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),e._node._editor._targetInput=e,e._node._editor._targetNode=e._node)},n.onmouseleave=function(t){e._node._editor&&(e._node._editor._targetInput==e&&(e._node._editor._targetInput=null),e._node._editor._draggedConnection&&e._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=P(this._node._connectionDragging);return n.onmousedown=function(t){if(t.stopPropagation(),e._node._editor){i(t);var n=void 0,o=null,r=e._node._connections.find((function(t){return t._toInput==e}));r?(o=new Ve(r._fromOutput,r._toInput),(n=r)._toInput=null,e._node.removeConnection(n)):(n=new Ue(null,e),e._node.addConnection(n),e._node._editor._addConnection(n)),e._node._editor._draggedConnection=n,e._node._editor._connectionSettingsBeforeDragging=o}},n},e.prototype.createOutput=function(){var e=this,t=document.createElement("div");t.className="output";var n=document.createElement("span");n.className="bullet";var o=document.createElement("span");o.className="label",o.textContent=this._name,t.appendChild(o),t.appendChild(n),this._node._outputsElement.appendChild(t),n.onmouseenter=function(t){e._node._editor&&(null==e._node._editor._draggedConnection||e._canConnectCheck(e._node._editor._draggedConnection._toInput)&&(!e._node._editor._draggedConnection._toInput||e._node._editor._draggedConnection._toInput._canConnectCheck(e))||e._node._editor._draggedConnection._path.setAttributeNS(null,"class","notConnectable"),e._node._editor._targetOutput=e,e._node._editor._targetNode=e._node)},n.onmouseleave=function(t){e._node._editor&&(e._node._editor._targetOutput==e&&(e._node._editor._targetOutput=null),e._node._editor._draggedConnection&&e._node._editor._draggedConnection._path.setAttributeNS(null,"class",""))};var i=P(this._node._connectionDragging);return n.onmousedown=function(t){if(t.stopPropagation(),e._node._editor){i(t);var n=void 0,o=null,r=null;e._allowMultipleConnectionsForOutput||(o=e._node._connections.find((function(t){return t._fromOutput==e})))&&(r={fromOutput:o._fromOutput,toInput:o._toInput},(n=o)._fromOutput=null,e._node.removeConnection(n)),n||(n=new Ue(e,null),e._node.addConnection(n),e._node._editor._addConnection(n)),e._node._editor._draggedConnection=n,e._node._editor._connectionSettingsBeforeDragging=r}},n},e.prototype.isInput=function(){return this._isInput},e.prototype.isOutput=function(){return!this._isInput},e}(),Ke=function(e){function t(t){var n=e.call(this)||this;n.element.classList.add("Node"),n._title=document.createElement("div"),n.setTitle(t),n._title.className="title",n.element.appendChild(n._title);var o=document.createElement("div");return n._pos=new v(-1,-1),n._connections=[],n._inputs=[],n._inputsElement=document.createElement("div"),n._inputsElement.className="inputs",o.appendChild(n._inputsElement),o.className="body",n._contentsElement=document.createElement("div"),n._contentsElement.className="contents",o.appendChild(n._contentsElement),n._outputs=[],n._outputsElement=document.createElement("div"),n._outputsElement.className="outputs",o.appendChild(n._outputsElement),n.element.appendChild(o),n._dragEditorPixelStartX=0,n._dragEditorPixelStartY=0,n._dragEditorStartX=0,n._dragEditorStartY=0,n._editor=null,n._wasActuallyDragged=!1,n._connectionDragging=new D(n.element,(function(e){return!0}),(function(e){n._editor&&n._editor._draggedConnection&&(n._editor._checkOutOfBoundsScroll(e.mouseEvent),n._editor._draggedConnection.update(e.mouseEvent.clientX,e.mouseEvent.clientY))}),(function(e){if(n._editor&&n._editor._draggedConnection){var t=function(e,t){return new Le("Remove Connection",(function(){n._removeDraggedConnection(e)}),(function(){null!=t&&(e._fromOutput=t.fromOutput,e._toInput=t.toInput),e._path.setAttributeNS(null,"class",""),n._editor._addConnection(e),e.update(),e._fromOutput&&e._fromOutput._node.addConnection(e),e._toInput&&e._toInput._node.addConnection(e)}),Ie.ModifyData)},o=function(e,o){var i=n._editor._connectionSettingsBeforeDragging;if(!e._canConnectCheck(o)||!o._canConnectCheck(e)){var r=n._editor._draggedConnection,l=t(r,i);return n._editor._undoHistory.add(l),void l.do()}var s=n._connections.find((function(t){return t._fromOutput==e&&t._toInput==o})),a=n._editor._draggedConnection,c=function(e,t,o,i,r,l){return new Le(r?"Change Connection":"Add Connection",(function(){l&&(n._editor._removeConnection(l),n.removeConnection(l),o.removeConnection(l)),i._fromOutput=e,i._toInput=t,n._editor._addConnection(i),n.addConnection(i),o.addConnection(i),i.update(),n._onConnectionAdded(i),o._onConnectionAdded(i)}),(function(){r?(o.removeConnection(i),r.fromOutput._node==o?i._fromOutput=r.fromOutput:i._toInput=r.toInput,i.update(),n._onConnectionAdded(i)):(n._editor._removeConnection(i),n.removeConnection(i),i._fromOutput._node.removeConnection(i),i._toInput._node.removeConnection(i)),l&&(o.addConnection(l),l.update(),i._fromOutput._node.update(),i._toInput._node.update(),i._fromOutput._node.addConnection(l),i._toInput._node.addConnection(l),i._fromOutput._node._onConnectionAdded(l),i._toInput._node._onConnectionAdded(l))}),Ie.ModifyData)}(e,o,n._editor._targetNode,a,i,s);n._editor._draggedConnection=null,n._editor._connectionSettingsBeforeDragging=null,n._editor._undoHistory.add(c),c.do()};if(n._editor._targetInput&&!n._editor._draggedConnection._toInput)o(n._editor._draggedConnection._fromOutput,n._editor._targetInput);else if(n._editor._targetOutput&&!n._editor._draggedConnection._fromOutput)o(n._editor._targetOutput,n._editor._draggedConnection._toInput);else{var i=n._editor._draggedConnection,r=n._editor._connectionSettingsBeforeDragging,l=t(i,r);r&&n._editor._undoHistory.add(l),l.do()}}})),n}return Te(t,e),t.prototype._mapNodePort=function(e){return{name:e._name,allowMultipleConnectionsForOutput:e._allowMultipleConnectionsForOutput,canConnectCheck:e._canConnectCheck}},t.prototype._copy=function(){var e=this;return new Fe(this.getTitle(),this._inputs.map((function(t){return e._mapNodePort(t)})),this._outputs.map((function(t){return e._mapNodePort(t)})),this.getPos())},t.prototype._onConnectionAdded=function(e){},t.prototype._onConnectionRemoved=function(e){},t.prototype._removeDraggedConnection=function(e){e._fromOutput&&e._fromOutput._node.removeConnection(e),e._toInput&&e._toInput._node.removeConnection(e),this._editor._removeConnection(e),e=null,this._editor._draggedConnection=null,this._editor._connectionSettingsBeforeDragging=null},t.prototype.onAttached=function(){var e=this;if(this.isAttached()){if(this._connections.forEach((function(e){e.update()})),null==this._pos.x){var t=this._getViewport();this._pos.x=t.getPosFromPixelPos(parseInt(this.element.style.left),0).x}null==this._pos.y&&(t=this._getViewport(),this._pos.y=t.getPosFromPixelPos(0,parseInt(this.element.style.top)).y),this.update(),this._title.addEventListener("mousedown",P(this._editor,(function(t,n){return!!e.onDragStart(n)&&(e._editor.onDragNodesStarted(),!0)})))}},t.prototype._getViewport=function(){return this._editor?this._editor._viewport:null},t.prototype.setPixelPos=function(e,t){var n=this._getViewport();if(this.element.style.left=e+"px",this.element.style.top=t+"px",n){var o=n.getPosFromPixelPos(e,t);this._pos.x=o.x,this._pos.y=o.y}else this._pos.x=void 0,this._pos.y=void 0},t.prototype.getPixelPos=function(){var e=this._getViewport();return e?e.getPixelPosFromPos(this._pos.x,this._pos.y):null},t.prototype.setPos=function(e,t){this._pos.x=e,this._pos.y=t,this.update()},t.prototype.getPos=function(){return new v(this._pos.x,this._pos.y)},t.prototype.getTitle=function(){return this._title.textContent},t.prototype.setTitle=function(e){this._title.textContent=e},t.prototype.addInput=function(e,t){var n=new $e(this,e,!0,t);return this._inputs.push(n),n},t.prototype.addOutput=function(e,t,n){var o=new $e(this,e,!1,t,n);return this._outputs.push(o),o},t.prototype.addConnection=function(e){this._connections.includes(e)||this._connections.push(e)},t.prototype.removeConnection=function(e){var t=this._connections.indexOf(e);t>-1&&this._connections.splice(t,1),this._onConnectionRemoved(e)},t.prototype.onDragStart=function(e){return 0!=e.button&&2!=e.button||this.isSelected()||this.selectSingle(),0==e.button},t.prototype.onDragStarted=function(){var e=this.getPixelPos();this._dragEditorPixelStartX=e.x,this._dragEditorPixelStartY=e.y,this._dragEditorStartX=this._pos.x,this._dragEditorStartY=this._pos.y,this._editor._dragMode=Re.MoveSelectedNodes},t.prototype.onDragEnd=function(t){e.prototype.onDragEnd.call(this,t),this._wasActuallyDragged=!1},t.prototype.isSelected=function(){return this.element.classList.contains("selected")},t.prototype.select=function(){this._editor._selectedNodes.indexOf(this)>-1||(this._editor._selectedNodes.push(this),this.element.classList.add("selected"),this._editor._nodeSelectedCallback&&this._editor._nodeSelectedCallback(this))},t.prototype.deselect=function(){this._editor._selectedNodes.indexOf(this)<0||(this._editor._selectedNodes.splice(this._editor._selectedNodes.indexOf(this),1),this.element.classList.remove("selected"),this._editor._nodeDeselectedCallback&&this._editor._nodeDeselectedCallback(this))},t.prototype.selectSingle=function(){var e=this,t=this._editor._selectedNodes.slice(0),n=new Le("Select Node",(function(){e._editor.deselectAll(),e.select()}),(function(){e._editor.deselectAll(),t.forEach((function(e){return e.select()}))}),Ie.ModifyView);n.do(),this._editor._undoHistory.add(n)},t.prototype.update=function(){var e=this.getPixelPos();e&&(this.element.style.left=e.x+"px",this.element.style.top=e.y+"px",this._connections.forEach((function(e){e.update()})))},t}(E);module.exports.tootframes=o})();
2
2
  //# sourceMappingURL=tootframes.js.map